diff --git a/.github/workflows/_sdk-acceptance.yml b/.github/workflows/_sdk-acceptance.yml new file mode 100644 index 0000000..dad5faa --- /dev/null +++ b/.github/workflows/_sdk-acceptance.yml @@ -0,0 +1,96 @@ +name: SDK acceptance + +on: + workflow_call: + +permissions: + contents: read + +jobs: + contract: + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Test contract workflow helpers + run: python3 -m unittest discover -s tests -v + + - name: Verify contract provenance and generator pin + run: python3 -m scripts.check_contract_provenance + + - name: Check OpenAPI backward compatibility + env: + PR_BASE_SHA: ${{ github.event.pull_request.base.sha }} + PUSH_BASE_SHA: ${{ github.event.before }} + run: | + set -euo pipefail + BASE_SHA="${PR_BASE_SHA:-${PUSH_BASE_SHA:-}}" + if [ -z "$BASE_SHA" ] || [ "$BASE_SHA" = "0000000000000000000000000000000000000000" ]; then + BASE_SHA="$(git rev-parse HEAD^)" + fi + python3 scripts/check_openapi_compatibility.py \ + --base "${BASE_SHA}:sdk/openapi.json" + + - name: Regenerate with pinned OpenAPI Generator + run: bash scripts/generate-sdks.sh sdk/openapi.json + + - name: Check generated-code freshness + run: bash scripts/check-generated-freshness.sh + + - name: Check generated operation coverage + run: python3 scripts/check_operation_coverage.py + + - name: Check exact generated Python contract shape + run: | + python3 scripts/check_python_generated_contract.py + python3 scripts/postprocess_python_models.py --check + python3 scripts/generate_python_contract_manifest.py --check + + - name: Check generated Python API reference + run: python3 scripts/generate_python_api_reference.py --check + + python: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.12", "3.14"] + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install Python SDK and test dependencies + run: python -m pip install -e 'sdk/python[dev]' + - name: Test generated-client conformance and model policy + run: python -m pytest sdk/python/tests quality/python -q + - name: Build Python distributions + run: python -m build sdk/python + + typescript: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: "20" + cache: npm + cache-dependency-path: sdk/typescript/package-lock.json + - run: npm ci + working-directory: sdk/typescript + - run: npm run build + working-directory: sdk/typescript + + go: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: sdk/go/go.mod + cache-dependency-path: sdk/go/go.sum + - run: go test ./... + working-directory: sdk/go diff --git a/.github/workflows/generate-sdks.yml b/.github/workflows/generate-sdks.yml index a4d6504..7f37162 100644 --- a/.github/workflows/generate-sdks.yml +++ b/.github/workflows/generate-sdks.yml @@ -14,58 +14,5 @@ concurrency: cancel-in-progress: true jobs: - contract: - runs-on: ubuntu-latest - timeout-minutes: 20 - steps: - - uses: actions/checkout@v4 - - - name: Test contract workflow helpers - run: python3 -m unittest discover -s tests -v - - - name: Verify contract provenance and generator pin - run: python3 -m scripts.check_contract_provenance - - - name: Regenerate with pinned OpenAPI Generator - run: bash scripts/generate-sdks.sh sdk/openapi.json - - - name: Check generated-code freshness - run: bash scripts/check-generated-freshness.sh - - - name: Check generated operation coverage - run: python3 scripts/check_operation_coverage.py - - python: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - run: python -m pip install -r sdk/python/requirements.txt -r sdk/python/test-requirements.txt - - run: python -m pytest sdk/python/test -q - - typescript: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: "20" - cache: npm - cache-dependency-path: sdk/typescript/package-lock.json - - run: npm ci - working-directory: sdk/typescript - - run: npm run build - working-directory: sdk/typescript - - go: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version-file: sdk/go/go.mod - cache-dependency-path: sdk/go/go.sum - - run: go test ./... - working-directory: sdk/go + acceptance: + uses: ./.github/workflows/_sdk-acceptance.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7b72783..6b1644d 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,11 +2,11 @@ name: Publish SDKs # Publishes the generated SDKs: # - Python -> PyPI (agentdrive-sdk) via OIDC trusted publishing (no token) -# - TS -> npm (@mnexa-ai/agentdrive-sdk) via NPM_TOKEN secret +# - TS -> npm (@mnexa-ai/agentdrive-sdk) via OIDC trusted publishing # - Go -> git tag go/vX.Y.Z (consumed with `go get .../go@vX.Y.Z`) # -# Publishes the version currently baked into the generated package metadata. -# Bump by re-running "Generate SDKs" with SDK_VERSION set, then release. +# Every publish is gated on the release/dispatch version matching sdk/SDK_VERSION +# and every language's package metadata. Existing versions are hard failures. on: release: @@ -14,15 +14,72 @@ on: workflow_dispatch: inputs: version: - description: "Version being published (e.g. 0.0.1), used for the Go tag." + description: "Exact SDK version being published (e.g. 0.1.0)." required: true - default: "0.0.1" + default: "0.1.0" jobs: + release-policy: + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Require an approved main-branch commit + env: + EVENT_NAME: ${{ github.event_name }} + RELEASE_REF: ${{ github.ref }} + RELEASE_SHA: ${{ github.sha }} + run: | + set -euo pipefail + if [ "$EVENT_NAME" = "workflow_dispatch" ] && [ "$RELEASE_REF" != "refs/heads/main" ]; then + echo "Manual SDK publishing is allowed only from refs/heads/main; got $RELEASE_REF." >&2 + exit 1 + fi + if [ "$EVENT_NAME" = "release" ]; then + git fetch --no-tags origin \ + '+refs/heads/main:refs/remotes/origin/main' + if ! git merge-base --is-ancestor "$RELEASE_SHA" refs/remotes/origin/main; then + echo "Release commit $RELEASE_SHA is not contained in origin/main." >&2 + exit 1 + fi + fi + + acceptance: + needs: release-policy + uses: ./.github/workflows/_sdk-acceptance.yml + + release-integrity: + needs: acceptance + runs-on: ubuntu-latest + permissions: + contents: read + outputs: + version: ${{ steps.version.outputs.version }} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + - name: Match publish input to every package version + id: version + env: + REQUESTED_VERSION: ${{ github.event.release.tag_name || github.event.inputs.version }} + run: | + set -euo pipefail + VERSION="$(python3 scripts/check_release_version.py \ + --requested "$REQUESTED_VERSION" \ + --event "${{ github.event_name }}")" + echo "version=$VERSION" >> "$GITHUB_OUTPUT" + pypi: + needs: [acceptance, release-integrity] runs-on: ubuntu-latest environment: pypi permissions: + contents: read id-token: write # OIDC trusted publishing steps: - uses: actions/checkout@v4 @@ -38,9 +95,9 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: packages-dir: sdk/python/dist - skip-existing: true npm: + needs: [acceptance, release-integrity] runs-on: ubuntu-latest permissions: id-token: write # OIDC trusted publishing (no NPM token) @@ -57,25 +114,12 @@ jobs: - name: Build & publish (OIDC, no token) working-directory: sdk/typescript run: | - npm install + npm ci npm run build - VERSION="$(node -p "require('./package.json').version")" - if npm view "@mnexa-ai/agentdrive-sdk@${VERSION}" version >/dev/null 2>&1; then - echo "npm: @mnexa-ai/agentdrive-sdk@${VERSION} already published — skipping." - exit 0 - fi - # `npm view` reads a replica that lags the authoritative write path, - # so a freshly/concurrently published version can still 403 here. - # Treat "cannot publish over previously published" as success. - set +e - OUT="$(npm publish --access public 2>&1)"; CODE=$? - set -e - printf '%s\n' "$OUT" - if [ "$CODE" -ne 0 ] && ! printf '%s' "$OUT" | grep -q "cannot publish over the previously published versions"; then - exit "$CODE" - fi + npm publish --access public go-tag: + needs: [acceptance, release-integrity] runs-on: ubuntu-latest permissions: contents: write @@ -84,16 +128,16 @@ jobs: with: fetch-depth: 0 - name: Create Go submodule version tag + env: + VERSION: ${{ needs.release-integrity.outputs.version }} run: | set -euo pipefail - RAW="${{ github.event.inputs.version || github.event.release.tag_name }}" - VERSION="${RAW#v}" TAG="sdk/go/v${VERSION}" git config user.name "agentdrive-bot" git config user.email "support@agentdrive.run" if git rev-parse "$TAG" >/dev/null 2>&1; then - echo "Tag $TAG already exists." - else - git tag "$TAG" - git push origin "$TAG" + echo "Refusing to reuse immutable tag $TAG." >&2 + exit 1 fi + git tag "$TAG" + git push origin "$TAG" diff --git a/README.md b/README.md index cb20945..c6e0cb7 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,9 @@ Full paste-ready blocks: [`docs/add-to-your-agent.md`](docs/add-to-your-agent.md Generated reproducibly from the reviewed AgentDrive contract via pinned [OpenAPI Generator](https://openapi-generator.tech/). See -[`sdk/README.md`](sdk/README.md). +[`sdk/README.md`](sdk/README.md). The Phase 1 Python package includes complete +sync and async generated clients; its exact callable and wire reference is +[`docs/python-sdk-api-reference.md`](docs/python-sdk-api-reference.md). ```bash # Python (once published) @@ -71,7 +73,9 @@ npm install @mnexa-ai/agentdrive-sdk go get github.com/Mnexa-AI/agentdrive-sdk/sdk/go ``` -> The bare `agentdrive` package on PyPI is the [stdio MCP companion](https://pypi.org/project/agentdrive/); the REST SDK ships as `agentdrive-sdk`. +> The bare `agentdrive` name on PyPI is a parked `0.0.1` placeholder. The old +> stdio MCP companion is retired; local-file transfers use the hosted MCP upload +> session tools or this REST SDK. The REST SDK ships as `agentdrive-sdk`. ## Links diff --git a/docs/python-sdk-api-reference.md b/docs/python-sdk-api-reference.md new file mode 100644 index 0000000..7db0a38 --- /dev/null +++ b/docs/python-sdk-api-reference.md @@ -0,0 +1,4384 @@ + +# AgentDrive Python generated-core API reference + +This reference describes the exact OpenAPI wire surface wrapped by both the +synchronous and asynchronous generated Python cores. The ergonomic SDK facade +is documented separately. Callable signatures and docstrings below are parsed +from the committed generated source; the reference check fails if either client +is absent or drifts from the contract. + +- Contract SHA-256: `dd8145c12035f5827e9056d40c0ae9e56f1892c98580f81d5f005007ef7a0f6a` +- Operations: **42** (39 bearer-authenticated, 3 anonymous) +- AgentDrive source commit: `31cd35c8e12aef1cbee228e965289107cb51092c` +- Generator image: `openapitools/openapi-generator-cli:v7.24.0@sha256:5bf3dc75f764c584da8e3344c51b2f3f1e74703461d46a035b5ac1d31515cc88` + +## Operations + +### artifacts + +#### `artifacts_list` + +`GET /v0/drives/{drive_id}/artifacts` — List Artifacts + +Authentication: **bearer token**. + +List the drive's artifacts, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted artifacts. ``parent_id`` / ``name`` / ``content_type`` / ``label`` are exact-match filters; ``updated_after`` / ``updated_before`` are inclusive bounds. Unknown query parameters are rejected. + +Generated API class: `ArtifactsApi` + +Synchronous callables: + +```python +def artifacts_list(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, parent_id: Optional[StrictStr] = None, name: Optional[StrictStr] = None, content_type: Optional[StrictStr] = None, label: Optional[StrictStr] = None, updated_after: Optional[datetime] = None, updated_before: Optional[datetime] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ArtifactListOut +def artifacts_list_with_http_info(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, parent_id: Optional[StrictStr] = None, name: Optional[StrictStr] = None, content_type: Optional[StrictStr] = None, label: Optional[StrictStr] = None, updated_after: Optional[datetime] = None, updated_before: Optional[datetime] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[ArtifactListOut] +def artifacts_list_without_preload_content(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, parent_id: Optional[StrictStr] = None, name: Optional[StrictStr] = None, content_type: Optional[StrictStr] = None, label: Optional[StrictStr] = None, updated_after: Optional[datetime] = None, updated_before: Optional[datetime] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def artifacts_list(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, parent_id: Optional[StrictStr] = None, name: Optional[StrictStr] = None, content_type: Optional[StrictStr] = None, label: Optional[StrictStr] = None, updated_after: Optional[datetime] = None, updated_before: Optional[datetime] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ArtifactListOut +async def artifacts_list_with_http_info(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, parent_id: Optional[StrictStr] = None, name: Optional[StrictStr] = None, content_type: Optional[StrictStr] = None, label: Optional[StrictStr] = None, updated_after: Optional[datetime] = None, updated_before: Optional[datetime] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[ArtifactListOut] +async def artifacts_list_without_preload_content(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, parent_id: Optional[StrictStr] = None, name: Optional[StrictStr] = None, content_type: Optional[StrictStr] = None, label: Optional[StrictStr] = None, updated_after: Optional[datetime] = None, updated_before: Optional[datetime] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +List Artifacts + +List the drive's artifacts, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted artifacts. ``parent_id`` / ``name`` / ``content_type`` / ``label`` are exact-match filters; ``updated_after`` / ``updated_before`` are inclusive bounds. Unknown query parameters are rejected. + +:param drive_id: (required) +:type drive_id: str +:param lifecycle: +:type lifecycle: str +:param limit: +:type limit: int +:param cursor: +:type cursor: str +:param parent_id: +:type parent_id: str +:param name: +:type name: str +:param content_type: +:type content_type: str +:param label: +:type label: str +:param updated_after: +:type updated_after: datetime +:param updated_before: +:type updated_before: datetime +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `lifecycle` | `query` | no | `string` | — | +| `limit` | `query` | no | `integer` or `null` | — | +| `cursor` | `query` | no | `string` or `null` | — | +| `parent_id` | `query` | no | `string` or `null` | — | +| `name` | `query` | no | `string` or `null` | — | +| `content_type` | `query` | no | `string` or `null` | — | +| `label` | `query` | no | `string` or `null` | — | +| `updated_after` | `query` | no | `string(date-time)` or `null` | — | +| `updated_before` | `query` | no | `string(date-time)` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | [`ArtifactListOut`](#model-artifactlistout) | `ArtifactListOut` | `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +#### `artifacts_create` + +`POST /v0/drives/{drive_id}/artifacts` — Create Artifact + +Authentication: **bearer token**. + +Create one artifact with inline content — multipart only. Multipart only (415 for a JSON body). Parts: parent_id, name, metadata, content (bytes), content_type, sha256. parent_id, name, and content are required. + +Generated API class: `ArtifactsApi` + +Synchronous callables: + +```python +def artifacts_create(drive_id: StrictStr, idempotency_key: Optional[StrictStr], content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description='The artifact bytes.')], name: Annotated[StrictStr, Field(description='Artifact name.')], parent_id: Annotated[StrictStr, Field(description='Destination folder id (fld_*).')], authorization: Optional[StrictStr] = None, content_type: Annotated[Optional[StrictStr], Field(description='Declared media type.')] = None, metadata: Annotated[Optional[Dict[str, Any]], Field(description='Free-form JSON metadata.')] = None, sha256: Annotated[Optional[StrictStr], Field(description='Optional content sha256 for verification.')] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ArtifactOut +def artifacts_create_with_http_info(drive_id: StrictStr, idempotency_key: Optional[StrictStr], content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description='The artifact bytes.')], name: Annotated[StrictStr, Field(description='Artifact name.')], parent_id: Annotated[StrictStr, Field(description='Destination folder id (fld_*).')], authorization: Optional[StrictStr] = None, content_type: Annotated[Optional[StrictStr], Field(description='Declared media type.')] = None, metadata: Annotated[Optional[Dict[str, Any]], Field(description='Free-form JSON metadata.')] = None, sha256: Annotated[Optional[StrictStr], Field(description='Optional content sha256 for verification.')] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[ArtifactOut] +def artifacts_create_without_preload_content(drive_id: StrictStr, idempotency_key: Optional[StrictStr], content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description='The artifact bytes.')], name: Annotated[StrictStr, Field(description='Artifact name.')], parent_id: Annotated[StrictStr, Field(description='Destination folder id (fld_*).')], authorization: Optional[StrictStr] = None, content_type: Annotated[Optional[StrictStr], Field(description='Declared media type.')] = None, metadata: Annotated[Optional[Dict[str, Any]], Field(description='Free-form JSON metadata.')] = None, sha256: Annotated[Optional[StrictStr], Field(description='Optional content sha256 for verification.')] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def artifacts_create(drive_id: StrictStr, idempotency_key: Optional[StrictStr], content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description='The artifact bytes.')], name: Annotated[StrictStr, Field(description='Artifact name.')], parent_id: Annotated[StrictStr, Field(description='Destination folder id (fld_*).')], authorization: Optional[StrictStr] = None, content_type: Annotated[Optional[StrictStr], Field(description='Declared media type.')] = None, metadata: Annotated[Optional[Dict[str, Any]], Field(description='Free-form JSON metadata.')] = None, sha256: Annotated[Optional[StrictStr], Field(description='Optional content sha256 for verification.')] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ArtifactOut +async def artifacts_create_with_http_info(drive_id: StrictStr, idempotency_key: Optional[StrictStr], content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description='The artifact bytes.')], name: Annotated[StrictStr, Field(description='Artifact name.')], parent_id: Annotated[StrictStr, Field(description='Destination folder id (fld_*).')], authorization: Optional[StrictStr] = None, content_type: Annotated[Optional[StrictStr], Field(description='Declared media type.')] = None, metadata: Annotated[Optional[Dict[str, Any]], Field(description='Free-form JSON metadata.')] = None, sha256: Annotated[Optional[StrictStr], Field(description='Optional content sha256 for verification.')] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[ArtifactOut] +async def artifacts_create_without_preload_content(drive_id: StrictStr, idempotency_key: Optional[StrictStr], content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description='The artifact bytes.')], name: Annotated[StrictStr, Field(description='Artifact name.')], parent_id: Annotated[StrictStr, Field(description='Destination folder id (fld_*).')], authorization: Optional[StrictStr] = None, content_type: Annotated[Optional[StrictStr], Field(description='Declared media type.')] = None, metadata: Annotated[Optional[Dict[str, Any]], Field(description='Free-form JSON metadata.')] = None, sha256: Annotated[Optional[StrictStr], Field(description='Optional content sha256 for verification.')] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Create Artifact + +Create one artifact with inline content — multipart only. Multipart only (415 for a JSON body). Parts: parent_id, name, metadata, content (bytes), content_type, sha256. parent_id, name, and content are required. + +:param drive_id: (required) +:type drive_id: str +:param idempotency_key: (required) +:type idempotency_key: str +:param content: The artifact bytes. (required) +:type content: bytes +:param name: Artifact name. (required) +:type name: str +:param parent_id: Destination folder id (fld_*). (required) +:type parent_id: str +:param authorization: +:type authorization: str +:param content_type: Declared media type. +:type content_type: str +:param metadata: Free-form JSON metadata. +:type metadata: object +:param sha256: Optional content sha256 for verification. +:type sha256: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `Idempotency-Key` | `header` | yes | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Request body (required): + +| Content type | Schema | +|---|---| +| `multipart/form-data` | [`object#f872091b96e1`](#inline-schema-object-f872091b96e1) | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `201` | `application/json` | [`ArtifactOut`](#model-artifactout) | `ArtifactOut` | `ETag`, `Location`, `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `409` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `412` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `ETag`, `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `428` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +#### `artifacts_delete` + +`DELETE /v0/drives/{drive_id}/artifacts/{artifact_id}` — Delete Artifact + +Authentication: **bearer token**. + +Soft-delete one artifact (its versions stay). + +Generated API class: `ArtifactsApi` + +Synchronous callables: + +```python +def artifacts_delete(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ArtifactOut +def artifacts_delete_with_http_info(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[ArtifactOut] +def artifacts_delete_without_preload_content(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def artifacts_delete(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ArtifactOut +async def artifacts_delete_with_http_info(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[ArtifactOut] +async def artifacts_delete_without_preload_content(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Delete Artifact + +Soft-delete one artifact (its versions stay). + +:param drive_id: (required) +:type drive_id: str +:param artifact_id: (required) +:type artifact_id: str +:param idempotency_key: (required) +:type idempotency_key: str +:param if_match: (required) +:type if_match: str +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `artifact_id` | `path` | yes | `string` | — | +| `Idempotency-Key` | `header` | yes | `string` or `null` | — | +| `If-Match` | `header` | yes | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | [`ArtifactOut`](#model-artifactout) | `ArtifactOut` | `ETag`, `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `409` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `412` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `ETag`, `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `428` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +#### `artifacts_read` + +`GET /v0/drives/{drive_id}/artifacts/{artifact_id}` — Read Artifact + +Authentication: **bearer token**. + +Read one active artifact. ``If-None-Match`` short-circuits to 304. + +Generated API class: `ArtifactsApi` + +Synchronous callables: + +```python +def artifacts_read(drive_id: StrictStr, artifact_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ArtifactOut +def artifacts_read_with_http_info(drive_id: StrictStr, artifact_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[ArtifactOut] +def artifacts_read_without_preload_content(drive_id: StrictStr, artifact_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def artifacts_read(drive_id: StrictStr, artifact_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ArtifactOut +async def artifacts_read_with_http_info(drive_id: StrictStr, artifact_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[ArtifactOut] +async def artifacts_read_without_preload_content(drive_id: StrictStr, artifact_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Read Artifact + +Read one active artifact. ``If-None-Match`` short-circuits to 304. + +:param drive_id: (required) +:type drive_id: str +:param artifact_id: (required) +:type artifact_id: str +:param if_none_match: +:type if_none_match: str +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `artifact_id` | `path` | yes | `string` | — | +| `If-None-Match` | `header` | no | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | [`ArtifactOut`](#model-artifactout) | `ArtifactOut` | `ETag`, `X-Request-Id` | +| `304` | — | — | — | `ETag`, `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +#### `artifacts_update` + +`PATCH /v0/drives/{drive_id}/artifacts/{artifact_id}` — Update Artifact + +Authentication: **bearer token**. + +Rename / move / set metadata or labels. At least one field required. + +Generated API class: `ArtifactsApi` + +Synchronous callables: + +```python +def artifacts_update(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], artifact_update_in: ArtifactUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ArtifactOut +def artifacts_update_with_http_info(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], artifact_update_in: ArtifactUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[ArtifactOut] +def artifacts_update_without_preload_content(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], artifact_update_in: ArtifactUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def artifacts_update(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], artifact_update_in: ArtifactUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ArtifactOut +async def artifacts_update_with_http_info(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], artifact_update_in: ArtifactUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[ArtifactOut] +async def artifacts_update_without_preload_content(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], artifact_update_in: ArtifactUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Update Artifact + +Rename / move / set metadata or labels. At least one field required. + +:param drive_id: (required) +:type drive_id: str +:param artifact_id: (required) +:type artifact_id: str +:param idempotency_key: (required) +:type idempotency_key: str +:param if_match: (required) +:type if_match: str +:param artifact_update_in: (required) +:type artifact_update_in: ArtifactUpdateIn +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `artifact_id` | `path` | yes | `string` | — | +| `Idempotency-Key` | `header` | yes | `string` or `null` | — | +| `If-Match` | `header` | yes | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Request body (required): + +| Content type | Schema | +|---|---| +| `application/json` | [`ArtifactUpdateIn`](#model-artifactupdatein) | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | [`ArtifactOut`](#model-artifactout) | `ArtifactOut` | `ETag`, `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `409` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `412` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `ETag`, `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `428` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +#### `artifacts_content` + +`GET /v0/drives/{drive_id}/artifacts/{artifact_id}/content` — Read Artifact Content + +Authentication: **bearer token**. + +Download the head version's bytes — stream or 307 signed URL. + +Generated API class: `ArtifactsApi` + +Synchronous callables: + +```python +def artifacts_content(drive_id: StrictStr, artifact_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> bytes +def artifacts_content_with_http_info(drive_id: StrictStr, artifact_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[bytes] +def artifacts_content_without_preload_content(drive_id: StrictStr, artifact_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def artifacts_content(drive_id: StrictStr, artifact_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> bytes +async def artifacts_content_with_http_info(drive_id: StrictStr, artifact_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[bytes] +async def artifacts_content_without_preload_content(drive_id: StrictStr, artifact_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Read Artifact Content + +Download the head version's bytes — stream or 307 signed URL. + +:param drive_id: (required) +:type drive_id: str +:param artifact_id: (required) +:type artifact_id: str +:param if_none_match: +:type if_none_match: str +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `artifact_id` | `path` | yes | `string` | — | +| `If-None-Match` | `header` | no | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/octet-stream` | `string(binary)` | `bytes` | `X-Request-Id` | +| `304` | — | — | — | `ETag`, `X-Request-Id` | +| `307` | — | — | — | `Location`, `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +#### `artifacts_copy` + +`POST /v0/drives/{drive_id}/artifacts/{artifact_id}/copy` — Copy Artifact + +Authentication: **bearer token**. + +Copy one artifact within the same drive. Cross-drive copy is out of v0 scope and rejected (400 INVALID_ARGUMENT). ``destination_drive_id`` must equal the source drive when present. Materializes the artifact + its selected version synchronously → 201. ``If-Match`` is optional; when present it is validated against the source revision (412 stale). + +Generated API class: `ArtifactsApi` + +Synchronous callables: + +```python +def artifacts_copy(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], artifact_copy_in: ArtifactCopyIn, if_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ArtifactOut +def artifacts_copy_with_http_info(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], artifact_copy_in: ArtifactCopyIn, if_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[ArtifactOut] +def artifacts_copy_without_preload_content(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], artifact_copy_in: ArtifactCopyIn, if_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def artifacts_copy(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], artifact_copy_in: ArtifactCopyIn, if_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ArtifactOut +async def artifacts_copy_with_http_info(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], artifact_copy_in: ArtifactCopyIn, if_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[ArtifactOut] +async def artifacts_copy_without_preload_content(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], artifact_copy_in: ArtifactCopyIn, if_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Copy Artifact + +Copy one artifact within the same drive. Cross-drive copy is out of v0 scope and rejected (400 INVALID_ARGUMENT). ``destination_drive_id`` must equal the source drive when present. Materializes the artifact + its selected version synchronously → 201. ``If-Match`` is optional; when present it is validated against the source revision (412 stale). + +:param drive_id: (required) +:type drive_id: str +:param artifact_id: (required) +:type artifact_id: str +:param idempotency_key: (required) +:type idempotency_key: str +:param artifact_copy_in: (required) +:type artifact_copy_in: ArtifactCopyIn +:param if_match: +:type if_match: str +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `artifact_id` | `path` | yes | `string` | — | +| `Idempotency-Key` | `header` | yes | `string` or `null` | — | +| `If-Match` | `header` | no | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Request body (required): + +| Content type | Schema | +|---|---| +| `application/json` | [`ArtifactCopyIn`](#model-artifactcopyin) | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `201` | `application/json` | [`ArtifactOut`](#model-artifactout) | `ArtifactOut` | `ETag`, `Location`, `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `409` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `412` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `ETag`, `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `428` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +#### `artifacts_restore` + +`POST /v0/drives/{drive_id}/artifacts/{artifact_id}/restore` — Restore Artifact + +Authentication: **bearer token**. + +Restore a soft-deleted artifact atomically. + +Generated API class: `ArtifactsApi` + +Synchronous callables: + +```python +def artifacts_restore(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ArtifactOut +def artifacts_restore_with_http_info(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[ArtifactOut] +def artifacts_restore_without_preload_content(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def artifacts_restore(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ArtifactOut +async def artifacts_restore_with_http_info(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[ArtifactOut] +async def artifacts_restore_without_preload_content(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Restore Artifact + +Restore a soft-deleted artifact atomically. + +:param drive_id: (required) +:type drive_id: str +:param artifact_id: (required) +:type artifact_id: str +:param idempotency_key: (required) +:type idempotency_key: str +:param if_match: (required) +:type if_match: str +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `artifact_id` | `path` | yes | `string` | — | +| `Idempotency-Key` | `header` | yes | `string` or `null` | — | +| `If-Match` | `header` | yes | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | [`ArtifactOut`](#model-artifactout) | `ArtifactOut` | `ETag`, `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `409` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `412` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `ETag`, `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `428` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +### changes + +#### `changes_list` + +`GET /v0/drives/{drive_id}/changes` — List Changes + +Authentication: **bearer token**. + +Pull one page of changes. Exactly one of ``start`` or ``cursor``. + +Generated API class: `ChangesApi` + +Synchronous callables: + +```python +def changes_list(drive_id: StrictStr, limit: Optional[StrictInt] = None, start: Optional[StrictStr] = None, cursor: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ChangePageOut +def changes_list_with_http_info(drive_id: StrictStr, limit: Optional[StrictInt] = None, start: Optional[StrictStr] = None, cursor: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[ChangePageOut] +def changes_list_without_preload_content(drive_id: StrictStr, limit: Optional[StrictInt] = None, start: Optional[StrictStr] = None, cursor: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def changes_list(drive_id: StrictStr, limit: Optional[StrictInt] = None, start: Optional[StrictStr] = None, cursor: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ChangePageOut +async def changes_list_with_http_info(drive_id: StrictStr, limit: Optional[StrictInt] = None, start: Optional[StrictStr] = None, cursor: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[ChangePageOut] +async def changes_list_without_preload_content(drive_id: StrictStr, limit: Optional[StrictInt] = None, start: Optional[StrictStr] = None, cursor: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +List Changes + +Pull one page of changes. Exactly one of ``start`` or ``cursor``. + +:param drive_id: (required) +:type drive_id: str +:param limit: +:type limit: int +:param start: +:type start: str +:param cursor: +:type cursor: str +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `limit` | `query` | no | `integer` or `null` | — | +| `start` | `query` | no | `enum[now, beginning]` or `null` | — | +| `cursor` | `query` | no | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | [`ChangePageOut`](#model-changepageout) | `ChangePageOut` | `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesList400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `410` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesList400Response` | `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +### default + +#### `health` + +`GET /health` — Health + +Authentication: **anonymous**. + +Liveness + DB-reachability probe. Used by Cloud Run / k8s healthchecks and any uptime monitor. Returns 200 only if the DB pool can serve a trivial query; 503 otherwise so the orchestrator can pull the instance out of rotation. NOTE: route is `/health`, NOT `/healthz`. Google's edge infrastructure intercepts `/healthz` (legacy kubernetes-reserved path) and returns a generic 404 before traffic reaches Cloud Run — discovered the hard way during the first prod deploy. Don't rename back. + +Generated API class: `DefaultApi` + +Synchronous callables: + +```python +def health(_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> HealthOut +def health_with_http_info(_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[HealthOut] +def health_without_preload_content(_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def health(_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> HealthOut +async def health_with_http_info(_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[HealthOut] +async def health_without_preload_content(_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Health + +Liveness + DB-reachability probe. Used by Cloud Run / k8s healthchecks and any uptime monitor. Returns 200 only if the DB pool can serve a trivial query; 503 otherwise so the orchestrator can pull the instance out of rotation. NOTE: route is `/health`, NOT `/healthz`. Google's edge infrastructure intercepts `/healthz` (legacy kubernetes-reserved path) and returns a generic 404 before traffic reaches Cloud Run — discovered the hard way during the first prod deploy. Don't rename back. + +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | [`HealthOut`](#model-healthout) | `HealthOut` | — | +| `503` | `application/json` | [`HealthDegradedResponse`](#model-healthdegradedresponse) | `HealthDegradedResponse` | — | + +### discovery + +#### `oauth_protected_resource` + +`GET /.well-known/oauth-protected-resource` — Protected-resource metadata (RFC 9728) + +Authentication: **anonymous**. + +Names the reset v0 surface as a protected resource and points clients at Hub — the only authorization server whose product tokens this deployment accepts. + +Generated API class: `DiscoveryApi` + +Synchronous callables: + +```python +def oauth_protected_resource(_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> Dict[str, Optional[object]] +def oauth_protected_resource_with_http_info(_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[Dict[str, Optional[object]]] +def oauth_protected_resource_without_preload_content(_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def oauth_protected_resource(_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> Dict[str, Optional[object]] +async def oauth_protected_resource_with_http_info(_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[Dict[str, Optional[object]]] +async def oauth_protected_resource_without_preload_content(_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Protected-resource metadata (RFC 9728) + +Names the reset v0 surface as a protected resource and points clients at Hub — the only authorization server whose product tokens this deployment accepts. + +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | [`object#82ef96cebaf5`](#inline-schema-object-82ef96cebaf5) | `Dict[str, Optional[object]]` | — | + +### drives + +#### `drives_list` + +`GET /v0/drives` — List Drives + +Authentication: **bearer token**. + +List the actor's workspace drives, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted drives so a manager can read the post-delete revision as the If-Match source for a restore. Unknown query parameters are rejected (§6.3). + +Generated API class: `DrivesApi` + +Synchronous callables: + +```python +def drives_list(lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> DriveListOut +def drives_list_with_http_info(lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[DriveListOut] +def drives_list_without_preload_content(lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def drives_list(lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> DriveListOut +async def drives_list_with_http_info(lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[DriveListOut] +async def drives_list_without_preload_content(lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +List Drives + +List the actor's workspace drives, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted drives so a manager can read the post-delete revision as the If-Match source for a restore. Unknown query parameters are rejected (§6.3). + +:param lifecycle: +:type lifecycle: str +:param limit: +:type limit: int +:param cursor: +:type cursor: str +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `lifecycle` | `query` | no | `string` | — | +| `limit` | `query` | no | `integer` or `null` | — | +| `cursor` | `query` | no | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | [`DriveListOut`](#model-drivelistout) | `DriveListOut` | `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesList400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesList400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesList400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesList400Response` | `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesList400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesList400Response` | `Retry-After`, `X-Request-Id` | + +#### `drives_create` + +`POST /v0/drives` — Create Drive + +Authentication: **bearer token**. + +Create a drive with its structural root folder and creator-manager grant(s) in one transaction; idempotent under the ``Idempotency-Key``. + +Generated API class: `DrivesApi` + +Synchronous callables: + +```python +def drives_create(idempotency_key: Optional[StrictStr], drive_create_in: DriveCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> DriveOut +def drives_create_with_http_info(idempotency_key: Optional[StrictStr], drive_create_in: DriveCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[DriveOut] +def drives_create_without_preload_content(idempotency_key: Optional[StrictStr], drive_create_in: DriveCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def drives_create(idempotency_key: Optional[StrictStr], drive_create_in: DriveCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> DriveOut +async def drives_create_with_http_info(idempotency_key: Optional[StrictStr], drive_create_in: DriveCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[DriveOut] +async def drives_create_without_preload_content(idempotency_key: Optional[StrictStr], drive_create_in: DriveCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Create Drive + +Create a drive with its structural root folder and creator-manager grant(s) in one transaction; idempotent under the ``Idempotency-Key``. + +:param idempotency_key: (required) +:type idempotency_key: str +:param drive_create_in: (required) +:type drive_create_in: DriveCreateIn +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `Idempotency-Key` | `header` | yes | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Request body (required): + +| Content type | Schema | +|---|---| +| `application/json` | [`DriveCreateIn`](#model-drivecreatein) | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `201` | `application/json` | [`DriveOut`](#model-driveout) | `DriveOut` | `ETag`, `Location`, `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesList400Response` | `X-Request-Id` | +| `409` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesList400Response` | `X-Request-Id` | +| `412` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesList400Response` | `ETag`, `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `428` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesList400Response` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +#### `drives_delete` + +`DELETE /v0/drives/{drive_id}` — Delete Drive + +Authentication: **bearer token**. + +Soft-delete a drive. Returns 200 with the deleted representation so the client has the post-delete revision/ETag for a restore. + +Generated API class: `DrivesApi` + +Synchronous callables: + +```python +def drives_delete(drive_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> DriveOut +def drives_delete_with_http_info(drive_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[DriveOut] +def drives_delete_without_preload_content(drive_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def drives_delete(drive_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> DriveOut +async def drives_delete_with_http_info(drive_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[DriveOut] +async def drives_delete_without_preload_content(drive_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Delete Drive + +Soft-delete a drive. Returns 200 with the deleted representation so the client has the post-delete revision/ETag for a restore. + +:param drive_id: (required) +:type drive_id: str +:param idempotency_key: (required) +:type idempotency_key: str +:param if_match: (required) +:type if_match: str +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `Idempotency-Key` | `header` | yes | `string` or `null` | — | +| `If-Match` | `header` | yes | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | [`DriveOut`](#model-driveout) | `DriveOut` | `ETag`, `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `409` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesList400Response` | `X-Request-Id` | +| `412` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesList400Response` | `ETag`, `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `428` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +#### `drives_read` + +`GET /v0/drives/{drive_id}` — Read Drive + +Authentication: **bearer token**. + +Read one active drive. ETag = quoted revision; matching ``If-None-Match`` → 304. Deleted and cross-workspace drives are 404. + +Generated API class: `DrivesApi` + +Synchronous callables: + +```python +def drives_read(drive_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> DriveOut +def drives_read_with_http_info(drive_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[DriveOut] +def drives_read_without_preload_content(drive_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def drives_read(drive_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> DriveOut +async def drives_read_with_http_info(drive_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[DriveOut] +async def drives_read_without_preload_content(drive_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Read Drive + +Read one active drive. ETag = quoted revision; matching ``If-None-Match`` → 304. Deleted and cross-workspace drives are 404. + +:param drive_id: (required) +:type drive_id: str +:param if_none_match: +:type if_none_match: str +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `If-None-Match` | `header` | no | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | [`DriveOut`](#model-driveout) | `DriveOut` | `ETag`, `X-Request-Id` | +| `304` | — | — | — | `ETag`, `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +#### `drives_update` + +`PATCH /v0/drives/{drive_id}` — Update Drive + +Authentication: **bearer token**. + +Rename / update a drive's metadata. Requires ``Idempotency-Key`` and ``If-Match`` (428 absent, 412 stale); bumps the revision. + +Generated API class: `DrivesApi` + +Synchronous callables: + +```python +def drives_update(drive_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], drive_update_in: DriveUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> DriveOut +def drives_update_with_http_info(drive_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], drive_update_in: DriveUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[DriveOut] +def drives_update_without_preload_content(drive_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], drive_update_in: DriveUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def drives_update(drive_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], drive_update_in: DriveUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> DriveOut +async def drives_update_with_http_info(drive_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], drive_update_in: DriveUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[DriveOut] +async def drives_update_without_preload_content(drive_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], drive_update_in: DriveUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Update Drive + +Rename / update a drive's metadata. Requires ``Idempotency-Key`` and ``If-Match`` (428 absent, 412 stale); bumps the revision. + +:param drive_id: (required) +:type drive_id: str +:param idempotency_key: (required) +:type idempotency_key: str +:param if_match: (required) +:type if_match: str +:param drive_update_in: (required) +:type drive_update_in: DriveUpdateIn +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `Idempotency-Key` | `header` | yes | `string` or `null` | — | +| `If-Match` | `header` | yes | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Request body (required): + +| Content type | Schema | +|---|---| +| `application/json` | [`DriveUpdateIn`](#model-driveupdatein) | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | [`DriveOut`](#model-driveout) | `DriveOut` | `ETag`, `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `409` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `412` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `ETag`, `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `428` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +#### `drives_restore` + +`POST /v0/drives/{drive_id}/restore` — Restore Drive + +Authentication: **bearer token**. + +Restore a soft-deleted drive. If-Match must carry the post-delete revision; restoring an already-active drive is 409 CONFLICT. + +Generated API class: `DrivesApi` + +Synchronous callables: + +```python +def drives_restore(drive_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> DriveOut +def drives_restore_with_http_info(drive_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[DriveOut] +def drives_restore_without_preload_content(drive_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def drives_restore(drive_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> DriveOut +async def drives_restore_with_http_info(drive_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[DriveOut] +async def drives_restore_without_preload_content(drive_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Restore Drive + +Restore a soft-deleted drive. If-Match must carry the post-delete revision; restoring an already-active drive is 409 CONFLICT. + +:param drive_id: (required) +:type drive_id: str +:param idempotency_key: (required) +:type idempotency_key: str +:param if_match: (required) +:type if_match: str +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `Idempotency-Key` | `header` | yes | `string` or `null` | — | +| `If-Match` | `header` | yes | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | [`DriveOut`](#model-driveout) | `DriveOut` | `ETag`, `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `409` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `412` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `ETag`, `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `428` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +#### `drives_usage` + +`GET /v0/drives/{drive_id}/usage` — Drive Usage + +Authentication: **bearer token**. + +Byte counters for one active drive: storage is the live sum of its versions' sizes; retrieval reads the counter the content-read slice maintains (0 until it lands). + +Generated API class: `DrivesApi` + +Synchronous callables: + +```python +def drives_usage(drive_id: StrictStr, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> DriveUsageOut +def drives_usage_with_http_info(drive_id: StrictStr, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[DriveUsageOut] +def drives_usage_without_preload_content(drive_id: StrictStr, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def drives_usage(drive_id: StrictStr, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> DriveUsageOut +async def drives_usage_with_http_info(drive_id: StrictStr, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[DriveUsageOut] +async def drives_usage_without_preload_content(drive_id: StrictStr, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Drive Usage + +Byte counters for one active drive: storage is the live sum of its versions' sizes; retrieval reads the counter the content-read slice maintains (0 until it lands). + +:param drive_id: (required) +:type drive_id: str +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | [`DriveUsageOut`](#model-driveusageout) | `DriveUsageOut` | `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +### folders + +#### `folders_list` + +`GET /v0/drives/{drive_id}/folders` — List Folders + +Authentication: **bearer token**. + +List the drive's folders, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted folders so the post-delete revision can be read as the If-Match source for a restore. ``parent_id`` / ``name`` are exact-match filters. Unknown query parameters are rejected (§6.3). + +Generated API class: `FoldersApi` + +Synchronous callables: + +```python +def folders_list(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, parent_id: Optional[StrictStr] = None, name: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> FolderListOut +def folders_list_with_http_info(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, parent_id: Optional[StrictStr] = None, name: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[FolderListOut] +def folders_list_without_preload_content(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, parent_id: Optional[StrictStr] = None, name: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def folders_list(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, parent_id: Optional[StrictStr] = None, name: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> FolderListOut +async def folders_list_with_http_info(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, parent_id: Optional[StrictStr] = None, name: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[FolderListOut] +async def folders_list_without_preload_content(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, parent_id: Optional[StrictStr] = None, name: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +List Folders + +List the drive's folders, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted folders so the post-delete revision can be read as the If-Match source for a restore. ``parent_id`` / ``name`` are exact-match filters. Unknown query parameters are rejected (§6.3). + +:param drive_id: (required) +:type drive_id: str +:param lifecycle: +:type lifecycle: str +:param limit: +:type limit: int +:param cursor: +:type cursor: str +:param parent_id: +:type parent_id: str +:param name: +:type name: str +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `lifecycle` | `query` | no | `string` | — | +| `limit` | `query` | no | `integer` or `null` | — | +| `cursor` | `query` | no | `string` or `null` | — | +| `parent_id` | `query` | no | `string` or `null` | — | +| `name` | `query` | no | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | [`FolderListOut`](#model-folderlistout) | `FolderListOut` | `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +#### `folders_create` + +`POST /v0/drives/{drive_id}/folders` — Create Folder + +Authentication: **bearer token**. + +Create one folder under `parent_id`; idempotent under the ``Idempotency-Key``. + +Generated API class: `FoldersApi` + +Synchronous callables: + +```python +def folders_create(drive_id: StrictStr, idempotency_key: Optional[StrictStr], folder_create_in: FolderCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> FolderOut +def folders_create_with_http_info(drive_id: StrictStr, idempotency_key: Optional[StrictStr], folder_create_in: FolderCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[FolderOut] +def folders_create_without_preload_content(drive_id: StrictStr, idempotency_key: Optional[StrictStr], folder_create_in: FolderCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def folders_create(drive_id: StrictStr, idempotency_key: Optional[StrictStr], folder_create_in: FolderCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> FolderOut +async def folders_create_with_http_info(drive_id: StrictStr, idempotency_key: Optional[StrictStr], folder_create_in: FolderCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[FolderOut] +async def folders_create_without_preload_content(drive_id: StrictStr, idempotency_key: Optional[StrictStr], folder_create_in: FolderCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Create Folder + +Create one folder under `parent_id`; idempotent under the ``Idempotency-Key``. + +:param drive_id: (required) +:type drive_id: str +:param idempotency_key: (required) +:type idempotency_key: str +:param folder_create_in: (required) +:type folder_create_in: FolderCreateIn +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `Idempotency-Key` | `header` | yes | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Request body (required): + +| Content type | Schema | +|---|---| +| `application/json` | [`FolderCreateIn`](#model-foldercreatein) | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `201` | `application/json` | [`FolderOut`](#model-folderout) | `FolderOut` | `ETag`, `Location`, `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `409` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `412` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `ETag`, `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `428` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +#### `folders_delete` + +`DELETE /v0/drives/{drive_id}/folders/{folder_id}` — Delete Folder + +Authentication: **bearer token**. + +Soft-delete a folder and its full live subtree (folders + artifacts) in one transaction. A non-empty subtree requires ``recursive=true`` (409 FOLDER_RECURSIVE_REQUIRED otherwise). Returns the deleted root representation plus exact cascade counts and the post-delete revision/ETag for a restore. + +Generated API class: `FoldersApi` + +Synchronous callables: + +```python +def folders_delete(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], recursive: Optional[StrictBool] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> FolderCascadeOut +def folders_delete_with_http_info(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], recursive: Optional[StrictBool] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[FolderCascadeOut] +def folders_delete_without_preload_content(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], recursive: Optional[StrictBool] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def folders_delete(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], recursive: Optional[StrictBool] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> FolderCascadeOut +async def folders_delete_with_http_info(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], recursive: Optional[StrictBool] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[FolderCascadeOut] +async def folders_delete_without_preload_content(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], recursive: Optional[StrictBool] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Delete Folder + +Soft-delete a folder and its full live subtree (folders + artifacts) in one transaction. A non-empty subtree requires ``recursive=true`` (409 FOLDER_RECURSIVE_REQUIRED otherwise). Returns the deleted root representation plus exact cascade counts and the post-delete revision/ETag for a restore. + +:param drive_id: (required) +:type drive_id: str +:param folder_id: (required) +:type folder_id: str +:param idempotency_key: (required) +:type idempotency_key: str +:param if_match: (required) +:type if_match: str +:param recursive: +:type recursive: bool +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `folder_id` | `path` | yes | `string` | — | +| `recursive` | `query` | no | `boolean` | — | +| `Idempotency-Key` | `header` | yes | `string` or `null` | — | +| `If-Match` | `header` | yes | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | [`FolderCascadeOut`](#model-foldercascadeout) | `FolderCascadeOut` | `ETag`, `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `409` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `412` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `ETag`, `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `428` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +#### `folders_read` + +`GET /v0/drives/{drive_id}/folders/{folder_id}` — Read Folder + +Authentication: **bearer token**. + +Read one active folder. ETag = quoted revision; matching ``If-None-Match`` → 304. Deleted and cross-workspace folders are 404. + +Generated API class: `FoldersApi` + +Synchronous callables: + +```python +def folders_read(drive_id: StrictStr, folder_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> FolderOut +def folders_read_with_http_info(drive_id: StrictStr, folder_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[FolderOut] +def folders_read_without_preload_content(drive_id: StrictStr, folder_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def folders_read(drive_id: StrictStr, folder_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> FolderOut +async def folders_read_with_http_info(drive_id: StrictStr, folder_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[FolderOut] +async def folders_read_without_preload_content(drive_id: StrictStr, folder_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Read Folder + +Read one active folder. ETag = quoted revision; matching ``If-None-Match`` → 304. Deleted and cross-workspace folders are 404. + +:param drive_id: (required) +:type drive_id: str +:param folder_id: (required) +:type folder_id: str +:param if_none_match: +:type if_none_match: str +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `folder_id` | `path` | yes | `string` | — | +| `If-None-Match` | `header` | no | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | [`FolderOut`](#model-folderout) | `FolderOut` | `ETag`, `X-Request-Id` | +| `304` | — | — | — | `ETag`, `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +#### `folders_update` + +`PATCH /v0/drives/{drive_id}/folders/{folder_id}` — Update Folder + +Authentication: **bearer token**. + +Rename / move / update a folder's metadata or inheritance. Requires ``Idempotency-Key`` and ``If-Match`` (428 absent, 412 stale); bumps the revision. + +Generated API class: `FoldersApi` + +Synchronous callables: + +```python +def folders_update(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], folder_update_in: FolderUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> FolderOut +def folders_update_with_http_info(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], folder_update_in: FolderUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[FolderOut] +def folders_update_without_preload_content(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], folder_update_in: FolderUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def folders_update(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], folder_update_in: FolderUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> FolderOut +async def folders_update_with_http_info(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], folder_update_in: FolderUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[FolderOut] +async def folders_update_without_preload_content(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], folder_update_in: FolderUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Update Folder + +Rename / move / update a folder's metadata or inheritance. Requires ``Idempotency-Key`` and ``If-Match`` (428 absent, 412 stale); bumps the revision. + +:param drive_id: (required) +:type drive_id: str +:param folder_id: (required) +:type folder_id: str +:param idempotency_key: (required) +:type idempotency_key: str +:param if_match: (required) +:type if_match: str +:param folder_update_in: (required) +:type folder_update_in: FolderUpdateIn +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `folder_id` | `path` | yes | `string` | — | +| `Idempotency-Key` | `header` | yes | `string` or `null` | — | +| `If-Match` | `header` | yes | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Request body (required): + +| Content type | Schema | +|---|---| +| `application/json` | [`FolderUpdateIn`](#model-folderupdatein) | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | [`FolderOut`](#model-folderout) | `FolderOut` | `ETag`, `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `409` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `412` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `ETag`, `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `428` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +#### `folders_copy` + +`POST /v0/drives/{drive_id}/folders/{folder_id}/copy` — Copy Folder + +Authentication: **bearer token**. + +Copy a folder's subtree within the same drive. Cross-drive copy is out of v0 scope and rejected (400 INVALID_ARGUMENT). ``destination_drive_id`` must equal the source drive when present. Materializes the subtree synchronously → 201 + the copied folder. ``If-Match`` is optional; when present it is validated against the source revision (412 stale). + +Generated API class: `FoldersApi` + +Synchronous callables: + +```python +def folders_copy(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], folder_copy_in: FolderCopyIn, if_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> FolderOut +def folders_copy_with_http_info(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], folder_copy_in: FolderCopyIn, if_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[FolderOut] +def folders_copy_without_preload_content(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], folder_copy_in: FolderCopyIn, if_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def folders_copy(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], folder_copy_in: FolderCopyIn, if_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> FolderOut +async def folders_copy_with_http_info(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], folder_copy_in: FolderCopyIn, if_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[FolderOut] +async def folders_copy_without_preload_content(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], folder_copy_in: FolderCopyIn, if_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Copy Folder + +Copy a folder's subtree within the same drive. Cross-drive copy is out of v0 scope and rejected (400 INVALID_ARGUMENT). ``destination_drive_id`` must equal the source drive when present. Materializes the subtree synchronously → 201 + the copied folder. ``If-Match`` is optional; when present it is validated against the source revision (412 stale). + +:param drive_id: (required) +:type drive_id: str +:param folder_id: (required) +:type folder_id: str +:param idempotency_key: (required) +:type idempotency_key: str +:param folder_copy_in: (required) +:type folder_copy_in: FolderCopyIn +:param if_match: +:type if_match: str +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `folder_id` | `path` | yes | `string` | — | +| `Idempotency-Key` | `header` | yes | `string` or `null` | — | +| `If-Match` | `header` | no | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Request body (required): + +| Content type | Schema | +|---|---| +| `application/json` | [`FolderCopyIn`](#model-foldercopyin) | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `201` | `application/json` | [`FolderOut`](#model-folderout) | `FolderOut` | `ETag`, `Location`, `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `409` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `412` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `ETag`, `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `428` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +#### `folders_restore` + +`POST /v0/drives/{drive_id}/folders/{folder_id}/restore` — Restore Folder + +Authentication: **bearer token**. + +Restore a soft-deleted folder and its deleted subtree atomically. If-Match must carry the post-delete revision; restoring an already-active folder is 409 CONFLICT. + +Generated API class: `FoldersApi` + +Synchronous callables: + +```python +def folders_restore(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> FolderCascadeOut +def folders_restore_with_http_info(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[FolderCascadeOut] +def folders_restore_without_preload_content(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def folders_restore(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> FolderCascadeOut +async def folders_restore_with_http_info(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[FolderCascadeOut] +async def folders_restore_without_preload_content(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Restore Folder + +Restore a soft-deleted folder and its deleted subtree atomically. If-Match must carry the post-delete revision; restoring an already-active folder is 409 CONFLICT. + +:param drive_id: (required) +:type drive_id: str +:param folder_id: (required) +:type folder_id: str +:param idempotency_key: (required) +:type idempotency_key: str +:param if_match: (required) +:type if_match: str +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `folder_id` | `path` | yes | `string` | — | +| `Idempotency-Key` | `header` | yes | `string` or `null` | — | +| `If-Match` | `header` | yes | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | [`FolderCascadeOut`](#model-foldercascadeout) | `FolderCascadeOut` | `ETag`, `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `409` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `412` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `ETag`, `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `428` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +### grants + +#### `grants_list` + +`GET /v0/drives/{drive_id}/grants` — List Grants + +Authentication: **bearer token**. + +List explicit grants in the drive, keyset paginated. **What you see depends on your role (contract change).** A caller holding ``manager`` on the drive lists EVERY grant in it. Any other caller lists only the grants that name them — their own agent/user rows, ``workspace`` grants covering them, and ``public`` grants (which already expose the resource to them anyway). Previously any drive ``viewer`` could page out every principal id, role and expiry in the drive; that was an access-graph disclosure, not a feature. The operation is refused (404) only for a caller holding no live grant anywhere in the drive — never for lack of ``manager``, because seeing your own access is not a privilege. That admits folder-scoped principals, who previously 404'd here despite having access to show. A folder ``manager`` still sees only their own rows, not the roster of the subtree they administer; scoping the listing by per-resource administration authority is a follow-up this change does not claim. ``resource_id`` filters to one resource's grants and REQUIRES ``resource_type`` alongside it — a bare resource id is ambiguous across the three resource kinds, and guessing the kind from the id prefix would make the filter's meaning depend on an id format the contract does not promise to keep. ``resource_type`` on its own remains a valid (and pre-existing) filter. + +Generated API class: `GrantsApi` + +Synchronous callables: + +```python +def grants_list(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, resource_type: Optional[StrictStr] = None, resource_id: Optional[StrictStr] = None, principal_type: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> GrantListOut +def grants_list_with_http_info(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, resource_type: Optional[StrictStr] = None, resource_id: Optional[StrictStr] = None, principal_type: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[GrantListOut] +def grants_list_without_preload_content(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, resource_type: Optional[StrictStr] = None, resource_id: Optional[StrictStr] = None, principal_type: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def grants_list(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, resource_type: Optional[StrictStr] = None, resource_id: Optional[StrictStr] = None, principal_type: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> GrantListOut +async def grants_list_with_http_info(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, resource_type: Optional[StrictStr] = None, resource_id: Optional[StrictStr] = None, principal_type: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[GrantListOut] +async def grants_list_without_preload_content(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, resource_type: Optional[StrictStr] = None, resource_id: Optional[StrictStr] = None, principal_type: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +List Grants + +List explicit grants in the drive, keyset paginated. **What you see depends on your role (contract change).** A caller holding ``manager`` on the drive lists EVERY grant in it. Any other caller lists only the grants that name them — their own agent/user rows, ``workspace`` grants covering them, and ``public`` grants (which already expose the resource to them anyway). Previously any drive ``viewer`` could page out every principal id, role and expiry in the drive; that was an access-graph disclosure, not a feature. The operation is refused (404) only for a caller holding no live grant anywhere in the drive — never for lack of ``manager``, because seeing your own access is not a privilege. That admits folder-scoped principals, who previously 404'd here despite having access to show. A folder ``manager`` still sees only their own rows, not the roster of the subtree they administer; scoping the listing by per-resource administration authority is a follow-up this change does not claim. ``resource_id`` filters to one resource's grants and REQUIRES ``resource_type`` alongside it — a bare resource id is ambiguous across the three resource kinds, and guessing the kind from the id prefix would make the filter's meaning depend on an id format the contract does not promise to keep. ``resource_type`` on its own remains a valid (and pre-existing) filter. + +:param drive_id: (required) +:type drive_id: str +:param lifecycle: +:type lifecycle: str +:param limit: +:type limit: int +:param cursor: +:type cursor: str +:param resource_type: +:type resource_type: str +:param resource_id: +:type resource_id: str +:param principal_type: +:type principal_type: str +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `lifecycle` | `query` | no | `string` | — | +| `limit` | `query` | no | `integer` or `null` | — | +| `cursor` | `query` | no | `string` or `null` | — | +| `resource_type` | `query` | no | `string` or `null` | — | +| `resource_id` | `query` | no | `string` or `null` | — | +| `principal_type` | `query` | no | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | [`GrantListOut`](#model-grantlistout) | `GrantListOut` | `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +#### `grants_create` + +`POST /v0/drives/{drive_id}/grants` — Create Grant + +Authentication: **bearer token**. + +Grant one principal a role on a drive, folder, or artifact. + +Generated API class: `GrantsApi` + +Synchronous callables: + +```python +def grants_create(drive_id: StrictStr, idempotency_key: Optional[StrictStr], grant_create_in: GrantCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> GrantOut +def grants_create_with_http_info(drive_id: StrictStr, idempotency_key: Optional[StrictStr], grant_create_in: GrantCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[GrantOut] +def grants_create_without_preload_content(drive_id: StrictStr, idempotency_key: Optional[StrictStr], grant_create_in: GrantCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def grants_create(drive_id: StrictStr, idempotency_key: Optional[StrictStr], grant_create_in: GrantCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> GrantOut +async def grants_create_with_http_info(drive_id: StrictStr, idempotency_key: Optional[StrictStr], grant_create_in: GrantCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[GrantOut] +async def grants_create_without_preload_content(drive_id: StrictStr, idempotency_key: Optional[StrictStr], grant_create_in: GrantCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Create Grant + +Grant one principal a role on a drive, folder, or artifact. + +:param drive_id: (required) +:type drive_id: str +:param idempotency_key: (required) +:type idempotency_key: str +:param grant_create_in: (required) +:type grant_create_in: GrantCreateIn +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `Idempotency-Key` | `header` | yes | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Request body (required): + +| Content type | Schema | +|---|---| +| `application/json` | [`GrantCreateIn`](#model-grantcreatein) | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `201` | `application/json` | [`GrantOut`](#model-grantout) | `GrantOut` | `ETag`, `Location`, `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `409` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `412` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `ETag`, `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `428` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +#### `grants_revoke` + +`DELETE /v0/drives/{drive_id}/grants/{grant_id}` — Revoke Grant + +Authentication: **bearer token**. + +Revoke a grant (soft, sets revoked_at) under If-Match. + +Generated API class: `GrantsApi` + +Synchronous callables: + +```python +def grants_revoke(drive_id: StrictStr, grant_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> GrantOut +def grants_revoke_with_http_info(drive_id: StrictStr, grant_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[GrantOut] +def grants_revoke_without_preload_content(drive_id: StrictStr, grant_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def grants_revoke(drive_id: StrictStr, grant_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> GrantOut +async def grants_revoke_with_http_info(drive_id: StrictStr, grant_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[GrantOut] +async def grants_revoke_without_preload_content(drive_id: StrictStr, grant_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Revoke Grant + +Revoke a grant (soft, sets revoked_at) under If-Match. + +:param drive_id: (required) +:type drive_id: str +:param grant_id: (required) +:type grant_id: str +:param idempotency_key: (required) +:type idempotency_key: str +:param if_match: (required) +:type if_match: str +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `grant_id` | `path` | yes | `string` | — | +| `Idempotency-Key` | `header` | yes | `string` or `null` | — | +| `If-Match` | `header` | yes | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | [`GrantOut`](#model-grantout) | `GrantOut` | `ETag`, `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `409` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `412` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `ETag`, `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `428` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +#### `grants_read` + +`GET /v0/drives/{drive_id}/grants/{grant_id}` — Read Grant + +Authentication: **bearer token**. + +Read one grant in the drive. + +Generated API class: `GrantsApi` + +Synchronous callables: + +```python +def grants_read(drive_id: StrictStr, grant_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> GrantOut +def grants_read_with_http_info(drive_id: StrictStr, grant_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[GrantOut] +def grants_read_without_preload_content(drive_id: StrictStr, grant_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def grants_read(drive_id: StrictStr, grant_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> GrantOut +async def grants_read_with_http_info(drive_id: StrictStr, grant_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[GrantOut] +async def grants_read_without_preload_content(drive_id: StrictStr, grant_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Read Grant + +Read one grant in the drive. + +:param drive_id: (required) +:type drive_id: str +:param grant_id: (required) +:type grant_id: str +:param if_none_match: +:type if_none_match: str +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `grant_id` | `path` | yes | `string` | — | +| `If-None-Match` | `header` | no | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | [`GrantOut`](#model-grantout) | `GrantOut` | `ETag`, `X-Request-Id` | +| `304` | — | — | — | `ETag`, `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +#### `grants_update` + +`PATCH /v0/drives/{drive_id}/grants/{grant_id}` — Update Grant + +Authentication: **bearer token**. + +Change a grant's role or expiry under If-Match. + +Generated API class: `GrantsApi` + +Synchronous callables: + +```python +def grants_update(drive_id: StrictStr, grant_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], grant_update_in: GrantUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> GrantOut +def grants_update_with_http_info(drive_id: StrictStr, grant_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], grant_update_in: GrantUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[GrantOut] +def grants_update_without_preload_content(drive_id: StrictStr, grant_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], grant_update_in: GrantUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def grants_update(drive_id: StrictStr, grant_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], grant_update_in: GrantUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> GrantOut +async def grants_update_with_http_info(drive_id: StrictStr, grant_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], grant_update_in: GrantUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[GrantOut] +async def grants_update_without_preload_content(drive_id: StrictStr, grant_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], grant_update_in: GrantUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Update Grant + +Change a grant's role or expiry under If-Match. + +:param drive_id: (required) +:type drive_id: str +:param grant_id: (required) +:type grant_id: str +:param idempotency_key: (required) +:type idempotency_key: str +:param if_match: (required) +:type if_match: str +:param grant_update_in: (required) +:type grant_update_in: GrantUpdateIn +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `grant_id` | `path` | yes | `string` | — | +| `Idempotency-Key` | `header` | yes | `string` or `null` | — | +| `If-Match` | `header` | yes | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Request body (required): + +| Content type | Schema | +|---|---| +| `application/json` | [`GrantUpdateIn`](#model-grantupdatein) | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | [`GrantOut`](#model-grantout) | `GrantOut` | `ETag`, `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `409` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `412` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `ETag`, `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `428` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +### search + +#### `drive_search` + +`GET /v0/drives/{drive_id}/search` — Drive Search + +Authentication: **bearer token**. + +Search the drive's live artifacts. ``q`` is required and must be non-empty. ``mode`` selects the retrieval engine: ``lexical``, ``hybrid``, or ``semantic``. This deployment enables ``lexical`` only; requesting a disabled mode fails ``400 SEARCH_MODE_UNAVAILABLE``. Each hit's ``snippet`` is HTML-safe by contract: artifact content is entity-escaped and only the server's own ````/```` highlight pair survives, so a client may render it as HTML. + +Generated API class: `SearchApi` + +Synchronous callables: + +```python +def drive_search(drive_id: StrictStr, q: Annotated[str, Field(min_length=1, strict=True)], mode: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, parent_id: Optional[StrictStr] = None, content_type: Optional[StrictStr] = None, label: Optional[StrictStr] = None, updated_after: Optional[datetime] = None, updated_before: Optional[datetime] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> SearchPageOut +def drive_search_with_http_info(drive_id: StrictStr, q: Annotated[str, Field(min_length=1, strict=True)], mode: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, parent_id: Optional[StrictStr] = None, content_type: Optional[StrictStr] = None, label: Optional[StrictStr] = None, updated_after: Optional[datetime] = None, updated_before: Optional[datetime] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[SearchPageOut] +def drive_search_without_preload_content(drive_id: StrictStr, q: Annotated[str, Field(min_length=1, strict=True)], mode: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, parent_id: Optional[StrictStr] = None, content_type: Optional[StrictStr] = None, label: Optional[StrictStr] = None, updated_after: Optional[datetime] = None, updated_before: Optional[datetime] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def drive_search(drive_id: StrictStr, q: Annotated[str, Field(min_length=1, strict=True)], mode: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, parent_id: Optional[StrictStr] = None, content_type: Optional[StrictStr] = None, label: Optional[StrictStr] = None, updated_after: Optional[datetime] = None, updated_before: Optional[datetime] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> SearchPageOut +async def drive_search_with_http_info(drive_id: StrictStr, q: Annotated[str, Field(min_length=1, strict=True)], mode: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, parent_id: Optional[StrictStr] = None, content_type: Optional[StrictStr] = None, label: Optional[StrictStr] = None, updated_after: Optional[datetime] = None, updated_before: Optional[datetime] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[SearchPageOut] +async def drive_search_without_preload_content(drive_id: StrictStr, q: Annotated[str, Field(min_length=1, strict=True)], mode: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, parent_id: Optional[StrictStr] = None, content_type: Optional[StrictStr] = None, label: Optional[StrictStr] = None, updated_after: Optional[datetime] = None, updated_before: Optional[datetime] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Drive Search + +Search the drive's live artifacts. ``q`` is required and must be non-empty. ``mode`` selects the retrieval engine: ``lexical``, ``hybrid``, or ``semantic``. This deployment enables ``lexical`` only; requesting a disabled mode fails ``400 SEARCH_MODE_UNAVAILABLE``. Each hit's ``snippet`` is HTML-safe by contract: artifact content is entity-escaped and only the server's own ````/```` highlight pair survives, so a client may render it as HTML. + +:param drive_id: (required) +:type drive_id: str +:param q: (required) +:type q: str +:param mode: +:type mode: str +:param limit: +:type limit: int +:param cursor: +:type cursor: str +:param parent_id: +:type parent_id: str +:param content_type: +:type content_type: str +:param label: +:type label: str +:param updated_after: +:type updated_after: datetime +:param updated_before: +:type updated_before: datetime +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `q` | `query` | yes | `string` | — | +| `mode` | `query` | no | `enum[lexical, hybrid, semantic]` | — | +| `limit` | `query` | no | `integer` or `null` | — | +| `cursor` | `query` | no | `string` or `null` | — | +| `parent_id` | `query` | no | `string` or `null` | — | +| `content_type` | `query` | no | `string` or `null` | — | +| `label` | `query` | no | `string` or `null` | — | +| `updated_after` | `query` | no | `string(date-time)` or `null` | — | +| `updated_before` | `query` | no | `string(date-time)` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | [`SearchPageOut`](#model-searchpageout) | `SearchPageOut` | `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesList400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +### shares + +#### `shares_list` + +`GET /v0/drives/{drive_id}/shares` — List Shares + +Authentication: **bearer token**. + +List the drive's shares (no secrets), keyset paginated. ``resource_id`` narrows the page to one resource's links and REQUIRES ``resource_type`` alongside it — a bare resource id is ambiguous across ``artifact`` / ``artifact_version`` / ``folder``, and inferring the kind from the id prefix would tie the filter's meaning to an id format the contract does not promise to keep. ``resource_type`` alone is a valid filter. Listing shares already requires drive ``manager``, so these filters only narrow a page the caller could already read in full. + +Generated API class: `SharesApi` + +Synchronous callables: + +```python +def shares_list(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, resource_type: Optional[StrictStr] = None, resource_id: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ShareListOut +def shares_list_with_http_info(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, resource_type: Optional[StrictStr] = None, resource_id: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[ShareListOut] +def shares_list_without_preload_content(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, resource_type: Optional[StrictStr] = None, resource_id: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def shares_list(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, resource_type: Optional[StrictStr] = None, resource_id: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ShareListOut +async def shares_list_with_http_info(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, resource_type: Optional[StrictStr] = None, resource_id: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[ShareListOut] +async def shares_list_without_preload_content(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, resource_type: Optional[StrictStr] = None, resource_id: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +List Shares + +List the drive's shares (no secrets), keyset paginated. ``resource_id`` narrows the page to one resource's links and REQUIRES ``resource_type`` alongside it — a bare resource id is ambiguous across ``artifact`` / ``artifact_version`` / ``folder``, and inferring the kind from the id prefix would tie the filter's meaning to an id format the contract does not promise to keep. ``resource_type`` alone is a valid filter. Listing shares already requires drive ``manager``, so these filters only narrow a page the caller could already read in full. + +:param drive_id: (required) +:type drive_id: str +:param lifecycle: +:type lifecycle: str +:param limit: +:type limit: int +:param cursor: +:type cursor: str +:param resource_type: +:type resource_type: str +:param resource_id: +:type resource_id: str +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `lifecycle` | `query` | no | `string` | — | +| `limit` | `query` | no | `integer` or `null` | — | +| `cursor` | `query` | no | `string` or `null` | — | +| `resource_type` | `query` | no | `string` or `null` | — | +| `resource_id` | `query` | no | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | [`ShareListOut`](#model-sharelistout) | `ShareListOut` | `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +#### `shares_create` + +`POST /v0/drives/{drive_id}/shares` — Create Share + +Authentication: **bearer token**. + +Mint a read-only bearer link. The response carries the plaintext secret — the only response that does. + +Generated API class: `SharesApi` + +Synchronous callables: + +```python +def shares_create(drive_id: StrictStr, idempotency_key: Optional[StrictStr], share_create_in: ShareCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ShareCreateOut +def shares_create_with_http_info(drive_id: StrictStr, idempotency_key: Optional[StrictStr], share_create_in: ShareCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[ShareCreateOut] +def shares_create_without_preload_content(drive_id: StrictStr, idempotency_key: Optional[StrictStr], share_create_in: ShareCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def shares_create(drive_id: StrictStr, idempotency_key: Optional[StrictStr], share_create_in: ShareCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ShareCreateOut +async def shares_create_with_http_info(drive_id: StrictStr, idempotency_key: Optional[StrictStr], share_create_in: ShareCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[ShareCreateOut] +async def shares_create_without_preload_content(drive_id: StrictStr, idempotency_key: Optional[StrictStr], share_create_in: ShareCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Create Share + +Mint a read-only bearer link. The response carries the plaintext secret — the only response that does. + +:param drive_id: (required) +:type drive_id: str +:param idempotency_key: (required) +:type idempotency_key: str +:param share_create_in: (required) +:type share_create_in: ShareCreateIn +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `Idempotency-Key` | `header` | yes | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Request body (required): + +| Content type | Schema | +|---|---| +| `application/json` | [`ShareCreateIn`](#model-sharecreatein) | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `201` | `application/json` | [`ShareCreateOut`](#model-sharecreateout) | `ShareCreateOut` | `ETag`, `Location`, `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `409` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `412` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `ETag`, `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `428` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +#### `shares_revoke` + +`DELETE /v0/drives/{drive_id}/shares/{share_id}` — Revoke Share + +Authentication: **bearer token**. + +Revoke a share (soft, sets revoked_at) under If-Match. + +Generated API class: `SharesApi` + +Synchronous callables: + +```python +def shares_revoke(drive_id: StrictStr, share_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ShareOut +def shares_revoke_with_http_info(drive_id: StrictStr, share_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[ShareOut] +def shares_revoke_without_preload_content(drive_id: StrictStr, share_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def shares_revoke(drive_id: StrictStr, share_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ShareOut +async def shares_revoke_with_http_info(drive_id: StrictStr, share_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[ShareOut] +async def shares_revoke_without_preload_content(drive_id: StrictStr, share_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Revoke Share + +Revoke a share (soft, sets revoked_at) under If-Match. + +:param drive_id: (required) +:type drive_id: str +:param share_id: (required) +:type share_id: str +:param idempotency_key: (required) +:type idempotency_key: str +:param if_match: (required) +:type if_match: str +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `share_id` | `path` | yes | `string` | — | +| `Idempotency-Key` | `header` | yes | `string` or `null` | — | +| `If-Match` | `header` | yes | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | [`ShareOut`](#model-shareout) | `ShareOut` | `ETag`, `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `409` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `412` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `ETag`, `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `428` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +#### `shares_read` + +`GET /v0/drives/{drive_id}/shares/{share_id}` — Read Share + +Authentication: **bearer token**. + +Read one share's management representation (no secret). + +Generated API class: `SharesApi` + +Synchronous callables: + +```python +def shares_read(drive_id: StrictStr, share_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ShareOut +def shares_read_with_http_info(drive_id: StrictStr, share_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[ShareOut] +def shares_read_without_preload_content(drive_id: StrictStr, share_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def shares_read(drive_id: StrictStr, share_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ShareOut +async def shares_read_with_http_info(drive_id: StrictStr, share_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[ShareOut] +async def shares_read_without_preload_content(drive_id: StrictStr, share_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Read Share + +Read one share's management representation (no secret). + +:param drive_id: (required) +:type drive_id: str +:param share_id: (required) +:type share_id: str +:param if_none_match: +:type if_none_match: str +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `share_id` | `path` | yes | `string` | — | +| `If-None-Match` | `header` | no | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | [`ShareOut`](#model-shareout) | `ShareOut` | `ETag`, `X-Request-Id` | +| `304` | — | — | — | `ETag`, `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +#### `shares_rotate` + +`POST /v0/drives/{drive_id}/shares/{share_id}/rotate` — Rotate Share + +Authentication: **bearer token**. + +Rotate the secret in place (same id, no grace window). The response carries the new plaintext secret. + +Generated API class: `SharesApi` + +Synchronous callables: + +```python +def shares_rotate(drive_id: StrictStr, share_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ShareCreateOut +def shares_rotate_with_http_info(drive_id: StrictStr, share_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[ShareCreateOut] +def shares_rotate_without_preload_content(drive_id: StrictStr, share_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def shares_rotate(drive_id: StrictStr, share_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ShareCreateOut +async def shares_rotate_with_http_info(drive_id: StrictStr, share_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[ShareCreateOut] +async def shares_rotate_without_preload_content(drive_id: StrictStr, share_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Rotate Share + +Rotate the secret in place (same id, no grace window). The response carries the new plaintext secret. + +:param drive_id: (required) +:type drive_id: str +:param share_id: (required) +:type share_id: str +:param idempotency_key: (required) +:type idempotency_key: str +:param if_match: (required) +:type if_match: str +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `share_id` | `path` | yes | `string` | — | +| `Idempotency-Key` | `header` | yes | `string` or `null` | — | +| `If-Match` | `header` | yes | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | [`ShareCreateOut`](#model-sharecreateout) | `ShareCreateOut` | `ETag`, `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `409` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `412` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `ETag`, `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `428` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +### shares-redemption + +#### `shares_redeem` + +`GET /s/{share_key}` — Redeem Share + +Authentication: **anonymous**. + +The un-slashed form. Browsers are canonicalized onto `/s/{key}/`. This inherits the published `shares_redeem` operation id from the route it replaced, because for an API client it *is* that operation, unchanged: same URL, same JSON `Accept`, same bytes, same uniform 404. Only the browser arm is new. Dropping it from the spec would have described the route as gone while it kept answering. The page links its own sub-resources relatively (`content`), and relative resolution replaces the last path segment: from `/s/KEY` that reaches `/s/content`, from `/s/KEY/` it reaches `/s/KEY/content`. The trailing slash is what makes an image on a share page load at all. Links already in the wild have no slash, so this redirect is how they keep working. It is unconditional and runs before any lookup — redirecting only for keys that resolve would turn the status code into an existence oracle and undo the anti-enumeration property the rest of this module maintains. Only browsers are moved. JSON and byte clients are answered in place, so the shipped v0 contract for this URL is unchanged, redirect included. + +Generated API class: `SharesRedemptionApi` + +Synchronous callables: + +```python +def shares_redeem(share_key: StrictStr, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> object +def shares_redeem_with_http_info(share_key: StrictStr, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[object] +def shares_redeem_without_preload_content(share_key: StrictStr, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def shares_redeem(share_key: StrictStr, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> object +async def shares_redeem_with_http_info(share_key: StrictStr, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[object] +async def shares_redeem_without_preload_content(share_key: StrictStr, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Redeem Share + +The un-slashed form. Browsers are canonicalized onto `/s/{key}/`. This inherits the published `shares_redeem` operation id from the route it replaced, because for an API client it *is* that operation, unchanged: same URL, same JSON `Accept`, same bytes, same uniform 404. Only the browser arm is new. Dropping it from the spec would have described the route as gone while it kept answering. The page links its own sub-resources relatively (`content`), and relative resolution replaces the last path segment: from `/s/KEY` that reaches `/s/content`, from `/s/KEY/` it reaches `/s/KEY/content`. The trailing slash is what makes an image on a share page load at all. Links already in the wild have no slash, so this redirect is how they keep working. It is unconditional and runs before any lookup — redirecting only for keys that resolve would turn the status code into an existence oracle and undo the anti-enumeration property the rest of this module maintains. Only browsers are moved. JSON and byte clients are answered in place, so the shipped v0 contract for this URL is unchanged, redirect included. + +:param share_key: (required) +:type share_key: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `share_key` | `path` | yes | `string` | — | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | `any` | `object` | — | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | + +### versions + +#### `versions_list` + +`GET /v0/drives/{drive_id}/artifacts/{artifact_id}/versions` — List Versions + +Authentication: **bearer token**. + +List the artifact's version trail, newest first (ordinal DESC). + +Generated API class: `VersionsApi` + +Synchronous callables: + +```python +def versions_list(drive_id: StrictStr, artifact_id: StrictStr, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> VersionListOut +def versions_list_with_http_info(drive_id: StrictStr, artifact_id: StrictStr, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[VersionListOut] +def versions_list_without_preload_content(drive_id: StrictStr, artifact_id: StrictStr, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def versions_list(drive_id: StrictStr, artifact_id: StrictStr, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> VersionListOut +async def versions_list_with_http_info(drive_id: StrictStr, artifact_id: StrictStr, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[VersionListOut] +async def versions_list_without_preload_content(drive_id: StrictStr, artifact_id: StrictStr, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +List Versions + +List the artifact's version trail, newest first (ordinal DESC). + +:param drive_id: (required) +:type drive_id: str +:param artifact_id: (required) +:type artifact_id: str +:param limit: +:type limit: int +:param cursor: +:type cursor: str +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `artifact_id` | `path` | yes | `string` | — | +| `limit` | `query` | no | `integer` or `null` | — | +| `cursor` | `query` | no | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | [`VersionListOut`](#model-versionlistout) | `VersionListOut` | `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +#### `versions_append` + +`POST /v0/drives/{drive_id}/artifacts/{artifact_id}/versions` — Append Version + +Authentication: **bearer token**. + +Append one immutable version and rotate the artifact head. Multipart only (415 for a JSON body). Parts: content (bytes), content_type, sha256. content is required; name, parent_id, and metadata are not accepted here. + +Generated API class: `VersionsApi` + +Synchronous callables: + +```python +def versions_append(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description='The artifact bytes.')], authorization: Optional[StrictStr] = None, content_type: Annotated[Optional[StrictStr], Field(description='Declared media type.')] = None, sha256: Annotated[Optional[StrictStr], Field(description='Optional content sha256 for verification.')] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> VersionCreatedOut +def versions_append_with_http_info(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description='The artifact bytes.')], authorization: Optional[StrictStr] = None, content_type: Annotated[Optional[StrictStr], Field(description='Declared media type.')] = None, sha256: Annotated[Optional[StrictStr], Field(description='Optional content sha256 for verification.')] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[VersionCreatedOut] +def versions_append_without_preload_content(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description='The artifact bytes.')], authorization: Optional[StrictStr] = None, content_type: Annotated[Optional[StrictStr], Field(description='Declared media type.')] = None, sha256: Annotated[Optional[StrictStr], Field(description='Optional content sha256 for verification.')] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def versions_append(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description='The artifact bytes.')], authorization: Optional[StrictStr] = None, content_type: Annotated[Optional[StrictStr], Field(description='Declared media type.')] = None, sha256: Annotated[Optional[StrictStr], Field(description='Optional content sha256 for verification.')] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> VersionCreatedOut +async def versions_append_with_http_info(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description='The artifact bytes.')], authorization: Optional[StrictStr] = None, content_type: Annotated[Optional[StrictStr], Field(description='Declared media type.')] = None, sha256: Annotated[Optional[StrictStr], Field(description='Optional content sha256 for verification.')] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[VersionCreatedOut] +async def versions_append_without_preload_content(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description='The artifact bytes.')], authorization: Optional[StrictStr] = None, content_type: Annotated[Optional[StrictStr], Field(description='Declared media type.')] = None, sha256: Annotated[Optional[StrictStr], Field(description='Optional content sha256 for verification.')] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Append Version + +Append one immutable version and rotate the artifact head. Multipart only (415 for a JSON body). Parts: content (bytes), content_type, sha256. content is required; name, parent_id, and metadata are not accepted here. + +:param drive_id: (required) +:type drive_id: str +:param artifact_id: (required) +:type artifact_id: str +:param idempotency_key: (required) +:type idempotency_key: str +:param if_match: (required) +:type if_match: str +:param content: The artifact bytes. (required) +:type content: bytes +:param authorization: +:type authorization: str +:param content_type: Declared media type. +:type content_type: str +:param sha256: Optional content sha256 for verification. +:type sha256: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `artifact_id` | `path` | yes | `string` | — | +| `Idempotency-Key` | `header` | yes | `string` or `null` | — | +| `If-Match` | `header` | yes | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Request body (required): + +| Content type | Schema | +|---|---| +| `multipart/form-data` | [`object#965d5f23ae45`](#inline-schema-object-965d5f23ae45) | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `201` | `application/json` | [`VersionCreatedOut`](#model-versioncreatedout) | `VersionCreatedOut` | `ETag`, `Location`, `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `409` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `412` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `ETag`, `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `428` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +#### `versions_read` + +`GET /v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}` — Read Version + +Authentication: **bearer token**. + +Read one immutable version. + +Generated API class: `VersionsApi` + +Synchronous callables: + +```python +def versions_read(drive_id: StrictStr, artifact_id: StrictStr, version_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> VersionOut +def versions_read_with_http_info(drive_id: StrictStr, artifact_id: StrictStr, version_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[VersionOut] +def versions_read_without_preload_content(drive_id: StrictStr, artifact_id: StrictStr, version_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def versions_read(drive_id: StrictStr, artifact_id: StrictStr, version_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> VersionOut +async def versions_read_with_http_info(drive_id: StrictStr, artifact_id: StrictStr, version_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[VersionOut] +async def versions_read_without_preload_content(drive_id: StrictStr, artifact_id: StrictStr, version_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Read Version + +Read one immutable version. + +:param drive_id: (required) +:type drive_id: str +:param artifact_id: (required) +:type artifact_id: str +:param version_id: (required) +:type version_id: str +:param if_none_match: +:type if_none_match: str +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `artifact_id` | `path` | yes | `string` | — | +| `version_id` | `path` | yes | `string` | — | +| `If-None-Match` | `header` | no | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/json` | [`VersionOut`](#model-versionout) | `VersionOut` | `ETag`, `X-Request-Id` | +| `304` | — | — | — | `ETag`, `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +#### `versions_content` + +`GET /v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}/content` — Read Version Content + +Authentication: **bearer token**. + +Download one version's immutable bytes — stream or 307. + +Generated API class: `VersionsApi` + +Synchronous callables: + +```python +def versions_content(drive_id: StrictStr, artifact_id: StrictStr, version_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> bytes +def versions_content_with_http_info(drive_id: StrictStr, artifact_id: StrictStr, version_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[bytes] +def versions_content_without_preload_content(drive_id: StrictStr, artifact_id: StrictStr, version_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def versions_content(drive_id: StrictStr, artifact_id: StrictStr, version_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> bytes +async def versions_content_with_http_info(drive_id: StrictStr, artifact_id: StrictStr, version_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[bytes] +async def versions_content_without_preload_content(drive_id: StrictStr, artifact_id: StrictStr, version_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Read Version Content + +Download one version's immutable bytes — stream or 307. + +:param drive_id: (required) +:type drive_id: str +:param artifact_id: (required) +:type artifact_id: str +:param version_id: (required) +:type version_id: str +:param if_none_match: +:type if_none_match: str +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `artifact_id` | `path` | yes | `string` | — | +| `version_id` | `path` | yes | `string` | — | +| `If-None-Match` | `header` | no | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `200` | `application/octet-stream` | `string(binary)` | `bytes` | `X-Request-Id` | +| `304` | — | — | — | `ETag`, `X-Request-Id` | +| `307` | — | — | — | `Location`, `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +#### `versions_restore` + +`POST /v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}/restore` — Restore Version + +Authentication: **bearer token**. + +Restore a historical version as a NEW head version (no byte copy). + +Generated API class: `VersionsApi` + +Synchronous callables: + +```python +def versions_restore(drive_id: StrictStr, artifact_id: StrictStr, version_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> VersionCreatedOut +def versions_restore_with_http_info(drive_id: StrictStr, artifact_id: StrictStr, version_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[VersionCreatedOut] +def versions_restore_without_preload_content(drive_id: StrictStr, artifact_id: StrictStr, version_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Asynchronous callables: + +```python +async def versions_restore(drive_id: StrictStr, artifact_id: StrictStr, version_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> VersionCreatedOut +async def versions_restore_with_http_info(drive_id: StrictStr, artifact_id: StrictStr, version_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ApiResponse[VersionCreatedOut] +async def versions_restore_without_preload_content(drive_id: StrictStr, artifact_id: StrictStr, version_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> RESTResponseType +``` + +Generated docstring: + +```text +Restore Version + +Restore a historical version as a NEW head version (no byte copy). + +:param drive_id: (required) +:type drive_id: str +:param artifact_id: (required) +:type artifact_id: str +:param version_id: (required) +:type version_id: str +:param idempotency_key: (required) +:type idempotency_key: str +:param if_match: (required) +:type if_match: str +:param authorization: +:type authorization: str +:param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. +:type _request_timeout: int, tuple(int, int), optional +:param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. +:type _request_auth: dict, optional +:param _content_type: force content-type for the request. +:type _content_type: str, Optional +:param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. +:type _headers: dict, optional +:param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. +:type _host_index: int, optional +:return: Returns the result object. +``` + +Request parameters: + +| Wire name | In | Required | Schema | Description | +|---|---|:---:|---|---| +| `drive_id` | `path` | yes | `string` | — | +| `artifact_id` | `path` | yes | `string` | — | +| `version_id` | `path` | yes | `string` | — | +| `Idempotency-Key` | `header` | yes | `string` or `null` | — | +| `If-Match` | `header` | yes | `string` or `null` | — | +| `authorization` | `header` | no | `string` or `null` | — | + +Responses: + +| Status | Content | OpenAPI schema | Generated Python type | Headers | +|---:|---|---|---|---| +| `201` | `application/json` | [`VersionCreatedOut`](#model-versioncreatedout) | `VersionCreatedOut` | `ETag`, `Location`, `X-Request-Id` | +| `400` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `401` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `WWW-Authenticate`, `X-Request-Id` | +| `403` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `404` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `409` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `412` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `ETag`, `X-Request-Id` | +| `422` | `application/json` | [`ValidationErrorResponse`](#model-validationerrorresponse) | `ValidationErrorResponse` | `X-Request-Id` | +| `428` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `X-Request-Id` | +| `429` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | +| `503` | `application/json` | [`object#8b962e613b2d`](#inline-schema-object-8b962e613b2d) | `DrivesCreate400Response` | `Retry-After`, `X-Request-Id` | + +## Models + +### ArtifactCopyIn + + +POST /v0/drives/{id}/artifacts/{artifact_id}/copy body. ``destination_drive_id`` must equal the source drive (or be absent) — cross-drive copy is out of v0 scope and rejected. + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `destination_drive_id` | no | `string` or `null` | — | +| `destination_name` | yes | `string` | — | +| `destination_parent_id` | yes | `string` | — | +| `version_id` | no | `string` or `null` | — | + +Additional properties: not allowed. + +### ArtifactListOut + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `items` | yes | `array` of [`ArtifactOut`](#model-artifactout) | — | +| `next_cursor` | yes | `string` or `null` | — | + +### ArtifactOut + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `content_preview` | yes | `string` or `null` | — | +| `content_type` | yes | `string` or `null` | — | +| `created_at` | yes | `string(date-time)` | — | +| `deleted_at` | yes | `string(date-time)` or `null` | — | +| `drive_id` | yes | `string` | — | +| `effective_visibility` | yes | `enum[public, shared, private]` | Server-computed exposure summary, resolved over the artifact's live grants, its folder ancestry (bounded by the nearest sealed folder), and the drive. 'public' when any live grant has principal_type 'public'; otherwise 'shared' when a live grant names a principal other than the drive's creator; otherwise 'private'. Describes exposure, NOT the caller's own access. | +| `head_version_id` | yes | `string` or `null` | — | +| `id` | yes | `string` | — | +| `labels` | yes | `array` of `string` | — | +| `metadata` | yes | [`object#82ef96cebaf5`](#inline-schema-object-82ef96cebaf5) | — | +| `name` | yes | `string` | — | +| `parent_id` | yes | `string` | — | +| `revision` | yes | `string` | — | +| `state` | yes | `enum[active, deleted]` | — | +| `updated_at` | yes | `string(date-time)` | — | + +### ArtifactUpdateIn + + +PATCH /v0/drives/{id}/artifacts/{artifact_id} body — at least one field is required. + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `labels` | no | `array` of `string` or `null` | — | +| `metadata` | no | [`object#82ef96cebaf5`](#inline-schema-object-82ef96cebaf5) or `null` | — | +| `name` | no | `string` or `null` | — | +| `parent_id` | no | `string` or `null` | — | + +Additional properties: not allowed. + +### ChangeActorOut + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `id` | yes | `string` or `null` | — | +| `type` | yes | `enum[agent, user, system]` | — | + +### ChangeOut + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `actor` | yes | [`ChangeActorOut`](#model-changeactorout) | — | +| `change_set_id` | yes | `string` | — | +| `data` | yes | [`object#82ef96cebaf5`](#inline-schema-object-82ef96cebaf5) | — | +| `drive_id` | yes | `string` | — | +| `id` | yes | `string` | — | +| `occurred_at` | yes | `string(date-time)` | — | +| `previous_revision` | yes | `string` or `null` | — | +| `resource` | yes | [`ChangeResourceOut`](#model-changeresourceout) | — | +| `revision` | yes | `string` or `null` | — | +| `type` | yes | `string` | — | + +### ChangePageOut + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `has_more` | yes | `boolean` | — | +| `items` | yes | `array` of [`ChangeOut`](#model-changeout) | — | +| `next_cursor` | yes | `string` | — | + +### ChangeResourceOut + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `id` | yes | `string` | — | +| `type` | yes | `enum[drive, folder, artifact]` | — | + +### DriveCreateIn + + +POST /v0/drives body. + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `metadata` | no | [`object#82ef96cebaf5`](#inline-schema-object-82ef96cebaf5) | — | +| `name` | yes | `string` | — | + +Additional properties: not allowed. + +### DriveListOut + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `items` | yes | `array` of [`DriveOut`](#model-driveout) | — | +| `next_cursor` | yes | `string` or `null` | — | + +### DriveOut + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `created_at` | yes | `string(date-time)` | — | +| `created_by` | yes | `string` or `null` | — | +| `deleted_at` | yes | `string(date-time)` or `null` | — | +| `id` | yes | `string` | — | +| `metadata` | yes | [`object#82ef96cebaf5`](#inline-schema-object-82ef96cebaf5) | — | +| `name` | yes | `string` | — | +| `retrieval_bytes` | yes | `integer` | — | +| `revision` | yes | `string` | — | +| `root_folder_id` | yes | `string` | — | +| `state` | yes | `enum[active, deleted]` | — | +| `storage_bytes` | yes | `integer` | — | +| `updated_at` | yes | `string(date-time)` | — | +| `workspace_id` | yes | `string` | — | + +### DriveUpdateIn + + +PATCH /v0/drives/{id} body — at least one field is required. + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `metadata` | no | [`object#82ef96cebaf5`](#inline-schema-object-82ef96cebaf5) or `null` | — | +| `name` | no | `string` or `null` | — | + +Additional properties: not allowed. + +### DriveUsageOut + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `retrieval_bytes` | yes | `integer` | — | +| `storage_bytes` | yes | `integer` | — | + +### ErrorResponse + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `error` | yes | [`object#722fdd066e5a`](#inline-schema-object-722fdd066e5a) | — | + +### FolderCascadeOut + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `cascade` | yes | [`object#6c0c57913db9`](#inline-schema-object-6c0c57913db9) | — | +| `folder` | yes | [`FolderOut`](#model-folderout) | — | + +### FolderCopyIn + + +POST /v0/drives/{id}/folders/{folder_id}/copy body. ``destination_drive_id`` must equal the source drive (or be absent) — cross-drive copy is out of v0 scope and rejected. + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `destination_drive_id` | no | `string` or `null` | — | +| `destination_name` | yes | `string` | — | +| `destination_parent_id` | yes | `string` | — | + +Additional properties: not allowed. + +### FolderCreateIn + + +POST /v0/drives/{id}/folders body. + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `grant_inheritance` | no | `enum[inherit, sealed]` | — | +| `metadata` | no | [`object#82ef96cebaf5`](#inline-schema-object-82ef96cebaf5) | — | +| `name` | yes | `string` | — | +| `parent_id` | yes | `string` | — | + +Additional properties: not allowed. + +### FolderListOut + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `items` | yes | `array` of [`FolderOut`](#model-folderout) | — | +| `next_cursor` | yes | `string` or `null` | — | + +### FolderOut + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `created_at` | yes | `string(date-time)` | — | +| `deleted_at` | yes | `string(date-time)` or `null` | — | +| `drive_id` | yes | `string` | — | +| `grant_inheritance` | yes | `enum[inherit, sealed]` | — | +| `id` | yes | `string` | — | +| `metadata` | yes | [`object#82ef96cebaf5`](#inline-schema-object-82ef96cebaf5) | — | +| `name` | yes | `string` or `null` | — | +| `parent_id` | yes | `string` or `null` | — | +| `revision` | yes | `string` | — | +| `state` | yes | `enum[active, deleted]` | — | +| `updated_at` | yes | `string(date-time)` | — | + +### FolderUpdateIn + + +PATCH /v0/drives/{id}/folders/{folder_id} body — at least one field is required. + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `grant_inheritance` | no | `enum[inherit, sealed]` or `null` | — | +| `metadata` | no | [`object#82ef96cebaf5`](#inline-schema-object-82ef96cebaf5) or `null` | — | +| `name` | no | `string` or `null` | — | +| `parent_id` | no | `string` or `null` | — | + +Additional properties: not allowed. + +### GrantCreateIn + + +POST /v0/drives/{id}/grants body. + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `expires_at` | no | `string(date-time)` or `null` | — | +| `principal_id` | no | `string` or `null` | — | +| `principal_type` | yes | `enum[agent, user, workspace, public]` | — | +| `resource_id` | yes | `string` | — | +| `resource_type` | yes | `enum[drive, folder, artifact]` | — | +| `role` | yes | `enum[viewer, editor, manager]` | — | + +Additional properties: not allowed. + +### GrantListOut + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `items` | yes | `array` of [`GrantOut`](#model-grantout) | — | +| `next_cursor` | yes | `string` or `null` | — | + +### GrantOut + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `created_at` | yes | `string(date-time)` | — | +| `drive_id` | yes | `string` | — | +| `expires_at` | yes | `string(date-time)` or `null` | — | +| `id` | yes | `string` | — | +| `principal_id` | yes | `string` or `null` | — | +| `principal_type` | yes | `enum[agent, user, workspace, public]` | — | +| `resource_id` | yes | `string` | — | +| `resource_type` | yes | `enum[drive, folder, artifact]` | — | +| `revision` | yes | `string` | — | +| `revoked_at` | yes | `string(date-time)` or `null` | — | +| `role` | yes | `enum[viewer, editor, manager]` | — | +| `state` | yes | `enum[active, revoked, expired]` | — | + +### GrantUpdateIn + + +PATCH /v0/drives/{id}/grants/{grant_id} body — at least one field is required. An explicit ``expires_at: null`` clears the expiry; omitting it leaves it unchanged. + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `expires_at` | no | `string(date-time)` or `null` | — | +| `role` | no | `enum[viewer, editor, manager]` or `null` | — | + +Additional properties: not allowed. + +### HealthDegradedDetail + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `error` | yes | `string` | — | +| `status` | yes | `string` | — | + +### HealthDegradedResponse + + +Legacy health-probe failure shape. Health predates the `/v0` error envelope and is consumed by load balancers. PR 1 documents the wire shape without changing it; convergence on the canonical API envelope is a separately reviewed compatibility decision. + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `detail` | yes | [`HealthDegradedDetail`](#model-healthdegradeddetail) | — | + +### HealthOut + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `status` | yes | `string` | — | + +### SearchHitOut + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `content_type` | yes | `string` or `null` | — | +| `drive_id` | yes | `string` | — | +| `id` | yes | `string` | — | +| `name` | yes | `string` | — | +| `parent_id` | yes | `string` or `null` | — | +| `rank` | yes | `number` | — | +| `snippet` | yes | `string` | HTML-safe highlighted excerpt. The ONLY markup it may contain is the server's own ... highlight pair; artifact content is entity-escaped, so this may be rendered as HTML. | +| `updated_at` | yes | `string(date-time)` | — | +| `version_id` | yes | `string` or `null` | — | + +### SearchPageOut + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `items` | yes | `array` of [`SearchHitOut`](#model-searchhitout) | — | +| `next_cursor` | yes | `string` or `null` | — | + +### ShareCreateIn + + +POST /v0/drives/{id}/shares body. + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `expires_at` | no | `string(date-time)` or `null` | — | +| `resource_id` | yes | `string` | — | +| `resource_type` | yes | `enum[artifact, artifact_version, folder]` | — | + +Additional properties: not allowed. + +### ShareCreateOut + + +The create/rotate response — the ONLY response carrying the plaintext secret. + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `created_at` | yes | `string(date-time)` | — | +| `created_by` | yes | `string` or `null` | — | +| `drive_id` | yes | `string` | — | +| `expires_at` | yes | `string(date-time)` or `null` | — | +| `id` | yes | `string` | — | +| `resource_id` | yes | `string` | — | +| `resource_type` | yes | `enum[artifact, artifact_version, folder]` | — | +| `revision` | yes | `string` | — | +| `revoked_at` | yes | `string(date-time)` or `null` | — | +| `rotated_at` | yes | `string(date-time)` or `null` | — | +| `secret` | no | `string` or `null` | Plaintext share secret. Present only on first execution of a create or rotate; null on idempotent replay — rotate to obtain a new secret. | +| `state` | yes | `enum[active, revoked]` | — | + +### ShareListOut + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `items` | yes | `array` of [`ShareOut`](#model-shareout) | — | +| `next_cursor` | yes | `string` or `null` | — | + +### ShareOut + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `created_at` | yes | `string(date-time)` | — | +| `created_by` | yes | `string` or `null` | — | +| `drive_id` | yes | `string` | — | +| `expires_at` | yes | `string(date-time)` or `null` | — | +| `id` | yes | `string` | — | +| `resource_id` | yes | `string` | — | +| `resource_type` | yes | `enum[artifact, artifact_version, folder]` | — | +| `revision` | yes | `string` | — | +| `revoked_at` | yes | `string(date-time)` or `null` | — | +| `rotated_at` | yes | `string(date-time)` or `null` | — | +| `state` | yes | `enum[active, revoked]` | — | + +### V0ErrorEnvelope + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `error` | yes | [`object#722fdd066e5a`](#inline-schema-object-722fdd066e5a) | — | + +### ValidationErrorResponse + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `error` | yes | [`object#96c478f6609e`](#inline-schema-object-96c478f6609e) | — | + +### VersionCreatedOut + + +The append/restore response — a version plus the artifact's new revision, which the version-creating 201 rotates. + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `artifact_id` | yes | `string` | — | +| `artifact_revision` | yes | `string` | The artifact's revision after this version became head — the If-Match value for the next mutation. | +| `content_type` | yes | `string` | — | +| `created_at` | yes | `string(date-time)` | — | +| `created_by` | yes | `string` or `null` | — | +| `hash` | yes | `string` | — | +| `id` | yes | `string` | — | +| `parent_version_id` | yes | `string` or `null` | — | +| `size_bytes` | yes | `integer` | — | +| `version_number` | yes | `integer` | — | + +### VersionListOut + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `items` | yes | `array` of [`VersionOut`](#model-versionout) | — | +| `next_cursor` | yes | `string` or `null` | — | + +### VersionOut + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `artifact_id` | yes | `string` | — | +| `content_type` | yes | `string` | — | +| `created_at` | yes | `string(date-time)` | — | +| `created_by` | yes | `string` or `null` | — | +| `hash` | yes | `string` | — | +| `id` | yes | `string` | — | +| `parent_version_id` | yes | `string` or `null` | — | +| `size_bytes` | yes | `integer` | — | +| `version_number` | yes | `integer` | — | + +## Anonymous and inline schemas + +OpenAPI permits request and response objects without a component name. +The generated clients assign Python class names to some of these objects; +the response tables show those generated names, while this section records +their exact wire fields directly from the authoritative contract. + +### `object#0e19f9dee6d4` + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `location` | no | `string` | — | +| `reason` | no | `string` | — | + +### `object#6c0c57913db9` + + +Schema type: `object#6c0c57913db9` + +Additional properties: allowed values matching `integer`. + +### `object#722fdd066e5a` + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `code` | yes | `string` | Stable machine-readable error code (see the error-catalog). | +| `details` | no | [`object#a2c799262a3c`](#inline-schema-object-a2c799262a3c) | Error-code-specific context (optional). | +| `message` | yes | `string` | — | + +Additional properties: allowed (any JSON value). + +### `object#82ef96cebaf5` + + +Schema type: `object#82ef96cebaf5` + +Additional properties: allowed (any JSON value). + +### `object#8b962e613b2d` + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `error` | yes | [`object#722fdd066e5a`](#inline-schema-object-722fdd066e5a) | — | + +### `object#965d5f23ae45` + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `content` | yes | `string(binary)` | The artifact bytes. | +| `content_type` | no | `string` | Declared media type. | +| `sha256` | no | `string` | Optional content sha256 for verification. | + +### `object#96c478f6609e` + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `code` | yes | `string` | — | +| `details` | no | [`object#b79eb75a84e1`](#inline-schema-object-b79eb75a84e1) | — | +| `message` | yes | `string` | — | + +Additional properties: allowed (any JSON value). + +### `object#a2c799262a3c` + + +Error-code-specific context (optional). + +Schema type: `object#a2c799262a3c` + +### `object#b79eb75a84e1` + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `fields` | no | `array` of [`object#0e19f9dee6d4`](#inline-schema-object-0e19f9dee6d4) | — | + +### `object#f872091b96e1` + + +| Field | Required | Schema | Description | +|---|:---:|---|---| +| `content` | yes | `string(binary)` | The artifact bytes. | +| `content_type` | no | `string` | Declared media type. | +| `metadata` | no | [`object#a2c799262a3c`](#inline-schema-object-a2c799262a3c) | Free-form JSON metadata. | +| `name` | yes | `string` | Artifact name. | +| `parent_id` | yes | `string` | Destination folder id (fld_*). | +| `sha256` | no | `string` | Optional content sha256 for verification. | diff --git a/docs/sdk-contract-migration-2026-07.md b/docs/sdk-contract-migration-2026-07.md index 654d9c6..a5680ee 100644 --- a/docs/sdk-contract-migration-2026-07.md +++ b/docs/sdk-contract-migration-2026-07.md @@ -1,41 +1,73 @@ -# SDK contract migration — July 2026 +# SDK Phase 1 contract migration — July–August 2026 -This regeneration switches the SDK source from the live production -`/openapi.json` endpoint to AgentDrive's reviewed, committed PR 3 contract. -No package is published by this change. +This PR replaces the pre-Phase 1 generated surface with AgentDrive's reviewed, +committed SDK contract and introduces the Python `0.1.0` generated core. No +package is published by this repository change. ## Generated surface -| | Before | After | +| | Pre-Phase 1 (`0.0.1`) | Phase 1 (`0.1.0`) | |---|---:|---:| -| OpenAPI paths | 159 | 86 | -| Operations | 185 | 110 | -| Component schemas | 123 | 128 | - -The removed generated methods were browser pages, `/web/*` forms, and other UI -or internal operations that never belonged in a machine SDK. Their runtime -routes are unchanged. - -The corrected generated surface adds: - -- the HTTP Bearer authentication scheme used by `ad_live_`, `ad_user_`, and - supported JWT credentials; -- canonical structured error and validation models; -- typed JSON success payloads plus correct binary/text response types; -- PR 2 cursor inputs and `next_cursor` outputs for trash and compile-job - listings, while retaining their deprecated response aliases. - -Generated method and model changes should be reviewed as a client-surface -correction. Before publishing, choose an SDK version appropriate to the -packages' current stability promise and include these notes in the release. - -## Workflow change - -- Input is the committed `sdk/openapi.json` with exact AgentDrive commit and - SHA-256 provenance. -- OpenAPI Generator is pinned to 7.24.0. -- CI regenerates and fails on drift. -- Python, TypeScript, and Go must expose exactly the contract's operation IDs. -- All language builds/tests run before merge. -- Scheduled production fetches, bot auto-commits, and implicit publishing are - removed. +| OpenAPI paths | 86 | 27 | +| Operations | 110 | 42 | +| Component schemas | 128 | 38 | + +The 68 removed operations were browser pages, internal/admin services, and +other routes outside the supported machine SDK. Their removal from this client +contract does not claim that their server routes disappeared. The Phase 1 +surface contains 39 bearer-authenticated operations and three anonymous +discovery/health/share-redemption operations. + +The old `agentdrive-sdk` `0.0.1` distribution is pre-Phase 1 and superseded by +this reviewed contract. Separately, the bare `agentdrive` PyPI name is only a +parked `0.0.1` placeholder; the retired stdio MCP companion is not part of the +new SDK architecture. + +## Python architecture + +The Python package is now hand-owned except for two isolated generated trees: + +- synchronous `urllib3` client at + `src/agentdrive_sdk/generated/sync`; +- asynchronous `httpx` client at + `src/agentdrive_sdk/generated/async_client`. + +Both cores cover all 42 operations and expose the primary, +`*_with_http_info`, and `*_without_preload_content` variants. The ergonomic +resource facade is a later phase; `0.1.0` intentionally exposes the complete +generated cores first. Exact callable signatures and generated docstrings are +in `docs/python-sdk-api-reference.md`. + +Generated request models reject unknown fields, keep request enums closed, and +distinguish omitted PATCH fields from explicit null. Optional but non-nullable +wire fields reject explicit null. Generated response models ignore additive +fields and accept future enum strings. Both transports disable automatic +redirect following so credentials are not forwarded across hosts, while +`ApiResponse.headers` preserves the complete raw response-header mapping. + +## Compatibility and review gates + +The 110-to-42 transition is an intentional one-time reset. It is authorized by +`sdk/openapi.compatibility-reset.json`, bound to the exact old/new canonical +contract digests and AgentDrive source commit +`31cd35c8e12aef1cbee228e965289107cb51092c`. Any different candidate fails the +reset match. After this contract reaches the base branch, CI performs normal +directional compatibility checks and rejects breaking request or response +changes. + +CI additionally requires: + +- exact provenance and pinned-generator verification; +- byte-identical regeneration and exact operation coverage in all languages; +- exact sync/async Python callable and wire parity; +- direct component property/requiredness/nullability comparison plus reviewed + constraint, response status/media/header, and generated AST hashes; +- generated model evolution and transport conformance tests on Python 3.10, + 3.12, and 3.14; +- a current generated API reference and contract-shape manifest; +- release input/tag equality with every package version before any publish job. + +Publishing remains a separate human-approved action. Before publishing +`0.1.0`, verify PyPI and npm trusted-publisher ownership after the GitHub +repository transfer; immutable existing versions are hard failures, not +silently skipped. diff --git a/docs/sdk-generation.md b/docs/sdk-generation.md index 59ffa9c..583795c 100644 --- a/docs/sdk-generation.md +++ b/docs/sdk-generation.md @@ -28,8 +28,10 @@ Every API contract change uses two coordinated reviews: CI regenerates with `openapitools/openapi-generator-cli:v7.24.0`, requires a clean diff, checks exact operation coverage in all three languages, and runs -their tests. The workflow does not fetch production, commit changes, publish -packages, or deploy anything. +their tests. Before generation it compares the candidate OpenAPI document with +the PR/push base and rejects breaking operation, parameter, request, response, +status, media, header, authentication, or server changes. The workflow does +not fetch production, commit changes, publish packages, or deploy anything. The canonical OpenAPI 3.1 file is unchanged by generation. A tested generation-only view removes object/array defaults that produce invalid Go and @@ -40,6 +42,64 @@ their templates otherwise emit undefined serializers. Python consumes the unmodified union schemas. A final deterministic pass strips generator-owned trailing whitespace and excess EOF blank lines. -Publishing is a separate, explicit release action. Corrected clients should -receive a version and migration note appropriate to their current stability -promise before Josh approves publication. +## Python generated-core gates + +Python generation produces two independent clients: + +- `sdk/python/src/agentdrive_sdk/generated/sync` (`urllib3`); +- `sdk/python/src/agentdrive_sdk/generated/async_client` (`httpx`, async only). + +`check_python_generated_contract.py` parses both source trees. It requires all +three public variants for every operation, exact sync/async parameter and +docstring parity, and contract-matching HTTP methods, paths, authentication, +wire parameter names/locations/requiredness/types, request media, response +media/status/model maps, and a response-header carrier. + +`generate_python_contract_manifest.py --check` provides the deeper review +gate. Its committed manifest hashes every constraint-bearing component schema +and generated model class while directly comparing each component's property +set, requiredness, and nullability. For every response it records exact status, +media, and header names/schema hashes. Generated Python does not create one +attribute per header: both clients copy the complete raw header mapping into +`ApiResponse.headers`; the manifest verifies that carrier and forwarding path. + +`postprocess_python_models.py` applies the compatibility policy that OpenAPI +Generator does not express correctly by itself: + +- request models reject unknown fields and retain closed enum validation; +- optional-but-non-nullable fields remain omittable but reject explicit null; +- response models ignore additive fields and accept future enum strings; +- PATCH request serialization preserves explicit null while omitting unset + fields. + +`generate_python_api_reference.py` parses the committed source rather than +guessing from OpenAPI alone. Its checked output includes exact sync/async +callable signatures, all variants and generated docstrings, plus the wire +request/response tables. Response tables pair each OpenAPI schema with its +generated Python type, and anonymous request/error objects link to recursively +rendered inline field definitions instead of opaque schema hashes. + +## Intentional Phase 1 compatibility reset + +The pre-Phase 1 `0.0.1` contract exposed 110 operations, including browser and +internal routes that were never a supported SDK surface. The Phase 1 contract +intentionally replaces it with the reviewed 42-operation SDK contract. The +single transition is authorized only by +`sdk/openapi.compatibility-reset.json`, whose exact old digest, new digest, and +AgentDrive source commit must all match. It is not a skip flag: any further +change to either document invalidates it. Once the 42-operation contract is the +base branch, normal directional compatibility comparison applies. + +Publishing is a separate, explicit release action. A manual dispatch fails +unless it runs from `refs/heads/main`; a GitHub release commit must be contained +in `origin/main`. The publish workflow then calls the same reusable acceptance +workflow as pull requests: unit/provenance/compatibility checks, pinned +regeneration and freshness, exact Python shape/model/reference gates, +conformance and package builds, TypeScript build, and Go tests must all pass on +the release commit. Only then does release integrity require the release tag +(`vX.Y.Z`) or manual input to match `sdk/SDK_VERSION`, Python root and generated +versions, and TypeScript package/lock versions. PyPI, npm, and Go tag jobs +depend on those gates and fail rather than silently accepting an +already-published immutable version. Trusted-publisher ownership/OIDC must be +verified after the GitHub repository transfer before approving the first +`0.1.0` publish. diff --git a/quality/python/test_generated_model_policy.py b/quality/python/test_generated_model_policy.py new file mode 100644 index 0000000..e24e7d1 --- /dev/null +++ b/quality/python/test_generated_model_policy.py @@ -0,0 +1,87 @@ +from __future__ import annotations + +import importlib +from pathlib import Path + +import pytest +from pydantic import ValidationError + +from scripts.openapi_sdk_contract import load_document, model_contexts, python_name + +NAMESPACES = ( + "agentdrive_sdk.generated.sync", + "agentdrive_sdk.generated.async_client", +) + + +def _model(namespace: str, name: str): + module = importlib.import_module(f"{namespace}.models.{python_name(name)}") + return getattr(module, name) + + +@pytest.mark.parametrize("namespace", NAMESPACES) +def test_all_contract_models_have_directional_extra_field_policy(namespace: str): + contract = load_document(Path("sdk/openapi.json")) + request_models, response_models = model_contexts(contract) + + for name in sorted(request_models): + model = _model(namespace, name) + assert model.model_config.get("extra") == "forbid", name + assert "additional_properties" not in model.model_fields, name + for name in sorted(response_models): + model = _model(namespace, name) + assert model.model_config.get("extra") == "ignore", name + + +@pytest.mark.parametrize("namespace", NAMESPACES) +def test_additive_response_field_and_unknown_response_enum_are_accepted(namespace: str): + actor = _model(namespace, "ChangeActorOut").from_dict( + {"id": None, "type": "future_actor", "future_field": {"nested": True}} + ) + + assert actor.type == "future_actor" + assert actor.id is None + assert not hasattr(actor, "future_field") + + +@pytest.mark.parametrize("namespace", NAMESPACES) +def test_request_models_reject_unknown_fields_through_both_entry_points(namespace: str): + drive_create = _model(namespace, "DriveCreateIn") + payload = {"name": "research", "future_field": True} + + with pytest.raises(ValidationError): + drive_create.model_validate(payload) + with pytest.raises(ValidationError): + drive_create.from_dict(payload) + + +@pytest.mark.parametrize("namespace", NAMESPACES) +def test_optional_nonnullable_request_field_rejects_explicit_null(namespace: str): + drive_create = _model(namespace, "DriveCreateIn") + + assert drive_create.model_validate({"name": "research"}).metadata is None + with pytest.raises(ValidationError): + drive_create.model_validate({"name": "research", "metadata": None}) + + +@pytest.mark.parametrize("namespace", NAMESPACES) +def test_request_enum_remains_closed(namespace: str): + grant_create = _model(namespace, "GrantCreateIn") + + with pytest.raises(ValidationError): + grant_create.from_dict( + { + "principal_type": "agent", + "resource_id": "drv_0123456789abcdef", + "resource_type": "drive", + "role": "future_role", + } + ) + + +@pytest.mark.parametrize("namespace", NAMESPACES) +def test_patch_dump_distinguishes_explicit_null_from_unset(namespace: str): + grant_update = _model(namespace, "GrantUpdateIn") + + assert grant_update(expires_at=None).to_dict() == {"expires_at": None} + assert grant_update().to_dict() == {} diff --git a/scripts/check_openapi_compatibility.py b/scripts/check_openapi_compatibility.py new file mode 100644 index 0000000..46906ac --- /dev/null +++ b/scripts/check_openapi_compatibility.py @@ -0,0 +1,590 @@ +"""Reject backward-incompatible SDK contract changes. + +The comparator is direction-aware: a new request schema must continue to +accept every previously valid request, while a new response schema must remain +readable by an older client. AgentDrive response models intentionally ignore +additive fields and accept unknown enum strings, so those two response changes +are explicitly compatible. +""" + +from __future__ import annotations + +import argparse +import json +import subprocess +import sys +from pathlib import Path +from typing import Any, Literal + +try: + from scripts.openapi_sdk_contract import ( + ContractError, + load_document, + media_schemas, + merged_parameters, + operation_map, + resolve_local_ref, + sha256_json, + shape_schema, + ) +except ModuleNotFoundError: # direct `python scripts/...py` execution + from openapi_sdk_contract import ( + ContractError, + load_document, + media_schemas, + merged_parameters, + operation_map, + resolve_local_ref, + sha256_json, + shape_schema, + ) + +Direction = Literal["request", "response"] +DEFAULT_CURRENT = Path("sdk/openapi.json") +DEFAULT_RESET = Path("sdk/openapi.compatibility-reset.json") +DEFAULT_PROVENANCE = Path("sdk/openapi.provenance.json") + + +def load_source(source: str) -> dict[str, Any]: + """Load a filesystem JSON document or a ``git show`` object expression.""" + + path = Path(source) + if path.is_file(): + return load_document(path) + result = subprocess.run( + ["git", "show", source], + check=False, + capture_output=True, + text=True, + ) + if result.returncode: + detail = result.stderr.strip() or "git show failed" + raise ContractError(f"cannot load compatibility base {source!r}: {detail}") + try: + document = json.loads(result.stdout) + except json.JSONDecodeError as exc: + raise ContractError(f"compatibility base {source!r} is not JSON: {exc}") from exc + if not isinstance(document, dict): + raise ContractError(f"compatibility base {source!r} must contain a JSON object") + return document + + +def _effective_security(document: dict[str, Any], operation: dict[str, Any]) -> list[Any]: + value = operation.get("security", document.get("security", [])) + return value if isinstance(value, list) else [] + + +def _security_covers(old: list[Any], new: list[Any]) -> bool: + """Return whether each old authentication alternative still works.""" + + if not old: + old = [{}] + if not new: + new = [{}] + for old_requirement in old: + if not isinstance(old_requirement, dict): + return False + accepted = False + for new_requirement in new: + if not isinstance(new_requirement, dict): + continue + if not set(new_requirement).issubset(old_requirement): + continue + if all( + set(new_requirement[name] or []).issubset(old_requirement[name] or []) + for name in new_requirement + ): + accepted = True + break + if not accepted: + return False + return True + + +def _type_set(schema: dict[str, Any]) -> set[str] | None: + raw = schema.get("type") + if isinstance(raw, str): + result = {raw} + elif isinstance(raw, list) and all(isinstance(item, str) for item in raw): + result = set(raw) + elif not schema or set(schema).issubset({"description", "title", "examples", "example"}): + return None + elif "properties" in schema or "additionalProperties" in schema: + result = {"object"} + elif "items" in schema: + result = {"array"} + else: + return None + if schema.get("nullable") is True: + result.add("null") + return result + + +def _bound_breaks( + old: dict[str, Any], new: dict[str, Any], direction: Direction +) -> list[str]: + failures: list[str] = [] + lower = ("minimum", "exclusiveMinimum", "minLength", "minItems", "minProperties") + upper = ("maximum", "exclusiveMaximum", "maxLength", "maxItems", "maxProperties") + for name in lower: + old_value = old.get(name) + new_value = new.get(name) + if direction == "request": + if new_value is not None and (old_value is None or new_value > old_value): + failures.append(f"tightened {name} from {old_value!r} to {new_value!r}") + elif old_value is not None and (new_value is None or new_value < old_value): + failures.append(f"response loosened {name} from {old_value!r} to {new_value!r}") + for name in upper: + old_value = old.get(name) + new_value = new.get(name) + if direction == "request": + if new_value is not None and (old_value is None or new_value < old_value): + failures.append(f"tightened {name} from {old_value!r} to {new_value!r}") + elif old_value is not None and (new_value is None or new_value > old_value): + failures.append(f"response loosened {name} from {old_value!r} to {new_value!r}") + old_pattern = old.get("pattern") + new_pattern = new.get("pattern") + if direction == "request" and new_pattern and new_pattern != old_pattern: + failures.append(f"introduced/changed pattern from {old_pattern!r} to {new_pattern!r}") + if direction == "response" and old_pattern and new_pattern != old_pattern: + failures.append(f"response changed/removed pattern from {old_pattern!r} to {new_pattern!r}") + return failures + + +def _additional_policy(schema: dict[str, Any]) -> Any: + return schema.get("additionalProperties", True) + + +def _schema_breaks( + old_document: dict[str, Any], + new_document: dict[str, Any], + old_schema: Any, + new_schema: Any, + *, + direction: Direction, + location: str, + seen: set[tuple[int, int, Direction]] | None = None, +) -> list[str]: + old_schema = resolve_local_ref(old_document, old_schema) + new_schema = resolve_local_ref(new_document, new_schema) + if not isinstance(old_schema, dict) or not isinstance(new_schema, dict): + if shape_schema(old_schema) != shape_schema(new_schema): + return [f"{location}: schema changed"] + return [] + + seen = seen or set() + pair = (id(old_schema), id(new_schema), direction) + if pair in seen: + return [] + seen.add(pair) + + old_alternatives = old_schema.get("anyOf") or old_schema.get("oneOf") + new_alternatives = new_schema.get("anyOf") or new_schema.get("oneOf") + if isinstance(old_alternatives, list) or isinstance(new_alternatives, list): + old_values = old_alternatives if isinstance(old_alternatives, list) else [old_schema] + new_values = new_alternatives if isinstance(new_alternatives, list) else [new_schema] + source, targets = ( + (old_values, new_values) if direction == "request" else (new_values, old_values) + ) + for index, candidate in enumerate(source): + if not any( + not _schema_breaks( + old_document, + new_document, + candidate if direction == "request" else target, + target if direction == "request" else candidate, + direction=direction, + location=location, + seen=set(seen), + ) + for target in targets + ): + return [f"{location}: union alternative {index} is no longer compatible"] + return [] + + failures: list[str] = [] + old_types = _type_set(old_schema) + new_types = _type_set(new_schema) + if direction == "request": + if old_types is None and new_types is not None: + failures.append(f"{location}: unconstrained request type became {sorted(new_types)}") + elif old_types is not None and new_types is not None and not old_types <= new_types: + failures.append( + f"{location}: request types {sorted(old_types)} are not a subset of " + f"{sorted(new_types)}" + ) + elif old_types is not None: + if new_types is None or not new_types <= old_types: + failures.append( + f"{location}: response types {sorted(new_types) if new_types else 'any'} " + f"are not a subset of {sorted(old_types)}" + ) + + old_format = old_schema.get("format") + new_format = new_schema.get("format") + if old_format != new_format: + if direction == "request" and new_format is not None: + failures.append(f"{location}: request format changed {old_format!r} -> {new_format!r}") + elif direction == "response" and old_format is not None: + failures.append(f"{location}: response format changed {old_format!r} -> {new_format!r}") + + old_enum = old_schema.get("enum") + new_enum = new_schema.get("enum") + if direction == "request": + if isinstance(new_enum, list) and ( + not isinstance(old_enum, list) or not set(old_enum).issubset(new_enum) + ): + failures.append(f"{location}: request enum removed or newly restricts values") + # Response enums are deliberately open in both generated Python clients. + # Expansion and contraction therefore do not make wire deserialization fail. + + failures.extend( + f"{location}: {message}" for message in _bound_breaks(old_schema, new_schema, direction) + ) + + old_properties = old_schema.get("properties", {}) + new_properties = new_schema.get("properties", {}) + if isinstance(old_properties, dict) and isinstance(new_properties, dict): + old_required = set(old_schema.get("required", [])) + new_required = set(new_schema.get("required", [])) + if direction == "request": + added_required = new_required - old_required + if added_required: + failures.append( + f"{location}: new required request properties {sorted(added_required)}" + ) + old_additional = _additional_policy(old_schema) + new_additional = _additional_policy(new_schema) + if old_additional is not False and new_additional is False: + failures.append(f"{location}: request additionalProperties became false") + for name, old_property in old_properties.items(): + if name in new_properties: + failures.extend( + _schema_breaks( + old_document, + new_document, + old_property, + new_properties[name], + direction=direction, + location=f"{location}.{name}", + seen=set(seen), + ) + ) + elif new_additional is False: + failures.append(f"{location}: request property {name!r} is no longer accepted") + elif isinstance(new_additional, dict): + failures.extend( + _schema_breaks( + old_document, + new_document, + old_property, + new_additional, + direction=direction, + location=f"{location}.{name}", + seen=set(seen), + ) + ) + else: + no_longer_required = old_required - new_required + if no_longer_required: + failures.append( + f"{location}: required response properties became optional " + f"{sorted(no_longer_required)}" + ) + for name, old_property in old_properties.items(): + if name not in new_properties: + failures.append(f"{location}: response property {name!r} was removed") + continue + failures.extend( + _schema_breaks( + old_document, + new_document, + old_property, + new_properties[name], + direction=direction, + location=f"{location}.{name}", + seen=set(seen), + ) + ) + # Additive response properties are safe because generated response + # models are postprocessed with Pydantic ``extra='ignore'``. + + old_items = old_schema.get("items") + new_items = new_schema.get("items") + if isinstance(old_items, dict) and isinstance(new_items, dict): + failures.extend( + _schema_breaks( + old_document, + new_document, + old_items, + new_items, + direction=direction, + location=f"{location}[]", + seen=set(seen), + ) + ) + elif isinstance(old_items, dict) != isinstance(new_items, dict): + failures.append(f"{location}: array item schema was added or removed") + return failures + + +def _parameter_map( + document: dict[str, Any], entry: dict[str, Any] +) -> dict[tuple[str, str], dict[str, Any]]: + return { + (str(item.get("in")), str(item.get("name"))): item + for item in merged_parameters(document, entry["path_item"], entry["operation"]) + } + + +def _request_body_breaks( + old_document: dict[str, Any], + new_document: dict[str, Any], + operation_id: str, + old_operation: dict[str, Any], + new_operation: dict[str, Any], +) -> list[str]: + old_body = resolve_local_ref(old_document, old_operation.get("requestBody", {})) + new_body = resolve_local_ref(new_document, new_operation.get("requestBody", {})) + old_body = old_body if isinstance(old_body, dict) else {} + new_body = new_body if isinstance(new_body, dict) else {} + failures: list[str] = [] + if not old_body.get("content"): + if new_body.get("required"): + failures.append(f"{operation_id}: added a required request body") + return failures + if not new_body.get("content"): + return [f"{operation_id}: request body was removed"] + if not old_body.get("required") and new_body.get("required"): + failures.append(f"{operation_id}: request body became required") + old_media = media_schemas(old_body.get("content")) + new_media = media_schemas(new_body.get("content")) + for media_type, old_schema in old_media.items(): + if media_type not in new_media: + failures.append(f"{operation_id}: removed request media type {media_type}") + continue + failures.extend( + _schema_breaks( + old_document, + new_document, + old_schema, + new_media[media_type], + direction="request", + location=f"{operation_id}:request[{media_type}]", + ) + ) + return failures + + +def _response_breaks( + old_document: dict[str, Any], + new_document: dict[str, Any], + operation_id: str, + old_operation: dict[str, Any], + new_operation: dict[str, Any], +) -> list[str]: + failures: list[str] = [] + old_responses = old_operation.get("responses", {}) + new_responses = new_operation.get("responses", {}) + for status, old_raw in old_responses.items(): + if status not in new_responses: + failures.append(f"{operation_id}: removed response status {status}") + continue + old_response = resolve_local_ref(old_document, old_raw) + new_response = resolve_local_ref(new_document, new_responses[status]) + old_response = old_response if isinstance(old_response, dict) else {} + new_response = new_response if isinstance(new_response, dict) else {} + old_media = media_schemas(old_response.get("content")) + new_media = media_schemas(new_response.get("content")) + for media_type, old_schema in old_media.items(): + if media_type not in new_media: + failures.append( + f"{operation_id}:{status}: removed response media type {media_type}" + ) + continue + failures.extend( + _schema_breaks( + old_document, + new_document, + old_schema, + new_media[media_type], + direction="response", + location=f"{operation_id}:response[{status},{media_type}]", + ) + ) + old_headers = old_response.get("headers", {}) + new_headers = new_response.get("headers", {}) + for name, old_header in old_headers.items(): + if name not in new_headers: + failures.append(f"{operation_id}:{status}: removed response header {name}") + continue + old_header = resolve_local_ref(old_document, old_header) + new_header = resolve_local_ref(new_document, new_headers[name]) + if isinstance(old_header, dict) and isinstance(new_header, dict): + failures.extend( + _schema_breaks( + old_document, + new_document, + old_header.get("schema", {}), + new_header.get("schema", {}), + direction="response", + location=f"{operation_id}:response[{status}].header[{name}]", + ) + ) + return failures + + +def compare_contracts( + old_document: dict[str, Any], new_document: dict[str, Any] +) -> list[str]: + """Return deterministic backward-compatibility failures.""" + + failures: list[str] = [] + old_servers = [item.get("url") for item in old_document.get("servers", []) if isinstance(item, dict)] + new_servers = [item.get("url") for item in new_document.get("servers", []) if isinstance(item, dict)] + if old_servers and old_servers != new_servers: + failures.append(f"API server URLs changed: {old_servers!r} -> {new_servers!r}") + + old_operations = operation_map(old_document) + new_operations = operation_map(new_document) + for operation_id in sorted(old_operations): + if operation_id not in new_operations: + failures.append(f"removed operationId {operation_id}") + continue + old_entry = old_operations[operation_id] + new_entry = new_operations[operation_id] + if (old_entry["method"], old_entry["path"]) != ( + new_entry["method"], + new_entry["path"], + ): + failures.append( + f"{operation_id}: route changed from {old_entry['method']} {old_entry['path']} " + f"to {new_entry['method']} {new_entry['path']}" + ) + old_operation = old_entry["operation"] + new_operation = new_entry["operation"] + if not _security_covers( + _effective_security(old_document, old_operation), + _effective_security(new_document, new_operation), + ): + failures.append(f"{operation_id}: authentication requirements became stricter") + + old_parameters = _parameter_map(old_document, old_entry) + new_parameters = _parameter_map(new_document, new_entry) + for key, old_parameter in old_parameters.items(): + if key not in new_parameters: + failures.append(f"{operation_id}: removed {key[0]} parameter {key[1]}") + continue + new_parameter = new_parameters[key] + if not old_parameter.get("required") and new_parameter.get("required"): + failures.append(f"{operation_id}: parameter {key[1]} became required") + failures.extend( + _schema_breaks( + old_document, + new_document, + old_parameter.get("schema", {}), + new_parameter.get("schema", {}), + direction="request", + location=f"{operation_id}:parameter[{key[0]},{key[1]}]", + ) + ) + for key, new_parameter in new_parameters.items(): + if key not in old_parameters and new_parameter.get("required"): + failures.append(f"{operation_id}: added required {key[0]} parameter {key[1]}") + + failures.extend( + _request_body_breaks( + old_document, new_document, operation_id, old_operation, new_operation + ) + ) + failures.extend( + _response_breaks( + old_document, new_document, operation_id, old_operation, new_operation + ) + ) + return sorted(set(failures)) + + +def _reset_matches( + reset_path: Path, + old_document: dict[str, Any], + new_document: dict[str, Any], + *, + source_commit: str, +) -> tuple[bool, str]: + if not reset_path.is_file(): + return False, "" + reset = load_document(reset_path) + required = {"format", "from_sha256", "to_sha256", "reason", "source_commit"} + if set(reset) != required: + raise ContractError( + f"{reset_path}: reset metadata keys must be exactly {sorted(required)}" + ) + if reset["format"] != 1: + raise ContractError(f"{reset_path}: unsupported reset metadata format") + string_fields = required - {"format"} + if not all(isinstance(reset[name], str) and reset[name] for name in string_fields): + raise ContractError(f"{reset_path}: reset metadata values must be non-empty strings") + matches = ( + reset["from_sha256"] == sha256_json(old_document) + and reset["to_sha256"] == sha256_json(new_document) + and reset["source_commit"] == source_commit + ) + return matches, str(reset["reason"]) + + +def main() -> None: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument( + "--base", + required=True, + help="base contract path or git object expression (for example BASE:sdk/openapi.json)", + ) + parser.add_argument("--current", type=Path, default=DEFAULT_CURRENT) + parser.add_argument("--allow-reset", type=Path, default=DEFAULT_RESET) + parser.add_argument("--provenance", type=Path, default=DEFAULT_PROVENANCE) + args = parser.parse_args() + + try: + old_document = load_source(args.base) + new_document = load_document(args.current) + provenance = load_document(args.provenance) + source_commit = provenance.get("source_commit") + if not isinstance(source_commit, str) or not source_commit: + raise ContractError(f"{args.provenance}: source_commit must be a non-empty string") + failures = compare_contracts(old_document, new_document) + if not failures: + print( + "OpenAPI compatibility gate passed: " + f"{len(operation_map(old_document))} -> {len(operation_map(new_document))} operations." + ) + return + reset_matches, reason = _reset_matches( + args.allow_reset, + old_document, + new_document, + source_commit=source_commit, + ) + if reset_matches: + print( + "OpenAPI compatibility reset matched exact reviewed contract digests: " + f"{len(operation_map(old_document))} -> {len(operation_map(new_document))} " + f"operations ({len(failures)} otherwise-breaking changes). Reason: {reason}" + ) + return + print("OpenAPI compatibility gate failed:", file=sys.stderr) + for failure in failures: + print(f"- {failure}", file=sys.stderr) + if args.allow_reset.is_file(): + print( + f"Reset metadata {args.allow_reset} does not exactly match the base/current digests.", + file=sys.stderr, + ) + raise SystemExit(1) + except (ContractError, OSError) as exc: + print(f"OpenAPI compatibility gate failed: {exc}", file=sys.stderr) + raise SystemExit(1) from exc + + +if __name__ == "__main__": + main() diff --git a/scripts/check_operation_coverage.py b/scripts/check_operation_coverage.py index a96b955..2259b43 100644 --- a/scripts/check_operation_coverage.py +++ b/scripts/check_operation_coverage.py @@ -51,7 +51,13 @@ def _contents(paths: Iterable[Path]) -> str: def _python_operations(directory: Path) -> Set[str]: content = _contents(directory.glob("*_api.py")) - names = set(re.findall(r"^ def ([A-Za-z0-9_]+)\(", content, re.MULTILINE)) + names = set( + re.findall( + r"^ (?:async )?def ([A-Za-z0-9_]+)\(", + content, + re.MULTILINE, + ) + ) return { name for name in names @@ -87,16 +93,23 @@ def _go_operations(directory: Path) -> Set[str]: def check_operation_coverage( spec_path: Path, *, - python_dir: Path, + python_sync_dir: Path, + python_async_dir: Path, typescript_dir: Path, go_dir: Path, ) -> None: operation_ids = _operation_ids(spec_path) expected = {} - for language in ("python", "typescript", "go"): + language_conventions = { + "python sync": "python", + "python async": "python", + "typescript": "typescript", + "go": "go", + } + for language, convention in language_conventions.items(): owners: Dict[str, list[str]] = {} for operation_id in operation_ids: - generated = generated_names(operation_id)[language] + generated = generated_names(operation_id)[convention] owners.setdefault(generated, []).append(operation_id) collisions = { name: sorted(ids) @@ -109,13 +122,14 @@ def check_operation_coverage( ) expected[language] = set(owners) actual = { - "python": _python_operations(python_dir), + "python sync": _python_operations(python_sync_dir), + "python async": _python_operations(python_async_dir), "typescript": _typescript_operations(typescript_dir), "go": _go_operations(go_dir), } failures = [] - for language in ("python", "typescript", "go"): + for language in language_conventions: missing = sorted(expected[language] - actual[language]) extra = sorted(actual[language] - expected[language]) if missing: @@ -132,7 +146,12 @@ def main() -> None: args = parser.parse_args() check_operation_coverage( args.spec, - python_dir=Path("sdk/python/agentdrive_sdk/api"), + python_sync_dir=Path( + "sdk/python/src/agentdrive_sdk/generated/sync/api" + ), + python_async_dir=Path( + "sdk/python/src/agentdrive_sdk/generated/async_client/api" + ), typescript_dir=Path("sdk/typescript/src/apis"), go_dir=Path("sdk/go"), ) diff --git a/scripts/check_python_generated_contract.py b/scripts/check_python_generated_contract.py new file mode 100644 index 0000000..eb0d1a9 --- /dev/null +++ b/scripts/check_python_generated_contract.py @@ -0,0 +1,85 @@ +"""Fail unless both generated Python clients exactly represent the SDK contract.""" + +from __future__ import annotations + +import argparse +import sys +from pathlib import Path + +try: + from scripts.openapi_sdk_contract import ContractError, load_document, operation_map + from scripts.python_generated_surface import ( + check_surface_against_contract, + check_sync_async_parity, + parse_surface, + public_operation_names, + ) +except ModuleNotFoundError: # direct `python scripts/...py` execution + from openapi_sdk_contract import ContractError, load_document, operation_map + from python_generated_surface import ( + check_surface_against_contract, + check_sync_async_parity, + parse_surface, + public_operation_names, + ) + +DEFAULT_CONTRACT = Path("sdk/openapi.json") +DEFAULT_SYNC_API = Path("sdk/python/src/agentdrive_sdk/generated/sync/api") +DEFAULT_ASYNC_API = Path("sdk/python/src/agentdrive_sdk/generated/async_client/api") + + +def validate_generated_contract( + contract_path: Path, + sync_api: Path, + async_api: Path, +) -> tuple[dict[str, dict], dict[str, dict]]: + document = load_document(contract_path) + operation_ids = set(operation_map(document)) + failures: list[str] = [] + + for label, api_root in (("sync", sync_api), ("async", async_api)): + if not api_root.is_dir(): + failures.append(f"{label}: generated API directory is missing: {api_root}") + continue + public = public_operation_names(api_root) + if public != operation_ids: + failures.append( + f"{label}: public operation set differs; " + f"missing={sorted(operation_ids - public)}, extra={sorted(public - operation_ids)}" + ) + if failures: + raise ContractError("\n".join(failures)) + + sync = parse_surface(sync_api, operation_ids, expected_async=False) + async_client = parse_surface(async_api, operation_ids, expected_async=True) + failures.extend(check_surface_against_contract(document, sync, label="sync")) + failures.extend(check_surface_against_contract(document, async_client, label="async")) + failures.extend(check_sync_async_parity(sync, async_client)) + if failures: + raise ContractError("\n".join(failures)) + return sync, async_client + + +def main() -> None: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--contract", type=Path, default=DEFAULT_CONTRACT) + parser.add_argument("--sync-api", type=Path, default=DEFAULT_SYNC_API) + parser.add_argument("--async-api", type=Path, default=DEFAULT_ASYNC_API) + args = parser.parse_args() + + try: + sync, _async_client = validate_generated_contract( + args.contract, args.sync_api, args.async_api + ) + except (ContractError, OSError, SyntaxError) as exc: + print(f"Generated Python contract gate failed:\n{exc}", file=sys.stderr) + raise SystemExit(1) from exc + print( + "Generated Python contract is exact: " + f"{len(sync)} operations, sync/async callable parity, parameters, request media, " + "responses, status codes, auth, and response-header transport." + ) + + +if __name__ == "__main__": + main() diff --git a/scripts/check_release_version.py b/scripts/check_release_version.py new file mode 100644 index 0000000..be627b4 --- /dev/null +++ b/scripts/check_release_version.py @@ -0,0 +1,92 @@ +"""Validate a publish request against every SDK package version.""" + +from __future__ import annotations + +import argparse +import ast +import json +import re +import sys +import tomllib +from pathlib import Path + +SEMVER = re.compile(r"(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\Z") + + +def _python_assignment(path: Path, name: str) -> str: + tree = ast.parse(path.read_text(encoding="utf-8"), filename=str(path)) + values: list[str] = [] + for node in tree.body: + if not isinstance(node, ast.Assign) or len(node.targets) != 1: + continue + target = node.targets[0] + if isinstance(target, ast.Name) and target.id == name: + value = ast.literal_eval(node.value) + if isinstance(value, str): + values.append(value) + if len(values) != 1: + raise ValueError(f"{path}: expected exactly one string assignment to {name}") + return values[0] + + +def version_values(root: Path) -> dict[str, str]: + python_project = tomllib.loads( + (root / "sdk/python/pyproject.toml").read_text(encoding="utf-8") + ) + typescript = json.loads( + (root / "sdk/typescript/package.json").read_text(encoding="utf-8") + ) + lock = json.loads( + (root / "sdk/typescript/package-lock.json").read_text(encoding="utf-8") + ) + return { + "sdk/SDK_VERSION": (root / "sdk/SDK_VERSION").read_text(encoding="utf-8").strip(), + "python project": str(python_project["project"]["version"]), + "python package": _python_assignment( + root / "sdk/python/src/agentdrive_sdk/__init__.py", "__version__" + ), + "python generated sync": _python_assignment( + root / "sdk/python/src/agentdrive_sdk/generated/sync/__init__.py", "__version__" + ), + "python generated async": _python_assignment( + root / "sdk/python/src/agentdrive_sdk/generated/async_client/__init__.py", + "__version__", + ), + "typescript package": str(typescript["version"]), + "typescript lock": str(lock["version"]), + "typescript lock root": str(lock["packages"][""]["version"]), + } + + +def check_release_version(root: Path, requested: str, *, event: str) -> str: + canonical = requested[1:] if requested.startswith("v") else requested + if event == "release" and requested != f"v{canonical}": + raise ValueError("GitHub release tags must use the exact form vX.Y.Z") + if not SEMVER.fullmatch(canonical): + raise ValueError(f"publish version must be a stable X.Y.Z value, got {requested!r}") + values = version_values(root) + mismatches = {label: value for label, value in values.items() if value != canonical} + if mismatches: + detail = ", ".join(f"{label}={value!r}" for label, value in mismatches.items()) + raise ValueError(f"publish request {canonical!r} does not match metadata: {detail}") + return canonical + + +def main() -> None: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--requested", required=True, help="release tag or dispatch version") + parser.add_argument( + "--event", choices=("release", "workflow_dispatch"), required=True + ) + parser.add_argument("--root", type=Path, default=Path(".")) + args = parser.parse_args() + try: + version = check_release_version(args.root, args.requested, event=args.event) + except (KeyError, OSError, SyntaxError, ValueError, tomllib.TOMLDecodeError) as exc: + print(f"Release version gate failed: {exc}", file=sys.stderr) + raise SystemExit(1) from exc + print(version) + + +if __name__ == "__main__": + main() diff --git a/scripts/generate-sdks.sh b/scripts/generate-sdks.sh index ea8acdf..15a6b3e 100755 --- a/scripts/generate-sdks.sh +++ b/scripts/generate-sdks.sh @@ -2,104 +2,264 @@ # Generate the Python / TypeScript / Go SDKs from the AgentDrive OpenAPI spec. # # Usage: scripts/generate-sdks.sh [path-to-openapi.json] -# Requires: Docker. The generator image is pinned below and in provenance. +# Requires: Docker and the immutable OpenAPI Generator image recorded in +# sdk/openapi-generator-image.txt. set -euo pipefail ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" SPEC_INPUT="${1:-sdk/openapi.json}" SPEC="$(python3 "$ROOT/scripts/resolve_repo_path.py" "$ROOT" "$SPEC_INPUT")" -cd "$ROOT" -VERSION="${SDK_VERSION:-0.0.1}" +SOURCE_SPEC="$ROOT/$SPEC" +VERSION_FILE="$ROOT/sdk/SDK_VERSION" +PYPROJECT="$ROOT/sdk/python/pyproject.toml" GIT_HOST="github.com" GIT_USER="Mnexa-AI" GIT_REPO="agentdrive-sdk" -OAG_IMAGE="$(tr -d '\r\n' < "$ROOT/sdk/openapi-generator-image.txt")" -if [[ -z "$OAG_IMAGE" ]]; then - echo "sdk/openapi-generator-image.txt must not be empty" >&2 +GO_MODULE="${GIT_HOST}/${GIT_USER}/${GIT_REPO}/sdk/go" + +if [[ ! -f "$VERSION_FILE" ]]; then + echo "sdk/SDK_VERSION is required" >&2 + exit 2 +fi +VERSION="$(tr -d '\r\n' < "$VERSION_FILE")" +if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+([a-zA-Z0-9.-]+)?$ ]]; then + echo "sdk/SDK_VERSION must contain one semantic version" >&2 exit 2 fi -echo "Generating SDKs from ${SPEC} with ${OAG_IMAGE} (version ${VERSION})" +python3 - "$PYPROJECT" "$ROOT/sdk/python/src/agentdrive_sdk/__init__.py" "$VERSION" <<'PY' +import ast +import sys +import tomllib +from pathlib import Path -# openapi-generator's Go templates emit invalid code for object/array `default` -# values (e.g. `var options CompileOptions = {wait=false}`). Strip those defaults -# into a sanitized spec used for generation; scalar defaults are left intact. -CLEAN_SPEC="$(dirname "$SPEC")/.openapi.codegen.json" -TYPESCRIPT_SPEC="$(dirname "$SPEC")/.openapi.codegen.typescript.json" -GO_SPEC="$(dirname "$SPEC")/.openapi.codegen.go.json" -LOCK_BACKUP="$(mktemp "${TMPDIR:-/tmp}/agentdrive-sdk-package-lock.XXXXXX")" -had_lock=false -if [[ -f "$ROOT/sdk/typescript/package-lock.json" ]]; then - cp "$ROOT/sdk/typescript/package-lock.json" "$LOCK_BACKUP" - had_lock=true +pyproject = Path(sys.argv[1]) +package_init = Path(sys.argv[2]) +expected = sys.argv[3] +actual = tomllib.loads(pyproject.read_text(encoding="utf-8"))["project"]["version"] +if actual != expected: + raise SystemExit( + f"{pyproject.relative_to(pyproject.parents[2])} version {actual!r} " + f"does not match sdk/SDK_VERSION {expected!r}" + ) + +tree = ast.parse(package_init.read_text(encoding="utf-8"), filename=str(package_init)) +versions = [ + node.value.value + for node in tree.body + if isinstance(node, ast.Assign) + and any(isinstance(target, ast.Name) and target.id == "__version__" for target in node.targets) + and isinstance(node.value, ast.Constant) + and isinstance(node.value.value, str) +] +if versions != [expected]: + raise SystemExit( + f"{package_init.relative_to(pyproject.parents[2])} must declare " + f"__version__ = {expected!r}" + ) +PY + +OAG_IMAGE="$(tr -d '\r\n' < "$ROOT/sdk/openapi-generator-image.txt")" +if [[ ! "$OAG_IMAGE" =~ ^openapitools/openapi-generator-cli:v7\.24\.0@sha256:[0-9a-f]{64}$ ]]; then + echo "sdk/openapi-generator-image.txt must pin OpenAPI Generator 7.24.0 by digest" >&2 + exit 2 fi + +GENERATION_ROOT="$(mktemp -d "${TMPDIR:-/tmp}/agentdrive-sdk-generation.XXXXXX")" cleanup() { - if [[ "$had_lock" = true && -f "$LOCK_BACKUP" ]]; then - mkdir -p "$ROOT/sdk/typescript" - cp "$LOCK_BACKUP" "$ROOT/sdk/typescript/package-lock.json" - fi - rm -f \ - "$ROOT/$CLEAN_SPEC" \ - "$ROOT/$TYPESCRIPT_SPEC" \ - "$ROOT/$GO_SPEC" \ - "$LOCK_BACKUP" + rm -rf "$GENERATION_ROOT" } trap cleanup EXIT +COMMON_SPEC="$GENERATION_ROOT/openapi.common.json" +TYPESCRIPT_SPEC="$GENERATION_ROOT/openapi.typescript.json" +GO_SPEC="$GENERATION_ROOT/openapi.go.json" + python3 "$ROOT/scripts/prepare_codegen_contract.py" \ - "$ROOT/$SPEC" "$ROOT/$CLEAN_SPEC" + "$SOURCE_SPEC" "$COMMON_SPEC" python3 "$ROOT/scripts/prepare_codegen_contract.py" \ - "$ROOT/$SPEC" "$ROOT/$TYPESCRIPT_SPEC" --language typescript + "$SOURCE_SPEC" "$TYPESCRIPT_SPEC" --language typescript python3 "$ROOT/scripts/prepare_codegen_contract.py" \ - "$ROOT/$SPEC" "$ROOT/$GO_SPEC" --language go -SPEC="$CLEAN_SPEC" -echo "Sanitized spec -> ${SPEC}" - -# openapi-generator does not delete files for operations that no longer exist; -# wipe the generated dirs first so dropped endpoints (e.g. /internal/*) don't -# linger as stale clients. -# Verify Docker and the pinned image before deleting the recoverable generated -# tree, so a missing daemon or failed image pull leaves the worktree untouched. + "$SOURCE_SPEC" "$GO_SPEC" --language go + +echo "Generating SDKs from ${SPEC} with ${OAG_IMAGE} (version ${VERSION})" + +# Verify Docker and fetch the pinned image before touching committed output. docker info >/dev/null docker image inspect "$OAG_IMAGE" >/dev/null 2>&1 || docker pull "$OAG_IMAGE" -rm -rf "$ROOT/sdk/python" "$ROOT/sdk/typescript" "$ROOT/sdk/go" generate() { docker run --rm \ --user "$(id -u):$(id -g)" \ - --volume "$ROOT:/local" \ + --volume "$ROOT:/local:ro" \ + --volume "$GENERATION_ROOT:/generated" \ --workdir /local \ "$OAG_IMAGE" generate "$@" } -# --- Python -> package: agentdrive_sdk, PyPI dist: agentdrive-sdk --- -generate -i "/local/$SPEC" -g python -o /local/sdk/python \ - --additional-properties=packageName=agentdrive_sdk,projectName=agentdrive-sdk,packageVersion="${VERSION}",library=urllib3,hideGenerationTimestamp=true \ +PYTHON_GLOBAL_PROPERTIES="apiTests=false,modelTests=false,apiDocs=false,modelDocs=false" + +# Python's generated core has two deliberately separate implementations. The +# handwritten package lives outside these leaf directories and is never +# replaced by generation. +generate -i /generated/openapi.common.json -g python -o /generated/python-sync \ + --global-property="$PYTHON_GLOBAL_PROPERTIES" \ + --additional-properties=packageName=agentdrive_sdk.generated.sync,projectName=agentdrive-sdk,packageVersion="${VERSION}",library=urllib3,hideGenerationTimestamp=true \ --git-host="$GIT_HOST" --git-user-id="$GIT_USER" --git-repo-id="$GIT_REPO" -# --- TypeScript (fetch-based: works in browser + Node, no axios dep) -> npm: @mnexa-ai/agentdrive-sdk --- -generate -i "/local/$TYPESCRIPT_SPEC" -g typescript-fetch -o /local/sdk/typescript \ +generate -i /generated/openapi.common.json -g python -o /generated/python-async \ + --global-property="$PYTHON_GLOBAL_PROPERTIES" \ + --additional-properties=packageName=agentdrive_sdk.generated.async_client,projectName=agentdrive-sdk,packageVersion="${VERSION}",library=httpx,supportHttpxSync=false,hideGenerationTimestamp=true \ + --git-host="$GIT_HOST" --git-user-id="$GIT_USER" --git-repo-id="$GIT_REPO" + +# TypeScript remains fetch-based for browser and Node compatibility. +generate -i /generated/openapi.typescript.json -g typescript-fetch \ + -o /generated/typescript \ --additional-properties=npmName=@mnexa-ai/agentdrive-sdk,npmVersion="${VERSION}",supportsES6=true,typescriptThreePlus=true,hideGenerationTimestamp=true \ --git-host="$GIT_HOST" --git-user-id="$GIT_USER" --git-repo-id="$GIT_REPO" -# --- Go -> module: github.com/Mnexa-AI/agentdrive-sdk/sdk/go --- -generate -i "/local/$GO_SPEC" -g go -o /local/sdk/go \ +# Go remains a submodule at sdk/go. +generate -i /generated/openapi.go.json -g go -o /generated/go \ --additional-properties=packageName=agentdrive,isGoSubmodule=true,enumClassPrefix=true,hideGenerationTimestamp=true \ --git-host="$GIT_HOST" --git-user-id="$GIT_USER" --git-repo-id="$GIT_REPO" -# The generator's Go test stubs import `/` even though this -# repository intentionally publishes the module at `sdk/go`. They contain -# only skipped placeholder calls and are not contract tests; remove them and -# compile/test the actual module with `go test ./...`. -rm -rf "$ROOT/sdk/go/test" +SYNC_SOURCE="$GENERATION_ROOT/python-sync/agentdrive_sdk/generated/sync" +ASYNC_SOURCE="$GENERATION_ROOT/python-async/agentdrive_sdk/generated/async_client" +for generated_python in "$SYNC_SOURCE" "$ASYNC_SOURCE"; do + if [[ ! -f "$generated_python/api_client.py" ]]; then + echo "OpenAPI Generator did not create expected Python source: $generated_python" >&2 + exit 2 + fi +done + +# Redirects are credential-boundary events. Keep both generated transports from +# following them automatically; Phase 2 will follow signed storage URLs without +# forwarding AgentDrive authorization. +python3 "$ROOT/scripts/patch_python_transports.py" \ + "$SYNC_SOURCE/rest.py" "$ASYNC_SOURCE/rest.py" +python3 "$ROOT/scripts/postprocess_python_models.py" \ + --contract "$SOURCE_SPEC" \ + --models-dir "$SYNC_SOURCE/models" \ + --models-dir "$ASYNC_SOURCE/models" + +# OpenAPI Generator's Go test stubs import the wrong module location and contain +# only skipped placeholder calls. Compile the actual generated module instead. +rm -rf "$GENERATION_ROOT/go/test" +sed -i.bak "1s|^module .*|module ${GO_MODULE}|" "$GENERATION_ROOT/go/go.mod" +rm -f "$GENERATION_ROOT/go/go.mod.bak" + +# OpenAPI Generator does not create a lockfile. Preserve the reviewed npm lock +# while replacing the rest of the TypeScript output. +if [[ -f "$ROOT/sdk/typescript/package-lock.json" ]]; then + cp "$ROOT/sdk/typescript/package-lock.json" \ + "$GENERATION_ROOT/typescript/package-lock.json" + python3 - "$GENERATION_ROOT/typescript/package-lock.json" "$VERSION" <<'PY' +import json +import sys +from pathlib import Path + +path = Path(sys.argv[1]) +version = sys.argv[2] +document = json.loads(path.read_text(encoding="utf-8")) +document["version"] = version +document["packages"][""]["version"] = version +path.write_text(json.dumps(document, indent=2) + "\n", encoding="utf-8") +PY +fi + +python3 - \ + "$VERSION" \ + "$SYNC_SOURCE/__init__.py" \ + "$ASYNC_SOURCE/__init__.py" \ + "$GENERATION_ROOT/typescript/package.json" \ + "$GENERATION_ROOT/typescript/package-lock.json" <<'PY' +import ast +import json +import sys +from pathlib import Path + +expected = sys.argv[1] +for raw in sys.argv[2:4]: + path = Path(raw) + tree = ast.parse(path.read_text(encoding="utf-8"), filename=str(path)) + versions = [ + node.value.value + for node in tree.body + if isinstance(node, ast.Assign) + and any( + isinstance(target, ast.Name) and target.id == "__version__" + for target in node.targets + ) + and isinstance(node.value, ast.Constant) + and isinstance(node.value.value, str) + ] + if versions != [expected]: + raise SystemExit(f"generated package version drift in {path}") + +package = json.loads(Path(sys.argv[4]).read_text(encoding="utf-8")) +lock = json.loads(Path(sys.argv[5]).read_text(encoding="utf-8")) +actual = { + package["version"], + lock["version"], + lock["packages"][""]["version"], +} +if actual != {expected}: + raise SystemExit(f"TypeScript package version drift: {sorted(actual)}") +PY -# The module must be importable at its location in the monorepo so that -# `go get github.com/Mnexa-AI/agentdrive-sdk/sdk/go@` resolves. Version -# tags for this submodule are `sdk/go/vX.Y.Z` (see publish.yml). -GO_MODULE="${GIT_HOST}/${GIT_USER}/${GIT_REPO}/sdk/go" -sed -i.bak "1s|^module .*|module ${GO_MODULE}|" "$ROOT/sdk/go/go.mod" -rm -f "$ROOT/sdk/go/go.mod.bak" python3 "$ROOT/scripts/normalize_generated_text.py" \ - "$ROOT/sdk/python" "$ROOT/sdk/typescript" "$ROOT/sdk/go" + "$SYNC_SOURCE" \ + "$ASYNC_SOURCE" \ + "$GENERATION_ROOT/typescript" \ + "$GENERATION_ROOT/go" + +# Generation succeeded completely. Replace only generated output from here on. +PYTHON_PACKAGE="$ROOT/sdk/python/src/agentdrive_sdk" +PYTHON_GENERATED="$PYTHON_PACKAGE/generated" +mkdir -p "$PYTHON_GENERATED" +rm -rf "$PYTHON_GENERATED/sync" "$PYTHON_GENERATED/async_client" +cp -a "$SYNC_SOURCE" "$PYTHON_GENERATED/sync" +cp -a "$ASYNC_SOURCE" "$PYTHON_GENERATED/async_client" + +# Remove the legacy all-generated Python package layout. These exact paths are +# intentionally narrower than sdk/python so README, packaging, and tests remain. +rm -rf \ + "$ROOT/sdk/python/agentdrive_sdk" \ + "$ROOT/sdk/python/docs" \ + "$ROOT/sdk/python/test" \ + "$ROOT/sdk/python/.github" \ + "$ROOT/sdk/python/.openapi-generator" +rm -f \ + "$ROOT/sdk/python/.gitignore" \ + "$ROOT/sdk/python/.gitlab-ci.yml" \ + "$ROOT/sdk/python/.openapi-generator-ignore" \ + "$ROOT/sdk/python/.travis.yml" \ + "$ROOT/sdk/python/git_push.sh" \ + "$ROOT/sdk/python/requirements.txt" \ + "$ROOT/sdk/python/setup.cfg" \ + "$ROOT/sdk/python/setup.py" \ + "$ROOT/sdk/python/test-requirements.txt" \ + "$ROOT/sdk/python/tox.ini" + +rm -rf "$ROOT/sdk/typescript" "$ROOT/sdk/go" +cp -a "$GENERATION_ROOT/typescript" "$ROOT/sdk/typescript" +cp -a "$GENERATION_ROOT/go" "$ROOT/sdk/go" + +# The exact Python reference and review manifest are generated artifacts too. +# Keep them in the same one-command pipeline as the clients so an API change +# cannot regenerate code while leaving either representation stale. +python3 "$ROOT/scripts/generate_python_contract_manifest.py" \ + --contract "$SOURCE_SPEC" \ + --sync-root "$PYTHON_GENERATED/sync" \ + --async-root "$PYTHON_GENERATED/async_client" \ + --output "$ROOT/sdk/python/generated-contract-shape.json" +python3 "$ROOT/scripts/generate_python_api_reference.py" \ + --contract "$SOURCE_SPEC" \ + --provenance "$ROOT/sdk/openapi.provenance.json" \ + --sync-api "$PYTHON_GENERATED/sync/api" \ + --async-api "$PYTHON_GENERATED/async_client/api" \ + --output "$ROOT/docs/python-sdk-api-reference.md" -echo "Done. SDKs written to sdk/{python,typescript,go}." +echo "Done. Generated Python core -> sdk/python/src/agentdrive_sdk/generated/{sync,async_client}." +echo "TypeScript and Go -> sdk/{typescript,go}." +echo "Python contract manifest/reference -> sdk/python/generated-contract-shape.json and docs/python-sdk-api-reference.md." diff --git a/scripts/generate_python_api_reference.py b/scripts/generate_python_api_reference.py new file mode 100644 index 0000000..42984b0 --- /dev/null +++ b/scripts/generate_python_api_reference.py @@ -0,0 +1,422 @@ +"""Render/check the deterministic Python generated-core API reference.""" + +from __future__ import annotations + +import argparse +import difflib +import sys +from pathlib import Path +from typing import Any + +try: + from scripts.check_python_generated_contract import validate_generated_contract + from scripts.openapi_sdk_contract import ( + iter_operations, + load_document, + media_schemas, + merged_parameters, + ref_name, + resolve_local_ref, + schema_label, + sha256_json, + ) +except ModuleNotFoundError: # direct `python scripts/...py` execution + from check_python_generated_contract import validate_generated_contract + from openapi_sdk_contract import ( + iter_operations, + load_document, + media_schemas, + merged_parameters, + ref_name, + resolve_local_ref, + schema_label, + sha256_json, + ) + +DEFAULT_CONTRACT = Path("sdk/openapi.json") +DEFAULT_PROVENANCE = Path("sdk/openapi.provenance.json") +DEFAULT_OUTPUT = Path("docs/python-sdk-api-reference.md") +DEFAULT_SYNC_API = Path("sdk/python/src/agentdrive_sdk/generated/sync/api") +DEFAULT_ASYNC_API = Path("sdk/python/src/agentdrive_sdk/generated/async_client/api") + + +def _text(value: Any) -> str: + return " ".join(str(value or "").split()) + + +def _cell(value: Any) -> str: + return _text(value).replace("|", "\\|").replace("`", "\\`") or "—" + + +def _anchor(name: str) -> str: + return "model-" + "".join(char.lower() if char.isalnum() else "-" for char in name).strip("-") + + +def _inline_anchor(schema: Any) -> str: + label = schema_label(schema) + slug = "".join(char.lower() if char.isalnum() else "-" for char in label).strip("-") + return f"inline-schema-{slug}" + + +def _schema(schema: Any, *, link_inline: bool = True) -> str: + name = ref_name(schema) + if name: + return f"[`{name}`](#{_anchor(name)})" + if not isinstance(schema, dict): + return "`none`" + if isinstance(schema.get("anyOf"), list): + return " or ".join(_schema(item, link_inline=link_inline) for item in schema["anyOf"]) + if isinstance(schema.get("oneOf"), list): + return "one of: " + ", ".join( + _schema(item, link_inline=link_inline) for item in schema["oneOf"] + ) + if isinstance(schema.get("allOf"), list): + return "all of: " + ", ".join( + _schema(item, link_inline=link_inline) for item in schema["allOf"] + ) + if schema.get("type") == "array": + return f"`array` of {_schema(schema.get('items', {}), link_inline=link_inline)}" + label = schema_label(schema) + if link_inline and (schema.get("type") == "object" or "properties" in schema): + return f"[`{_cell(label)}`](#{_inline_anchor(schema)})" + return f"`{_cell(label)}`" + + +def _schema_children(schema: Any) -> list[dict[str, Any]]: + if not isinstance(schema, dict): + return [] + children: list[dict[str, Any]] = [] + properties = schema.get("properties", {}) + if isinstance(properties, dict): + children.extend(item for item in properties.values() if isinstance(item, dict)) + items = schema.get("items") + if isinstance(items, dict): + children.append(items) + additional = schema.get("additionalProperties") + if isinstance(additional, dict): + children.append(additional) + for keyword in ("allOf", "anyOf", "oneOf", "prefixItems"): + alternatives = schema.get(keyword, []) + if isinstance(alternatives, list): + children.extend(item for item in alternatives if isinstance(item, dict)) + return children + + +def _inline_schemas(contract: dict[str, Any]) -> dict[str, dict[str, Any]]: + """Collect every anonymous object schema reachable from the public contract.""" + + result: dict[str, dict[str, Any]] = {} + + def visit(schema: Any) -> None: + if not isinstance(schema, dict) or ref_name(schema): + return + if schema.get("type") == "object" or "properties" in schema: + result.setdefault(schema_label(schema), schema) + for child in _schema_children(schema): + visit(child) + + schemas = contract.get("components", {}).get("schemas", {}) + if isinstance(schemas, dict): + for schema in schemas.values(): + # The named component itself is rendered under Models. Its anonymous + # nested objects still need their own linkable definition. + for child in _schema_children(schema): + visit(child) + + for _path, _method, path_item, operation in iter_operations(contract): + for parameter in merged_parameters(contract, path_item, operation): + visit(parameter.get("schema", {})) + request_body = resolve_local_ref(contract, operation.get("requestBody", {})) + if isinstance(request_body, dict): + for schema in media_schemas(request_body.get("content", {})).values(): + visit(schema) + for raw_response in operation.get("responses", {}).values(): + response = resolve_local_ref(contract, raw_response) + if isinstance(response, dict): + for schema in media_schemas(response.get("content", {})).values(): + visit(schema) + return result + + +def _append_object_fields(lines: list[str], schema: dict[str, Any]) -> None: + properties = schema.get("properties", {}) + required = set(schema.get("required", [])) + if isinstance(properties, dict) and properties: + lines.extend( + [ + "| Field | Required | Schema | Description |", + "|---|:---:|---|---|", + ] + ) + for property_name, property_schema in sorted(properties.items()): + lines.append( + "| `{}` | {} | {} | {} |".format( + _cell(property_name), + "yes" if property_name in required else "no", + _schema(property_schema), + _cell( + property_schema.get("description") + if isinstance(property_schema, dict) + else "" + ), + ) + ) + lines.append("") + else: + lines.extend([f"Schema type: {_schema(schema, link_inline=False)}", ""]) + + if "additionalProperties" in schema: + additional = schema["additionalProperties"] + if additional is True: + detail = "allowed (any JSON value)" + elif additional is False: + detail = "not allowed" + else: + detail = f"allowed values matching {_schema(additional)}" + lines.extend([f"Additional properties: {detail}.", ""]) + + +def _response_sort_key(value: str) -> tuple[int, str]: + return (int(value), value) if value.isdigit() else (10_000, value) + + +def render_reference( + contract: dict[str, Any], + sync_surface: dict[str, dict[str, Any]], + async_surface: dict[str, dict[str, Any]], + provenance: dict[str, Any] | None = None, +) -> str: + operations = list(iter_operations(contract)) + authenticated = sum(bool(operation.get("security")) for *_, operation in operations) + lines = [ + "", + "# AgentDrive Python generated-core API reference", + "", + "This reference describes the exact OpenAPI wire surface wrapped by both the", + "synchronous and asynchronous generated Python cores. The ergonomic SDK facade", + "is documented separately. Callable signatures and docstrings below are parsed", + "from the committed generated source; the reference check fails if either client", + "is absent or drifts from the contract.", + "", + f"- Contract SHA-256: `{sha256_json(contract)}`", + f"- Operations: **{len(operations)}** ({authenticated} bearer-authenticated, " + f"{len(operations) - authenticated} anonymous)", + ] + if provenance: + lines.extend( + [ + f"- AgentDrive source commit: `{_text(provenance.get('source_commit'))}`", + f"- Generator image: `{_text(provenance.get('generator_image'))}`", + ] + ) + lines.extend(["", "## Operations", ""]) + + grouped: dict[str, list[tuple[str, str, dict[str, Any], dict[str, Any]]]] = {} + for item in operations: + operation = item[3] + tag = str((operation.get("tags") or ["default"])[0]) + grouped.setdefault(tag, []).append(item) + + for tag in sorted(grouped): + lines.extend([f"### {tag}", ""]) + for path, method, path_item, operation in sorted( + grouped[tag], key=lambda item: (item[0], item[1], item[3]["operationId"]) + ): + operation_id = operation["operationId"] + lines.extend( + [ + f"#### `{operation_id}`", + "", + f"`{method.upper()} {path}` — {_text(operation.get('summary')) or operation_id}", + "", + f"Authentication: **{'bearer token' if operation.get('security') else 'anonymous'}**.", + "", + ] + ) + description = _text(operation.get("description")) + if description: + lines.extend([description, ""]) + + sync = sync_surface[operation_id] + async_client = async_surface[operation_id] + lines.extend( + [ + f"Generated API class: `{sync['api_class']}`", + "", + "Synchronous callables:", + "", + "```python", + sync["primary"].signature, + sync["with_http_info"].signature, + sync["without_preload_content"].signature, + "```", + "", + "Asynchronous callables:", + "", + "```python", + async_client["primary"].signature, + async_client["with_http_info"].signature, + async_client["without_preload_content"].signature, + "```", + "", + "Generated docstring:", + "", + "```text", + sync["primary"].docstring or "(empty)", + "```", + "", + ] + ) + + parameters = merged_parameters(contract, path_item, operation) + if parameters: + lines.extend( + [ + "Request parameters:", + "", + "| Wire name | In | Required | Schema | Description |", + "|---|---|:---:|---|---|", + ] + ) + for parameter in parameters: + lines.append( + "| `{}` | `{}` | {} | {} | {} |".format( + _cell(parameter.get("name")), + _cell(parameter.get("in")), + "yes" if parameter.get("required") else "no", + _schema(parameter.get("schema", {})), + _cell(parameter.get("description")), + ) + ) + lines.append("") + + raw_body = resolve_local_ref(contract, operation.get("requestBody", {})) + if isinstance(raw_body, dict) and raw_body.get("content"): + lines.extend( + [ + f"Request body ({'required' if raw_body.get('required') else 'optional'}):", + "", + "| Content type | Schema |", + "|---|---|", + ] + ) + for media_type, schema in sorted(media_schemas(raw_body["content"]).items()): + lines.append(f"| `{_cell(media_type)}` | {_schema(schema)} |") + lines.append("") + + lines.extend( + [ + "Responses:", + "", + "| Status | Content | OpenAPI schema | Generated Python type | Headers |", + "|---:|---|---|---|---|", + ] + ) + for status, raw_response in sorted( + operation.get("responses", {}).items(), key=lambda item: _response_sort_key(item[0]) + ): + response = resolve_local_ref(contract, raw_response) + if not isinstance(response, dict): + response = {} + media = media_schemas(response.get("content", {})) + content_types = ", ".join(f"`{_cell(item)}`" for item in sorted(media)) or "—" + schemas = ", ".join(_schema(media[item]) for item in sorted(media)) or "—" + generated_type = sync["response_types"].get(str(status)) + generated = f"`{_cell(generated_type)}`" if generated_type else "—" + headers = ", ".join(f"`{_cell(item)}`" for item in sorted(response.get("headers", {}))) or "—" + lines.append( + f"| `{_cell(status)}` | {content_types} | {schemas} | {generated} | {headers} |" + ) + lines.append("") + + lines.extend(["## Models", ""]) + schemas = contract.get("components", {}).get("schemas", {}) + for name in sorted(schemas): + schema = schemas[name] + if not isinstance(schema, dict): + continue + lines.extend([f"### {name}", f"", ""]) + description = _text(schema.get("description")) + if description: + lines.extend([description, ""]) + _append_object_fields(lines, schema) + + inline_schemas = _inline_schemas(contract) + lines.extend( + [ + "## Anonymous and inline schemas", + "", + "OpenAPI permits request and response objects without a component name.", + "The generated clients assign Python class names to some of these objects;", + "the response tables show those generated names, while this section records", + "their exact wire fields directly from the authoritative contract.", + "", + ] + ) + for label, schema in sorted(inline_schemas.items()): + lines.extend( + [ + f"### `{label}`", + f'', + "", + ] + ) + description = _text(schema.get("description")) + if description: + lines.extend([description, ""]) + _append_object_fields(lines, schema) + return "\n".join(lines).rstrip() + "\n" + + +def check_output(path: Path, expected: str) -> bool: + try: + actual = path.read_text(encoding="utf-8") + except FileNotFoundError: + print(f"generated API reference is missing: {path}", file=sys.stderr) + return False + if actual == expected: + print(f"Generated Python API reference is current: {path}") + return True + diff = difflib.unified_diff( + actual.splitlines(), + expected.splitlines(), + fromfile=str(path), + tofile=f"{path} (regenerated)", + lineterm="", + ) + print("\n".join(diff), file=sys.stderr) + print( + "Run `python3 scripts/generate_python_api_reference.py` and commit the result.", + file=sys.stderr, + ) + return False + + +def main() -> None: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--contract", type=Path, default=DEFAULT_CONTRACT) + parser.add_argument("--provenance", type=Path, default=DEFAULT_PROVENANCE) + parser.add_argument("--output", type=Path, default=DEFAULT_OUTPUT) + parser.add_argument("--sync-api", type=Path, default=DEFAULT_SYNC_API) + parser.add_argument("--async-api", type=Path, default=DEFAULT_ASYNC_API) + parser.add_argument("--check", action="store_true") + args = parser.parse_args() + + contract = load_document(args.contract) + provenance = load_document(args.provenance) if args.provenance.exists() else None + sync_surface, async_surface = validate_generated_contract( + args.contract, args.sync_api, args.async_api + ) + rendered = render_reference(contract, sync_surface, async_surface, provenance) + if args.check: + raise SystemExit(0 if check_output(args.output, rendered) else 1) + args.output.parent.mkdir(parents=True, exist_ok=True) + args.output.write_text(rendered, encoding="utf-8") + print( + f"Rendered {args.output} from {args.contract} " + f"({len(list(iter_operations(contract)))} operations)." + ) + + +if __name__ == "__main__": + main() diff --git a/scripts/generate_python_contract_manifest.py b/scripts/generate_python_contract_manifest.py new file mode 100644 index 0000000..d6f9ef2 --- /dev/null +++ b/scripts/generate_python_contract_manifest.py @@ -0,0 +1,396 @@ +"""Render/check the exact OpenAPI-to-generated-Python shape manifest.""" + +from __future__ import annotations + +import argparse +import ast +import difflib +import json +import sys +from pathlib import Path +from typing import Any + +try: + from scripts.check_python_generated_contract import validate_generated_contract + from scripts.openapi_sdk_contract import ( + iter_operations, + load_document, + merged_parameters, + python_name, + resolve_local_ref, + sha256_json, + shape_schema, + ) +except ModuleNotFoundError: # direct `python scripts/...py` execution + from check_python_generated_contract import validate_generated_contract + from openapi_sdk_contract import ( + iter_operations, + load_document, + merged_parameters, + python_name, + resolve_local_ref, + sha256_json, + shape_schema, + ) + +DEFAULT_CONTRACT = Path("sdk/openapi.json") +DEFAULT_SYNC_ROOT = Path("sdk/python/src/agentdrive_sdk/generated/sync") +DEFAULT_ASYNC_ROOT = Path("sdk/python/src/agentdrive_sdk/generated/async_client") +DEFAULT_OUTPUT = Path("sdk/python/generated-contract-shape.json") + + +def _field_shape(node: ast.AnnAssign) -> dict[str, Any]: + required = node.value is None + if isinstance(node.value, ast.Call): + function = node.value.func + is_field = (isinstance(function, ast.Name) and function.id == "Field") or ( + isinstance(function, ast.Attribute) and function.attr == "Field" + ) + has_default = bool(node.value.args) or any( + item.arg in {"default", "default_factory"} for item in node.value.keywords + ) + if is_field and not has_default: + required = True + return { + "annotation": ast.unparse(node.annotation), + "default": ast.unparse(node.value) if node.value is not None else None, + "required": required, + } + + +def _annotation_nullable(annotation: str) -> bool: + tree = ast.parse(annotation, mode="eval") + return any( + (isinstance(node, ast.Name) and node.id in {"Optional", "None"}) + or (isinstance(node, ast.Constant) and node.value is None) + for node in ast.walk(tree) + ) + + +def _schema_nullable(schema: Any) -> bool: + if not isinstance(schema, dict): + return False + if schema.get("nullable") is True: + return True + schema_type = schema.get("type") + if isinstance(schema_type, list) and "null" in schema_type: + return True + return any( + isinstance(item, dict) and item.get("type") == "null" + for keyword in ("anyOf", "oneOf") + for item in schema.get(keyword, []) + ) + + +def _check_component_models( + document: dict[str, Any], models: dict[str, Any], *, label: str +) -> None: + failures: list[str] = [] + schemas = document.get("components", {}).get("schemas", {}) + for model_name, schema in sorted(schemas.items()): + if not isinstance(schema, dict) or not isinstance(schema.get("properties"), dict): + continue + model = models.get(model_name) + if model is None: + failures.append(f"{label}: missing component model {model_name}") + continue + properties = schema["properties"] + expected_fields = {python_name(name) for name in properties} + actual_fields = set(model["fields"]) + if actual_fields != expected_fields: + failures.append( + f"{label}:{model_name}: property set differs; " + f"missing={sorted(expected_fields - actual_fields)}, " + f"extra={sorted(actual_fields - expected_fields)}" + ) + required = set(schema.get("required", [])) + for wire_name, property_schema in properties.items(): + field_name = python_name(wire_name) + field = model["fields"].get(field_name) + if field is None: + continue + expected_required = wire_name in required + if field["required"] != expected_required: + failures.append( + f"{label}:{model_name}.{wire_name}: requiredness " + f"{field['required']} != {expected_required}" + ) + expected_nullable = _schema_nullable(property_schema) + actual_nullable = _annotation_nullable(field["annotation"]) + if actual_nullable != expected_nullable: + failures.append( + f"{label}:{model_name}.{wire_name}: nullable annotation " + f"{actual_nullable} != {expected_nullable}" + ) + if failures: + raise ValueError("\n".join(failures)) + + +def _model_manifest(models_root: Path) -> dict[str, Any]: + result: dict[str, Any] = {} + for path in sorted(models_root.glob("*.py")): + if path.name == "__init__.py": + continue + tree = ast.parse(path.read_text(encoding="utf-8"), filename=str(path)) + classes = [node for node in tree.body if isinstance(node, ast.ClassDef)] + if len(classes) != 1: + continue + class_node = classes[0] + fields = { + node.target.id: _field_shape(node) + for node in class_node.body + if isinstance(node, ast.AnnAssign) + and isinstance(node.target, ast.Name) + and not node.target.id.startswith("__") + } + validators = { + node.name: sha256_json(ast.dump(node, include_attributes=False)) + for node in class_node.body + if isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef)) + and node.decorator_list + } + result[class_node.name] = { + "class_ast_sha256": sha256_json(ast.dump(class_node, include_attributes=False)), + "fields": fields, + "validators": validators, + } + return result + + +def _headers_transport(package_root: Path) -> dict[str, Any]: + response_path = package_root / "api_response.py" + client_path = package_root / "api_client.py" + response_tree = ast.parse( + response_path.read_text(encoding="utf-8"), filename=str(response_path) + ) + headers_annotations = [ + ast.unparse(node.annotation) + for node in ast.walk(response_tree) + if isinstance(node, ast.AnnAssign) + and isinstance(node.target, ast.Name) + and node.target.id == "headers" + ] + client_tree = ast.parse(client_path.read_text(encoding="utf-8"), filename=str(client_path)) + forwarded = False + for node in ast.walk(client_tree): + if not isinstance(node, ast.Call): + continue + if not isinstance(node.func, ast.Name) or node.func.id != "ApiResponse": + continue + for keyword in node.keywords: + if keyword.arg == "headers" and ast.unparse(keyword.value) == "response_data.headers": + forwarded = True + return { + "api_response_headers_annotation": headers_annotations, + "response_deserialize_forwards_all_headers": forwarded, + } + + +def _function_manifest(item: Any) -> dict[str, Any]: + return { + "docstring_sha256": sha256_json(item.docstring), + "parameters": list(item.parameters), + "return": item.returns, + "signature": item.signature, + } + + +def _surface_manifest(surface: dict[str, dict[str, Any]]) -> dict[str, Any]: + result: dict[str, Any] = {} + for operation_id, value in sorted(surface.items()): + full_shape = { + "api_class": value["api_class"], + "primary": _function_manifest(value["primary"]), + "with_http_info": _function_manifest(value["with_http_info"]), + "without_preload_content": _function_manifest(value["without_preload_content"]), + "serializer": value["serialize"], + "response_types": value["response_types"], + } + result[operation_id] = { + "api_class": value["api_class"], + "primary_signature": value["primary"].signature, + "surface_sha256": sha256_json(full_shape), + } + return result + + +def _contract_operation_shape( + document: dict[str, Any], + path: str, + method: str, + path_item: dict[str, Any], + operation: dict[str, Any], +) -> dict[str, Any]: + parameter_shapes = [] + for parameter in merged_parameters(document, path_item, operation): + full_parameter = shape_schema( + { + key: value + for key, value in parameter.items() + if key + in { + "name", + "in", + "required", + "deprecated", + "style", + "explode", + "allowEmptyValue", + "allowReserved", + "schema", + "content", + } + } + ) + parameter_shapes.append( + { + "in": parameter.get("in"), + "name": parameter.get("name"), + "required": bool(parameter.get("required")), + "shape_sha256": sha256_json(full_parameter), + } + ) + request_body = resolve_local_ref(document, operation.get("requestBody", {})) + request_shape = shape_schema(request_body) + responses: dict[str, Any] = {} + for status, raw_response in sorted(operation.get("responses", {}).items()): + response = resolve_local_ref(document, raw_response) + response = response if isinstance(response, dict) else {} + responses[str(status)] = { + "content": { + media_type: sha256_json(shape_schema(media.get("schema", {}))) + for media_type, media in sorted(response.get("content", {}).items()) + if isinstance(media, dict) + }, + "headers": { + name: sha256_json(shape_schema(resolve_local_ref(document, header))) + for name, header in sorted(response.get("headers", {}).items()) + }, + "shape_sha256": sha256_json(shape_schema(response)), + } + full_operation = shape_schema(operation) + return { + "method": method.upper(), + "path": path, + "operation_shape_sha256": sha256_json(full_operation), + "parameters": parameter_shapes, + "request_body": { + "required": bool(request_body.get("required")) + if isinstance(request_body, dict) + else False, + "shape_sha256": sha256_json(request_shape), + }, + # Each response entry retains its exact status, media schemas, and + # header names/schemas. Generated clients preserve those headers via + # the generic ApiResponse.headers carrier recorded alongside this map. + "responses": responses, + } + + +def build_manifest( + contract_path: Path, + sync_root: Path, + async_root: Path, +) -> dict[str, Any]: + document = load_document(contract_path) + sync, async_client = validate_generated_contract( + contract_path, sync_root / "api", async_root / "api" + ) + sync_models = _model_manifest(sync_root / "models") + async_models = _model_manifest(async_root / "models") + if sync_models != async_models: + raise ValueError("sync/async generated model AST shapes differ") + _check_component_models(document, sync_models, label="sync") + _check_component_models(document, async_models, label="async") + header_transport = { + "sync": _headers_transport(sync_root), + "async": _headers_transport(async_root), + } + if not all( + value["api_response_headers_annotation"] + and value["response_deserialize_forwards_all_headers"] + for value in header_transport.values() + ): + raise ValueError("generated response transport does not preserve raw response headers") + operations = { + operation["operationId"]: _contract_operation_shape( + document, path, method, path_item, operation + ) + for path, method, path_item, operation in iter_operations(document) + } + raw_schemas = document.get("components", {}).get("schemas", {}) + schemas = { + name: sha256_json(shape_schema(schema)) for name, schema in sorted(raw_schemas.items()) + } + full_contract_shape = {"operations": operations, "schemas": shape_schema(raw_schemas)} + return { + "format": 1, + "contract_sha256": sha256_json(document), + "contract": { + "operations": dict(sorted(operations.items())), + "schemas": schemas, + "shape_sha256": sha256_json(full_contract_shape), + }, + "generated": { + "models": sync_models, + "sync_operations": _surface_manifest(sync), + "async_operations": _surface_manifest(async_client), + "response_header_transport": header_transport, + }, + } + + +def render_manifest(manifest: dict[str, Any]) -> str: + return json.dumps(manifest, indent=2, sort_keys=True, ensure_ascii=False) + "\n" + + +def main() -> None: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--contract", type=Path, default=DEFAULT_CONTRACT) + parser.add_argument("--sync-root", type=Path, default=DEFAULT_SYNC_ROOT) + parser.add_argument("--async-root", type=Path, default=DEFAULT_ASYNC_ROOT) + parser.add_argument("--output", type=Path, default=DEFAULT_OUTPUT) + parser.add_argument("--check", action="store_true") + args = parser.parse_args() + + try: + expected = render_manifest( + build_manifest(args.contract, args.sync_root, args.async_root) + ) + except (OSError, SyntaxError, ValueError) as exc: + print(f"Python contract-shape manifest failed: {exc}", file=sys.stderr) + raise SystemExit(1) from exc + if args.check: + try: + actual = args.output.read_text(encoding="utf-8") + except FileNotFoundError: + print(f"Python contract-shape manifest is missing: {args.output}", file=sys.stderr) + raise SystemExit(1) from None + if actual != expected: + print( + "\n".join( + difflib.unified_diff( + actual.splitlines(), + expected.splitlines(), + fromfile=str(args.output), + tofile=f"{args.output} (regenerated)", + lineterm="", + ) + ), + file=sys.stderr, + ) + print( + "Run `python3 scripts/generate_python_contract_manifest.py` and review the " + "schema/signature delta.", + file=sys.stderr, + ) + raise SystemExit(1) + print(f"Generated Python contract-shape manifest is current: {args.output}") + return + args.output.parent.mkdir(parents=True, exist_ok=True) + args.output.write_text(expected, encoding="utf-8") + print(f"Rendered exact Python contract-shape manifest: {args.output}") + + +if __name__ == "__main__": + main() diff --git a/scripts/import_agentdrive_contract.py b/scripts/import_agentdrive_contract.py index 8078079..ebc59bc 100644 --- a/scripts/import_agentdrive_contract.py +++ b/scripts/import_agentdrive_contract.py @@ -5,6 +5,7 @@ import argparse import hashlib import json +import re from pathlib import Path from typing import Any, Dict @@ -43,7 +44,7 @@ def _validate(document: Dict[str, Any]) -> None: scheme = ( document.get("components", {}) .get("securitySchemes", {}) - .get("BearerAuth") + .get("bearerAuth") ) if ( not isinstance(scheme, dict) @@ -51,7 +52,7 @@ def _validate(document: Dict[str, Any]) -> None: or scheme.get("scheme") != "bearer" or not scheme.get("bearerFormat") ): - raise ContractImportError("source contract lacks canonical BearerAuth") + raise ContractImportError("source contract lacks canonical bearerAuth") operation_ids = [] for path_item in document.get("paths", {}).values(): @@ -72,6 +73,8 @@ def import_contract( *, source_commit: str, ) -> None: + if not re.fullmatch(r"[0-9a-f]{40}", source_commit): + raise ContractImportError("source_commit must be a full lowercase Git SHA") source_bytes = source.read_bytes() document = json.loads(source_bytes) _validate(document) diff --git a/scripts/openapi_sdk_contract.py b/scripts/openapi_sdk_contract.py new file mode 100644 index 0000000..7933c56 --- /dev/null +++ b/scripts/openapi_sdk_contract.py @@ -0,0 +1,240 @@ +"""Shared, dependency-free helpers for AgentDrive SDK contract gates.""" + +from __future__ import annotations + +import hashlib +import json +import re +from copy import deepcopy +from pathlib import Path +from typing import Any, Iterator + +HTTP_METHODS = frozenset( + {"get", "put", "post", "delete", "patch", "head", "options", "trace"} +) +SCHEMA_DOC_KEYS = frozenset( + {"$comment", "description", "example", "examples", "externalDocs", "title"} +) + + +class ContractError(ValueError): + """Raised when an SDK contract invariant is violated.""" + + +def load_document(path: Path) -> dict[str, Any]: + value = json.loads(path.read_text(encoding="utf-8")) + if not isinstance(value, dict): + raise ContractError(f"{path} must contain a JSON object") + return value + + +def canonical_json(value: Any) -> str: + return json.dumps(value, sort_keys=True, separators=(",", ":"), ensure_ascii=False) + + +def sha256_json(value: Any) -> str: + return hashlib.sha256(canonical_json(value).encode()).hexdigest() + + +def resolve_local_ref(document: dict[str, Any], value: Any) -> Any: + """Resolve one local JSON pointer, leaving non-reference values unchanged.""" + + if not isinstance(value, dict) or set(value) != {"$ref"}: + return value + ref = value["$ref"] + if not isinstance(ref, str) or not ref.startswith("#/"): + raise ContractError(f"only local OpenAPI references are supported: {ref!r}") + current: Any = document + for raw_part in ref[2:].split("/"): + part = raw_part.replace("~1", "/").replace("~0", "~") + try: + current = current[part] + except (KeyError, TypeError) as exc: + raise ContractError(f"unresolvable local reference: {ref}") from exc + return current + + +def ref_name(value: Any) -> str | None: + if not isinstance(value, dict): + return None + ref = value.get("$ref") + if isinstance(ref, str) and ref.startswith("#/components/schemas/"): + return ref.rsplit("/", 1)[1] + return None + + +def iter_operations( + document: dict[str, Any], +) -> Iterator[tuple[str, str, dict[str, Any], dict[str, Any]]]: + """Yield ``(path, method, path_item, operation)`` in wire order.""" + + for path, path_item in document.get("paths", {}).items(): + if not isinstance(path_item, dict): + continue + for method, operation in path_item.items(): + if method in HTTP_METHODS and isinstance(operation, dict): + yield path, method, path_item, operation + + +def operation_map(document: dict[str, Any]) -> dict[str, dict[str, Any]]: + result: dict[str, dict[str, Any]] = {} + for path, method, path_item, operation in iter_operations(document): + operation_id = operation.get("operationId") + if not isinstance(operation_id, str) or not operation_id: + raise ContractError(f"{method.upper()} {path} is missing operationId") + if operation_id in result: + raise ContractError(f"duplicate operationId: {operation_id}") + result[operation_id] = { + "path": path, + "method": method.upper(), + "path_item": path_item, + "operation": operation, + } + return result + + +def python_name(value: str) -> str: + """Match OpenAPI Generator's ordinary Python parameter/model spelling.""" + + value = re.sub(r"([a-z0-9])([A-Z])", r"\1_\2", value) + value = re.sub(r"[^A-Za-z0-9]+", "_", value).strip("_").lower() + if value and value[0].isdigit(): + value = f"var_{value}" + return value + + +def shape_schema(value: Any) -> Any: + """Remove prose-only keys while retaining every wire/validation constraint.""" + + if isinstance(value, dict): + return { + key: shape_schema(child) + for key, child in sorted(value.items()) + if key not in SCHEMA_DOC_KEYS + } + if isinstance(value, list): + return [shape_schema(child) for child in value] + return value + + +def schema_label(schema: Any) -> str: + """Return a concise, deterministic schema label for docs and diagnostics.""" + + if not isinstance(schema, dict): + return "none" + name = ref_name(schema) + if name: + return name + if "anyOf" in schema: + return " | ".join(schema_label(item) for item in schema["anyOf"]) + if "oneOf" in schema: + return "oneOf(" + ", ".join(schema_label(item) for item in schema["oneOf"]) + ")" + if "allOf" in schema: + return "allOf(" + ", ".join(schema_label(item) for item in schema["allOf"]) + ")" + schema_type = schema.get("type") + if schema_type == "array": + return f"array[{schema_label(schema.get('items', {}))}]" + if schema_type == "object" or "properties" in schema: + return f"object#{sha256_json(shape_schema(schema))[:12]}" + if isinstance(schema.get("enum"), list): + return "enum[" + ", ".join(map(str, schema["enum"])) + "]" + if schema_type == "string" and schema.get("format"): + return f"string({schema['format']})" + if isinstance(schema_type, list): + return " | ".join(map(str, schema_type)) + return str(schema_type or "any") + + +def merged_parameters( + document: dict[str, Any], path_item: dict[str, Any], operation: dict[str, Any] +) -> list[dict[str, Any]]: + """Return dereferenced path-level + operation-level parameters.""" + + by_key: dict[tuple[str, str], dict[str, Any]] = {} + for raw in [*path_item.get("parameters", []), *operation.get("parameters", [])]: + parameter = resolve_local_ref(document, raw) + if not isinstance(parameter, dict): + raise ContractError("parameter must resolve to an object") + key = (str(parameter.get("name")), str(parameter.get("in"))) + by_key[key] = parameter + return list(by_key.values()) + + +def media_schemas(content: Any) -> dict[str, dict[str, Any]]: + if not isinstance(content, dict): + return {} + result: dict[str, dict[str, Any]] = {} + for media_type, media in content.items(): + if isinstance(media, dict): + schema = media.get("schema", {}) + result[str(media_type)] = schema if isinstance(schema, dict) else {} + return result + + +def schema_references(value: Any) -> set[str]: + result: set[str] = set() + if isinstance(value, dict): + name = ref_name(value) + if name: + result.add(name) + for child in value.values(): + result.update(schema_references(child)) + elif isinstance(value, list): + for child in value: + result.update(schema_references(child)) + return result + + +def schema_closure(document: dict[str, Any], seeds: set[str]) -> set[str]: + schemas = document.get("components", {}).get("schemas", {}) + result = set(seeds) + pending = list(seeds) + while pending: + name = pending.pop() + schema = schemas.get(name) + if not isinstance(schema, dict): + raise ContractError(f"unknown component schema: {name}") + for child in schema_references(schema): + if child not in result: + result.add(child) + pending.append(child) + return result + + +def model_contexts(document: dict[str, Any]) -> tuple[set[str], set[str]]: + """Return transitive request and response component schema sets.""" + + request_seeds: set[str] = set() + response_seeds: set[str] = set() + for _path, _method, _path_item, operation in iter_operations(document): + request_body = resolve_local_ref(document, operation.get("requestBody", {})) + if isinstance(request_body, dict): + request_seeds.update(schema_references(request_body.get("content", {}))) + for raw_response in operation.get("responses", {}).values(): + response = resolve_local_ref(document, raw_response) + if isinstance(response, dict): + response_seeds.update(schema_references(response.get("content", {}))) + return ( + schema_closure(document, request_seeds), + schema_closure(document, response_seeds), + ) + + +def enum_properties(schema: dict[str, Any]) -> set[str]: + result: set[str] = set() + for name, value in schema.get("properties", {}).items(): + if isinstance(value, dict) and ( + isinstance(value.get("enum"), list) + or any( + isinstance(item, dict) and isinstance(item.get("enum"), list) + for item in value.get("anyOf", []) + ) + ): + result.add(name) + return result + + +def clone(value: Any) -> Any: + """Typed alias used by compatibility checks before local mutation.""" + + return deepcopy(value) diff --git a/scripts/patch_python_transports.py b/scripts/patch_python_transports.py new file mode 100644 index 0000000..36f0365 --- /dev/null +++ b/scripts/patch_python_transports.py @@ -0,0 +1,67 @@ +"""Apply deterministic security policy to generated Python transports.""" + +from __future__ import annotations + +import argparse +import re +from pathlib import Path + + +class TransportPatchError(ValueError): + pass + + +def patch_sync_redirects(path: Path) -> None: + text = path.read_text(encoding="utf-8") + if text.count("redirect=False") == 6: + return + if "redirect=False" in text: + raise TransportPatchError("sync redirect patch is only partially applied") + + pattern = re.compile( + r"^(?P[ \t]*)preload_content=False,?[ \t]*$", + re.MULTILINE, + ) + patched, count = pattern.subn( + lambda match: ( + f'{match.group("indent")}preload_content=False,\n' + f'{match.group("indent")}redirect=False,' + ), + text, + ) + if count != 6: + raise TransportPatchError( + f"expected six urllib3 request sites, found {count}" + ) + path.write_text(patched, encoding="utf-8") + + +def patch_async_redirects(path: Path) -> None: + text = path.read_text(encoding="utf-8") + if text.count("follow_redirects=False") == 1: + return + if "follow_redirects=" in text: + raise TransportPatchError("async redirect policy is unexpected") + + marker = " trust_env=True\n )" + replacement = ( + " trust_env=True,\n" + " follow_redirects=False\n" + " )" + ) + if text.count(marker) != 1: + raise TransportPatchError("expected one generated httpx client constructor") + path.write_text(text.replace(marker, replacement), encoding="utf-8") + + +def main() -> None: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("sync_rest", type=Path) + parser.add_argument("async_rest", type=Path) + args = parser.parse_args() + patch_sync_redirects(args.sync_rest) + patch_async_redirects(args.async_rest) + + +if __name__ == "__main__": + main() diff --git a/scripts/postprocess_python_models.py b/scripts/postprocess_python_models.py new file mode 100644 index 0000000..f686c79 --- /dev/null +++ b/scripts/postprocess_python_models.py @@ -0,0 +1,354 @@ +"""Enforce request strictness and response forward compatibility in OAG models. + +OpenAPI Generator 7.24 does not faithfully preserve ``additionalProperties: +false`` in generated Pydantic request models, and it emits closed enum +validators for response vocabularies. This deterministic postprocessor applies +the AgentDrive policy without hand-editing generated files: + +* request-reachable component models reject unknown fields and retain enums; +* all other generated models ignore additive response fields; +* response enum validators are removed so additive wire values deserialize. +""" + +from __future__ import annotations + +import argparse +import ast +import difflib +import re +import sys +from dataclasses import dataclass +from pathlib import Path + +try: + from scripts.openapi_sdk_contract import ( + ContractError, + load_document, + model_contexts, + python_name, + ) +except ModuleNotFoundError: # direct `python scripts/...py` execution + from openapi_sdk_contract import ContractError, load_document, model_contexts, python_name + +DEFAULT_MODEL_DIRS = ( + Path("sdk/python/src/agentdrive_sdk/generated/sync/models"), + Path("sdk/python/src/agentdrive_sdk/generated/async_client/models"), +) + + +@dataclass(frozen=True) +class Replacement: + start: int + end: int + lines: tuple[str, ...] + + +def _class_node(tree: ast.Module) -> ast.ClassDef: + classes = [node for node in tree.body if isinstance(node, ast.ClassDef)] + if len(classes) != 1: + raise ContractError(f"expected exactly one generated model class, found {len(classes)}") + return classes[0] + + +def _decorated_start(node: ast.FunctionDef | ast.AsyncFunctionDef) -> int: + return min([node.lineno, *(item.lineno for item in node.decorator_list)]) + + +def _field_validator_name(node: ast.FunctionDef | ast.AsyncFunctionDef) -> str | None: + for decorator in node.decorator_list: + if not isinstance(decorator, ast.Call): + continue + function = decorator.func + if not ( + isinstance(function, ast.Name) and function.id == "field_validator" + ) and not ( + isinstance(function, ast.Attribute) and function.attr == "field_validator" + ): + continue + if decorator.args and isinstance(decorator.args[0], ast.Constant): + value = decorator.args[0].value + return value if isinstance(value, str) else None + return None + + +def _config_replacement( + source_lines: list[str], class_node: ast.ClassDef, policy: str +) -> Replacement: + assignments = [ + node + for node in class_node.body + if isinstance(node, ast.Assign) + and any(isinstance(target, ast.Name) and target.id == "model_config" for target in node.targets) + ] + if len(assignments) != 1: + raise ContractError(f"{class_node.name}: expected one model_config assignment") + node = assignments[0] + if not isinstance(node.value, (ast.Call, ast.Dict)): + raise ContractError(f"{class_node.name}: unsupported model_config shape") + block = source_lines[node.lineno - 1 : node.end_lineno] + joined = "\n".join(block) + if re.search(r"\bextra\s*=", joined): + joined = re.sub(r"\bextra\s*=\s*(['\"])(?:forbid|ignore|allow)\1", f'extra="{policy}"', joined) + return Replacement(node.lineno, node.end_lineno or node.lineno, tuple(joined.splitlines())) + if isinstance(node.value, ast.Call): + if node.lineno == node.end_lineno: + joined = joined.rsplit(")", 1)[0] + f', extra="{policy}")' + return Replacement(node.lineno, node.end_lineno, (joined,)) + indent = re.match(r"\s*", source_lines[node.lineno - 1]).group(0) + " " + block.insert(1, f'{indent}extra="{policy}",') + return Replacement(node.lineno, node.end_lineno or node.lineno, tuple(block)) + # Dict-form ConfigDict is uncommon in generated models, but preserving it is + # straightforward and keeps the checker future-proof. + if node.lineno == node.end_lineno: + joined = joined.rsplit("}", 1)[0] + f', "extra": "{policy}"}}' + return Replacement(node.lineno, node.end_lineno, (joined,)) + indent = re.match(r"\s*", source_lines[node.lineno - 1]).group(0) + " " + block.insert(1, f'{indent}"extra": "{policy}",') + return Replacement(node.lineno, node.end_lineno or node.lineno, tuple(block)) + + +def _request_method_replacement(node: ast.FunctionDef) -> Replacement | None: + if node.name == "to_dict": + return Replacement( + node.lineno, + node.end_lineno or node.lineno, + ( + " def to_dict(self) -> Dict[str, Any]:", + ' """Return the request body using wire aliases."""', + " return to_jsonable_python(", + " self.model_dump(", + " by_alias=True,", + " exclude_unset=True,", + ' exclude={"additional_properties"},', + " )", + " )", + ), + ) + if node.name == "from_dict": + return Replacement( + _decorated_start(node), + node.end_lineno or node.lineno, + ( + " @classmethod", + " def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:", + ' """Validate a request dictionary without discarding unknown fields."""', + " if obj is None:", + " return None", + " return cls.model_validate(obj)", + ), + ) + return None + + +def _is_nullable(schema: object) -> bool: + if not isinstance(schema, dict): + return False + if schema.get("nullable") is True: + return True + schema_type = schema.get("type") + if isinstance(schema_type, list) and "null" in schema_type: + return True + return any( + isinstance(item, dict) and item.get("type") == "null" + for keyword in ("anyOf", "oneOf") + for item in schema.get(keyword, []) + ) + + +def _strip_outer_optional(node: ast.AST) -> ast.AST: + if isinstance(node, ast.Subscript) and isinstance(node.value, ast.Name): + if node.value.id == "Optional": + return node.slice + if node.value.id == "Annotated" and isinstance(node.slice, ast.Tuple): + first, *rest = node.slice.elts + stripped = _strip_outer_optional(first) + if ast.dump(stripped) != ast.dump(first): + return ast.Subscript( + value=node.value, + slice=ast.Tuple(elts=[stripped, *rest], ctx=ast.Load()), + ctx=ast.Load(), + ) + return node + + +def _nonnull_field_replacement(node: ast.AnnAssign) -> Replacement | None: + parsed = ast.parse(ast.unparse(node.annotation), mode="eval").body + rewritten = ast.fix_missing_locations(_strip_outer_optional(parsed)) + annotation = ast.unparse(rewritten) + if annotation == ast.unparse(node.annotation): + return None + if not isinstance(node.target, ast.Name): + return None + line = f" {node.target.id}: {annotation}" + if node.value is not None: + line += f" = {ast.unparse(node.value)}" + return Replacement(node.lineno, node.end_lineno or node.lineno, (line,)) + + +def _apply_replacements(source_lines: list[str], replacements: list[Replacement]) -> str: + result = list(source_lines) + previous_start = len(result) + 1 + for replacement in sorted(replacements, key=lambda item: item.start, reverse=True): + if replacement.end >= previous_start: + raise ContractError("overlapping generated-model source replacements") + result[replacement.start - 1 : replacement.end] = list(replacement.lines) + previous_start = replacement.start + return "\n".join(result).rstrip() + "\n" + + +def transform_model( + source: str, + *, + request_model: bool, + nonnullable_fields: set[str] | None = None, +) -> str: + tree = ast.parse(source) + class_node = _class_node(tree) + lines = source.splitlines() + replacements = [ + _config_replacement(lines, class_node, "forbid" if request_model else "ignore") + ] + + for node in class_node.body: + if ( + isinstance(node, ast.AnnAssign) + and isinstance(node.target, ast.Name) + and node.target.id in (nonnullable_fields or set()) + ): + replacement = _nonnull_field_replacement(node) + if replacement: + replacements.append(replacement) + if request_model: + if ( + isinstance(node, ast.AnnAssign) + and isinstance(node.target, ast.Name) + and node.target.id == "additional_properties" + ): + replacements.append( + Replacement(node.lineno, node.end_lineno or node.lineno, ()) + ) + if isinstance(node, ast.FunctionDef): + replacement = _request_method_replacement(node) + if replacement: + replacements.append(replacement) + elif isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef)): + # Every field-validator emitted for a response enum is closed over + # the contract's current value set. Response vocabularies are open; + # request models take the opposite policy and never enter this arm. + if _field_validator_name(node) is not None and node.name.endswith("_validate_enum"): + replacements.append( + Replacement( + _decorated_start(node), node.end_lineno or node.lineno, () + ) + ) + + return _apply_replacements(lines, replacements) + + +def _model_files(directory: Path) -> dict[str, Path]: + result: dict[str, Path] = {} + for path in sorted(directory.glob("*.py")): + if path.name == "__init__.py": + continue + tree = ast.parse(path.read_text(encoding="utf-8"), filename=str(path)) + classes = [node for node in tree.body if isinstance(node, ast.ClassDef)] + if len(classes) == 1: + result[classes[0].name] = path + return result + + +def process_directory( + directory: Path, + *, + request_models: set[str], + nonnullable_fields: dict[str, set[str]], + check: bool, +) -> list[str]: + files = _model_files(directory) + missing = sorted(request_models - set(files)) + if missing: + raise ContractError(f"{directory}: missing request models: {missing}") + changed: list[str] = [] + for name, path in sorted(files.items()): + source = path.read_text(encoding="utf-8") + transformed = transform_model( + source, + request_model=name in request_models, + nonnullable_fields=nonnullable_fields.get(name, set()), + ) + if transformed == source: + continue + changed.append(str(path)) + if check: + diff = difflib.unified_diff( + source.splitlines(), + transformed.splitlines(), + fromfile=str(path), + tofile=f"{path} (postprocessed)", + lineterm="", + ) + print("\n".join(diff), file=sys.stderr) + else: + path.write_text(transformed, encoding="utf-8") + return changed + + +def main() -> None: + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("--contract", type=Path, default=Path("sdk/openapi.json")) + parser.add_argument( + "--models-dir", + action="append", + type=Path, + dest="model_dirs", + help="generated models directory (repeatable)", + ) + parser.add_argument("--check", action="store_true") + args = parser.parse_args() + document = load_document(args.contract) + request_models, response_models = model_contexts(document) + overlap = request_models & response_models + if overlap: + raise ContractError( + "request and response schemas must be split to apply opposite compatibility " + f"policies: {sorted(overlap)}" + ) + + schemas = document.get("components", {}).get("schemas", {}) + nonnullable_fields = { + name: { + python_name(field_name) + for field_name, field_schema in schema.get("properties", {}).items() + if not _is_nullable(field_schema) + } + for name, schema in schemas.items() + if isinstance(schema, dict) + } + + changed: list[str] = [] + for directory in args.model_dirs or DEFAULT_MODEL_DIRS: + if not directory.is_dir(): + raise ContractError(f"generated model directory is missing: {directory}") + changed.extend( + process_directory( + directory, + request_models=request_models, + nonnullable_fields=nonnullable_fields, + check=args.check, + ) + ) + if args.check and changed: + print( + "Generated Python model policy drifted. Regenerate through the pinned pipeline.", + file=sys.stderr, + ) + raise SystemExit(1) + action = "checked" if args.check else "postprocessed" + print( + f"Python generated models {action}: {len(request_models)} strict request schemas; " + f"{len(response_models)} referenced response schemas." + ) + + +if __name__ == "__main__": + main() diff --git a/scripts/python_generated_surface.py b/scripts/python_generated_surface.py new file mode 100644 index 0000000..e523e52 --- /dev/null +++ b/scripts/python_generated_surface.py @@ -0,0 +1,634 @@ +"""Parse and validate the generated sync/async Python callable wire surface.""" + +from __future__ import annotations + +import ast +from dataclasses import dataclass +from pathlib import Path +from typing import Any + +try: + from scripts.openapi_sdk_contract import ( + ContractError, + media_schemas, + merged_parameters, + operation_map, + python_name, + ref_name, + resolve_local_ref, + schema_label, + ) +except ModuleNotFoundError: # direct script execution through a sibling module + from openapi_sdk_contract import ( + ContractError, + media_schemas, + merged_parameters, + operation_map, + python_name, + ref_name, + resolve_local_ref, + schema_label, + ) + +SPECIAL_PARAMETERS = frozenset( + {"_request_timeout", "_request_auth", "_content_type", "_headers", "_host_index"} +) + + +@dataclass(frozen=True) +class ParsedFunction: + name: str + is_async: bool + parameters: tuple[dict[str, Any], ...] + returns: str + docstring: str + signature: str + + +def _literal(node: ast.AST | None) -> Any: + if node is None: + return None + try: + return ast.literal_eval(node) + except (ValueError, TypeError): + return None + + +def _annotation(node: ast.AST | None) -> str: + return ast.unparse(node) if node is not None else "Any" + + +def _parameters(node: ast.FunctionDef | ast.AsyncFunctionDef) -> tuple[dict[str, Any], ...]: + positional = [*node.args.posonlyargs, *node.args.args] + positional_defaults: list[ast.AST | None] = [None] * ( + len(positional) - len(node.args.defaults) + ) + list(node.args.defaults) + result: list[dict[str, Any]] = [] + for argument, default in zip(positional, positional_defaults, strict=True): + if argument.arg == "self": + continue + result.append( + { + "name": argument.arg, + "annotation": _annotation(argument.annotation), + "required": default is None, + "default": None if default is None else ast.unparse(default), + "kind": "positional", + } + ) + if node.args.vararg: + result.append( + { + "name": f"*{node.args.vararg.arg}", + "annotation": _annotation(node.args.vararg.annotation), + "required": False, + "default": None, + "kind": "vararg", + } + ) + for argument, default in zip( + node.args.kwonlyargs, node.args.kw_defaults, strict=True + ): + result.append( + { + "name": argument.arg, + "annotation": _annotation(argument.annotation), + "required": default is None, + "default": None if default is None else ast.unparse(default), + "kind": "keyword", + } + ) + return tuple(result) + + +def _signature(node: ast.FunctionDef | ast.AsyncFunctionDef) -> str: + rendered = [] + for parameter in _parameters(node): + text = f"{parameter['name']}: {parameter['annotation']}" + if not parameter["required"] and parameter["kind"] != "vararg": + text += f" = {parameter['default']}" + rendered.append(text) + prefix = "async def" if isinstance(node, ast.AsyncFunctionDef) else "def" + return f"{prefix} {node.name}({', '.join(rendered)}) -> {_annotation(node.returns)}" + + +def _parse_function(node: ast.FunctionDef | ast.AsyncFunctionDef) -> ParsedFunction: + return ParsedFunction( + name=node.name, + is_async=isinstance(node, ast.AsyncFunctionDef), + parameters=_parameters(node), + returns=_annotation(node.returns), + docstring=ast.get_docstring(node, clean=True) or "", + signature=_signature(node), + ) + + +def _mapping_location(name: str) -> str | None: + return { + "_path_params": "path", + "_query_params": "query", + "_header_params": "header", + "_form_params": "form", + "_files": "file", + }.get(name) + + +def _subscript_key(node: ast.Subscript) -> str | None: + value = _literal(node.slice) + return value if isinstance(value, str) else None + + +def _extract_serialize(node: ast.FunctionDef) -> dict[str, Any]: + wire: list[dict[str, str]] = [] + method: str | None = None + path: str | None = None + auth: list[str] = [] + accept: list[str] = [] + content_types: list[str] = [] + + for child in ast.walk(node): + if isinstance(child, ast.Assign) and len(child.targets) == 1: + target = child.targets[0] + if isinstance(target, ast.Subscript) and isinstance(target.value, ast.Name): + location = _mapping_location(target.value.id) + key = _subscript_key(target) + if ( + location + and key + and key.lower() not in {"accept", "content-type"} + and isinstance(child.value, ast.Name) + ): + wire.append( + {"location": location, "wire_name": key, "python_name": child.value.id} + ) + elif isinstance(target, ast.Name) and target.id == "_body_params" and isinstance( + child.value, ast.Name + ): + wire.append( + {"location": "body", "wire_name": "body", "python_name": child.value.id} + ) + elif isinstance(target, ast.Name) and target.id == "_auth_settings": + value = _literal(child.value) + if isinstance(value, list) and all(isinstance(item, str) for item in value): + auth = value + elif ( + isinstance(child, ast.AnnAssign) + and isinstance(child.target, ast.Name) + and child.target.id == "_auth_settings" + ): + value = _literal(child.value) + if isinstance(value, list) and all(isinstance(item, str) for item in value): + auth = value + if isinstance(child, ast.Expr) and isinstance(child.value, ast.Call): + call = child.value + if isinstance(call.func, ast.Attribute) and isinstance(call.func.value, ast.Name): + location = _mapping_location(call.func.value.id) + if location in {"query", "form"} and call.func.attr == "append" and call.args: + pair = call.args[0] + if isinstance(pair, ast.Tuple) and len(pair.elts) >= 2: + key = _literal(pair.elts[0]) + value = pair.elts[1] + if isinstance(key, str) and isinstance(value, ast.Name): + wire.append( + { + "location": location, + "wire_name": key, + "python_name": value.id, + } + ) + if not isinstance(child, ast.Call) or not isinstance(child.func, ast.Attribute): + continue + if child.func.attr == "param_serialize": + values = {item.arg: _literal(item.value) for item in child.keywords if item.arg} + method = values.get("method") + path = values.get("resource_path") + elif child.func.attr == "select_header_accept" and child.args: + value = _literal(child.args[0]) + if isinstance(value, list): + accept = [str(item) for item in value] + elif child.func.attr == "select_header_content_type" and child.args: + value = _literal(child.args[0]) + if isinstance(value, list): + content_types = [str(item) for item in value] + + if method is None or path is None: + raise ContractError(f"{node.name}: generated serializer lacks method/resource_path") + unique_wire = { + (item["location"], item["wire_name"], item["python_name"]): item for item in wire + } + return { + "method": method, + "path": path, + "wire": sorted( + unique_wire.values(), + key=lambda item: (item["location"], item["wire_name"], item["python_name"]), + ), + "auth": sorted(auth), + "accept": sorted(set(accept)), + "content_types": sorted(set(content_types)), + } + + +def _response_types(node: ast.FunctionDef | ast.AsyncFunctionDef) -> dict[str, str | None]: + for child in ast.walk(node): + if isinstance(child, ast.Assign) and len(child.targets) == 1: + target = child.targets[0] + assigned = child.value + elif isinstance(child, ast.AnnAssign): + target = child.target + assigned = child.value + else: + continue + if isinstance(target, ast.Name) and target.id == "_response_types_map": + value = _literal(assigned) + if isinstance(value, dict): + return { + str(key): item if isinstance(item, str) else None + for key, item in value.items() + } + raise ContractError(f"{node.name}: generated operation lacks _response_types_map") + + +def _header_carrier(api_root: Path) -> bool: + path = api_root.parent / "api_response.py" + if not path.exists(): + return False + tree = ast.parse(path.read_text(encoding="utf-8"), filename=str(path)) + return any( + isinstance(node, ast.AnnAssign) + and isinstance(node.target, ast.Name) + and node.target.id == "headers" + for node in ast.walk(tree) + ) + + +def parse_surface( + api_root: Path, operation_ids: set[str], *, expected_async: bool +) -> dict[str, dict[str, Any]]: + functions: dict[str, tuple[str, ast.FunctionDef | ast.AsyncFunctionDef]] = {} + for path in sorted(api_root.glob("*_api.py")): + if path.name == "__init__.py": + continue + tree = ast.parse(path.read_text(encoding="utf-8"), filename=str(path)) + classes = [node for node in tree.body if isinstance(node, ast.ClassDef)] + for class_node in classes: + for node in class_node.body: + if isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef)): + functions[node.name] = (class_node.name, node) + + result: dict[str, dict[str, Any]] = {} + for operation_id in sorted(operation_ids): + required_names = ( + operation_id, + f"{operation_id}_with_http_info", + f"{operation_id}_without_preload_content", + f"_{operation_id}_serialize", + ) + missing = [name for name in required_names if name not in functions] + if missing: + raise ContractError(f"{api_root}: {operation_id} missing generated callables {missing}") + owner, primary_node = functions[operation_id] + info_owner, info_node = functions[f"{operation_id}_with_http_info"] + raw_owner, raw_node = functions[f"{operation_id}_without_preload_content"] + serializer_owner, serializer_node = functions[f"_{operation_id}_serialize"] + if len({owner, info_owner, raw_owner, serializer_owner}) != 1: + raise ContractError(f"{operation_id}: generated variants are split across API classes") + for public_node in (primary_node, info_node, raw_node): + if isinstance(public_node, ast.AsyncFunctionDef) != expected_async: + mode = "async" if expected_async else "sync" + raise ContractError(f"{api_root}: {public_node.name} is not {mode}") + if not isinstance(serializer_node, ast.FunctionDef): + raise ContractError(f"{operation_id}: serializer must be synchronous setup code") + + primary = _parse_function(primary_node) + with_info = _parse_function(info_node) + without_preload = _parse_function(raw_node) + parameter_shapes = [item.parameters for item in (primary, with_info, without_preload)] + if not parameter_shapes[0] == parameter_shapes[1] == parameter_shapes[2]: + raise ContractError(f"{operation_id}: generated variant parameter signatures drifted") + result[operation_id] = { + "api_class": owner, + "primary": primary, + "with_http_info": with_info, + "without_preload_content": without_preload, + "serialize": _extract_serialize(serializer_node), + "response_types": _response_types(primary_node), + "response_headers_available": _header_carrier(api_root), + } + return result + + +def _nonnull_schema(schema: dict[str, Any]) -> tuple[dict[str, Any], bool]: + alternatives = schema.get("anyOf") + if isinstance(alternatives, list): + nonnull = [item for item in alternatives if isinstance(item, dict) and item.get("type") != "null"] + nullable = len(nonnull) != len(alternatives) + if len(nonnull) == 1: + return nonnull[0], nullable + return schema, schema.get("nullable") is True + + +def _annotation_matches(schema: dict[str, Any], annotation: str) -> bool: + schema, nullable = _nonnull_schema(schema) + normalized = annotation.replace("Strict", "").lower() + name = ref_name(schema) + if name: + matched = name.lower() in normalized + else: + schema_type = schema.get("type") + if schema_type == "string" and schema.get("format") == "binary": + matched = "bytes" in normalized + elif schema_type == "string" and schema.get("format") == "date-time": + matched = "datetime" in normalized + elif schema_type == "string" and schema.get("format") == "date": + matched = "date" in normalized + elif schema_type == "string" and schema.get("format") == "uuid": + matched = "uuid" in normalized or "str" in normalized + elif schema_type == "string": + matched = "str" in normalized + elif schema_type == "integer": + matched = "int" in normalized + elif schema_type == "number": + matched = "float" in normalized or "int" in normalized + elif schema_type == "boolean": + matched = "bool" in normalized + elif schema_type == "array": + matched = "list" in normalized or "sequence" in normalized + elif schema_type == "object" or "properties" in schema: + matched = any(item in normalized for item in ("dict", "mapping", "any")) + else: + matched = "any" in normalized + if nullable and "optional" not in normalized and "none" not in normalized: + return False + return matched + + +def _expected_wire(document: dict[str, Any], entry: dict[str, Any]) -> list[dict[str, Any]]: + operation = entry["operation"] + result: list[dict[str, Any]] = [] + for parameter in merged_parameters(document, entry["path_item"], operation): + result.append( + { + "location": parameter["in"], + "wire_name": parameter["name"], + "python_name": python_name(parameter["name"]), + "required": bool(parameter.get("required")), + "schema": parameter.get("schema", {}), + } + ) + request_body = resolve_local_ref(document, operation.get("requestBody", {})) + if isinstance(request_body, dict) and request_body.get("content"): + media = media_schemas(request_body["content"]) + if "multipart/form-data" in media: + schema = resolve_local_ref(document, media["multipart/form-data"]) + required = set(schema.get("required", [])) if isinstance(schema, dict) else set() + for name, field_schema in schema.get("properties", {}).items(): + nonnull, _nullable = _nonnull_schema(field_schema) + location = "file" if nonnull.get("format") == "binary" else "form" + result.append( + { + "location": location, + "wire_name": name, + "python_name": python_name(name), + "required": name in required, + "schema": field_schema, + } + ) + else: + first_schema = next(iter(media.values())) + name = ref_name(first_schema) + result.append( + { + "location": "body", + "wire_name": "body", + "python_name": python_name(name) if name else "body", + "required": bool(request_body.get("required")), + "schema": first_schema, + } + ) + return result + + +def _expected_response_type(schema: dict[str, Any]) -> str | None: + if not schema: + return "object" + name = ref_name(schema) + if name: + return name + schema, _nullable = _nonnull_schema(schema) + schema_type = schema.get("type") + if schema_type == "string" and schema.get("format") == "binary": + return "bytes" + if schema_type == "string": + return "str" + if schema_type == "integer": + return "int" + if schema_type == "number": + return "float" + if schema_type == "boolean": + return "bool" + if schema_type == "array": + child = _expected_response_type(schema.get("items", {})) or "object" + return f"List[{child}]" + if schema_type == "object" or "properties" in schema: + return "" + return None + + +def _parameters_by_name(surface: dict[str, Any]) -> dict[str, dict[str, Any]]: + return {item["name"]: item for item in surface["primary"].parameters} + + +def check_surface_against_contract( + document: dict[str, Any], surface: dict[str, dict[str, Any]], *, label: str +) -> list[str]: + failures: list[str] = [] + expected = operation_map(document) + if set(surface) != set(expected): + failures.append( + f"{label}: operation set differs; missing={sorted(set(expected) - set(surface))}, " + f"extra={sorted(set(surface) - set(expected))}" + ) + return failures + for operation_id, entry in expected.items(): + actual = surface[operation_id] + serialized = actual["serialize"] + if serialized["method"] != entry["method"] or serialized["path"] != entry["path"]: + failures.append( + f"{label}:{operation_id}: expected {entry['method']} {entry['path']}, got " + f"{serialized['method']} {serialized['path']}" + ) + expected_auth = sorted( + {name for requirement in entry["operation"].get("security", []) for name in requirement} + ) + if serialized["auth"] != expected_auth: + failures.append( + f"{label}:{operation_id}: auth {serialized['auth']} != {expected_auth}" + ) + + expected_wire = _expected_wire(document, entry) + actual_wire = { + (item["location"], item["wire_name"], item["python_name"]) + for item in serialized["wire"] + } + expected_wire_keys = { + (item["location"], item["wire_name"], item["python_name"]) + for item in expected_wire + } + if actual_wire != expected_wire_keys: + failures.append( + f"{label}:{operation_id}: wire params differ; missing=" + f"{sorted(expected_wire_keys - actual_wire)}, " + f"extra={sorted(actual_wire - expected_wire_keys)}" + ) + + expected_public_parameters = { + item["python_name"] for item in expected_wire + } | SPECIAL_PARAMETERS + for variant_name in ( + "primary", + "with_http_info", + "without_preload_content", + ): + actual_public_parameters = { + item["name"] for item in actual[variant_name].parameters + } + if actual_public_parameters != expected_public_parameters: + failures.append( + f"{label}:{operation_id}:{variant_name}: public parameters differ; " + f"missing={sorted(expected_public_parameters - actual_public_parameters)}, " + f"extra={sorted(actual_public_parameters - expected_public_parameters)}" + ) + + signature = _parameters_by_name(actual) + for item in expected_wire: + parameter = signature.get(item["python_name"]) + if not parameter: + failures.append( + f"{label}:{operation_id}: signature missing {item['python_name']}" + ) + continue + if parameter["required"] != item["required"]: + failures.append( + f"{label}:{operation_id}:{item['python_name']}: requiredness " + f"{parameter['required']} != {item['required']}" + ) + if not _annotation_matches(item["schema"], parameter["annotation"]): + failures.append( + f"{label}:{operation_id}:{item['python_name']}: annotation " + f"{parameter['annotation']} does not represent {schema_label(item['schema'])}" + ) + + operation = entry["operation"] + request_body = resolve_local_ref(document, operation.get("requestBody", {})) + expected_content_types = sorted( + media_schemas(request_body.get("content", {})) + if isinstance(request_body, dict) + else [] + ) + if serialized["content_types"] != expected_content_types: + failures.append( + f"{label}:{operation_id}: request content types {serialized['content_types']} " + f"!= {expected_content_types}" + ) + expected_accept = sorted( + { + media_type + for raw_response in operation.get("responses", {}).values() + for media_type in media_schemas( + ( + resolve_local_ref(document, raw_response) + if isinstance(resolve_local_ref(document, raw_response), dict) + else {} + ).get("content", {}) + ) + } + ) + if serialized["accept"] != expected_accept: + failures.append( + f"{label}:{operation_id}: response content types {serialized['accept']} " + f"!= {expected_accept}" + ) + + expected_responses: dict[str, str | None] = {} + for status, raw_response in operation.get("responses", {}).items(): + response = resolve_local_ref(document, raw_response) + media = media_schemas(response.get("content", {}) if isinstance(response, dict) else {}) + expected_responses[str(status)] = ( + _expected_response_type(next(iter(media.values()))) if media else None + ) + actual_responses = actual["response_types"] + if set(actual_responses) != set(expected_responses): + failures.append( + f"{label}:{operation_id}: response statuses {sorted(actual_responses)} " + f"!= {sorted(expected_responses)}" + ) + for status, expected_type in expected_responses.items(): + actual_type = actual_responses.get(status) + if expected_type == "": + if not actual_type: + failures.append( + f"{label}:{operation_id}:{status}: inline response has no generated model" + ) + elif actual_type != expected_type: + failures.append( + f"{label}:{operation_id}:{status}: response type {actual_type!r} " + f"!= {expected_type!r}" + ) + has_headers = any( + isinstance(resolve_local_ref(document, raw), dict) + and bool(resolve_local_ref(document, raw).get("headers")) + for raw in operation.get("responses", {}).values() + ) + if has_headers and not actual["response_headers_available"]: + failures.append( + f"{label}:{operation_id}: response headers exist but ApiResponse has no header carrier" + ) + return failures + + +def _parity_value(value: dict[str, Any]) -> dict[str, Any]: + def function(item: ParsedFunction) -> dict[str, Any]: + return { + "parameters": item.parameters, + "returns": item.returns, + "docstring": item.docstring, + } + + return { + "api_class": value["api_class"], + "primary": function(value["primary"]), + "with_http_info": function(value["with_http_info"]), + "without_preload_content": function(value["without_preload_content"]), + "serialize": value["serialize"], + "response_types": value["response_types"], + "response_headers_available": value["response_headers_available"], + } + + +def check_sync_async_parity( + sync: dict[str, dict[str, Any]], async_client: dict[str, dict[str, Any]] +) -> list[str]: + failures: list[str] = [] + if set(sync) != set(async_client): + return ["sync/async generated operation sets differ"] + for operation_id in sorted(sync): + if _parity_value(sync[operation_id]) != _parity_value(async_client[operation_id]): + failures.append(f"{operation_id}: sync/async generated callable or wire shape differs") + return failures + + +def public_operation_names(api_root: Path) -> set[str]: + names: set[str] = set() + for path in api_root.glob("*_api.py"): + tree = ast.parse(path.read_text(encoding="utf-8"), filename=str(path)) + for node in ast.walk(tree): + if not isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef)): + continue + if node.name.startswith("_") or node.name.endswith( + ("_with_http_info", "_without_preload_content") + ): + continue + if node.name != "__init__": + names.add(node.name) + return names diff --git a/sdk/README.md b/sdk/README.md index 8bf632e..ecceee7 100644 --- a/sdk/README.md +++ b/sdk/README.md @@ -7,7 +7,7 @@ AgentDrive source commit and snapshot digest. | Language | Directory | Package | Generator | |---|---|---|---| -| Python | [`python/`](python/) | `agentdrive-sdk` (PyPI) | `python` (urllib3) | +| Python | [`python/`](python/) | `agentdrive-sdk` (PyPI) | `python` (`urllib3` sync + `httpx` async) | | TypeScript | [`typescript/`](typescript/) | `@mnexa-ai/agentdrive-sdk` (npm) | `typescript-fetch` | | Go | [`go/`](go/) | `github.com/Mnexa-AI/agentdrive-sdk/sdk/go` | `go` | @@ -32,12 +32,24 @@ without language-specific name collisions or stale operations. It never fetches the live production endpoint and never auto-commits or publishes generated changes. +Python has two generated cores under +`python/src/agentdrive_sdk/generated/{sync,async_client}`. Everything else in +the Python package—metadata, README, type marker, tests, and the future +ergonomic facade—is hand-owned and survives regeneration. The Python gates +also verify exact callable/wire parity, component fields and +required/nullable shape, model constraint hashes, raw response-header +preservation, request strictness, response forward compatibility, and the +generated [API reference](../docs/python-sdk-api-reference.md). + ## Authentication All three clients talk to `https://api.agentdrive.run`. Authenticate with an API key (`ad_live_...`) or an OAuth access token as a bearer credential — see [`../docs/auth.md`](../docs/auth.md) and [`../docs/api.md`](../docs/api.md). -> **Generated code.** Don't hand-edit files under `python/`, `typescript/`, or -> `go/` — changes are overwritten on the next generation. Adjust -> `scripts/generate-sdks.sh` instead. +> **Generated code.** In Python, only +> `python/src/agentdrive_sdk/generated/sync` and +> `python/src/agentdrive_sdk/generated/async_client` are generated. TypeScript +> and Go remain generator-owned package trees. Change the contract or +> deterministic generation/postprocessing scripts instead of editing those +> generated files. diff --git a/sdk/SDK_VERSION b/sdk/SDK_VERSION new file mode 100644 index 0000000..6e8bf73 --- /dev/null +++ b/sdk/SDK_VERSION @@ -0,0 +1 @@ +0.1.0 diff --git a/sdk/go/README.md b/sdk/go/README.md index 55c03f5..0bb3088 100644 --- a/sdk/go/README.md +++ b/sdk/go/README.md @@ -1,6 +1,6 @@ # Go API client for agentdrive -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. ## Overview This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. @@ -71,253 +71,104 @@ All URIs are relative to *https://api.agentdrive.run* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*AgentAuthAPI* | [**ExtensionExchangeV0AuthExtensionExchangePost**](docs/AgentAuthAPI.md#extensionexchangev0authextensionexchangepost) | **Post** /v0/auth/extension/exchange | Redeem an extension OAuth ticket for a JWT pair -*AgentAuthAPI* | [**InitiateClaimAgentIdentityClaimPost**](docs/AgentAuthAPI.md#initiateclaimagentidentityclaimpost) | **Post** /agent/identity/claim | Initiate the human-claim ceremony for an agent identity -*AgentAuthAPI* | [**JwksWellKnownJwksJsonGet**](docs/AgentAuthAPI.md#jwkswellknownjwksjsonget) | **Get** /.well-known/jwks.json | JSON Web Key Set — public keys for verifying AgentDrive JWTs -*AgentAuthAPI* | [**Oauth2TokenOauth2TokenPost**](docs/AgentAuthAPI.md#oauth2tokenoauth2tokenpost) | **Post** /oauth2/token | Exchange a credential for an access_token -*AgentAuthAPI* | [**OauthAuthorizationServerWellKnownOauthAuthorizationServerGet**](docs/AgentAuthAPI.md#oauthauthorizationserverwellknownoauthauthorizationserverget) | **Get** /.well-known/oauth-authorization-server | Authorization-server metadata (RFC 8414 + auth.md agent_auth block) -*AgentAuthAPI* | [**OauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGet**](docs/AgentAuthAPI.md#oauthprotectedresourcemcpwellknownoauthprotectedresourcemcpget) | **Get** /.well-known/oauth-protected-resource/mcp | Protected-resource metadata for the MCP endpoint (RFC 9728 §3.1) -*AgentAuthAPI* | [**OauthProtectedResourceWellKnownOauthProtectedResourceGet**](docs/AgentAuthAPI.md#oauthprotectedresourcewellknownoauthprotectedresourceget) | **Get** /.well-known/oauth-protected-resource | Protected-resource metadata (auth.md / RFC 9728-like discovery) -*AgentAuthAPI* | [**RegisterAgentIdentityAgentIdentityPost**](docs/AgentAuthAPI.md#registeragentidentityagentidentitypost) | **Post** /agent/identity | Register an agent identity (anonymous or ID-JAG) -*DefaultAPI* | [**AbortUploadV0UploadsUploadIdDelete**](docs/DefaultAPI.md#abortuploadv0uploadsuploadiddelete) | **Delete** /v0/uploads/{upload_id} | Abort a large (direct-to-GCS) upload session -*DefaultAPI* | [**BeginUploadV0UploadsPost**](docs/DefaultAPI.md#beginuploadv0uploadspost) | **Post** /v0/uploads | Begin a large (direct-to-GCS) upload -*DefaultAPI* | [**CallbackAuthCallbackGet**](docs/DefaultAPI.md#callbackauthcallbackget) | **Get** /auth/callback | Callback -*DefaultAPI* | [**CancelJobV0JobsJobIdCancelPost**](docs/DefaultAPI.md#canceljobv0jobsjobidcancelpost) | **Post** /v0/jobs/{job_id}/cancel | Cancel a queued/running job -*DefaultAPI* | [**CommitUploadV0UploadsUploadIdCommitPost**](docs/DefaultAPI.md#commituploadv0uploadsuploadidcommitpost) | **Post** /v0/uploads/{upload_id}/commit | Commit a large (direct-to-GCS) upload -*DefaultAPI* | [**CopyArtifactRouteV0ArtifactsArtIdCopyPost**](docs/DefaultAPI.md#copyartifactroutev0artifactsartidcopypost) | **Post** /v0/artifacts/{art_id}/copy | Duplicate an artifact to a new path (CAS-shared, new ID) -*DefaultAPI* | [**CopyFolderByIdV0FoldersFldIdCopyPost**](docs/DefaultAPI.md#copyfolderbyidv0foldersfldidcopypost) | **Post** /v0/folders/{fld_id}/copy | Duplicate a folder subtree to a new path (CAS-shared, new IDs) -*DefaultAPI* | [**CreateFolderByPathV0FoldersPathPut**](docs/DefaultAPI.md#createfolderbypathv0folderspathput) | **Put** /v0/folders/{path} | Create a folder (idempotent) -*DefaultAPI* | [**CreateGrantRouteV0GrantsPost**](docs/DefaultAPI.md#creategrantroutev0grantspost) | **Post** /v0/grants | Create (or fetch) a per-principal grant on a resource -*DefaultAPI* | [**CreateShareRouteV0SharesPost**](docs/DefaultAPI.md#createshareroutev0sharespost) | **Post** /v0/shares | Mint a share link (returns the share_key once) -*DefaultAPI* | [**DeleteArtifactByIdRouteV0ArtifactsArtIdDelete**](docs/DefaultAPI.md#deleteartifactbyidroutev0artifactsartiddelete) | **Delete** /v0/artifacts/{art_id} | Soft-delete an artifact by its stable ID -*DefaultAPI* | [**DeleteArtifactV0ArtifactsPathDelete**](docs/DefaultAPI.md#deleteartifactv0artifactspathdelete) | **Delete** /v0/artifacts/{path} | Delete Artifact -*DefaultAPI* | [**DeleteDriveRouteV0DrivesDriveIdDelete**](docs/DefaultAPI.md#deletedriveroutev0drivesdriveiddelete) | **Delete** /v0/drives/{drive_id} | Soft-delete a drive -*DefaultAPI* | [**DeleteFolderByIdV0FoldersFldIdDelete**](docs/DefaultAPI.md#deletefolderbyidv0foldersfldiddelete) | **Delete** /v0/folders/{fld_id} | Soft-delete a folder by stable ID (cascade with ?recursive=true) -*DefaultAPI* | [**DeleteFolderByPathV0FoldersPathDelete**](docs/DefaultAPI.md#deletefolderbypathv0folderspathdelete) | **Delete** /v0/folders/{path} | Soft-delete a folder (cascade with ?recursive=true) -*DefaultAPI* | [**DeleteGrantRouteV0GrantsGrnIdDelete**](docs/DefaultAPI.md#deletegrantroutev0grantsgrniddelete) | **Delete** /v0/grants/{grn_id} | Revoke a grant (can_manage, or self-revoke own grant) -*DefaultAPI* | [**DeleteShareRouteV0SharesShrIdDelete**](docs/DefaultAPI.md#deleteshareroutev0sharesshriddelete) | **Delete** /v0/shares/{shr_id} | Revoke a share link (requires can_manage) -*DefaultAPI* | [**DownloadArtifactByIdV0ArtifactsArtIdDownloadGet**](docs/DefaultAPI.md#downloadartifactbyidv0artifactsartiddownloadget) | **Get** /v0/artifacts/{art_id}/download | Stream the artifact bytes by stable ID (never rendered HTML) -*DefaultAPI* | [**DownloadArtifactByPathV0ArtifactsPathDownloadGet**](docs/DefaultAPI.md#downloadartifactbypathv0artifactspathdownloadget) | **Get** /v0/artifacts/{path}/download | Stream the artifact bytes by path (never rendered HTML) -*DefaultAPI* | [**DownloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGet**](docs/DefaultAPI.md#downloadartifactversionv0artifactsartidversionsversionnumberdownloadget) | **Get** /v0/artifacts/{art_id}/versions/{version_number}/download | Stream bytes for a specific version (machine surface) -*DefaultAPI* | [**DownloadUrlByIdV0ArtifactsArtIdDownloadUrlGet**](docs/DefaultAPI.md#downloadurlbyidv0artifactsartiddownloadurlget) | **Get** /v0/artifacts/{art_id}/download-url | Signed direct-from-GCS download URL by stable ID -*DefaultAPI* | [**DownloadUrlByPathV0ArtifactsPathDownloadUrlGet**](docs/DefaultAPI.md#downloadurlbypathv0artifactspathdownloadurlget) | **Get** /v0/artifacts/{path}/download-url | Signed direct-from-GCS download URL by path -*DefaultAPI* | [**DownloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGet**](docs/DefaultAPI.md#downloadurlversionv0artifactsartidversionsversionnumberdownloadurlget) | **Get** /v0/artifacts/{art_id}/versions/{version_number}/download-url | Signed direct-from-GCS download URL for a specific version -*DefaultAPI* | [**EnqueueJobV0ProjectsFldIdJobsPost**](docs/DefaultAPI.md#enqueuejobv0projectsfldidjobspost) | **Post** /v0/projects/{fld_id}/jobs | Enqueue a compile job for a project (folder) -*DefaultAPI* | [**ExtensionStartAuthExtensionStartGet**](docs/DefaultAPI.md#extensionstartauthextensionstartget) | **Get** /auth/extension/start | Extension Start -*DefaultAPI* | [**FindV0FindGet**](docs/DefaultAPI.md#findv0findget) | **Get** /v0/find | Hybrid passage retrieval over the full file body -*DefaultAPI* | [**GetArtifactByIdMetaV0ArtifactsArtIdMetaGet**](docs/DefaultAPI.md#getartifactbyidmetav0artifactsartidmetaget) | **Get** /v0/artifacts/{art_id}/meta | Artifact metadata by stable ID (same shape as path /meta) -*DefaultAPI* | [**GetArtifactByIdV0ArtifactsArtIdGet**](docs/DefaultAPI.md#getartifactbyidv0artifactsartidget) | **Get** /v0/artifacts/{art_id} | Canonical lookup of an artifact by its stable ID -*DefaultAPI* | [**GetArtifactMetaV0ArtifactsPathMetaGet**](docs/DefaultAPI.md#getartifactmetav0artifactspathmetaget) | **Get** /v0/artifacts/{path}/meta | Get Artifact Meta -*DefaultAPI* | [**GetArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGet**](docs/DefaultAPI.md#getartifactversionv0artifactsartidversionsversionnumberget) | **Get** /v0/artifacts/{art_id}/versions/{version_number} | Metadata for a specific version of an artifact -*DefaultAPI* | [**GetDriveRouteV0DrivesDriveIdGet**](docs/DefaultAPI.md#getdriveroutev0drivesdriveidget) | **Get** /v0/drives/{drive_id} | Drive overview by id (same shape as /drives/me) -*DefaultAPI* | [**GetFeedbackStatusV0FeedbackFbkIdGet**](docs/DefaultAPI.md#getfeedbackstatusv0feedbackfbkidget) | **Get** /v0/feedback/{fbk_id} | Get Feedback Status -*DefaultAPI* | [**GetFolderByIdMetaV0FoldersFldIdMetaGet**](docs/DefaultAPI.md#getfolderbyidmetav0foldersfldidmetaget) | **Get** /v0/folders/{fld_id}/meta | Folder metadata by stable ID (same shape as the bare id route) -*DefaultAPI* | [**GetFolderByIdV0FoldersFldIdGet**](docs/DefaultAPI.md#getfolderbyidv0foldersfldidget) | **Get** /v0/folders/{fld_id} | Canonical lookup of a folder by its stable ID -*DefaultAPI* | [**GetFolderByPathMetaV0FoldersPathMetaGet**](docs/DefaultAPI.md#getfolderbypathmetav0folderspathmetaget) | **Get** /v0/folders/{path}/meta | Folder metadata by path (same shape as the bare path route) -*DefaultAPI* | [**GetFolderByPathV0FoldersPathGet**](docs/DefaultAPI.md#getfolderbypathv0folderspathget) | **Get** /v0/folders/{path} | Read folder metadata by path -*DefaultAPI* | [**GetGrantRouteV0GrantsGrnIdGet**](docs/DefaultAPI.md#getgrantroutev0grantsgrnidget) | **Get** /v0/grants/{grn_id} | Read a single grant (can_manage, or the grant's own principal) -*DefaultAPI* | [**GetJobLogsV0JobsJobIdLogsGet**](docs/DefaultAPI.md#getjoblogsv0jobsjobidlogsget) | **Get** /v0/jobs/{job_id}/logs | Raw compile log (text/plain) -*DefaultAPI* | [**GetJobV0JobsJobIdGet**](docs/DefaultAPI.md#getjobv0jobsjobidget) | **Get** /v0/jobs/{job_id} | Poll a job -*DefaultAPI* | [**GetProjectV0ProjectsFldIdGet**](docs/DefaultAPI.md#getprojectv0projectsfldidget) | **Get** /v0/projects/{fld_id} | Get a project's compile config -*DefaultAPI* | [**GetShareRouteV0SharesShrIdGet**](docs/DefaultAPI.md#getshareroutev0sharesshridget) | **Get** /v0/shares/{shr_id} | Read a single share link's metadata (requires can_manage) -*DefaultAPI* | [**GetUploadStatusV0UploadsUploadIdGet**](docs/DefaultAPI.md#getuploadstatusv0uploadsuploadidget) | **Get** /v0/uploads/{upload_id} | Get the status of a large (direct-to-GCS) upload session -*DefaultAPI* | [**HealthHealthGet**](docs/DefaultAPI.md#healthhealthget) | **Get** /health | Health -*DefaultAPI* | [**ListArtifactVersionsV0ArtifactsArtIdVersionsGet**](docs/DefaultAPI.md#listartifactversionsv0artifactsartidversionsget) | **Get** /v0/artifacts/{art_id}/versions | List versions of an artifact, newest first -*DefaultAPI* | [**ListArtifactsV0ArtifactsGet**](docs/DefaultAPI.md#listartifactsv0artifactsget) | **Get** /v0/artifacts | List artifacts in the drive -*DefaultAPI* | [**ListEventsRouteV0EventsGet**](docs/DefaultAPI.md#listeventsroutev0eventsget) | **Get** /v0/events | Read the append-only event log for the authenticated drive -*DefaultAPI* | [**ListGrantsRouteV0GrantsGet**](docs/DefaultAPI.md#listgrantsroutev0grantsget) | **Get** /v0/grants | List live grants on a resource (requires can_manage) -*DefaultAPI* | [**ListProjectJobsV0ProjectsFldIdJobsGet**](docs/DefaultAPI.md#listprojectjobsv0projectsfldidjobsget) | **Get** /v0/projects/{fld_id}/jobs | List a project's jobs -*DefaultAPI* | [**ListSharesRouteV0SharesGet**](docs/DefaultAPI.md#listsharesroutev0sharesget) | **Get** /v0/shares | List live share links on a resource (requires can_manage) -*DefaultAPI* | [**ListTrashRouteV0DrivesDriveIdTrashGet**](docs/DefaultAPI.md#listtrashroutev0drivesdriveidtrashget) | **Get** /v0/drives/{drive_id}/trash | List the authenticated drive's trash -*DefaultAPI* | [**LoginAuthLoginGet**](docs/DefaultAPI.md#loginauthloginget) | **Get** /auth/login | Login -*DefaultAPI* | [**LogoutAuthLogoutPost**](docs/DefaultAPI.md#logoutauthlogoutpost) | **Post** /auth/logout | Logout -*DefaultAPI* | [**MeUsageV0DrivesMeUsageGet**](docs/DefaultAPI.md#meusagev0drivesmeusageget) | **Get** /v0/drives/me/usage | Current-period usage + caps for the authenticated drive -*DefaultAPI* | [**MeV0DrivesMeGet**](docs/DefaultAPI.md#mev0drivesmeget) | **Get** /v0/drives/me | Me -*DefaultAPI* | [**MoveArtifactRouteV0ArtifactsArtIdMovePost**](docs/DefaultAPI.md#moveartifactroutev0artifactsartidmovepost) | **Post** /v0/artifacts/{art_id}/move | Rename / move an artifact to a new path -*DefaultAPI* | [**MoveFolderByIdV0FoldersFldIdMovePost**](docs/DefaultAPI.md#movefolderbyidv0foldersfldidmovepost) | **Post** /v0/folders/{fld_id}/move | Rename / move a folder by stable ID (cascade descendants) -*DefaultAPI* | [**MoveFolderByPathV0FoldersPathMovePost**](docs/DefaultAPI.md#movefolderbypathv0folderspathmovepost) | **Post** /v0/folders/{path}/move | Rename / move a folder (cascade-update descendants) -*DefaultAPI* | [**PatchArtifactRouteV0ArtifactsArtIdPatch**](docs/DefaultAPI.md#patchartifactroutev0artifactsartidpatch) | **Patch** /v0/artifacts/{art_id} | Edit artifact metadata (labels / metadata / source) -*DefaultAPI* | [**PatchFolderByIdV0FoldersFldIdPatch**](docs/DefaultAPI.md#patchfolderbyidv0foldersfldidpatch) | **Patch** /v0/folders/{fld_id} | Update folder metadata by stable ID -*DefaultAPI* | [**PatchFolderByPathV0FoldersPathPatch**](docs/DefaultAPI.md#patchfolderbypathv0folderspathpatch) | **Patch** /v0/folders/{path} | Update folder metadata by path -*DefaultAPI* | [**PatchGrantRouteV0GrantsGrnIdPatch**](docs/DefaultAPI.md#patchgrantroutev0grantsgrnidpatch) | **Patch** /v0/grants/{grn_id} | Update a grant's role and/or expiry (requires can_manage) -*DefaultAPI* | [**PostDescribeV0QueryDescribePost**](docs/DefaultAPI.md#postdescribev0querydescribepost) | **Post** /v0/query/describe | Describe a dataset's column schema -*DefaultAPI* | [**PostFeedbackV0FeedbackPost**](docs/DefaultAPI.md#postfeedbackv0feedbackpost) | **Post** /v0/feedback | Post Feedback -*DefaultAPI* | [**PostLookupValuesV0QueryLookupValuesPost**](docs/DefaultAPI.md#postlookupvaluesv0querylookupvaluespost) | **Post** /v0/query/lookup-values | List distinct values of a dataset column -*DefaultAPI* | [**PostQueryV0QueryPost**](docs/DefaultAPI.md#postqueryv0querypost) | **Post** /v0/query | Run a read-only SQL query over authorized datasets -*DefaultAPI* | [**PutArtifactV0ArtifactsPathPut**](docs/DefaultAPI.md#putartifactv0artifactspathput) | **Put** /v0/artifacts/{path} | Upload (or overwrite) an artifact -*DefaultAPI* | [**PutProjectV0ProjectsFldIdPut**](docs/DefaultAPI.md#putprojectv0projectsfldidput) | **Put** /v0/projects/{fld_id} | Set a project's compile config (entrypoint/engine/auto_compile) -*DefaultAPI* | [**RedeemShareSShareKeyGet**](docs/DefaultAPI.md#redeemsharessharekeyget) | **Get** /s/{share_key} | Redeem Share -*DefaultAPI* | [**RedeemShareWithPasswordSShareKeyPost**](docs/DefaultAPI.md#redeemsharewithpasswordssharekeypost) | **Post** /s/{share_key} | Redeem Share With Password -*DefaultAPI* | [**RestoreArtifactV0ArtifactsArtIdRestorePost**](docs/DefaultAPI.md#restoreartifactv0artifactsartidrestorepost) | **Post** /v0/artifacts/{art_id}/restore | Restore a soft-deleted artifact -*DefaultAPI* | [**RestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePost**](docs/DefaultAPI.md#restoreartifactversionv0artifactsartidversionsversionnumberrestorepost) | **Post** /v0/artifacts/{art_id}/versions/{version_number}/restore | Restore a previous version as a new head version -*DefaultAPI* | [**RestoreDriveRouteV0DrivesDriveIdRestorePost**](docs/DefaultAPI.md#restoredriveroutev0drivesdriveidrestorepost) | **Post** /v0/drives/{drive_id}/restore | Restore a soft-deleted drive -*DefaultAPI* | [**RestoreFolderByIdV0FoldersFldIdRestorePost**](docs/DefaultAPI.md#restorefolderbyidv0foldersfldidrestorepost) | **Post** /v0/folders/{fld_id}/restore | Restore a soft-deleted folder (cascade) -*DefaultAPI* | [**RotateShareRouteV0SharesShrIdRotatePost**](docs/DefaultAPI.md#rotateshareroutev0sharesshridrotatepost) | **Post** /v0/shares/{shr_id}/rotate | Revoke + reissue a share link's key (requires can_share) -*DefaultAPI* | [**SearchV0SearchGet**](docs/DefaultAPI.md#searchv0searchget) | **Get** /v0/search | Full-text search over artifacts in the drive -*DefaultAPI* | [**ViewArtifactHeadAArtIdHeadGet**](docs/DefaultAPI.md#viewartifactheadaartidheadget) | **Get** /a/{art_id}/head | View Artifact Head -*DefaultAPI* | [**ViewArtifactVersionVArtIdVersionGet**](docs/DefaultAPI.md#viewartifactversionvartidversionget) | **Get** /v/{art_id}/{version} | View Artifact Version -*DefaultAPI* | [**ViewFileDriveIdPathGet**](docs/DefaultAPI.md#viewfiledriveidpathget) | **Get** /{drive_id}/{path} | View File -*DefaultAPI* | [**ViewPermalinkArtifactAArtIdGet**](docs/DefaultAPI.md#viewpermalinkartifactaartidget) | **Get** /a/{art_id} | View Permalink Artifact -*DefaultAPI* | [**ViewPermalinkFolderFFldIdGet**](docs/DefaultAPI.md#viewpermalinkfolderffldidget) | **Get** /f/{fld_id} | View Permalink Folder -*DrivesAPI* | [**CreateDriveKeyRouteV0DrivesDriveIdKeysPost**](docs/DrivesAPI.md#createdrivekeyroutev0drivesdriveidkeyspost) | **Post** /v0/drives/{drive_id}/keys | Create a drive API key -*DrivesAPI* | [**CreateDriveRouteV0DrivesPost**](docs/DrivesAPI.md#createdriveroutev0drivespost) | **Post** /v0/drives | Create a drive in your active space -*DrivesAPI* | [**ListDriveKeysRouteV0DrivesDriveIdKeysGet**](docs/DrivesAPI.md#listdrivekeysroutev0drivesdriveidkeysget) | **Get** /v0/drives/{drive_id}/keys | List a drive's API keys -*DrivesAPI* | [**ListDrivesRouteV0DrivesGet**](docs/DrivesAPI.md#listdrivesroutev0drivesget) | **Get** /v0/drives | List the drives you can see -*DrivesAPI* | [**RenameDriveRouteV0DrivesDriveIdPatch**](docs/DrivesAPI.md#renamedriveroutev0drivesdriveidpatch) | **Patch** /v0/drives/{drive_id} | Rename a drive you own -*DrivesAPI* | [**RevokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePost**](docs/DrivesAPI.md#revokedrivekeyroutev0drivesdriveidkeyskeyidrevokepost) | **Post** /v0/drives/{drive_id}/keys/{key_id}/revoke | Revoke a drive API key -*DrivesAPI* | [**RotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePost**](docs/DrivesAPI.md#rotateonekeyroutev0drivesdriveidkeyskeyidrotatepost) | **Post** /v0/drives/{drive_id}/keys/{key_id}/rotate | Rotate one API key -*McpOauthAPI* | [**Oauth2RegisterOauth2RegisterPost**](docs/McpOauthAPI.md#oauth2registeroauth2registerpost) | **Post** /oauth2/register | Dynamic Client Registration (RFC 7591) -*McpOauthAPI* | [**Oauth2RevokeOauth2RevokePost**](docs/McpOauthAPI.md#oauth2revokeoauth2revokepost) | **Post** /oauth2/revoke | Token revocation (RFC 7009) -*McpOauthUiAPI* | [**AuthorizeDecisionOauth2AuthorizePost**](docs/McpOauthUiAPI.md#authorizedecisionoauth2authorizepost) | **Post** /oauth2/authorize | Authorize Decision -*McpOauthUiAPI* | [**AuthorizePageOauth2AuthorizeGet**](docs/McpOauthUiAPI.md#authorizepageoauth2authorizeget) | **Get** /oauth2/authorize | Authorize Page -*MembersAPI* | [**InviteMemberV0MembersInvitePost**](docs/MembersAPI.md#invitememberv0membersinvitepost) | **Post** /v0/members/invite | Invite a person to your workspace by email -*MembersAPI* | [**ListInvitationsV0InvitationsGet**](docs/MembersAPI.md#listinvitationsv0invitationsget) | **Get** /v0/invitations | List pending invitations -*MembersAPI* | [**ListMembersV0MembersGet**](docs/MembersAPI.md#listmembersv0membersget) | **Get** /v0/members | List the members of your active workspace -*MembersAPI* | [**RemoveMemberV0MembersTargetUserIdDelete**](docs/MembersAPI.md#removememberv0memberstargetuseriddelete) | **Delete** /v0/members/{target_user_id} | Remove a member (or leave) -*MembersAPI* | [**RevokeInvitationV0InvitationsInvitationIdDelete**](docs/MembersAPI.md#revokeinvitationv0invitationsinvitationiddelete) | **Delete** /v0/invitations/{invitation_id} | Revoke a pending invitation -*MembersAPI* | [**SetMemberRoleV0MembersTargetUserIdPatch**](docs/MembersAPI.md#setmemberrolev0memberstargetuseridpatch) | **Patch** /v0/members/{target_user_id} | Change a member's role -*TokensAPI* | [**ListTokensV0TokensGet**](docs/TokensAPI.md#listtokensv0tokensget) | **Get** /v0/tokens | List your user-identity tokens -*TokensAPI* | [**RevokeTokenV0TokensTokenIdRevokePost**](docs/TokensAPI.md#revoketokenv0tokenstokenidrevokepost) | **Post** /v0/tokens/{token_id}/revoke | Revoke one of your user-identity tokens -*WorkspacesAPI* | [**CreateWorkspaceRouteV0WorkspacesPost**](docs/WorkspacesAPI.md#createworkspaceroutev0workspacespost) | **Post** /v0/workspaces | Create a new shared drive -*WorkspacesAPI* | [**ListWorkspacesRouteV0WorkspacesGet**](docs/WorkspacesAPI.md#listworkspacesroutev0workspacesget) | **Get** /v0/workspaces | List the spaces you belong to -*WorkspacesAPI* | [**RenameWorkspaceRouteV0WorkspacesOrgIdPatch**](docs/WorkspacesAPI.md#renameworkspaceroutev0workspacesorgidpatch) | **Patch** /v0/workspaces/{org_id} | Rename a shared drive you administer +*ArtifactsAPI* | [**ArtifactsContent**](docs/ArtifactsAPI.md#artifactscontent) | **Get** /v0/drives/{drive_id}/artifacts/{artifact_id}/content | Read Artifact Content +*ArtifactsAPI* | [**ArtifactsCopy**](docs/ArtifactsAPI.md#artifactscopy) | **Post** /v0/drives/{drive_id}/artifacts/{artifact_id}/copy | Copy Artifact +*ArtifactsAPI* | [**ArtifactsCreate**](docs/ArtifactsAPI.md#artifactscreate) | **Post** /v0/drives/{drive_id}/artifacts | Create Artifact +*ArtifactsAPI* | [**ArtifactsDelete**](docs/ArtifactsAPI.md#artifactsdelete) | **Delete** /v0/drives/{drive_id}/artifacts/{artifact_id} | Delete Artifact +*ArtifactsAPI* | [**ArtifactsList**](docs/ArtifactsAPI.md#artifactslist) | **Get** /v0/drives/{drive_id}/artifacts | List Artifacts +*ArtifactsAPI* | [**ArtifactsRead**](docs/ArtifactsAPI.md#artifactsread) | **Get** /v0/drives/{drive_id}/artifacts/{artifact_id} | Read Artifact +*ArtifactsAPI* | [**ArtifactsRestore**](docs/ArtifactsAPI.md#artifactsrestore) | **Post** /v0/drives/{drive_id}/artifacts/{artifact_id}/restore | Restore Artifact +*ArtifactsAPI* | [**ArtifactsUpdate**](docs/ArtifactsAPI.md#artifactsupdate) | **Patch** /v0/drives/{drive_id}/artifacts/{artifact_id} | Update Artifact +*ChangesAPI* | [**ChangesList**](docs/ChangesAPI.md#changeslist) | **Get** /v0/drives/{drive_id}/changes | List Changes +*DefaultAPI* | [**Health**](docs/DefaultAPI.md#health) | **Get** /health | Health +*DiscoveryAPI* | [**OauthProtectedResource**](docs/DiscoveryAPI.md#oauthprotectedresource) | **Get** /.well-known/oauth-protected-resource | Protected-resource metadata (RFC 9728) +*DrivesAPI* | [**DrivesCreate**](docs/DrivesAPI.md#drivescreate) | **Post** /v0/drives | Create Drive +*DrivesAPI* | [**DrivesDelete**](docs/DrivesAPI.md#drivesdelete) | **Delete** /v0/drives/{drive_id} | Delete Drive +*DrivesAPI* | [**DrivesList**](docs/DrivesAPI.md#driveslist) | **Get** /v0/drives | List Drives +*DrivesAPI* | [**DrivesRead**](docs/DrivesAPI.md#drivesread) | **Get** /v0/drives/{drive_id} | Read Drive +*DrivesAPI* | [**DrivesRestore**](docs/DrivesAPI.md#drivesrestore) | **Post** /v0/drives/{drive_id}/restore | Restore Drive +*DrivesAPI* | [**DrivesUpdate**](docs/DrivesAPI.md#drivesupdate) | **Patch** /v0/drives/{drive_id} | Update Drive +*DrivesAPI* | [**DrivesUsage**](docs/DrivesAPI.md#drivesusage) | **Get** /v0/drives/{drive_id}/usage | Drive Usage +*FoldersAPI* | [**FoldersCopy**](docs/FoldersAPI.md#folderscopy) | **Post** /v0/drives/{drive_id}/folders/{folder_id}/copy | Copy Folder +*FoldersAPI* | [**FoldersCreate**](docs/FoldersAPI.md#folderscreate) | **Post** /v0/drives/{drive_id}/folders | Create Folder +*FoldersAPI* | [**FoldersDelete**](docs/FoldersAPI.md#foldersdelete) | **Delete** /v0/drives/{drive_id}/folders/{folder_id} | Delete Folder +*FoldersAPI* | [**FoldersList**](docs/FoldersAPI.md#folderslist) | **Get** /v0/drives/{drive_id}/folders | List Folders +*FoldersAPI* | [**FoldersRead**](docs/FoldersAPI.md#foldersread) | **Get** /v0/drives/{drive_id}/folders/{folder_id} | Read Folder +*FoldersAPI* | [**FoldersRestore**](docs/FoldersAPI.md#foldersrestore) | **Post** /v0/drives/{drive_id}/folders/{folder_id}/restore | Restore Folder +*FoldersAPI* | [**FoldersUpdate**](docs/FoldersAPI.md#foldersupdate) | **Patch** /v0/drives/{drive_id}/folders/{folder_id} | Update Folder +*GrantsAPI* | [**GrantsCreate**](docs/GrantsAPI.md#grantscreate) | **Post** /v0/drives/{drive_id}/grants | Create Grant +*GrantsAPI* | [**GrantsList**](docs/GrantsAPI.md#grantslist) | **Get** /v0/drives/{drive_id}/grants | List Grants +*GrantsAPI* | [**GrantsRead**](docs/GrantsAPI.md#grantsread) | **Get** /v0/drives/{drive_id}/grants/{grant_id} | Read Grant +*GrantsAPI* | [**GrantsRevoke**](docs/GrantsAPI.md#grantsrevoke) | **Delete** /v0/drives/{drive_id}/grants/{grant_id} | Revoke Grant +*GrantsAPI* | [**GrantsUpdate**](docs/GrantsAPI.md#grantsupdate) | **Patch** /v0/drives/{drive_id}/grants/{grant_id} | Update Grant +*SearchAPI* | [**DriveSearch**](docs/SearchAPI.md#drivesearch) | **Get** /v0/drives/{drive_id}/search | Drive Search +*SharesAPI* | [**SharesCreate**](docs/SharesAPI.md#sharescreate) | **Post** /v0/drives/{drive_id}/shares | Create Share +*SharesAPI* | [**SharesList**](docs/SharesAPI.md#shareslist) | **Get** /v0/drives/{drive_id}/shares | List Shares +*SharesAPI* | [**SharesRead**](docs/SharesAPI.md#sharesread) | **Get** /v0/drives/{drive_id}/shares/{share_id} | Read Share +*SharesAPI* | [**SharesRevoke**](docs/SharesAPI.md#sharesrevoke) | **Delete** /v0/drives/{drive_id}/shares/{share_id} | Revoke Share +*SharesAPI* | [**SharesRotate**](docs/SharesAPI.md#sharesrotate) | **Post** /v0/drives/{drive_id}/shares/{share_id}/rotate | Rotate Share +*SharesRedemptionAPI* | [**SharesRedeem**](docs/SharesRedemptionAPI.md#sharesredeem) | **Get** /s/{share_key} | Redeem Share +*VersionsAPI* | [**VersionsAppend**](docs/VersionsAPI.md#versionsappend) | **Post** /v0/drives/{drive_id}/artifacts/{artifact_id}/versions | Append Version +*VersionsAPI* | [**VersionsContent**](docs/VersionsAPI.md#versionscontent) | **Get** /v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}/content | Read Version Content +*VersionsAPI* | [**VersionsList**](docs/VersionsAPI.md#versionslist) | **Get** /v0/drives/{drive_id}/artifacts/{artifact_id}/versions | List Versions +*VersionsAPI* | [**VersionsRead**](docs/VersionsAPI.md#versionsread) | **Get** /v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id} | Read Version +*VersionsAPI* | [**VersionsRestore**](docs/VersionsAPI.md#versionsrestore) | **Post** /v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}/restore | Restore Version ## Documentation For Models - - [AgentAuthMetadataOut](docs/AgentAuthMetadataOut.md) - - [AnonymousIdentityResponse](docs/AnonymousIdentityResponse.md) - - [ArtifactDeleteOut](docs/ArtifactDeleteOut.md) - - [ArtifactHeadOut](docs/ArtifactHeadOut.md) - - [ArtifactMoveIn](docs/ArtifactMoveIn.md) + - [ArtifactCopyIn](docs/ArtifactCopyIn.md) + - [ArtifactListOut](docs/ArtifactListOut.md) - [ArtifactOut](docs/ArtifactOut.md) - - [ArtifactPatchIn](docs/ArtifactPatchIn.md) - - [ArtifactSource](docs/ArtifactSource.md) - - [AuthorizationServerMetadataOut](docs/AuthorizationServerMetadataOut.md) - - [AuthorizeDecisionOauth2AuthorizePost403Response](docs/AuthorizeDecisionOauth2AuthorizePost403Response.md) - - [ClaimInitRequest](docs/ClaimInitRequest.md) - - [ClaimInitResponse](docs/ClaimInitResponse.md) - - [ClaimMetadata](docs/ClaimMetadata.md) - - [ClientRegistrationOut](docs/ClientRegistrationOut.md) - - [CompileDiagnosticOut](docs/CompileDiagnosticOut.md) - - [CompileJobIn](docs/CompileJobIn.md) - - [CompileJobListOut](docs/CompileJobListOut.md) - - [CompileJobOut](docs/CompileJobOut.md) - - [CompileOptions](docs/CompileOptions.md) - - [CompileProjectOut](docs/CompileProjectOut.md) - - [CopyIn](docs/CopyIn.md) - - [DatasetDescriptionOut](docs/DatasetDescriptionOut.md) - - [DescribeIn](docs/DescribeIn.md) - - [DownloadUrlOut](docs/DownloadUrlOut.md) - - [DriveApiKeyCreateIn](docs/DriveApiKeyCreateIn.md) - - [DriveApiKeyCreateOut](docs/DriveApiKeyCreateOut.md) - - [DriveApiKeyListOut](docs/DriveApiKeyListOut.md) - - [DriveApiKeyOut](docs/DriveApiKeyOut.md) + - [ArtifactUpdateIn](docs/ArtifactUpdateIn.md) + - [ChangeActorOut](docs/ChangeActorOut.md) + - [ChangeOut](docs/ChangeOut.md) + - [ChangePageOut](docs/ChangePageOut.md) + - [ChangeResourceOut](docs/ChangeResourceOut.md) - [DriveCreateIn](docs/DriveCreateIn.md) - - [DriveCreateOut](docs/DriveCreateOut.md) - - [DriveDeleteOut](docs/DriveDeleteOut.md) - - [DriveList](docs/DriveList.md) + - [DriveListOut](docs/DriveListOut.md) - [DriveOut](docs/DriveOut.md) - - [DriveReadOut](docs/DriveReadOut.md) - - [DriveRenameIn](docs/DriveRenameIn.md) - - [DriveRestoreOut](docs/DriveRestoreOut.md) + - [DriveUpdateIn](docs/DriveUpdateIn.md) - [DriveUsageOut](docs/DriveUsageOut.md) - - [ErrorBody](docs/ErrorBody.md) - - [ErrorDetail](docs/ErrorDetail.md) + - [DrivesCreate400Response](docs/DrivesCreate400Response.md) + - [DrivesCreate400ResponseError](docs/DrivesCreate400ResponseError.md) + - [DrivesList400Response](docs/DrivesList400Response.md) + - [DrivesList400ResponseError](docs/DrivesList400ResponseError.md) - [ErrorResponse](docs/ErrorResponse.md) - - [EventOut](docs/EventOut.md) - - [EventPage](docs/EventPage.md) - - [ExtensionExchangeRequest](docs/ExtensionExchangeRequest.md) - - [ExtensionExchangeResponse](docs/ExtensionExchangeResponse.md) - - [FeedbackCreateOut](docs/FeedbackCreateOut.md) - - [FeedbackStatusOut](docs/FeedbackStatusOut.md) - - [FindHitOut](docs/FindHitOut.md) - - [FindPage](docs/FindPage.md) + - [FolderCascadeOut](docs/FolderCascadeOut.md) - [FolderCopyIn](docs/FolderCopyIn.md) - - [FolderCopyOut](docs/FolderCopyOut.md) - [FolderCreateIn](docs/FolderCreateIn.md) - - [FolderDeleteOut](docs/FolderDeleteOut.md) - - [FolderMoveIn](docs/FolderMoveIn.md) + - [FolderListOut](docs/FolderListOut.md) - [FolderOut](docs/FolderOut.md) - - [FolderPatchIn](docs/FolderPatchIn.md) - - [FolderRestoreOut](docs/FolderRestoreOut.md) + - [FolderUpdateIn](docs/FolderUpdateIn.md) - [GrantCreateIn](docs/GrantCreateIn.md) - - [GrantList](docs/GrantList.md) + - [GrantListOut](docs/GrantListOut.md) - [GrantOut](docs/GrantOut.md) - - [GrantPatchIn](docs/GrantPatchIn.md) - - [GrantPrincipalIn](docs/GrantPrincipalIn.md) + - [GrantUpdateIn](docs/GrantUpdateIn.md) - [HealthDegradedDetail](docs/HealthDegradedDetail.md) - [HealthDegradedResponse](docs/HealthDegradedResponse.md) - [HealthOut](docs/HealthOut.md) - - [HourlyUsageCounterOut](docs/HourlyUsageCounterOut.md) - - [IdentityAssertionMetadataOut](docs/IdentityAssertionMetadataOut.md) - - [InvitationList](docs/InvitationList.md) - - [InvitationOut](docs/InvitationOut.md) - - [InviteCreateOut](docs/InviteCreateOut.md) - - [JwkOut](docs/JwkOut.md) - - [JwksOut](docs/JwksOut.md) - - [LookupValuesIn](docs/LookupValuesIn.md) - - [LookupValuesOut](docs/LookupValuesOut.md) - - [MemberInviteIn](docs/MemberInviteIn.md) - - [MemberList](docs/MemberList.md) - - [MemberOut](docs/MemberOut.md) - - [MemberRemoveOut](docs/MemberRemoveOut.md) - - [MemberRoleIn](docs/MemberRoleIn.md) - - [OAuthProtocolErrorOut](docs/OAuthProtocolErrorOut.md) - - [OperationUsageOut](docs/OperationUsageOut.md) - - [Page](docs/Page.md) - - [ProjectConfigIn](docs/ProjectConfigIn.md) - - [ProtectedResourceMetadataOut](docs/ProtectedResourceMetadataOut.md) - - [QueryColumnOut](docs/QueryColumnOut.md) - - [QueryDryRunOut](docs/QueryDryRunOut.md) - - [QueryIn](docs/QueryIn.md) - - [QueryResultOut](docs/QueryResultOut.md) - - [RegisterAgentIdentityAgentIdentityPost422Response](docs/RegisterAgentIdentityAgentIdentityPost422Response.md) - - [ResponsePostQueryV0QueryPost](docs/ResponsePostQueryV0QueryPost.md) - - [RevokeOut](docs/RevokeOut.md) - [SearchHitOut](docs/SearchHitOut.md) - - [SearchPage](docs/SearchPage.md) + - [SearchPageOut](docs/SearchPageOut.md) - [ShareCreateIn](docs/ShareCreateIn.md) - - [ShareErrorOut](docs/ShareErrorOut.md) - - [ShareList](docs/ShareList.md) - - [ShareMintOut](docs/ShareMintOut.md) + - [ShareCreateOut](docs/ShareCreateOut.md) + - [ShareListOut](docs/ShareListOut.md) - [ShareOut](docs/ShareOut.md) - - [ShareRedeemOut](docs/ShareRedeemOut.md) - - [SourceRef](docs/SourceRef.md) - - [StorageBreakdownOut](docs/StorageBreakdownOut.md) - - [StorageFootprintOut](docs/StorageFootprintOut.md) - - [TokenResponse](docs/TokenResponse.md) - - [TokenUsageOut](docs/TokenUsageOut.md) - - [TrashArtifactOut](docs/TrashArtifactOut.md) - - [TrashDriveOut](docs/TrashDriveOut.md) - - [TrashOut](docs/TrashOut.md) - - [UploadAbortOut](docs/UploadAbortOut.md) - - [UploadBeginIn](docs/UploadBeginIn.md) - - [UploadBeginOut](docs/UploadBeginOut.md) - - [UploadStatusOut](docs/UploadStatusOut.md) - - [UsageCounterOut](docs/UsageCounterOut.md) - - [UsagePeriodOut](docs/UsagePeriodOut.md) - - [UserTokenList](docs/UserTokenList.md) - - [UserTokenOut](docs/UserTokenOut.md) - - [ValidationErrorBody](docs/ValidationErrorBody.md) - - [ValidationErrorDetail](docs/ValidationErrorDetail.md) + - [V0ErrorEnvelope](docs/V0ErrorEnvelope.md) - [ValidationErrorResponse](docs/ValidationErrorResponse.md) - - [ValidationIssue](docs/ValidationIssue.md) + - [ValidationErrorResponseError](docs/ValidationErrorResponseError.md) + - [ValidationErrorResponseErrorDetails](docs/ValidationErrorResponseErrorDetails.md) + - [ValidationErrorResponseErrorDetailsFieldsInner](docs/ValidationErrorResponseErrorDetailsFieldsInner.md) + - [VersionCreatedOut](docs/VersionCreatedOut.md) + - [VersionListOut](docs/VersionListOut.md) - [VersionOut](docs/VersionOut.md) - - [VersionPage](docs/VersionPage.md) - - [VersionRetentionOut](docs/VersionRetentionOut.md) - - [WorkspaceCreateIn](docs/WorkspaceCreateIn.md) - - [WorkspaceCreateOut](docs/WorkspaceCreateOut.md) - - [WorkspaceList](docs/WorkspaceList.md) - - [WorkspaceOut](docs/WorkspaceOut.md) - - [WorkspaceRenameIn](docs/WorkspaceRenameIn.md) ## Documentation For Authorization Authentication schemes defined for the API: -### BearerAuth +### bearerAuth - **Type**: HTTP Bearer token authentication diff --git a/sdk/go/api/openapi.yaml b/sdk/go/api/openapi.yaml index c59863f..42ac796 100644 --- a/sdk/go/api/openapi.yaml +++ b/sdk/go/api/openapi.yaml @@ -1,151 +1,180 @@ openapi: 3.1.0 info: - description: "AgentDrive is an agent-focused artifact store: upload by path, share\ - \ by rendered URL, address by stable permalink. The REST surface is documented\ - \ here; the rendered viewer + agent claim flow live under `agentdrive.run`." + description: "AgentDrive is an agent-focused artifact store: drive-scoped folders,\ + \ artifacts, and immutable versions, with local grants, possession-based share\ + \ links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated\ + \ with Hub-issued product tokens (see /.well-known/oauth-protected-resource);\ + \ every mutation takes an Idempotency-Key, and existing-state mutations take If-Match." title: AgentDrive version: servers: - description: AgentDrive public API url: https://api.agentdrive.run paths: - /.well-known/jwks.json: + /.well-known/oauth-protected-resource: get: - description: Public half of the RSA signing key for identity_assertion + access_token - JWTs issued by AgentDrive. RFC 7517 shape. Cache-friendly; key rotation publishes - both kids during the overlap window. - operationId: jwks__well_known_jwks_json_get + description: Names the reset v0 surface as a protected resource and points clients + at Hub — the only authorization server whose product tokens this deployment + accepts. + operationId: oauth_protected_resource responses: "200": content: application/json: schema: - $ref: "#/components/schemas/JwksOut" + additionalProperties: + nullable: true + title: Response Oauth Protected Resource description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - summary: JSON Web Key Set — public keys for verifying AgentDrive JWTs + summary: Protected-resource metadata (RFC 9728) tags: - - agent-auth - /.well-known/oauth-authorization-server: + - discovery + /health: get: - description: Discovery document for the auth.md protocol. Carries the standard - RFC 8414 fields plus an `agent_auth` block per the auth.md spec — the latter - is what an agent runtime keys off to find the identity + claim endpoints. - operationId: oauth_authorization_server__well_known_oauth_authorization_server_get + description: |- + Liveness + DB-reachability probe. Used by Cloud Run / k8s healthchecks + and any uptime monitor. Returns 200 only if the DB pool can serve a + trivial query; 503 otherwise so the orchestrator can pull the instance + out of rotation. + + NOTE: route is `/health`, NOT `/healthz`. Google's edge infrastructure + intercepts `/healthz` (legacy kubernetes-reserved path) and returns a + generic 404 before traffic reaches Cloud Run — discovered the hard way + during the first prod deploy. Don't rename back. + operationId: health responses: "200": content: application/json: schema: - $ref: "#/components/schemas/AuthorizationServerMetadataOut" + $ref: "#/components/schemas/HealthOut" description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false + "503": + content: + application/json: schema: - type: string - style: simple - summary: Authorization-server metadata (RFC 8414 + auth.md agent_auth block) - tags: - - agent-auth - /.well-known/oauth-protected-resource: + $ref: "#/components/schemas/HealthDegradedResponse" + description: The database reachability probe failed. + summary: Health + /s/{share_key}: get: - description: Names this server as a protected resource and points clients at - the authorization server they should obtain tokens from. In this design the - resource server and authorization server are the same host. - operationId: oauth_protected_resource__well_known_oauth_protected_resource_get + description: |- + The un-slashed form. Browsers are canonicalized onto `/s/{key}/`. + + This inherits the published `shares_redeem` operation id from the route it + replaced, because for an API client it *is* that operation, unchanged: + same URL, same JSON `Accept`, same bytes, same uniform 404. Only the + browser arm is new. Dropping it from the spec would have described the + route as gone while it kept answering. + + The page links its own sub-resources relatively (`content`), and relative + resolution replaces the last path segment: from `/s/KEY` that reaches + `/s/content`, from `/s/KEY/` it reaches `/s/KEY/content`. The trailing + slash is what makes an image on a share page load at all. Links already in + the wild have no slash, so this redirect is how they keep working. + + It is unconditional and runs before any lookup — redirecting only for keys + that resolve would turn the status code into an existence oracle and undo + the anti-enumeration property the rest of this module maintains. + + Only browsers are moved. JSON and byte clients are answered in place, so + the shipped v0 contract for this URL is unchanged, redirect included. + operationId: shares_redeem + parameters: + - explode: false + in: path + name: share_key + required: true + schema: + title: Share Key + type: string + style: simple responses: "200": content: application/json: - schema: - $ref: "#/components/schemas/ProtectedResourceMetadataOut" + schema: {} description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - summary: Protected-resource metadata (auth.md / RFC 9728-like discovery) - tags: - - agent-auth - /.well-known/oauth-protected-resource/mcp: - get: - description: "Path-inserted variant of the protected-resource document. MCP\ - \ clients derive this URL from the resource URL `{origin}/mcp` (RFC 9728 §\ - 3.1: insert the well-known segment between host and path) after reading the\ - \ WWW-Authenticate challenge on a 401 — it is the first hop of the client-side\ - \ OAuth flow." - operationId: oauth_protected_resource_mcp__well_known_oauth_protected_resource_mcp_get - responses: - "200": + "422": content: application/json: schema: - $ref: "#/components/schemas/ProtectedResourceMetadataOut" - description: Successful Response + $ref: "#/components/schemas/ValidationErrorResponse" + description: Request validation failed. headers: X-Request-Id: description: Request correlation identifier. explode: false schema: + nullable: true type: string style: simple - summary: Protected-resource metadata for the MCP endpoint (RFC 9728 §3.1) + summary: Redeem Share tags: - - agent-auth - /a/{art_id}: + - shares-redemption + /v0/drives: get: description: |- - Resolve a stable artifact ID to its path-URL and 302 there. + List the actor's workspace drives, newest-first (keyset paginated). - Auth model matches the path URL: public artifacts redirect for - anyone; private artifacts redirect only for the owner. Non-owners - on private artifacts get 404 — same response as "doesn't exist", - so the ID's existence isn't leaked. The forwarded query-param - allowlist is `raw`, `download` (see _PERMALINK_FORWARDED_PARAMS). - operationId: view_permalink_artifact_a__art_id__get + ``lifecycle`` (active|deleted|all) exposes soft-deleted drives so a + manager can read the post-delete revision as the If-Match source for a + restore. Unknown query parameters are rejected (§6.3). + operationId: drives_list parameters: + - explode: true + in: query + name: lifecycle + required: false + schema: + default: active + title: Lifecycle + type: string + style: form + - explode: true + in: query + name: limit + required: false + schema: + nullable: true + type: integer + style: form + - explode: true + in: query + name: cursor + required: false + schema: + nullable: true + type: string + style: form - explode: false - in: path - name: art_id - required: true + in: header + name: authorization + required: false schema: - title: Art Id + nullable: true type: string style: simple responses: - "302": - description: Redirect to the canonical or authentication URL. - headers: - Location: - description: Redirect target. - explode: false + "200": + content: + application/json: schema: - format: uri-reference - type: string - style: simple + $ref: "#/components/schemas/DriveListOut" + description: Successful Response + headers: X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "404": + "400": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The artifact does not exist or is not readable. + $ref: "#/components/schemas/drives_list_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." headers: X-Request-Id: description: Request correlation identifier. @@ -153,66 +182,32 @@ paths: schema: type: string style: simple - "422": + "401": content: application/json: schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. + $ref: "#/components/schemas/drives_list_400_response" + description: Missing or invalid bearer token. headers: - X-Request-Id: - description: Request correlation identifier. + WWW-Authenticate: + description: RFC 6750 bearer authentication challenge. explode: false schema: + nullable: true type: string style: simple - summary: View Permalink Artifact - /a/{art_id}/head: - get: - description: |- - Return `{"version": }` for a readable artifact. - - Auth mirrors the permalink/viewer: the owner, or an `anyone:viewer` - grant (a published artifact), reads. Two deliberate differences from - the HTML viewer: - - * Never redirect to login. A poll is a background `fetch`, not a - navigation — an HTML login page would be a useless body and a - same-origin redirect the client can't act on. Anonymous callers - on a private/absent artifact get a flat 404. - * "Doesn't exist" and "exists but not readable" collapse to the - same 404, so an anonymous poller can't use this as an existence - oracle (matches the permalink/viewer leak guard). - operationId: view_artifact_head_a__art_id__head_get - parameters: - - explode: false - in: path - name: art_id - required: true - schema: - title: Art Id - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/ArtifactHeadOut" - description: Successful Response - headers: X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "422": + "403": content: application/json: schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. + $ref: "#/components/schemas/drives_list_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -220,31 +215,12 @@ paths: schema: type: string style: simple - summary: View Artifact Head - /agent/identity: - post: - description: |- - Two registration modes: - - **`type=anonymous`** — Provisions a brand-new agent identity bound to a fresh shadow-org drive. No human involved; returned `identity_assertion` carries `scope=pre_claim`. A human completes the claim ceremony later via /claim. - - **`type=identity_assertion`** — Agent provider (e.g. WorkOS) has already minted an ID-JAG asserting a user identity binding. We verify it against the provider's JWKS and provision a **claimed** identity immediately: scope=full, drive bound to the user, no claim ceremony needed. - operationId: register_agent_identity_agent_identity_post - requestBody: - content: - application/json: - schema: - additionalProperties: - nullable: true - title: Body - required: true - responses: - "200": + "404": content: application/json: schema: - $ref: "#/components/schemas/AnonymousIdentityResponse" - description: Successful Response + $ref: "#/components/schemas/drives_list_400_response" + description: The resource was not found or is not visible to the caller. headers: X-Request-Id: description: Request correlation identifier. @@ -256,7 +232,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/register_agent_identity_agent_identity_post_422_response" + $ref: "#/components/schemas/ValidationErrorResponse" description: Request validation failed. headers: X-Request-Id: @@ -265,134 +241,98 @@ paths: schema: type: string style: simple - "503": + "429": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Agent identity signing is not configured. + $ref: "#/components/schemas/drives_list_400_response" + description: Rate limited. headers: - X-Request-Id: - description: Request correlation identifier. + Retry-After: + description: Seconds until the caller should retry. explode: false schema: - type: string + minimum: 0 + type: integer style: simple - summary: Register an agent identity (anonymous or ID-JAG) - tags: - - agent-auth - /agent/identity/claim: - post: - description: "Returns a `user_code` and `verification_uri` (RFC 8628 device-code\ - \ idiom). The agent surfaces these to the human, who visits the URI, signs\ - \ in, and approves the claim. The agent then polls POST /oauth2/token (grant_type=claim)\ - \ with the same `claim_token` to learn when the claim completes." - operationId: initiate_claim_agent_identity_claim_post - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ClaimInitRequest" - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/ClaimInitResponse" - description: Successful Response - headers: X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "422": + "503": content: application/json: schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. + $ref: "#/components/schemas/drives_list_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - summary: Initiate the human-claim ceremony for an agent identity + security: + - bearerAuth: [] + summary: List Drives tags: - - agent-auth - /auth/callback: - get: + - drives + post: description: |- - Complete a sign-in. - - Handles the auth provider's OAuth callback and shapes failures into - user-readable errors: - * an invalid or expired login flow — LOGIN_FLOW_INVALID (400); - * an invalid or already-used authorization code — AUTH_CODE_INVALID (400); - * the upstream auth provider being unavailable — WORKOS_UNAVAILABLE (502), - returned with Retry-After. - operationId: callback_auth_callback_get + Create a drive with its structural root folder and creator-manager + grant(s) in one transaction; idempotent under the ``Idempotency-Key``. + operationId: drives_create parameters: - - explode: true - in: query - name: code - required: false - schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. - nullable: true - type: string - style: form - - explode: true - in: query - name: state - required: false + - explode: false + in: header + name: Idempotency-Key + required: true schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. nullable: true type: string - style: form - - explode: true - in: query - name: error + style: simple + - explode: false + in: header + name: authorization required: false schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. nullable: true type: string - style: form + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DriveCreateIn" + required: true responses: - "200": + "201": content: - text/html: + application/json: schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. - nullable: true - type: string - description: Extension authentication handoff page. + $ref: "#/components/schemas/DriveOut" + description: Successful Response headers: - X-Request-Id: - description: Request correlation identifier. + ETag: + description: Current strong entity tag. explode: false schema: + nullable: true type: string style: simple - "302": - description: Redirect to the canonical or authentication URL. - headers: Location: - description: Redirect target. + description: Canonical URL of the created resource. explode: false schema: format: uri-reference @@ -408,8 +348,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The login flow or authorization code is invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." headers: X-Request-Id: description: Request correlation identifier. @@ -417,33 +357,31 @@ paths: schema: type: string style: simple - "409": + "401": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - text/html: + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. + headers: + WWW-Authenticate: + description: RFC 6750 bearer authentication challenge. + explode: false schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. - nullable: true type: string - description: Account recovery is required or the Hub principal conflicts - with the existing account link. - headers: + style: simple X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "422": + "403": content: application/json: schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -451,90 +389,71 @@ paths: schema: type: string style: simple - "502": + "404": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The upstream identity provider is temporarily unavailable. + $ref: "#/components/schemas/drives_list_400_response" + description: The parent or target resource was not found or is not visible. headers: - Retry-After: - description: Seconds until the caller should retry. + X-Request-Id: + description: Request correlation identifier. explode: false schema: - minimum: 0 - type: integer + type: string style: simple + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_list_400_response" + description: "A sibling already occupies the name/path, or the idempotency\ + \ key was reused for a different request." + headers: X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "503": + "412": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Extension authentication is temporarily disabled. + $ref: "#/components/schemas/drives_list_400_response" + description: If-Match did not match (copy/restore preconditions). headers: - X-Request-Id: - description: Request correlation identifier. + ETag: + description: Current strong entity tag. explode: false schema: type: string style: simple - summary: Callback - /auth/extension/start: - get: - description: |- - Begin a sign-in flow on behalf of a Chrome extension. - - Provider follows AUTH_MODE (WorkOS AuthKit or the TokenCanopy hub), - exactly like /auth/login. Stamps `for=ext` + `ext_id` into the - signed OAuth state so the callback handler knows to render the - extension handoff page instead of setting a session cookie. - - Three short-circuits, all surface as actionable errors: - * EXTENSION_AUTH_DISABLED (503): kill switch flipped off. - * UNKNOWN_EXTENSION (400): `ext_id` not on the allow-list. - * Missing `ext_id` query string (400 INVALID_REQUEST). - operationId: extension_start_auth_extension_start_get - parameters: - - explode: true - in: query - name: ext_id - required: false - schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. - nullable: true - type: string - style: form - responses: - "302": - description: Redirect to the canonical or authentication URL. - headers: - Location: - description: Redirect target. + X-Request-Id: + description: Request correlation identifier. explode: false schema: - format: uri-reference type: string style: simple + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/ValidationErrorResponse" + description: Request validation failed. + headers: X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "400": + "428": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The extension ID is missing or not allowed. + $ref: "#/components/schemas/drives_list_400_response" + description: If-Match is required for this mutation. headers: X-Request-Id: description: Request correlation identifier. @@ -542,13 +461,20 @@ paths: schema: type: string style: simple - "422": + "429": content: application/json: schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. headers: + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple X-Request-Id: description: Request correlation identifier. explode: false @@ -559,49 +485,80 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Extension authentication is temporarily disabled. + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - summary: Extension Start - /auth/login: - get: + security: + - bearerAuth: [] + summary: Create Drive + tags: + - drives + /v0/drives/{drive_id}: + delete: description: |- - Begin a WorkOS sign-in flow. - - Mints a pre-login state cookie (binds the OAuth flow to this - browser — defense-in-depth against login-CSRF), signs a state - payload, and redirects to AuthKit. The hosted AuthKit page lets - the user pick Google OAuth, Microsoft OAuth, magic-link, - password, or passkey; we don't care which — they all funnel - back to /auth/callback with a `code` we exchange in D2. - operationId: login_auth_login_get + Soft-delete a drive. Returns 200 with the deleted representation so the + client has the post-delete revision/ETag for a restore. + operationId: drives_delete parameters: - - explode: true - in: query - name: return_to + - explode: false + in: path + name: drive_id + required: true + schema: + title: Drive Id + type: string + style: simple + - explode: false + in: header + name: Idempotency-Key + required: true + schema: + nullable: true + type: string + style: simple + - explode: false + in: header + name: If-Match + required: true + schema: + nullable: true + type: string + style: simple + - explode: false + in: header + name: authorization required: false schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. nullable: true type: string - style: form + style: simple responses: - "302": - description: Redirect to the canonical or authentication URL. + "200": + content: + application/json: + schema: + $ref: "#/components/schemas/DriveOut" + description: Successful Response headers: - Location: - description: Redirect target. + ETag: + description: Current strong entity tag. explode: false schema: - format: uri-reference type: string style: simple X-Request-Id: @@ -610,12 +567,12 @@ paths: schema: type: string style: simple - "422": + "400": content: application/json: schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." headers: X-Request-Id: description: Request correlation identifier. @@ -623,49 +580,17 @@ paths: schema: type: string style: simple - summary: Login - /auth/logout: - post: - description: |- - Terminate both the local session AND the upstream WorkOS session. - - Without the WorkOS-side termination, the next `/auth/login` flow - silently re-authenticates the user through AuthKit's still-valid - session cookie on `api.workos.com` — "Sign out" feels broken and - a shared-browser user can't switch accounts. The recommended - pattern (per https://workos.com/docs/authkit/sessions) is to - redirect to the WorkOS logout endpoint with the `sid` we stashed - during the callback; WorkOS clears its own session and returns - the browser to our `return_to`. - - Failure modes handled: - * No `workos_session_id` in the session (legacy v2 cookie issued - before this slice landed): fall back to local-only logout. The - upstream session lingers but the user's local state is cleared - — same UX as before this slice; cookie rotation on next sign-in - eventually overwrites it. - * SDK raises during `get_logout_url`: pure string formatting at - WorkOS's end, so the only realistic failure is a misconfigured - WorkOS dashboard (no Sign-out redirect registered). We catch - and fall back to local-only logout rather than 500ing — the - user clicked "Sign out", they should land somewhere, not on an - error page. - operationId: logout_auth_logout_post - requestBody: - content: - application/x-www-form-urlencoded: - schema: - $ref: "#/components/schemas/Body_logout_auth_logout_post" - required: true - responses: - "302": - description: Redirect to the canonical or authentication URL. + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: - Location: - description: Redirect target. + WWW-Authenticate: + description: RFC 6750 bearer authentication challenge. explode: false schema: - format: uri-reference type: string style: simple X-Request-Id: @@ -678,8 +603,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The browser CSRF check failed. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -687,12 +612,12 @@ paths: schema: type: string style: simple - "422": + "404": content: application/json: schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. headers: X-Request-Id: description: Request correlation identifier. @@ -700,36 +625,30 @@ paths: schema: type: string style: simple - summary: Logout - /f/{fld_id}: - get: - description: |- - Resolve a stable folder ID to its current path-URL and 302. - - Auth model mirrors the artifact permalink: public folder = anon - OK; private folder = owner only, otherwise 404 (no existence - leak). "Public" is an `anyone:viewer` grant on the `fld_*` id - resolved through `can_read` (§4.4); folders carry no visibility - flag of their own. - operationId: view_permalink_folder_f__fld_id__get - parameters: - - explode: false - in: path - name: fld_id - required: true - schema: - title: Fld Id - type: string - style: simple - responses: - "302": - description: Redirect to the canonical or authentication URL. + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_list_400_response" + description: "The mutation conflicts with current state (name/path, lifecycle)." headers: - Location: - description: Redirect target. + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "412": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_list_400_response" + description: If-Match did not match the resource's current revision. + headers: + ETag: + description: Current strong entity tag. explode: false schema: - format: uri-reference type: string style: simple X-Request-Id: @@ -738,12 +657,12 @@ paths: schema: type: string style: simple - "404": + "422": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The folder does not exist or is not readable. + $ref: "#/components/schemas/ValidationErrorResponse" + description: Request validation failed. headers: X-Request-Id: description: Request correlation identifier. @@ -751,12 +670,12 @@ paths: schema: type: string style: simple - "422": + "428": content: application/json: schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match is required for this mutation. headers: X-Request-Id: description: Request correlation identifier. @@ -764,28 +683,20 @@ paths: schema: type: string style: simple - summary: View Permalink Folder - /health: - get: - description: |- - Liveness + DB-reachability probe. Used by Cloud Run / k8s healthchecks - and any uptime monitor. Returns 200 only if the DB pool can serve a - trivial query; 503 otherwise so the orchestrator can pull the instance - out of rotation. - - NOTE: route is `/health`, NOT `/healthz`. Google's edge infrastructure - intercepts `/healthz` (legacy kubernetes-reserved path) and returns a - generic 404 before traffic reaches Cloud Run — discovered the hard way - during the first prod deploy. Don't rename back. - operationId: health_health_get - responses: - "200": + "429": content: application/json: schema: - $ref: "#/components/schemas/HealthOut" - description: Successful Response + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. headers: + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple X-Request-Id: description: Request correlation identifier. explode: false @@ -796,45 +707,86 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/HealthDegradedResponse" - description: The database reachability probe failed. + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - summary: Health - /oauth2/authorize: + security: + - bearerAuth: [] + summary: Delete Drive + tags: + - drives get: - operationId: authorize_page_oauth2_authorize_get + description: |- + Read one active drive. ETag = quoted revision; matching + ``If-None-Match`` → 304. Deleted and cross-workspace drives are 404. + operationId: drives_read + parameters: + - explode: false + in: path + name: drive_id + required: true + schema: + title: Drive Id + type: string + style: simple + - explode: false + in: header + name: If-None-Match + required: false + schema: + nullable: true + type: string + style: simple + - explode: false + in: header + name: authorization + required: false + schema: + nullable: true + type: string + style: simple responses: "200": content: - text/html: + application/json: schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. - nullable: true - type: string + $ref: "#/components/schemas/DriveOut" description: Successful Response headers: + ETag: + description: Current strong entity tag. + explode: false + schema: + type: string + style: simple X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "302": - description: Redirect to the canonical or authentication URL. + "304": + description: If-None-Match matched the current ETag. headers: - Location: - description: Redirect target. + ETag: + description: Current strong entity tag. explode: false schema: - format: uri-reference type: string style: simple X-Request-Id: @@ -847,8 +799,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/OAuthProtocolErrorOut" - description: The authorization request is invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." headers: X-Request-Id: description: Request correlation identifier. @@ -856,19 +808,18 @@ paths: schema: type: string style: simple - "429": + "401": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Authorization rate limit exceeded. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: - Retry-After: - description: Seconds until the caller should retry. + WWW-Authenticate: + description: RFC 6750 bearer authentication challenge. explode: false schema: - minimum: 0.0 - type: integer + type: string style: simple X-Request-Id: description: Request correlation identifier. @@ -876,56 +827,12 @@ paths: schema: type: string style: simple - summary: Authorize Page - tags: - - mcp-oauth-ui - post: - operationId: authorize_decision_oauth2_authorize_post - requestBody: - content: - application/x-www-form-urlencoded: - schema: - $ref: "#/components/schemas/Body_authorize_decision_oauth2_authorize_post" - required: true - responses: - "302": - description: Redirect to the canonical or authentication URL. - headers: - Location: - description: Redirect target. - explode: false - schema: - format: uri-reference - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "303": - description: Continue after the form submission at the redirect target. - headers: - Location: - description: Redirect target. - explode: false - schema: - format: uri-reference - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "400": + "403": content: application/json: schema: - $ref: "#/components/schemas/OAuthProtocolErrorOut" - description: The authorization decision or request is invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -933,13 +840,12 @@ paths: schema: type: string style: simple - "403": + "404": content: application/json: schema: - $ref: "#/components/schemas/authorize_decision_oauth2_authorize_post_403_response" - description: The selected drive is unavailable or the browser CSRF check - failed. + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. headers: X-Request-Id: description: Request correlation identifier. @@ -964,14 +870,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Authorization rate limit exceeded. + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. headers: Retry-After: description: Seconds until the caller should retry. explode: false schema: - minimum: 0.0 + minimum: 0 type: integer style: simple X-Request-Id: @@ -980,55 +886,20 @@ paths: schema: type: string style: simple - summary: Authorize Decision - tags: - - mcp-oauth-ui - /oauth2/register: - post: - description: "Anonymous registration endpoint for MCP clients. Public clients\ - \ only (PKCE, no client_secret). Returns the registered metadata plus the\ - \ assigned `client_id`. Registration grants nothing by itself — every token\ - \ still requires a user consent ceremony at /oauth2/authorize." - operationId: oauth2_register_oauth2_register_post - responses: - "201": - content: - application/json: - schema: - $ref: "#/components/schemas/ClientRegistrationOut" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/OAuthProtocolErrorOut" - description: Invalid client metadata. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": + "503": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Registration rate limit exceeded. + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: Retry-After: description: Seconds until the caller should retry. explode: false schema: - minimum: 0.0 + minimum: 0 type: integer style: simple X-Request-Id: @@ -1037,49 +908,81 @@ paths: schema: type: string style: simple - summary: Dynamic Client Registration (RFC 7591) + security: + - bearerAuth: [] + summary: Read Drive tags: - - mcp-oauth - /oauth2/revoke: - post: - description: "Revokes an `adat_` access token (that token only) or an `adrt_`\ - \ refresh token (the whole rotation chain). Unknown tokens return 200 per\ - \ RFC 7009 §2.2 — existence is not revealed. Public-client endpoint auth (`client_id`\ - \ form param, no secret)." - operationId: oauth2_revoke_oauth2_revoke_post + - drives + patch: + description: |- + Rename / update a drive's metadata. Requires ``Idempotency-Key`` and + ``If-Match`` (428 absent, 412 stale); bumps the revision. + operationId: drives_update + parameters: + - explode: false + in: path + name: drive_id + required: true + schema: + title: Drive Id + type: string + style: simple + - explode: false + in: header + name: Idempotency-Key + required: true + schema: + nullable: true + type: string + style: simple + - explode: false + in: header + name: If-Match + required: true + schema: + nullable: true + type: string + style: simple + - explode: false + in: header + name: authorization + required: false + schema: + nullable: true + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DriveUpdateIn" + required: true responses: "200": content: application/json: schema: - $ref: "#/components/schemas/OAuthRevocationOut" + $ref: "#/components/schemas/DriveOut" description: Successful Response headers: - X-Request-Id: - description: Request correlation identifier. + ETag: + description: Current strong entity tag. explode: false schema: type: string style: simple - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/OAuthProtocolErrorOut" - description: Invalid revocation request. - headers: X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "401": + "400": content: application/json: schema: - $ref: "#/components/schemas/OAuthProtocolErrorOut" - description: Client authentication failed. + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." headers: X-Request-Id: description: Request correlation identifier. @@ -1087,64 +990,31 @@ paths: schema: type: string style: simple - "403": + "401": content: application/json: schema: - $ref: "#/components/schemas/OAuthProtocolErrorOut" - description: Token type is unsupported. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: - X-Request-Id: - description: Request correlation identifier. + WWW-Authenticate: + description: RFC 6750 bearer authentication challenge. explode: false schema: type: string style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Revocation rate limit exceeded. - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0.0 - type: integer - style: simple X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - summary: Token revocation (RFC 7009) - tags: - - mcp-oauth - /oauth2/token: - post: - description: |- - Two grant types: - - **`urn:ietf:params:oauth:grant-type:jwt-bearer`** (RFC 7523) — body `assertion=`. Returns a fresh 15-minute access_token with the same scope as the assertion. - - **`claim`** (custom) — body `claim_token=`. Polling endpoint for the claim ceremony. Returns one of: `authorization_pending` (400), `expired_token` (400), `access_denied` (400), or access_token + new identity_assertion + scope=full (200). - operationId: oauth2_token_oauth2_token_post - requestBody: - content: - application/x-www-form-urlencoded: - schema: - $ref: "#/components/schemas/Body_oauth2_token_oauth2_token_post" - required: true - responses: - "200": + "403": content: application/json: schema: - $ref: "#/components/schemas/TokenResponse" - description: Successful Response + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -1152,12 +1022,12 @@ paths: schema: type: string style: simple - "422": + "404": content: application/json: schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. headers: X-Request-Id: description: Request correlation identifier. @@ -1165,92 +1035,32 @@ paths: schema: type: string style: simple - summary: Exchange a credential for an access_token - tags: - - agent-auth - /s/{share_key}: - get: - operationId: redeem_share_s__share_key__get - parameters: - - explode: false - in: path - name: share_key - required: true - schema: - title: Share Key - type: string - style: simple - responses: - "200": + "409": content: application/json: schema: - $ref: "#/components/schemas/ShareRedeemOut" - text/html: - schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. - nullable: true - type: string - description: JSON capability response or browser password form. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "302": - description: Browser redemption succeeded; continue to the canonical URL. + $ref: "#/components/schemas/drives_create_400_response" + description: "The mutation conflicts with current state (name/path, lifecycle)." headers: - Location: - description: Redirect target. - explode: false - schema: - format: uri-reference - type: string - style: simple X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "401": + "412": content: application/json: schema: - $ref: "#/components/schemas/ShareErrorOut" - text/html: - schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. - nullable: true - type: string - description: A password is required or the supplied password is invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match did not match the resource's current revision. headers: - X-Request-Id: - description: Request correlation identifier. + ETag: + description: Current strong entity tag. explode: false schema: type: string style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ShareErrorOut" - text/html: - schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. - nullable: true - type: string - description: "The share is invalid, expired, or no longer authorized." - headers: X-Request-Id: description: Request correlation identifier. explode: false @@ -1270,37 +1080,12 @@ paths: schema: type: string style: simple - summary: Redeem Share - post: - operationId: redeem_share_with_password_s__share_key__post - parameters: - - explode: false - in: path - name: share_key - required: true - schema: - title: Share Key - type: string - style: simple - requestBody: - content: - application/x-www-form-urlencoded: - schema: - $ref: "#/components/schemas/Body_redeem_share_with_password_s__share_key__post" - responses: - "200": + "428": content: application/json: schema: - $ref: "#/components/schemas/ShareRedeemOut" - text/html: - schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. - nullable: true - type: string - description: JSON capability response or browser password form. + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match is required for this mutation. headers: X-Request-Id: description: Request correlation identifier. @@ -1308,15 +1093,19 @@ paths: schema: type: string style: simple - "302": - description: Browser redemption succeeded; continue to the canonical URL. + "429": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. headers: - Location: - description: Redirect target. + Retry-After: + description: Seconds until the caller should retry. explode: false schema: - format: uri-reference - type: string + minimum: 0 + type: integer style: simple X-Request-Id: description: Request correlation identifier. @@ -1324,215 +1113,141 @@ paths: schema: type: string style: simple - "401": + "503": content: application/json: schema: - $ref: "#/components/schemas/ShareErrorOut" - text/html: - schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. - nullable: true - type: string - description: A password is required or the supplied password is invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: - X-Request-Id: - description: Request correlation identifier. + Retry-After: + description: Seconds until the caller should retry. explode: false schema: - type: string + minimum: 0 + type: integer style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ShareErrorOut" - text/html: - schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. - nullable: true - type: string - description: "The share is invalid, expired, or no longer authorized." - headers: X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - summary: Redeem Share With Password - /v/{art_id}/{version}: + security: + - bearerAuth: [] + summary: Update Drive + tags: + - drives + /v0/drives/{drive_id}/artifacts: get: description: |- - Render version `version` of an artifact, read-only. + List the drive's artifacts, newest-first (keyset paginated). - Version history is owner-only. The drive-blind `can_read` gate still - provides the same sign-in-or-404 masking as `/a/{art_id}`, but readable - non-owners cannot browse snapshots. A pruned or never-existed version - renders a friendly unavailable state, never a 500. - `?raw=1` / `?download=1` stream the version's bytes (powering the bar's - Raw / Download buttons) with the same sandbox+nosniff headers as the - head raw path. - operationId: view_artifact_version_v__art_id___version__get + ``lifecycle`` (active|deleted|all) exposes soft-deleted artifacts. + ``parent_id`` / ``name`` / ``content_type`` / ``label`` are exact-match + filters; ``updated_after`` / ``updated_before`` are inclusive bounds. + Unknown query parameters are rejected. + operationId: artifacts_list parameters: - explode: false in: path - name: art_id + name: drive_id required: true schema: - title: Art Id + title: Drive Id type: string style: simple - - explode: false - in: path - name: version - required: true + - explode: true + in: query + name: lifecycle + required: false schema: - title: Version - type: integer - style: simple + default: active + title: Lifecycle + type: string + style: form - explode: true in: query - name: raw + name: limit required: false schema: - default: 0 - title: Raw + nullable: true type: integer style: form - explode: true in: query - name: download + name: cursor required: false schema: - default: 0 - title: Download - type: integer + nullable: true + type: string + style: form + - explode: true + in: query + name: parent_id + required: false + schema: + nullable: true + type: string style: form - responses: - "200": - content: - application/octet-stream: - schema: - format: binary - type: string - text/html: - schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. - nullable: true - type: string - description: Rendered HTML or raw artifact bytes. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - summary: View Artifact Version - /v0/artifacts: - get: - description: |- - Returns artifacts sorted by path. Filter by `prefix`, `label` (repeatable + AND-combined), and `file_type`. - - **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page. `next_cursor` is `null` on the final page. Filters MUST stay consistent across pages — the cursor encodes only the keyset position, not the filter set, so the client is responsible for re-sending the same filter on each page. - operationId: list_artifacts_v0_artifacts_get - parameters: - explode: true in: query - name: prefix + name: name required: false schema: - default: "" - title: Prefix + nullable: true type: string style: form - explode: true in: query - name: label + name: content_type required: false schema: - items: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. - nullable: true - type: string - title: Label - type: array - default: null + nullable: true + type: string style: form - explode: true in: query - name: file_type + name: label required: false schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. nullable: true type: string style: form - explode: true in: query - name: cursor + name: updated_after required: false schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. + format: date-time nullable: true type: string style: form - explode: true in: query - name: limit + name: updated_before required: false schema: - default: 50 - maximum: 100 - minimum: 1 - title: Limit - type: integer + format: date-time + nullable: true + type: string style: form + - explode: false + in: header + name: authorization + required: false + schema: + nullable: true + type: string + style: simple responses: "200": content: application/json: schema: - $ref: "#/components/schemas/Page" + $ref: "#/components/schemas/ArtifactListOut" description: Successful Response headers: X-Request-Id: @@ -1545,8 +1260,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The pagination cursor is invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." headers: X-Request-Id: description: Request correlation identifier. @@ -1558,17 +1273,13 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: WWW-Authenticate: description: RFC 6750 bearer authentication challenge. explode: false schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. - nullable: true type: string style: simple X-Request-Id: @@ -1581,9 +1292,21 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. + headers: + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. headers: X-Request-Id: description: Request correlation identifier. @@ -1608,8 +1331,30 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. + headers: + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "503": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: Retry-After: description: Seconds until the caller should retry. @@ -1625,53 +1370,80 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: List artifacts in the drive - /v0/artifacts/{art_id}: - delete: + - bearerAuth: [] + summary: List Artifacts + tags: + - artifacts + post: description: |- - Soft-delete the artifact with this `art_…` ID. Same semantics + response shape as the path-based `DELETE /v0/artifacts/{path}` (reversible until the GC cron hard-deletes at `purge_at`; `restore_url` points at the by-id restore), but keys on the immutable id so a concurrent rename can't change the target. + Create one artifact with inline content — multipart only. - Returns 404 ARTIFACT_NOT_FOUND if no live artifact has this id; 403 WIKI_RESERVED for `_wiki/` artifacts (system-managed); 412 if `If-Match` doesn't match the current version. Declared before the `{path:path}` family so the id convertor wins for DELETEs. - operationId: delete_artifact_by_id_route_v0_artifacts__art_id__delete + Multipart only (415 for a JSON body). Parts: parent_id, name, metadata, content (bytes), content_type, sha256. parent_id, name, and content are required. + operationId: artifacts_create parameters: - explode: false in: path - name: art_id + name: drive_id required: true schema: - title: Art Id + title: Drive Id type: string style: simple - explode: false in: header - name: if-match - required: false + name: Idempotency-Key + required: true schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. nullable: true type: string style: simple - explode: false in: header - name: x-agentdrive-actor + name: authorization required: false schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. nullable: true type: string style: simple + requestBody: + content: + multipart/form-data: + schema: + $ref: "#/components/schemas/artifacts_create_request" + required: true responses: - "200": + "201": content: application/json: schema: - $ref: "#/components/schemas/ArtifactDeleteOut" + $ref: "#/components/schemas/ArtifactOut" description: Successful Response + headers: + ETag: + description: Current strong entity tag. + explode: false + schema: + type: string + style: simple + Location: + description: Canonical URL of the created resource. + explode: false + schema: + format: uri-reference + type: string + style: simple + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." headers: X-Request-Id: description: Request correlation identifier. @@ -1683,8 +1455,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: WWW-Authenticate: description: RFC 6750 bearer authentication challenge. @@ -1702,9 +1474,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -1716,8 +1487,22 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: No live artifact with this ID exists. + $ref: "#/components/schemas/drives_create_400_response" + description: The parent or target resource was not found or is not visible. + headers: + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "A sibling already occupies the name/path, or the idempotency\ + \ key was reused for a different request." headers: X-Request-Id: description: Request correlation identifier. @@ -1729,8 +1514,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: If-Match does not match the current artifact. + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match did not match (copy/restore preconditions). headers: ETag: description: Current strong entity tag. @@ -1757,12 +1542,47 @@ paths: schema: type: string style: simple + "428": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match is required for this mutation. + headers: + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple "429": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. + headers: + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "503": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: Retry-After: description: Seconds until the caller should retry. @@ -1778,17 +1598,53 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: Soft-delete an artifact by its stable ID - get: - operationId: get_artifact_by_id_v0_artifacts__art_id__get + - bearerAuth: [] + summary: Create Artifact + tags: + - artifacts + /v0/drives/{drive_id}/artifacts/{artifact_id}: + delete: + description: Soft-delete one artifact (its versions stay). + operationId: artifacts_delete parameters: - explode: false in: path - name: art_id + name: drive_id + required: true + schema: + title: Drive Id + type: string + style: simple + - explode: false + in: path + name: artifact_id + required: true + schema: + title: Artifact Id + type: string + style: simple + - explode: false + in: header + name: Idempotency-Key + required: true + schema: + nullable: true + type: string + style: simple + - explode: false + in: header + name: If-Match required: true schema: - title: Art Id + nullable: true + type: string + style: simple + - explode: false + in: header + name: authorization + required: false + schema: + nullable: true type: string style: simple responses: @@ -1803,10 +1659,6 @@ paths: description: Current strong entity tag. explode: false schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. - nullable: true type: string style: simple X-Request-Id: @@ -1815,15 +1667,13 @@ paths: schema: type: string style: simple - "304": - description: The current entity tag or modification date matched. - headers: - ETag: - description: Current strong entity tag. - explode: false + "400": + content: + application/json: schema: - type: string - style: simple + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." + headers: X-Request-Id: description: Request correlation identifier. explode: false @@ -1834,8 +1684,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: WWW-Authenticate: description: RFC 6750 bearer authentication challenge. @@ -1853,9 +1703,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -1867,8 +1716,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: No such artifact exists in this drive. + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. headers: X-Request-Id: description: Request correlation identifier. @@ -1876,12 +1725,12 @@ paths: schema: type: string style: simple - "422": + "409": content: application/json: schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. + $ref: "#/components/schemas/drives_create_400_response" + description: "The mutation conflicts with current state (name/path, lifecycle)." headers: X-Request-Id: description: Request correlation identifier. @@ -1889,14 +1738,81 @@ paths: schema: type: string style: simple - "429": + "412": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match did not match the resource's current revision. headers: - Retry-After: + ETag: + description: Current strong entity tag. + explode: false + schema: + type: string + style: simple + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/ValidationErrorResponse" + description: Request validation failed. + headers: + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "428": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match is required for this mutation. + headers: + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "429": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. + headers: + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "503": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." + headers: + Retry-After: description: Seconds until the caller should retry. explode: false schema: @@ -1910,35 +1826,33 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: Canonical lookup of an artifact by its stable ID - patch: - description: |- - Metadata-only JSON-merge-patch update of a single artifact, keyed by its stable `art_…` ID. Every field in the body is optional; a field that is **omitted** is left unchanged, a field that is **present** is applied — with an explicit `null` / `[]` / `{}` meaning "clear". This mirrors the MCP `set_metadata` tool. - - Editable fields: - * `labels` — replace the label set (`[]`/`null` clears). - * `metadata` — replace the free-form metadata object (`{}`/`null` clears). - * `source` — replace provenance refs (`null` clears). - - **To move/rename an artifact, use `POST /v0/artifacts/{art_id}/move`** — PATCH no longer accepts `path`. The body is `extra="forbid"`, so a stray field (notably a legacy `path`) is rejected with 422 rather than silently ignored. - - Metadata edits do NOT create a new content version (no `version_number` / generation bump, no `artifact_versions` row) but DO bump the artifact's `metageneration` and `updated_at`. - - Returns 400 BAD_LABELS / BAD_SOURCE for invalid metadata; 404 ARTIFACT_NOT_FOUND for an unknown id. Honors `If-Match`, which takes the composite ETag `".."` and is compared as a whole tuple: ANY concurrent content **or** metadata change (a bumped generation OR metageneration) → 412 PRECONDITION_FAILED. There is no last-writer-wins gap for metadata-only edits. Use `X-AgentDrive-Actor` to attach attribution to the emitted `artifact.metadata_updated` event. - operationId: patch_artifact_route_v0_artifacts__art_id__patch + - bearerAuth: [] + summary: Delete Artifact + tags: + - artifacts + get: + description: Read one active artifact. ``If-None-Match`` short-circuits to 304. + operationId: artifacts_read parameters: - explode: false in: path - name: art_id + name: drive_id + required: true + schema: + title: Drive Id + type: string + style: simple + - explode: false + in: path + name: artifact_id required: true schema: - title: Art Id + title: Artifact Id type: string style: simple - explode: false in: header - name: x-agentdrive-actor + name: If-None-Match required: false schema: nullable: true @@ -1946,18 +1860,12 @@ paths: style: simple - explode: false in: header - name: if-match + name: authorization required: false schema: nullable: true type: string style: simple - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ArtifactPatchIn" - required: true responses: "200": content: @@ -1978,12 +1886,27 @@ paths: schema: type: string style: simple + "304": + description: If-None-Match matched the current ETag. + headers: + ETag: + description: Current strong entity tag. + explode: false + schema: + type: string + style: simple + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple "400": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The labels or source metadata are invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." headers: X-Request-Id: description: Request correlation identifier. @@ -1995,8 +1918,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: WWW-Authenticate: description: RFC 6750 bearer authentication challenge. @@ -2014,9 +1937,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -2028,8 +1950,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: No such live artifact exists in this drive. + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. headers: X-Request-Id: description: Request correlation identifier. @@ -2037,44 +1959,47 @@ paths: schema: type: string style: simple - "412": + "422": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: A request precondition did not match. + $ref: "#/components/schemas/ValidationErrorResponse" + description: Request validation failed. headers: - ETag: - description: Current strong entity tag. - explode: false - schema: - type: string - style: simple X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "422": + "429": content: application/json: schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. headers: + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "429": + "503": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: Retry-After: description: Seconds until the caller should retry. @@ -2090,44 +2015,51 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: Edit artifact metadata (labels / metadata / source) - /v0/artifacts/{art_id}/copy: - post: - description: |- - Create a new artifact at `path` whose bytes are identical to the source artifact's. The copy reuses the source's CAS object (zero new storage) but gets a fresh `art_…` ID, a fresh version 1, and — by default — `source.refs = [{type: 'artifact', id: ''}]` so provenance is preserved. - - Quota: the copy's `size_bytes` is added to the drive's `storage_bytes` even though physical bytes are shared. - - Source-version pin: pass `from_generation` in the body to require the source's current content generation (`version_number`) to equal it (→ 412 SOURCE_VERSION_MISMATCH); a concurrent source *metadata* edit does NOT fail the copy. Destination create-only: `If-None-Match: *` returns 412 CREATE_CONFLICT (instead of 409 PATH_CONFLICT) when the target path is occupied. - - Returns 409 PATH_CONFLICT if the target path is already taken; 413 STORAGE_QUOTA_EXCEEDED if the copy would push the drive over its limit. - operationId: copy_artifact_route_v0_artifacts__art_id__copy_post + - bearerAuth: [] + summary: Read Artifact + tags: + - artifacts + patch: + description: Rename / move / set metadata or labels. At least one field required. + operationId: artifacts_update parameters: - explode: false in: path - name: art_id + name: drive_id + required: true + schema: + title: Drive Id + type: string + style: simple + - explode: false + in: path + name: artifact_id required: true schema: - title: Art Id + title: Artifact Id type: string style: simple - explode: false in: header - name: x-agentdrive-actor - required: false + name: Idempotency-Key + required: true + schema: + nullable: true + type: string + style: simple + - explode: false + in: header + name: If-Match + required: true schema: nullable: true type: string style: simple - explode: false in: header - name: if-none-match + name: authorization required: false schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. nullable: true type: string style: simple @@ -2135,10 +2067,10 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/CopyIn" + $ref: "#/components/schemas/ArtifactUpdateIn" required: true responses: - "201": + "200": content: application/json: schema: @@ -2151,13 +2083,6 @@ paths: schema: type: string style: simple - Location: - description: Canonical URL of the created resource. - explode: false - schema: - format: uri-reference - type: string - style: simple X-Request-Id: description: Request correlation identifier. explode: false @@ -2168,8 +2093,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The destination path or source metadata is invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." headers: X-Request-Id: description: Request correlation identifier. @@ -2181,8 +2106,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: WWW-Authenticate: description: RFC 6750 bearer authentication challenge. @@ -2200,9 +2125,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -2214,8 +2138,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The source artifact does not exist in this drive. + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. headers: X-Request-Id: description: Request correlation identifier. @@ -2227,8 +2151,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The destination path is already occupied. + $ref: "#/components/schemas/drives_create_400_response" + description: "The mutation conflicts with current state (name/path, lifecycle)." headers: X-Request-Id: description: Request correlation identifier. @@ -2240,8 +2164,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: A request precondition did not match. + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match did not match the resource's current revision. headers: ETag: description: Current strong entity tag. @@ -2255,12 +2179,12 @@ paths: schema: type: string style: simple - "413": + "422": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The copy would exceed the drive storage limit. + $ref: "#/components/schemas/ValidationErrorResponse" + description: Request validation failed. headers: X-Request-Id: description: Request correlation identifier. @@ -2268,12 +2192,12 @@ paths: schema: type: string style: simple - "422": + "428": content: application/json: schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match is required for this mutation. headers: X-Request-Id: description: Request correlation identifier. @@ -2285,8 +2209,30 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. + headers: + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "503": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: Retry-After: description: Seconds until the caller should retry. @@ -2302,18 +2248,45 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: "Duplicate an artifact to a new path (CAS-shared, new ID)" - /v0/artifacts/{art_id}/download: + - bearerAuth: [] + summary: Update Artifact + tags: + - artifacts + /v0/drives/{drive_id}/artifacts/{artifact_id}/content: get: - operationId: download_artifact_by_id_v0_artifacts__art_id__download_get + description: Download the head version's bytes — stream or 307 signed URL. + operationId: artifacts_content parameters: - explode: false in: path - name: art_id + name: drive_id + required: true + schema: + title: Drive Id + type: string + style: simple + - explode: false + in: path + name: artifact_id required: true schema: - title: Art Id + title: Artifact Id + type: string + style: simple + - explode: false + in: header + name: If-None-Match + required: false + schema: + nullable: true + type: string + style: simple + - explode: false + in: header + name: authorization + required: false + schema: + nullable: true type: string style: simple responses: @@ -2323,7 +2296,51 @@ paths: schema: format: binary type: string - description: Raw artifact bytes. + description: Raw artifact bytes (streamed). + headers: + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "304": + description: If-None-Match matched the current ETag. + headers: + ETag: + description: Current strong entity tag. + explode: false + schema: + type: string + style: simple + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "307": + description: Redirect to a short-lived signed URL. + headers: + Location: + description: Redirect target. + explode: false + schema: + format: uri-reference + type: string + style: simple + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." headers: X-Request-Id: description: Request correlation identifier. @@ -2335,8 +2352,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: WWW-Authenticate: description: RFC 6750 bearer authentication challenge. @@ -2354,9 +2371,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -2368,8 +2384,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: No live artifact with this ID exists. + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. headers: X-Request-Id: description: Request correlation identifier. @@ -2394,8 +2410,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. headers: Retry-After: description: Seconds until the caller should retry. @@ -2410,51 +2426,110 @@ paths: schema: type: string style: simple - security: - - BearerAuth: [] - summary: Stream the artifact bytes by stable ID (never rendered HTML) - /v0/artifacts/{art_id}/download-url: - get: - description: "Returns a URL for the artifact's bytes. For large artifacts (>=\ - \ the signed-download threshold) when signing is available, it's a short-lived\ - \ **signed GCS URL** the client fetches directly (`direct:true`, `expires_at`\ - \ set); otherwise the **proxy** `/download` URL (`direct:false`). Treat the\ - \ URL as opaque. large-download-design.md §5.1." - operationId: download_url_by_id_v0_artifacts__art_id__download_url_get - parameters: - - explode: false - in: path - name: art_id - required: true - schema: - title: Art Id - type: string - style: simple - responses: - "200": + "503": content: application/json: schema: - $ref: "#/components/schemas/DownloadUrlOut" - description: Successful Response + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: - X-Request-Id: - description: Request correlation identifier. - explode: false + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple + X-Request-Id: + description: Request correlation identifier. + explode: false schema: type: string style: simple - "401": + security: + - bearerAuth: [] + summary: Read Artifact Content + tags: + - artifacts + /v0/drives/{drive_id}/artifacts/{artifact_id}/copy: + post: + description: |- + Copy one artifact within the same drive. + + Cross-drive copy is out of v0 scope and rejected (400 INVALID_ARGUMENT). + ``destination_drive_id`` must equal the source drive when present. + Materializes the artifact + its selected version synchronously → 201. + ``If-Match`` is optional; when present it is validated against the source + revision (412 stale). + operationId: artifacts_copy + parameters: + - explode: false + in: path + name: drive_id + required: true + schema: + title: Drive Id + type: string + style: simple + - explode: false + in: path + name: artifact_id + required: true + schema: + title: Artifact Id + type: string + style: simple + - explode: false + in: header + name: Idempotency-Key + required: true + schema: + nullable: true + type: string + style: simple + - explode: false + in: header + name: If-Match + required: false + schema: + nullable: true + type: string + style: simple + - explode: false + in: header + name: authorization + required: false + schema: + nullable: true + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ArtifactCopyIn" + required: true + responses: + "201": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/ArtifactOut" + description: Successful Response headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. + ETag: + description: Current strong entity tag. + explode: false + schema: + type: string + style: simple + Location: + description: Canonical URL of the created resource. explode: false schema: + format: uri-reference type: string style: simple X-Request-Id: @@ -2463,13 +2538,12 @@ paths: schema: type: string style: simple - "403": + "400": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." headers: X-Request-Id: description: Request correlation identifier. @@ -2477,25 +2551,31 @@ paths: schema: type: string style: simple - "404": + "401": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The artifact does not exist in this drive. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: + WWW-Authenticate: + description: RFC 6750 bearer authentication challenge. + explode: false + schema: + type: string + style: simple X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "422": + "403": content: application/json: schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -2503,67 +2583,39 @@ paths: schema: type: string style: simple - "429": + "404": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: The parent or target resource was not found or is not visible. headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - security: - - BearerAuth: [] - summary: Signed direct-from-GCS download URL by stable ID - /v0/artifacts/{art_id}/meta: - get: - operationId: get_artifact_by_id_meta_v0_artifacts__art_id__meta_get - parameters: - - explode: false - in: path - name: art_id - required: true - schema: - title: Art Id - type: string - style: simple - responses: - "200": + "409": content: application/json: schema: - $ref: "#/components/schemas/ArtifactOut" - description: Successful Response + $ref: "#/components/schemas/drives_create_400_response" + description: "A sibling already occupies the name/path, or the idempotency\ + \ key was reused for a different request." headers: - ETag: - description: Current strong entity tag. - explode: false - schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. - nullable: true - type: string - style: simple X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "304": - description: The current entity tag or modification date matched. + "412": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match did not match (copy/restore preconditions). headers: ETag: description: Current strong entity tag. @@ -2577,32 +2629,25 @@ paths: schema: type: string style: simple - "401": + "422": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/ValidationErrorResponse" + description: Request validation failed. headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "403": + "428": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match is required for this mutation. headers: X-Request-Id: description: Request correlation identifier. @@ -2610,38 +2655,34 @@ paths: schema: type: string style: simple - "404": + "429": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: No such artifact exists in this drive. + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. headers: - X-Request-Id: - description: Request correlation identifier. + Retry-After: + description: Seconds until the caller should retry. explode: false schema: - type: string + minimum: 0 + type: integer style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "429": + "503": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: Retry-After: description: Seconds until the caller should retry. @@ -2657,48 +2698,55 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: Artifact metadata by stable ID (same shape as path /meta) - /v0/artifacts/{art_id}/move: + - bearerAuth: [] + summary: Copy Artifact + tags: + - artifacts + /v0/drives/{drive_id}/artifacts/{artifact_id}/restore: post: - description: |- - Canonical artifact move/rename, keyed by the stable `art_…` ID (the artifact analogue of `POST /v0/folders/{fld_id}/move`). Moves the artifact to a new `path` on the same drive; ID, version history, source refs, labels, metadata, and the underlying CAS blob are all preserved — only `path` and `updated_at` change, and the move does NOT bump `version_number`. - - The row UPDATE and the emitted `artifact.renamed` event commit in a SINGLE transaction — a failure leaves the artifact fully unchanged. - - Returns 409 PATH_CONFLICT if the target `path` is already taken; 404 ARTIFACT_NOT_FOUND for an unknown id; 403 WIKI_RESERVED for a `_wiki/` / `_compiled/` target. Honors `If-Match` (→ 412 PRECONDITION_FAILED). Use `X-AgentDrive-Actor` to attach attribution to the emitted `artifact.renamed` event. - operationId: move_artifact_route_v0_artifacts__art_id__move_post + description: Restore a soft-deleted artifact atomically. + operationId: artifacts_restore parameters: - explode: false in: path - name: art_id + name: drive_id + required: true + schema: + title: Drive Id + type: string + style: simple + - explode: false + in: path + name: artifact_id required: true schema: - title: Art Id + title: Artifact Id type: string style: simple - explode: false in: header - name: x-agentdrive-actor - required: false + name: Idempotency-Key + required: true + schema: + nullable: true + type: string + style: simple + - explode: false + in: header + name: If-Match + required: true schema: nullable: true type: string style: simple - explode: false in: header - name: if-match + name: authorization required: false schema: nullable: true type: string style: simple - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ArtifactMoveIn" - required: true responses: "200": content: @@ -2719,12 +2767,25 @@ paths: schema: type: string style: simple + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." + headers: + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple "401": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: WWW-Authenticate: description: RFC 6750 bearer authentication challenge. @@ -2742,9 +2803,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -2756,8 +2816,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: No such artifact exists in this drive. + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. headers: X-Request-Id: description: Request correlation identifier. @@ -2769,8 +2829,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The destination path is already occupied. + $ref: "#/components/schemas/drives_create_400_response" + description: "The mutation conflicts with current state (name/path, lifecycle)." headers: X-Request-Id: description: Request correlation identifier. @@ -2782,8 +2842,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: A request precondition did not match. + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match did not match the resource's current revision. headers: ETag: description: Current strong entity tag. @@ -2810,12 +2870,47 @@ paths: schema: type: string style: simple + "428": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match is required for this mutation. + headers: + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple "429": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. + headers: + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "503": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: Retry-After: description: Seconds until the caller should retry. @@ -2831,66 +2926,50 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: Rename / move an artifact to a new path - /v0/artifacts/{art_id}/restore: - post: - description: Clear `deleted_at` + `purge_at` on a soft-deleted artifact. Available - only while the artifact is in trash (i.e. before the GC cleanup cron purges - it). Returns 404 if the artifact is live or already hard-deleted; 409 PATH_CONFLICT - if its path is now occupied by another live artifact. The 409 payload includes - a `restore_options` block with `rename_to` and `force_overwrite` URLs the - caller can follow to resolve the conflict — see deletion-design.md §5.4. - operationId: restore_artifact_v0_artifacts__art_id__restore_post + - bearerAuth: [] + summary: Restore Artifact + tags: + - artifacts + /v0/drives/{drive_id}/artifacts/{artifact_id}/versions: + get: + description: "List the artifact's version trail, newest first (ordinal DESC)." + operationId: versions_list parameters: - explode: false in: path - name: art_id + name: drive_id required: true schema: - title: Art Id + title: Drive Id type: string style: simple - - description: Restore at this path instead of the original. Soft-deletes the - live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. - explode: true - in: query - name: rename - required: false + - explode: false + in: path + name: artifact_id + required: true schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. - nullable: true + title: Artifact Id type: string - style: form - - description: Soft-delete the live occupant at the original path and restore - there. Audit `metadata.cause='restore_conflict_overwrite'`. Mutually exclusive - with `rename`. - explode: true + style: simple + - explode: true in: query - name: overwrite + name: limit required: false schema: - default: false - description: Soft-delete the live occupant at the original path and restore - there. Audit `metadata.cause='restore_conflict_overwrite'`. Mutually exclusive - with `rename`. - title: Overwrite - type: boolean + nullable: true + type: integer style: form - - explode: false - in: header - name: x-agentdrive-actor + - explode: true + in: query + name: cursor required: false schema: nullable: true type: string - style: simple + style: form - explode: false in: header - name: if-match + name: authorization required: false schema: nullable: true @@ -2901,15 +2980,22 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ArtifactOut" + $ref: "#/components/schemas/VersionListOut" description: Successful Response headers: - ETag: - description: Current strong entity tag. + X-Request-Id: + description: Request correlation identifier. explode: false schema: type: string style: simple + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." + headers: X-Request-Id: description: Request correlation identifier. explode: false @@ -2920,8 +3006,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: WWW-Authenticate: description: RFC 6750 bearer authentication challenge. @@ -2939,9 +3025,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -2953,8 +3038,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: No restorable artifact exists with this ID. + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. headers: X-Request-Id: description: Request correlation identifier. @@ -2962,12 +3047,12 @@ paths: schema: type: string style: simple - "409": + "422": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The original or requested restore path is occupied. + $ref: "#/components/schemas/ValidationErrorResponse" + description: Request validation failed. headers: X-Request-Id: description: Request correlation identifier. @@ -2975,44 +3060,34 @@ paths: schema: type: string style: simple - "412": + "429": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: A request precondition did not match. + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. headers: - ETag: - description: Current strong entity tag. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. + Retry-After: + description: Seconds until the caller should retry. explode: false schema: - type: string + minimum: 0 + type: integer style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "429": + "503": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: Retry-After: description: Seconds until the caller should retry. @@ -3028,50 +3103,84 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: Restore a soft-deleted artifact - /v0/artifacts/{art_id}/versions: - get: - description: Returns versions in descending `version_number` order. Cursor pagination - via `?cursor=`; `next_cursor` is non-null when the page is full and - more older versions may exist. - operationId: list_artifact_versions_v0_artifacts__art_id__versions_get + - bearerAuth: [] + summary: List Versions + tags: + - versions + post: + description: |- + Append one immutable version and rotate the artifact head. + + Multipart only (415 for a JSON body). Parts: content (bytes), content_type, sha256. content is required; name, parent_id, and metadata are not accepted here. + operationId: versions_append parameters: - explode: false in: path - name: art_id + name: drive_id + required: true + schema: + title: Drive Id + type: string + style: simple + - explode: false + in: path + name: artifact_id required: true schema: - title: Art Id + title: Artifact Id type: string style: simple - - explode: true - in: query - name: cursor - required: false + - explode: false + in: header + name: Idempotency-Key + required: true schema: nullable: true type: string - style: form - - explode: true - in: query - name: limit + style: simple + - explode: false + in: header + name: If-Match + required: true + schema: + nullable: true + type: string + style: simple + - explode: false + in: header + name: authorization required: false schema: - default: 50 - maximum: 100 - minimum: 1 - title: Limit - type: integer - style: form + nullable: true + type: string + style: simple + requestBody: + content: + multipart/form-data: + schema: + $ref: "#/components/schemas/versions_append_request" + required: true responses: - "200": + "201": content: application/json: schema: - $ref: "#/components/schemas/VersionPage" + $ref: "#/components/schemas/VersionCreatedOut" description: Successful Response headers: + ETag: + description: Current strong entity tag. + explode: false + schema: + type: string + style: simple + Location: + description: Canonical URL of the created resource. + explode: false + schema: + format: uri-reference + type: string + style: simple X-Request-Id: description: Request correlation identifier. explode: false @@ -3082,8 +3191,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The pagination cursor is invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." headers: X-Request-Id: description: Request correlation identifier. @@ -3095,8 +3204,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: WWW-Authenticate: description: RFC 6750 bearer authentication challenge. @@ -3114,9 +3223,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -3128,78 +3236,21 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The artifact does not exist in this drive. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - security: - - BearerAuth: [] - summary: "List versions of an artifact, newest first" - /v0/artifacts/{art_id}/versions/{version_number}: - get: - operationId: get_artifact_version_v0_artifacts__art_id__versions__version_number__get - parameters: - - explode: false - in: path - name: art_id - required: true - schema: - title: Art Id - type: string - style: simple - - explode: false - in: path - name: version_number - required: true - schema: - title: Version Number - type: integer - style: simple - responses: - "200": + "409": content: application/json: schema: - $ref: "#/components/schemas/VersionOut" - description: Successful Response + $ref: "#/components/schemas/drives_create_400_response" + description: "The mutation conflicts with current state (name/path, lifecycle)." headers: X-Request-Id: description: Request correlation identifier. @@ -3207,15 +3258,15 @@ paths: schema: type: string style: simple - "401": + "412": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match did not match the resource's current revision. headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. + ETag: + description: Current strong entity tag. explode: false schema: type: string @@ -3226,13 +3277,12 @@ paths: schema: type: string style: simple - "403": + "422": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/ValidationErrorResponse" + description: Request validation failed. headers: X-Request-Id: description: Request correlation identifier. @@ -3240,12 +3290,12 @@ paths: schema: type: string style: simple - "404": + "428": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The artifact or version does not exist in this drive. + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match is required for this mutation. headers: X-Request-Id: description: Request correlation identifier. @@ -3253,38 +3303,34 @@ paths: schema: type: string style: simple - "410": + "429": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The requested version was pruned by retention. + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. headers: - X-Request-Id: - description: Request correlation identifier. + Retry-After: + description: Seconds until the caller should retry. explode: false schema: - type: string + minimum: 0 + type: integer style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "429": + "503": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: Retry-After: description: Seconds until the caller should retry. @@ -3300,36 +3346,96 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: Metadata for a specific version of an artifact - /v0/artifacts/{art_id}/versions/{version_number}/download: + - bearerAuth: [] + summary: Append Version + tags: + - versions + /v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}: get: - operationId: download_artifact_version_v0_artifacts__art_id__versions__version_number__download_get + description: Read one immutable version. + operationId: versions_read parameters: - explode: false in: path - name: art_id + name: drive_id + required: true + schema: + title: Drive Id + type: string + style: simple + - explode: false + in: path + name: artifact_id required: true schema: - title: Art Id + title: Artifact Id type: string style: simple - explode: false in: path - name: version_number + name: version_id required: true schema: - title: Version Number - type: integer + title: Version Id + type: string + style: simple + - explode: false + in: header + name: If-None-Match + required: false + schema: + nullable: true + type: string + style: simple + - explode: false + in: header + name: authorization + required: false + schema: + nullable: true + type: string style: simple responses: "200": content: - application/octet-stream: + application/json: + schema: + $ref: "#/components/schemas/VersionOut" + description: Successful Response + headers: + ETag: + description: Current strong entity tag. + explode: false + schema: + type: string + style: simple + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "304": + description: If-None-Match matched the current ETag. + headers: + ETag: + description: Current strong entity tag. + explode: false + schema: + type: string + style: simple + X-Request-Id: + description: Request correlation identifier. + explode: false schema: - format: binary type: string - description: Raw artifact bytes. + style: simple + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." headers: X-Request-Id: description: Request correlation identifier. @@ -3341,8 +3447,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: WWW-Authenticate: description: RFC 6750 bearer authentication challenge. @@ -3360,9 +3466,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -3374,8 +3479,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The artifact or version does not exist. + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. headers: X-Request-Id: description: Request correlation identifier. @@ -3383,12 +3488,12 @@ paths: schema: type: string style: simple - "410": + "422": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The requested version has been pruned. + $ref: "#/components/schemas/ValidationErrorResponse" + description: Request validation failed. headers: X-Request-Id: description: Request correlation identifier. @@ -3396,25 +3501,34 @@ paths: schema: type: string style: simple - "422": + "429": content: application/json: schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. headers: + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "429": + "503": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: Retry-After: description: Seconds until the caller should retry. @@ -3430,39 +3544,108 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: Stream bytes for a specific version (machine surface) - /v0/artifacts/{art_id}/versions/{version_number}/download-url: + - bearerAuth: [] + summary: Read Version + tags: + - versions + /v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}/content: get: - description: "Same as `/{art_id}/download-url` but for a specific version's\ - \ bytes (`direct:true` signed GCS URL when large + signing available, else\ - \ the proxy `/versions/{n}/download` URL). large-download-design.md §5.1." - operationId: download_url_version_v0_artifacts__art_id__versions__version_number__download_url_get + description: Download one version's immutable bytes — stream or 307. + operationId: versions_content parameters: - explode: false in: path - name: art_id + name: drive_id required: true schema: - title: Art Id + title: Drive Id type: string style: simple - explode: false in: path - name: version_number + name: artifact_id required: true schema: - title: Version Number - type: integer + title: Artifact Id + type: string style: simple - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/DownloadUrlOut" - description: Successful Response - headers: + - explode: false + in: path + name: version_id + required: true + schema: + title: Version Id + type: string + style: simple + - explode: false + in: header + name: If-None-Match + required: false + schema: + nullable: true + type: string + style: simple + - explode: false + in: header + name: authorization + required: false + schema: + nullable: true + type: string + style: simple + responses: + "200": + content: + application/octet-stream: + schema: + format: binary + type: string + description: Raw artifact bytes (streamed). + headers: + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "304": + description: If-None-Match matched the current ETag. + headers: + ETag: + description: Current strong entity tag. + explode: false + schema: + type: string + style: simple + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "307": + description: Redirect to a short-lived signed URL. + headers: + Location: + description: Redirect target. + explode: false + schema: + format: uri-reference + type: string + style: simple + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." + headers: X-Request-Id: description: Request correlation identifier. explode: false @@ -3473,8 +3656,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: WWW-Authenticate: description: RFC 6750 bearer authentication challenge. @@ -3492,9 +3675,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -3506,8 +3688,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The artifact or version does not exist in this drive. + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. headers: X-Request-Id: description: Request correlation identifier. @@ -3515,12 +3697,12 @@ paths: schema: type: string style: simple - "410": + "422": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The requested version was pruned by retention. + $ref: "#/components/schemas/ValidationErrorResponse" + description: Request validation failed. headers: X-Request-Id: description: Request correlation identifier. @@ -3528,25 +3710,34 @@ paths: schema: type: string style: simple - "422": + "429": content: application/json: schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. headers: + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "429": + "503": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: Retry-After: description: Seconds until the caller should retry. @@ -3562,58 +3753,69 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: Signed direct-from-GCS download URL for a specific version - /v0/artifacts/{art_id}/versions/{version_number}/restore: + - bearerAuth: [] + summary: Read Version Content + tags: + - versions + /v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}/restore: post: - description: |- - Roll the artifact forward to the content of version `version_number` by creating a **new head version** with identical bytes. History is preserved — this never rewrites or deletes past versions. The prior version's content-addressed blob is reused, so no bytes are re-uploaded. A change summary of `Restored version N` is recorded on the new version; `X-AgentDrive-Actor` attributes it. - - Restoring a version whose content already matches the current head (including the head itself) is a **no-op**: it returns the current artifact unchanged, with no new version created. - - Honors `If-Match` on the current head (roll forward only if the head is unchanged → 412 PRECONDITION_FAILED). - - Errors: `404 ARTIFACT_NOT_FOUND`, `404 VERSION_NOT_FOUND`, and `410 VERSION_PRUNED` when the version existed but its bytes were retained out of existence. - operationId: restore_artifact_version_v0_artifacts__art_id__versions__version_number__restore_post + description: Restore a historical version as a NEW head version (no byte copy). + operationId: versions_restore parameters: - explode: false in: path - name: art_id + name: drive_id required: true schema: - title: Art Id + title: Drive Id type: string style: simple - explode: false in: path - name: version_number + name: artifact_id required: true schema: - title: Version Number - type: integer + title: Artifact Id + type: string + style: simple + - explode: false + in: path + name: version_id + required: true + schema: + title: Version Id + type: string style: simple - explode: false in: header - name: x-agentdrive-actor - required: false + name: Idempotency-Key + required: true + schema: + nullable: true + type: string + style: simple + - explode: false + in: header + name: If-Match + required: true schema: nullable: true type: string style: simple - explode: false in: header - name: if-match + name: authorization required: false schema: nullable: true type: string style: simple responses: - "200": + "201": content: application/json: schema: - $ref: "#/components/schemas/ArtifactOut" + $ref: "#/components/schemas/VersionCreatedOut" description: Successful Response headers: ETag: @@ -3622,6 +3824,26 @@ paths: schema: type: string style: simple + Location: + description: Canonical URL of the created resource. + explode: false + schema: + format: uri-reference + type: string + style: simple + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." + headers: X-Request-Id: description: Request correlation identifier. explode: false @@ -3632,8 +3854,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: WWW-Authenticate: description: RFC 6750 bearer authentication challenge. @@ -3651,9 +3873,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -3665,8 +3886,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The artifact or version does not exist in this drive. + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. headers: X-Request-Id: description: Request correlation identifier. @@ -3674,12 +3895,12 @@ paths: schema: type: string style: simple - "410": + "409": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The requested version was pruned by retention. + $ref: "#/components/schemas/drives_create_400_response" + description: "The mutation conflicts with current state (name/path, lifecycle)." headers: X-Request-Id: description: Request correlation identifier. @@ -3691,8 +3912,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: A request precondition did not match. + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match did not match the resource's current revision. headers: ETag: description: Current strong entity tag. @@ -3719,12 +3940,47 @@ paths: schema: type: string style: simple + "428": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match is required for this mutation. + headers: + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple "429": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. + headers: + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "503": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: Retry-After: description: Seconds until the caller should retry. @@ -3740,36 +3996,53 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: Restore a previous version as a new head version - /v0/artifacts/{path}: - delete: - description: |- - Soft-delete the artifact at the given path. - - A delete WITHOUT an `If-Match` precondition is last-writer-wins and will - silently remove a concurrently-modified artifact. - operationId: delete_artifact_v0_artifacts__path__delete + - bearerAuth: [] + summary: Restore Version + tags: + - versions + /v0/drives/{drive_id}/changes: + get: + description: Pull one page of changes. Exactly one of ``start`` or ``cursor``. + operationId: changes_list parameters: - explode: false in: path - name: path + name: drive_id required: true schema: - title: Path + title: Drive Id type: string style: simple - - explode: false - in: header - name: if-match + - explode: true + in: query + name: limit + required: false + schema: + nullable: true + type: integer + style: form + - explode: true + in: query + name: start required: false schema: + enum: + - now + - beginning nullable: true type: string - style: simple + style: form + - explode: true + in: query + name: cursor + required: false + schema: + nullable: true + type: string + style: form - explode: false in: header - name: x-agentdrive-actor + name: authorization required: false schema: nullable: true @@ -3780,7 +4053,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ArtifactDeleteOut" + $ref: "#/components/schemas/ChangePageOut" description: Successful Response headers: X-Request-Id: @@ -3789,12 +4062,27 @@ paths: schema: type: string style: simple + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_list_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument).\ + \ Pass exactly one of start or cursor (INVALID_REQUEST); a cursor not\ + \ issued for this drive fails with INVALID_CURSOR." + headers: + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple "401": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: WWW-Authenticate: description: RFC 6750 bearer authentication challenge. @@ -3812,9 +4100,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -3826,8 +4113,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: No such live artifact exists in this drive. + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. headers: X-Request-Id: description: Request correlation identifier. @@ -3835,12 +4122,14 @@ paths: schema: type: string style: simple - "412": + "410": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: A request precondition did not match. + $ref: "#/components/schemas/drives_list_400_response" + description: "The change cursor is older than retained history. Recover\ + \ with a full sync: capture start=now, enumerate current resources, then\ + \ replay from the captured cursor." headers: X-Request-Id: description: Request correlation identifier. @@ -3865,8 +4154,30 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. + headers: + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "503": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: Retry-After: description: Seconds until the caller should retry. @@ -3882,127 +4193,73 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: Delete Artifact - put: + - bearerAuth: [] + summary: List Changes + tags: + - changes + /v0/drives/{drive_id}/folders: + get: description: |- - Upload an artifact at the given path. The path is treated as the artifact's location in the drive — re-uploading the same path overwrites in place (idempotent). Returns 201 when the artifact is created (no prior live artifact at the path), 200 on overwrite — mirroring `PUT /v0/folders/{path}`. + List the drive's folders, newest-first (keyset paginated). - **Limits:** request body must not exceed **50 MB**. Path must be non-empty, ≤256 chars, only `[A-Za-z0-9_./-]`, no `..` segments, no leading/trailing slash. Per-token write rate limit: 100/hour. - - **Optional headers.** Each preserves the existing artifact's value when omitted on an overwrite, and takes the create-default on a new path; send the header to replace it: - - `X-AgentDrive-Labels`: comma-separated labels (e.g. `draft,report`); an empty value clears them. Each: lowercase `[a-z0-9_-]+`, ≤64 chars; ≤16 labels per artifact. - - `X-AgentDrive-Metadata`: JSON object of agent-attached fields. - - `X-AgentDrive-Source`: JSON `{"refs": [...]}` source provenance (present, including `{"refs": []}`, replaces). - - `X-AgentDrive-Actor`: caller-supplied actor name (≤64 chars) for event-log attribution. Untrusted; never used for authz. - - **Preconditions.** `If-Match: ".."` makes the write conditional on the current composite ETag (→ 412 PRECONDITION_FAILED). `If-None-Match: *` is create-only: it succeeds only if no live artifact occupies the path (→ 412 CREATE_CONFLICT if one does). The two are mutually exclusive (→ 400 BAD_PRECONDITION). - - **Integrity (optional).** `X-AgentDrive-Checksum: :` (`sha256:` or `crc32c:`) or the standard `Content-MD5` (base64 MD5) is verified against the received bytes before they land (→ 400 CHECKSUM_MISMATCH on mismatch); no artifact is created on failure. - operationId: put_artifact_v0_artifacts__path__put + ``lifecycle`` (active|deleted|all) exposes soft-deleted folders so the + post-delete revision can be read as the If-Match source for a restore. + ``parent_id`` / ``name`` are exact-match filters. Unknown query parameters + are rejected (§6.3). + operationId: folders_list parameters: - explode: false in: path - name: path + name: drive_id required: true schema: - title: Path + title: Drive Id type: string style: simple - - explode: false - in: header - name: content-type + - explode: true + in: query + name: lifecycle required: false schema: - default: application/octet-stream - title: Content-Type + default: active + title: Lifecycle type: string - style: simple - - explode: false - in: header - name: x-agentdrive-labels + style: form + - explode: true + in: query + name: limit required: false schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. nullable: true - type: string - style: simple - - explode: false - in: header - name: x-agentdrive-metadata + type: integer + style: form + - explode: true + in: query + name: cursor required: false schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. nullable: true type: string - style: simple - - explode: false - in: header - name: x-agentdrive-source + style: form + - explode: true + in: query + name: parent_id required: false schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. nullable: true type: string - style: simple - - explode: false - in: header - name: x-agentdrive-actor - required: false - schema: - nullable: true - type: string - style: simple - - explode: false - in: header - name: x-agentdrive-change-summary - required: false - schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. - nullable: true - type: string - style: simple - - explode: false - in: header - name: x-agentdrive-checksum - required: false - schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. - nullable: true - type: string - style: simple - - explode: false - in: header - name: content-md5 - required: false - schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. - nullable: true - type: string - style: simple - - explode: false - in: header - name: if-match + style: form + - explode: true + in: query + name: name required: false schema: nullable: true type: string - style: simple + style: form - explode: false in: header - name: if-none-match + name: authorization required: false schema: nullable: true @@ -4013,41 +4270,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ArtifactOut" + $ref: "#/components/schemas/FolderListOut" description: Successful Response headers: - ETag: - description: Current strong entity tag. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "201": - content: - application/json: - schema: - $ref: "#/components/schemas/ArtifactOut" - description: Artifact created at a previously unused path. - headers: - ETag: - description: Current strong entity tag. - explode: false - schema: - type: string - style: simple - Location: - description: Canonical URL of the created resource. - explode: false - schema: - format: uri-reference - type: string - style: simple X-Request-Id: description: Request correlation identifier. explode: false @@ -4058,8 +4283,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "The path, metadata, source, or conditional headers are invalid." + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." headers: X-Request-Id: description: Request correlation identifier. @@ -4071,8 +4296,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: WWW-Authenticate: description: RFC 6750 bearer authentication challenge. @@ -4090,9 +4315,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -4100,13 +4324,12 @@ paths: schema: type: string style: simple - "409": + "404": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The path is occupied and overwrite semantics do not permit - replacement. + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. headers: X-Request-Id: description: Request correlation identifier. @@ -4114,57 +4337,47 @@ paths: schema: type: string style: simple - "412": + "422": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: A request precondition did not match. + $ref: "#/components/schemas/ValidationErrorResponse" + description: Request validation failed. headers: - ETag: - description: Current strong entity tag. - explode: false - schema: - type: string - style: simple X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "413": + "429": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The artifact or resulting drive storage exceeds its limit. + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. headers: - X-Request-Id: - description: Request correlation identifier. + Retry-After: + description: Seconds until the caller should retry. explode: false schema: - type: string + minimum: 0 + type: integer style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "429": + "503": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: Retry-After: description: Seconds until the caller should retry. @@ -4180,50 +4393,65 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: Upload (or overwrite) an artifact - /v0/artifacts/{path}/download: - get: - description: "Same bytes-only machine surface as `/{art_id}/download` but resolves\ - \ the artifact by path, so callers don't have to resolve path→id first. Applies\ - \ the identical CSP `sandbox` + `nosniff` posture (never serves HTML inline\ - \ as active content)." - operationId: download_artifact_by_path_v0_artifacts__path__download_get + - bearerAuth: [] + summary: List Folders + tags: + - folders + post: + description: |- + Create one folder under `parent_id`; idempotent under the + ``Idempotency-Key``. + operationId: folders_create parameters: - explode: false in: path - name: path + name: drive_id + required: true + schema: + title: Drive Id + type: string + style: simple + - explode: false + in: header + name: Idempotency-Key required: true schema: - title: Path + nullable: true + type: string + style: simple + - explode: false + in: header + name: authorization + required: false + schema: + nullable: true type: string style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FolderCreateIn" + required: true responses: - "200": + "201": content: - application/octet-stream: + application/json: schema: - format: binary - type: string - description: Raw artifact bytes. + $ref: "#/components/schemas/FolderOut" + description: Successful Response headers: - X-Request-Id: - description: Request correlation identifier. + ETag: + description: Current strong entity tag. explode: false schema: type: string style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. + Location: + description: Canonical URL of the created resource. explode: false schema: + format: uri-reference type: string style: simple X-Request-Id: @@ -4232,13 +4460,12 @@ paths: schema: type: string style: simple - "403": + "400": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." headers: X-Request-Id: description: Request correlation identifier. @@ -4246,25 +4473,31 @@ paths: schema: type: string style: simple - "404": + "401": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: No live artifact exists at this path. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: + WWW-Authenticate: + description: RFC 6750 bearer authentication challenge. + explode: false + schema: + type: string + style: simple X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "422": + "403": content: application/json: schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -4272,51 +4505,26 @@ paths: schema: type: string style: simple - "429": + "404": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: The parent or target resource was not found or is not visible. headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - security: - - BearerAuth: [] - summary: Stream the artifact bytes by path (never rendered HTML) - /v0/artifacts/{path}/download-url: - get: - description: "Same as `/{art_id}/download-url` but resolves the artifact by\ - \ path. The returned proxy URL (when `direct:false`) still points at the by-id\ - \ `/download` endpoint. large-download-design.md §5.1." - operationId: download_url_by_path_v0_artifacts__path__download_url_get - parameters: - - explode: false - in: path - name: path - required: true - schema: - title: Path - type: string - style: simple - responses: - "200": + "409": content: application/json: schema: - $ref: "#/components/schemas/DownloadUrlOut" - description: Successful Response + $ref: "#/components/schemas/drives_create_400_response" + description: "A sibling already occupies the name/path, or the idempotency\ + \ key was reused for a different request." headers: X-Request-Id: description: Request correlation identifier. @@ -4324,15 +4532,15 @@ paths: schema: type: string style: simple - "401": + "412": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match did not match (copy/restore preconditions). headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. + ETag: + description: Current strong entity tag. explode: false schema: type: string @@ -4343,13 +4551,12 @@ paths: schema: type: string style: simple - "403": + "422": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/ValidationErrorResponse" + description: Request validation failed. headers: X-Request-Id: description: Request correlation identifier. @@ -4357,12 +4564,12 @@ paths: schema: type: string style: simple - "404": + "428": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The artifact does not exist in this drive. + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match is required for this mutation. headers: X-Request-Id: description: Request correlation identifier. @@ -4370,25 +4577,34 @@ paths: schema: type: string style: simple - "422": + "429": content: application/json: schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. headers: + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "429": + "503": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: Retry-After: description: Seconds until the caller should retry. @@ -4404,18 +4620,67 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: Signed direct-from-GCS download URL by path - /v0/artifacts/{path}/meta: - get: - operationId: get_artifact_meta_v0_artifacts__path__meta_get + - bearerAuth: [] + summary: Create Folder + tags: + - folders + /v0/drives/{drive_id}/folders/{folder_id}: + delete: + description: |- + Soft-delete a folder and its full live subtree (folders + artifacts) in + one transaction. A non-empty subtree requires ``recursive=true`` (409 + FOLDER_RECURSIVE_REQUIRED otherwise). Returns the deleted root + representation plus exact cascade counts and the post-delete + revision/ETag for a restore. + operationId: folders_delete parameters: - explode: false in: path - name: path + name: drive_id + required: true + schema: + title: Drive Id + type: string + style: simple + - explode: false + in: path + name: folder_id + required: true + schema: + title: Folder Id + type: string + style: simple + - explode: true + in: query + name: recursive + required: false + schema: + default: false + title: Recursive + type: boolean + style: form + - explode: false + in: header + name: Idempotency-Key + required: true + schema: + nullable: true + type: string + style: simple + - explode: false + in: header + name: If-Match required: true schema: - title: Path + nullable: true + type: string + style: simple + - explode: false + in: header + name: authorization + required: false + schema: + nullable: true type: string style: simple responses: @@ -4423,7 +4688,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ArtifactOut" + $ref: "#/components/schemas/FolderCascadeOut" description: Successful Response headers: ETag: @@ -4438,17 +4703,15 @@ paths: schema: type: string style: simple - "304": - description: The current entity tag or modification date matched. + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." headers: - ETag: - description: Current strong entity tag. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. + X-Request-Id: + description: Request correlation identifier. explode: false schema: type: string @@ -4457,8 +4720,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: WWW-Authenticate: description: RFC 6750 bearer authentication challenge. @@ -4476,9 +4739,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -4490,8 +4752,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The artifact does not exist in this drive. + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. headers: X-Request-Id: description: Request correlation identifier. @@ -4499,12 +4761,12 @@ paths: schema: type: string style: simple - "422": + "409": content: application/json: schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. + $ref: "#/components/schemas/drives_create_400_response" + description: "The mutation conflicts with current state (name/path, lifecycle)." headers: X-Request-Id: description: Request correlation identifier. @@ -4512,62 +4774,31 @@ paths: schema: type: string style: simple - "429": + "412": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match did not match the resource's current revision. headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. + ETag: + description: Current strong entity tag. explode: false schema: type: string style: simple - security: - - BearerAuth: [] - summary: Get Artifact Meta - /v0/auth/extension/exchange: - post: - description: Single-use opaque ticket → JWT pair. Called once by an extension's - auth-complete.html after the OAuth handoff lands. Returns a 15-minute `access_token` - (scope=extension) and a 90-day `identity_assertion` the extension stores and - refreshes via POST /oauth2/token. - operationId: extension_exchange_v0_auth_extension_exchange_post - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ExtensionExchangeRequest" - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/ExtensionExchangeResponse" - description: Successful Response - headers: X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "400": + "422": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The extension ID or ticket is invalid. + $ref: "#/components/schemas/ValidationErrorResponse" + description: Request validation failed. headers: X-Request-Id: description: Request correlation identifier. @@ -4575,12 +4806,12 @@ paths: schema: type: string style: simple - "422": + "428": content: application/json: schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match is required for this mutation. headers: X-Request-Id: description: Request correlation identifier. @@ -4592,14 +4823,14 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Too many extension sign-in attempts. + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. headers: Retry-After: description: Seconds until the caller should retry. explode: false schema: - minimum: 0.0 + minimum: 0 type: integer style: simple X-Request-Id: @@ -4612,49 +4843,108 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Extension authentication or token signing is unavailable. + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - summary: Redeem an extension OAuth ticket for a JWT pair + security: + - bearerAuth: [] + summary: Delete Folder tags: - - agent-auth - /v0/drives: + - folders get: description: |- - Returns drive **metadata** (workspaces-design §4.2): an **admin** sees the whole active workspace's drive inventory (every owner); a **member** sees only the drives they own. Metadata only — owner, size, timestamps — never a raw API key, and never an authorization to read a drive's contents. A `read`-scope token may call this; mutations require `full`. - - **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - operationId: list_drives_route_v0_drives_get + Read one active folder. ETag = quoted revision; matching + ``If-None-Match`` → 304. Deleted and cross-workspace folders are 404. + operationId: folders_read parameters: - - explode: true - in: query - name: cursor + - explode: false + in: path + name: drive_id + required: true + schema: + title: Drive Id + type: string + style: simple + - explode: false + in: path + name: folder_id + required: true + schema: + title: Folder Id + type: string + style: simple + - explode: false + in: header + name: If-None-Match required: false schema: nullable: true type: string - style: form - - explode: true - in: query - name: limit + style: simple + - explode: false + in: header + name: authorization required: false schema: nullable: true - type: integer - style: form + type: string + style: simple responses: "200": content: application/json: schema: - $ref: "#/components/schemas/DriveList" + $ref: "#/components/schemas/FolderOut" description: Successful Response + headers: + ETag: + description: Current strong entity tag. + explode: false + schema: + type: string + style: simple + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "304": + description: If-None-Match matched the current ETag. + headers: + ETag: + description: Current strong entity tag. + explode: false + schema: + type: string + style: simple + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." headers: X-Request-Id: description: Request correlation identifier. @@ -4666,8 +4956,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: WWW-Authenticate: description: RFC 6750 bearer authentication challenge. @@ -4685,9 +4975,21 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. + headers: + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. headers: X-Request-Id: description: Request correlation identifier. @@ -4712,8 +5014,30 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. + headers: + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "503": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: Retry-After: description: Seconds until the caller should retry. @@ -4729,39 +5053,90 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: List the drives you can see + - bearerAuth: [] + summary: Read Folder tags: - - drives - post: + - folders + patch: description: |- - Create a named drive. Any **member** of the space may create one; the creator becomes its **owner**. Requires a `full`-scope user token. The response carries the drive's `ad_live_` API key **once** (`api_key`) — store it now, it is never returned again (mint more keys via `POST /v0/drives/{id}/keys`). - - The target workspace is the user's active organization (`users.default_org`); cross-workspace creation names no other workspace in v0. - - A space may hold up to its plan's drive limit (workspaces-v2 §4.6; seat-aware for shared drives). A caller at the limit is blocked with `403 DRIVE_LIMIT_REACHED`; the limit is tier-governed, not a hard cap. - operationId: create_drive_route_v0_drives_post + Rename / move / update a folder's metadata or inheritance. Requires + ``Idempotency-Key`` and ``If-Match`` (428 absent, 412 stale); bumps the + revision. + operationId: folders_update + parameters: + - explode: false + in: path + name: drive_id + required: true + schema: + title: Drive Id + type: string + style: simple + - explode: false + in: path + name: folder_id + required: true + schema: + title: Folder Id + type: string + style: simple + - explode: false + in: header + name: Idempotency-Key + required: true + schema: + nullable: true + type: string + style: simple + - explode: false + in: header + name: If-Match + required: true + schema: + nullable: true + type: string + style: simple + - explode: false + in: header + name: authorization + required: false + schema: + nullable: true + type: string + style: simple requestBody: content: application/json: schema: - $ref: "#/components/schemas/DriveCreateIn" + $ref: "#/components/schemas/FolderUpdateIn" required: true responses: - "201": + "200": content: application/json: schema: - $ref: "#/components/schemas/DriveCreateOut" + $ref: "#/components/schemas/FolderOut" description: Successful Response headers: - Location: - description: Canonical URL of the created resource. + ETag: + description: Current strong entity tag. + explode: false + schema: + type: string + style: simple + X-Request-Id: + description: Request correlation identifier. explode: false schema: - format: uri-reference type: string style: simple + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." + headers: X-Request-Id: description: Request correlation identifier. explode: false @@ -4772,8 +5147,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: WWW-Authenticate: description: RFC 6750 bearer authentication challenge. @@ -4791,9 +5166,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -4801,12 +5175,12 @@ paths: schema: type: string style: simple - "422": + "404": content: application/json: schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. headers: X-Request-Id: description: Request correlation identifier. @@ -4814,51 +5188,25 @@ paths: schema: type: string style: simple - "429": + "409": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: "The mutation conflicts with current state (name/path, lifecycle)." headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - security: - - BearerAuth: [] - summary: Create a drive in your active space - tags: - - drives - /v0/drives/me: - get: - description: |- - Drive overview for the authenticated bearer token. - - Wire-protocol preservation (WorkOS integration §6): the `email` field - is preserved in the response shape; its meaning is now "the drive's - owner's email" (via `drives.owner_user_id` → `users.email`, joined - in `auth.resolve_drive`). For solo signups this equals v0 behavior — - the email the user signed up with. Returns null if the owner has - been hard-purged. `organization_id` is a new additive field, as are - `metageneration` / `etag` (also emitted as the `ETag` header). - operationId: me_v0_drives_me_get - responses: - "200": + "412": content: application/json: schema: - $ref: "#/components/schemas/DriveReadOut" - description: Successful Response + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match did not match the resource's current revision. headers: ETag: description: Current strong entity tag. @@ -4872,32 +5220,25 @@ paths: schema: type: string style: simple - "401": + "422": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/ValidationErrorResponse" + description: Request validation failed. headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "403": + "428": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match is required for this mutation. headers: X-Request-Id: description: Request correlation identifier. @@ -4905,31 +5246,40 @@ paths: schema: type: string style: simple - "422": + "429": content: application/json: schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. headers: + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "429": + "503": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: Retry-After: description: Seconds until the caller should retry. explode: false schema: - minimum: 0.0 + minimum: 0 type: integer style: simple X-Request-Id: @@ -4939,110 +5289,21 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: Me - /v0/drives/me/usage: - get: - description: "Unified view of every metered dimension: storage (snapshot), writes\ - \ (current hour), indexing ops + retrieval queries (current calendar month\ - \ UTC). Each row carries `used` and `limit`; `limit: 0` means unlimited (the\ - \ v0 free-tier default for the two monthly counters). Reads are de-throttled\ - \ — there is no hourly read budget; the monthly read count appears under `ops_this_month.reads`." - operationId: me_usage_v0_drives_me_usage_get - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/DriveUsageOut" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0.0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Current-period usage + caps for the authenticated drive - /v0/drives/{drive_id}: - delete: + - bearerAuth: [] + summary: Update Folder + tags: + - folders + /v0/drives/{drive_id}/folders/{folder_id}/copy: + post: description: |- - Mark the drive for cleanup. All tenant data (artifacts, versions, wiki, embeddings, events) is hidden via the `live_*` views and CASCADE-removed by the GC cleanup cron at `purge_at`. Restore via `POST /v0/drives/{id}/restore` while the row is still in trash. The path-param `drive_id` MUST match the authenticated drive. - - Accepts either an `ad_live_` per-drive key (deletes that key's drive) or an `ad_user_` user token selecting an owned drive (workspaces-design §5.3); a `read`-scope user token is rejected with 403 `INSUFFICIENT_SCOPE`. **Guard (§8):** a workspace must retain at least one live drive — deleting the workspace's last live drive returns 409 `LAST_DRIVE`. + Copy a folder's subtree within the same drive. - **Explicit confirmation required:** pass `?confirm=DELETE` or the request is rejected with 400 `CONFIRM_REQUIRED`. Tenant-level deletion is the largest-blast-radius operation on the API; the static token forces a deliberate act (soft-delete still gives a restore window on top). - - **Optimistic concurrency:** send `If-Match` with the drive's composite ETag (`".0."`, from a drive read) to make the delete conditional — a stale token returns 412 PRECONDITION_FAILED. A delete WITHOUT an `If-Match` precondition is last-writer-wins and will silently trash a concurrently-modified drive. - operationId: delete_drive_route_v0_drives__drive_id__delete + Cross-drive copy is out of v0 scope and rejected (400 INVALID_ARGUMENT). + ``destination_drive_id`` must equal the source drive when present. + Materializes the subtree synchronously → 201 + the copied folder. + ``If-Match`` is optional; when present it is validated against the source + revision (412 stale). + operationId: folders_copy parameters: - explode: false in: path @@ -5052,20 +5313,25 @@ paths: title: Drive Id type: string style: simple - - explode: true - in: query - name: confirm - required: false + - explode: false + in: path + name: folder_id + required: true + schema: + title: Folder Id + type: string + style: simple + - explode: false + in: header + name: Idempotency-Key + required: true schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. nullable: true type: string - style: form + style: simple - explode: false in: header - name: x-agentdrive-actor + name: If-Match required: false schema: nullable: true @@ -5073,18 +5339,24 @@ paths: style: simple - explode: false in: header - name: if-match + name: authorization required: false schema: nullable: true type: string style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FolderCopyIn" + required: true responses: - "200": + "201": content: application/json: schema: - $ref: "#/components/schemas/DriveDeleteOut" + $ref: "#/components/schemas/FolderOut" description: Successful Response headers: ETag: @@ -5093,6 +5365,13 @@ paths: schema: type: string style: simple + Location: + description: Canonical URL of the created resource. + explode: false + schema: + format: uri-reference + type: string + style: simple X-Request-Id: description: Request correlation identifier. explode: false @@ -5103,8 +5382,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The explicit DELETE confirmation is missing. + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." headers: X-Request-Id: description: Request correlation identifier. @@ -5116,8 +5395,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: WWW-Authenticate: description: RFC 6750 bearer authentication challenge. @@ -5135,9 +5414,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -5149,8 +5427,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: No such drive exists for this principal. + $ref: "#/components/schemas/drives_create_400_response" + description: The parent or target resource was not found or is not visible. headers: X-Request-Id: description: Request correlation identifier. @@ -5162,8 +5440,9 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The workspace must retain at least one live drive. + $ref: "#/components/schemas/drives_create_400_response" + description: "A sibling already occupies the name/path, or the idempotency\ + \ key was reused for a different request." headers: X-Request-Id: description: Request correlation identifier. @@ -5175,8 +5454,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: A request precondition did not match. + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match did not match (copy/restore preconditions). headers: ETag: description: Current strong entity tag. @@ -5203,12 +5482,47 @@ paths: schema: type: string style: simple + "428": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match is required for this mutation. + headers: + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple "429": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. + headers: + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "503": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: Retry-After: description: Seconds until the caller should retry. @@ -5224,14 +5538,17 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: Soft-delete a drive - get: - description: Identical to `GET /v0/drives/me` — the by-id singleton so `Location`-style - URLs and scripted clients can address the drive canonically. The path-param - `drive_id` MUST match the authenticated drive (mirrors the delete/trash routes' - no-leak 404). Emits the drive's composite `ETag` header (`".0."`). - operationId: get_drive_route_v0_drives__drive_id__get + - bearerAuth: [] + summary: Copy Folder + tags: + - folders + /v0/drives/{drive_id}/folders/{folder_id}/restore: + post: + description: |- + Restore a soft-deleted folder and its deleted subtree atomically. + If-Match must carry the post-delete revision; restoring an already-active + folder is 409 CONFLICT. + operationId: folders_restore parameters: - explode: false in: path @@ -5241,12 +5558,44 @@ paths: title: Drive Id type: string style: simple + - explode: false + in: path + name: folder_id + required: true + schema: + title: Folder Id + type: string + style: simple + - explode: false + in: header + name: Idempotency-Key + required: true + schema: + nullable: true + type: string + style: simple + - explode: false + in: header + name: If-Match + required: true + schema: + nullable: true + type: string + style: simple + - explode: false + in: header + name: authorization + required: false + schema: + nullable: true + type: string + style: simple responses: "200": content: application/json: schema: - $ref: "#/components/schemas/DriveReadOut" + $ref: "#/components/schemas/FolderCascadeOut" description: Successful Response headers: ETag: @@ -5261,12 +5610,25 @@ paths: schema: type: string style: simple + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." + headers: + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple "401": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: WWW-Authenticate: description: RFC 6750 bearer authentication challenge. @@ -5284,9 +5646,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -5298,8 +5659,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: No matching authenticated drive exists. + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. headers: X-Request-Id: description: Request correlation identifier. @@ -5307,12 +5668,12 @@ paths: schema: type: string style: simple - "422": + "409": content: application/json: schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. + $ref: "#/components/schemas/drives_create_400_response" + description: "The mutation conflicts with current state (name/path, lifecycle)." headers: X-Request-Id: description: Request correlation identifier. @@ -5320,19 +5681,18 @@ paths: schema: type: string style: simple - "429": + "412": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match did not match the resource's current revision. headers: - Retry-After: - description: Seconds until the caller should retry. + ETag: + description: Current strong entity tag. explode: false schema: - minimum: 0 - type: integer + type: string style: simple X-Request-Id: description: Request correlation identifier. @@ -5340,35 +5700,12 @@ paths: schema: type: string style: simple - security: - - BearerAuth: [] - summary: Drive overview by id (same shape as /drives/me) - patch: - description: Rename a drive. **Owner only** — a drive id that isn't yours returns - 404 (no-leak). Requires a `full`-scope user token. - operationId: rename_drive_route_v0_drives__drive_id__patch - parameters: - - explode: false - in: path - name: drive_id - required: true - schema: - title: Drive Id - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/DriveRenameIn" - required: true - responses: - "200": + "422": content: application/json: schema: - $ref: "#/components/schemas/DriveOut" - description: Successful Response + $ref: "#/components/schemas/ValidationErrorResponse" + description: Request validation failed. headers: X-Request-Id: description: Request correlation identifier. @@ -5376,12 +5713,12 @@ paths: schema: type: string style: simple - "400": + "428": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The drive update is invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match is required for this mutation. headers: X-Request-Id: description: Request correlation identifier. @@ -5389,91 +5726,41 @@ paths: schema: type: string style: simple - "401": + "429": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. + Retry-After: + description: Seconds until the caller should retry. explode: false schema: - type: string + minimum: 0 + type: integer style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "404": + "503": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: No such drive exists for this principal. + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: - X-Request-Id: - description: Request correlation identifier. + Retry-After: + description: Seconds until the caller should retry. explode: false schema: - type: string - style: simple - "409": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The drive update conflicts with current workspace state. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer + minimum: 0 + type: integer style: simple X-Request-Id: description: Request correlation identifier. @@ -5482,17 +5769,38 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: Rename a drive you own + - bearerAuth: [] + summary: Restore Folder tags: - - drives - /v0/drives/{drive_id}/keys: + - folders + /v0/drives/{drive_id}/grants: get: description: |- - List the `ad_live_` keys for a drive you manage (oldest first, including recently-revoked rows — filter on `revoked_at` for live only). **Manager only** (404 no-leak otherwise). A `read`-scope user token may list (metadata reveals no secret), mirroring `GET /v0/drives`. Metadata only — the raw key is never returned after mint. + List explicit grants in the drive, keyset paginated. + + **What you see depends on your role (contract change).** A caller holding + ``manager`` on the drive lists EVERY grant in it. Any other caller lists + only the grants that name them — their own agent/user rows, ``workspace`` + grants covering them, and ``public`` grants (which already expose the + resource to them anyway). Previously any drive ``viewer`` could page out + every principal id, role and expiry in the drive; that was an + access-graph disclosure, not a feature. + + The operation is refused (404) only for a caller holding no live grant + anywhere in the drive — never for lack of ``manager``, because seeing + your own access is not a privilege. That admits folder-scoped + principals, who previously 404'd here despite having access to show. A + folder ``manager`` still sees only their own rows, not the roster of the + subtree they administer; scoping the listing by per-resource + administration authority is a follow-up this change does not claim. - **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - operationId: list_drive_keys_route_v0_drives__drive_id__keys_get + ``resource_id`` filters to one resource's grants and REQUIRES + ``resource_type`` alongside it — a bare resource id is ambiguous across + the three resource kinds, and guessing the kind from the id prefix would + make the filter's meaning depend on an id format the contract does not + promise to keep. ``resource_type`` on its own remains a valid (and + pre-existing) filter. + operationId: grants_list parameters: - explode: false in: path @@ -5504,10 +5812,11 @@ paths: style: simple - explode: true in: query - name: cursor + name: lifecycle required: false schema: - nullable: true + default: active + title: Lifecycle type: string style: form - explode: true @@ -5518,12 +5827,52 @@ paths: nullable: true type: integer style: form + - explode: true + in: query + name: cursor + required: false + schema: + nullable: true + type: string + style: form + - explode: true + in: query + name: resource_type + required: false + schema: + nullable: true + type: string + style: form + - explode: true + in: query + name: resource_id + required: false + schema: + nullable: true + type: string + style: form + - explode: true + in: query + name: principal_type + required: false + schema: + nullable: true + type: string + style: form + - explode: false + in: header + name: authorization + required: false + schema: + nullable: true + type: string + style: simple responses: "200": content: application/json: schema: - $ref: "#/components/schemas/DriveApiKeyListOut" + $ref: "#/components/schemas/GrantListOut" description: Successful Response headers: X-Request-Id: @@ -5532,12 +5881,25 @@ paths: schema: type: string style: simple + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." + headers: + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple "401": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: WWW-Authenticate: description: RFC 6750 bearer authentication challenge. @@ -5555,9 +5917,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -5569,8 +5930,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The drive does not exist for this user. + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. headers: X-Request-Id: description: Request correlation identifier. @@ -5595,8 +5956,30 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. + headers: + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "503": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: Retry-After: description: Seconds until the caller should retry. @@ -5612,16 +5995,13 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: List a drive's API keys + - bearerAuth: [] + summary: List Grants tags: - - drives + - grants post: - description: "Mint a new `ad_live_` key for a drive you manage — a drive may\ - \ hold several (one per agent/integration). A `label` (a name for the key)\ - \ is **required**. **Manager only** (404 no-leak otherwise), `full`-scope\ - \ user token. The raw key is returned **once** — store it now." - operationId: create_drive_key_route_v0_drives__drive_id__keys_post + description: "Grant one principal a role on a drive, folder, or artifact." + operationId: grants_create parameters: - explode: false in: path @@ -5631,20 +6011,49 @@ paths: title: Drive Id type: string style: simple + - explode: false + in: header + name: Idempotency-Key + required: true + schema: + nullable: true + type: string + style: simple + - explode: false + in: header + name: authorization + required: false + schema: + nullable: true + type: string + style: simple requestBody: content: application/json: schema: - $ref: "#/components/schemas/DriveApiKeyCreateIn" + $ref: "#/components/schemas/GrantCreateIn" required: true responses: - "200": + "201": content: application/json: schema: - $ref: "#/components/schemas/DriveApiKeyCreateOut" + $ref: "#/components/schemas/GrantOut" description: Successful Response headers: + ETag: + description: Current strong entity tag. + explode: false + schema: + type: string + style: simple + Location: + description: Canonical URL of the created resource. + explode: false + schema: + format: uri-reference + type: string + style: simple X-Request-Id: description: Request correlation identifier. explode: false @@ -5655,8 +6064,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The key label or scope is invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." headers: X-Request-Id: description: Request correlation identifier. @@ -5668,8 +6077,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: WWW-Authenticate: description: RFC 6750 bearer authentication challenge. @@ -5687,9 +6096,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -5701,8 +6109,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The drive does not exist for this user. + $ref: "#/components/schemas/drives_create_400_response" + description: The parent or target resource was not found or is not visible. headers: X-Request-Id: description: Request correlation identifier. @@ -5710,12 +6118,13 @@ paths: schema: type: string style: simple - "422": + "409": content: application/json: schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. + $ref: "#/components/schemas/drives_create_400_response" + description: "A sibling already occupies the name/path, or the idempotency\ + \ key was reused for a different request." headers: X-Request-Id: description: Request correlation identifier. @@ -5723,91 +6132,44 @@ paths: schema: type: string style: simple - "429": + "412": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match did not match (copy/restore preconditions). headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. + ETag: + description: Current strong entity tag. explode: false schema: type: string style: simple - security: - - BearerAuth: [] - summary: Create a drive API key - tags: - - drives - /v0/drives/{drive_id}/keys/{key_id}/revoke: - post: - description: "Revoke one `ad_live_` key of a drive you manage — anything using\ - \ it loses access immediately. **Manager only** (404 no-leak otherwise), `full`-scope\ - \ user token. Idempotent: revoking an unknown/already-revoked key returns\ - \ 204 too (no existence oracle)." - operationId: revoke_drive_key_route_v0_drives__drive_id__keys__key_id__revoke_post - parameters: - - explode: false - in: path - name: drive_id - required: true - schema: - title: Drive Id - type: string - style: simple - - explode: false - in: path - name: key_id - required: true - schema: - title: Key Id - type: string - style: simple - responses: - "204": - description: Successful Response - headers: X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "401": + "422": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/ValidationErrorResponse" + description: Request validation failed. headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "403": + "428": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match is required for this mutation. headers: X-Request-Id: description: Request correlation identifier. @@ -5815,38 +6177,34 @@ paths: schema: type: string style: simple - "404": + "429": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The drive or key does not exist for this user. + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. headers: - X-Request-Id: - description: Request correlation identifier. + Retry-After: + description: Seconds until the caller should retry. explode: false schema: - type: string + minimum: 0 + type: integer style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "429": + "503": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: Retry-After: description: Seconds until the caller should retry. @@ -5862,18 +6220,14 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: Revoke a drive API key + - bearerAuth: [] + summary: Create Grant tags: - - drives - /v0/drives/{drive_id}/keys/{key_id}/rotate: - post: - description: "Rotate a single `ad_live_` key: revoke `key_id` and mint a replacement\ - \ that inherits its label. **Only that key** is affected — the drive's other\ - \ keys keep working. **Manager only** (404 no-leak otherwise), `full`-scope\ - \ user token. The new key is returned **once** — store it now. A `key_id`\ - \ that isn't a live key of this drive is a 404." - operationId: rotate_one_key_route_v0_drives__drive_id__keys__key_id__rotate_post + - grants + /v0/drives/{drive_id}/grants/{grant_id}: + delete: + description: "Revoke a grant (soft, sets revoked_at) under If-Match." + operationId: grants_revoke parameters: - explode: false in: path @@ -5885,10 +6239,34 @@ paths: style: simple - explode: false in: path - name: key_id + name: grant_id + required: true + schema: + title: Grant Id + type: string + style: simple + - explode: false + in: header + name: Idempotency-Key + required: true + schema: + nullable: true + type: string + style: simple + - explode: false + in: header + name: If-Match required: true schema: - title: Key Id + nullable: true + type: string + style: simple + - explode: false + in: header + name: authorization + required: false + schema: + nullable: true type: string style: simple responses: @@ -5896,8 +6274,27 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/DriveApiKeyCreateOut" + $ref: "#/components/schemas/GrantOut" description: Successful Response + headers: + ETag: + description: Current strong entity tag. + explode: false + schema: + type: string + style: simple + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." headers: X-Request-Id: description: Request correlation identifier. @@ -5909,8 +6306,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: WWW-Authenticate: description: RFC 6750 bearer authentication challenge. @@ -5928,9 +6325,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -5942,8 +6338,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The drive or key does not exist for this user. + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. headers: X-Request-Id: description: Request correlation identifier. @@ -5951,12 +6347,12 @@ paths: schema: type: string style: simple - "422": + "409": content: application/json: schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. + $ref: "#/components/schemas/drives_create_400_response" + description: "The mutation conflicts with current state (name/path, lifecycle)." headers: X-Request-Id: description: Request correlation identifier. @@ -5964,19 +6360,18 @@ paths: schema: type: string style: simple - "429": + "412": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match did not match the resource's current revision. headers: - Retry-After: - description: Seconds until the caller should retry. + ETag: + description: Current strong entity tag. explode: false schema: - minimum: 0 - type: integer + type: string style: simple X-Request-Id: description: Request correlation identifier. @@ -5984,18 +6379,82 @@ paths: schema: type: string style: simple - security: - - BearerAuth: [] - summary: Rotate one API key - tags: - - drives - /v0/drives/{drive_id}/restore: - post: - description: |- - Clear `deleted_at` + `purge_at` on a soft-deleted drive. Soft-deleted child artifacts get their retention window rebased to the drive-restore moment (see deletion-design.md §5.2). Available only while the drive is in trash. Returns 404 if the drive is live or already hard-deleted. - - **Optimistic concurrency:** send `If-Match` with the trashed drive's composite ETag (`".0."`, e.g. from the delete response's `ETag` header) to make the restore conditional — a stale token returns 412 PRECONDITION_FAILED. A restore WITHOUT an `If-Match` precondition is last-writer-wins. - operationId: restore_drive_route_v0_drives__drive_id__restore_post + "422": + content: + application/json: + schema: + $ref: "#/components/schemas/ValidationErrorResponse" + description: Request validation failed. + headers: + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "428": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match is required for this mutation. + headers: + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "429": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. + headers: + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "503": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." + headers: + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + security: + - bearerAuth: [] + summary: Revoke Grant + tags: + - grants + get: + description: Read one grant in the drive. + operationId: grants_read parameters: - explode: false in: path @@ -6005,9 +6464,17 @@ paths: title: Drive Id type: string style: simple + - explode: false + in: path + name: grant_id + required: true + schema: + title: Grant Id + type: string + style: simple - explode: false in: header - name: x-agentdrive-actor + name: If-None-Match required: false schema: nullable: true @@ -6015,7 +6482,7 @@ paths: style: simple - explode: false in: header - name: if-match + name: authorization required: false schema: nullable: true @@ -6026,7 +6493,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/DriveRestoreOut" + $ref: "#/components/schemas/GrantOut" description: Successful Response headers: ETag: @@ -6041,15 +6508,11 @@ paths: schema: type: string style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + "304": + description: If-None-Match matched the current ETag. headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. + ETag: + description: Current strong entity tag. explode: false schema: type: string @@ -6060,13 +6523,12 @@ paths: schema: type: string style: simple - "403": + "400": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." headers: X-Request-Id: description: Request correlation identifier. @@ -6074,25 +6536,31 @@ paths: schema: type: string style: simple - "404": + "401": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The drive does not exist or is not in trash. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: + WWW-Authenticate: + description: RFC 6750 bearer authentication challenge. + explode: false + schema: + type: string + style: simple X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "409": + "403": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The drive cannot be restored into its current workspace state. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -6100,19 +6568,13 @@ paths: schema: type: string style: simple - "412": + "404": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: If-Match does not match the current drive. + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. headers: - ETag: - description: Current strong entity tag. - explode: false - schema: - type: string - style: simple X-Request-Id: description: Request correlation identifier. explode: false @@ -6136,8 +6598,30 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. + headers: + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "503": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: Retry-After: description: Seconds until the caller should retry. @@ -6153,15 +6637,13 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: Restore a soft-deleted drive - /v0/drives/{drive_id}/trash: - get: - description: |- - Returns soft-deleted artifacts on the drive plus the drive's own soft-delete state (if applicable). The path-param `drive_id` MUST match the authenticated drive. - - **Compatibility window:** `limit` or `cursor` opts into cursor pagination. Unadorned requests retain the legacy complete result during the migration window. Paginated requests are clamped to 1–100 items (default 50 when only `cursor` is supplied). `items` is canonical; `artifacts` is a deprecated same-value alias. - operationId: list_trash_route_v0_drives__drive_id__trash_get + - bearerAuth: [] + summary: Read Grant + tags: + - grants + patch: + description: Change a grant's role or expiry under If-Match. + operationId: grants_update parameters: - explode: false in: path @@ -6171,30 +6653,58 @@ paths: title: Drive Id type: string style: simple - - explode: true - in: query - name: cursor - required: false + - explode: false + in: path + name: grant_id + required: true + schema: + title: Grant Id + type: string + style: simple + - explode: false + in: header + name: Idempotency-Key + required: true schema: nullable: true type: string - style: form - - explode: true - in: query - name: limit + style: simple + - explode: false + in: header + name: If-Match + required: true + schema: + nullable: true + type: string + style: simple + - explode: false + in: header + name: authorization required: false schema: nullable: true - type: integer - style: form + type: string + style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/GrantUpdateIn" + required: true responses: "200": content: application/json: schema: - $ref: "#/components/schemas/TrashOut" + $ref: "#/components/schemas/GrantOut" description: Successful Response headers: + ETag: + description: Current strong entity tag. + explode: false + schema: + type: string + style: simple X-Request-Id: description: Request correlation identifier. explode: false @@ -6205,8 +6715,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The cursor is malformed (`BAD_CURSOR`). + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." headers: X-Request-Id: description: Request correlation identifier. @@ -6218,8 +6728,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: WWW-Authenticate: description: RFC 6750 bearer authentication challenge. @@ -6237,9 +6747,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -6251,8 +6760,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: No matching authenticated drive exists. + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. headers: X-Request-Id: description: Request correlation identifier. @@ -6260,12 +6769,12 @@ paths: schema: type: string style: simple - "422": + "409": content: application/json: schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. + $ref: "#/components/schemas/drives_create_400_response" + description: "The mutation conflicts with current state (name/path, lifecycle)." headers: X-Request-Id: description: Request correlation identifier. @@ -6273,19 +6782,18 @@ paths: schema: type: string style: simple - "429": + "412": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match did not match the resource's current revision. headers: - Retry-After: - description: Seconds until the caller should retry. + ETag: + description: Current strong entity tag. explode: false schema: - minimum: 0 - type: integer + type: string style: simple X-Request-Id: description: Request correlation identifier. @@ -6293,83 +6801,12 @@ paths: schema: type: string style: simple - security: - - BearerAuth: [] - summary: List the authenticated drive's trash - /v0/events: - get: - description: |- - Returns events newest-first. Filters compose with AND. - - **Cursor pagination:** pass the oldest event's `created_at` from the previous page as `before` to fetch the next page back in time. Combine `since` + `before` to bound a window. - operationId: list_events_route_v0_events_get - parameters: - - explode: true - in: query - name: art_id - required: false - schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. - nullable: true - type: string - style: form - - explode: true - in: query - name: action - required: false - schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. - nullable: true - type: string - style: form - - explode: true - in: query - name: since - required: false - schema: - format: date-time - nullable: true - type: string - style: form - - explode: true - in: query - name: before - required: false - schema: - format: date-time - nullable: true - type: string - style: form - - explode: true - in: query - name: cursor - required: false - schema: - nullable: true - type: string - style: form - - explode: true - in: query - name: limit - required: false - schema: - default: 50 - maximum: 200 - minimum: 1 - title: Limit - type: integer - style: form - responses: - "200": + "422": content: application/json: schema: - $ref: "#/components/schemas/EventPage" - description: Successful Response + $ref: "#/components/schemas/ValidationErrorResponse" + description: Request validation failed. headers: X-Request-Id: description: Request correlation identifier. @@ -6377,12 +6814,12 @@ paths: schema: type: string style: simple - "400": + "428": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The pagination cursor is invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match is required for this mutation. headers: X-Request-Id: description: Request correlation identifier. @@ -6390,18 +6827,19 @@ paths: schema: type: string style: simple - "401": + "429": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. + Retry-After: + description: Seconds until the caller should retry. explode: false schema: - type: string + minimum: 0 + type: integer style: simple X-Request-Id: description: Request correlation identifier. @@ -6409,47 +6847,22 @@ paths: schema: type: string style: simple - "403": + "503": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple X-Request-Id: description: Request correlation identifier. explode: false @@ -6457,28 +6870,61 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: Read the append-only event log for the authenticated drive - /v0/feedback: + - bearerAuth: [] + summary: Update Grant + tags: + - grants + /v0/drives/{drive_id}/restore: post: description: |- - File feedback. Body: `{kind, title, body, contact?, - attachments?: [art_id, ...]}` — attachments are snapshotted from - this drive's artifacts at submit time. - operationId: post_feedback_v0_feedback_post + Restore a soft-deleted drive. If-Match must carry the post-delete + revision; restoring an already-active drive is 409 CONFLICT. + operationId: drives_restore + parameters: + - explode: false + in: path + name: drive_id + required: true + schema: + title: Drive Id + type: string + style: simple + - explode: false + in: header + name: Idempotency-Key + required: true + schema: + nullable: true + type: string + style: simple + - explode: false + in: header + name: If-Match + required: true + schema: + nullable: true + type: string + style: simple + - explode: false + in: header + name: authorization + required: false + schema: + nullable: true + type: string + style: simple responses: - "201": + "200": content: application/json: schema: - $ref: "#/components/schemas/FeedbackCreateOut" + $ref: "#/components/schemas/DriveOut" description: Successful Response headers: - Location: - description: Canonical URL of the created resource. + ETag: + description: Current strong entity tag. explode: false schema: - format: uri-reference type: string style: simple X-Request-Id: @@ -6491,8 +6937,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The feedback body or attachment list is invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." headers: X-Request-Id: description: Request correlation identifier. @@ -6504,8 +6950,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: WWW-Authenticate: description: RFC 6750 bearer authentication challenge. @@ -6523,9 +6969,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -6537,8 +6982,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: An attached artifact does not exist in this drive. + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. headers: X-Request-Id: description: Request correlation identifier. @@ -6546,12 +6991,12 @@ paths: schema: type: string style: simple - "422": + "409": content: application/json: schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. + $ref: "#/components/schemas/drives_create_400_response" + description: "The mutation conflicts with current state (name/path, lifecycle)." headers: X-Request-Id: description: Request correlation identifier. @@ -6559,85 +7004,44 @@ paths: schema: type: string style: simple - "429": + "412": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match did not match the resource's current revision. headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0.0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. + ETag: + description: Current strong entity tag. explode: false schema: type: string style: simple - security: - - BearerAuth: [] - summary: Post Feedback - x-stability-level: beta - /v0/feedback/{fbk_id}: - get: - description: |- - Lifecycle status of feedback THIS drive filed. Foreign tickets - read as 404 — indistinguishable from absent. - operationId: get_feedback_status_v0_feedback__fbk_id__get - parameters: - - explode: false - in: path - name: fbk_id - required: true - schema: - title: Fbk Id - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/FeedbackStatusOut" - description: Successful Response - headers: X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "401": + "422": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/ValidationErrorResponse" + description: Request validation failed. headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "403": + "428": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match is required for this mutation. headers: X-Request-Id: description: Request correlation identifier. @@ -6645,38 +7049,34 @@ paths: schema: type: string style: simple - "404": + "429": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The feedback ticket does not exist in this drive. + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. headers: - X-Request-Id: - description: Request correlation identifier. + Retry-After: + description: Seconds until the caller should retry. explode: false schema: - type: string + minimum: 0 + type: integer style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "429": + "503": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: Retry-After: description: Seconds until the caller should retry. @@ -6692,36 +7092,38 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: Get Feedback Status - x-stability-level: beta - /v0/find: + - bearerAuth: [] + summary: Restore Drive + tags: + - drives + /v0/drives/{drive_id}/search: get: description: |- - Passage-level chunk RAG over `embed_chunks`. Lexical (`chunk_tsv`, GIN) + semantic (HNSW over `embedding`) are run in parallel and fused via Reciprocal Rank Fusion (k=60). Unlike `/v0/search`, which only sees the first ~16 KB preview of each artifact, `/v0/find` reaches the full file body. - - **Modes:** - - `hybrid` (default) — lexical + semantic, RRF-fused. - - `lexical` — `chunk_tsv` only. Best for exact tokens, identifiers, code snippets. - - `semantic` — embedding only. Best for conceptual queries where the surface terms differ from the query phrasing. - - **Granularity:** results are passages, not files. A long document with multiple matching regions returns multiple hits with distinct `ord` values; consecutive `ord`s overlap by ~400 tokens. Dedupe by `art_id` if you want one row per file. - - **Span citations:** `char_start`/`char_end` for text & code, `page_start`/`page_end` for PDFs, `time_start_ms`/`time_end_ms` for audio & video. Only the modality-relevant pair is populated. - - **Filters:** `label`, `file_type`, `prefix`, `modality` (repeatable), `updated_after` / `updated_before` (RFC 3339 timestamps, inclusive bounds on `updated_at`, applied to both legs). + Search the drive's live artifacts. ``q`` is required and must be + non-empty. - **Wiki coverage:** `/v0/find` excludes `_wiki/` paths by default and — importantly — does NOT cover them even when the caller passes `prefix=_wiki/...`. Wiki pages are not embedded by the pipeline (they're system-generated output, not user input), so `embed_chunks` has no rows for them and the join returns empty. Use `wiki_search` (or `list`/`grep` with a `_wiki/` prefix) for the wiki layer. + ``mode`` selects the retrieval engine: ``lexical``, ``hybrid``, or + ``semantic``. This deployment enables ``lexical`` only; requesting a + disabled mode fails ``400 SEARCH_MODE_UNAVAILABLE``. - **Embedding availability:** when `GEMINI_API_KEY` is not configured, `mode=semantic` returns 503; `mode=hybrid` logs a warning and falls back to lexical-only; `mode=lexical` is unaffected. - operationId: find_v0_find_get + Each hit's ``snippet`` is HTML-safe by contract: artifact content is + entity-escaped and only the server's own ````/```` highlight + pair survives, so a client may render it as HTML. + operationId: drive_search parameters: + - explode: false + in: path + name: drive_id + required: true + schema: + title: Drive Id + type: string + style: simple - explode: true in: query name: q required: true schema: - maxLength: 500 minLength: 1 title: Q type: string @@ -6731,28 +7133,25 @@ paths: name: mode required: false schema: - default: hybrid + default: lexical enum: - - hybrid - lexical + - hybrid - semantic title: Mode type: string style: form - explode: true in: query - name: label + name: limit required: false schema: - items: - type: string - title: Label - type: array - default: null + nullable: true + type: integer style: form - explode: true in: query - name: file_type + name: cursor required: false schema: nullable: true @@ -6760,42 +7159,31 @@ paths: style: form - explode: true in: query - name: prefix + name: parent_id required: false schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. nullable: true type: string style: form - explode: true in: query - name: modality + name: content_type required: false schema: - items: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. - nullable: true - type: string - title: Modality - type: array - default: null + nullable: true + type: string style: form - explode: true in: query - name: updated_after + name: label required: false schema: - format: date-time nullable: true type: string style: form - explode: true in: query - name: updated_before + name: updated_after required: false schema: format: date-time @@ -6804,21 +7192,27 @@ paths: style: form - explode: true in: query - name: limit + name: updated_before required: false schema: - default: 20 - maximum: 100 - minimum: 1 - title: Limit - type: integer + format: date-time + nullable: true + type: string style: form + - explode: false + in: header + name: authorization + required: false + schema: + nullable: true + type: string + style: simple responses: "200": content: application/json: schema: - $ref: "#/components/schemas/FindPage" + $ref: "#/components/schemas/SearchPageOut" description: Successful Response headers: X-Request-Id: @@ -6827,12 +7221,26 @@ paths: schema: type: string style: simple + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_list_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument).\ + \ Requesting a disabled search mode fails with SEARCH_MODE_UNAVAILABLE." + headers: + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple "401": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: WWW-Authenticate: description: RFC 6750 bearer authentication challenge. @@ -6850,9 +7258,21 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. + headers: + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. headers: X-Request-Id: description: Request correlation identifier. @@ -6877,8 +7297,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. headers: Retry-After: description: Seconds until the caller should retry. @@ -6897,10 +7317,18 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Semantic embeddings are unavailable; use lexical or hybrid - mode. + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple X-Request-Id: description: Request correlation identifier. explode: false @@ -6908,40 +7336,76 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: Hybrid passage retrieval over the full file body - /v0/folders/{fld_id}: - delete: - operationId: delete_folder_by_id_v0_folders__fld_id__delete + - bearerAuth: [] + summary: Drive Search + tags: + - search + /v0/drives/{drive_id}/shares: + get: + description: |- + List the drive's shares (no secrets), keyset paginated. + + ``resource_id`` narrows the page to one resource's links and REQUIRES + ``resource_type`` alongside it — a bare resource id is ambiguous across + ``artifact`` / ``artifact_version`` / ``folder``, and inferring the kind + from the id prefix would tie the filter's meaning to an id format the + contract does not promise to keep. ``resource_type`` alone is a valid + filter. Listing shares already requires drive ``manager``, so these + filters only narrow a page the caller could already read in full. + operationId: shares_list parameters: - explode: false in: path - name: fld_id + name: drive_id required: true schema: - title: Fld Id + title: Drive Id type: string style: simple - explode: true in: query - name: recursive + name: lifecycle required: false schema: - default: false - title: Recursive - type: boolean + default: active + title: Lifecycle + type: string style: form - - explode: false - in: header - name: x-agentdrive-actor + - explode: true + in: query + name: limit + required: false + schema: + nullable: true + type: integer + style: form + - explode: true + in: query + name: cursor required: false schema: nullable: true type: string - style: simple + style: form + - explode: true + in: query + name: resource_type + required: false + schema: + nullable: true + type: string + style: form + - explode: true + in: query + name: resource_id + required: false + schema: + nullable: true + type: string + style: form - explode: false in: header - name: if-match + name: authorization required: false schema: nullable: true @@ -6952,7 +7416,7 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/FolderDeleteOut" + $ref: "#/components/schemas/ShareListOut" description: Successful Response headers: X-Request-Id: @@ -6961,20 +7425,33 @@ paths: schema: type: string style: simple - "401": + "400": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. + X-Request-Id: + description: Request correlation identifier. explode: false schema: type: string style: simple - X-Request-Id: + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. + headers: + WWW-Authenticate: + description: RFC 6750 bearer authentication challenge. + explode: false + schema: + type: string + style: simple + X-Request-Id: description: Request correlation identifier. explode: false schema: @@ -6984,9 +7461,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -6998,8 +7474,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The folder does not exist in this drive. + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. headers: X-Request-Id: description: Request correlation identifier. @@ -7007,12 +7483,12 @@ paths: schema: type: string style: simple - "412": + "422": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: A request precondition did not match. + $ref: "#/components/schemas/ValidationErrorResponse" + description: Request validation failed. headers: X-Request-Id: description: Request correlation identifier. @@ -7020,25 +7496,34 @@ paths: schema: type: string style: simple - "422": + "429": content: application/json: schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. headers: + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "429": + "503": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: Retry-After: description: Seconds until the caller should retry. @@ -7054,25 +7539,52 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: Soft-delete a folder by stable ID (cascade with ?recursive=true) - get: - operationId: get_folder_by_id_v0_folders__fld_id__get + - bearerAuth: [] + summary: List Shares + tags: + - shares + post: + description: |- + Mint a read-only bearer link. The response carries the plaintext + secret — the only response that does. + operationId: shares_create parameters: - explode: false in: path - name: fld_id + name: drive_id + required: true + schema: + title: Drive Id + type: string + style: simple + - explode: false + in: header + name: Idempotency-Key required: true schema: - title: Fld Id + nullable: true + type: string + style: simple + - explode: false + in: header + name: authorization + required: false + schema: + nullable: true type: string style: simple + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ShareCreateIn" + required: true responses: - "200": + "201": content: application/json: schema: - $ref: "#/components/schemas/FolderOut" + $ref: "#/components/schemas/ShareCreateOut" description: Successful Response headers: ETag: @@ -7081,21 +7593,26 @@ paths: schema: type: string style: simple - X-Request-Id: - description: Request correlation identifier. + Location: + description: Canonical URL of the created resource. explode: false schema: + format: uri-reference type: string style: simple - "304": - description: The current entity tag or modification date matched. - headers: - ETag: - description: Current strong entity tag. + X-Request-Id: + description: Request correlation identifier. explode: false schema: type: string style: simple + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." + headers: X-Request-Id: description: Request correlation identifier. explode: false @@ -7106,8 +7623,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: WWW-Authenticate: description: RFC 6750 bearer authentication challenge. @@ -7125,9 +7642,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -7139,9 +7655,42 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The folder does not exist in this drive. + $ref: "#/components/schemas/drives_create_400_response" + description: The parent or target resource was not found or is not visible. + headers: + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "A sibling already occupies the name/path, or the idempotency\ + \ key was reused for a different request." + headers: + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "412": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match did not match (copy/restore preconditions). headers: + ETag: + description: Current strong entity tag. + explode: false + schema: + type: string + style: simple X-Request-Id: description: Request correlation identifier. explode: false @@ -7161,12 +7710,47 @@ paths: schema: type: string style: simple + "428": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match is required for this mutation. + headers: + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple "429": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. + headers: + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "503": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: Retry-After: description: Seconds until the caller should retry. @@ -7182,47 +7766,61 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: Canonical lookup of a folder by its stable ID - patch: - operationId: patch_folder_by_id_v0_folders__fld_id__patch + - bearerAuth: [] + summary: Create Share + tags: + - shares + /v0/drives/{drive_id}/shares/{share_id}: + delete: + description: "Revoke a share (soft, sets revoked_at) under If-Match." + operationId: shares_revoke parameters: - explode: false in: path - name: fld_id + name: drive_id + required: true + schema: + title: Drive Id + type: string + style: simple + - explode: false + in: path + name: share_id required: true schema: - title: Fld Id + title: Share Id type: string style: simple - explode: false in: header - name: x-agentdrive-actor - required: false + name: Idempotency-Key + required: true + schema: + nullable: true + type: string + style: simple + - explode: false + in: header + name: If-Match + required: true schema: nullable: true type: string style: simple - explode: false in: header - name: if-match + name: authorization required: false schema: nullable: true type: string style: simple - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/FolderPatchIn" - required: true responses: "200": content: application/json: schema: - $ref: "#/components/schemas/FolderOut" + $ref: "#/components/schemas/ShareOut" description: Successful Response headers: ETag: @@ -7241,8 +7839,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The folder update is invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." headers: X-Request-Id: description: Request correlation identifier. @@ -7254,8 +7852,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: WWW-Authenticate: description: RFC 6750 bearer authentication challenge. @@ -7273,9 +7871,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -7287,8 +7884,21 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The folder does not exist in this drive. + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. + headers: + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "The mutation conflicts with current state (name/path, lifecycle)." headers: X-Request-Id: description: Request correlation identifier. @@ -7300,8 +7910,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: A request precondition did not match. + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match did not match the resource's current revision. headers: ETag: description: Current strong entity tag. @@ -7328,12 +7938,47 @@ paths: schema: type: string style: simple + "428": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match is required for this mutation. + headers: + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple "429": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. + headers: + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "503": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: Retry-After: description: Seconds until the caller should retry. @@ -7349,33 +7994,33 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: Update folder metadata by stable ID - /v0/folders/{fld_id}/copy: - post: - description: |- - Clone the folder identified by URL id — and every descendant folder + artifact — under the body's `path` (canonical, trailing slash). Each copied artifact reuses the source's CAS object (zero new storage) but gets a fresh `art_…` ID, a fresh version 1, and `source.refs = [{type: 'artifact', id: ''}]` provenance. The new folder gets a fresh `fld_…` ID and the source's description. - - The entire subtree is copied in a SINGLE transaction — either every row lands or none does. - - Quota: each copy's `size_bytes` counts against the drive's `storage_bytes` even though physical bytes are shared. - - Source-version pin: pass `from_metageneration` in the body to require the source folder's current `metageneration` to equal it (→ 412 SOURCE_VERSION_MISMATCH). Destination create-only: `If-None-Match: *` returns 412 CREATE_CONFLICT (instead of 409 FOLDER_PATH_CONFLICT) when the destination folder is occupied. - - Returns 409 `FOLDER_PATH_CONFLICT` if the destination collides with a live folder or artifact; 400 `FOLDER_PATH_INVALID` if `path` is non-canonical; 413 `SUBTREE_TOO_LARGE` if the source holds more than 5000 artifacts; 413 `STORAGE_QUOTA_EXCEEDED` if the copy would push the drive over its limit. - operationId: copy_folder_by_id_v0_folders__fld_id__copy_post + - bearerAuth: [] + summary: Revoke Share + tags: + - shares + get: + description: Read one share's management representation (no secret). + operationId: shares_read parameters: - explode: false in: path - name: fld_id + name: drive_id + required: true + schema: + title: Drive Id + type: string + style: simple + - explode: false + in: path + name: share_id required: true schema: - title: Fld Id + title: Share Id type: string style: simple - explode: false in: header - name: x-agentdrive-actor + name: If-None-Match required: false schema: nullable: true @@ -7383,24 +8028,18 @@ paths: style: simple - explode: false in: header - name: if-none-match + name: authorization required: false schema: nullable: true type: string style: simple - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/FolderCopyIn" - required: true responses: - "201": + "200": content: application/json: schema: - $ref: "#/components/schemas/FolderCopyOut" + $ref: "#/components/schemas/ShareOut" description: Successful Response headers: ETag: @@ -7409,11 +8048,19 @@ paths: schema: type: string style: simple - Location: - description: Canonical URL of the created resource. + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "304": + description: If-None-Match matched the current ETag. + headers: + ETag: + description: Current strong entity tag. explode: false schema: - format: uri-reference type: string style: simple X-Request-Id: @@ -7426,8 +8073,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The destination path is invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." headers: X-Request-Id: description: Request correlation identifier. @@ -7439,8 +8086,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: WWW-Authenticate: description: RFC 6750 bearer authentication challenge. @@ -7458,9 +8105,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -7472,8 +8118,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The folder does not exist in this drive. + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. headers: X-Request-Id: description: Request correlation identifier. @@ -7481,12 +8127,12 @@ paths: schema: type: string style: simple - "409": + "422": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The destination path is already occupied. + $ref: "#/components/schemas/ValidationErrorResponse" + description: Request validation failed. headers: X-Request-Id: description: Request correlation identifier. @@ -7494,18 +8140,19 @@ paths: schema: type: string style: simple - "412": + "429": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: A request precondition did not match. + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. headers: - ETag: - description: Current strong entity tag. + Retry-After: + description: Seconds until the caller should retry. explode: false schema: - type: string + minimum: 0 + type: integer style: simple X-Request-Id: description: Request correlation identifier. @@ -7513,46 +8160,22 @@ paths: schema: type: string style: simple - "413": + "503": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The copied subtree would exceed the drive storage limit. + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple X-Request-Id: description: Request correlation identifier. explode: false @@ -7560,177 +8183,63 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: "Duplicate a folder subtree to a new path (CAS-shared, new IDs)" - /v0/folders/{fld_id}/meta: - get: - operationId: get_folder_by_id_meta_v0_folders__fld_id__meta_get + - bearerAuth: [] + summary: Read Share + tags: + - shares + /v0/drives/{drive_id}/shares/{share_id}/rotate: + post: + description: |- + Rotate the secret in place (same id, no grace window). The response + carries the new plaintext secret. + operationId: shares_rotate parameters: - explode: false in: path - name: fld_id + name: drive_id required: true schema: - title: Fld Id + title: Drive Id type: string style: simple - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/FolderOut" - description: Successful Response - headers: - ETag: - description: Current strong entity tag. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "304": - description: The current entity tag or modification date matched. - headers: - ETag: - description: Current strong entity tag. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The folder does not exist in this drive. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Folder metadata by stable ID (same shape as the bare id route) - /v0/folders/{fld_id}/move: - post: - operationId: move_folder_by_id_v0_folders__fld_id__move_post - parameters: - explode: false in: path - name: fld_id + name: share_id required: true schema: - title: Fld Id + title: Share Id type: string style: simple - explode: false in: header - name: x-agentdrive-actor - required: false + name: Idempotency-Key + required: true + schema: + nullable: true + type: string + style: simple + - explode: false + in: header + name: If-Match + required: true schema: nullable: true type: string style: simple - explode: false in: header - name: if-match + name: authorization required: false schema: nullable: true type: string style: simple - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/FolderMoveIn" - required: true responses: "200": content: application/json: schema: - $ref: "#/components/schemas/FolderOut" + $ref: "#/components/schemas/ShareCreateOut" description: Successful Response headers: ETag: @@ -7749,8 +8258,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The destination path is invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." headers: X-Request-Id: description: Request correlation identifier. @@ -7762,8 +8271,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: WWW-Authenticate: description: RFC 6750 bearer authentication challenge. @@ -7781,9 +8290,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -7795,8 +8303,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The folder does not exist in this drive. + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. headers: X-Request-Id: description: Request correlation identifier. @@ -7808,8 +8316,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The destination path is already occupied. + $ref: "#/components/schemas/drives_create_400_response" + description: "The mutation conflicts with current state (name/path, lifecycle)." headers: X-Request-Id: description: Request correlation identifier. @@ -7821,8 +8329,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: A request precondition did not match. + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match did not match the resource's current revision. headers: ETag: description: Current strong entity tag. @@ -7849,12 +8357,47 @@ paths: schema: type: string style: simple + "428": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: If-Match is required for this mutation. + headers: + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple "429": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. + headers: + Retry-After: + description: Seconds until the caller should retry. + explode: false + schema: + minimum: 0 + type: integer + style: simple + X-Request-Id: + description: Request correlation identifier. + explode: false + schema: + type: string + style: simple + "503": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: Retry-After: description: Seconds until the caller should retry. @@ -7870,37 +8413,29 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: Rename / move a folder by stable ID (cascade descendants) - /v0/folders/{fld_id}/restore: - post: + - bearerAuth: [] + summary: Rotate Share + tags: + - shares + /v0/drives/{drive_id}/usage: + get: description: |- - Mirrors `POST /v0/artifacts/{art_id}/restore` for folders: clear `deleted_at` + `purge_at` on a soft-deleted folder AND exactly the descendants soft-deleted in the same cascade (descendants trashed separately keep their trash state; restore those individually — the per-artifact restore remains for cherry-picking). Available only while the folder is in trash; returns 404 if it is live or already hard-purged. - - Returns 409 `PATH_CONFLICT` when a live folder/artifact now occupies a path this restore would reinstate (`colliding_path` + `kind` identify it). Unlike artifact restore there are NO `rename`/`overwrite` escape hatches — the whole cascade aborts; free the colliding path (or cherry-pick artifacts) and retry. - - `If-Match` (the trashed folder's composite ETag) makes the restore conditional → 412 PRECONDITION_FAILED on a stale token; omitted, the restore is last-writer-wins. - operationId: restore_folder_by_id_v0_folders__fld_id__restore_post + Byte counters for one active drive: storage is the live sum of its + versions' sizes; retrieval reads the counter the content-read slice + maintains (0 until it lands). + operationId: drives_usage parameters: - explode: false in: path - name: fld_id + name: drive_id required: true schema: - title: Fld Id - type: string - style: simple - - explode: false - in: header - name: x-agentdrive-actor - required: false - schema: - nullable: true + title: Drive Id type: string style: simple - explode: false in: header - name: if-match + name: authorization required: false schema: nullable: true @@ -7911,15 +8446,22 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/FolderRestoreOut" + $ref: "#/components/schemas/DriveUsageOut" description: Successful Response headers: - ETag: - description: Current strong entity tag. + X-Request-Id: + description: Request correlation identifier. explode: false schema: type: string style: simple + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/drives_create_400_response" + description: "Malformed request (invalid query parameter, cursor, or argument)." + headers: X-Request-Id: description: Request correlation identifier. explode: false @@ -7930,8 +8472,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. + $ref: "#/components/schemas/drives_create_400_response" + description: Missing or invalid bearer token. headers: WWW-Authenticate: description: RFC 6750 bearer authentication challenge. @@ -7949,9 +8491,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. + $ref: "#/components/schemas/drives_create_400_response" + description: Token lacks a required scope. headers: X-Request-Id: description: Request correlation identifier. @@ -7963,8 +8504,8 @@ paths: content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: No restorable folder exists with this ID. + $ref: "#/components/schemas/drives_create_400_response" + description: The resource was not found or is not visible to the caller. headers: X-Request-Id: description: Request correlation identifier. @@ -7972,12 +8513,12 @@ paths: schema: type: string style: simple - "409": + "422": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: The restore destination is already occupied. + $ref: "#/components/schemas/ValidationErrorResponse" + description: Request validation failed. headers: X-Request-Id: description: Request correlation identifier. @@ -7985,44 +8526,34 @@ paths: schema: type: string style: simple - "412": + "429": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: A request precondition did not match. + $ref: "#/components/schemas/drives_create_400_response" + description: Rate limited. headers: - ETag: - description: Current strong entity tag. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. + Retry-After: + description: Seconds until the caller should retry. explode: false schema: - type: string + minimum: 0 + type: integer style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: X-Request-Id: description: Request correlation identifier. explode: false schema: type: string style: simple - "429": + "503": content: application/json: schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." + $ref: "#/components/schemas/drives_create_400_response" + description: "Token verification is temporarily unavailable (the Hub JWKS\ + \ could not be fetched). This is the API's unavailability, not a problem\ + \ with the presented credential." headers: Retry-After: description: Seconds until the caller should retry. @@ -8038,8248 +8569,90 @@ paths: type: string style: simple security: - - BearerAuth: [] - summary: Restore a soft-deleted folder (cascade) - /v0/folders/{path}: - delete: + - bearerAuth: [] + summary: Drive Usage + tags: + - drives +components: + schemas: + ArtifactCopyIn: + additionalProperties: false description: |- - Soft-delete the folder. Refuses if the folder has live descendants unless `?recursive=true` is set, in which case ALL descendant folders + artifacts are soft-deleted in the same transaction. + POST /v0/drives/{id}/artifacts/{artifact_id}/copy body. - Returns 409 `FOLDER_RECURSIVE_REQUIRED` (with descendant counts in `colliding_path`) when recursion is needed but the flag isn't set. Retention window is frozen on `purge_at` per deletion-design.md §5.1; mid-retention tier changes don't shift it. - operationId: delete_folder_by_path_v0_folders__path__delete - parameters: - - explode: false - in: path - name: path - required: true - schema: - title: Path + ``destination_drive_id`` must equal the source drive (or be absent) — + cross-drive copy is out of v0 scope and rejected. + example: + destination_drive_id: destination_drive_id + destination_name: destination_name + destination_parent_id: destination_parent_id + version_id: version_id + properties: + destination_drive_id: + nullable: true + pattern: "^drv_[a-f0-9]{16}$" type: string - style: simple - - explode: true - in: query - name: recursive - required: false - schema: - default: false - title: Recursive - type: boolean - style: form - - explode: false - in: header - name: x-agentdrive-actor - required: false - schema: - nullable: true - type: string - style: simple - - explode: false - in: header - name: if-match - required: false - schema: - nullable: true - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/FolderDeleteOut" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The folder does not exist in this drive. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "412": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: A request precondition did not match. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Soft-delete a folder (cascade with ?recursive=true) - get: - operationId: get_folder_by_path_v0_folders__path__get - parameters: - - explode: false - in: path - name: path - required: true - schema: - title: Path - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/FolderOut" - description: Successful Response - headers: - ETag: - description: Current strong entity tag. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "304": - description: The current entity tag or modification date matched. - headers: - ETag: - description: Current strong entity tag. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The folder does not exist in this drive. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Read folder metadata by path - patch: - description: Partial update — field absence leaves the value unchanged; explicit - `null` clears the field. Use the by-id endpoint (slice 2) when you need stable - addressing across renames. - operationId: patch_folder_by_path_v0_folders__path__patch - parameters: - - explode: false - in: path - name: path - required: true - schema: - title: Path - type: string - style: simple - - explode: false - in: header - name: x-agentdrive-actor - required: false - schema: - nullable: true - type: string - style: simple - - explode: false - in: header - name: if-match - required: false - schema: - nullable: true - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/FolderPatchIn" - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/FolderOut" - description: Successful Response - headers: - ETag: - description: Current strong entity tag. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The folder update is invalid. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The folder does not exist in this drive. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "412": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: A request precondition did not match. - headers: - ETag: - description: Current strong entity tag. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Update folder metadata by path - put: - description: |- - Create a folder at the URL path. Idempotent create-at-known-URI (mirrors `PUT /v0/artifacts/{path}`) — a second call for the same live path returns the existing row unchanged (metadata updates require PATCH). Returns 201 on create, 200 when the folder already exists. - - Send `If-None-Match: *` to make it strictly create-only: an existing folder then returns 412 CREATE_CONFLICT instead of the idempotent 200. - - Returns 409 `FOLDER_PATH_CONFLICT` if a live artifact occupies the file form of the path (e.g. mkdir `/foo/` when an artifact lives at `/foo`). - operationId: create_folder_by_path_v0_folders__path__put - parameters: - - explode: false - in: path - name: path - required: true - schema: - title: Path - type: string - style: simple - - explode: false - in: header - name: x-agentdrive-actor - required: false - schema: - nullable: true - type: string - style: simple - - explode: false - in: header - name: if-none-match - required: false - schema: - nullable: true - type: string - style: simple - requestBody: - content: - application/json: - schema: - allOf: - - $ref: "#/components/schemas/FolderCreateIn" - nullable: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/FolderOut" - description: The existing folder was returned unchanged. - headers: - ETag: - description: Current strong entity tag. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "201": - content: - application/json: - schema: - $ref: "#/components/schemas/FolderOut" - description: Successful Response - headers: - ETag: - description: Current strong entity tag. - explode: false - schema: - type: string - style: simple - Location: - description: Canonical URL of the created resource. - explode: false - schema: - format: uri-reference - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The folder path is invalid. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "409": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The folder conflicts with an existing path. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "412": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: A request precondition did not match. - headers: - ETag: - description: Current strong entity tag. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Create a folder (idempotent) - /v0/folders/{path}/meta: - get: - operationId: get_folder_by_path_meta_v0_folders__path__meta_get - parameters: - - explode: false - in: path - name: path - required: true - schema: - title: Path - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/FolderOut" - description: Successful Response - headers: - ETag: - description: Current strong entity tag. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "304": - description: The current entity tag or modification date matched. - headers: - ETag: - description: Current strong entity tag. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The folder does not exist in this drive. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Folder metadata by path (same shape as the bare path route) - /v0/folders/{path}/move: - post: - description: |- - Move the folder identified by URL path to the body's `path`. All descendant folders + artifacts are path-prefix-updated in the same transaction. The folder's `fld_*` ID stays stable. - - Returns 409 `FOLDER_PATH_CONFLICT` if the destination prefix collides with a live folder or artifact path. - operationId: move_folder_by_path_v0_folders__path__move_post - parameters: - - explode: false - in: path - name: path - required: true - schema: - title: Path - type: string - style: simple - - explode: false - in: header - name: x-agentdrive-actor - required: false - schema: - nullable: true - type: string - style: simple - - explode: false - in: header - name: if-match - required: false - schema: - nullable: true - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/FolderMoveIn" - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/FolderOut" - description: Successful Response - headers: - ETag: - description: Current strong entity tag. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The source or destination path is invalid. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The source folder does not exist in this drive. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "409": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The destination path is already occupied. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "412": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: A request precondition did not match. - headers: - ETag: - description: Current strong entity tag. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Rename / move a folder (cascade-update descendants) - /v0/grants: - get: - description: "**Cursor pagination:** when more results exist, the response carries\ - \ `next_cursor`. Pass it back as `?cursor=` to fetch the next page;\ - \ `null` means the listing is complete. `limit` is clamped to [1, 100] (default\ - \ 50), never rejected. The `resource` filter must be re-sent on every page\ - \ — the cursor encodes only the keyset position." - operationId: list_grants_route_v0_grants_get - parameters: - - description: art_*/fld_* id or a path - explode: true - in: query - name: resource - required: true - schema: - description: art_*/fld_* id or a path - title: Resource - type: string - style: form - - explode: true - in: query - name: cursor - required: false - schema: - nullable: true - type: string - style: form - - explode: true - in: query - name: limit - required: false - schema: - nullable: true - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/GrantList" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The cursor or resource reference is invalid. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The target resource does not exist in this drive. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: List live grants on a resource (requires can_manage) - post: - operationId: create_grant_route_v0_grants_post - parameters: - - explode: false - in: header - name: x-agentdrive-actor - required: false - schema: - nullable: true - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/GrantCreateIn" - required: true - responses: - "201": - content: - application/json: - schema: - $ref: "#/components/schemas/GrantOut" - description: Successful Response - headers: - Location: - description: Canonical URL of the created resource. - explode: false - schema: - format: uri-reference - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The grant or expiry is invalid. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The target resource does not exist in this drive. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Create (or fetch) a per-principal grant on a resource - /v0/grants/{grn_id}: - delete: - operationId: delete_grant_route_v0_grants__grn_id__delete - parameters: - - explode: false - in: path - name: grn_id - required: true - schema: - title: Grn Id - type: string - style: simple - - explode: false - in: header - name: x-agentdrive-actor - required: false - schema: - nullable: true - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/RevokeOut" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The grant does not exist in this drive. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: "Revoke a grant (can_manage, or self-revoke own grant)" - get: - description: |- - The `Location` target of `POST /v0/grants`. Authorization mirrors - DELETE: `can_manage` on the granted resource, or the caller IS the - grant's own principal (a grantee may read — like revoke — their own - grant). A revoked grant reads as 404 (same no-leak shape as a - foreign/absent id); DELETE stays idempotent on it. - operationId: get_grant_route_v0_grants__grn_id__get - parameters: - - explode: false - in: path - name: grn_id - required: true - schema: - title: Grn Id - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/GrantOut" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The grant does not exist in this drive. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: "Read a single grant (can_manage, or the grant's own principal)" - patch: - operationId: patch_grant_route_v0_grants__grn_id__patch - parameters: - - explode: false - in: path - name: grn_id - required: true - schema: - title: Grn Id - type: string - style: simple - - explode: false - in: header - name: x-agentdrive-actor - required: false - schema: - nullable: true - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/GrantPatchIn" - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/GrantOut" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The grant update or expiry is invalid. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The grant does not exist in this drive. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Update a grant's role and/or expiry (requires can_manage) - /v0/invitations: - get: - description: |- - List the pending invitations for the caller's active workspace. **Admin only.** Metadata only — the raw invite token is never surfaced. - - Newest first (`created_at` descending, tie-broken by `id`). Paginated: `limit` is clamped to [1, 100] (default 50, never a 422); pass the response's `next_cursor` back as `cursor` for the next page (`null` when the listing is complete). - operationId: list_invitations_v0_invitations_get - parameters: - - explode: true - in: query - name: cursor - required: false - schema: - nullable: true - type: string - style: form - - explode: true - in: query - name: limit - required: false - schema: - nullable: true - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/InvitationList" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: List pending invitations - tags: - - members - /v0/invitations/{invitation_id}: - delete: - description: "Revoke a pending invitation in the caller's active workspace.\ - \ **Admin only**, `full` scope. Org-scoped + idempotent: `revoked` is a COUNT\ - \ — 1 when a live invite was revoked, 0 when it was already gone (a forged\ - \ id, an invite from another workspace, or an already-consumed invite all\ - \ return `revoked: 0`, no-leak)." - operationId: revoke_invitation_v0_invitations__invitation_id__delete - parameters: - - explode: false - in: path - name: invitation_id - required: true - schema: - title: Invitation Id - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/RevokeOut" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The invitation does not exist in this workspace. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Revoke a pending invitation - tags: - - members - /v0/jobs/{job_id}: - get: - operationId: get_job_v0_jobs__job_id__get - parameters: - - explode: false - in: path - name: job_id - required: true - schema: - title: Job Id - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/CompileJobOut" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: No such compile job exists in this drive. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Poll a job - x-stability-level: beta - /v0/jobs/{job_id}/cancel: - post: - operationId: cancel_job_v0_jobs__job_id__cancel_post - parameters: - - explode: false - in: path - name: job_id - required: true - schema: - title: Job Id - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/CompileJobOut" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: No such compile job exists in this drive. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Cancel a queued/running job - x-stability-level: beta - /v0/jobs/{job_id}/logs: - get: - operationId: get_job_logs_v0_jobs__job_id__logs_get - parameters: - - explode: false - in: path - name: job_id - required: true - schema: - title: Job Id - type: string - style: simple - responses: - "200": - content: - text/plain: - schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. - nullable: true - type: string - description: Raw compile log. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The job or its captured log does not exist. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Raw compile log (text/plain) - x-stability-level: beta - /v0/members: - get: - description: |- - List live members (email, role, joined-at) of the caller's active workspace. Any **member** may list; a `read`-scope token is sufficient. - - Ordered by join time (`created_at`, tie-broken by `user_id`) — **no role grouping is promised**; a dashboard that wants admins-first sorts client-side. Paginated: `limit` is clamped to [1, 100] (default 50, never a 422); pass the response's `next_cursor` back as `cursor` for the next page (`null` when the listing is complete). - operationId: list_members_v0_members_get - parameters: - - explode: true - in: query - name: cursor - required: false - schema: - nullable: true - type: string - style: form - - explode: true - in: query - name: limit - required: false - schema: - nullable: true - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/MemberList" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: List the members of your active workspace - tags: - - members - /v0/members/invite: - post: - description: "Create a pending invitation in the caller's active workspace and\ - \ enqueue the invite email. **Admin only**, `full` scope. Inviting an existing\ - \ member is a no-op success (`already_member: true`). A duplicate pending\ - \ invite for the same email returns 409 `INVITE_PENDING` (resend it from the\ - \ members page). The raw invite token is delivered only by email — never in\ - \ this response." - operationId: invite_member_v0_members_invite_post - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/MemberInviteIn" - required: true - responses: - "201": - content: - application/json: - schema: - $ref: "#/components/schemas/InviteCreateOut" - description: Successful Response - headers: - Location: - description: Canonical URL of the created resource. - explode: false - schema: - format: uri-reference - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The email or role is invalid. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "409": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The user is already a member or has a pending invitation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0.0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Invite a person to your workspace by email - tags: - - members - /v0/members/{target_user_id}: - delete: - description: |- - Remove a member from the caller's active workspace, soft-deleting every drive that member owns there (workspaces-design §4.4 — no ownership transfer in v0; their `ad_live_` keys then stop working). **Admin** may remove anyone; **any member** may remove themselves (self-leave). `full` scope. Removing the **last/sole admin** is rejected with 409 `LAST_ADMIN` (promote someone first, or delete the workspace). - - **Explicit confirmation required:** pass `?confirm=DELETE` or the request is rejected with 400 `CONFIRM_REQUIRED` — removal cascades a soft-delete of every drive the member owns, so it carries tenant-level blast radius (uniform with `DELETE /v0/drives/{id}`). - - Deliberately takes NO `If-Match`: membership rows carry no generation/metageneration axis to pin (there is no ETag to echo), so `?confirm=DELETE` is the sole mutation guard here. - operationId: remove_member_v0_members__target_user_id__delete - parameters: - - explode: false - in: path - name: target_user_id - required: true - schema: - title: Target User Id - type: string - style: simple - - explode: true - in: query - name: confirm - required: false - schema: - nullable: true - type: string - style: form - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/MemberRemoveOut" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The member does not exist in this workspace. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "409": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The removal would violate workspace ownership requirements. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Remove a member (or leave) - tags: - - members - patch: - description: "Promote/demote a member in the caller's active workspace. **Admin\ - \ only**, `full` scope. Demoting the workspace's **last admin** is rejected\ - \ with 409 `LAST_ADMIN` (promote someone first)." - operationId: set_member_role_v0_members__target_user_id__patch - parameters: - - explode: false - in: path - name: target_user_id - required: true - schema: - title: Target User Id - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/MemberRoleIn" - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/MemberOut" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The membership update is invalid. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The member does not exist in this workspace. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "409": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The update would violate workspace ownership requirements. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Change a member's role - tags: - - members - /v0/projects/{fld_id}: - get: - operationId: get_project_v0_projects__fld_id__get - parameters: - - explode: false - in: path - name: fld_id - required: true - schema: - title: Fld Id - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/CompileProjectOut" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The project folder does not exist or has no compile configuration. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Get a project's compile config - x-stability-level: beta - put: - operationId: put_project_v0_projects__fld_id__put - parameters: - - explode: false - in: path - name: fld_id - required: true - schema: - title: Fld Id - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ProjectConfigIn" - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/CompileProjectOut" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The compile engine or entrypoint is invalid. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The project folder does not exist in this drive. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Set a project's compile config (entrypoint/engine/auto_compile) - x-stability-level: beta - /v0/projects/{fld_id}/jobs: - get: - description: "List compile jobs newest first in stable `(created_at, job_id)`\ - \ descending order. Pass a non-null `next_cursor` back as `cursor` to continue;\ - \ malformed cursors return `400 BAD_CURSOR`. The cursor contains only the\ - \ keyset position, so a `status` filter must be re-sent unchanged on every\ - \ page. `limit` retains its existing default of 50 and validated range of\ - \ 1 through 200." - operationId: list_project_jobs_v0_projects__fld_id__jobs_get - parameters: - - explode: false - in: path - name: fld_id - required: true - schema: - title: Fld Id - type: string - style: simple - - explode: true - in: query - name: status - required: false - schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. - nullable: true - type: string - style: form - - explode: true - in: query - name: limit - required: false - schema: - default: 50 - maximum: 200 - minimum: 1 - title: Limit - type: integer - style: form - - explode: true - in: query - name: cursor - required: false - schema: - nullable: true - type: string - style: form - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/CompileJobListOut" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "The status filter is invalid, or the cursor is malformed (`BAD_CURSOR`)." - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The project folder does not exist in this drive. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: List a project's jobs - x-stability-level: beta - post: - operationId: enqueue_job_v0_projects__fld_id__jobs_post - parameters: - - explode: false - in: path - name: fld_id - required: true - schema: - title: Fld Id - type: string - style: simple - - explode: false - in: header - name: x-agentdrive-actor - required: false - schema: - nullable: true - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/CompileJobIn" - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/CompileJobOut" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "202": - content: - application/json: - schema: - $ref: "#/components/schemas/CompileJobOut" - description: Compile accepted and queued or running. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "The task, engine, entrypoint, or project is invalid." - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "402": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The current plan does not permit this compile. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The project folder does not exist in this drive. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "413": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The compile project exceeds an input or storage limit. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Enqueue a compile job for a project (folder) - x-stability-level: beta - /v0/query: - post: - operationId: post_query_v0_query_post - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/QueryIn" - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/Response_Post_Query_V0_Query_Post" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The SQL or referenced dataset is invalid. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "402": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The current plan does not permit this query. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0.0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "503": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The configured query engine is unavailable. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Run a read-only SQL query over authorized datasets - x-stability-level: beta - /v0/query/describe: - post: - operationId: post_describe_v0_query_describe_post - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/DescribeIn" - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/DatasetDescriptionOut" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The referenced dataset is invalid. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0.0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "503": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The configured query engine is unavailable. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Describe a dataset's column schema - x-stability-level: beta - /v0/query/lookup-values: - post: - operationId: post_lookup_values_v0_query_lookup_values_post - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/LookupValuesIn" - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/LookupValuesOut" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "The dataset, column, or limit is invalid." - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "402": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The current plan does not permit this query. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0.0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "503": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The configured query engine is unavailable. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: List distinct values of a dataset column - x-stability-level: beta - /v0/search: - get: - description: |- - Lexical (not semantic) full-text search powered by Postgres `websearch_to_tsquery`. Results are ranked by `ts_rank` over a weighted tsvector (path > content > metadata > labels). - - **Supported query syntax:** - - Words: `kangaroo` (English stemming) - - Phrases: `"exact phrase"` - - Negation: `kangaroo -secret` - - AND (implicit): `kangaroo secret` - - OR: `kangaroo OR koala` - - Paths & filenames: `reports/q3-summary.md` or `q3-summary.md` match by their path words (`/ . _ -` are word boundaries) - - **Not supported (v0):** - - Semantic / embedding similarity - - PDF and image content (only the path + metadata are searchable) - - Non-English stemming - - Fuzzy matching, regex - - Boolean operator parentheses - - **Filters:** `label` (repeatable, AND), `file_type` (enum), `prefix` (path prefix), `updated_after` / `updated_before` (RFC 3339 timestamps, inclusive bounds on `updated_at`). - operationId: search_v0_search_get - parameters: - - explode: true - in: query - name: q - required: true - schema: - maxLength: 200 - minLength: 1 - title: Q - type: string - style: form - - explode: true - in: query - name: label - required: false - schema: - items: - type: string - title: Label - type: array - default: null - style: form - - explode: true - in: query - name: file_type - required: false - schema: - nullable: true - type: string - style: form - - explode: true - in: query - name: prefix - required: false - schema: - nullable: true - type: string - style: form - - explode: true - in: query - name: updated_after - required: false - schema: - format: date-time - nullable: true - type: string - style: form - - explode: true - in: query - name: updated_before - required: false - schema: - format: date-time - nullable: true - type: string - style: form - - explode: true - in: query - name: limit - required: false - schema: - default: 20 - maximum: 100 - minimum: 1 - title: Limit - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/SearchPage" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The search query or filter is invalid. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Full-text search over artifacts in the drive - /v0/shares: - get: - description: "**Cursor pagination:** when more results exist, the response carries\ - \ `next_cursor`. Pass it back as `?cursor=` to fetch the next page;\ - \ `null` means the listing is complete. `limit` is clamped to [1, 100] (default\ - \ 50), never rejected. The `resource` filter must be re-sent on every page\ - \ — the cursor encodes only the keyset position." - operationId: list_shares_route_v0_shares_get - parameters: - - description: art_*/fld_* id or a path - explode: true - in: query - name: resource - required: true - schema: - description: art_*/fld_* id or a path - title: Resource - type: string - style: form - - explode: true - in: query - name: cursor - required: false - schema: - nullable: true - type: string - style: form - - explode: true - in: query - name: limit - required: false - schema: - nullable: true - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/ShareList" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The cursor or resource reference is invalid. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The target resource does not exist in this drive. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: List live share links on a resource (requires can_manage) - post: - operationId: create_share_route_v0_shares_post - parameters: - - explode: false - in: header - name: x-agentdrive-actor - required: false - schema: - nullable: true - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ShareCreateIn" - required: true - responses: - "201": - content: - application/json: - schema: - $ref: "#/components/schemas/ShareMintOut" - description: Successful Response - headers: - Location: - description: Canonical URL of the created resource. - explode: false - schema: - format: uri-reference - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The share settings or expiry are invalid. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The target resource does not exist in this drive. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Mint a share link (returns the share_key once) - /v0/shares/{shr_id}: - delete: - operationId: delete_share_route_v0_shares__shr_id__delete - parameters: - - explode: false - in: path - name: shr_id - required: true - schema: - title: Shr Id - type: string - style: simple - - explode: false - in: header - name: x-agentdrive-actor - required: false - schema: - nullable: true - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/RevokeOut" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The share does not exist in this drive. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Revoke a share link (requires can_manage) - get: - description: |- - The `Location` target of `POST /v0/shares`. Metadata ONLY — - `ShareOut` never carries the raw `share_key`/URL (returned exactly - once at mint/rotate, §4.5). Authorization mirrors DELETE: - `can_manage` on the shared resource. A revoked share reads as 404 - (same no-leak shape as a foreign/absent id). - operationId: get_share_route_v0_shares__shr_id__get - parameters: - - explode: false - in: path - name: shr_id - required: true - schema: - title: Shr Id - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/ShareOut" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The share does not exist in this drive. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Read a single share link's metadata (requires can_manage) - /v0/shares/{shr_id}/rotate: - post: - operationId: rotate_share_route_v0_shares__shr_id__rotate_post - parameters: - - explode: false - in: path - name: shr_id - required: true - schema: - title: Shr Id - type: string - style: simple - - explode: false - in: header - name: x-agentdrive-actor - required: false - schema: - nullable: true - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/ShareMintOut" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The replacement password is invalid. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The share does not exist in this drive. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Revoke + reissue a share link's key (requires can_share) - /v0/tokens: - get: - description: |- - List the `ad_user_` tokens belonging to the authenticated user. Metadata only — the raw token is shown once at mint (web only) and is never returned here. Includes recently-revoked tokens (with `revoked_at` set) so the caller can audit them; newest first. - - **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - operationId: list_tokens_v0_tokens_get - parameters: - - explode: true - in: query - name: cursor - required: false - schema: - nullable: true - type: string - style: form - - explode: true - in: query - name: limit - required: false - schema: - nullable: true - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/UserTokenList" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: List your user-identity tokens - tags: - - tokens - /v0/tokens/{token_id}/revoke: - post: - description: "Revoke a single `ad_user_` token by id. Scoped to the authenticated\ - \ user: a token id that isn't yours returns 404 (no-leak). Idempotent — revoking\ - \ an already-revoked token also returns 404 (it is no longer a live token\ - \ of yours to revoke). On success the revoked token's metadata is returned\ - \ with `revoked_at` set." - operationId: revoke_token_v0_tokens__token_id__revoke_post - parameters: - - explode: false - in: path - name: token_id - required: true - schema: - title: Token Id - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/UserTokenOut" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The token does not exist for this user. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Revoke one of your user-identity tokens - tags: - - tokens - /v0/uploads: - post: - description: "Reserve quota and open a resumable upload session for a file larger\ - \ than the buffered-upload limit. Returns a `upload_url` to PUT the raw bytes\ - \ to DIRECTLY (no Authorization header — the URL is the credential), then\ - \ call `/v0/uploads/{upload_id}/commit`. All artifact decisions (path, labels,\ - \ metadata, source, if_match) are frozen here." - operationId: begin_upload_v0_uploads_post - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/UploadBeginIn" - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/UploadBeginOut" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "Invalid path, labels, metadata, or source." - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Path reserved for the system (WIKI_RESERVED). - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "413": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: size_bytes exceeds the per-artifact cap or storage quota. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Drive's per-hour write budget exhausted. - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0.0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Begin a large (direct-to-GCS) upload - /v0/uploads/{upload_id}: - delete: - description: "Release an open upload session: return its reserved quota to the\ - \ drive and mark it aborted. Idempotent — aborting an already-aborted or already-expired\ - \ session succeeds with `released_bytes: 0`. A committed session cannot be\ - \ aborted (409 ALREADY_COMMITTED). No write budget is charged — this frees\ - \ resources rather than consuming them." - operationId: abort_upload_v0_uploads__upload_id__delete - parameters: - - explode: false - in: path - name: upload_id - required: true - schema: - title: Upload Id - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/UploadAbortOut" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: No such upload for this drive. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "409": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Upload already committed and cannot be aborted. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Abort a large (direct-to-GCS) upload session - get: - description: "Report the live state of an upload session begun at `/v0/uploads`.\ - \ `state` is derived: `initiated` (open — PUT the bytes then commit), `committed`\ - \ (artifact created), `aborted` (released via DELETE), or `expired` (past\ - \ `expires_at` without a commit). Read-only; charges the read budget." - operationId: get_upload_status_v0_uploads__upload_id__get - parameters: - - explode: false - in: path - name: upload_id - required: true - schema: - title: Upload Id - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/UploadStatusOut" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: No such upload for this drive. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Get the status of a large (direct-to-GCS) upload session - /v0/uploads/{upload_id}/commit: - post: - description: "Finalize the upload begun at `/v0/uploads`: AgentDrive verifies\ - \ the object that landed in GCS (size + checksum) and creates the artifact.\ - \ Idempotent — a retry after a successful commit returns the same artifact.\ - \ The write budget is charged when the upload session is created; commit retries\ - \ are not charged again." - operationId: commit_upload_v0_uploads__upload_id__commit_post - parameters: - - explode: false - in: path - name: upload_id - required: true - schema: - title: Upload Id - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/ArtifactOut" - description: Successful Response - headers: - ETag: - description: Current strong entity tag. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: No such upload for this drive. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "409": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Uploaded object size differs from declared size_bytes. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "410": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Upload session expired. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "412": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: If-Match precondition failed or create-only conflict. - headers: - ETag: - description: Current strong entity tag. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "413": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Committing the upload would exceed the storage quota. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Drive's per-hour write budget exhausted. - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Commit a large (direct-to-GCS) upload - /v0/workspaces: - get: - description: |- - Return every space the caller is a member of, each carrying the caller's `role` in it. Metadata only. A `read`-scope token is sufficient. - - **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - operationId: list_workspaces_route_v0_workspaces_get - parameters: - - explode: true - in: query - name: cursor - required: false - schema: - nullable: true - type: string - style: form - - explode: true - in: query - name: limit - required: false - schema: - nullable: true - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/WorkspaceList" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: List the spaces you belong to - tags: - - workspaces - post: - description: |- - Create a new **shared drive** — a shared, multi-member space (the `workspaces` path is retained for API stability). You become its **admin** and get a starter drive; the starter drive's `ad_live_` key is returned **once** (`starter_drive_api_key`). - - A user may administer up to their plan's number of shared drives (workspaces-v2 §4.6). A caller at the limit is blocked with `403 WORKSPACE_LIMIT_REACHED`. Requires a `full`-scope user token. - operationId: create_workspace_route_v0_workspaces_post - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/WorkspaceCreateIn" - required: true - responses: - "201": - content: - application/json: - schema: - $ref: "#/components/schemas/WorkspaceCreateOut" - description: Successful Response - headers: - Location: - description: Canonical URL of the created resource. - explode: false - schema: - format: uri-reference - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The workspace name or request is invalid. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "409": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The workspace conflicts with an existing organization. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Create a new shared drive - tags: - - workspaces - /v0/workspaces/{org_id}: - patch: - description: Rename a shared drive. **Admin only** — one you don't administer - (or aren't a member of) returns 404 (no-leak). Requires a `full`-scope user - token. - operationId: rename_workspace_route_v0_workspaces__org_id__patch - parameters: - - explode: false - in: path - name: org_id - required: true - schema: - title: Org Id - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/WorkspaceRenameIn" - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/WorkspaceOut" - description: Successful Response - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The workspace update is invalid. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: Bearer credential is missing or invalid. - headers: - WWW-Authenticate: - description: RFC 6750 bearer authentication challenge. - explode: false - schema: - type: string - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The authenticated principal is not allowed to perform this - operation. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: The workspace does not exist for this user. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "429": - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorResponse" - description: "A request, operation, or quota rate limit was exceeded." - headers: - Retry-After: - description: Seconds until the caller should retry. - explode: false - schema: - minimum: 0 - type: integer - style: simple - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - security: - - BearerAuth: [] - summary: Rename a shared drive you administer - tags: - - workspaces - /{drive_id}/{path}: - get: - operationId: view_file__drive_id___path__get - parameters: - - explode: false - in: path - name: drive_id - required: true - schema: - title: Drive Id - type: string - style: simple - - explode: false - in: path - name: path - required: true - schema: - title: Path - type: string - style: simple - - explode: true - in: query - name: raw - required: false - schema: - default: 0 - title: Raw - type: integer - style: form - - explode: true - in: query - name: download - required: false - schema: - default: 0 - title: Download - type: integer - style: form - responses: - "200": - content: - application/octet-stream: - schema: - format: binary - type: string - text/html: - schema: - description: Restore at this path instead of the original. Soft-deletes - the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. - Mutually exclusive with `overwrite`. - nullable: true - type: string - description: Rendered HTML or raw artifact bytes. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - "422": - content: - application/json: - schema: - $ref: "#/components/schemas/ValidationErrorResponse" - description: Request validation failed. - headers: - X-Request-Id: - description: Request correlation identifier. - explode: false - schema: - type: string - style: simple - summary: View File -components: - schemas: - AgentAuthMetadataOut: - additionalProperties: true - example: - claim_endpoint: claim_endpoint - events_endpoint: events_endpoint - identity_assertion: - alg: alg - iss: iss - version: 0 - identity_endpoint: identity_endpoint - identity_types_supported: - - identity_types_supported - - identity_types_supported - skill: skill - spec_version: spec_version - properties: - claim_endpoint: - title: Claim Endpoint - type: string - events_endpoint: - nullable: true - type: string - identity_assertion: - $ref: "#/components/schemas/IdentityAssertionMetadataOut" - identity_endpoint: - title: Identity Endpoint - type: string - identity_types_supported: - items: - type: string - title: Identity Types Supported - type: array - default: null - skill: - title: Skill - type: string - spec_version: - title: Spec Version - type: string - required: - - claim_endpoint - - events_endpoint - - identity_assertion - - identity_endpoint - - identity_types_supported - - skill - - spec_version - title: AgentAuthMetadataOut - AnonymousIdentityResponse: - description: |- - `POST /agent/identity` response on the anonymous path. - - The agent stores `identity_assertion` as its long-lived credential - and uses `claim_token` to initiate the claim ceremony when the - human is ready. - example: - agent_identity_id: agent_identity_id - claim_metadata: - claim_endpoint: claim_endpoint - supported_email_hints: true - claim_token: claim_token - drive_id: drive_id - expires_at: 2000-01-23T04:56:07.000+00:00 - identity_assertion: identity_assertion - properties: - agent_identity_id: - title: Agent Identity Id - type: string - claim_metadata: - $ref: "#/components/schemas/ClaimMetadata" - claim_token: - description: Opaque server-issued secret. Present at POST /agent/identity/claim - and at POST /oauth2/token (grant_type=claim). - title: Claim Token - type: string - drive_id: - title: Drive Id - type: string - expires_at: - format: date-time - title: Expires At - type: string - identity_assertion: - description: "JWT signed by AgentDrive, scope=pre_claim. 30-day TTL." - title: Identity Assertion - type: string - required: - - agent_identity_id - - claim_metadata - - claim_token - - drive_id - - expires_at - - identity_assertion - title: AnonymousIdentityResponse - ArtifactDeleteOut: - description: |- - DELETE /v0/artifacts/{art_id} response — the soft-delete receipt. - Reversible until the GC cron hard-deletes at `purge_at`; `restore_url` - points at the by-id restore endpoint (deletion-design.md §5.3). - example: - deleted_at: 2000-01-23T04:56:07.000+00:00 - id: id - ok: true - path: path - purge_at: 2000-01-23T04:56:07.000+00:00 - restore_url: restore_url - properties: - deleted_at: - format: date-time - title: Deleted At - type: string - id: - title: Id - type: string - ok: - default: true - title: Ok - type: boolean - path: - title: Path - type: string - purge_at: - format: date-time - title: Purge At - type: string - restore_url: - nullable: true - type: string - required: - - deleted_at - - id - - path - - purge_at - title: ArtifactDeleteOut - ArtifactHeadOut: - example: - version: 0 - properties: - version: - title: Version - type: integer - required: - - version - title: ArtifactHeadOut - ArtifactMoveIn: - description: |- - POST /v0/artifacts/{art_id}/move body — rename / move to a new - path on the same drive. Mirrors `FolderMoveIn`; its own schema (vs. - reusing another body) keeps the move surface self-documenting in the - OpenAPI spec. - example: - path: path - properties: - path: - title: Path - type: string - required: - - path - title: ArtifactMoveIn - ArtifactOut: - example: - content_type: content_type - created_at: 2000-01-23T04:56:07.000+00:00 - drive_id: drive_id - embedded_at: 2000-01-23T04:56:07.000+00:00 - etag: etag - file_type: file_type - hash: hash - id: id - indexed_at: 2000-01-23T04:56:07.000+00:00 - labels: - - labels - - labels - llm_index: - key: "" - metadata: - key: "" - metageneration: 0 - path: path - permalink: permalink - size_bytes: 6 - source: "" - updated_at: 2000-01-23T04:56:07.000+00:00 - url: url - version_number: 1 - properties: - content_type: - title: Content Type - type: string - created_at: - format: date-time - title: Created At - type: string - drive_id: - title: Drive Id - type: string - embedded_at: - format: date-time - nullable: true - type: string - etag: - title: Etag - type: string - file_type: - title: File Type - type: string - hash: - title: Hash - type: string - id: - title: Id - type: string - indexed_at: - format: date-time - nullable: true - type: string - labels: - items: - type: string - title: Labels - type: array - default: null - llm_index: - additionalProperties: true - nullable: true - type: object - metadata: - additionalProperties: true - title: Metadata - type: object - metageneration: - default: 1 - title: Metageneration - type: integer - path: - title: Path - type: string - permalink: - title: Permalink - type: string - size_bytes: - title: Size Bytes - type: integer - source: - allOf: - - $ref: "#/components/schemas/ArtifactSource" - nullable: true - updated_at: - format: date-time - title: Updated At - type: string - url: - title: Url - type: string - version_number: - default: 1 - title: Version Number - type: integer - required: - - content_type - - created_at - - drive_id - - etag - - file_type - - hash - - id - - path - - permalink - - size_bytes - - updated_at - - url - title: ArtifactOut - ArtifactPatchIn: - additionalProperties: {} - description: |- - PATCH /v0/artifacts/{art_id} body — metadata-only partial - (JSON-merge-patch) update. - - Every field is optional. Presence is what matters, not the value: - a field left out of the body (per Pydantic `model_fields_set`) is - left unchanged; a field that IS present is applied — with an explicit - `null` / `[]` / `{}` meaning "clear it". This mirrors the MCP - `set_metadata` tool and the core `patch_artifact_metadata` sentinel - semantics (omitted = preserve, present = replace/clear). - - * `labels` — replace the label set; `[]` or `null` clears it. - * `metadata` — replace the free-form metadata object; `{}` or `null` - clears it. - * `source` — replace provenance refs; `null` (or `{"refs": []}`) - clears them. - - PATCH is metadata-only: to move/rename an artifact, use - `POST /v0/artifacts/{art_id}/move`. `extra="forbid"` makes a stray - field (notably a legacy `path`) a hard 422 rather than a silent - no-op — a clean-break signal to migrate to the move verb. - example: - labels: - - labels - - labels - metadata: - key: "" - source: "" - properties: - labels: - items: - type: string - nullable: true - type: array - default: null - metadata: - additionalProperties: true - nullable: true - type: object - source: - allOf: - - $ref: "#/components/schemas/ArtifactSource" - nullable: true - title: ArtifactPatchIn - ArtifactSource: - description: |- - Caller-supplied provenance metadata, attached to an artifact. - - v0.6 model: a list of typed refs. The legacy v0.5 fields - (`agent_id`, `run_id`, `prompt_hash`) were never validated and are - superseded by the `refs` shape (an agent-id ref would be - `{"type": "agent", "id": "..."}` in v0.6 vocabulary). - properties: - refs: - items: - $ref: "#/components/schemas/SourceRef" - title: Refs - type: array - default: null - title: ArtifactSource - AuthorizationServerMetadataOut: - additionalProperties: true - example: - agent_auth: - claim_endpoint: claim_endpoint - events_endpoint: events_endpoint - identity_assertion: - alg: alg - iss: iss - version: 0 - identity_endpoint: identity_endpoint - identity_types_supported: - - identity_types_supported - - identity_types_supported - skill: skill - spec_version: spec_version - authorization_endpoint: authorization_endpoint - authorization_response_iss_parameter_supported: true - code_challenge_methods_supported: - - code_challenge_methods_supported - - code_challenge_methods_supported - grant_types_supported: - - grant_types_supported - - grant_types_supported - issuer: issuer - jwks_uri: jwks_uri - registration_endpoint: registration_endpoint - response_modes_supported: - - response_modes_supported - - response_modes_supported - response_types_supported: - - response_types_supported - - response_types_supported - revocation_endpoint: revocation_endpoint - revocation_endpoint_auth_methods_supported: - - revocation_endpoint_auth_methods_supported - - revocation_endpoint_auth_methods_supported - scopes_supported: - - scopes_supported - - scopes_supported - token_endpoint: token_endpoint - token_endpoint_auth_methods_supported: - - token_endpoint_auth_methods_supported - - token_endpoint_auth_methods_supported - properties: - agent_auth: - $ref: "#/components/schemas/AgentAuthMetadataOut" - authorization_endpoint: - title: Authorization Endpoint - type: string - authorization_response_iss_parameter_supported: - title: Authorization Response Iss Parameter Supported - type: boolean - code_challenge_methods_supported: - items: - type: string - title: Code Challenge Methods Supported - type: array - default: null - grant_types_supported: - items: - type: string - title: Grant Types Supported - type: array - default: null - issuer: - title: Issuer - type: string - jwks_uri: - title: Jwks Uri - type: string - registration_endpoint: - title: Registration Endpoint - type: string - response_modes_supported: - items: - type: string - title: Response Modes Supported - type: array - default: null - response_types_supported: - items: - type: string - title: Response Types Supported - type: array - default: null - revocation_endpoint: - title: Revocation Endpoint - type: string - revocation_endpoint_auth_methods_supported: - items: - type: string - title: Revocation Endpoint Auth Methods Supported - type: array - default: null - scopes_supported: - items: - type: string - title: Scopes Supported - type: array - default: null - token_endpoint: - title: Token Endpoint - type: string - token_endpoint_auth_methods_supported: - items: - type: string - title: Token Endpoint Auth Methods Supported - type: array - default: null - required: - - agent_auth - - authorization_endpoint - - authorization_response_iss_parameter_supported - - code_challenge_methods_supported - - grant_types_supported - - issuer - - jwks_uri - - registration_endpoint - - response_modes_supported - - response_types_supported - - revocation_endpoint - - revocation_endpoint_auth_methods_supported - - scopes_supported - - token_endpoint - - token_endpoint_auth_methods_supported - title: AuthorizationServerMetadataOut - Body_authorize_decision_oauth2_authorize_post: - properties: - csrf: - title: Csrf - type: string - required: - - csrf - title: Body_authorize_decision_oauth2_authorize_post - Body_logout_auth_logout_post: - properties: - csrf: - title: Csrf - type: string - required: - - csrf - title: Body_logout_auth_logout_post - Body_oauth2_token_oauth2_token_post: - properties: - assertion: - nullable: true - type: string - claim_token: - nullable: true - type: string - grant_type: - title: Grant Type - type: string - required: - - grant_type - title: Body_oauth2_token_oauth2_token_post - Body_redeem_share_with_password_s__share_key__post: - properties: - password: - default: "" - title: Password - type: string - title: Body_redeem_share_with_password_s__share_key__post - ClaimInitRequest: - description: '`POST /agent/identity/claim` body.' - example: - claim_token: claim_token - email: email - properties: - claim_token: - description: The per-identity claim_token returned by POST /agent/identity. - title: Claim Token - type: string - email: - description: "Optional hint to display on the /claim page so the human knows\ - \ which account the agent expected. Not enforced (design §14 question\ - \ #3)." - nullable: true - type: string - required: - - claim_token - title: ClaimInitRequest - ClaimInitResponse: - example: - claim_attempt_token: claim_attempt_token - expires_at: 2000-01-23T04:56:07.000+00:00 - user_code: user_code - verification_uri: verification_uri - verification_uri_complete: verification_uri_complete - properties: - claim_attempt_token: - description: Per-attempt opaque token; the agent does not need to present - it. - title: Claim Attempt Token - type: string - expires_at: - format: date-time - title: Expires At - type: string - user_code: - description: Human-readable code the user types/sees on /claim. - title: User Code - type: string - verification_uri: - description: URL to direct the human to. - title: Verification Uri - type: string - verification_uri_complete: - description: "Convenience: same as `verification_uri` but with the user_code\ - \ pre-baked so the human doesn't have to type it. RFC 8628 idiom." - title: Verification Uri Complete - type: string - required: - - claim_attempt_token - - expires_at - - user_code - - verification_uri - - verification_uri_complete - title: ClaimInitResponse - ClaimMetadata: - description: |- - Hints the agent's UI/CLI can use when initiating the claim - ceremony. Decoupled from the `claim_token` itself so future - additions don't change the token's shape. - example: - claim_endpoint: claim_endpoint - supported_email_hints: true - properties: - claim_endpoint: - title: Claim Endpoint - type: string - supported_email_hints: - default: true - title: Supported Email Hints - type: boolean - required: - - claim_endpoint - title: ClaimMetadata - ClientRegistrationOut: - additionalProperties: true - example: - client_id: client_id - client_id_issued_at: 0 - client_name: client_name - grant_types: - - grant_types - - grant_types - redirect_uris: - - redirect_uris - - redirect_uris - response_types: - - response_types - - response_types - scope: scope - token_endpoint_auth_method: token_endpoint_auth_method - properties: - client_id: - title: Client Id - type: string - client_id_issued_at: - title: Client Id Issued At - type: integer - client_name: - title: Client Name - type: string - grant_types: - items: - type: string - title: Grant Types - type: array - default: null - redirect_uris: - items: - type: string - title: Redirect Uris - type: array - default: null - response_types: - items: - type: string - title: Response Types - type: array - default: null - scope: - title: Scope - type: string - token_endpoint_auth_method: - title: Token Endpoint Auth Method - type: string - required: - - client_id - - client_id_issued_at - - client_name - - grant_types - - redirect_uris - - response_types - - scope - - token_endpoint_auth_method - title: ClientRegistrationOut - CompileDiagnosticOut: - additionalProperties: true - example: - category: category - file: file - line: 0 - message: message - severity: severity - suggestion: suggestion - properties: - category: - nullable: true - type: string - file: - nullable: true - type: string - line: - nullable: true - type: integer - message: - title: Message - type: string - severity: - title: Severity - type: string - suggestion: - nullable: true - type: string - required: - - message - - severity - title: CompileDiagnosticOut - CompileJobIn: - example: - options: - engine: engine - entrypoint: entrypoint - wait: false - task: latex.compile - properties: - options: - $ref: "#/components/schemas/CompileOptions" - task: - default: latex.compile - title: Task - type: string - title: CompileJobIn - CompileJobListOut: - example: - items: - - cache_hit: true - diagnostics: - - category: category - file: file - line: 0 - message: message - severity: severity - suggestion: suggestion - - category: category - file: file - line: 0 - message: message - severity: severity - suggestion: suggestion - duration_ms: 6 - engine: engine - job_id: job_id - logs_url: logs_url - output: - key: "" - status: status - task: task - - cache_hit: true - diagnostics: - - category: category - file: file - line: 0 - message: message - severity: severity - suggestion: suggestion - - category: category - file: file - line: 0 - message: message - severity: severity - suggestion: suggestion - duration_ms: 6 - engine: engine - job_id: job_id - logs_url: logs_url - output: - key: "" - status: status - task: task - jobs: - - cache_hit: true - diagnostics: - - category: category - file: file - line: 0 - message: message - severity: severity - suggestion: suggestion - - category: category - file: file - line: 0 - message: message - severity: severity - suggestion: suggestion - duration_ms: 6 - engine: engine - job_id: job_id - logs_url: logs_url - output: - key: "" - status: status - task: task - - cache_hit: true - diagnostics: - - category: category - file: file - line: 0 - message: message - severity: severity - suggestion: suggestion - - category: category - file: file - line: 0 - message: message - severity: severity - suggestion: suggestion - duration_ms: 6 - engine: engine - job_id: job_id - logs_url: logs_url - output: - key: "" - status: status - task: task - next_cursor: next_cursor - properties: - items: - items: - $ref: "#/components/schemas/CompileJobOut" - title: Items - type: array - default: null - jobs: - deprecated: true - description: Deprecated same-value alias for `items`; retained for compatibility. - items: - $ref: "#/components/schemas/CompileJobOut" - title: Jobs - type: array - default: null - next_cursor: - description: "Opaque continuation token, or null when the listing is complete." - nullable: true - type: string - required: - - items - - jobs - title: CompileJobListOut - CompileJobOut: - additionalProperties: {} - example: - cache_hit: true - diagnostics: - - category: category - file: file - line: 0 - message: message - severity: severity - suggestion: suggestion - - category: category - file: file - line: 0 - message: message - severity: severity - suggestion: suggestion - duration_ms: 6 - engine: engine - job_id: job_id - logs_url: logs_url - output: - key: "" - status: status - task: task - properties: - cache_hit: - title: Cache Hit - type: boolean - diagnostics: - items: - $ref: "#/components/schemas/CompileDiagnosticOut" - title: Diagnostics - type: array - default: null - duration_ms: - nullable: true - type: integer - engine: - title: Engine - type: string - job_id: - title: Job Id - type: string - logs_url: - nullable: true - type: string - output: - additionalProperties: true - nullable: true - type: object - status: - title: Status - type: string - task: - title: Task - type: string - required: - - cache_hit - - engine - - job_id - - status - - task - title: CompileJobOut - CompileOptions: - example: - engine: engine - entrypoint: entrypoint - wait: false - properties: - engine: - nullable: true - type: string - entrypoint: - nullable: true - type: string - wait: - default: false - title: Wait - type: boolean - title: CompileOptions - CompileProjectOut: - example: - auto_compile: true - engine: engine - entrypoint: entrypoint - fld_id: fld_id - properties: - auto_compile: - title: Auto Compile - type: boolean - engine: - title: Engine - type: string - entrypoint: - title: Entrypoint - type: string - fld_id: - title: Fld Id - type: string - required: - - auto_compile - - engine - - entrypoint - - fld_id - title: CompileProjectOut - CopyIn: - description: "POST /v0/artifacts/{art_id}/copy body — duplicate to new path." - example: - from_generation: 0 - path: path - source: "" - properties: - from_generation: - nullable: true - type: integer - path: - title: Path - type: string - source: - allOf: - - $ref: "#/components/schemas/ArtifactSource" - nullable: true - required: - - path - title: CopyIn - DatasetDescriptionOut: - example: - columns: - - name: name - type: type - - name: name - type: type - dataset: dataset - properties: - columns: - items: - $ref: "#/components/schemas/QueryColumnOut" - title: Columns - type: array - default: null - dataset: - title: Dataset - type: string - required: - - columns - - dataset - title: DatasetDescriptionOut - DescribeIn: - example: - dataset: dataset - properties: - dataset: - title: Dataset - type: string - required: - - dataset - title: DescribeIn - DownloadUrlOut: - description: |- - A URL the caller can GET to fetch the artifact's bytes. - - `direct=True` ⇒ a short-lived signed GCS URL on `storage.googleapis.com` - (client downloads straight from GCS; `expires_at` is set). `direct=False` - ⇒ the proxy `/download` endpoint on the API host (no expiry) — returned for - sub-threshold artifacts or when signing is unavailable. The URL is opaque: - callers should not parse it. See large-download-design.md §5.1. - example: - content_type: content_type - direct: true - download_url: download_url - expires_at: 2000-01-23T04:56:07.000+00:00 - filename: filename - size_bytes: 0 - properties: - content_type: - title: Content Type - type: string - direct: - title: Direct - type: boolean - download_url: - title: Download Url - type: string - expires_at: - format: date-time - nullable: true - type: string - filename: - title: Filename - type: string - size_bytes: - title: Size Bytes - type: integer - required: - - content_type - - direct - - download_url - - filename - - size_bytes - title: DownloadUrlOut - DriveApiKeyCreateIn: - description: |- - `POST /v0/drives/{id}/keys` body — a required human label (a name for - the key, e.g. the agent/integration it's for). - example: - label: label - properties: - label: - maxLength: 80 - minLength: 1 - title: Label - type: string - required: - - label - title: DriveApiKeyCreateIn - DriveApiKeyCreateOut: - description: |- - `POST /v0/drives/{id}/keys` response — the new key's metadata PLUS the - raw `ad_live_` value, returned **once**. Store `api_key` now; only its hash - is persisted. - example: - api_key: api_key - created_at: 2000-01-23T04:56:07.000+00:00 - id: id - label: label - prefix: prefix - properties: - api_key: - title: Api Key - type: string - created_at: - format: date-time - title: Created At - type: string - id: - title: Id - type: string - label: - nullable: true - type: string - prefix: - title: Prefix - type: string - required: - - api_key - - created_at - - id - - prefix - title: DriveApiKeyCreateOut - DriveApiKeyListOut: - description: |- - `GET /v0/drives/{id}/keys` response — the drive's keys, oldest first - (keyset order, design §3), including recently-revoked rows (filter on - `revoked_at` for live only). - - `items` is the canonical list field (B-3: one envelope key everywhere); - `keys` is a deprecated same-value alias kept for one release — the REST - twin of the grep `matches` / compile `jobs` aliases. - example: - items: - - created_at: 2000-01-23T04:56:07.000+00:00 - id: id - label: label - last_used_at: 2000-01-23T04:56:07.000+00:00 - prefix: prefix - revoked_at: 2000-01-23T04:56:07.000+00:00 - - created_at: 2000-01-23T04:56:07.000+00:00 - id: id - label: label - last_used_at: 2000-01-23T04:56:07.000+00:00 - prefix: prefix - revoked_at: 2000-01-23T04:56:07.000+00:00 - keys: - - created_at: 2000-01-23T04:56:07.000+00:00 - id: id - label: label - last_used_at: 2000-01-23T04:56:07.000+00:00 - prefix: prefix - revoked_at: 2000-01-23T04:56:07.000+00:00 - - created_at: 2000-01-23T04:56:07.000+00:00 - id: id - label: label - last_used_at: 2000-01-23T04:56:07.000+00:00 - prefix: prefix - revoked_at: 2000-01-23T04:56:07.000+00:00 - next_cursor: next_cursor - properties: - items: - items: - $ref: "#/components/schemas/DriveApiKeyOut" - title: Items - type: array - default: null - keys: - items: - $ref: "#/components/schemas/DriveApiKeyOut" - title: Keys - type: array - default: null - next_cursor: - nullable: true - type: string - required: - - items - - keys - title: DriveApiKeyListOut - DriveApiKeyOut: - description: |- - One per-drive `ad_live_` key — metadata only (never the raw key or hash). - Item shape for `GET /v0/drives/{id}/keys`. - example: - created_at: 2000-01-23T04:56:07.000+00:00 - id: id - label: label - last_used_at: 2000-01-23T04:56:07.000+00:00 - prefix: prefix - revoked_at: 2000-01-23T04:56:07.000+00:00 - properties: - created_at: - format: date-time - title: Created At - type: string - id: - title: Id - type: string - label: - nullable: true - type: string - last_used_at: - format: date-time - nullable: true - type: string - prefix: - title: Prefix - type: string - revoked_at: - format: date-time - nullable: true - type: string - required: - - created_at - - id - - prefix - title: DriveApiKeyOut - DriveCreateIn: - description: |- - POST /v0/drives body. `name` is the user-facing drive label; the - creator becomes the owner. - example: - name: name - properties: - name: - maxLength: 120 - minLength: 1 - title: Name - type: string - required: - - name - title: DriveCreateIn - DriveCreateOut: - description: |- - The create response — the ONLY place (besides key-rotate) a raw - `ad_live_` key is returned, reveal-once. - example: - api_key: api_key - created_at: 2000-01-23T04:56:07.000+00:00 - id: id - name: name - organization_id: organization_id - owner_email: owner_email - owner_user_id: owner_user_id - storage_bytes: 0 - properties: - api_key: - title: Api Key - type: string - created_at: - format: date-time - title: Created At - type: string - id: - title: Id - type: string - name: - title: Name - type: string - organization_id: - title: Organization Id - type: string - owner_email: - nullable: true - type: string - owner_user_id: - nullable: true - type: string - storage_bytes: - title: Storage Bytes - type: integer - required: - - api_key - - created_at - - id - - name - - organization_id - - storage_bytes - title: DriveCreateOut - DriveDeleteOut: - description: |- - DELETE /v0/drives/{drive_id} response — the drive soft-delete receipt. - Reversible until the GC cron hard-deletes at `purge_at`; `restore_url` - points at the drive restore endpoint (deletion-design.md §5.2). - example: - deleted_at: 2000-01-23T04:56:07.000+00:00 - id: id - ok: true - purge_at: 2000-01-23T04:56:07.000+00:00 - restore_url: restore_url - properties: - deleted_at: - format: date-time - title: Deleted At - type: string - id: - title: Id - type: string - ok: - default: true - title: Ok - type: boolean - purge_at: - format: date-time - title: Purge At - type: string - restore_url: - nullable: true - type: string - required: - - deleted_at - - id - - purge_at - title: DriveDeleteOut - DriveList: - example: - items: - - created_at: 2000-01-23T04:56:07.000+00:00 - id: id - name: name - organization_id: organization_id - owner_email: owner_email - owner_user_id: owner_user_id - storage_bytes: 0 - - created_at: 2000-01-23T04:56:07.000+00:00 - id: id - name: name - organization_id: organization_id - owner_email: owner_email - owner_user_id: owner_user_id - storage_bytes: 0 - next_cursor: next_cursor - properties: - items: - items: - $ref: "#/components/schemas/DriveOut" - title: Items - type: array - default: null - next_cursor: - nullable: true - type: string - required: - - items - title: DriveList - DriveOut: - description: |- - One drive in a listing — metadata only (workspaces-design §4.2). - Carries NO capability and NEVER a raw key. An admin's inventory and a - member's owned list both serialize to this shape; `owner_email` is the - only owner-identifying field surfaced. - example: - created_at: 2000-01-23T04:56:07.000+00:00 - id: id - name: name - organization_id: organization_id - owner_email: owner_email - owner_user_id: owner_user_id - storage_bytes: 0 - properties: - created_at: - format: date-time - title: Created At - type: string - id: - title: Id - type: string - name: - title: Name - type: string - organization_id: - title: Organization Id - type: string - owner_email: - nullable: true - type: string - owner_user_id: - nullable: true - type: string - storage_bytes: - title: Storage Bytes - type: integer - required: - - created_at - - id - - name - - organization_id - - storage_bytes - title: DriveOut - DriveReadOut: - description: Drive singleton shape returned by both data-plane read routes. - example: - created_at: 2000-01-23T04:56:07.000+00:00 - email: email - etag: etag - id: id - metageneration: 0 - organization_id: organization_id - storage_bytes: 6 - storage_limit: 1 - properties: - created_at: - format: date-time - title: Created At - type: string - email: - nullable: true - type: string - etag: - title: Etag - type: string - id: - title: Id - type: string - metageneration: - title: Metageneration - type: integer - organization_id: - title: Organization Id - type: string - storage_bytes: - title: Storage Bytes - type: integer - storage_limit: - title: Storage Limit - type: integer - required: - - created_at - - etag - - id - - metageneration - - organization_id - - storage_bytes - - storage_limit - title: DriveReadOut - DriveRenameIn: - description: "PATCH /v0/drives/{id} body — rename a drive the caller owns." - example: - name: name - properties: - name: - maxLength: 120 - minLength: 1 - title: Name - type: string - required: - - name - title: DriveRenameIn - DriveRestoreOut: - example: - id: id - rebased_artifact_count: 0 - restored_at: 2000-01-23T04:56:07.000+00:00 - properties: - id: - title: Id - type: string - rebased_artifact_count: - title: Rebased Artifact Count - type: integer - restored_at: - format: date-time - title: Restored At - type: string - required: - - id - - rebased_artifact_count - - restored_at - title: DriveRestoreOut - DriveUsageOut: - example: - account_footprint: - as_of: 2000-01-23 - live_bytes: 0 - total_bytes: 6 - trash_bytes: 1 - version_bytes: 5 - egress_bytes: - limit: 5 - used: 2 - footprint: - as_of: 2000-01-23 - live_bytes: 0 - total_bytes: 6 - trash_bytes: 1 - version_bytes: 5 - indexed_bytes: - limit: 5 - used: 2 - indexing_ops: - limit: 5 - used: 2 - ops_this_month: - reads: 7 - writes: 9 - period: - ends: 2000-01-23T04:56:07.000+00:00 - starts: 2000-01-23T04:56:07.000+00:00 - year_month: year_month - retrieval_queries: - limit: 5 - used: 2 - storage: - limit: 5 - used: 2 - storage_breakdown: "" - tokens_this_month: - embed: 3 - llm_cached: 2 - llm_input: 4 - llm_output: 7 - version_retention: - versions_max: 1 - writes_this_hour: - limit: 1 - reset_at: 2000-01-23T04:56:07.000+00:00 - used: 1 - properties: - account_footprint: - $ref: "#/components/schemas/StorageFootprintOut" - egress_bytes: - $ref: "#/components/schemas/UsageCounterOut" - footprint: - $ref: "#/components/schemas/StorageFootprintOut" - indexed_bytes: - $ref: "#/components/schemas/UsageCounterOut" - indexing_ops: - $ref: "#/components/schemas/UsageCounterOut" - ops_this_month: - $ref: "#/components/schemas/OperationUsageOut" - period: - $ref: "#/components/schemas/UsagePeriodOut" - retrieval_queries: - $ref: "#/components/schemas/UsageCounterOut" - storage: - $ref: "#/components/schemas/UsageCounterOut" - storage_breakdown: - allOf: - - $ref: "#/components/schemas/StorageBreakdownOut" - nullable: true - tokens_this_month: - $ref: "#/components/schemas/TokenUsageOut" - version_retention: - $ref: "#/components/schemas/VersionRetentionOut" - writes_this_hour: - $ref: "#/components/schemas/HourlyUsageCounterOut" - required: - - account_footprint - - egress_bytes - - footprint - - indexed_bytes - - indexing_ops - - ops_this_month - - period - - retrieval_queries - - storage - - tokens_this_month - - version_retention - - writes_this_hour - title: DriveUsageOut - ErrorBody: - additionalProperties: true - description: |- - Machine-readable API error. - - Error-code-specific context (for example `limit`, `current_etag`, or - `retry_after_s`) is intentionally additive. - example: - code: code - message: message - properties: - code: - title: Code - type: string - message: - title: Message - type: string - required: - - code - - message - title: ErrorBody - ErrorDetail: - additionalProperties: true - example: - error: - code: code - message: message - properties: - error: - $ref: "#/components/schemas/ErrorBody" - required: - - error - title: ErrorDetail - ErrorResponse: - additionalProperties: true - description: Canonical non-validation error envelope emitted by AgentDrive. - example: - detail: - error: - code: code - message: message - properties: - detail: - $ref: "#/components/schemas/ErrorDetail" - required: - - detail - title: ErrorResponse - EventOut: - example: - action: action - actor_name: actor_name - art_id: art_id - created_at: 2000-01-23T04:56:07.000+00:00 - drive_id: drive_id - id: id - metadata: - key: "" - properties: - action: - title: Action - type: string - actor_name: - maxLength: 64 - nullable: true - type: string - art_id: - nullable: true - type: string - created_at: - format: date-time - title: Created At - type: string - drive_id: - title: Drive Id - type: string - id: - title: Id - type: string - metadata: - additionalProperties: true - title: Metadata - type: object - required: - - action - - created_at - - drive_id - - id - title: EventOut - EventPage: - example: - items: - - action: action - actor_name: actor_name - art_id: art_id - created_at: 2000-01-23T04:56:07.000+00:00 - drive_id: drive_id - id: id - metadata: - key: "" - - action: action - actor_name: actor_name - art_id: art_id - created_at: 2000-01-23T04:56:07.000+00:00 - drive_id: drive_id - id: id - metadata: - key: "" - next_cursor: next_cursor - properties: - items: - items: - $ref: "#/components/schemas/EventOut" - title: Items - type: array - default: null - next_cursor: - nullable: true - type: string - required: - - items - title: EventPage - ExtensionExchangeRequest: - description: |- - Single-use ticket → JWT pair. Called by `auth-complete.html` - inside the SnipIt extension. No `Authorization` header — the - ticket itself is the credential. - example: - ext_id: ext_id - ticket: ticket - properties: - ext_id: - description: The extension's ID (Chrome Web Store ID or unpacked dev ID). - title: Ext Id - type: string - ticket: - description: The opaque ticket from the /auth/callback handoff. - title: Ticket - type: string - required: - - ext_id - - ticket - title: ExtensionExchangeRequest - ExtensionExchangeResponse: - example: - access_token: access_token - drive_id: drive_id - expires_in: 0 - identity_assertion: identity_assertion - scope: extension - token_type: Bearer - properties: - access_token: - description: 15-minute access_token (scope=extension). - title: Access Token - type: string - drive_id: - description: The drive these credentials are scoped to. - title: Drive Id - type: string - expires_in: - description: Seconds until access_token expiry. - title: Expires In - type: integer - identity_assertion: - description: 90-day identity_assertion. Refresh via POST /oauth2/token. - title: Identity Assertion - type: string - scope: - default: extension - enum: - - extension - title: Scope - type: string - token_type: - default: Bearer - title: Token Type - type: string - required: - - access_token - - drive_id - - expires_in - - identity_assertion - title: ExtensionExchangeResponse - FeedbackCreateOut: - example: - contact: true - id: id - note: note - status: status - properties: - contact: - title: Contact - type: boolean - id: - title: Id - type: string - note: - nullable: true - type: string - status: - title: Status - type: string - required: - - contact - - id - - status - title: FeedbackCreateOut - FeedbackStatusOut: - description: |- - GET /v0/feedback/{fbk_id} response — lifecycle status of feedback THIS - drive filed. - example: - contact: true - created_at: 2000-01-23T04:56:07.000+00:00 - duplicate_of: duplicate_of - id: id - kind: kind - status: status - status_changed_at: 2000-01-23T04:56:07.000+00:00 - title: title - properties: - contact: - title: Contact - type: boolean - created_at: - format: date-time - title: Created At - type: string - duplicate_of: - nullable: true - type: string - id: - title: Id - type: string - kind: - title: Kind - type: string - status: - title: Status - type: string - status_changed_at: - format: date-time - title: Status Changed At - type: string - title: - title: Title - type: string - required: - - contact - - created_at - - id - - kind - - status - - status_changed_at - - title - title: FeedbackStatusOut - FindHitOut: - description: |- - One passage-level hit from `/v0/find` (hybrid chunk RAG over - `embed_chunks`). The unit is a passage, not a file — consecutive - `ord` values from the same `art_id` are normal because chunks - overlap by ~400 tokens. Span fields are modality-aware: only the - pair matching `modality` is populated, the others stay None. - example: - art_id: art_id - char_end: 0 - char_start: 6 - content_type: content_type - drive_id: drive_id - file_type: file_type - labels: - - labels - - labels - modality: text - ord: 1 - page_end: 5 - page_start: 5 - path: path - rank_lexical: 2 - rank_semantic: 7 - score: 9.301444243932576 - snippet: snippet - text: text - time_end_ms: 3 - time_start_ms: 2 - updated_at: 2000-01-23T04:56:07.000+00:00 - url: url - version_number: 4 - properties: - art_id: - title: Art Id - type: string - char_end: - nullable: true - type: integer - char_start: - nullable: true - type: integer - content_type: - title: Content Type - type: string - drive_id: - title: Drive Id - type: string - file_type: - title: File Type - type: string - labels: - items: - type: string - title: Labels - type: array - default: null - modality: - enum: - - text - - code - - pdf - - image - - audio - - video - title: Modality - type: string - ord: - title: Ord - type: integer - page_end: - nullable: true - type: integer - page_start: - nullable: true - type: integer - path: - title: Path - type: string - rank_lexical: - nullable: true - type: integer - rank_semantic: - nullable: true - type: integer - score: - title: Score - type: number - snippet: - title: Snippet - type: string - text: - title: Text - type: string - time_end_ms: - nullable: true - type: integer - time_start_ms: - nullable: true - type: integer - updated_at: - format: date-time - title: Updated At - type: string - url: - title: Url - type: string - version_number: - title: Version Number - type: integer - required: - - art_id - - content_type - - drive_id - - file_type - - modality - - ord - - path - - score - - snippet - - text - - updated_at - - url - - version_number - title: FindHitOut - FindPage: - description: |- - `/v0/find` response — single-shot top-N, deliberately unpaginated - (same contract + rationale as `SearchPage`). - example: - items: - - art_id: art_id - char_end: 0 - char_start: 6 - content_type: content_type - drive_id: drive_id - file_type: file_type - labels: - - labels - - labels - modality: text - ord: 1 - page_end: 5 - page_start: 5 - path: path - rank_lexical: 2 - rank_semantic: 7 - score: 9.301444243932576 - snippet: snippet - text: text - time_end_ms: 3 - time_start_ms: 2 - updated_at: 2000-01-23T04:56:07.000+00:00 - url: url - version_number: 4 - - art_id: art_id - char_end: 0 - char_start: 6 - content_type: content_type - drive_id: drive_id - file_type: file_type - labels: - - labels - - labels - modality: text - ord: 1 - page_end: 5 - page_start: 5 - path: path - rank_lexical: 2 - rank_semantic: 7 - score: 9.301444243932576 - snippet: snippet - text: text - time_end_ms: 3 - time_start_ms: 2 - updated_at: 2000-01-23T04:56:07.000+00:00 - url: url - version_number: 4 - properties: - items: - items: - $ref: "#/components/schemas/FindHitOut" - title: Items - type: array - default: null - required: - - items - title: FindPage - FolderCopyIn: - description: |- - POST /v0/folders/{fld_id}/copy body — duplicate the subtree to a - new path. `path` is the target folder path (canonical, trailing - slash). Its own schema (vs. reusing `FolderMoveIn`) keeps the copy - surface self-documenting in the OpenAPI spec. - example: - from_metageneration: 0 - path: path - properties: - from_metageneration: - nullable: true - type: integer - path: - title: Path - type: string - required: - - path - title: FolderCopyIn - FolderCopyOut: - description: |- - POST /v0/folders/{fld_id}/copy response — the newly-created folder - resource (same shape as `FolderOut`) plus copy-provenance fields: - `from_fld_id` is the source folder and `n_artifacts_copied` is the - number of descendant artifacts cloned into the new subtree. Mirrors - the MCP `copy` folder route's conceptual shape. - example: - created_at: 2000-01-23T04:56:07.000+00:00 - deleted_at: 2000-01-23T04:56:07.000+00:00 - description: description - drive_id: drive_id - etag: etag - from_fld_id: from_fld_id - id: id - inherit_grants: true - metageneration: 0 - n_artifacts_copied: 6 - path: path - purge_at: 2000-01-23T04:56:07.000+00:00 - updated_at: 2000-01-23T04:56:07.000+00:00 - properties: - created_at: - format: date-time - title: Created At - type: string - deleted_at: - format: date-time - nullable: true - type: string - description: - nullable: true - type: string - drive_id: - title: Drive Id - type: string - etag: - title: Etag - type: string - from_fld_id: - title: From Fld Id - type: string - id: - title: Id - type: string - inherit_grants: - default: true - title: Inherit Grants - type: boolean - metageneration: - default: 1 - title: Metageneration - type: integer - n_artifacts_copied: - title: N Artifacts Copied - type: integer - path: - title: Path - type: string - purge_at: - format: date-time - nullable: true - type: string - updated_at: - format: date-time - title: Updated At - type: string - required: - - created_at - - drive_id - - etag - - from_fld_id - - id - - n_artifacts_copied - - path - - updated_at - title: FolderCopyOut - FolderCreateIn: - description: |- - PUT /v0/folders/{path} body for the optional metadata params. - Empty body is fine — `mkdir` with no description just creates the - folder row. - example: - description: description - properties: - description: - nullable: true - type: string - title: FolderCreateIn - FolderDeleteOut: - description: |- - DELETE response — surfaces cascade counts so the caller can - confirm scope of an rmdir before the client retries with - `?recursive=true`. - example: - deleted_at: 2000-01-23T04:56:07.000+00:00 - id: id - n_artifacts_deleted: 0 - n_subfolders_deleted: 6 - ok: true - path: path - purge_at: 2000-01-23T04:56:07.000+00:00 - retention_days: 1 - properties: - deleted_at: - format: date-time - title: Deleted At - type: string - id: - title: Id - type: string - n_artifacts_deleted: - title: N Artifacts Deleted - type: integer - n_subfolders_deleted: - title: N Subfolders Deleted - type: integer - ok: - default: true - title: Ok - type: boolean - path: - title: Path - type: string - purge_at: - format: date-time - title: Purge At - type: string - retention_days: - title: Retention Days - type: integer - required: - - deleted_at - - id - - n_artifacts_deleted - - n_subfolders_deleted - - path - - purge_at - - retention_days - title: FolderDeleteOut - FolderMoveIn: - description: "POST /v0/folders/{fld_id}/move body — rename / move." - example: - path: path - properties: - path: - title: Path - type: string - required: - - path - title: FolderMoveIn - FolderOut: - description: |- - Folder resource (folders+permalinks design §13). `path` is the - canonical leading+trailing-slash form. Access is expressed through - grants (permission-sharing-design §4.4), not a folder-level flag. - example: - created_at: 2000-01-23T04:56:07.000+00:00 - deleted_at: 2000-01-23T04:56:07.000+00:00 - description: description - drive_id: drive_id - etag: etag - id: id - inherit_grants: true - metageneration: 0 - path: path - purge_at: 2000-01-23T04:56:07.000+00:00 - updated_at: 2000-01-23T04:56:07.000+00:00 - properties: - created_at: - format: date-time - title: Created At - type: string - deleted_at: - format: date-time - nullable: true - type: string - description: - nullable: true - type: string - drive_id: - title: Drive Id - type: string - etag: - title: Etag - type: string - id: - title: Id - type: string - inherit_grants: - default: true - title: Inherit Grants - type: boolean - metageneration: - default: 1 - title: Metageneration - type: integer - path: - title: Path - type: string - purge_at: - format: date-time - nullable: true - type: string - updated_at: - format: date-time - title: Updated At - type: string - required: - - created_at - - drive_id - - etag - - id - - path - - updated_at - title: FolderOut - FolderPatchIn: - description: |- - PATCH /v0/folders/{fld_id} body — partial update. Field absence = - unchanged. `description`: explicit null = clear. `inherit_grants`: - non-nullable — null/absent = unchanged (it cannot be cleared, only - flipped true/false). - example: - description: description - inherit_grants: true - properties: - description: - nullable: true - type: string - inherit_grants: - nullable: true - type: boolean - title: FolderPatchIn - FolderRestoreOut: - description: |- - POST /v0/folders/{fld_id}/restore response — the restored (live) - folder resource (same shape as `FolderOut`) plus the cascade counts - from `core.folders.restore_cascade` (dashboard-file-operations-design - §4.5), so the caller can confirm the scope of what came back with - the root. - example: - created_at: 2000-01-23T04:56:07.000+00:00 - deleted_at: 2000-01-23T04:56:07.000+00:00 - description: description - drive_id: drive_id - etag: etag - id: id - inherit_grants: true - metageneration: 0 - n_artifacts_restored: 6 - n_subfolders_restored: 1 - path: path - purge_at: 2000-01-23T04:56:07.000+00:00 - updated_at: 2000-01-23T04:56:07.000+00:00 - properties: - created_at: - format: date-time - title: Created At - type: string - deleted_at: - format: date-time - nullable: true - type: string - description: - nullable: true - type: string - drive_id: - title: Drive Id - type: string - etag: - title: Etag - type: string - id: - title: Id - type: string - inherit_grants: - default: true - title: Inherit Grants - type: boolean - metageneration: - default: 1 - title: Metageneration - type: integer - n_artifacts_restored: - title: N Artifacts Restored - type: integer - n_subfolders_restored: - title: N Subfolders Restored - type: integer - path: - title: Path - type: string - purge_at: - format: date-time - nullable: true - type: string - updated_at: - format: date-time - title: Updated At - type: string - required: - - created_at - - drive_id - - etag - - id - - n_artifacts_restored - - n_subfolders_restored - - path - - updated_at - title: FolderRestoreOut - GrantCreateIn: - description: |- - POST /v0/grants body. `resource` is an `art_*`/`fld_*` id or a path - (resolved within the caller's drive). `expires_in` is seconds from now - (omit for a permanent grant). - example: - expires_in: 0 - principal: - email: email - id: id - type: user - resource: resource - role: viewer - properties: - expires_in: - nullable: true - type: integer - principal: - $ref: "#/components/schemas/GrantPrincipalIn" - resource: - title: Resource - type: string - role: - enum: - - viewer - - commenter - - editor - - manager - title: Role - type: string - required: - - principal - - resource - - role - title: GrantCreateIn - GrantList: - example: - items: - - artifacts_affected: 0 - created_at: 2000-01-23T04:56:07.000+00:00 - expires_at: 2000-01-23T04:56:07.000+00:00 - granted_by_id: granted_by_id - granted_by_type: granted_by_type - id: id - on_behalf_of: on_behalf_of - principal_email: principal_email - principal_id: principal_id - principal_type: user - resource_id: resource_id - resource_type: artifact - role: viewer - - artifacts_affected: 0 - created_at: 2000-01-23T04:56:07.000+00:00 - expires_at: 2000-01-23T04:56:07.000+00:00 - granted_by_id: granted_by_id - granted_by_type: granted_by_type - id: id - on_behalf_of: on_behalf_of - principal_email: principal_email - principal_id: principal_id - principal_type: user - resource_id: resource_id - resource_type: artifact - role: viewer - next_cursor: next_cursor - properties: - items: - items: - $ref: "#/components/schemas/GrantOut" - title: Items - type: array - default: null - next_cursor: - nullable: true - type: string - required: - - items - title: GrantList - GrantOut: - description: |- - A live grant. Audit fields (`granted_by_*`, `on_behalf_of`) are - surfaced so a manager can see who shared what. - example: - artifacts_affected: 0 - created_at: 2000-01-23T04:56:07.000+00:00 - expires_at: 2000-01-23T04:56:07.000+00:00 - granted_by_id: granted_by_id - granted_by_type: granted_by_type - id: id - on_behalf_of: on_behalf_of - principal_email: principal_email - principal_id: principal_id - principal_type: user - resource_id: resource_id - resource_type: artifact - role: viewer - properties: - artifacts_affected: - nullable: true - type: integer - created_at: - format: date-time - title: Created At - type: string - expires_at: - format: date-time - nullable: true - type: string - granted_by_id: - title: Granted By Id - type: string - granted_by_type: - title: Granted By Type - type: string - id: - title: Id - type: string - on_behalf_of: - nullable: true - type: string - principal_email: - nullable: true - type: string - principal_id: - nullable: true - type: string - principal_type: - enum: - - user - - agent - - org - - anyone - title: Principal Type - type: string - resource_id: - title: Resource Id - type: string - resource_type: - enum: - - artifact - - folder - title: Resource Type - type: string - role: - enum: - - viewer - - commenter - - editor - - manager - title: Role - type: string - required: - - created_at - - granted_by_id - - granted_by_type - - id - - principal_type - - resource_id - - resource_type - - role - title: GrantOut - GrantPatchIn: - description: |- - PATCH /v0/grants/{grn_id} body. Field absence = unchanged; explicit - `expires_in: null` clears the expiry (makes the grant permanent). - example: - expires_in: 0 - role: viewer - properties: - expires_in: - nullable: true - type: integer - role: - enum: - - viewer - - commenter - - editor - - manager - nullable: true - type: string - title: GrantPatchIn - GrantPrincipalIn: - description: |- - Who a grant is for. `anyone` carries no id/email; `org`/`agent` - require `id`; `user` requires exactly one of `id` / `email` (an email - with no account becomes a pending-email invite resolved on sign-in). - example: - email: email - id: id - type: user - properties: - email: - maxLength: 320 - nullable: true - type: string - id: - maxLength: 128 - nullable: true - type: string - type: - enum: - - user - - agent - - org - - anyone - title: Type - type: string - required: - - type - title: GrantPrincipalIn - HealthDegradedDetail: - example: - error: error - status: degraded - properties: - error: - title: Error - type: string - status: - enum: - - degraded - title: Status - type: string - required: - - error - - status - title: HealthDegradedDetail - HealthDegradedResponse: - description: |- - Legacy health-probe failure shape. - - Health predates the `/v0` error envelope and is consumed by load - balancers. PR 1 documents the wire shape without changing it; convergence - on the canonical API envelope is a separately reviewed compatibility - decision. - example: - detail: - error: error - status: degraded - properties: - detail: - $ref: "#/components/schemas/HealthDegradedDetail" - required: - - detail - title: HealthDegradedResponse - HealthOut: - example: - status: ok - properties: - status: - enum: - - ok - title: Status - type: string - required: - - status - title: HealthOut - HourlyUsageCounterOut: - example: - limit: 1 - reset_at: 2000-01-23T04:56:07.000+00:00 - used: 1 - properties: - limit: - title: Limit - type: integer - reset_at: - format: date-time - title: Reset At + destination_name: + maxLength: 255 + minLength: 1 + title: Destination Name type: string - used: - title: Used - type: integer - required: - - limit - - reset_at - - used - title: HourlyUsageCounterOut - IdentityAssertionMetadataOut: - additionalProperties: true - example: - alg: alg - iss: iss - version: 0 - properties: - alg: - title: Alg + destination_parent_id: + pattern: "^fld_[a-f0-9]{16}$" + title: Destination Parent Id type: string - iss: - title: Iss + version_id: + nullable: true + pattern: "^ver_[a-f0-9]{16}$" type: string - version: - title: Version - type: integer required: - - alg - - iss - - version - title: IdentityAssertionMetadataOut - InvitationList: + - destination_name + - destination_parent_id + title: ArtifactCopyIn + ArtifactListOut: example: items: - - created_at: 2000-01-23T04:56:07.000+00:00 - email: email - expires_at: 2000-01-23T04:56:07.000+00:00 + - content_preview: content_preview + content_type: content_type + created_at: 2000-01-23T04:56:07.000+00:00 + deleted_at: 2000-01-23T04:56:07.000+00:00 + drive_id: drive_id + effective_visibility: public + head_version_id: head_version_id id: id - invited_by: invited_by - organization_id: organization_id - role: admin - status: pending - - created_at: 2000-01-23T04:56:07.000+00:00 - email: email - expires_at: 2000-01-23T04:56:07.000+00:00 + labels: + - labels + - labels + metadata: + key: "" + name: name + parent_id: parent_id + revision: revision + state: active + updated_at: 2000-01-23T04:56:07.000+00:00 + - content_preview: content_preview + content_type: content_type + created_at: 2000-01-23T04:56:07.000+00:00 + deleted_at: 2000-01-23T04:56:07.000+00:00 + drive_id: drive_id + effective_visibility: public + head_version_id: head_version_id id: id - invited_by: invited_by - organization_id: organization_id - role: admin - status: pending + labels: + - labels + - labels + metadata: + key: "" + name: name + parent_id: parent_id + revision: revision + state: active + updated_at: 2000-01-23T04:56:07.000+00:00 next_cursor: next_cursor properties: items: items: - $ref: "#/components/schemas/InvitationOut" + $ref: "#/components/schemas/ArtifactOut" title: Items type: array default: null @@ -16288,236 +8661,357 @@ components: type: string required: - items - title: InvitationList - InvitationOut: - description: |- - One workspace invitation — metadata only; the raw token is never - surfaced over the API (it lives only in the invite email). + - next_cursor + title: ArtifactListOut + ArtifactOut: example: + content_preview: content_preview + content_type: content_type created_at: 2000-01-23T04:56:07.000+00:00 - email: email - expires_at: 2000-01-23T04:56:07.000+00:00 + deleted_at: 2000-01-23T04:56:07.000+00:00 + drive_id: drive_id + effective_visibility: public + head_version_id: head_version_id id: id - invited_by: invited_by - organization_id: organization_id - role: admin - status: pending + labels: + - labels + - labels + metadata: + key: "" + name: name + parent_id: parent_id + revision: revision + state: active + updated_at: 2000-01-23T04:56:07.000+00:00 properties: + content_preview: + nullable: true + type: string + content_type: + nullable: true + type: string created_at: format: date-time title: Created At type: string - email: - title: Email - type: string - expires_at: + deleted_at: format: date-time - title: Expires At + nullable: true + type: string + drive_id: + pattern: "^drv_[a-f0-9]{16}$" + title: Drive Id + type: string + effective_visibility: + description: "Server-computed exposure summary, resolved over the artifact's\ + \ live grants, its folder ancestry (bounded by the nearest sealed folder),\ + \ and the drive. 'public' when any live grant has principal_type 'public';\ + \ otherwise 'shared' when a live grant names a principal other than the\ + \ drive's creator; otherwise 'private'. Describes exposure, NOT the caller's\ + \ own access." + enum: + - public + - shared + - private + title: Effective Visibility + type: string + head_version_id: + nullable: true type: string id: + pattern: "^art_[a-f0-9]{16}$" title: Id type: string - invited_by: - nullable: true + labels: + items: + type: string + title: Labels + type: array + default: null + metadata: + additionalProperties: true + title: Metadata + type: object + name: + title: Name type: string - organization_id: - title: Organization Id + parent_id: + pattern: "^fld_[a-f0-9]{16}$" + title: Parent Id type: string - role: - enum: - - admin - - member - title: Role + revision: + pattern: "^rev_[a-f0-9]{16}$" + title: Revision type: string - status: + state: enum: - - pending - - accepted - - revoked - - expired - title: Status + - active + - deleted + title: State + type: string + updated_at: + format: date-time + title: Updated At type: string required: + - content_preview + - content_type - created_at - - email - - expires_at + - deleted_at + - drive_id + - effective_visibility + - head_version_id - id - - organization_id - - role - - status - title: InvitationOut - InviteCreateOut: + - labels + - metadata + - name + - parent_id + - revision + - state + - updated_at + title: ArtifactOut + ArtifactUpdateIn: + additionalProperties: {} description: |- - POST /v0/members/invite response. `already_member` is True when the - email was already a live member (no invite created — a no-op success). - `email_delivered` is False when the invite row was created but the - notification email failed to send — the invite is still valid and can be - resent, but the invitee has not yet received a link. + PATCH /v0/drives/{id}/artifacts/{artifact_id} body — at least one + field is required. example: - already_member: false - email_delivered: true - invitation: "" + labels: + - labels + - labels + metadata: + key: "" + name: name + parent_id: parent_id properties: - already_member: - default: false - title: Already Member - type: boolean - email_delivered: - default: true - title: Email Delivered - type: boolean - invitation: - allOf: - - $ref: "#/components/schemas/InvitationOut" + labels: + items: + type: string nullable: true - title: InviteCreateOut - JwkOut: - additionalProperties: true + type: array + default: null + metadata: + additionalProperties: true + nullable: true + type: object + name: + maxLength: 255 + minLength: 1 + nullable: true + type: string + parent_id: + nullable: true + pattern: "^fld_[a-f0-9]{16}$" + type: string + title: ArtifactUpdateIn + ChangeActorOut: + example: + id: id + type: agent + properties: + id: + nullable: true + type: string + type: + enum: + - agent + - user + - system + title: Type + type: string + required: + - id + - type + title: ChangeActorOut + ChangeOut: example: - alg: alg - e: e - kid: kid - kty: kty - "n": "n" - use: use + actor: + id: id + type: agent + change_set_id: change_set_id + data: + key: "" + drive_id: drive_id + id: id + occurred_at: 2000-01-23T04:56:07.000+00:00 + previous_revision: previous_revision + resource: + id: id + type: drive + revision: revision + type: type properties: - alg: - title: Alg + actor: + $ref: "#/components/schemas/ChangeActorOut" + change_set_id: + title: Change Set Id + type: string + data: + additionalProperties: true + title: Data + type: object + drive_id: + pattern: "^drv_[a-f0-9]{16}$" + title: Drive Id type: string - e: - title: E + id: + pattern: "^chg_[a-f0-9]{16}$" + title: Id type: string - kid: - title: Kid + occurred_at: + format: date-time + title: Occurred At type: string - kty: - title: Kty + previous_revision: + nullable: true type: string - "n": - title: "N" + resource: + $ref: "#/components/schemas/ChangeResourceOut" + revision: + nullable: true type: string - use: - title: Use + type: + title: Type type: string required: - - alg - - e - - kid - - kty - - "n" - - use - title: JwkOut - JwksOut: - additionalProperties: true + - actor + - change_set_id + - data + - drive_id + - id + - occurred_at + - previous_revision + - resource + - revision + - type + title: ChangeOut + ChangePageOut: example: - keys: - - alg: alg - e: e - kid: kid - kty: kty - "n": "n" - use: use - - alg: alg - e: e - kid: kid - kty: kty - "n": "n" - use: use + has_more: true + items: + - actor: + id: id + type: agent + change_set_id: change_set_id + data: + key: "" + drive_id: drive_id + id: id + occurred_at: 2000-01-23T04:56:07.000+00:00 + previous_revision: previous_revision + resource: + id: id + type: drive + revision: revision + type: type + - actor: + id: id + type: agent + change_set_id: change_set_id + data: + key: "" + drive_id: drive_id + id: id + occurred_at: 2000-01-23T04:56:07.000+00:00 + previous_revision: previous_revision + resource: + id: id + type: drive + revision: revision + type: type + next_cursor: next_cursor properties: - keys: + has_more: + title: Has More + type: boolean + items: items: - $ref: "#/components/schemas/JwkOut" - title: Keys + $ref: "#/components/schemas/ChangeOut" + title: Items type: array default: null - required: - - keys - title: JwksOut - LookupValuesIn: - example: - column: column - dataset: dataset - limit: 0 - properties: - column: - title: Column - type: string - dataset: - title: Dataset + next_cursor: + title: Next Cursor type: string - limit: - default: 50 - title: Limit - type: integer required: - - column - - dataset - title: LookupValuesIn - LookupValuesOut: + - has_more + - items + - next_cursor + title: ChangePageOut + ChangeResourceOut: example: - column: column - dataset: dataset - values: - - "" - - "" + id: id + type: drive properties: - column: - title: Column + id: + title: Id type: string - dataset: - title: Dataset + type: + enum: + - drive + - folder + - artifact + title: Type type: string - values: - items: {} - title: Values - type: array - default: null required: - - column - - dataset - - values - title: LookupValuesOut - MemberInviteIn: - description: POST /v0/members/invite body — invite a person by email. + - id + - type + title: ChangeResourceOut + DriveCreateIn: + additionalProperties: {} + description: POST /v0/drives body. example: - email: email - role: member + metadata: + key: "" + name: name properties: - email: - maxLength: 320 - minLength: 3 - title: Email - type: string - role: - default: member - enum: - - admin - - member - title: Role + metadata: + additionalProperties: true + title: Metadata + type: object + name: + minLength: 1 + title: Name type: string required: - - email - title: MemberInviteIn - MemberList: + - name + title: DriveCreateIn + DriveListOut: example: items: - created_at: 2000-01-23T04:56:07.000+00:00 - email: email - first_name: first_name - last_name: last_name - role: admin - user_id: user_id + created_by: created_by + deleted_at: 2000-01-23T04:56:07.000+00:00 + id: id + metadata: + key: "" + name: name + retrieval_bytes: 0 + revision: revision + root_folder_id: root_folder_id + state: active + storage_bytes: 6 + updated_at: 2000-01-23T04:56:07.000+00:00 + workspace_id: workspace_id - created_at: 2000-01-23T04:56:07.000+00:00 - email: email - first_name: first_name - last_name: last_name - role: admin - user_id: user_id + created_by: created_by + deleted_at: 2000-01-23T04:56:07.000+00:00 + id: id + metadata: + key: "" + name: name + retrieval_bytes: 0 + revision: revision + root_folder_id: root_folder_id + state: active + storage_bytes: 6 + updated_at: 2000-01-23T04:56:07.000+00:00 + workspace_id: workspace_id next_cursor: next_cursor properties: items: items: - $ref: "#/components/schemas/MemberOut" + $ref: "#/components/schemas/DriveOut" title: Items type: array default: null @@ -16526,573 +9020,447 @@ components: type: string required: - items - title: MemberList - MemberOut: - description: |- - One live member of a workspace — metadata for the members page / - `GET /v0/members`. + - next_cursor + title: DriveListOut + DriveOut: example: created_at: 2000-01-23T04:56:07.000+00:00 - email: email - first_name: first_name - last_name: last_name - role: admin - user_id: user_id + created_by: created_by + deleted_at: 2000-01-23T04:56:07.000+00:00 + id: id + metadata: + key: "" + name: name + retrieval_bytes: 0 + revision: revision + root_folder_id: root_folder_id + state: active + storage_bytes: 6 + updated_at: 2000-01-23T04:56:07.000+00:00 + workspace_id: workspace_id properties: created_at: format: date-time title: Created At type: string - email: - title: Email - type: string - first_name: + created_by: nullable: true type: string - last_name: + deleted_at: + format: date-time nullable: true type: string - role: - enum: - - admin - - member - title: Role - type: string - user_id: - title: User Id - type: string - required: - - created_at - - email - - role - - user_id - title: MemberOut - MemberRemoveOut: - description: |- - DELETE /v0/members/{user_id} response — the member-removal receipt. - `id` is the removed user's id (replaces the ad-hoc `removed` key). - example: - id: id - ok: true - organization_id: organization_id - properties: id: + pattern: "^drv_[a-f0-9]{16}$" title: Id type: string - ok: - default: true - title: Ok - type: boolean - organization_id: - title: Organization Id + metadata: + additionalProperties: true + title: Metadata + type: object + name: + title: Name type: string - required: - - id - - organization_id - title: MemberRemoveOut - MemberRoleIn: - description: "PATCH /v0/members/{user} body — promote/demote a member." - example: - role: admin - properties: - role: + retrieval_bytes: + title: Retrieval Bytes + type: integer + revision: + pattern: "^rev_[a-f0-9]{16}$" + title: Revision + type: string + root_folder_id: + title: Root Folder Id + type: string + state: enum: - - admin - - member - title: Role + - active + - deleted + title: State + type: string + storage_bytes: + title: Storage Bytes + type: integer + updated_at: + format: date-time + title: Updated At + type: string + workspace_id: + title: Workspace Id type: string required: - - role - title: MemberRoleIn - OAuthProtocolErrorOut: - additionalProperties: true - description: RFC OAuth error shape used by public protocol endpoints. + - created_at + - created_by + - deleted_at + - id + - metadata + - name + - retrieval_bytes + - revision + - root_folder_id + - state + - storage_bytes + - updated_at + - workspace_id + title: DriveOut + DriveUpdateIn: + additionalProperties: {} + description: "PATCH /v0/drives/{id} body — at least one field is required." example: - error: error - error_description: error_description + metadata: + key: "" + name: name properties: - error: - title: Error - type: string - error_description: + metadata: + additionalProperties: true + nullable: true + type: object + name: + minLength: 1 nullable: true type: string - required: - - error - title: OAuthProtocolErrorOut - OAuthRevocationOut: - description: RFC 7009 successful revocation has an empty JSON object. - properties: {} - title: OAuthRevocationOut - type: object - OperationUsageOut: + title: DriveUpdateIn + DriveUsageOut: example: - reads: 7 - writes: 9 + retrieval_bytes: 0 + storage_bytes: 6 properties: - reads: - title: Reads + retrieval_bytes: + title: Retrieval Bytes type: integer - writes: - title: Writes + storage_bytes: + title: Storage Bytes type: integer required: - - reads - - writes - title: OperationUsageOut - Page: + - retrieval_bytes + - storage_bytes + title: DriveUsageOut + ErrorResponse: + properties: + error: + $ref: "#/components/schemas/drives_create_400_response_error" + required: + - error + FolderCascadeOut: example: - items: - - content_type: content_type - created_at: 2000-01-23T04:56:07.000+00:00 - drive_id: drive_id - embedded_at: 2000-01-23T04:56:07.000+00:00 - etag: etag - file_type: file_type - hash: hash - id: id - indexed_at: 2000-01-23T04:56:07.000+00:00 - labels: - - labels - - labels - llm_index: - key: "" - metadata: - key: "" - metageneration: 0 - path: path - permalink: permalink - size_bytes: 6 - source: "" - updated_at: 2000-01-23T04:56:07.000+00:00 - url: url - version_number: 1 - - content_type: content_type + cascade: + key: 0 + folder: created_at: 2000-01-23T04:56:07.000+00:00 + deleted_at: 2000-01-23T04:56:07.000+00:00 drive_id: drive_id - embedded_at: 2000-01-23T04:56:07.000+00:00 - etag: etag - file_type: file_type - hash: hash + grant_inheritance: inherit id: id - indexed_at: 2000-01-23T04:56:07.000+00:00 - labels: - - labels - - labels - llm_index: - key: "" metadata: key: "" - metageneration: 0 - path: path - permalink: permalink - size_bytes: 6 - source: "" + name: name + parent_id: parent_id + revision: revision + state: active updated_at: 2000-01-23T04:56:07.000+00:00 - url: url - version_number: 1 - next_cursor: next_cursor properties: - items: - items: - $ref: "#/components/schemas/ArtifactOut" - title: Items - type: array - default: null - next_cursor: - nullable: true - type: string + cascade: + additionalProperties: + type: integer + title: Cascade + folder: + $ref: "#/components/schemas/FolderOut" required: - - items - title: Page - ProjectConfigIn: + - cascade + - folder + title: FolderCascadeOut + FolderCopyIn: + additionalProperties: false + description: |- + POST /v0/drives/{id}/folders/{folder_id}/copy body. + + ``destination_drive_id`` must equal the source drive (or be absent) — + cross-drive copy is out of v0 scope and rejected. example: - auto_compile: false - engine: engine - entrypoint: entrypoint + destination_drive_id: destination_drive_id + destination_name: destination_name + destination_parent_id: destination_parent_id properties: - auto_compile: - default: false - title: Auto Compile - type: boolean - engine: + destination_drive_id: nullable: true + pattern: "^drv_[a-f0-9]{16}$" type: string - entrypoint: - title: Entrypoint + destination_name: + maxLength: 255 + minLength: 1 + title: Destination Name type: string - required: - - entrypoint - title: ProjectConfigIn - ProtectedResourceMetadataOut: - additionalProperties: true - example: - authorization_servers: - - authorization_servers - - authorization_servers - bearer_methods_supported: - - bearer_methods_supported - - bearer_methods_supported - resource: resource - scopes_supported: - - scopes_supported - - scopes_supported - properties: - authorization_servers: - items: - type: string - title: Authorization Servers - type: array - default: null - bearer_methods_supported: - items: - type: string - title: Bearer Methods Supported - type: array - default: null - resource: - title: Resource + destination_parent_id: + pattern: "^fld_[a-f0-9]{16}$" + title: Destination Parent Id type: string - scopes_supported: - items: - type: string - title: Scopes Supported - type: array - default: null required: - - authorization_servers - - bearer_methods_supported - - resource - - scopes_supported - title: ProtectedResourceMetadataOut - QueryColumnOut: - additionalProperties: true + - destination_name + - destination_parent_id + title: FolderCopyIn + FolderCreateIn: + additionalProperties: {} + description: "POST /v0/drives/{id}/folders body." example: + grant_inheritance: inherit + metadata: + key: "" name: name - type: type + parent_id: parent_id properties: + grant_inheritance: + default: inherit + enum: + - inherit + - sealed + title: Grant Inheritance + type: string + metadata: + additionalProperties: true + title: Metadata + type: object name: + maxLength: 255 + minLength: 1 title: Name type: string - type: - nullable: true + parent_id: + pattern: "^fld_[a-f0-9]{16}$" + title: Parent Id type: string required: - name - title: QueryColumnOut - QueryDryRunOut: - additionalProperties: true - example: - dry_run: true - engine: engine - estimated_bytes_processed: 0 - result_schema: - - name: name - type: type - - name: name - type: type - valid: true - properties: - dry_run: - enum: - - true - title: Dry Run - type: boolean - engine: - title: Engine - type: string - estimated_bytes_processed: - title: Estimated Bytes Processed - type: integer - result_schema: - items: - $ref: "#/components/schemas/QueryColumnOut" - title: Result Schema - type: array - default: null - valid: - title: Valid - type: boolean - required: - - dry_run - - engine - - estimated_bytes_processed - - result_schema - - valid - title: QueryDryRunOut - QueryIn: + - parent_id + title: FolderCreateIn + FolderListOut: example: - dry_run: false - inputs: - key: inputs - sql: sql - properties: - dry_run: - default: false - title: Dry Run - type: boolean - inputs: - additionalProperties: - type: string - title: Inputs - sql: - title: Sql - type: string - required: - - sql - title: QueryIn - QueryResultOut: - additionalProperties: {} + items: + - created_at: 2000-01-23T04:56:07.000+00:00 + deleted_at: 2000-01-23T04:56:07.000+00:00 + drive_id: drive_id + grant_inheritance: inherit + id: id + metadata: + key: "" + name: name + parent_id: parent_id + revision: revision + state: active + updated_at: 2000-01-23T04:56:07.000+00:00 + - created_at: 2000-01-23T04:56:07.000+00:00 + deleted_at: 2000-01-23T04:56:07.000+00:00 + drive_id: drive_id + grant_inheritance: inherit + id: id + metadata: + key: "" + name: name + parent_id: parent_id + revision: revision + state: active + updated_at: 2000-01-23T04:56:07.000+00:00 + next_cursor: next_cursor properties: - bytes_processed: - title: Bytes Processed - type: integer - cache_hit: - title: Cache Hit - type: boolean - engine: - title: Engine - type: string - preview: - items: - additionalProperties: true - nullable: true - type: object - title: Preview - type: array - default: null - result_art_id: - title: Result Art Id - type: string - result_schema: + items: items: - $ref: "#/components/schemas/QueryColumnOut" - title: Result Schema + $ref: "#/components/schemas/FolderOut" + title: Items type: array default: null - row_count: - title: Row Count - type: integer - required: - - bytes_processed - - cache_hit - - engine - - preview - - result_art_id - - result_schema - - row_count - title: QueryResultOut - RevokeOut: - description: |- - DELETE /v0/grants/{grn_id}, DELETE /v0/shares/{shr_id}, - DELETE /v0/invitations/{invitation_id} response — the unified - revoke receipt. `revoked` is a COUNT: 1 when a live row was revoked, - 0 when it was already gone (DELETE is idempotent). - example: - id: id - ok: true - revoked: 0 - properties: - id: - title: Id + next_cursor: + nullable: true type: string - ok: - default: true - title: Ok - type: boolean - revoked: - title: Revoked - type: integer required: - - id - - revoked - title: RevokeOut - SearchHitOut: + - items + - next_cursor + title: FolderListOut + FolderOut: example: - art_id: art_id - content_type: content_type + created_at: 2000-01-23T04:56:07.000+00:00 + deleted_at: 2000-01-23T04:56:07.000+00:00 drive_id: drive_id - file_type: file_type - labels: - - labels - - labels - path: path - score: 0.8008281904610115 - snippet: snippet + grant_inheritance: inherit + id: id + metadata: + key: "" + name: name + parent_id: parent_id + revision: revision + state: active updated_at: 2000-01-23T04:56:07.000+00:00 - url: url - version_number: 6 properties: - art_id: - title: Art Id - type: string - content_type: - title: Content Type + created_at: + format: date-time + title: Created At + type: string + deleted_at: + format: date-time + nullable: true type: string drive_id: + pattern: "^drv_[a-f0-9]{16}$" title: Drive Id type: string - file_type: - title: File Type + grant_inheritance: + enum: + - inherit + - sealed + title: Grant Inheritance type: string - labels: - items: - type: string - title: Labels - type: array - default: null - path: - title: Path + id: + pattern: "^fld_[a-f0-9]{16}$" + title: Id type: string - score: - title: Score - type: number - snippet: - title: Snippet + metadata: + additionalProperties: true + title: Metadata + type: object + name: + nullable: true + type: string + parent_id: + nullable: true + type: string + revision: + pattern: "^rev_[a-f0-9]{16}$" + title: Revision + type: string + state: + enum: + - active + - deleted + title: State type: string updated_at: format: date-time title: Updated At type: string - url: - title: Url - type: string - version_number: - title: Version Number - type: integer required: - - art_id - - content_type + - created_at + - deleted_at - drive_id - - file_type - - path - - score - - snippet + - grant_inheritance + - id + - metadata + - name + - parent_id + - revision + - state - updated_at - - url - - version_number - title: SearchHitOut - SearchPage: + title: FolderOut + FolderUpdateIn: + additionalProperties: {} description: |- - `/v0/search` response — single-shot top-N, deliberately unpaginated. - - Ranked retrieval doesn't paginate meaningfully (the industry norm: - vector/RAG APIs are pure top-K; Algolia/GitHub cap ranked results - outright) — the correct "next page" of a relevance-ranked list is a - narrower query. Raise `limit` (≤100) for more hits. A `next_cursor` - field advertised here in the past was structurally always null and - was dropped; if deep retrieval is ever needed, an ES-`search_after` - style `(score, id)` keyset can be re-added additively. + PATCH /v0/drives/{id}/folders/{folder_id} body — at least one field is + required. example: - items: - - art_id: art_id - content_type: content_type - drive_id: drive_id - file_type: file_type - labels: - - labels - - labels - path: path - score: 0.8008281904610115 - snippet: snippet - updated_at: 2000-01-23T04:56:07.000+00:00 - url: url - version_number: 6 - - art_id: art_id - content_type: content_type - drive_id: drive_id - file_type: file_type - labels: - - labels - - labels - path: path - score: 0.8008281904610115 - snippet: snippet - updated_at: 2000-01-23T04:56:07.000+00:00 - url: url - version_number: 6 + grant_inheritance: inherit + metadata: + key: "" + name: name + parent_id: parent_id properties: - items: - items: - $ref: "#/components/schemas/SearchHitOut" - title: Items - type: array - default: null - required: - - items - title: SearchPage - ShareCreateIn: - description: |- - POST /v0/shares body. `resource` is an `art_*`/`fld_*` id or a path. - `expires_in` is seconds from now (omit for the default: none for a human - creator, a short TTL for an agent). `password` (optional) gates redemption. + grant_inheritance: + enum: + - inherit + - sealed + nullable: true + type: string + metadata: + additionalProperties: true + nullable: true + type: object + name: + maxLength: 255 + minLength: 1 + nullable: true + type: string + parent_id: + nullable: true + pattern: "^fld_[a-f0-9]{16}$" + type: string + title: FolderUpdateIn + GrantCreateIn: + additionalProperties: false + description: "POST /v0/drives/{id}/grants body." example: - expires_in: 0 - password: password - resource: resource + expires_at: 2000-01-23T04:56:07.000+00:00 + principal_id: principal_id + principal_type: agent + resource_id: resource_id + resource_type: drive role: viewer properties: - expires_in: + expires_at: + format: date-time nullable: true - type: integer - password: - maxLength: 1024 + type: string + principal_id: nullable: true type: string - resource: - title: Resource + principal_type: + enum: + - agent + - user + - workspace + - public + title: Principal Type + type: string + resource_id: + minLength: 1 + title: Resource Id + type: string + resource_type: + enum: + - drive + - folder + - artifact + title: Resource Type type: string role: - default: viewer enum: - viewer - - commenter - editor + - manager title: Role type: string required: - - resource - title: ShareCreateIn - ShareErrorOut: - description: Negotiated JSON error shape for the public share protocol. - example: - error: - code: code - message: message - properties: - error: - $ref: "#/components/schemas/ErrorBody" - required: - - error - title: ShareErrorOut - ShareList: + - principal_type + - resource_id + - resource_type + - role + title: GrantCreateIn + GrantListOut: example: items: - - access_count: 0 - audience: audience - created_at: 2000-01-23T04:56:07.000+00:00 + - created_at: 2000-01-23T04:56:07.000+00:00 + drive_id: drive_id expires_at: 2000-01-23T04:56:07.000+00:00 - has_password: true id: id - last_accessed_at: 2000-01-23T04:56:07.000+00:00 + principal_id: principal_id + principal_type: agent resource_id: resource_id - resource_type: artifact + resource_type: drive + revision: revision + revoked_at: 2000-01-23T04:56:07.000+00:00 role: viewer - - access_count: 0 - audience: audience - created_at: 2000-01-23T04:56:07.000+00:00 + state: active + - created_at: 2000-01-23T04:56:07.000+00:00 + drive_id: drive_id expires_at: 2000-01-23T04:56:07.000+00:00 - has_password: true id: id - last_accessed_at: 2000-01-23T04:56:07.000+00:00 + principal_id: principal_id + principal_type: agent resource_id: resource_id - resource_type: artifact + resource_type: drive + revision: revision + revoked_at: 2000-01-23T04:56:07.000+00:00 role: viewer + state: active next_cursor: next_cursor properties: items: items: - $ref: "#/components/schemas/ShareOut" + $ref: "#/components/schemas/GrantOut" title: Items type: array default: null @@ -17101,404 +9469,247 @@ components: type: string required: - items - title: ShareList - ShareMintOut: - description: |- - The create/rotate response — the ONLY place the `share_key` and its - redemption `url` are exposed. + - next_cursor + title: GrantListOut + GrantOut: example: - access_count: 0 - audience: audience created_at: 2000-01-23T04:56:07.000+00:00 + drive_id: drive_id expires_at: 2000-01-23T04:56:07.000+00:00 - has_password: true id: id - last_accessed_at: 2000-01-23T04:56:07.000+00:00 + principal_id: principal_id + principal_type: agent resource_id: resource_id - resource_type: artifact + resource_type: drive + revision: revision + revoked_at: 2000-01-23T04:56:07.000+00:00 role: viewer - share_key: share_key - url: url + state: active properties: - access_count: - default: 0 - title: Access Count - type: integer - audience: - title: Audience - type: string created_at: format: date-time title: Created At type: string + drive_id: + pattern: "^drv_[a-f0-9]{16}$" + title: Drive Id + type: string expires_at: format: date-time nullable: true type: string - has_password: - title: Has Password - type: boolean id: + pattern: "^grn_[a-f0-9]{16}$" title: Id type: string - last_accessed_at: - format: date-time + principal_id: nullable: true type: string + principal_type: + enum: + - agent + - user + - workspace + - public + title: Principal Type + type: string resource_id: title: Resource Id type: string resource_type: enum: - - artifact + - drive - folder + - artifact title: Resource Type type: string + revision: + pattern: "^rev_[a-f0-9]{16}$" + title: Revision + type: string + revoked_at: + format: date-time + nullable: true + type: string role: enum: - viewer - - commenter - editor + - manager title: Role type: string - share_key: - title: Share Key - type: string - url: - title: Url + state: + enum: + - active + - revoked + - expired + title: State type: string required: - - audience - created_at - - has_password + - drive_id + - expires_at - id + - principal_id + - principal_type - resource_id - resource_type + - revision + - revoked_at - role - - share_key - - url - title: ShareMintOut - ShareOut: + - state + title: GrantOut + GrantUpdateIn: + additionalProperties: false description: |- - A live share link as seen on list/management — NEVER carries the - `share_key` (that is the credential, returned only at mint/rotate). + PATCH /v0/drives/{id}/grants/{grant_id} body — at least one field is + required. An explicit ``expires_at: null`` clears the expiry; omitting it + leaves it unchanged. example: - access_count: 0 - audience: audience - created_at: 2000-01-23T04:56:07.000+00:00 expires_at: 2000-01-23T04:56:07.000+00:00 - has_password: true - id: id - last_accessed_at: 2000-01-23T04:56:07.000+00:00 - resource_id: resource_id - resource_type: artifact role: viewer properties: - access_count: - default: 0 - title: Access Count - type: integer - audience: - title: Audience - type: string - created_at: - format: date-time - title: Created At - type: string expires_at: format: date-time nullable: true type: string - has_password: - title: Has Password - type: boolean - id: - title: Id - type: string - last_accessed_at: - format: date-time - nullable: true - type: string - resource_id: - title: Resource Id - type: string - resource_type: - enum: - - artifact - - folder - title: Resource Type - type: string role: enum: - viewer - - commenter - editor - title: Role - type: string - required: - - audience - - created_at - - has_password - - id - - resource_id - - resource_type - - role - title: ShareOut - ShareRedeemOut: - example: - expires_at: 2000-01-23T04:56:07.000+00:00 - role: role - token: token - url: url - properties: - expires_at: - format: date-time - title: Expires At - type: string - role: - title: Role - type: string - token: - title: Token - type: string - url: - title: Url - type: string - required: - - expires_at - - role - - token - - url - title: ShareRedeemOut - SourceRef: - description: |- - One typed provenance ref. `type` is open-vocabulary (server - validates only length, not the value), so callers can declare new - types as their integrations evolve. `id` is the type-specific - identifier — for `type='artifact'` this is an `art_…` ID. - properties: - id: - title: Id - type: string - metadata: - additionalProperties: true + - manager nullable: true - type: object - type: - title: Type - type: string - required: - - id - - type - title: SourceRef - StorageBreakdownOut: - properties: - as_of: - format: date - title: As Of type: string - live_bytes: - title: Live Bytes - type: integer - trash_bytes: - title: Trash Bytes - type: integer - version_bytes: - title: Version Bytes - type: integer - required: - - as_of - - live_bytes - - trash_bytes - - version_bytes - title: StorageBreakdownOut - StorageFootprintOut: + title: GrantUpdateIn + HealthDegradedDetail: example: - as_of: 2000-01-23 - live_bytes: 0 - total_bytes: 6 - trash_bytes: 1 - version_bytes: 5 + error: error + status: degraded properties: - as_of: - format: date - nullable: true + error: + title: Error + type: string + status: + enum: + - degraded + title: Status type: string - live_bytes: - title: Live Bytes - type: integer - total_bytes: - title: Total Bytes - type: integer - trash_bytes: - title: Trash Bytes - type: integer - version_bytes: - title: Version Bytes - type: integer required: - - live_bytes - - total_bytes - - trash_bytes - - version_bytes - title: StorageFootprintOut - TokenResponse: + - error + - status + title: HealthDegradedDetail + HealthDegradedResponse: description: |- - `POST /oauth2/token` success response. Mirrors RFC 6749 with - an optional `identity_assertion` field for the claim grant path - (where a fresh post-claim assertion supersedes the pre-claim - one). + Legacy health-probe failure shape. + + Health predates the `/v0` error envelope and is consumed by load + balancers. PR 1 documents the wire shape without changing it; convergence + on the canonical API envelope is a separately reviewed compatibility + decision. example: - access_token: access_token - expires_in: 0 - identity_assertion: identity_assertion - scope: scope - token_type: Bearer + detail: + error: error + status: degraded properties: - access_token: - title: Access Token - type: string - expires_in: - description: Seconds until access_token expiry. - title: Expires In - type: integer - identity_assertion: - nullable: true - type: string - scope: - title: Scope - type: string - token_type: - default: Bearer - title: Token Type - type: string + detail: + $ref: "#/components/schemas/HealthDegradedDetail" required: - - access_token - - expires_in - - scope - title: TokenResponse - TokenUsageOut: + - detail + title: HealthDegradedResponse + HealthOut: example: - embed: 3 - llm_cached: 2 - llm_input: 4 - llm_output: 7 + status: ok properties: - embed: - title: Embed - type: integer - llm_cached: - title: Llm Cached - type: integer - llm_input: - title: Llm Input - type: integer - llm_output: - title: Llm Output - type: integer + status: + enum: + - ok + title: Status + type: string required: - - embed - - llm_cached - - llm_input - - llm_output - title: TokenUsageOut - TrashArtifactOut: + - status + title: HealthOut + SearchHitOut: example: - deleted_at: 2000-01-23T04:56:07.000+00:00 + content_type: content_type + drive_id: drive_id id: id - path: path - purge_at: 2000-01-23T04:56:07.000+00:00 - restore_url: restore_url - size_bytes: 0 + name: name + parent_id: parent_id + rank: 0.8008281904610115 + snippet: snippet + updated_at: 2000-01-23T04:56:07.000+00:00 + version_id: version_id properties: - deleted_at: - format: date-time + content_type: nullable: true type: string + drive_id: + pattern: "^drv_[a-f0-9]{16}$" + title: Drive Id + type: string id: + pattern: "^art_[a-f0-9]{16}$" title: Id type: string - path: - title: Path + name: + title: Name type: string - purge_at: - format: date-time + parent_id: nullable: true type: string - restore_url: - title: Restore Url + rank: + title: Rank + type: number + snippet: + description: "HTML-safe highlighted excerpt. The ONLY markup it may contain\ + \ is the server's own ... highlight pair; artifact content\ + \ is entity-escaped, so this may be rendered as HTML." + title: Snippet type: string - size_bytes: - title: Size Bytes - type: integer - required: - - id - - path - - restore_url - - size_bytes - title: TrashArtifactOut - TrashDriveOut: - example: - deleted_at: 2000-01-23T04:56:07.000+00:00 - id: id - properties: - deleted_at: + updated_at: format: date-time - nullable: true + title: Updated At type: string - id: - title: Id + version_id: + nullable: true type: string required: + - content_type + - drive_id - id - title: TrashDriveOut - TrashOut: - description: Trash collection with a compatibility-preserving pagination opt-in. + - name + - parent_id + - rank + - snippet + - updated_at + - version_id + title: SearchHitOut + SearchPageOut: example: - artifacts: - - deleted_at: 2000-01-23T04:56:07.000+00:00 - id: id - path: path - purge_at: 2000-01-23T04:56:07.000+00:00 - restore_url: restore_url - size_bytes: 0 - - deleted_at: 2000-01-23T04:56:07.000+00:00 - id: id - path: path - purge_at: 2000-01-23T04:56:07.000+00:00 - restore_url: restore_url - size_bytes: 0 - drive: - deleted_at: 2000-01-23T04:56:07.000+00:00 - id: id items: - - deleted_at: 2000-01-23T04:56:07.000+00:00 + - content_type: content_type + drive_id: drive_id id: id - path: path - purge_at: 2000-01-23T04:56:07.000+00:00 - restore_url: restore_url - size_bytes: 0 - - deleted_at: 2000-01-23T04:56:07.000+00:00 + name: name + parent_id: parent_id + rank: 0.8008281904610115 + snippet: snippet + updated_at: 2000-01-23T04:56:07.000+00:00 + version_id: version_id + - content_type: content_type + drive_id: drive_id id: id - path: path - purge_at: 2000-01-23T04:56:07.000+00:00 - restore_url: restore_url - size_bytes: 0 + name: name + parent_id: parent_id + rank: 0.8008281904610115 + snippet: snippet + updated_at: 2000-01-23T04:56:07.000+00:00 + version_id: version_id next_cursor: next_cursor properties: - artifacts: - deprecated: true - description: Deprecated alias of items. - items: - $ref: "#/components/schemas/TrashArtifactOut" - title: Artifacts - type: array - default: null - drive: - $ref: "#/components/schemas/TrashDriveOut" items: items: - $ref: "#/components/schemas/TrashArtifactOut" + $ref: "#/components/schemas/SearchHitOut" title: Items type: array default: null @@ -17506,297 +9717,150 @@ components: nullable: true type: string required: - - artifacts - - drive - items - title: TrashOut - UploadAbortOut: - description: |- - Response of `DELETE /v0/uploads/{upload_id}` — the session is released. - `released_bytes` is the reservation returned to the drive's quota (the - session's `size_bytes` for a live `initiated` session; `0` when the - session was already aborted or already expired — the GC sweep owns an - expired session's release). + - next_cursor + title: SearchPageOut + ShareCreateIn: + additionalProperties: false + description: "POST /v0/drives/{id}/shares body." example: - released_bytes: 0 - state: aborted - upload_id: upload_id + expires_at: 2000-01-23T04:56:07.000+00:00 + resource_id: resource_id + resource_type: artifact properties: - released_bytes: - title: Released Bytes - type: integer - state: - default: aborted - enum: - - aborted - - expired - title: State + expires_at: + format: date-time + nullable: true + type: string + resource_id: + minLength: 1 + title: Resource Id type: string - upload_id: - title: Upload Id + resource_type: + enum: + - artifact + - artifact_version + - folder + title: Resource Type type: string required: - - released_bytes - - upload_id - title: UploadAbortOut - UploadBeginIn: + - resource_id + - resource_type + title: ShareCreateIn + ShareCreateOut: description: |- - Body of `POST /v0/uploads` — the large-upload begin call (large-upload- - design.md §5.1). All artifact decisions are frozen here; the subsequent - GCS PUT carries only bytes, and `commit` carries only the `upload_id`. - - `labels`/`metadata`/`source` omitted (null) ⇒ preserve the existing - artifact's value at commit; present (incl. empty) ⇒ replace. + The create/rotate response — the ONLY response carrying the plaintext + secret. example: - actor_name: actor_name - change_summary: change_summary - content_type: application/octet-stream - cors_origin: cors_origin - crc32c: crc32c - if_match: 171976544 - if_none_match: false - labels: - - labels - - labels - metadata: - key: "" - path: path - size_bytes: 1 - source: "" + created_at: 2000-01-23T04:56:07.000+00:00 + created_by: created_by + drive_id: drive_id + expires_at: 2000-01-23T04:56:07.000+00:00 + id: id + resource_id: resource_id + resource_type: artifact + revision: revision + revoked_at: 2000-01-23T04:56:07.000+00:00 + rotated_at: 2000-01-23T04:56:07.000+00:00 + secret: secret + state: active properties: - actor_name: - maxLength: 64 - nullable: true + created_at: + format: date-time + title: Created At type: string - change_summary: + created_by: nullable: true type: string - content_type: - default: application/octet-stream - title: Content Type - type: string - cors_origin: - description: "Web origin (scheme://host[:port]) of the browser that will\ - \ PUT the bytes, e.g. `https://app.example.com`. Set this when the `upload_url`\ - \ is handed to browser code: GCS binds CORS at session initiate, so the\ - \ returned session only echoes `Access-Control-Allow-Origin` (and is thus\ - \ PUT-able from a browser) when opened with the caller's origin. A trusted\ - \ backend relaying a browser upload forwards the browser's `Origin` here.\ - \ Omit for server/desktop uploads (no CORS enforcement)." - nullable: true + drive_id: + pattern: "^drv_[a-f0-9]{16}$" + title: Drive Id type: string - crc32c: + expires_at: + format: date-time nullable: true type: string - if_match: - maximum: 2147483647 - minimum: 0.0 - nullable: true - type: integer - if_none_match: - default: false - title: If None Match - type: boolean - labels: - items: - type: string - nullable: true - type: array - default: null - metadata: - additionalProperties: true - nullable: true - type: object - path: - title: Path + id: + pattern: "^shr_[a-f0-9]{16}$" + title: Id type: string - size_bytes: - minimum: 1.0 - title: Size Bytes - type: integer - source: - allOf: - - $ref: "#/components/schemas/ArtifactSource" - nullable: true - required: - - path - - size_bytes - title: UploadBeginIn - UploadBeginOut: - description: |- - Response of `POST /v0/uploads`. PUT the bytes to `upload_url` (no auth - header — the URL is the credential), then `POST .../commit`. - example: - expires_at: 2000-01-23T04:56:07.000+00:00 - headers: - key: headers - max_bytes: 0 - method: PUT - upload_id: upload_id - upload_url: upload_url - properties: - expires_at: - format: date-time - title: Expires At + resource_id: + title: Resource Id type: string - headers: - additionalProperties: - type: string - title: Headers - max_bytes: - title: Max Bytes - type: integer - method: - default: PUT + resource_type: enum: - - PUT - title: Method - type: string - upload_id: - title: Upload Id + - artifact + - artifact_version + - folder + title: Resource Type type: string - upload_url: - title: Upload Url + revision: + pattern: "^rev_[a-f0-9]{16}$" + title: Revision type: string - required: - - expires_at - - headers - - max_bytes - - upload_id - - upload_url - title: UploadBeginOut - UploadStatusOut: - description: |- - Response of `GET /v0/uploads/{upload_id}` — the live state of a - direct-to-GCS upload session (large-upload-design.md §5). - - `state` is derived, not a stored column: - * `initiated` — session open; PUT the bytes to the `upload_url`, then - `POST /v0/uploads/{upload_id}/commit`. - * `committed` — the bytes landed and the artifact was created - (`committed_at` is set). - * `aborted` — released via `DELETE /v0/uploads/{upload_id}`. - * `expired` — past `expires_at` without a commit; the reservation is - reclaimed by the GC sweep. - example: - committed_at: 2000-01-23T04:56:07.000+00:00 - content_type: content_type - created_at: 2000-01-23T04:56:07.000+00:00 - expires_at: 2000-01-23T04:56:07.000+00:00 - max_bytes: 0 - path: path - size_bytes: 6 - state: initiated - upload_id: upload_id - properties: - committed_at: + revoked_at: format: date-time nullable: true type: string - content_type: - title: Content Type - type: string - created_at: - format: date-time - title: Created At - type: string - expires_at: + rotated_at: format: date-time - title: Expires At + nullable: true type: string - max_bytes: - title: Max Bytes - type: integer - path: - title: Path + secret: + description: Plaintext share secret. Present only on first execution of + a create or rotate; null on idempotent replay — rotate to obtain a new + secret. + nullable: true type: string - size_bytes: - title: Size Bytes - type: integer state: enum: - - initiated - - committed - - aborted - - expired + - active + - revoked title: State type: string - upload_id: - title: Upload Id - type: string required: - - content_type - created_at + - created_by + - drive_id - expires_at - - max_bytes - - path - - size_bytes + - id + - resource_id + - resource_type + - revision + - revoked_at + - rotated_at - state - - upload_id - title: UploadStatusOut - UsageCounterOut: - example: - limit: 5 - used: 2 - properties: - limit: - title: Limit - type: integer - used: - title: Used - type: integer - required: - - limit - - used - title: UsageCounterOut - UsagePeriodOut: - example: - ends: 2000-01-23T04:56:07.000+00:00 - starts: 2000-01-23T04:56:07.000+00:00 - year_month: year_month - properties: - ends: - format: date-time - title: Ends - type: string - starts: - format: date-time - title: Starts - type: string - year_month: - title: Year Month - type: string - required: - - ends - - starts - - year_month - title: UsagePeriodOut - UserTokenList: + title: ShareCreateOut + ShareListOut: example: items: - created_at: 2000-01-23T04:56:07.000+00:00 - default_drive_id: default_drive_id + created_by: created_by + drive_id: drive_id expires_at: 2000-01-23T04:56:07.000+00:00 id: id - label: label - last_used_at: 2000-01-23T04:56:07.000+00:00 - prefix: prefix + resource_id: resource_id + resource_type: artifact + revision: revision revoked_at: 2000-01-23T04:56:07.000+00:00 - scope: read + rotated_at: 2000-01-23T04:56:07.000+00:00 + state: active - created_at: 2000-01-23T04:56:07.000+00:00 - default_drive_id: default_drive_id + created_by: created_by + drive_id: drive_id expires_at: 2000-01-23T04:56:07.000+00:00 id: id - label: label - last_used_at: 2000-01-23T04:56:07.000+00:00 - prefix: prefix + resource_id: resource_id + resource_type: artifact + revision: revision revoked_at: 2000-01-23T04:56:07.000+00:00 - scope: read + rotated_at: 2000-01-23T04:56:07.000+00:00 + state: active next_cursor: next_cursor properties: items: items: - $ref: "#/components/schemas/UserTokenOut" + $ref: "#/components/schemas/ShareOut" title: Items type: array default: null @@ -17805,218 +9869,129 @@ components: type: string required: - items - title: UserTokenList - UserTokenOut: - description: |- - One `ad_user_` token — metadata only. The raw token is NEVER - exposed over the API (minting is web-only, reveal-once); this shape - omits both the raw value and the stored hash by construction. + - next_cursor + title: ShareListOut + ShareOut: example: created_at: 2000-01-23T04:56:07.000+00:00 - default_drive_id: default_drive_id + created_by: created_by + drive_id: drive_id expires_at: 2000-01-23T04:56:07.000+00:00 id: id - label: label - last_used_at: 2000-01-23T04:56:07.000+00:00 - prefix: prefix + resource_id: resource_id + resource_type: artifact + revision: revision revoked_at: 2000-01-23T04:56:07.000+00:00 - scope: read + rotated_at: 2000-01-23T04:56:07.000+00:00 + state: active properties: created_at: format: date-time title: Created At type: string - default_drive_id: + created_by: nullable: true type: string + drive_id: + pattern: "^drv_[a-f0-9]{16}$" + title: Drive Id + type: string expires_at: format: date-time nullable: true type: string id: + pattern: "^shr_[a-f0-9]{16}$" title: Id type: string - label: - nullable: true + resource_id: + title: Resource Id type: string - last_used_at: - format: date-time - nullable: true + resource_type: + enum: + - artifact + - artifact_version + - folder + title: Resource Type type: string - prefix: - title: Prefix + revision: + pattern: "^rev_[a-f0-9]{16}$" + title: Revision type: string revoked_at: format: date-time nullable: true type: string - scope: + rotated_at: + format: date-time + nullable: true + type: string + state: enum: - - read - - full - title: Scope + - active + - revoked + title: State type: string required: - created_at + - created_by + - drive_id + - expires_at - id - - prefix - - scope - title: UserTokenOut - ValidationErrorBody: - additionalProperties: true - example: - code: code - fields: - - ctx: - key: "" - input: "" - loc: - - "" - - "" - msg: msg - type: type - - ctx: - key: "" - input: "" - loc: - - "" - - "" - msg: msg - type: type - message: message + - resource_id + - resource_type + - revision + - revoked_at + - rotated_at + - state + title: ShareOut + V0ErrorEnvelope: properties: - code: - title: Code - type: string - fields: - items: - $ref: "#/components/schemas/ValidationIssue" - title: Fields - type: array - default: null - message: - title: Message - type: string + error: + $ref: "#/components/schemas/drives_create_400_response_error" required: - - code - - fields - - message - title: ValidationErrorBody - ValidationErrorDetail: - additionalProperties: true + - error + ValidationErrorResponse: example: error: code: code - fields: - - ctx: - key: "" - input: "" - loc: - - "" - - "" - msg: msg - type: type - - ctx: - key: "" - input: "" - loc: - - "" - - "" - msg: msg - type: type + details: + fields: + - location: location + reason: reason + - location: location + reason: reason message: message properties: error: - $ref: "#/components/schemas/ValidationErrorBody" + $ref: "#/components/schemas/ValidationErrorResponse_error" required: - error - title: ValidationErrorDetail - ValidationErrorResponse: - additionalProperties: true - description: The runtime `VALIDATION_ERROR` response for request parsing failures. - example: - detail: - error: - code: code - fields: - - ctx: - key: "" - input: "" - loc: - - "" - - "" - msg: msg - type: type - - ctx: - key: "" - input: "" - loc: - - "" - - "" - msg: msg - type: type - message: message - properties: - detail: - $ref: "#/components/schemas/ValidationErrorDetail" - required: - - detail - title: ValidationErrorResponse - ValidationIssue: - additionalProperties: {} - description: One Pydantic/FastAPI validation issue. - example: - ctx: - key: "" - input: "" - loc: - - "" - - "" - msg: msg - type: type - properties: - ctx: - additionalProperties: true - nullable: true - type: object - input: - title: Input - loc: - items: {} - title: Loc - type: array - default: null - msg: - title: Msg - type: string - type: - title: Type - type: string - required: - - loc - - msg - - type - title: ValidationIssue - VersionOut: + VersionCreatedOut: + description: |- + The append/restore response — a version plus the artifact's new + revision, which the version-creating 201 rotates. example: - actor_name: actor_name - art_id: art_id - change_summary: change_summary + artifact_id: artifact_id + artifact_revision: artifact_revision content_type: content_type created_at: 2000-01-23T04:56:07.000+00:00 + created_by: created_by hash: hash + id: id + parent_version_id: parent_version_id size_bytes: 0 - version_number: 6 + version_number: 1 properties: - actor_name: - maxLength: 64 - nullable: true + artifact_id: + pattern: "^art_[a-f0-9]{16}$" + title: Artifact Id type: string - art_id: - title: Art Id - type: string - change_summary: - nullable: true + artifact_revision: + description: The artifact's revision after this version became head — the + If-Match value for the next mutation. + pattern: "^rev_[a-f0-9]{16}$" + title: Artifact Revision type: string content_type: title: Content Type @@ -18025,44 +10000,61 @@ components: format: date-time title: Created At type: string + created_by: + nullable: true + type: string hash: title: Hash type: string + id: + pattern: "^ver_[a-f0-9]{16}$" + title: Id + type: string + parent_version_id: + nullable: true + type: string size_bytes: + minimum: 0.0 title: Size Bytes type: integer version_number: + minimum: 1.0 title: Version Number type: integer required: - - art_id + - artifact_id + - artifact_revision - content_type - created_at + - created_by - hash + - id + - parent_version_id - size_bytes - version_number - title: VersionOut - VersionPage: + title: VersionCreatedOut + VersionListOut: example: items: - - actor_name: actor_name - art_id: art_id - change_summary: change_summary + - artifact_id: artifact_id content_type: content_type created_at: 2000-01-23T04:56:07.000+00:00 + created_by: created_by hash: hash + id: id + parent_version_id: parent_version_id size_bytes: 0 - version_number: 6 - - actor_name: actor_name - art_id: art_id - change_summary: change_summary + version_number: 1 + - artifact_id: artifact_id content_type: content_type created_at: 2000-01-23T04:56:07.000+00:00 + created_by: created_by hash: hash + id: id + parent_version_id: parent_version_id size_bytes: 0 - version_number: 6 + version_number: 1 next_cursor: next_cursor - pruned_before: 1 properties: items: items: @@ -18073,165 +10065,214 @@ components: next_cursor: nullable: true type: string - pruned_before: - nullable: true - type: integer required: - items - title: VersionPage - VersionRetentionOut: + - next_cursor + title: VersionListOut + VersionOut: example: - versions_max: 1 + artifact_id: artifact_id + content_type: content_type + created_at: 2000-01-23T04:56:07.000+00:00 + created_by: created_by + hash: hash + id: id + parent_version_id: parent_version_id + size_bytes: 0 + version_number: 1 properties: - versions_max: - title: Versions Max + artifact_id: + pattern: "^art_[a-f0-9]{16}$" + title: Artifact Id + type: string + content_type: + title: Content Type + type: string + created_at: + format: date-time + title: Created At + type: string + created_by: + nullable: true + type: string + hash: + title: Hash + type: string + id: + pattern: "^ver_[a-f0-9]{16}$" + title: Id + type: string + parent_version_id: + nullable: true + type: string + size_bytes: + minimum: 0.0 + title: Size Bytes + type: integer + version_number: + minimum: 1.0 + title: Version Number type: integer required: - - versions_max - title: VersionRetentionOut - WorkspaceCreateIn: - description: |- - POST /v0/workspaces body. `name` is the user-facing workspace label; - the creator becomes its admin and gets a starter drive. + - artifact_id + - content_type + - created_at + - created_by + - hash + - id + - parent_version_id + - size_bytes + - version_number + title: VersionOut + drives_list_400_response_error: + additionalProperties: {} example: - name: name + code: code + details: "{}" + message: message properties: - name: - maxLength: 120 - minLength: 1 - title: Name + code: + description: Stable machine-readable error code (see the error-catalog). + type: string + details: + description: Error-code-specific context (optional). + type: object + message: + nullable: true type: string required: - - name - title: WorkspaceCreateIn - WorkspaceCreateOut: - description: |- - POST /v0/workspaces response. Carries the new workspace + its starter - drive's `ad_live_` key **once** (`starter_drive_api_key`) — reveal-once, - store it now (mint more keys via `POST /v0/drives/{id}/keys`). + - code + - message + drives_list_400_response: example: - starter_drive_api_key: starter_drive_api_key - starter_drive_id: starter_drive_id - workspace: - created_at: 2000-01-23T04:56:07.000+00:00 - id: id - name: name - role: admin - tier_id: tier_id + error: + code: code + details: "{}" + message: message properties: - starter_drive_api_key: - title: Starter Drive Api Key - type: string - starter_drive_id: - title: Starter Drive Id - type: string - workspace: - $ref: "#/components/schemas/WorkspaceOut" + error: + $ref: "#/components/schemas/drives_list_400_response_error" required: - - starter_drive_api_key - - starter_drive_id - - workspace - title: WorkspaceCreateOut - WorkspaceList: + - error + drives_create_400_response_error: + additionalProperties: true example: - items: - - created_at: 2000-01-23T04:56:07.000+00:00 - id: id - name: name - role: admin - tier_id: tier_id - - created_at: 2000-01-23T04:56:07.000+00:00 - id: id - name: name - role: admin - tier_id: tier_id - next_cursor: next_cursor + code: code + details: "{}" + message: message properties: - items: - items: - $ref: "#/components/schemas/WorkspaceOut" - title: Items - type: array - default: null - next_cursor: - nullable: true + code: + description: Stable machine-readable error code (see the error-catalog). + type: string + details: + description: Error-code-specific context (optional). + type: object + message: type: string required: - - items - title: WorkspaceList - WorkspaceOut: - description: |- - One workspace in a listing — metadata only. `role` is the CALLER's - role in it (admin/member), so a client can render management affordances - without a second round-trip. + - code + - message + drives_create_400_response: example: - created_at: 2000-01-23T04:56:07.000+00:00 - id: id - name: name - role: admin - tier_id: tier_id + error: + code: code + details: "{}" + message: message properties: - created_at: - format: date-time - title: Created At + error: + $ref: "#/components/schemas/drives_create_400_response_error" + required: + - error + artifacts_create_request: + properties: + content: + description: The artifact bytes. + format: binary type: string - id: - title: Id + content_type: + description: Declared media type. type: string + metadata: + description: Free-form JSON metadata. + type: object name: - title: Name + description: Artifact name. type: string - role: - enum: - - admin - - member - title: Role + parent_id: + description: Destination folder id (fld_*). type: string - tier_id: - title: Tier Id + sha256: + description: Optional content sha256 for verification. type: string required: - - created_at - - id + - content - name - - role - - tier_id - title: WorkspaceOut - WorkspaceRenameIn: - description: |- - PATCH /v0/workspaces/{org} body — rename a workspace the caller - administers. + - parent_id + versions_append_request: + properties: + content: + description: The artifact bytes. + format: binary + type: string + content_type: + description: Declared media type. + type: string + sha256: + description: Optional content sha256 for verification. + type: string + required: + - content + ValidationErrorResponse_error_details_fields_inner: example: - name: name + location: location + reason: reason properties: - name: - maxLength: 120 - minLength: 1 - title: Name + location: + type: string + reason: + type: string + ValidationErrorResponse_error_details: + example: + fields: + - location: location + reason: reason + - location: location + reason: reason + properties: + fields: + items: + $ref: "#/components/schemas/ValidationErrorResponse_error_details_fields_inner" + type: array + default: null + ValidationErrorResponse_error: + additionalProperties: true + example: + code: code + details: + fields: + - location: location + reason: reason + - location: location + reason: reason + message: message + properties: + code: + nullable: true + type: string + details: + $ref: "#/components/schemas/ValidationErrorResponse_error_details" + message: + nullable: true type: string required: - - name - title: WorkspaceRenameIn - register_agent_identity_agent_identity_post_422_response: - oneOf: - - $ref: "#/components/schemas/ValidationErrorResponse" - - $ref: "#/components/schemas/ErrorResponse" - authorize_decision_oauth2_authorize_post_403_response: - oneOf: - - $ref: "#/components/schemas/OAuthProtocolErrorOut" - - $ref: "#/components/schemas/ErrorResponse" - Response_Post_Query_V0_Query_Post: - anyOf: - - $ref: "#/components/schemas/QueryDryRunOut" - - $ref: "#/components/schemas/QueryResultOut" - title: Response Post Query V0 Query Post + - code + - message securitySchemes: - BearerAuth: - bearerFormat: ad_live_ | ad_user_ | JWT - description: "AgentDrive bearer credential. Data-plane operations accept an\ - \ `ad_live_` drive key, an `ad_user_` user token, or a supported short-lived\ - \ JWT access token. User-control-plane operations accept `ad_user_` tokens.\ - \ MCP `adat_` credentials are not valid on `/v0`." + bearerAuth: + bearerFormat: JWT + description: "Hub-issued bearer token. Scopes: drives:*, content:*, sharing:*,\ + \ changes:read, usage:read. See the OAuth-protected-resource discovery document\ + \ (RFC 9728)." scheme: bearer type: http x-agentdrive-compatibility-policy: 1 diff --git a/sdk/go/api_agent_auth.go b/sdk/go/api_agent_auth.go deleted file mode 100644 index 26a15ea..0000000 --- a/sdk/go/api_agent_auth.go +++ /dev/null @@ -1,968 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" -) - - -// AgentAuthAPIService AgentAuthAPI service -type AgentAuthAPIService service - -type ApiExtensionExchangeV0AuthExtensionExchangePostRequest struct { - ctx context.Context - ApiService *AgentAuthAPIService - extensionExchangeRequest *ExtensionExchangeRequest -} - -func (r ApiExtensionExchangeV0AuthExtensionExchangePostRequest) ExtensionExchangeRequest(extensionExchangeRequest ExtensionExchangeRequest) ApiExtensionExchangeV0AuthExtensionExchangePostRequest { - r.extensionExchangeRequest = &extensionExchangeRequest - return r -} - -func (r ApiExtensionExchangeV0AuthExtensionExchangePostRequest) Execute() (*ExtensionExchangeResponse, *http.Response, error) { - return r.ApiService.ExtensionExchangeV0AuthExtensionExchangePostExecute(r) -} - -/* -ExtensionExchangeV0AuthExtensionExchangePost Redeem an extension OAuth ticket for a JWT pair - -Single-use opaque ticket → JWT pair. Called once by an extension's auth-complete.html after the OAuth handoff lands. Returns a 15-minute `access_token` (scope=extension) and a 90-day `identity_assertion` the extension stores and refreshes via POST /oauth2/token. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiExtensionExchangeV0AuthExtensionExchangePostRequest -*/ -func (a *AgentAuthAPIService) ExtensionExchangeV0AuthExtensionExchangePost(ctx context.Context) ApiExtensionExchangeV0AuthExtensionExchangePostRequest { - return ApiExtensionExchangeV0AuthExtensionExchangePostRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return ExtensionExchangeResponse -func (a *AgentAuthAPIService) ExtensionExchangeV0AuthExtensionExchangePostExecute(r ApiExtensionExchangeV0AuthExtensionExchangePostRequest) (*ExtensionExchangeResponse, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ExtensionExchangeResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AgentAuthAPIService.ExtensionExchangeV0AuthExtensionExchangePost") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/auth/extension/exchange" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.extensionExchangeRequest == nil { - return localVarReturnValue, nil, reportError("extensionExchangeRequest is required and must be specified") - } - - // 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{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.extensionExchangeRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 503 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiInitiateClaimAgentIdentityClaimPostRequest struct { - ctx context.Context - ApiService *AgentAuthAPIService - claimInitRequest *ClaimInitRequest -} - -func (r ApiInitiateClaimAgentIdentityClaimPostRequest) ClaimInitRequest(claimInitRequest ClaimInitRequest) ApiInitiateClaimAgentIdentityClaimPostRequest { - r.claimInitRequest = &claimInitRequest - return r -} - -func (r ApiInitiateClaimAgentIdentityClaimPostRequest) Execute() (*ClaimInitResponse, *http.Response, error) { - return r.ApiService.InitiateClaimAgentIdentityClaimPostExecute(r) -} - -/* -InitiateClaimAgentIdentityClaimPost Initiate the human-claim ceremony for an agent identity - -Returns a `user_code` and `verification_uri` (RFC 8628 device-code idiom). The agent surfaces these to the human, who visits the URI, signs in, and approves the claim. The agent then polls POST /oauth2/token (grant_type=claim) with the same `claim_token` to learn when the claim completes. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiInitiateClaimAgentIdentityClaimPostRequest -*/ -func (a *AgentAuthAPIService) InitiateClaimAgentIdentityClaimPost(ctx context.Context) ApiInitiateClaimAgentIdentityClaimPostRequest { - return ApiInitiateClaimAgentIdentityClaimPostRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return ClaimInitResponse -func (a *AgentAuthAPIService) InitiateClaimAgentIdentityClaimPostExecute(r ApiInitiateClaimAgentIdentityClaimPostRequest) (*ClaimInitResponse, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ClaimInitResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AgentAuthAPIService.InitiateClaimAgentIdentityClaimPost") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/agent/identity/claim" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.claimInitRequest == nil { - return localVarReturnValue, nil, reportError("claimInitRequest is required and must be specified") - } - - // 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{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.claimInitRequest - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiJwksWellKnownJwksJsonGetRequest struct { - ctx context.Context - ApiService *AgentAuthAPIService -} - -func (r ApiJwksWellKnownJwksJsonGetRequest) Execute() (*JwksOut, *http.Response, error) { - return r.ApiService.JwksWellKnownJwksJsonGetExecute(r) -} - -/* -JwksWellKnownJwksJsonGet JSON Web Key Set — public keys for verifying AgentDrive JWTs - -Public half of the RSA signing key for identity_assertion + access_token JWTs issued by AgentDrive. RFC 7517 shape. Cache-friendly; key rotation publishes both kids during the overlap window. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiJwksWellKnownJwksJsonGetRequest -*/ -func (a *AgentAuthAPIService) JwksWellKnownJwksJsonGet(ctx context.Context) ApiJwksWellKnownJwksJsonGetRequest { - return ApiJwksWellKnownJwksJsonGetRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return JwksOut -func (a *AgentAuthAPIService) JwksWellKnownJwksJsonGetExecute(r ApiJwksWellKnownJwksJsonGetRequest) (*JwksOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *JwksOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AgentAuthAPIService.JwksWellKnownJwksJsonGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/.well-known/jwks.json" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiOauth2TokenOauth2TokenPostRequest struct { - ctx context.Context - ApiService *AgentAuthAPIService - grantType *string - assertion *string - claimToken *string -} - -func (r ApiOauth2TokenOauth2TokenPostRequest) GrantType(grantType string) ApiOauth2TokenOauth2TokenPostRequest { - r.grantType = &grantType - return r -} - -func (r ApiOauth2TokenOauth2TokenPostRequest) Assertion(assertion string) ApiOauth2TokenOauth2TokenPostRequest { - r.assertion = &assertion - return r -} - -func (r ApiOauth2TokenOauth2TokenPostRequest) ClaimToken(claimToken string) ApiOauth2TokenOauth2TokenPostRequest { - r.claimToken = &claimToken - return r -} - -func (r ApiOauth2TokenOauth2TokenPostRequest) Execute() (*TokenResponse, *http.Response, error) { - return r.ApiService.Oauth2TokenOauth2TokenPostExecute(r) -} - -/* -Oauth2TokenOauth2TokenPost Exchange a credential for an access_token - -Two grant types: - -**`urn:ietf:params:oauth:grant-type:jwt-bearer`** (RFC 7523) — body `assertion=`. Returns a fresh 15-minute access_token with the same scope as the assertion. - -**`claim`** (custom) — body `claim_token=`. Polling endpoint for the claim ceremony. Returns one of: `authorization_pending` (400), `expired_token` (400), `access_denied` (400), or access_token + new identity_assertion + scope=full (200). - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOauth2TokenOauth2TokenPostRequest -*/ -func (a *AgentAuthAPIService) Oauth2TokenOauth2TokenPost(ctx context.Context) ApiOauth2TokenOauth2TokenPostRequest { - return ApiOauth2TokenOauth2TokenPostRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return TokenResponse -func (a *AgentAuthAPIService) Oauth2TokenOauth2TokenPostExecute(r ApiOauth2TokenOauth2TokenPostRequest) (*TokenResponse, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *TokenResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AgentAuthAPIService.Oauth2TokenOauth2TokenPost") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/oauth2/token" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.grantType == nil { - return localVarReturnValue, nil, reportError("grantType is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} - - // 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 r.assertion != nil { - parameterAddToHeaderOrQuery(localVarFormParams, "assertion", r.assertion, "", "") - } - if r.claimToken != nil { - parameterAddToHeaderOrQuery(localVarFormParams, "claim_token", r.claimToken, "", "") - } - parameterAddToHeaderOrQuery(localVarFormParams, "grant_type", r.grantType, "", "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiOauthAuthorizationServerWellKnownOauthAuthorizationServerGetRequest struct { - ctx context.Context - ApiService *AgentAuthAPIService -} - -func (r ApiOauthAuthorizationServerWellKnownOauthAuthorizationServerGetRequest) Execute() (*AuthorizationServerMetadataOut, *http.Response, error) { - return r.ApiService.OauthAuthorizationServerWellKnownOauthAuthorizationServerGetExecute(r) -} - -/* -OauthAuthorizationServerWellKnownOauthAuthorizationServerGet Authorization-server metadata (RFC 8414 + auth.md agent_auth block) - -Discovery document for the auth.md protocol. Carries the standard RFC 8414 fields plus an `agent_auth` block per the auth.md spec — the latter is what an agent runtime keys off to find the identity + claim endpoints. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOauthAuthorizationServerWellKnownOauthAuthorizationServerGetRequest -*/ -func (a *AgentAuthAPIService) OauthAuthorizationServerWellKnownOauthAuthorizationServerGet(ctx context.Context) ApiOauthAuthorizationServerWellKnownOauthAuthorizationServerGetRequest { - return ApiOauthAuthorizationServerWellKnownOauthAuthorizationServerGetRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return AuthorizationServerMetadataOut -func (a *AgentAuthAPIService) OauthAuthorizationServerWellKnownOauthAuthorizationServerGetExecute(r ApiOauthAuthorizationServerWellKnownOauthAuthorizationServerGetRequest) (*AuthorizationServerMetadataOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *AuthorizationServerMetadataOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AgentAuthAPIService.OauthAuthorizationServerWellKnownOauthAuthorizationServerGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/.well-known/oauth-authorization-server" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiOauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGetRequest struct { - ctx context.Context - ApiService *AgentAuthAPIService -} - -func (r ApiOauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGetRequest) Execute() (*ProtectedResourceMetadataOut, *http.Response, error) { - return r.ApiService.OauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGetExecute(r) -} - -/* -OauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGet Protected-resource metadata for the MCP endpoint (RFC 9728 §3.1) - -Path-inserted variant of the protected-resource document. MCP clients derive this URL from the resource URL `{origin}/mcp` (RFC 9728 §3.1: insert the well-known segment between host and path) after reading the WWW-Authenticate challenge on a 401 — it is the first hop of the client-side OAuth flow. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGetRequest -*/ -func (a *AgentAuthAPIService) OauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGet(ctx context.Context) ApiOauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGetRequest { - return ApiOauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGetRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return ProtectedResourceMetadataOut -func (a *AgentAuthAPIService) OauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGetExecute(r ApiOauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGetRequest) (*ProtectedResourceMetadataOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ProtectedResourceMetadataOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AgentAuthAPIService.OauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/.well-known/oauth-protected-resource/mcp" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiOauthProtectedResourceWellKnownOauthProtectedResourceGetRequest struct { - ctx context.Context - ApiService *AgentAuthAPIService -} - -func (r ApiOauthProtectedResourceWellKnownOauthProtectedResourceGetRequest) Execute() (*ProtectedResourceMetadataOut, *http.Response, error) { - return r.ApiService.OauthProtectedResourceWellKnownOauthProtectedResourceGetExecute(r) -} - -/* -OauthProtectedResourceWellKnownOauthProtectedResourceGet Protected-resource metadata (auth.md / RFC 9728-like discovery) - -Names this server as a protected resource and points clients at the authorization server they should obtain tokens from. In this design the resource server and authorization server are the same host. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOauthProtectedResourceWellKnownOauthProtectedResourceGetRequest -*/ -func (a *AgentAuthAPIService) OauthProtectedResourceWellKnownOauthProtectedResourceGet(ctx context.Context) ApiOauthProtectedResourceWellKnownOauthProtectedResourceGetRequest { - return ApiOauthProtectedResourceWellKnownOauthProtectedResourceGetRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return ProtectedResourceMetadataOut -func (a *AgentAuthAPIService) OauthProtectedResourceWellKnownOauthProtectedResourceGetExecute(r ApiOauthProtectedResourceWellKnownOauthProtectedResourceGetRequest) (*ProtectedResourceMetadataOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ProtectedResourceMetadataOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AgentAuthAPIService.OauthProtectedResourceWellKnownOauthProtectedResourceGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/.well-known/oauth-protected-resource" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRegisterAgentIdentityAgentIdentityPostRequest struct { - ctx context.Context - ApiService *AgentAuthAPIService - requestBody *map[string]*interface{} -} - -func (r ApiRegisterAgentIdentityAgentIdentityPostRequest) RequestBody(requestBody map[string]*interface{}) ApiRegisterAgentIdentityAgentIdentityPostRequest { - r.requestBody = &requestBody - return r -} - -func (r ApiRegisterAgentIdentityAgentIdentityPostRequest) Execute() (*AnonymousIdentityResponse, *http.Response, error) { - return r.ApiService.RegisterAgentIdentityAgentIdentityPostExecute(r) -} - -/* -RegisterAgentIdentityAgentIdentityPost Register an agent identity (anonymous or ID-JAG) - -Two registration modes: - -**`type=anonymous`** — Provisions a brand-new agent identity bound to a fresh shadow-org drive. No human involved; returned `identity_assertion` carries `scope=pre_claim`. A human completes the claim ceremony later via /claim. - -**`type=identity_assertion`** — Agent provider (e.g. WorkOS) has already minted an ID-JAG asserting a user identity binding. We verify it against the provider's JWKS and provision a **claimed** identity immediately: scope=full, drive bound to the user, no claim ceremony needed. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiRegisterAgentIdentityAgentIdentityPostRequest -*/ -func (a *AgentAuthAPIService) RegisterAgentIdentityAgentIdentityPost(ctx context.Context) ApiRegisterAgentIdentityAgentIdentityPostRequest { - return ApiRegisterAgentIdentityAgentIdentityPostRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return AnonymousIdentityResponse -func (a *AgentAuthAPIService) RegisterAgentIdentityAgentIdentityPostExecute(r ApiRegisterAgentIdentityAgentIdentityPostRequest) (*AnonymousIdentityResponse, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *AnonymousIdentityResponse - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AgentAuthAPIService.RegisterAgentIdentityAgentIdentityPost") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/agent/identity" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.requestBody == nil { - return localVarReturnValue, nil, reportError("requestBody is required and must be specified") - } - - // 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{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.requestBody - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 422 { - var v RegisterAgentIdentityAgentIdentityPost422Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 503 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/sdk/go/api_artifacts.go b/sdk/go/api_artifacts.go new file mode 100644 index 0000000..16b326b --- /dev/null +++ b/sdk/go/api_artifacts.go @@ -0,0 +1,2023 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "os" + "time" +) + + +// ArtifactsAPIService ArtifactsAPI service +type ArtifactsAPIService service + +type ApiArtifactsContentRequest struct { + ctx context.Context + ApiService *ArtifactsAPIService + driveId string + artifactId string + ifNoneMatch *string + authorization *string +} + +func (r ApiArtifactsContentRequest) IfNoneMatch(ifNoneMatch string) ApiArtifactsContentRequest { + r.ifNoneMatch = &ifNoneMatch + return r +} + +func (r ApiArtifactsContentRequest) Authorization(authorization string) ApiArtifactsContentRequest { + r.authorization = &authorization + return r +} + +func (r ApiArtifactsContentRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.ArtifactsContentExecute(r) +} + +/* +ArtifactsContent Read Artifact Content + +Download the head version's bytes — stream or 307 signed URL. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @param artifactId + @return ApiArtifactsContentRequest +*/ +func (a *ArtifactsAPIService) ArtifactsContent(ctx context.Context, driveId string, artifactId string) ApiArtifactsContentRequest { + return ApiArtifactsContentRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + artifactId: artifactId, + } +} + +// Execute executes the request +// @return *os.File +func (a *ArtifactsAPIService) ArtifactsContentExecute(r ApiArtifactsContentRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ArtifactsAPIService.ArtifactsContent") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/artifacts/{artifact_id}/content" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"artifact_id"+"}", url.PathEscape(parameterValueToString(r.artifactId, "artifactId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // 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/octet-stream", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ifNoneMatch != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "If-None-Match", r.ifNoneMatch, "simple", "") + } + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiArtifactsCopyRequest struct { + ctx context.Context + ApiService *ArtifactsAPIService + driveId string + artifactId string + idempotencyKey *string + artifactCopyIn *ArtifactCopyIn + ifMatch *string + authorization *string +} + +func (r ApiArtifactsCopyRequest) IdempotencyKey(idempotencyKey string) ApiArtifactsCopyRequest { + r.idempotencyKey = &idempotencyKey + return r +} + +func (r ApiArtifactsCopyRequest) ArtifactCopyIn(artifactCopyIn ArtifactCopyIn) ApiArtifactsCopyRequest { + r.artifactCopyIn = &artifactCopyIn + return r +} + +func (r ApiArtifactsCopyRequest) IfMatch(ifMatch string) ApiArtifactsCopyRequest { + r.ifMatch = &ifMatch + return r +} + +func (r ApiArtifactsCopyRequest) Authorization(authorization string) ApiArtifactsCopyRequest { + r.authorization = &authorization + return r +} + +func (r ApiArtifactsCopyRequest) Execute() (*ArtifactOut, *http.Response, error) { + return r.ApiService.ArtifactsCopyExecute(r) +} + +/* +ArtifactsCopy Copy Artifact + +Copy one artifact within the same drive. + +Cross-drive copy is out of v0 scope and rejected (400 INVALID_ARGUMENT). +``destination_drive_id`` must equal the source drive when present. +Materializes the artifact + its selected version synchronously → 201. +``If-Match`` is optional; when present it is validated against the source +revision (412 stale). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @param artifactId + @return ApiArtifactsCopyRequest +*/ +func (a *ArtifactsAPIService) ArtifactsCopy(ctx context.Context, driveId string, artifactId string) ApiArtifactsCopyRequest { + return ApiArtifactsCopyRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + artifactId: artifactId, + } +} + +// Execute executes the request +// @return ArtifactOut +func (a *ArtifactsAPIService) ArtifactsCopyExecute(r ApiArtifactsCopyRequest) (*ArtifactOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ArtifactOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ArtifactsAPIService.ArtifactsCopy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/artifacts/{artifact_id}/copy" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"artifact_id"+"}", url.PathEscape(parameterValueToString(r.artifactId, "artifactId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.idempotencyKey == nil { + return localVarReturnValue, nil, reportError("idempotencyKey is required and must be specified") + } + if r.artifactCopyIn == nil { + return localVarReturnValue, nil, reportError("artifactCopyIn is required and must be specified") + } + + // 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{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "Idempotency-Key", r.idempotencyKey, "simple", "") + if r.ifMatch != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Match", r.ifMatch, "simple", "") + } + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + // body params + localVarPostBody = r.artifactCopyIn + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 412 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 428 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiArtifactsCreateRequest struct { + ctx context.Context + ApiService *ArtifactsAPIService + driveId string + idempotencyKey *string + content *os.File + name *string + parentId *string + authorization *string + contentType *string + metadata *map[string]interface{} + sha256 *string +} + +func (r ApiArtifactsCreateRequest) IdempotencyKey(idempotencyKey string) ApiArtifactsCreateRequest { + r.idempotencyKey = &idempotencyKey + return r +} + +// The artifact bytes. +func (r ApiArtifactsCreateRequest) Content(content *os.File) ApiArtifactsCreateRequest { + r.content = content + return r +} + +// Artifact name. +func (r ApiArtifactsCreateRequest) Name(name string) ApiArtifactsCreateRequest { + r.name = &name + return r +} + +// Destination folder id (fld_*). +func (r ApiArtifactsCreateRequest) ParentId(parentId string) ApiArtifactsCreateRequest { + r.parentId = &parentId + return r +} + +func (r ApiArtifactsCreateRequest) Authorization(authorization string) ApiArtifactsCreateRequest { + r.authorization = &authorization + return r +} + +// Declared media type. +func (r ApiArtifactsCreateRequest) ContentType(contentType string) ApiArtifactsCreateRequest { + r.contentType = &contentType + return r +} + +// Free-form JSON metadata. +func (r ApiArtifactsCreateRequest) Metadata(metadata map[string]interface{}) ApiArtifactsCreateRequest { + r.metadata = &metadata + return r +} + +// Optional content sha256 for verification. +func (r ApiArtifactsCreateRequest) Sha256(sha256 string) ApiArtifactsCreateRequest { + r.sha256 = &sha256 + return r +} + +func (r ApiArtifactsCreateRequest) Execute() (*ArtifactOut, *http.Response, error) { + return r.ApiService.ArtifactsCreateExecute(r) +} + +/* +ArtifactsCreate Create Artifact + +Create one artifact with inline content — multipart only. + +Multipart only (415 for a JSON body). Parts: parent_id, name, metadata, content (bytes), content_type, sha256. parent_id, name, and content are required. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @return ApiArtifactsCreateRequest +*/ +func (a *ArtifactsAPIService) ArtifactsCreate(ctx context.Context, driveId string) ApiArtifactsCreateRequest { + return ApiArtifactsCreateRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + } +} + +// Execute executes the request +// @return ArtifactOut +func (a *ArtifactsAPIService) ArtifactsCreateExecute(r ApiArtifactsCreateRequest) (*ArtifactOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ArtifactOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ArtifactsAPIService.ArtifactsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/artifacts" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.idempotencyKey == nil { + return localVarReturnValue, nil, reportError("idempotencyKey is required and must be specified") + } + if r.content == nil { + return localVarReturnValue, nil, reportError("content is required and must be specified") + } + if r.name == nil { + return localVarReturnValue, nil, reportError("name is required and must be specified") + } + if r.parentId == nil { + return localVarReturnValue, nil, reportError("parentId is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data"} + + // 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 + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "Idempotency-Key", r.idempotencyKey, "simple", "") + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + var contentLocalVarFormFileName string + var contentLocalVarFileName string + var contentLocalVarFileBytes []byte + + contentLocalVarFormFileName = "content" + contentLocalVarFile := r.content + + if contentLocalVarFile != nil { + fbs, _ := io.ReadAll(contentLocalVarFile) + + contentLocalVarFileBytes = fbs + contentLocalVarFileName = contentLocalVarFile.Name() + contentLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: contentLocalVarFileBytes, fileName: contentLocalVarFileName, formFileName: contentLocalVarFormFileName}) + } + if r.contentType != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "content_type", r.contentType, "", "") + } + if r.metadata != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "metadata", r.metadata, "", "") + } + parameterAddToHeaderOrQuery(localVarFormParams, "name", r.name, "", "") + parameterAddToHeaderOrQuery(localVarFormParams, "parent_id", r.parentId, "", "") + if r.sha256 != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "sha256", r.sha256, "", "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 412 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 428 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiArtifactsDeleteRequest struct { + ctx context.Context + ApiService *ArtifactsAPIService + driveId string + artifactId string + idempotencyKey *string + ifMatch *string + authorization *string +} + +func (r ApiArtifactsDeleteRequest) IdempotencyKey(idempotencyKey string) ApiArtifactsDeleteRequest { + r.idempotencyKey = &idempotencyKey + return r +} + +func (r ApiArtifactsDeleteRequest) IfMatch(ifMatch string) ApiArtifactsDeleteRequest { + r.ifMatch = &ifMatch + return r +} + +func (r ApiArtifactsDeleteRequest) Authorization(authorization string) ApiArtifactsDeleteRequest { + r.authorization = &authorization + return r +} + +func (r ApiArtifactsDeleteRequest) Execute() (*ArtifactOut, *http.Response, error) { + return r.ApiService.ArtifactsDeleteExecute(r) +} + +/* +ArtifactsDelete Delete Artifact + +Soft-delete one artifact (its versions stay). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @param artifactId + @return ApiArtifactsDeleteRequest +*/ +func (a *ArtifactsAPIService) ArtifactsDelete(ctx context.Context, driveId string, artifactId string) ApiArtifactsDeleteRequest { + return ApiArtifactsDeleteRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + artifactId: artifactId, + } +} + +// Execute executes the request +// @return ArtifactOut +func (a *ArtifactsAPIService) ArtifactsDeleteExecute(r ApiArtifactsDeleteRequest) (*ArtifactOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ArtifactOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ArtifactsAPIService.ArtifactsDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/artifacts/{artifact_id}" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"artifact_id"+"}", url.PathEscape(parameterValueToString(r.artifactId, "artifactId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.idempotencyKey == nil { + return localVarReturnValue, nil, reportError("idempotencyKey is required and must be specified") + } + if r.ifMatch == nil { + return localVarReturnValue, nil, reportError("ifMatch is required and must be specified") + } + + // 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 + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "Idempotency-Key", r.idempotencyKey, "simple", "") + parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Match", r.ifMatch, "simple", "") + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 412 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 428 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiArtifactsListRequest struct { + ctx context.Context + ApiService *ArtifactsAPIService + driveId string + lifecycle *string + limit *int32 + cursor *string + parentId *string + name *string + contentType *string + label *string + updatedAfter *time.Time + updatedBefore *time.Time + authorization *string +} + +func (r ApiArtifactsListRequest) Lifecycle(lifecycle string) ApiArtifactsListRequest { + r.lifecycle = &lifecycle + return r +} + +func (r ApiArtifactsListRequest) Limit(limit int32) ApiArtifactsListRequest { + r.limit = &limit + return r +} + +func (r ApiArtifactsListRequest) Cursor(cursor string) ApiArtifactsListRequest { + r.cursor = &cursor + return r +} + +func (r ApiArtifactsListRequest) ParentId(parentId string) ApiArtifactsListRequest { + r.parentId = &parentId + return r +} + +func (r ApiArtifactsListRequest) Name(name string) ApiArtifactsListRequest { + r.name = &name + return r +} + +func (r ApiArtifactsListRequest) ContentType(contentType string) ApiArtifactsListRequest { + r.contentType = &contentType + return r +} + +func (r ApiArtifactsListRequest) Label(label string) ApiArtifactsListRequest { + r.label = &label + return r +} + +func (r ApiArtifactsListRequest) UpdatedAfter(updatedAfter time.Time) ApiArtifactsListRequest { + r.updatedAfter = &updatedAfter + return r +} + +func (r ApiArtifactsListRequest) UpdatedBefore(updatedBefore time.Time) ApiArtifactsListRequest { + r.updatedBefore = &updatedBefore + return r +} + +func (r ApiArtifactsListRequest) Authorization(authorization string) ApiArtifactsListRequest { + r.authorization = &authorization + return r +} + +func (r ApiArtifactsListRequest) Execute() (*ArtifactListOut, *http.Response, error) { + return r.ApiService.ArtifactsListExecute(r) +} + +/* +ArtifactsList List Artifacts + +List the drive's artifacts, newest-first (keyset paginated). + +``lifecycle`` (active|deleted|all) exposes soft-deleted artifacts. +``parent_id`` / ``name`` / ``content_type`` / ``label`` are exact-match +filters; ``updated_after`` / ``updated_before`` are inclusive bounds. +Unknown query parameters are rejected. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @return ApiArtifactsListRequest +*/ +func (a *ArtifactsAPIService) ArtifactsList(ctx context.Context, driveId string) ApiArtifactsListRequest { + return ApiArtifactsListRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + } +} + +// Execute executes the request +// @return ArtifactListOut +func (a *ArtifactsAPIService) ArtifactsListExecute(r ApiArtifactsListRequest) (*ArtifactListOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ArtifactListOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ArtifactsAPIService.ArtifactsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/artifacts" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.lifecycle != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "lifecycle", r.lifecycle, "form", "") + } else { + var defaultValue string = "active" + parameterAddToHeaderOrQuery(localVarQueryParams, "lifecycle", defaultValue, "form", "") + r.lifecycle = &defaultValue + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") + } + if r.parentId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "parent_id", r.parentId, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + if r.contentType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content_type", r.contentType, "form", "") + } + if r.label != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "label", r.label, "form", "") + } + if r.updatedAfter != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "updated_after", r.updatedAfter, "form", "") + } + if r.updatedBefore != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "updated_before", r.updatedBefore, "form", "") + } + // 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 r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiArtifactsReadRequest struct { + ctx context.Context + ApiService *ArtifactsAPIService + driveId string + artifactId string + ifNoneMatch *string + authorization *string +} + +func (r ApiArtifactsReadRequest) IfNoneMatch(ifNoneMatch string) ApiArtifactsReadRequest { + r.ifNoneMatch = &ifNoneMatch + return r +} + +func (r ApiArtifactsReadRequest) Authorization(authorization string) ApiArtifactsReadRequest { + r.authorization = &authorization + return r +} + +func (r ApiArtifactsReadRequest) Execute() (*ArtifactOut, *http.Response, error) { + return r.ApiService.ArtifactsReadExecute(r) +} + +/* +ArtifactsRead Read Artifact + +Read one active artifact. ``If-None-Match`` short-circuits to 304. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @param artifactId + @return ApiArtifactsReadRequest +*/ +func (a *ArtifactsAPIService) ArtifactsRead(ctx context.Context, driveId string, artifactId string) ApiArtifactsReadRequest { + return ApiArtifactsReadRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + artifactId: artifactId, + } +} + +// Execute executes the request +// @return ArtifactOut +func (a *ArtifactsAPIService) ArtifactsReadExecute(r ApiArtifactsReadRequest) (*ArtifactOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ArtifactOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ArtifactsAPIService.ArtifactsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/artifacts/{artifact_id}" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"artifact_id"+"}", url.PathEscape(parameterValueToString(r.artifactId, "artifactId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // 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 r.ifNoneMatch != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "If-None-Match", r.ifNoneMatch, "simple", "") + } + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiArtifactsRestoreRequest struct { + ctx context.Context + ApiService *ArtifactsAPIService + driveId string + artifactId string + idempotencyKey *string + ifMatch *string + authorization *string +} + +func (r ApiArtifactsRestoreRequest) IdempotencyKey(idempotencyKey string) ApiArtifactsRestoreRequest { + r.idempotencyKey = &idempotencyKey + return r +} + +func (r ApiArtifactsRestoreRequest) IfMatch(ifMatch string) ApiArtifactsRestoreRequest { + r.ifMatch = &ifMatch + return r +} + +func (r ApiArtifactsRestoreRequest) Authorization(authorization string) ApiArtifactsRestoreRequest { + r.authorization = &authorization + return r +} + +func (r ApiArtifactsRestoreRequest) Execute() (*ArtifactOut, *http.Response, error) { + return r.ApiService.ArtifactsRestoreExecute(r) +} + +/* +ArtifactsRestore Restore Artifact + +Restore a soft-deleted artifact atomically. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @param artifactId + @return ApiArtifactsRestoreRequest +*/ +func (a *ArtifactsAPIService) ArtifactsRestore(ctx context.Context, driveId string, artifactId string) ApiArtifactsRestoreRequest { + return ApiArtifactsRestoreRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + artifactId: artifactId, + } +} + +// Execute executes the request +// @return ArtifactOut +func (a *ArtifactsAPIService) ArtifactsRestoreExecute(r ApiArtifactsRestoreRequest) (*ArtifactOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ArtifactOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ArtifactsAPIService.ArtifactsRestore") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/artifacts/{artifact_id}/restore" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"artifact_id"+"}", url.PathEscape(parameterValueToString(r.artifactId, "artifactId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.idempotencyKey == nil { + return localVarReturnValue, nil, reportError("idempotencyKey is required and must be specified") + } + if r.ifMatch == nil { + return localVarReturnValue, nil, reportError("ifMatch is required and must be specified") + } + + // 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 + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "Idempotency-Key", r.idempotencyKey, "simple", "") + parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Match", r.ifMatch, "simple", "") + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 412 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 428 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiArtifactsUpdateRequest struct { + ctx context.Context + ApiService *ArtifactsAPIService + driveId string + artifactId string + idempotencyKey *string + ifMatch *string + artifactUpdateIn *ArtifactUpdateIn + authorization *string +} + +func (r ApiArtifactsUpdateRequest) IdempotencyKey(idempotencyKey string) ApiArtifactsUpdateRequest { + r.idempotencyKey = &idempotencyKey + return r +} + +func (r ApiArtifactsUpdateRequest) IfMatch(ifMatch string) ApiArtifactsUpdateRequest { + r.ifMatch = &ifMatch + return r +} + +func (r ApiArtifactsUpdateRequest) ArtifactUpdateIn(artifactUpdateIn ArtifactUpdateIn) ApiArtifactsUpdateRequest { + r.artifactUpdateIn = &artifactUpdateIn + return r +} + +func (r ApiArtifactsUpdateRequest) Authorization(authorization string) ApiArtifactsUpdateRequest { + r.authorization = &authorization + return r +} + +func (r ApiArtifactsUpdateRequest) Execute() (*ArtifactOut, *http.Response, error) { + return r.ApiService.ArtifactsUpdateExecute(r) +} + +/* +ArtifactsUpdate Update Artifact + +Rename / move / set metadata or labels. At least one field required. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @param artifactId + @return ApiArtifactsUpdateRequest +*/ +func (a *ArtifactsAPIService) ArtifactsUpdate(ctx context.Context, driveId string, artifactId string) ApiArtifactsUpdateRequest { + return ApiArtifactsUpdateRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + artifactId: artifactId, + } +} + +// Execute executes the request +// @return ArtifactOut +func (a *ArtifactsAPIService) ArtifactsUpdateExecute(r ApiArtifactsUpdateRequest) (*ArtifactOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ArtifactOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ArtifactsAPIService.ArtifactsUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/artifacts/{artifact_id}" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"artifact_id"+"}", url.PathEscape(parameterValueToString(r.artifactId, "artifactId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.idempotencyKey == nil { + return localVarReturnValue, nil, reportError("idempotencyKey is required and must be specified") + } + if r.ifMatch == nil { + return localVarReturnValue, nil, reportError("ifMatch is required and must be specified") + } + if r.artifactUpdateIn == nil { + return localVarReturnValue, nil, reportError("artifactUpdateIn is required and must be specified") + } + + // 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{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "Idempotency-Key", r.idempotencyKey, "simple", "") + parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Match", r.ifMatch, "simple", "") + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + // body params + localVarPostBody = r.artifactUpdateIn + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 412 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 428 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/sdk/go/api_changes.go b/sdk/go/api_changes.go new file mode 100644 index 0000000..0b107f0 --- /dev/null +++ b/sdk/go/api_changes.go @@ -0,0 +1,250 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// ChangesAPIService ChangesAPI service +type ChangesAPIService service + +type ApiChangesListRequest struct { + ctx context.Context + ApiService *ChangesAPIService + driveId string + limit *int32 + start *string + cursor *string + authorization *string +} + +func (r ApiChangesListRequest) Limit(limit int32) ApiChangesListRequest { + r.limit = &limit + return r +} + +func (r ApiChangesListRequest) Start(start string) ApiChangesListRequest { + r.start = &start + return r +} + +func (r ApiChangesListRequest) Cursor(cursor string) ApiChangesListRequest { + r.cursor = &cursor + return r +} + +func (r ApiChangesListRequest) Authorization(authorization string) ApiChangesListRequest { + r.authorization = &authorization + return r +} + +func (r ApiChangesListRequest) Execute() (*ChangePageOut, *http.Response, error) { + return r.ApiService.ChangesListExecute(r) +} + +/* +ChangesList List Changes + +Pull one page of changes. Exactly one of ``start`` or ``cursor``. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @return ApiChangesListRequest +*/ +func (a *ChangesAPIService) ChangesList(ctx context.Context, driveId string) ApiChangesListRequest { + return ApiChangesListRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + } +} + +// Execute executes the request +// @return ChangePageOut +func (a *ChangesAPIService) ChangesListExecute(r ApiChangesListRequest) (*ChangePageOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ChangePageOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ChangesAPIService.ChangesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/changes" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + if r.start != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "start", r.start, "form", "") + } + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") + } + // 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 r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesList400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 410 { + var v DrivesList400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/sdk/go/api_default.go b/sdk/go/api_default.go index dde87be..8bcc409 100644 --- a/sdk/go/api_default.go +++ b/sdk/go/api_default.go @@ -1,7 +1,7 @@ /* AgentDrive -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. API version: */ @@ -16,13968 +16,65 @@ import ( "io" "net/http" "net/url" - "strings" - "os" - "time" - "reflect" ) // DefaultAPIService DefaultAPI service type DefaultAPIService service -type ApiAbortUploadV0UploadsUploadIdDeleteRequest struct { +type ApiHealthRequest struct { ctx context.Context ApiService *DefaultAPIService - uploadId string } -func (r ApiAbortUploadV0UploadsUploadIdDeleteRequest) Execute() (*UploadAbortOut, *http.Response, error) { - return r.ApiService.AbortUploadV0UploadsUploadIdDeleteExecute(r) +func (r ApiHealthRequest) Execute() (*HealthOut, *http.Response, error) { + return r.ApiService.HealthExecute(r) } /* -AbortUploadV0UploadsUploadIdDelete Abort a large (direct-to-GCS) upload session +Health Health -Release an open upload session: return its reserved quota to the drive and mark it aborted. Idempotent — aborting an already-aborted or already-expired session succeeds with `released_bytes: 0`. A committed session cannot be aborted (409 ALREADY_COMMITTED). No write budget is charged — this frees resources rather than consuming them. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param uploadId - @return ApiAbortUploadV0UploadsUploadIdDeleteRequest -*/ -func (a *DefaultAPIService) AbortUploadV0UploadsUploadIdDelete(ctx context.Context, uploadId string) ApiAbortUploadV0UploadsUploadIdDeleteRequest { - return ApiAbortUploadV0UploadsUploadIdDeleteRequest{ - ApiService: a, - ctx: ctx, - uploadId: uploadId, - } -} - -// Execute executes the request -// @return UploadAbortOut -func (a *DefaultAPIService) AbortUploadV0UploadsUploadIdDeleteExecute(r ApiAbortUploadV0UploadsUploadIdDeleteRequest) (*UploadAbortOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *UploadAbortOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.AbortUploadV0UploadsUploadIdDelete") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/uploads/{upload_id}" - localVarPath = strings.Replace(localVarPath, "{"+"upload_id"+"}", url.PathEscape(parameterValueToString(r.uploadId, "uploadId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiBeginUploadV0UploadsPostRequest struct { - ctx context.Context - ApiService *DefaultAPIService - uploadBeginIn *UploadBeginIn -} - -func (r ApiBeginUploadV0UploadsPostRequest) UploadBeginIn(uploadBeginIn UploadBeginIn) ApiBeginUploadV0UploadsPostRequest { - r.uploadBeginIn = &uploadBeginIn - return r -} - -func (r ApiBeginUploadV0UploadsPostRequest) Execute() (*UploadBeginOut, *http.Response, error) { - return r.ApiService.BeginUploadV0UploadsPostExecute(r) -} - -/* -BeginUploadV0UploadsPost Begin a large (direct-to-GCS) upload - -Reserve quota and open a resumable upload session for a file larger than the buffered-upload limit. Returns a `upload_url` to PUT the raw bytes to DIRECTLY (no Authorization header — the URL is the credential), then call `/v0/uploads/{upload_id}/commit`. All artifact decisions (path, labels, metadata, source, if_match) are frozen here. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiBeginUploadV0UploadsPostRequest -*/ -func (a *DefaultAPIService) BeginUploadV0UploadsPost(ctx context.Context) ApiBeginUploadV0UploadsPostRequest { - return ApiBeginUploadV0UploadsPostRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return UploadBeginOut -func (a *DefaultAPIService) BeginUploadV0UploadsPostExecute(r ApiBeginUploadV0UploadsPostRequest) (*UploadBeginOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *UploadBeginOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.BeginUploadV0UploadsPost") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/uploads" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.uploadBeginIn == nil { - return localVarReturnValue, nil, reportError("uploadBeginIn is required and must be specified") - } - - // 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{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.uploadBeginIn - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 413 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiCallbackAuthCallbackGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - code *string - state *string - error_ *string -} - -func (r ApiCallbackAuthCallbackGetRequest) Code(code string) ApiCallbackAuthCallbackGetRequest { - r.code = &code - return r -} - -func (r ApiCallbackAuthCallbackGetRequest) State(state string) ApiCallbackAuthCallbackGetRequest { - r.state = &state - return r -} - -func (r ApiCallbackAuthCallbackGetRequest) Error_(error_ string) ApiCallbackAuthCallbackGetRequest { - r.error_ = &error_ - return r -} - -func (r ApiCallbackAuthCallbackGetRequest) Execute() (string, *http.Response, error) { - return r.ApiService.CallbackAuthCallbackGetExecute(r) -} - -/* -CallbackAuthCallbackGet Callback - -Complete a sign-in. - -Handles the auth provider's OAuth callback and shapes failures into -user-readable errors: - * an invalid or expired login flow — LOGIN_FLOW_INVALID (400); - * an invalid or already-used authorization code — AUTH_CODE_INVALID (400); - * the upstream auth provider being unavailable — WORKOS_UNAVAILABLE (502), - returned with Retry-After. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCallbackAuthCallbackGetRequest -*/ -func (a *DefaultAPIService) CallbackAuthCallbackGet(ctx context.Context) ApiCallbackAuthCallbackGetRequest { - return ApiCallbackAuthCallbackGetRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return string -func (a *DefaultAPIService) CallbackAuthCallbackGetExecute(r ApiCallbackAuthCallbackGetRequest) (string, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue string - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CallbackAuthCallbackGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/auth/callback" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.code != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "code", r.code, "form", "") - } - if r.state != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "state", r.state, "form", "") - } - if r.error_ != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "error", r.error_, "form", "") - } - // 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{"text/html", "application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 502 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 503 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiCancelJobV0JobsJobIdCancelPostRequest struct { - ctx context.Context - ApiService *DefaultAPIService - jobId string -} - -func (r ApiCancelJobV0JobsJobIdCancelPostRequest) Execute() (*CompileJobOut, *http.Response, error) { - return r.ApiService.CancelJobV0JobsJobIdCancelPostExecute(r) -} - -/* -CancelJobV0JobsJobIdCancelPost Cancel a queued/running job - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param jobId - @return ApiCancelJobV0JobsJobIdCancelPostRequest -*/ -func (a *DefaultAPIService) CancelJobV0JobsJobIdCancelPost(ctx context.Context, jobId string) ApiCancelJobV0JobsJobIdCancelPostRequest { - return ApiCancelJobV0JobsJobIdCancelPostRequest{ - ApiService: a, - ctx: ctx, - jobId: jobId, - } -} - -// Execute executes the request -// @return CompileJobOut -func (a *DefaultAPIService) CancelJobV0JobsJobIdCancelPostExecute(r ApiCancelJobV0JobsJobIdCancelPostRequest) (*CompileJobOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *CompileJobOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CancelJobV0JobsJobIdCancelPost") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/jobs/{job_id}/cancel" - localVarPath = strings.Replace(localVarPath, "{"+"job_id"+"}", url.PathEscape(parameterValueToString(r.jobId, "jobId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiCommitUploadV0UploadsUploadIdCommitPostRequest struct { - ctx context.Context - ApiService *DefaultAPIService - uploadId string -} - -func (r ApiCommitUploadV0UploadsUploadIdCommitPostRequest) Execute() (*ArtifactOut, *http.Response, error) { - return r.ApiService.CommitUploadV0UploadsUploadIdCommitPostExecute(r) -} - -/* -CommitUploadV0UploadsUploadIdCommitPost Commit a large (direct-to-GCS) upload - -Finalize the upload begun at `/v0/uploads`: AgentDrive verifies the object that landed in GCS (size + checksum) and creates the artifact. Idempotent — a retry after a successful commit returns the same artifact. The write budget is charged when the upload session is created; commit retries are not charged again. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param uploadId - @return ApiCommitUploadV0UploadsUploadIdCommitPostRequest -*/ -func (a *DefaultAPIService) CommitUploadV0UploadsUploadIdCommitPost(ctx context.Context, uploadId string) ApiCommitUploadV0UploadsUploadIdCommitPostRequest { - return ApiCommitUploadV0UploadsUploadIdCommitPostRequest{ - ApiService: a, - ctx: ctx, - uploadId: uploadId, - } -} - -// Execute executes the request -// @return ArtifactOut -func (a *DefaultAPIService) CommitUploadV0UploadsUploadIdCommitPostExecute(r ApiCommitUploadV0UploadsUploadIdCommitPostRequest) (*ArtifactOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ArtifactOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CommitUploadV0UploadsUploadIdCommitPost") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/uploads/{upload_id}/commit" - localVarPath = strings.Replace(localVarPath, "{"+"upload_id"+"}", url.PathEscape(parameterValueToString(r.uploadId, "uploadId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 410 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 412 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 413 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiCopyArtifactRouteV0ArtifactsArtIdCopyPostRequest struct { - ctx context.Context - ApiService *DefaultAPIService - artId string - copyIn *CopyIn - xAgentdriveActor *string - ifNoneMatch *string -} - -func (r ApiCopyArtifactRouteV0ArtifactsArtIdCopyPostRequest) CopyIn(copyIn CopyIn) ApiCopyArtifactRouteV0ArtifactsArtIdCopyPostRequest { - r.copyIn = ©In - return r -} - -func (r ApiCopyArtifactRouteV0ArtifactsArtIdCopyPostRequest) XAgentdriveActor(xAgentdriveActor string) ApiCopyArtifactRouteV0ArtifactsArtIdCopyPostRequest { - r.xAgentdriveActor = &xAgentdriveActor - return r -} - -func (r ApiCopyArtifactRouteV0ArtifactsArtIdCopyPostRequest) IfNoneMatch(ifNoneMatch string) ApiCopyArtifactRouteV0ArtifactsArtIdCopyPostRequest { - r.ifNoneMatch = &ifNoneMatch - return r -} - -func (r ApiCopyArtifactRouteV0ArtifactsArtIdCopyPostRequest) Execute() (*ArtifactOut, *http.Response, error) { - return r.ApiService.CopyArtifactRouteV0ArtifactsArtIdCopyPostExecute(r) -} - -/* -CopyArtifactRouteV0ArtifactsArtIdCopyPost Duplicate an artifact to a new path (CAS-shared, new ID) - -Create a new artifact at `path` whose bytes are identical to the source artifact's. The copy reuses the source's CAS object (zero new storage) but gets a fresh `art_…` ID, a fresh version 1, and — by default — `source.refs = [{type: 'artifact', id: ''}]` so provenance is preserved. - -Quota: the copy's `size_bytes` is added to the drive's `storage_bytes` even though physical bytes are shared. - -Source-version pin: pass `from_generation` in the body to require the source's current content generation (`version_number`) to equal it (→ 412 SOURCE_VERSION_MISMATCH); a concurrent source *metadata* edit does NOT fail the copy. Destination create-only: `If-None-Match: *` returns 412 CREATE_CONFLICT (instead of 409 PATH_CONFLICT) when the target path is occupied. - -Returns 409 PATH_CONFLICT if the target path is already taken; 413 STORAGE_QUOTA_EXCEEDED if the copy would push the drive over its limit. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param artId - @return ApiCopyArtifactRouteV0ArtifactsArtIdCopyPostRequest -*/ -func (a *DefaultAPIService) CopyArtifactRouteV0ArtifactsArtIdCopyPost(ctx context.Context, artId string) ApiCopyArtifactRouteV0ArtifactsArtIdCopyPostRequest { - return ApiCopyArtifactRouteV0ArtifactsArtIdCopyPostRequest{ - ApiService: a, - ctx: ctx, - artId: artId, - } -} - -// Execute executes the request -// @return ArtifactOut -func (a *DefaultAPIService) CopyArtifactRouteV0ArtifactsArtIdCopyPostExecute(r ApiCopyArtifactRouteV0ArtifactsArtIdCopyPostRequest) (*ArtifactOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ArtifactOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CopyArtifactRouteV0ArtifactsArtIdCopyPost") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/artifacts/{art_id}/copy" - localVarPath = strings.Replace(localVarPath, "{"+"art_id"+"}", url.PathEscape(parameterValueToString(r.artId, "artId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.copyIn == nil { - return localVarReturnValue, nil, reportError("copyIn is required and must be specified") - } - - // 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{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.xAgentdriveActor != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-actor", r.xAgentdriveActor, "simple", "") - } - if r.ifNoneMatch != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "if-none-match", r.ifNoneMatch, "simple", "") - } - // body params - localVarPostBody = r.copyIn - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 412 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 413 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiCopyFolderByIdV0FoldersFldIdCopyPostRequest struct { - ctx context.Context - ApiService *DefaultAPIService - fldId string - folderCopyIn *FolderCopyIn - xAgentdriveActor *string - ifNoneMatch *string -} - -func (r ApiCopyFolderByIdV0FoldersFldIdCopyPostRequest) FolderCopyIn(folderCopyIn FolderCopyIn) ApiCopyFolderByIdV0FoldersFldIdCopyPostRequest { - r.folderCopyIn = &folderCopyIn - return r -} - -func (r ApiCopyFolderByIdV0FoldersFldIdCopyPostRequest) XAgentdriveActor(xAgentdriveActor string) ApiCopyFolderByIdV0FoldersFldIdCopyPostRequest { - r.xAgentdriveActor = &xAgentdriveActor - return r -} - -func (r ApiCopyFolderByIdV0FoldersFldIdCopyPostRequest) IfNoneMatch(ifNoneMatch string) ApiCopyFolderByIdV0FoldersFldIdCopyPostRequest { - r.ifNoneMatch = &ifNoneMatch - return r -} - -func (r ApiCopyFolderByIdV0FoldersFldIdCopyPostRequest) Execute() (*FolderCopyOut, *http.Response, error) { - return r.ApiService.CopyFolderByIdV0FoldersFldIdCopyPostExecute(r) -} - -/* -CopyFolderByIdV0FoldersFldIdCopyPost Duplicate a folder subtree to a new path (CAS-shared, new IDs) - -Clone the folder identified by URL id — and every descendant folder + artifact — under the body's `path` (canonical, trailing slash). Each copied artifact reuses the source's CAS object (zero new storage) but gets a fresh `art_…` ID, a fresh version 1, and `source.refs = [{type: 'artifact', id: ''}]` provenance. The new folder gets a fresh `fld_…` ID and the source's description. - -The entire subtree is copied in a SINGLE transaction — either every row lands or none does. - -Quota: each copy's `size_bytes` counts against the drive's `storage_bytes` even though physical bytes are shared. - -Source-version pin: pass `from_metageneration` in the body to require the source folder's current `metageneration` to equal it (→ 412 SOURCE_VERSION_MISMATCH). Destination create-only: `If-None-Match: *` returns 412 CREATE_CONFLICT (instead of 409 FOLDER_PATH_CONFLICT) when the destination folder is occupied. - -Returns 409 `FOLDER_PATH_CONFLICT` if the destination collides with a live folder or artifact; 400 `FOLDER_PATH_INVALID` if `path` is non-canonical; 413 `SUBTREE_TOO_LARGE` if the source holds more than 5000 artifacts; 413 `STORAGE_QUOTA_EXCEEDED` if the copy would push the drive over its limit. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param fldId - @return ApiCopyFolderByIdV0FoldersFldIdCopyPostRequest -*/ -func (a *DefaultAPIService) CopyFolderByIdV0FoldersFldIdCopyPost(ctx context.Context, fldId string) ApiCopyFolderByIdV0FoldersFldIdCopyPostRequest { - return ApiCopyFolderByIdV0FoldersFldIdCopyPostRequest{ - ApiService: a, - ctx: ctx, - fldId: fldId, - } -} - -// Execute executes the request -// @return FolderCopyOut -func (a *DefaultAPIService) CopyFolderByIdV0FoldersFldIdCopyPostExecute(r ApiCopyFolderByIdV0FoldersFldIdCopyPostRequest) (*FolderCopyOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *FolderCopyOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CopyFolderByIdV0FoldersFldIdCopyPost") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/folders/{fld_id}/copy" - localVarPath = strings.Replace(localVarPath, "{"+"fld_id"+"}", url.PathEscape(parameterValueToString(r.fldId, "fldId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.folderCopyIn == nil { - return localVarReturnValue, nil, reportError("folderCopyIn is required and must be specified") - } - - // 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{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.xAgentdriveActor != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-actor", r.xAgentdriveActor, "simple", "") - } - if r.ifNoneMatch != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "if-none-match", r.ifNoneMatch, "simple", "") - } - // body params - localVarPostBody = r.folderCopyIn - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 412 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 413 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiCreateFolderByPathV0FoldersPathPutRequest struct { - ctx context.Context - ApiService *DefaultAPIService - path string - xAgentdriveActor *string - ifNoneMatch *string - folderCreateIn *FolderCreateIn -} - -func (r ApiCreateFolderByPathV0FoldersPathPutRequest) XAgentdriveActor(xAgentdriveActor string) ApiCreateFolderByPathV0FoldersPathPutRequest { - r.xAgentdriveActor = &xAgentdriveActor - return r -} - -func (r ApiCreateFolderByPathV0FoldersPathPutRequest) IfNoneMatch(ifNoneMatch string) ApiCreateFolderByPathV0FoldersPathPutRequest { - r.ifNoneMatch = &ifNoneMatch - return r -} - -func (r ApiCreateFolderByPathV0FoldersPathPutRequest) FolderCreateIn(folderCreateIn FolderCreateIn) ApiCreateFolderByPathV0FoldersPathPutRequest { - r.folderCreateIn = &folderCreateIn - return r -} - -func (r ApiCreateFolderByPathV0FoldersPathPutRequest) Execute() (*FolderOut, *http.Response, error) { - return r.ApiService.CreateFolderByPathV0FoldersPathPutExecute(r) -} - -/* -CreateFolderByPathV0FoldersPathPut Create a folder (idempotent) - -Create a folder at the URL path. Idempotent create-at-known-URI (mirrors `PUT /v0/artifacts/{path}`) — a second call for the same live path returns the existing row unchanged (metadata updates require PATCH). Returns 201 on create, 200 when the folder already exists. - -Send `If-None-Match: *` to make it strictly create-only: an existing folder then returns 412 CREATE_CONFLICT instead of the idempotent 200. - -Returns 409 `FOLDER_PATH_CONFLICT` if a live artifact occupies the file form of the path (e.g. mkdir `/foo/` when an artifact lives at `/foo`). - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param path - @return ApiCreateFolderByPathV0FoldersPathPutRequest -*/ -func (a *DefaultAPIService) CreateFolderByPathV0FoldersPathPut(ctx context.Context, path string) ApiCreateFolderByPathV0FoldersPathPutRequest { - return ApiCreateFolderByPathV0FoldersPathPutRequest{ - ApiService: a, - ctx: ctx, - path: path, - } -} - -// Execute executes the request -// @return FolderOut -func (a *DefaultAPIService) CreateFolderByPathV0FoldersPathPutExecute(r ApiCreateFolderByPathV0FoldersPathPutRequest) (*FolderOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *FolderOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateFolderByPathV0FoldersPathPut") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/folders/{path}" - localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", url.PathEscape(parameterValueToString(r.path, "path")), -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{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.xAgentdriveActor != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-actor", r.xAgentdriveActor, "simple", "") - } - if r.ifNoneMatch != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "if-none-match", r.ifNoneMatch, "simple", "") - } - // body params - localVarPostBody = r.folderCreateIn - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 412 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiCreateGrantRouteV0GrantsPostRequest struct { - ctx context.Context - ApiService *DefaultAPIService - grantCreateIn *GrantCreateIn - xAgentdriveActor *string -} - -func (r ApiCreateGrantRouteV0GrantsPostRequest) GrantCreateIn(grantCreateIn GrantCreateIn) ApiCreateGrantRouteV0GrantsPostRequest { - r.grantCreateIn = &grantCreateIn - return r -} - -func (r ApiCreateGrantRouteV0GrantsPostRequest) XAgentdriveActor(xAgentdriveActor string) ApiCreateGrantRouteV0GrantsPostRequest { - r.xAgentdriveActor = &xAgentdriveActor - return r -} - -func (r ApiCreateGrantRouteV0GrantsPostRequest) Execute() (*GrantOut, *http.Response, error) { - return r.ApiService.CreateGrantRouteV0GrantsPostExecute(r) -} - -/* -CreateGrantRouteV0GrantsPost Create (or fetch) a per-principal grant on a resource - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateGrantRouteV0GrantsPostRequest -*/ -func (a *DefaultAPIService) CreateGrantRouteV0GrantsPost(ctx context.Context) ApiCreateGrantRouteV0GrantsPostRequest { - return ApiCreateGrantRouteV0GrantsPostRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GrantOut -func (a *DefaultAPIService) CreateGrantRouteV0GrantsPostExecute(r ApiCreateGrantRouteV0GrantsPostRequest) (*GrantOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GrantOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateGrantRouteV0GrantsPost") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/grants" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.grantCreateIn == nil { - return localVarReturnValue, nil, reportError("grantCreateIn is required and must be specified") - } - - // 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{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.xAgentdriveActor != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-actor", r.xAgentdriveActor, "simple", "") - } - // body params - localVarPostBody = r.grantCreateIn - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiCreateShareRouteV0SharesPostRequest struct { - ctx context.Context - ApiService *DefaultAPIService - shareCreateIn *ShareCreateIn - xAgentdriveActor *string -} - -func (r ApiCreateShareRouteV0SharesPostRequest) ShareCreateIn(shareCreateIn ShareCreateIn) ApiCreateShareRouteV0SharesPostRequest { - r.shareCreateIn = &shareCreateIn - return r -} - -func (r ApiCreateShareRouteV0SharesPostRequest) XAgentdriveActor(xAgentdriveActor string) ApiCreateShareRouteV0SharesPostRequest { - r.xAgentdriveActor = &xAgentdriveActor - return r -} - -func (r ApiCreateShareRouteV0SharesPostRequest) Execute() (*ShareMintOut, *http.Response, error) { - return r.ApiService.CreateShareRouteV0SharesPostExecute(r) -} - -/* -CreateShareRouteV0SharesPost Mint a share link (returns the share_key once) - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateShareRouteV0SharesPostRequest -*/ -func (a *DefaultAPIService) CreateShareRouteV0SharesPost(ctx context.Context) ApiCreateShareRouteV0SharesPostRequest { - return ApiCreateShareRouteV0SharesPostRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return ShareMintOut -func (a *DefaultAPIService) CreateShareRouteV0SharesPostExecute(r ApiCreateShareRouteV0SharesPostRequest) (*ShareMintOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ShareMintOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateShareRouteV0SharesPost") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/shares" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.shareCreateIn == nil { - return localVarReturnValue, nil, reportError("shareCreateIn is required and must be specified") - } - - // 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{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.xAgentdriveActor != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-actor", r.xAgentdriveActor, "simple", "") - } - // body params - localVarPostBody = r.shareCreateIn - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeleteArtifactByIdRouteV0ArtifactsArtIdDeleteRequest struct { - ctx context.Context - ApiService *DefaultAPIService - artId string - ifMatch *string - xAgentdriveActor *string -} - -func (r ApiDeleteArtifactByIdRouteV0ArtifactsArtIdDeleteRequest) IfMatch(ifMatch string) ApiDeleteArtifactByIdRouteV0ArtifactsArtIdDeleteRequest { - r.ifMatch = &ifMatch - return r -} - -func (r ApiDeleteArtifactByIdRouteV0ArtifactsArtIdDeleteRequest) XAgentdriveActor(xAgentdriveActor string) ApiDeleteArtifactByIdRouteV0ArtifactsArtIdDeleteRequest { - r.xAgentdriveActor = &xAgentdriveActor - return r -} - -func (r ApiDeleteArtifactByIdRouteV0ArtifactsArtIdDeleteRequest) Execute() (*ArtifactDeleteOut, *http.Response, error) { - return r.ApiService.DeleteArtifactByIdRouteV0ArtifactsArtIdDeleteExecute(r) -} - -/* -DeleteArtifactByIdRouteV0ArtifactsArtIdDelete Soft-delete an artifact by its stable ID - -Soft-delete the artifact with this `art_…` ID. Same semantics + response shape as the path-based `DELETE /v0/artifacts/{path}` (reversible until the GC cron hard-deletes at `purge_at`; `restore_url` points at the by-id restore), but keys on the immutable id so a concurrent rename can't change the target. - -Returns 404 ARTIFACT_NOT_FOUND if no live artifact has this id; 403 WIKI_RESERVED for `_wiki/` artifacts (system-managed); 412 if `If-Match` doesn't match the current version. Declared before the `{path:path}` family so the id convertor wins for DELETEs. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param artId - @return ApiDeleteArtifactByIdRouteV0ArtifactsArtIdDeleteRequest -*/ -func (a *DefaultAPIService) DeleteArtifactByIdRouteV0ArtifactsArtIdDelete(ctx context.Context, artId string) ApiDeleteArtifactByIdRouteV0ArtifactsArtIdDeleteRequest { - return ApiDeleteArtifactByIdRouteV0ArtifactsArtIdDeleteRequest{ - ApiService: a, - ctx: ctx, - artId: artId, - } -} - -// Execute executes the request -// @return ArtifactDeleteOut -func (a *DefaultAPIService) DeleteArtifactByIdRouteV0ArtifactsArtIdDeleteExecute(r ApiDeleteArtifactByIdRouteV0ArtifactsArtIdDeleteRequest) (*ArtifactDeleteOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ArtifactDeleteOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteArtifactByIdRouteV0ArtifactsArtIdDelete") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/artifacts/{art_id}" - localVarPath = strings.Replace(localVarPath, "{"+"art_id"+"}", url.PathEscape(parameterValueToString(r.artId, "artId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 r.ifMatch != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "if-match", r.ifMatch, "simple", "") - } - if r.xAgentdriveActor != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-actor", r.xAgentdriveActor, "simple", "") - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 412 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeleteArtifactV0ArtifactsPathDeleteRequest struct { - ctx context.Context - ApiService *DefaultAPIService - path string - ifMatch *string - xAgentdriveActor *string -} - -func (r ApiDeleteArtifactV0ArtifactsPathDeleteRequest) IfMatch(ifMatch string) ApiDeleteArtifactV0ArtifactsPathDeleteRequest { - r.ifMatch = &ifMatch - return r -} - -func (r ApiDeleteArtifactV0ArtifactsPathDeleteRequest) XAgentdriveActor(xAgentdriveActor string) ApiDeleteArtifactV0ArtifactsPathDeleteRequest { - r.xAgentdriveActor = &xAgentdriveActor - return r -} - -func (r ApiDeleteArtifactV0ArtifactsPathDeleteRequest) Execute() (*ArtifactDeleteOut, *http.Response, error) { - return r.ApiService.DeleteArtifactV0ArtifactsPathDeleteExecute(r) -} - -/* -DeleteArtifactV0ArtifactsPathDelete Delete Artifact - -Soft-delete the artifact at the given path. - -A delete WITHOUT an `If-Match` precondition is last-writer-wins and will -silently remove a concurrently-modified artifact. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param path - @return ApiDeleteArtifactV0ArtifactsPathDeleteRequest -*/ -func (a *DefaultAPIService) DeleteArtifactV0ArtifactsPathDelete(ctx context.Context, path string) ApiDeleteArtifactV0ArtifactsPathDeleteRequest { - return ApiDeleteArtifactV0ArtifactsPathDeleteRequest{ - ApiService: a, - ctx: ctx, - path: path, - } -} - -// Execute executes the request -// @return ArtifactDeleteOut -func (a *DefaultAPIService) DeleteArtifactV0ArtifactsPathDeleteExecute(r ApiDeleteArtifactV0ArtifactsPathDeleteRequest) (*ArtifactDeleteOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ArtifactDeleteOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteArtifactV0ArtifactsPathDelete") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/artifacts/{path}" - localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", url.PathEscape(parameterValueToString(r.path, "path")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 r.ifMatch != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "if-match", r.ifMatch, "simple", "") - } - if r.xAgentdriveActor != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-actor", r.xAgentdriveActor, "simple", "") - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 412 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeleteDriveRouteV0DrivesDriveIdDeleteRequest struct { - ctx context.Context - ApiService *DefaultAPIService - driveId string - confirm *string - xAgentdriveActor *string - ifMatch *string -} - -func (r ApiDeleteDriveRouteV0DrivesDriveIdDeleteRequest) Confirm(confirm string) ApiDeleteDriveRouteV0DrivesDriveIdDeleteRequest { - r.confirm = &confirm - return r -} - -func (r ApiDeleteDriveRouteV0DrivesDriveIdDeleteRequest) XAgentdriveActor(xAgentdriveActor string) ApiDeleteDriveRouteV0DrivesDriveIdDeleteRequest { - r.xAgentdriveActor = &xAgentdriveActor - return r -} - -func (r ApiDeleteDriveRouteV0DrivesDriveIdDeleteRequest) IfMatch(ifMatch string) ApiDeleteDriveRouteV0DrivesDriveIdDeleteRequest { - r.ifMatch = &ifMatch - return r -} - -func (r ApiDeleteDriveRouteV0DrivesDriveIdDeleteRequest) Execute() (*DriveDeleteOut, *http.Response, error) { - return r.ApiService.DeleteDriveRouteV0DrivesDriveIdDeleteExecute(r) -} - -/* -DeleteDriveRouteV0DrivesDriveIdDelete Soft-delete a drive - -Mark the drive for cleanup. All tenant data (artifacts, versions, wiki, embeddings, events) is hidden via the `live_*` views and CASCADE-removed by the GC cleanup cron at `purge_at`. Restore via `POST /v0/drives/{id}/restore` while the row is still in trash. The path-param `drive_id` MUST match the authenticated drive. - -Accepts either an `ad_live_` per-drive key (deletes that key's drive) or an `ad_user_` user token selecting an owned drive (workspaces-design §5.3); a `read`-scope user token is rejected with 403 `INSUFFICIENT_SCOPE`. **Guard (§8):** a workspace must retain at least one live drive — deleting the workspace's last live drive returns 409 `LAST_DRIVE`. - -**Explicit confirmation required:** pass `?confirm=DELETE` or the request is rejected with 400 `CONFIRM_REQUIRED`. Tenant-level deletion is the largest-blast-radius operation on the API; the static token forces a deliberate act (soft-delete still gives a restore window on top). - -**Optimistic concurrency:** send `If-Match` with the drive's composite ETag (`".0."`, from a drive read) to make the delete conditional — a stale token returns 412 PRECONDITION_FAILED. A delete WITHOUT an `If-Match` precondition is last-writer-wins and will silently trash a concurrently-modified drive. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param driveId - @return ApiDeleteDriveRouteV0DrivesDriveIdDeleteRequest -*/ -func (a *DefaultAPIService) DeleteDriveRouteV0DrivesDriveIdDelete(ctx context.Context, driveId string) ApiDeleteDriveRouteV0DrivesDriveIdDeleteRequest { - return ApiDeleteDriveRouteV0DrivesDriveIdDeleteRequest{ - ApiService: a, - ctx: ctx, - driveId: driveId, - } -} - -// Execute executes the request -// @return DriveDeleteOut -func (a *DefaultAPIService) DeleteDriveRouteV0DrivesDriveIdDeleteExecute(r ApiDeleteDriveRouteV0DrivesDriveIdDeleteRequest) (*DriveDeleteOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *DriveDeleteOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteDriveRouteV0DrivesDriveIdDelete") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/drives/{drive_id}" - localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.confirm != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "confirm", r.confirm, "form", "") - } - // 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 r.xAgentdriveActor != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-actor", r.xAgentdriveActor, "simple", "") - } - if r.ifMatch != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "if-match", r.ifMatch, "simple", "") - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 412 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeleteFolderByIdV0FoldersFldIdDeleteRequest struct { - ctx context.Context - ApiService *DefaultAPIService - fldId string - recursive *bool - xAgentdriveActor *string - ifMatch *string -} - -func (r ApiDeleteFolderByIdV0FoldersFldIdDeleteRequest) Recursive(recursive bool) ApiDeleteFolderByIdV0FoldersFldIdDeleteRequest { - r.recursive = &recursive - return r -} - -func (r ApiDeleteFolderByIdV0FoldersFldIdDeleteRequest) XAgentdriveActor(xAgentdriveActor string) ApiDeleteFolderByIdV0FoldersFldIdDeleteRequest { - r.xAgentdriveActor = &xAgentdriveActor - return r -} - -func (r ApiDeleteFolderByIdV0FoldersFldIdDeleteRequest) IfMatch(ifMatch string) ApiDeleteFolderByIdV0FoldersFldIdDeleteRequest { - r.ifMatch = &ifMatch - return r -} - -func (r ApiDeleteFolderByIdV0FoldersFldIdDeleteRequest) Execute() (*FolderDeleteOut, *http.Response, error) { - return r.ApiService.DeleteFolderByIdV0FoldersFldIdDeleteExecute(r) -} - -/* -DeleteFolderByIdV0FoldersFldIdDelete Soft-delete a folder by stable ID (cascade with ?recursive=true) - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param fldId - @return ApiDeleteFolderByIdV0FoldersFldIdDeleteRequest -*/ -func (a *DefaultAPIService) DeleteFolderByIdV0FoldersFldIdDelete(ctx context.Context, fldId string) ApiDeleteFolderByIdV0FoldersFldIdDeleteRequest { - return ApiDeleteFolderByIdV0FoldersFldIdDeleteRequest{ - ApiService: a, - ctx: ctx, - fldId: fldId, - } -} - -// Execute executes the request -// @return FolderDeleteOut -func (a *DefaultAPIService) DeleteFolderByIdV0FoldersFldIdDeleteExecute(r ApiDeleteFolderByIdV0FoldersFldIdDeleteRequest) (*FolderDeleteOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *FolderDeleteOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteFolderByIdV0FoldersFldIdDelete") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/folders/{fld_id}" - localVarPath = strings.Replace(localVarPath, "{"+"fld_id"+"}", url.PathEscape(parameterValueToString(r.fldId, "fldId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.recursive != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "recursive", r.recursive, "form", "") - } else { - var defaultValue bool = false - parameterAddToHeaderOrQuery(localVarQueryParams, "recursive", defaultValue, "form", "") - r.recursive = &defaultValue - } - // 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 r.xAgentdriveActor != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-actor", r.xAgentdriveActor, "simple", "") - } - if r.ifMatch != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "if-match", r.ifMatch, "simple", "") - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 412 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeleteFolderByPathV0FoldersPathDeleteRequest struct { - ctx context.Context - ApiService *DefaultAPIService - path string - recursive *bool - xAgentdriveActor *string - ifMatch *string -} - -func (r ApiDeleteFolderByPathV0FoldersPathDeleteRequest) Recursive(recursive bool) ApiDeleteFolderByPathV0FoldersPathDeleteRequest { - r.recursive = &recursive - return r -} - -func (r ApiDeleteFolderByPathV0FoldersPathDeleteRequest) XAgentdriveActor(xAgentdriveActor string) ApiDeleteFolderByPathV0FoldersPathDeleteRequest { - r.xAgentdriveActor = &xAgentdriveActor - return r -} - -func (r ApiDeleteFolderByPathV0FoldersPathDeleteRequest) IfMatch(ifMatch string) ApiDeleteFolderByPathV0FoldersPathDeleteRequest { - r.ifMatch = &ifMatch - return r -} - -func (r ApiDeleteFolderByPathV0FoldersPathDeleteRequest) Execute() (*FolderDeleteOut, *http.Response, error) { - return r.ApiService.DeleteFolderByPathV0FoldersPathDeleteExecute(r) -} - -/* -DeleteFolderByPathV0FoldersPathDelete Soft-delete a folder (cascade with ?recursive=true) - -Soft-delete the folder. Refuses if the folder has live descendants unless `?recursive=true` is set, in which case ALL descendant folders + artifacts are soft-deleted in the same transaction. - -Returns 409 `FOLDER_RECURSIVE_REQUIRED` (with descendant counts in `colliding_path`) when recursion is needed but the flag isn't set. Retention window is frozen on `purge_at` per deletion-design.md §5.1; mid-retention tier changes don't shift it. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param path - @return ApiDeleteFolderByPathV0FoldersPathDeleteRequest -*/ -func (a *DefaultAPIService) DeleteFolderByPathV0FoldersPathDelete(ctx context.Context, path string) ApiDeleteFolderByPathV0FoldersPathDeleteRequest { - return ApiDeleteFolderByPathV0FoldersPathDeleteRequest{ - ApiService: a, - ctx: ctx, - path: path, - } -} - -// Execute executes the request -// @return FolderDeleteOut -func (a *DefaultAPIService) DeleteFolderByPathV0FoldersPathDeleteExecute(r ApiDeleteFolderByPathV0FoldersPathDeleteRequest) (*FolderDeleteOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *FolderDeleteOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteFolderByPathV0FoldersPathDelete") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/folders/{path}" - localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", url.PathEscape(parameterValueToString(r.path, "path")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.recursive != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "recursive", r.recursive, "form", "") - } else { - var defaultValue bool = false - parameterAddToHeaderOrQuery(localVarQueryParams, "recursive", defaultValue, "form", "") - r.recursive = &defaultValue - } - // 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 r.xAgentdriveActor != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-actor", r.xAgentdriveActor, "simple", "") - } - if r.ifMatch != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "if-match", r.ifMatch, "simple", "") - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 412 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeleteGrantRouteV0GrantsGrnIdDeleteRequest struct { - ctx context.Context - ApiService *DefaultAPIService - grnId string - xAgentdriveActor *string -} - -func (r ApiDeleteGrantRouteV0GrantsGrnIdDeleteRequest) XAgentdriveActor(xAgentdriveActor string) ApiDeleteGrantRouteV0GrantsGrnIdDeleteRequest { - r.xAgentdriveActor = &xAgentdriveActor - return r -} - -func (r ApiDeleteGrantRouteV0GrantsGrnIdDeleteRequest) Execute() (*RevokeOut, *http.Response, error) { - return r.ApiService.DeleteGrantRouteV0GrantsGrnIdDeleteExecute(r) -} - -/* -DeleteGrantRouteV0GrantsGrnIdDelete Revoke a grant (can_manage, or self-revoke own grant) - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param grnId - @return ApiDeleteGrantRouteV0GrantsGrnIdDeleteRequest -*/ -func (a *DefaultAPIService) DeleteGrantRouteV0GrantsGrnIdDelete(ctx context.Context, grnId string) ApiDeleteGrantRouteV0GrantsGrnIdDeleteRequest { - return ApiDeleteGrantRouteV0GrantsGrnIdDeleteRequest{ - ApiService: a, - ctx: ctx, - grnId: grnId, - } -} - -// Execute executes the request -// @return RevokeOut -func (a *DefaultAPIService) DeleteGrantRouteV0GrantsGrnIdDeleteExecute(r ApiDeleteGrantRouteV0GrantsGrnIdDeleteRequest) (*RevokeOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RevokeOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteGrantRouteV0GrantsGrnIdDelete") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/grants/{grn_id}" - localVarPath = strings.Replace(localVarPath, "{"+"grn_id"+"}", url.PathEscape(parameterValueToString(r.grnId, "grnId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 r.xAgentdriveActor != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-actor", r.xAgentdriveActor, "simple", "") - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDeleteShareRouteV0SharesShrIdDeleteRequest struct { - ctx context.Context - ApiService *DefaultAPIService - shrId string - xAgentdriveActor *string -} - -func (r ApiDeleteShareRouteV0SharesShrIdDeleteRequest) XAgentdriveActor(xAgentdriveActor string) ApiDeleteShareRouteV0SharesShrIdDeleteRequest { - r.xAgentdriveActor = &xAgentdriveActor - return r -} - -func (r ApiDeleteShareRouteV0SharesShrIdDeleteRequest) Execute() (*RevokeOut, *http.Response, error) { - return r.ApiService.DeleteShareRouteV0SharesShrIdDeleteExecute(r) -} - -/* -DeleteShareRouteV0SharesShrIdDelete Revoke a share link (requires can_manage) - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param shrId - @return ApiDeleteShareRouteV0SharesShrIdDeleteRequest -*/ -func (a *DefaultAPIService) DeleteShareRouteV0SharesShrIdDelete(ctx context.Context, shrId string) ApiDeleteShareRouteV0SharesShrIdDeleteRequest { - return ApiDeleteShareRouteV0SharesShrIdDeleteRequest{ - ApiService: a, - ctx: ctx, - shrId: shrId, - } -} - -// Execute executes the request -// @return RevokeOut -func (a *DefaultAPIService) DeleteShareRouteV0SharesShrIdDeleteExecute(r ApiDeleteShareRouteV0SharesShrIdDeleteRequest) (*RevokeOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RevokeOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteShareRouteV0SharesShrIdDelete") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/shares/{shr_id}" - localVarPath = strings.Replace(localVarPath, "{"+"shr_id"+"}", url.PathEscape(parameterValueToString(r.shrId, "shrId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 r.xAgentdriveActor != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-actor", r.xAgentdriveActor, "simple", "") - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDownloadArtifactByIdV0ArtifactsArtIdDownloadGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - artId string -} - -func (r ApiDownloadArtifactByIdV0ArtifactsArtIdDownloadGetRequest) Execute() (*os.File, *http.Response, error) { - return r.ApiService.DownloadArtifactByIdV0ArtifactsArtIdDownloadGetExecute(r) -} - -/* -DownloadArtifactByIdV0ArtifactsArtIdDownloadGet Stream the artifact bytes by stable ID (never rendered HTML) - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param artId - @return ApiDownloadArtifactByIdV0ArtifactsArtIdDownloadGetRequest -*/ -func (a *DefaultAPIService) DownloadArtifactByIdV0ArtifactsArtIdDownloadGet(ctx context.Context, artId string) ApiDownloadArtifactByIdV0ArtifactsArtIdDownloadGetRequest { - return ApiDownloadArtifactByIdV0ArtifactsArtIdDownloadGetRequest{ - ApiService: a, - ctx: ctx, - artId: artId, - } -} - -// Execute executes the request -// @return *os.File -func (a *DefaultAPIService) DownloadArtifactByIdV0ArtifactsArtIdDownloadGetExecute(r ApiDownloadArtifactByIdV0ArtifactsArtIdDownloadGetRequest) (*os.File, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *os.File - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DownloadArtifactByIdV0ArtifactsArtIdDownloadGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/artifacts/{art_id}/download" - localVarPath = strings.Replace(localVarPath, "{"+"art_id"+"}", url.PathEscape(parameterValueToString(r.artId, "artId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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/octet-stream", "application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDownloadArtifactByPathV0ArtifactsPathDownloadGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - path string -} - -func (r ApiDownloadArtifactByPathV0ArtifactsPathDownloadGetRequest) Execute() (*os.File, *http.Response, error) { - return r.ApiService.DownloadArtifactByPathV0ArtifactsPathDownloadGetExecute(r) -} - -/* -DownloadArtifactByPathV0ArtifactsPathDownloadGet Stream the artifact bytes by path (never rendered HTML) - -Same bytes-only machine surface as `/{art_id}/download` but resolves the artifact by path, so callers don't have to resolve path→id first. Applies the identical CSP `sandbox` + `nosniff` posture (never serves HTML inline as active content). - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param path - @return ApiDownloadArtifactByPathV0ArtifactsPathDownloadGetRequest -*/ -func (a *DefaultAPIService) DownloadArtifactByPathV0ArtifactsPathDownloadGet(ctx context.Context, path string) ApiDownloadArtifactByPathV0ArtifactsPathDownloadGetRequest { - return ApiDownloadArtifactByPathV0ArtifactsPathDownloadGetRequest{ - ApiService: a, - ctx: ctx, - path: path, - } -} - -// Execute executes the request -// @return *os.File -func (a *DefaultAPIService) DownloadArtifactByPathV0ArtifactsPathDownloadGetExecute(r ApiDownloadArtifactByPathV0ArtifactsPathDownloadGetRequest) (*os.File, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *os.File - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DownloadArtifactByPathV0ArtifactsPathDownloadGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/artifacts/{path}/download" - localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", url.PathEscape(parameterValueToString(r.path, "path")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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/octet-stream", "application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDownloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - artId string - versionNumber int32 -} - -func (r ApiDownloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGetRequest) Execute() (*os.File, *http.Response, error) { - return r.ApiService.DownloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGetExecute(r) -} - -/* -DownloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGet Stream bytes for a specific version (machine surface) - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param artId - @param versionNumber - @return ApiDownloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGetRequest -*/ -func (a *DefaultAPIService) DownloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGet(ctx context.Context, artId string, versionNumber int32) ApiDownloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGetRequest { - return ApiDownloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGetRequest{ - ApiService: a, - ctx: ctx, - artId: artId, - versionNumber: versionNumber, - } -} - -// Execute executes the request -// @return *os.File -func (a *DefaultAPIService) DownloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGetExecute(r ApiDownloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGetRequest) (*os.File, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *os.File - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DownloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/artifacts/{art_id}/versions/{version_number}/download" - localVarPath = strings.Replace(localVarPath, "{"+"art_id"+"}", url.PathEscape(parameterValueToString(r.artId, "artId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"version_number"+"}", url.PathEscape(parameterValueToString(r.versionNumber, "versionNumber")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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/octet-stream", "application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 410 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDownloadUrlByIdV0ArtifactsArtIdDownloadUrlGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - artId string -} - -func (r ApiDownloadUrlByIdV0ArtifactsArtIdDownloadUrlGetRequest) Execute() (*DownloadUrlOut, *http.Response, error) { - return r.ApiService.DownloadUrlByIdV0ArtifactsArtIdDownloadUrlGetExecute(r) -} - -/* -DownloadUrlByIdV0ArtifactsArtIdDownloadUrlGet Signed direct-from-GCS download URL by stable ID - -Returns a URL for the artifact's bytes. For large artifacts (>= the signed-download threshold) when signing is available, it's a short-lived **signed GCS URL** the client fetches directly (`direct:true`, `expires_at` set); otherwise the **proxy** `/download` URL (`direct:false`). Treat the URL as opaque. large-download-design.md §5.1. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param artId - @return ApiDownloadUrlByIdV0ArtifactsArtIdDownloadUrlGetRequest -*/ -func (a *DefaultAPIService) DownloadUrlByIdV0ArtifactsArtIdDownloadUrlGet(ctx context.Context, artId string) ApiDownloadUrlByIdV0ArtifactsArtIdDownloadUrlGetRequest { - return ApiDownloadUrlByIdV0ArtifactsArtIdDownloadUrlGetRequest{ - ApiService: a, - ctx: ctx, - artId: artId, - } -} - -// Execute executes the request -// @return DownloadUrlOut -func (a *DefaultAPIService) DownloadUrlByIdV0ArtifactsArtIdDownloadUrlGetExecute(r ApiDownloadUrlByIdV0ArtifactsArtIdDownloadUrlGetRequest) (*DownloadUrlOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *DownloadUrlOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DownloadUrlByIdV0ArtifactsArtIdDownloadUrlGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/artifacts/{art_id}/download-url" - localVarPath = strings.Replace(localVarPath, "{"+"art_id"+"}", url.PathEscape(parameterValueToString(r.artId, "artId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDownloadUrlByPathV0ArtifactsPathDownloadUrlGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - path string -} - -func (r ApiDownloadUrlByPathV0ArtifactsPathDownloadUrlGetRequest) Execute() (*DownloadUrlOut, *http.Response, error) { - return r.ApiService.DownloadUrlByPathV0ArtifactsPathDownloadUrlGetExecute(r) -} - -/* -DownloadUrlByPathV0ArtifactsPathDownloadUrlGet Signed direct-from-GCS download URL by path - -Same as `/{art_id}/download-url` but resolves the artifact by path. The returned proxy URL (when `direct:false`) still points at the by-id `/download` endpoint. large-download-design.md §5.1. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param path - @return ApiDownloadUrlByPathV0ArtifactsPathDownloadUrlGetRequest -*/ -func (a *DefaultAPIService) DownloadUrlByPathV0ArtifactsPathDownloadUrlGet(ctx context.Context, path string) ApiDownloadUrlByPathV0ArtifactsPathDownloadUrlGetRequest { - return ApiDownloadUrlByPathV0ArtifactsPathDownloadUrlGetRequest{ - ApiService: a, - ctx: ctx, - path: path, - } -} - -// Execute executes the request -// @return DownloadUrlOut -func (a *DefaultAPIService) DownloadUrlByPathV0ArtifactsPathDownloadUrlGetExecute(r ApiDownloadUrlByPathV0ArtifactsPathDownloadUrlGetRequest) (*DownloadUrlOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *DownloadUrlOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DownloadUrlByPathV0ArtifactsPathDownloadUrlGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/artifacts/{path}/download-url" - localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", url.PathEscape(parameterValueToString(r.path, "path")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiDownloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - artId string - versionNumber int32 -} - -func (r ApiDownloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGetRequest) Execute() (*DownloadUrlOut, *http.Response, error) { - return r.ApiService.DownloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGetExecute(r) -} - -/* -DownloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGet Signed direct-from-GCS download URL for a specific version - -Same as `/{art_id}/download-url` but for a specific version's bytes (`direct:true` signed GCS URL when large + signing available, else the proxy `/versions/{n}/download` URL). large-download-design.md §5.1. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param artId - @param versionNumber - @return ApiDownloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGetRequest -*/ -func (a *DefaultAPIService) DownloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGet(ctx context.Context, artId string, versionNumber int32) ApiDownloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGetRequest { - return ApiDownloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGetRequest{ - ApiService: a, - ctx: ctx, - artId: artId, - versionNumber: versionNumber, - } -} - -// Execute executes the request -// @return DownloadUrlOut -func (a *DefaultAPIService) DownloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGetExecute(r ApiDownloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGetRequest) (*DownloadUrlOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *DownloadUrlOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DownloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/artifacts/{art_id}/versions/{version_number}/download-url" - localVarPath = strings.Replace(localVarPath, "{"+"art_id"+"}", url.PathEscape(parameterValueToString(r.artId, "artId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"version_number"+"}", url.PathEscape(parameterValueToString(r.versionNumber, "versionNumber")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 410 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiEnqueueJobV0ProjectsFldIdJobsPostRequest struct { - ctx context.Context - ApiService *DefaultAPIService - fldId string - compileJobIn *CompileJobIn - xAgentdriveActor *string -} - -func (r ApiEnqueueJobV0ProjectsFldIdJobsPostRequest) CompileJobIn(compileJobIn CompileJobIn) ApiEnqueueJobV0ProjectsFldIdJobsPostRequest { - r.compileJobIn = &compileJobIn - return r -} - -func (r ApiEnqueueJobV0ProjectsFldIdJobsPostRequest) XAgentdriveActor(xAgentdriveActor string) ApiEnqueueJobV0ProjectsFldIdJobsPostRequest { - r.xAgentdriveActor = &xAgentdriveActor - return r -} - -func (r ApiEnqueueJobV0ProjectsFldIdJobsPostRequest) Execute() (*CompileJobOut, *http.Response, error) { - return r.ApiService.EnqueueJobV0ProjectsFldIdJobsPostExecute(r) -} - -/* -EnqueueJobV0ProjectsFldIdJobsPost Enqueue a compile job for a project (folder) - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param fldId - @return ApiEnqueueJobV0ProjectsFldIdJobsPostRequest -*/ -func (a *DefaultAPIService) EnqueueJobV0ProjectsFldIdJobsPost(ctx context.Context, fldId string) ApiEnqueueJobV0ProjectsFldIdJobsPostRequest { - return ApiEnqueueJobV0ProjectsFldIdJobsPostRequest{ - ApiService: a, - ctx: ctx, - fldId: fldId, - } -} - -// Execute executes the request -// @return CompileJobOut -func (a *DefaultAPIService) EnqueueJobV0ProjectsFldIdJobsPostExecute(r ApiEnqueueJobV0ProjectsFldIdJobsPostRequest) (*CompileJobOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *CompileJobOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.EnqueueJobV0ProjectsFldIdJobsPost") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/projects/{fld_id}/jobs" - localVarPath = strings.Replace(localVarPath, "{"+"fld_id"+"}", url.PathEscape(parameterValueToString(r.fldId, "fldId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.compileJobIn == nil { - return localVarReturnValue, nil, reportError("compileJobIn is required and must be specified") - } - - // 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{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.xAgentdriveActor != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-actor", r.xAgentdriveActor, "simple", "") - } - // body params - localVarPostBody = r.compileJobIn - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 402 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 413 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiExtensionStartAuthExtensionStartGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - extId *string -} - -func (r ApiExtensionStartAuthExtensionStartGetRequest) ExtId(extId string) ApiExtensionStartAuthExtensionStartGetRequest { - r.extId = &extId - return r -} - -func (r ApiExtensionStartAuthExtensionStartGetRequest) Execute() (*http.Response, error) { - return r.ApiService.ExtensionStartAuthExtensionStartGetExecute(r) -} - -/* -ExtensionStartAuthExtensionStartGet Extension Start - -Begin a sign-in flow on behalf of a Chrome extension. - -Provider follows AUTH_MODE (WorkOS AuthKit or the TokenCanopy hub), -exactly like /auth/login. Stamps `for=ext` + `ext_id` into the -signed OAuth state so the callback handler knows to render the -extension handoff page instead of setting a session cookie. - -Three short-circuits, all surface as actionable errors: - * EXTENSION_AUTH_DISABLED (503): kill switch flipped off. - * UNKNOWN_EXTENSION (400): `ext_id` not on the allow-list. - * Missing `ext_id` query string (400 INVALID_REQUEST). - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiExtensionStartAuthExtensionStartGetRequest -*/ -func (a *DefaultAPIService) ExtensionStartAuthExtensionStartGet(ctx context.Context) ApiExtensionStartAuthExtensionStartGetRequest { - return ApiExtensionStartAuthExtensionStartGetRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *DefaultAPIService) ExtensionStartAuthExtensionStartGetExecute(r ApiExtensionStartAuthExtensionStartGetRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ExtensionStartAuthExtensionStartGet") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/auth/extension/start" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.extId != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "ext_id", r.extId, "form", "") - } - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 503 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiFindV0FindGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - q *string - mode *string - label *[]string - fileType *string - prefix *string - modality *[]*string - updatedAfter *time.Time - updatedBefore *time.Time - limit *int32 -} - -func (r ApiFindV0FindGetRequest) Q(q string) ApiFindV0FindGetRequest { - r.q = &q - return r -} - -func (r ApiFindV0FindGetRequest) Mode(mode string) ApiFindV0FindGetRequest { - r.mode = &mode - return r -} - -func (r ApiFindV0FindGetRequest) Label(label []string) ApiFindV0FindGetRequest { - r.label = &label - return r -} - -func (r ApiFindV0FindGetRequest) FileType(fileType string) ApiFindV0FindGetRequest { - r.fileType = &fileType - return r -} - -func (r ApiFindV0FindGetRequest) Prefix(prefix string) ApiFindV0FindGetRequest { - r.prefix = &prefix - return r -} - -func (r ApiFindV0FindGetRequest) Modality(modality []*string) ApiFindV0FindGetRequest { - r.modality = &modality - return r -} - -func (r ApiFindV0FindGetRequest) UpdatedAfter(updatedAfter time.Time) ApiFindV0FindGetRequest { - r.updatedAfter = &updatedAfter - return r -} - -func (r ApiFindV0FindGetRequest) UpdatedBefore(updatedBefore time.Time) ApiFindV0FindGetRequest { - r.updatedBefore = &updatedBefore - return r -} - -func (r ApiFindV0FindGetRequest) Limit(limit int32) ApiFindV0FindGetRequest { - r.limit = &limit - return r -} - -func (r ApiFindV0FindGetRequest) Execute() (*FindPage, *http.Response, error) { - return r.ApiService.FindV0FindGetExecute(r) -} - -/* -FindV0FindGet Hybrid passage retrieval over the full file body - -Passage-level chunk RAG over `embed_chunks`. Lexical (`chunk_tsv`, GIN) + semantic (HNSW over `embedding`) are run in parallel and fused via Reciprocal Rank Fusion (k=60). Unlike `/v0/search`, which only sees the first ~16 KB preview of each artifact, `/v0/find` reaches the full file body. - -**Modes:** -- `hybrid` (default) — lexical + semantic, RRF-fused. -- `lexical` — `chunk_tsv` only. Best for exact tokens, identifiers, code snippets. -- `semantic` — embedding only. Best for conceptual queries where the surface terms differ from the query phrasing. - -**Granularity:** results are passages, not files. A long document with multiple matching regions returns multiple hits with distinct `ord` values; consecutive `ord`s overlap by ~400 tokens. Dedupe by `art_id` if you want one row per file. - -**Span citations:** `char_start`/`char_end` for text & code, `page_start`/`page_end` for PDFs, `time_start_ms`/`time_end_ms` for audio & video. Only the modality-relevant pair is populated. - -**Filters:** `label`, `file_type`, `prefix`, `modality` (repeatable), `updated_after` / `updated_before` (RFC 3339 timestamps, inclusive bounds on `updated_at`, applied to both legs). - -**Wiki coverage:** `/v0/find` excludes `_wiki/` paths by default and — importantly — does NOT cover them even when the caller passes `prefix=_wiki/...`. Wiki pages are not embedded by the pipeline (they're system-generated output, not user input), so `embed_chunks` has no rows for them and the join returns empty. Use `wiki_search` (or `list`/`grep` with a `_wiki/` prefix) for the wiki layer. - -**Embedding availability:** when `GEMINI_API_KEY` is not configured, `mode=semantic` returns 503; `mode=hybrid` logs a warning and falls back to lexical-only; `mode=lexical` is unaffected. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiFindV0FindGetRequest -*/ -func (a *DefaultAPIService) FindV0FindGet(ctx context.Context) ApiFindV0FindGetRequest { - return ApiFindV0FindGetRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return FindPage -func (a *DefaultAPIService) FindV0FindGetExecute(r ApiFindV0FindGetRequest) (*FindPage, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *FindPage - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.FindV0FindGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/find" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.q == nil { - return localVarReturnValue, nil, reportError("q is required and must be specified") - } - if strlen(*r.q) < 1 { - return localVarReturnValue, nil, reportError("q must have at least 1 elements") - } - if strlen(*r.q) > 500 { - return localVarReturnValue, nil, reportError("q must have less than 500 elements") - } - - parameterAddToHeaderOrQuery(localVarQueryParams, "q", r.q, "form", "") - if r.mode != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "mode", r.mode, "form", "") - } else { - var defaultValue string = "hybrid" - parameterAddToHeaderOrQuery(localVarQueryParams, "mode", defaultValue, "form", "") - r.mode = &defaultValue - } - if r.label != nil { - t := *r.label - if reflect.TypeOf(t).Kind() == reflect.Slice { - s := reflect.ValueOf(t) - for i := 0; i < s.Len(); i++ { - parameterAddToHeaderOrQuery(localVarQueryParams, "label", s.Index(i).Interface(), "form", "multi") - } - } else { - parameterAddToHeaderOrQuery(localVarQueryParams, "label", t, "form", "multi") - } - } - if r.fileType != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "file_type", r.fileType, "form", "") - } - if r.prefix != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "prefix", r.prefix, "form", "") - } - if r.modality != nil { - t := *r.modality - if reflect.TypeOf(t).Kind() == reflect.Slice { - s := reflect.ValueOf(t) - for i := 0; i < s.Len(); i++ { - parameterAddToHeaderOrQuery(localVarQueryParams, "modality", s.Index(i).Interface(), "form", "multi") - } - } else { - parameterAddToHeaderOrQuery(localVarQueryParams, "modality", t, "form", "multi") - } - } - if r.updatedAfter != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "updated_after", r.updatedAfter, "form", "") - } - if r.updatedBefore != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "updated_before", r.updatedBefore, "form", "") - } - if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") - } else { - var defaultValue int32 = 20 - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", defaultValue, "form", "") - r.limit = &defaultValue - } - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 503 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetArtifactByIdMetaV0ArtifactsArtIdMetaGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - artId string -} - -func (r ApiGetArtifactByIdMetaV0ArtifactsArtIdMetaGetRequest) Execute() (*ArtifactOut, *http.Response, error) { - return r.ApiService.GetArtifactByIdMetaV0ArtifactsArtIdMetaGetExecute(r) -} - -/* -GetArtifactByIdMetaV0ArtifactsArtIdMetaGet Artifact metadata by stable ID (same shape as path /meta) - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param artId - @return ApiGetArtifactByIdMetaV0ArtifactsArtIdMetaGetRequest -*/ -func (a *DefaultAPIService) GetArtifactByIdMetaV0ArtifactsArtIdMetaGet(ctx context.Context, artId string) ApiGetArtifactByIdMetaV0ArtifactsArtIdMetaGetRequest { - return ApiGetArtifactByIdMetaV0ArtifactsArtIdMetaGetRequest{ - ApiService: a, - ctx: ctx, - artId: artId, - } -} - -// Execute executes the request -// @return ArtifactOut -func (a *DefaultAPIService) GetArtifactByIdMetaV0ArtifactsArtIdMetaGetExecute(r ApiGetArtifactByIdMetaV0ArtifactsArtIdMetaGetRequest) (*ArtifactOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ArtifactOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetArtifactByIdMetaV0ArtifactsArtIdMetaGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/artifacts/{art_id}/meta" - localVarPath = strings.Replace(localVarPath, "{"+"art_id"+"}", url.PathEscape(parameterValueToString(r.artId, "artId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetArtifactByIdV0ArtifactsArtIdGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - artId string -} - -func (r ApiGetArtifactByIdV0ArtifactsArtIdGetRequest) Execute() (*ArtifactOut, *http.Response, error) { - return r.ApiService.GetArtifactByIdV0ArtifactsArtIdGetExecute(r) -} - -/* -GetArtifactByIdV0ArtifactsArtIdGet Canonical lookup of an artifact by its stable ID - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param artId - @return ApiGetArtifactByIdV0ArtifactsArtIdGetRequest -*/ -func (a *DefaultAPIService) GetArtifactByIdV0ArtifactsArtIdGet(ctx context.Context, artId string) ApiGetArtifactByIdV0ArtifactsArtIdGetRequest { - return ApiGetArtifactByIdV0ArtifactsArtIdGetRequest{ - ApiService: a, - ctx: ctx, - artId: artId, - } -} - -// Execute executes the request -// @return ArtifactOut -func (a *DefaultAPIService) GetArtifactByIdV0ArtifactsArtIdGetExecute(r ApiGetArtifactByIdV0ArtifactsArtIdGetRequest) (*ArtifactOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ArtifactOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetArtifactByIdV0ArtifactsArtIdGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/artifacts/{art_id}" - localVarPath = strings.Replace(localVarPath, "{"+"art_id"+"}", url.PathEscape(parameterValueToString(r.artId, "artId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetArtifactMetaV0ArtifactsPathMetaGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - path string -} - -func (r ApiGetArtifactMetaV0ArtifactsPathMetaGetRequest) Execute() (*ArtifactOut, *http.Response, error) { - return r.ApiService.GetArtifactMetaV0ArtifactsPathMetaGetExecute(r) -} - -/* -GetArtifactMetaV0ArtifactsPathMetaGet Get Artifact Meta - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param path - @return ApiGetArtifactMetaV0ArtifactsPathMetaGetRequest -*/ -func (a *DefaultAPIService) GetArtifactMetaV0ArtifactsPathMetaGet(ctx context.Context, path string) ApiGetArtifactMetaV0ArtifactsPathMetaGetRequest { - return ApiGetArtifactMetaV0ArtifactsPathMetaGetRequest{ - ApiService: a, - ctx: ctx, - path: path, - } -} - -// Execute executes the request -// @return ArtifactOut -func (a *DefaultAPIService) GetArtifactMetaV0ArtifactsPathMetaGetExecute(r ApiGetArtifactMetaV0ArtifactsPathMetaGetRequest) (*ArtifactOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ArtifactOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetArtifactMetaV0ArtifactsPathMetaGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/artifacts/{path}/meta" - localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", url.PathEscape(parameterValueToString(r.path, "path")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - artId string - versionNumber int32 -} - -func (r ApiGetArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGetRequest) Execute() (*VersionOut, *http.Response, error) { - return r.ApiService.GetArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGetExecute(r) -} - -/* -GetArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGet Metadata for a specific version of an artifact - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param artId - @param versionNumber - @return ApiGetArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGetRequest -*/ -func (a *DefaultAPIService) GetArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGet(ctx context.Context, artId string, versionNumber int32) ApiGetArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGetRequest { - return ApiGetArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGetRequest{ - ApiService: a, - ctx: ctx, - artId: artId, - versionNumber: versionNumber, - } -} - -// Execute executes the request -// @return VersionOut -func (a *DefaultAPIService) GetArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGetExecute(r ApiGetArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGetRequest) (*VersionOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *VersionOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/artifacts/{art_id}/versions/{version_number}" - localVarPath = strings.Replace(localVarPath, "{"+"art_id"+"}", url.PathEscape(parameterValueToString(r.artId, "artId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"version_number"+"}", url.PathEscape(parameterValueToString(r.versionNumber, "versionNumber")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 410 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetDriveRouteV0DrivesDriveIdGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - driveId string -} - -func (r ApiGetDriveRouteV0DrivesDriveIdGetRequest) Execute() (*DriveReadOut, *http.Response, error) { - return r.ApiService.GetDriveRouteV0DrivesDriveIdGetExecute(r) -} - -/* -GetDriveRouteV0DrivesDriveIdGet Drive overview by id (same shape as /drives/me) - -Identical to `GET /v0/drives/me` — the by-id singleton so `Location`-style URLs and scripted clients can address the drive canonically. The path-param `drive_id` MUST match the authenticated drive (mirrors the delete/trash routes' no-leak 404). Emits the drive's composite `ETag` header (`".0."`). - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param driveId - @return ApiGetDriveRouteV0DrivesDriveIdGetRequest -*/ -func (a *DefaultAPIService) GetDriveRouteV0DrivesDriveIdGet(ctx context.Context, driveId string) ApiGetDriveRouteV0DrivesDriveIdGetRequest { - return ApiGetDriveRouteV0DrivesDriveIdGetRequest{ - ApiService: a, - ctx: ctx, - driveId: driveId, - } -} - -// Execute executes the request -// @return DriveReadOut -func (a *DefaultAPIService) GetDriveRouteV0DrivesDriveIdGetExecute(r ApiGetDriveRouteV0DrivesDriveIdGetRequest) (*DriveReadOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *DriveReadOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetDriveRouteV0DrivesDriveIdGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/drives/{drive_id}" - localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetFeedbackStatusV0FeedbackFbkIdGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - fbkId string -} - -func (r ApiGetFeedbackStatusV0FeedbackFbkIdGetRequest) Execute() (*FeedbackStatusOut, *http.Response, error) { - return r.ApiService.GetFeedbackStatusV0FeedbackFbkIdGetExecute(r) -} - -/* -GetFeedbackStatusV0FeedbackFbkIdGet Get Feedback Status - -Lifecycle status of feedback THIS drive filed. Foreign tickets -read as 404 — indistinguishable from absent. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param fbkId - @return ApiGetFeedbackStatusV0FeedbackFbkIdGetRequest -*/ -func (a *DefaultAPIService) GetFeedbackStatusV0FeedbackFbkIdGet(ctx context.Context, fbkId string) ApiGetFeedbackStatusV0FeedbackFbkIdGetRequest { - return ApiGetFeedbackStatusV0FeedbackFbkIdGetRequest{ - ApiService: a, - ctx: ctx, - fbkId: fbkId, - } -} - -// Execute executes the request -// @return FeedbackStatusOut -func (a *DefaultAPIService) GetFeedbackStatusV0FeedbackFbkIdGetExecute(r ApiGetFeedbackStatusV0FeedbackFbkIdGetRequest) (*FeedbackStatusOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *FeedbackStatusOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetFeedbackStatusV0FeedbackFbkIdGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/feedback/{fbk_id}" - localVarPath = strings.Replace(localVarPath, "{"+"fbk_id"+"}", url.PathEscape(parameterValueToString(r.fbkId, "fbkId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetFolderByIdMetaV0FoldersFldIdMetaGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - fldId string -} - -func (r ApiGetFolderByIdMetaV0FoldersFldIdMetaGetRequest) Execute() (*FolderOut, *http.Response, error) { - return r.ApiService.GetFolderByIdMetaV0FoldersFldIdMetaGetExecute(r) -} - -/* -GetFolderByIdMetaV0FoldersFldIdMetaGet Folder metadata by stable ID (same shape as the bare id route) - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param fldId - @return ApiGetFolderByIdMetaV0FoldersFldIdMetaGetRequest -*/ -func (a *DefaultAPIService) GetFolderByIdMetaV0FoldersFldIdMetaGet(ctx context.Context, fldId string) ApiGetFolderByIdMetaV0FoldersFldIdMetaGetRequest { - return ApiGetFolderByIdMetaV0FoldersFldIdMetaGetRequest{ - ApiService: a, - ctx: ctx, - fldId: fldId, - } -} - -// Execute executes the request -// @return FolderOut -func (a *DefaultAPIService) GetFolderByIdMetaV0FoldersFldIdMetaGetExecute(r ApiGetFolderByIdMetaV0FoldersFldIdMetaGetRequest) (*FolderOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *FolderOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetFolderByIdMetaV0FoldersFldIdMetaGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/folders/{fld_id}/meta" - localVarPath = strings.Replace(localVarPath, "{"+"fld_id"+"}", url.PathEscape(parameterValueToString(r.fldId, "fldId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetFolderByIdV0FoldersFldIdGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - fldId string -} - -func (r ApiGetFolderByIdV0FoldersFldIdGetRequest) Execute() (*FolderOut, *http.Response, error) { - return r.ApiService.GetFolderByIdV0FoldersFldIdGetExecute(r) -} - -/* -GetFolderByIdV0FoldersFldIdGet Canonical lookup of a folder by its stable ID - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param fldId - @return ApiGetFolderByIdV0FoldersFldIdGetRequest -*/ -func (a *DefaultAPIService) GetFolderByIdV0FoldersFldIdGet(ctx context.Context, fldId string) ApiGetFolderByIdV0FoldersFldIdGetRequest { - return ApiGetFolderByIdV0FoldersFldIdGetRequest{ - ApiService: a, - ctx: ctx, - fldId: fldId, - } -} - -// Execute executes the request -// @return FolderOut -func (a *DefaultAPIService) GetFolderByIdV0FoldersFldIdGetExecute(r ApiGetFolderByIdV0FoldersFldIdGetRequest) (*FolderOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *FolderOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetFolderByIdV0FoldersFldIdGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/folders/{fld_id}" - localVarPath = strings.Replace(localVarPath, "{"+"fld_id"+"}", url.PathEscape(parameterValueToString(r.fldId, "fldId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetFolderByPathMetaV0FoldersPathMetaGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - path string -} - -func (r ApiGetFolderByPathMetaV0FoldersPathMetaGetRequest) Execute() (*FolderOut, *http.Response, error) { - return r.ApiService.GetFolderByPathMetaV0FoldersPathMetaGetExecute(r) -} - -/* -GetFolderByPathMetaV0FoldersPathMetaGet Folder metadata by path (same shape as the bare path route) - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param path - @return ApiGetFolderByPathMetaV0FoldersPathMetaGetRequest -*/ -func (a *DefaultAPIService) GetFolderByPathMetaV0FoldersPathMetaGet(ctx context.Context, path string) ApiGetFolderByPathMetaV0FoldersPathMetaGetRequest { - return ApiGetFolderByPathMetaV0FoldersPathMetaGetRequest{ - ApiService: a, - ctx: ctx, - path: path, - } -} - -// Execute executes the request -// @return FolderOut -func (a *DefaultAPIService) GetFolderByPathMetaV0FoldersPathMetaGetExecute(r ApiGetFolderByPathMetaV0FoldersPathMetaGetRequest) (*FolderOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *FolderOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetFolderByPathMetaV0FoldersPathMetaGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/folders/{path}/meta" - localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", url.PathEscape(parameterValueToString(r.path, "path")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetFolderByPathV0FoldersPathGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - path string -} - -func (r ApiGetFolderByPathV0FoldersPathGetRequest) Execute() (*FolderOut, *http.Response, error) { - return r.ApiService.GetFolderByPathV0FoldersPathGetExecute(r) -} - -/* -GetFolderByPathV0FoldersPathGet Read folder metadata by path - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param path - @return ApiGetFolderByPathV0FoldersPathGetRequest -*/ -func (a *DefaultAPIService) GetFolderByPathV0FoldersPathGet(ctx context.Context, path string) ApiGetFolderByPathV0FoldersPathGetRequest { - return ApiGetFolderByPathV0FoldersPathGetRequest{ - ApiService: a, - ctx: ctx, - path: path, - } -} - -// Execute executes the request -// @return FolderOut -func (a *DefaultAPIService) GetFolderByPathV0FoldersPathGetExecute(r ApiGetFolderByPathV0FoldersPathGetRequest) (*FolderOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *FolderOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetFolderByPathV0FoldersPathGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/folders/{path}" - localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", url.PathEscape(parameterValueToString(r.path, "path")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetGrantRouteV0GrantsGrnIdGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - grnId string -} - -func (r ApiGetGrantRouteV0GrantsGrnIdGetRequest) Execute() (*GrantOut, *http.Response, error) { - return r.ApiService.GetGrantRouteV0GrantsGrnIdGetExecute(r) -} - -/* -GetGrantRouteV0GrantsGrnIdGet Read a single grant (can_manage, or the grant's own principal) - -The `Location` target of `POST /v0/grants`. Authorization mirrors -DELETE: `can_manage` on the granted resource, or the caller IS the -grant's own principal (a grantee may read — like revoke — their own -grant). A revoked grant reads as 404 (same no-leak shape as a -foreign/absent id); DELETE stays idempotent on it. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param grnId - @return ApiGetGrantRouteV0GrantsGrnIdGetRequest -*/ -func (a *DefaultAPIService) GetGrantRouteV0GrantsGrnIdGet(ctx context.Context, grnId string) ApiGetGrantRouteV0GrantsGrnIdGetRequest { - return ApiGetGrantRouteV0GrantsGrnIdGetRequest{ - ApiService: a, - ctx: ctx, - grnId: grnId, - } -} - -// Execute executes the request -// @return GrantOut -func (a *DefaultAPIService) GetGrantRouteV0GrantsGrnIdGetExecute(r ApiGetGrantRouteV0GrantsGrnIdGetRequest) (*GrantOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GrantOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetGrantRouteV0GrantsGrnIdGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/grants/{grn_id}" - localVarPath = strings.Replace(localVarPath, "{"+"grn_id"+"}", url.PathEscape(parameterValueToString(r.grnId, "grnId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetJobLogsV0JobsJobIdLogsGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - jobId string -} - -func (r ApiGetJobLogsV0JobsJobIdLogsGetRequest) Execute() (string, *http.Response, error) { - return r.ApiService.GetJobLogsV0JobsJobIdLogsGetExecute(r) -} - -/* -GetJobLogsV0JobsJobIdLogsGet Raw compile log (text/plain) - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param jobId - @return ApiGetJobLogsV0JobsJobIdLogsGetRequest -*/ -func (a *DefaultAPIService) GetJobLogsV0JobsJobIdLogsGet(ctx context.Context, jobId string) ApiGetJobLogsV0JobsJobIdLogsGetRequest { - return ApiGetJobLogsV0JobsJobIdLogsGetRequest{ - ApiService: a, - ctx: ctx, - jobId: jobId, - } -} - -// Execute executes the request -// @return string -func (a *DefaultAPIService) GetJobLogsV0JobsJobIdLogsGetExecute(r ApiGetJobLogsV0JobsJobIdLogsGetRequest) (string, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue string - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetJobLogsV0JobsJobIdLogsGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/jobs/{job_id}/logs" - localVarPath = strings.Replace(localVarPath, "{"+"job_id"+"}", url.PathEscape(parameterValueToString(r.jobId, "jobId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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{"text/plain", "application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetJobV0JobsJobIdGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - jobId string -} - -func (r ApiGetJobV0JobsJobIdGetRequest) Execute() (*CompileJobOut, *http.Response, error) { - return r.ApiService.GetJobV0JobsJobIdGetExecute(r) -} - -/* -GetJobV0JobsJobIdGet Poll a job - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param jobId - @return ApiGetJobV0JobsJobIdGetRequest -*/ -func (a *DefaultAPIService) GetJobV0JobsJobIdGet(ctx context.Context, jobId string) ApiGetJobV0JobsJobIdGetRequest { - return ApiGetJobV0JobsJobIdGetRequest{ - ApiService: a, - ctx: ctx, - jobId: jobId, - } -} - -// Execute executes the request -// @return CompileJobOut -func (a *DefaultAPIService) GetJobV0JobsJobIdGetExecute(r ApiGetJobV0JobsJobIdGetRequest) (*CompileJobOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *CompileJobOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetJobV0JobsJobIdGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/jobs/{job_id}" - localVarPath = strings.Replace(localVarPath, "{"+"job_id"+"}", url.PathEscape(parameterValueToString(r.jobId, "jobId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetProjectV0ProjectsFldIdGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - fldId string -} - -func (r ApiGetProjectV0ProjectsFldIdGetRequest) Execute() (*CompileProjectOut, *http.Response, error) { - return r.ApiService.GetProjectV0ProjectsFldIdGetExecute(r) -} - -/* -GetProjectV0ProjectsFldIdGet Get a project's compile config - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param fldId - @return ApiGetProjectV0ProjectsFldIdGetRequest -*/ -func (a *DefaultAPIService) GetProjectV0ProjectsFldIdGet(ctx context.Context, fldId string) ApiGetProjectV0ProjectsFldIdGetRequest { - return ApiGetProjectV0ProjectsFldIdGetRequest{ - ApiService: a, - ctx: ctx, - fldId: fldId, - } -} - -// Execute executes the request -// @return CompileProjectOut -func (a *DefaultAPIService) GetProjectV0ProjectsFldIdGetExecute(r ApiGetProjectV0ProjectsFldIdGetRequest) (*CompileProjectOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *CompileProjectOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetProjectV0ProjectsFldIdGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/projects/{fld_id}" - localVarPath = strings.Replace(localVarPath, "{"+"fld_id"+"}", url.PathEscape(parameterValueToString(r.fldId, "fldId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetShareRouteV0SharesShrIdGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - shrId string -} - -func (r ApiGetShareRouteV0SharesShrIdGetRequest) Execute() (*ShareOut, *http.Response, error) { - return r.ApiService.GetShareRouteV0SharesShrIdGetExecute(r) -} - -/* -GetShareRouteV0SharesShrIdGet Read a single share link's metadata (requires can_manage) - -The `Location` target of `POST /v0/shares`. Metadata ONLY — -`ShareOut` never carries the raw `share_key`/URL (returned exactly -once at mint/rotate, §4.5). Authorization mirrors DELETE: -`can_manage` on the shared resource. A revoked share reads as 404 -(same no-leak shape as a foreign/absent id). - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param shrId - @return ApiGetShareRouteV0SharesShrIdGetRequest -*/ -func (a *DefaultAPIService) GetShareRouteV0SharesShrIdGet(ctx context.Context, shrId string) ApiGetShareRouteV0SharesShrIdGetRequest { - return ApiGetShareRouteV0SharesShrIdGetRequest{ - ApiService: a, - ctx: ctx, - shrId: shrId, - } -} - -// Execute executes the request -// @return ShareOut -func (a *DefaultAPIService) GetShareRouteV0SharesShrIdGetExecute(r ApiGetShareRouteV0SharesShrIdGetRequest) (*ShareOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ShareOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetShareRouteV0SharesShrIdGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/shares/{shr_id}" - localVarPath = strings.Replace(localVarPath, "{"+"shr_id"+"}", url.PathEscape(parameterValueToString(r.shrId, "shrId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiGetUploadStatusV0UploadsUploadIdGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - uploadId string -} - -func (r ApiGetUploadStatusV0UploadsUploadIdGetRequest) Execute() (*UploadStatusOut, *http.Response, error) { - return r.ApiService.GetUploadStatusV0UploadsUploadIdGetExecute(r) -} - -/* -GetUploadStatusV0UploadsUploadIdGet Get the status of a large (direct-to-GCS) upload session - -Report the live state of an upload session begun at `/v0/uploads`. `state` is derived: `initiated` (open — PUT the bytes then commit), `committed` (artifact created), `aborted` (released via DELETE), or `expired` (past `expires_at` without a commit). Read-only; charges the read budget. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param uploadId - @return ApiGetUploadStatusV0UploadsUploadIdGetRequest -*/ -func (a *DefaultAPIService) GetUploadStatusV0UploadsUploadIdGet(ctx context.Context, uploadId string) ApiGetUploadStatusV0UploadsUploadIdGetRequest { - return ApiGetUploadStatusV0UploadsUploadIdGetRequest{ - ApiService: a, - ctx: ctx, - uploadId: uploadId, - } -} - -// Execute executes the request -// @return UploadStatusOut -func (a *DefaultAPIService) GetUploadStatusV0UploadsUploadIdGetExecute(r ApiGetUploadStatusV0UploadsUploadIdGetRequest) (*UploadStatusOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *UploadStatusOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetUploadStatusV0UploadsUploadIdGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/uploads/{upload_id}" - localVarPath = strings.Replace(localVarPath, "{"+"upload_id"+"}", url.PathEscape(parameterValueToString(r.uploadId, "uploadId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiHealthHealthGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService -} - -func (r ApiHealthHealthGetRequest) Execute() (*HealthOut, *http.Response, error) { - return r.ApiService.HealthHealthGetExecute(r) -} - -/* -HealthHealthGet Health - -Liveness + DB-reachability probe. Used by Cloud Run / k8s healthchecks -and any uptime monitor. Returns 200 only if the DB pool can serve a -trivial query; 503 otherwise so the orchestrator can pull the instance -out of rotation. - -NOTE: route is `/health`, NOT `/healthz`. Google's edge infrastructure -intercepts `/healthz` (legacy kubernetes-reserved path) and returns a -generic 404 before traffic reaches Cloud Run — discovered the hard way -during the first prod deploy. Don't rename back. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiHealthHealthGetRequest -*/ -func (a *DefaultAPIService) HealthHealthGet(ctx context.Context) ApiHealthHealthGetRequest { - return ApiHealthHealthGetRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return HealthOut -func (a *DefaultAPIService) HealthHealthGetExecute(r ApiHealthHealthGetRequest) (*HealthOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *HealthOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.HealthHealthGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/health" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 503 { - var v HealthDegradedResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListArtifactVersionsV0ArtifactsArtIdVersionsGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - artId string - cursor *string - limit *int32 -} - -func (r ApiListArtifactVersionsV0ArtifactsArtIdVersionsGetRequest) Cursor(cursor string) ApiListArtifactVersionsV0ArtifactsArtIdVersionsGetRequest { - r.cursor = &cursor - return r -} - -func (r ApiListArtifactVersionsV0ArtifactsArtIdVersionsGetRequest) Limit(limit int32) ApiListArtifactVersionsV0ArtifactsArtIdVersionsGetRequest { - r.limit = &limit - return r -} - -func (r ApiListArtifactVersionsV0ArtifactsArtIdVersionsGetRequest) Execute() (*VersionPage, *http.Response, error) { - return r.ApiService.ListArtifactVersionsV0ArtifactsArtIdVersionsGetExecute(r) -} - -/* -ListArtifactVersionsV0ArtifactsArtIdVersionsGet List versions of an artifact, newest first - -Returns versions in descending `version_number` order. Cursor pagination via `?cursor=`; `next_cursor` is non-null when the page is full and more older versions may exist. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param artId - @return ApiListArtifactVersionsV0ArtifactsArtIdVersionsGetRequest -*/ -func (a *DefaultAPIService) ListArtifactVersionsV0ArtifactsArtIdVersionsGet(ctx context.Context, artId string) ApiListArtifactVersionsV0ArtifactsArtIdVersionsGetRequest { - return ApiListArtifactVersionsV0ArtifactsArtIdVersionsGetRequest{ - ApiService: a, - ctx: ctx, - artId: artId, - } -} - -// Execute executes the request -// @return VersionPage -func (a *DefaultAPIService) ListArtifactVersionsV0ArtifactsArtIdVersionsGetExecute(r ApiListArtifactVersionsV0ArtifactsArtIdVersionsGetRequest) (*VersionPage, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *VersionPage - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListArtifactVersionsV0ArtifactsArtIdVersionsGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/artifacts/{art_id}/versions" - localVarPath = strings.Replace(localVarPath, "{"+"art_id"+"}", url.PathEscape(parameterValueToString(r.artId, "artId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.cursor != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") - } - if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") - } else { - var defaultValue int32 = 50 - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", defaultValue, "form", "") - r.limit = &defaultValue - } - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListArtifactsV0ArtifactsGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - prefix *string - label *[]*string - fileType *string - cursor *string - limit *int32 -} - -func (r ApiListArtifactsV0ArtifactsGetRequest) Prefix(prefix string) ApiListArtifactsV0ArtifactsGetRequest { - r.prefix = &prefix - return r -} - -func (r ApiListArtifactsV0ArtifactsGetRequest) Label(label []*string) ApiListArtifactsV0ArtifactsGetRequest { - r.label = &label - return r -} - -func (r ApiListArtifactsV0ArtifactsGetRequest) FileType(fileType string) ApiListArtifactsV0ArtifactsGetRequest { - r.fileType = &fileType - return r -} - -func (r ApiListArtifactsV0ArtifactsGetRequest) Cursor(cursor string) ApiListArtifactsV0ArtifactsGetRequest { - r.cursor = &cursor - return r -} - -func (r ApiListArtifactsV0ArtifactsGetRequest) Limit(limit int32) ApiListArtifactsV0ArtifactsGetRequest { - r.limit = &limit - return r -} - -func (r ApiListArtifactsV0ArtifactsGetRequest) Execute() (*Page, *http.Response, error) { - return r.ApiService.ListArtifactsV0ArtifactsGetExecute(r) -} - -/* -ListArtifactsV0ArtifactsGet List artifacts in the drive - -Returns artifacts sorted by path. Filter by `prefix`, `label` (repeatable + AND-combined), and `file_type`. - -**Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page. `next_cursor` is `null` on the final page. Filters MUST stay consistent across pages — the cursor encodes only the keyset position, not the filter set, so the client is responsible for re-sending the same filter on each page. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListArtifactsV0ArtifactsGetRequest -*/ -func (a *DefaultAPIService) ListArtifactsV0ArtifactsGet(ctx context.Context) ApiListArtifactsV0ArtifactsGetRequest { - return ApiListArtifactsV0ArtifactsGetRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return Page -func (a *DefaultAPIService) ListArtifactsV0ArtifactsGetExecute(r ApiListArtifactsV0ArtifactsGetRequest) (*Page, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *Page - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListArtifactsV0ArtifactsGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/artifacts" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.prefix != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "prefix", r.prefix, "form", "") - } else { - var defaultValue string = "" - parameterAddToHeaderOrQuery(localVarQueryParams, "prefix", defaultValue, "form", "") - r.prefix = &defaultValue - } - if r.label != nil { - t := *r.label - if reflect.TypeOf(t).Kind() == reflect.Slice { - s := reflect.ValueOf(t) - for i := 0; i < s.Len(); i++ { - parameterAddToHeaderOrQuery(localVarQueryParams, "label", s.Index(i).Interface(), "form", "multi") - } - } else { - parameterAddToHeaderOrQuery(localVarQueryParams, "label", t, "form", "multi") - } - } - if r.fileType != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "file_type", r.fileType, "form", "") - } - if r.cursor != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") - } - if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") - } else { - var defaultValue int32 = 50 - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", defaultValue, "form", "") - r.limit = &defaultValue - } - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListEventsRouteV0EventsGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - artId *string - action *string - since *time.Time - before *time.Time - cursor *string - limit *int32 -} - -func (r ApiListEventsRouteV0EventsGetRequest) ArtId(artId string) ApiListEventsRouteV0EventsGetRequest { - r.artId = &artId - return r -} - -func (r ApiListEventsRouteV0EventsGetRequest) Action(action string) ApiListEventsRouteV0EventsGetRequest { - r.action = &action - return r -} - -func (r ApiListEventsRouteV0EventsGetRequest) Since(since time.Time) ApiListEventsRouteV0EventsGetRequest { - r.since = &since - return r -} - -func (r ApiListEventsRouteV0EventsGetRequest) Before(before time.Time) ApiListEventsRouteV0EventsGetRequest { - r.before = &before - return r -} - -func (r ApiListEventsRouteV0EventsGetRequest) Cursor(cursor string) ApiListEventsRouteV0EventsGetRequest { - r.cursor = &cursor - return r -} - -func (r ApiListEventsRouteV0EventsGetRequest) Limit(limit int32) ApiListEventsRouteV0EventsGetRequest { - r.limit = &limit - return r -} - -func (r ApiListEventsRouteV0EventsGetRequest) Execute() (*EventPage, *http.Response, error) { - return r.ApiService.ListEventsRouteV0EventsGetExecute(r) -} - -/* -ListEventsRouteV0EventsGet Read the append-only event log for the authenticated drive - -Returns events newest-first. Filters compose with AND. - -**Cursor pagination:** pass the oldest event's `created_at` from the previous page as `before` to fetch the next page back in time. Combine `since` + `before` to bound a window. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListEventsRouteV0EventsGetRequest -*/ -func (a *DefaultAPIService) ListEventsRouteV0EventsGet(ctx context.Context) ApiListEventsRouteV0EventsGetRequest { - return ApiListEventsRouteV0EventsGetRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return EventPage -func (a *DefaultAPIService) ListEventsRouteV0EventsGetExecute(r ApiListEventsRouteV0EventsGetRequest) (*EventPage, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *EventPage - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListEventsRouteV0EventsGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/events" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.artId != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "art_id", r.artId, "form", "") - } - if r.action != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "action", r.action, "form", "") - } - if r.since != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "since", r.since, "form", "") - } - if r.before != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "before", r.before, "form", "") - } - if r.cursor != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") - } - if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") - } else { - var defaultValue int32 = 50 - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", defaultValue, "form", "") - r.limit = &defaultValue - } - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListGrantsRouteV0GrantsGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - resource *string - cursor *string - limit *int32 -} - -// art_*_/fld_* id or a path -func (r ApiListGrantsRouteV0GrantsGetRequest) Resource(resource string) ApiListGrantsRouteV0GrantsGetRequest { - r.resource = &resource - return r -} - -func (r ApiListGrantsRouteV0GrantsGetRequest) Cursor(cursor string) ApiListGrantsRouteV0GrantsGetRequest { - r.cursor = &cursor - return r -} - -func (r ApiListGrantsRouteV0GrantsGetRequest) Limit(limit int32) ApiListGrantsRouteV0GrantsGetRequest { - r.limit = &limit - return r -} - -func (r ApiListGrantsRouteV0GrantsGetRequest) Execute() (*GrantList, *http.Response, error) { - return r.ApiService.ListGrantsRouteV0GrantsGetExecute(r) -} - -/* -ListGrantsRouteV0GrantsGet List live grants on a resource (requires can_manage) - -**Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. The `resource` filter must be re-sent on every page — the cursor encodes only the keyset position. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListGrantsRouteV0GrantsGetRequest -*/ -func (a *DefaultAPIService) ListGrantsRouteV0GrantsGet(ctx context.Context) ApiListGrantsRouteV0GrantsGetRequest { - return ApiListGrantsRouteV0GrantsGetRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return GrantList -func (a *DefaultAPIService) ListGrantsRouteV0GrantsGetExecute(r ApiListGrantsRouteV0GrantsGetRequest) (*GrantList, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GrantList - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListGrantsRouteV0GrantsGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/grants" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.resource == nil { - return localVarReturnValue, nil, reportError("resource is required and must be specified") - } - - parameterAddToHeaderOrQuery(localVarQueryParams, "resource", r.resource, "form", "") - if r.cursor != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") - } - if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") - } - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListProjectJobsV0ProjectsFldIdJobsGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - fldId string - status *string - limit *int32 - cursor *string -} - -func (r ApiListProjectJobsV0ProjectsFldIdJobsGetRequest) Status(status string) ApiListProjectJobsV0ProjectsFldIdJobsGetRequest { - r.status = &status - return r -} - -func (r ApiListProjectJobsV0ProjectsFldIdJobsGetRequest) Limit(limit int32) ApiListProjectJobsV0ProjectsFldIdJobsGetRequest { - r.limit = &limit - return r -} - -func (r ApiListProjectJobsV0ProjectsFldIdJobsGetRequest) Cursor(cursor string) ApiListProjectJobsV0ProjectsFldIdJobsGetRequest { - r.cursor = &cursor - return r -} - -func (r ApiListProjectJobsV0ProjectsFldIdJobsGetRequest) Execute() (*CompileJobListOut, *http.Response, error) { - return r.ApiService.ListProjectJobsV0ProjectsFldIdJobsGetExecute(r) -} - -/* -ListProjectJobsV0ProjectsFldIdJobsGet List a project's jobs - -List compile jobs newest first in stable `(created_at, job_id)` descending order. Pass a non-null `next_cursor` back as `cursor` to continue; malformed cursors return `400 BAD_CURSOR`. The cursor contains only the keyset position, so a `status` filter must be re-sent unchanged on every page. `limit` retains its existing default of 50 and validated range of 1 through 200. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param fldId - @return ApiListProjectJobsV0ProjectsFldIdJobsGetRequest -*/ -func (a *DefaultAPIService) ListProjectJobsV0ProjectsFldIdJobsGet(ctx context.Context, fldId string) ApiListProjectJobsV0ProjectsFldIdJobsGetRequest { - return ApiListProjectJobsV0ProjectsFldIdJobsGetRequest{ - ApiService: a, - ctx: ctx, - fldId: fldId, - } -} - -// Execute executes the request -// @return CompileJobListOut -func (a *DefaultAPIService) ListProjectJobsV0ProjectsFldIdJobsGetExecute(r ApiListProjectJobsV0ProjectsFldIdJobsGetRequest) (*CompileJobListOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *CompileJobListOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListProjectJobsV0ProjectsFldIdJobsGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/projects/{fld_id}/jobs" - localVarPath = strings.Replace(localVarPath, "{"+"fld_id"+"}", url.PathEscape(parameterValueToString(r.fldId, "fldId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.status != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "status", r.status, "form", "") - } - if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") - } else { - var defaultValue int32 = 50 - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", defaultValue, "form", "") - r.limit = &defaultValue - } - if r.cursor != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") - } - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListSharesRouteV0SharesGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - resource *string - cursor *string - limit *int32 -} - -// art_*_/fld_* id or a path -func (r ApiListSharesRouteV0SharesGetRequest) Resource(resource string) ApiListSharesRouteV0SharesGetRequest { - r.resource = &resource - return r -} - -func (r ApiListSharesRouteV0SharesGetRequest) Cursor(cursor string) ApiListSharesRouteV0SharesGetRequest { - r.cursor = &cursor - return r -} - -func (r ApiListSharesRouteV0SharesGetRequest) Limit(limit int32) ApiListSharesRouteV0SharesGetRequest { - r.limit = &limit - return r -} - -func (r ApiListSharesRouteV0SharesGetRequest) Execute() (*ShareList, *http.Response, error) { - return r.ApiService.ListSharesRouteV0SharesGetExecute(r) -} - -/* -ListSharesRouteV0SharesGet List live share links on a resource (requires can_manage) - -**Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. The `resource` filter must be re-sent on every page — the cursor encodes only the keyset position. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListSharesRouteV0SharesGetRequest -*/ -func (a *DefaultAPIService) ListSharesRouteV0SharesGet(ctx context.Context) ApiListSharesRouteV0SharesGetRequest { - return ApiListSharesRouteV0SharesGetRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return ShareList -func (a *DefaultAPIService) ListSharesRouteV0SharesGetExecute(r ApiListSharesRouteV0SharesGetRequest) (*ShareList, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ShareList - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListSharesRouteV0SharesGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/shares" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.resource == nil { - return localVarReturnValue, nil, reportError("resource is required and must be specified") - } - - parameterAddToHeaderOrQuery(localVarQueryParams, "resource", r.resource, "form", "") - if r.cursor != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") - } - if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") - } - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListTrashRouteV0DrivesDriveIdTrashGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - driveId string - cursor *string - limit *int32 -} - -func (r ApiListTrashRouteV0DrivesDriveIdTrashGetRequest) Cursor(cursor string) ApiListTrashRouteV0DrivesDriveIdTrashGetRequest { - r.cursor = &cursor - return r -} - -func (r ApiListTrashRouteV0DrivesDriveIdTrashGetRequest) Limit(limit int32) ApiListTrashRouteV0DrivesDriveIdTrashGetRequest { - r.limit = &limit - return r -} - -func (r ApiListTrashRouteV0DrivesDriveIdTrashGetRequest) Execute() (*TrashOut, *http.Response, error) { - return r.ApiService.ListTrashRouteV0DrivesDriveIdTrashGetExecute(r) -} - -/* -ListTrashRouteV0DrivesDriveIdTrashGet List the authenticated drive's trash - -Returns soft-deleted artifacts on the drive plus the drive's own soft-delete state (if applicable). The path-param `drive_id` MUST match the authenticated drive. - -**Compatibility window:** `limit` or `cursor` opts into cursor pagination. Unadorned requests retain the legacy complete result during the migration window. Paginated requests are clamped to 1–100 items (default 50 when only `cursor` is supplied). `items` is canonical; `artifacts` is a deprecated same-value alias. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param driveId - @return ApiListTrashRouteV0DrivesDriveIdTrashGetRequest -*/ -func (a *DefaultAPIService) ListTrashRouteV0DrivesDriveIdTrashGet(ctx context.Context, driveId string) ApiListTrashRouteV0DrivesDriveIdTrashGetRequest { - return ApiListTrashRouteV0DrivesDriveIdTrashGetRequest{ - ApiService: a, - ctx: ctx, - driveId: driveId, - } -} - -// Execute executes the request -// @return TrashOut -func (a *DefaultAPIService) ListTrashRouteV0DrivesDriveIdTrashGetExecute(r ApiListTrashRouteV0DrivesDriveIdTrashGetRequest) (*TrashOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *TrashOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListTrashRouteV0DrivesDriveIdTrashGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/drives/{drive_id}/trash" - localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.cursor != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") - } - if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") - } - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiLoginAuthLoginGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - returnTo *string -} - -func (r ApiLoginAuthLoginGetRequest) ReturnTo(returnTo string) ApiLoginAuthLoginGetRequest { - r.returnTo = &returnTo - return r -} - -func (r ApiLoginAuthLoginGetRequest) Execute() (*http.Response, error) { - return r.ApiService.LoginAuthLoginGetExecute(r) -} - -/* -LoginAuthLoginGet Login - -Begin a WorkOS sign-in flow. - -Mints a pre-login state cookie (binds the OAuth flow to this -browser — defense-in-depth against login-CSRF), signs a state -payload, and redirects to AuthKit. The hosted AuthKit page lets -the user pick Google OAuth, Microsoft OAuth, magic-link, -password, or passkey; we don't care which — they all funnel -back to /auth/callback with a `code` we exchange in D2. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiLoginAuthLoginGetRequest -*/ -func (a *DefaultAPIService) LoginAuthLoginGet(ctx context.Context) ApiLoginAuthLoginGetRequest { - return ApiLoginAuthLoginGetRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *DefaultAPIService) LoginAuthLoginGetExecute(r ApiLoginAuthLoginGetRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.LoginAuthLoginGet") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/auth/login" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.returnTo != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "return_to", r.returnTo, "form", "") - } - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiLogoutAuthLogoutPostRequest struct { - ctx context.Context - ApiService *DefaultAPIService - csrf *string -} - -func (r ApiLogoutAuthLogoutPostRequest) Csrf(csrf string) ApiLogoutAuthLogoutPostRequest { - r.csrf = &csrf - return r -} - -func (r ApiLogoutAuthLogoutPostRequest) Execute() (*http.Response, error) { - return r.ApiService.LogoutAuthLogoutPostExecute(r) -} - -/* -LogoutAuthLogoutPost Logout - -Terminate both the local session AND the upstream WorkOS session. - -Without the WorkOS-side termination, the next `/auth/login` flow -silently re-authenticates the user through AuthKit's still-valid -session cookie on `api.workos.com` — "Sign out" feels broken and -a shared-browser user can't switch accounts. The recommended -pattern (per https://workos.com/docs/authkit/sessions) is to -redirect to the WorkOS logout endpoint with the `sid` we stashed -during the callback; WorkOS clears its own session and returns -the browser to our `return_to`. - -Failure modes handled: - * No `workos_session_id` in the session (legacy v2 cookie issued - before this slice landed): fall back to local-only logout. The - upstream session lingers but the user's local state is cleared - — same UX as before this slice; cookie rotation on next sign-in - eventually overwrites it. - * SDK raises during `get_logout_url`: pure string formatting at - WorkOS's end, so the only realistic failure is a misconfigured - WorkOS dashboard (no Sign-out redirect registered). We catch - and fall back to local-only logout rather than 500ing — the - user clicked "Sign out", they should land somewhere, not on an - error page. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiLogoutAuthLogoutPostRequest -*/ -func (a *DefaultAPIService) LogoutAuthLogoutPost(ctx context.Context) ApiLogoutAuthLogoutPostRequest { - return ApiLogoutAuthLogoutPostRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *DefaultAPIService) LogoutAuthLogoutPostExecute(r ApiLogoutAuthLogoutPostRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.LogoutAuthLogoutPost") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/auth/logout" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.csrf == nil { - return nil, reportError("csrf is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} - - // 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 - } - parameterAddToHeaderOrQuery(localVarFormParams, "csrf", r.csrf, "", "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiMeUsageV0DrivesMeUsageGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService -} - -func (r ApiMeUsageV0DrivesMeUsageGetRequest) Execute() (*DriveUsageOut, *http.Response, error) { - return r.ApiService.MeUsageV0DrivesMeUsageGetExecute(r) -} - -/* -MeUsageV0DrivesMeUsageGet Current-period usage + caps for the authenticated drive - -Unified view of every metered dimension: storage (snapshot), writes (current hour), indexing ops + retrieval queries (current calendar month UTC). Each row carries `used` and `limit`; `limit: 0` means unlimited (the v0 free-tier default for the two monthly counters). Reads are de-throttled — there is no hourly read budget; the monthly read count appears under `ops_this_month.reads`. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiMeUsageV0DrivesMeUsageGetRequest -*/ -func (a *DefaultAPIService) MeUsageV0DrivesMeUsageGet(ctx context.Context) ApiMeUsageV0DrivesMeUsageGetRequest { - return ApiMeUsageV0DrivesMeUsageGetRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return DriveUsageOut -func (a *DefaultAPIService) MeUsageV0DrivesMeUsageGetExecute(r ApiMeUsageV0DrivesMeUsageGetRequest) (*DriveUsageOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *DriveUsageOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.MeUsageV0DrivesMeUsageGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/drives/me/usage" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiMeV0DrivesMeGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService -} - -func (r ApiMeV0DrivesMeGetRequest) Execute() (*DriveReadOut, *http.Response, error) { - return r.ApiService.MeV0DrivesMeGetExecute(r) -} - -/* -MeV0DrivesMeGet Me - -Drive overview for the authenticated bearer token. - -Wire-protocol preservation (WorkOS integration §6): the `email` field -is preserved in the response shape; its meaning is now "the drive's -owner's email" (via `drives.owner_user_id` → `users.email`, joined -in `auth.resolve_drive`). For solo signups this equals v0 behavior — -the email the user signed up with. Returns null if the owner has -been hard-purged. `organization_id` is a new additive field, as are -`metageneration` / `etag` (also emitted as the `ETag` header). - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiMeV0DrivesMeGetRequest -*/ -func (a *DefaultAPIService) MeV0DrivesMeGet(ctx context.Context) ApiMeV0DrivesMeGetRequest { - return ApiMeV0DrivesMeGetRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return DriveReadOut -func (a *DefaultAPIService) MeV0DrivesMeGetExecute(r ApiMeV0DrivesMeGetRequest) (*DriveReadOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *DriveReadOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.MeV0DrivesMeGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/drives/me" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiMoveArtifactRouteV0ArtifactsArtIdMovePostRequest struct { - ctx context.Context - ApiService *DefaultAPIService - artId string - artifactMoveIn *ArtifactMoveIn - xAgentdriveActor *string - ifMatch *string -} - -func (r ApiMoveArtifactRouteV0ArtifactsArtIdMovePostRequest) ArtifactMoveIn(artifactMoveIn ArtifactMoveIn) ApiMoveArtifactRouteV0ArtifactsArtIdMovePostRequest { - r.artifactMoveIn = &artifactMoveIn - return r -} - -func (r ApiMoveArtifactRouteV0ArtifactsArtIdMovePostRequest) XAgentdriveActor(xAgentdriveActor string) ApiMoveArtifactRouteV0ArtifactsArtIdMovePostRequest { - r.xAgentdriveActor = &xAgentdriveActor - return r -} - -func (r ApiMoveArtifactRouteV0ArtifactsArtIdMovePostRequest) IfMatch(ifMatch string) ApiMoveArtifactRouteV0ArtifactsArtIdMovePostRequest { - r.ifMatch = &ifMatch - return r -} - -func (r ApiMoveArtifactRouteV0ArtifactsArtIdMovePostRequest) Execute() (*ArtifactOut, *http.Response, error) { - return r.ApiService.MoveArtifactRouteV0ArtifactsArtIdMovePostExecute(r) -} - -/* -MoveArtifactRouteV0ArtifactsArtIdMovePost Rename / move an artifact to a new path - -Canonical artifact move/rename, keyed by the stable `art_…` ID (the artifact analogue of `POST /v0/folders/{fld_id}/move`). Moves the artifact to a new `path` on the same drive; ID, version history, source refs, labels, metadata, and the underlying CAS blob are all preserved — only `path` and `updated_at` change, and the move does NOT bump `version_number`. - -The row UPDATE and the emitted `artifact.renamed` event commit in a SINGLE transaction — a failure leaves the artifact fully unchanged. - -Returns 409 PATH_CONFLICT if the target `path` is already taken; 404 ARTIFACT_NOT_FOUND for an unknown id; 403 WIKI_RESERVED for a `_wiki/` / `_compiled/` target. Honors `If-Match` (→ 412 PRECONDITION_FAILED). Use `X-AgentDrive-Actor` to attach attribution to the emitted `artifact.renamed` event. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param artId - @return ApiMoveArtifactRouteV0ArtifactsArtIdMovePostRequest -*/ -func (a *DefaultAPIService) MoveArtifactRouteV0ArtifactsArtIdMovePost(ctx context.Context, artId string) ApiMoveArtifactRouteV0ArtifactsArtIdMovePostRequest { - return ApiMoveArtifactRouteV0ArtifactsArtIdMovePostRequest{ - ApiService: a, - ctx: ctx, - artId: artId, - } -} - -// Execute executes the request -// @return ArtifactOut -func (a *DefaultAPIService) MoveArtifactRouteV0ArtifactsArtIdMovePostExecute(r ApiMoveArtifactRouteV0ArtifactsArtIdMovePostRequest) (*ArtifactOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ArtifactOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.MoveArtifactRouteV0ArtifactsArtIdMovePost") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/artifacts/{art_id}/move" - localVarPath = strings.Replace(localVarPath, "{"+"art_id"+"}", url.PathEscape(parameterValueToString(r.artId, "artId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.artifactMoveIn == nil { - return localVarReturnValue, nil, reportError("artifactMoveIn is required and must be specified") - } - - // 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{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.xAgentdriveActor != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-actor", r.xAgentdriveActor, "simple", "") - } - if r.ifMatch != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "if-match", r.ifMatch, "simple", "") - } - // body params - localVarPostBody = r.artifactMoveIn - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 412 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiMoveFolderByIdV0FoldersFldIdMovePostRequest struct { - ctx context.Context - ApiService *DefaultAPIService - fldId string - folderMoveIn *FolderMoveIn - xAgentdriveActor *string - ifMatch *string -} - -func (r ApiMoveFolderByIdV0FoldersFldIdMovePostRequest) FolderMoveIn(folderMoveIn FolderMoveIn) ApiMoveFolderByIdV0FoldersFldIdMovePostRequest { - r.folderMoveIn = &folderMoveIn - return r -} - -func (r ApiMoveFolderByIdV0FoldersFldIdMovePostRequest) XAgentdriveActor(xAgentdriveActor string) ApiMoveFolderByIdV0FoldersFldIdMovePostRequest { - r.xAgentdriveActor = &xAgentdriveActor - return r -} - -func (r ApiMoveFolderByIdV0FoldersFldIdMovePostRequest) IfMatch(ifMatch string) ApiMoveFolderByIdV0FoldersFldIdMovePostRequest { - r.ifMatch = &ifMatch - return r -} - -func (r ApiMoveFolderByIdV0FoldersFldIdMovePostRequest) Execute() (*FolderOut, *http.Response, error) { - return r.ApiService.MoveFolderByIdV0FoldersFldIdMovePostExecute(r) -} - -/* -MoveFolderByIdV0FoldersFldIdMovePost Rename / move a folder by stable ID (cascade descendants) - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param fldId - @return ApiMoveFolderByIdV0FoldersFldIdMovePostRequest -*/ -func (a *DefaultAPIService) MoveFolderByIdV0FoldersFldIdMovePost(ctx context.Context, fldId string) ApiMoveFolderByIdV0FoldersFldIdMovePostRequest { - return ApiMoveFolderByIdV0FoldersFldIdMovePostRequest{ - ApiService: a, - ctx: ctx, - fldId: fldId, - } -} - -// Execute executes the request -// @return FolderOut -func (a *DefaultAPIService) MoveFolderByIdV0FoldersFldIdMovePostExecute(r ApiMoveFolderByIdV0FoldersFldIdMovePostRequest) (*FolderOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *FolderOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.MoveFolderByIdV0FoldersFldIdMovePost") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/folders/{fld_id}/move" - localVarPath = strings.Replace(localVarPath, "{"+"fld_id"+"}", url.PathEscape(parameterValueToString(r.fldId, "fldId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.folderMoveIn == nil { - return localVarReturnValue, nil, reportError("folderMoveIn is required and must be specified") - } - - // 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{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.xAgentdriveActor != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-actor", r.xAgentdriveActor, "simple", "") - } - if r.ifMatch != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "if-match", r.ifMatch, "simple", "") - } - // body params - localVarPostBody = r.folderMoveIn - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 412 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiMoveFolderByPathV0FoldersPathMovePostRequest struct { - ctx context.Context - ApiService *DefaultAPIService - path string - folderMoveIn *FolderMoveIn - xAgentdriveActor *string - ifMatch *string -} - -func (r ApiMoveFolderByPathV0FoldersPathMovePostRequest) FolderMoveIn(folderMoveIn FolderMoveIn) ApiMoveFolderByPathV0FoldersPathMovePostRequest { - r.folderMoveIn = &folderMoveIn - return r -} - -func (r ApiMoveFolderByPathV0FoldersPathMovePostRequest) XAgentdriveActor(xAgentdriveActor string) ApiMoveFolderByPathV0FoldersPathMovePostRequest { - r.xAgentdriveActor = &xAgentdriveActor - return r -} - -func (r ApiMoveFolderByPathV0FoldersPathMovePostRequest) IfMatch(ifMatch string) ApiMoveFolderByPathV0FoldersPathMovePostRequest { - r.ifMatch = &ifMatch - return r -} - -func (r ApiMoveFolderByPathV0FoldersPathMovePostRequest) Execute() (*FolderOut, *http.Response, error) { - return r.ApiService.MoveFolderByPathV0FoldersPathMovePostExecute(r) -} - -/* -MoveFolderByPathV0FoldersPathMovePost Rename / move a folder (cascade-update descendants) - -Move the folder identified by URL path to the body's `path`. All descendant folders + artifacts are path-prefix-updated in the same transaction. The folder's `fld_*` ID stays stable. - -Returns 409 `FOLDER_PATH_CONFLICT` if the destination prefix collides with a live folder or artifact path. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param path - @return ApiMoveFolderByPathV0FoldersPathMovePostRequest -*/ -func (a *DefaultAPIService) MoveFolderByPathV0FoldersPathMovePost(ctx context.Context, path string) ApiMoveFolderByPathV0FoldersPathMovePostRequest { - return ApiMoveFolderByPathV0FoldersPathMovePostRequest{ - ApiService: a, - ctx: ctx, - path: path, - } -} - -// Execute executes the request -// @return FolderOut -func (a *DefaultAPIService) MoveFolderByPathV0FoldersPathMovePostExecute(r ApiMoveFolderByPathV0FoldersPathMovePostRequest) (*FolderOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *FolderOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.MoveFolderByPathV0FoldersPathMovePost") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/folders/{path}/move" - localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", url.PathEscape(parameterValueToString(r.path, "path")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.folderMoveIn == nil { - return localVarReturnValue, nil, reportError("folderMoveIn is required and must be specified") - } - - // 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{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.xAgentdriveActor != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-actor", r.xAgentdriveActor, "simple", "") - } - if r.ifMatch != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "if-match", r.ifMatch, "simple", "") - } - // body params - localVarPostBody = r.folderMoveIn - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 412 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiPatchArtifactRouteV0ArtifactsArtIdPatchRequest struct { - ctx context.Context - ApiService *DefaultAPIService - artId string - artifactPatchIn *ArtifactPatchIn - xAgentdriveActor *string - ifMatch *string -} - -func (r ApiPatchArtifactRouteV0ArtifactsArtIdPatchRequest) ArtifactPatchIn(artifactPatchIn ArtifactPatchIn) ApiPatchArtifactRouteV0ArtifactsArtIdPatchRequest { - r.artifactPatchIn = &artifactPatchIn - return r -} - -func (r ApiPatchArtifactRouteV0ArtifactsArtIdPatchRequest) XAgentdriveActor(xAgentdriveActor string) ApiPatchArtifactRouteV0ArtifactsArtIdPatchRequest { - r.xAgentdriveActor = &xAgentdriveActor - return r -} - -func (r ApiPatchArtifactRouteV0ArtifactsArtIdPatchRequest) IfMatch(ifMatch string) ApiPatchArtifactRouteV0ArtifactsArtIdPatchRequest { - r.ifMatch = &ifMatch - return r -} - -func (r ApiPatchArtifactRouteV0ArtifactsArtIdPatchRequest) Execute() (*ArtifactOut, *http.Response, error) { - return r.ApiService.PatchArtifactRouteV0ArtifactsArtIdPatchExecute(r) -} - -/* -PatchArtifactRouteV0ArtifactsArtIdPatch Edit artifact metadata (labels / metadata / source) - -Metadata-only JSON-merge-patch update of a single artifact, keyed by its stable `art_…` ID. Every field in the body is optional; a field that is **omitted** is left unchanged, a field that is **present** is applied — with an explicit `null` / `[]` / `{}` meaning "clear". This mirrors the MCP `set_metadata` tool. - -Editable fields: - * `labels` — replace the label set (`[]`/`null` clears). - * `metadata` — replace the free-form metadata object (`{}`/`null` clears). - * `source` — replace provenance refs (`null` clears). - -**To move/rename an artifact, use `POST /v0/artifacts/{art_id}/move`** — PATCH no longer accepts `path`. The body is `extra="forbid"`, so a stray field (notably a legacy `path`) is rejected with 422 rather than silently ignored. - -Metadata edits do NOT create a new content version (no `version_number` / generation bump, no `artifact_versions` row) but DO bump the artifact's `metageneration` and `updated_at`. - -Returns 400 BAD_LABELS / BAD_SOURCE for invalid metadata; 404 ARTIFACT_NOT_FOUND for an unknown id. Honors `If-Match`, which takes the composite ETag `".."` and is compared as a whole tuple: ANY concurrent content **or** metadata change (a bumped generation OR metageneration) → 412 PRECONDITION_FAILED. There is no last-writer-wins gap for metadata-only edits. Use `X-AgentDrive-Actor` to attach attribution to the emitted `artifact.metadata_updated` event. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param artId - @return ApiPatchArtifactRouteV0ArtifactsArtIdPatchRequest -*/ -func (a *DefaultAPIService) PatchArtifactRouteV0ArtifactsArtIdPatch(ctx context.Context, artId string) ApiPatchArtifactRouteV0ArtifactsArtIdPatchRequest { - return ApiPatchArtifactRouteV0ArtifactsArtIdPatchRequest{ - ApiService: a, - ctx: ctx, - artId: artId, - } -} - -// Execute executes the request -// @return ArtifactOut -func (a *DefaultAPIService) PatchArtifactRouteV0ArtifactsArtIdPatchExecute(r ApiPatchArtifactRouteV0ArtifactsArtIdPatchRequest) (*ArtifactOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ArtifactOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.PatchArtifactRouteV0ArtifactsArtIdPatch") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/artifacts/{art_id}" - localVarPath = strings.Replace(localVarPath, "{"+"art_id"+"}", url.PathEscape(parameterValueToString(r.artId, "artId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.artifactPatchIn == nil { - return localVarReturnValue, nil, reportError("artifactPatchIn is required and must be specified") - } - - // 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{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.xAgentdriveActor != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-actor", r.xAgentdriveActor, "simple", "") - } - if r.ifMatch != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "if-match", r.ifMatch, "simple", "") - } - // body params - localVarPostBody = r.artifactPatchIn - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 412 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiPatchFolderByIdV0FoldersFldIdPatchRequest struct { - ctx context.Context - ApiService *DefaultAPIService - fldId string - folderPatchIn *FolderPatchIn - xAgentdriveActor *string - ifMatch *string -} - -func (r ApiPatchFolderByIdV0FoldersFldIdPatchRequest) FolderPatchIn(folderPatchIn FolderPatchIn) ApiPatchFolderByIdV0FoldersFldIdPatchRequest { - r.folderPatchIn = &folderPatchIn - return r -} - -func (r ApiPatchFolderByIdV0FoldersFldIdPatchRequest) XAgentdriveActor(xAgentdriveActor string) ApiPatchFolderByIdV0FoldersFldIdPatchRequest { - r.xAgentdriveActor = &xAgentdriveActor - return r -} - -func (r ApiPatchFolderByIdV0FoldersFldIdPatchRequest) IfMatch(ifMatch string) ApiPatchFolderByIdV0FoldersFldIdPatchRequest { - r.ifMatch = &ifMatch - return r -} - -func (r ApiPatchFolderByIdV0FoldersFldIdPatchRequest) Execute() (*FolderOut, *http.Response, error) { - return r.ApiService.PatchFolderByIdV0FoldersFldIdPatchExecute(r) -} - -/* -PatchFolderByIdV0FoldersFldIdPatch Update folder metadata by stable ID - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param fldId - @return ApiPatchFolderByIdV0FoldersFldIdPatchRequest -*/ -func (a *DefaultAPIService) PatchFolderByIdV0FoldersFldIdPatch(ctx context.Context, fldId string) ApiPatchFolderByIdV0FoldersFldIdPatchRequest { - return ApiPatchFolderByIdV0FoldersFldIdPatchRequest{ - ApiService: a, - ctx: ctx, - fldId: fldId, - } -} - -// Execute executes the request -// @return FolderOut -func (a *DefaultAPIService) PatchFolderByIdV0FoldersFldIdPatchExecute(r ApiPatchFolderByIdV0FoldersFldIdPatchRequest) (*FolderOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *FolderOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.PatchFolderByIdV0FoldersFldIdPatch") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/folders/{fld_id}" - localVarPath = strings.Replace(localVarPath, "{"+"fld_id"+"}", url.PathEscape(parameterValueToString(r.fldId, "fldId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.folderPatchIn == nil { - return localVarReturnValue, nil, reportError("folderPatchIn is required and must be specified") - } - - // 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{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.xAgentdriveActor != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-actor", r.xAgentdriveActor, "simple", "") - } - if r.ifMatch != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "if-match", r.ifMatch, "simple", "") - } - // body params - localVarPostBody = r.folderPatchIn - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 412 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiPatchFolderByPathV0FoldersPathPatchRequest struct { - ctx context.Context - ApiService *DefaultAPIService - path string - folderPatchIn *FolderPatchIn - xAgentdriveActor *string - ifMatch *string -} - -func (r ApiPatchFolderByPathV0FoldersPathPatchRequest) FolderPatchIn(folderPatchIn FolderPatchIn) ApiPatchFolderByPathV0FoldersPathPatchRequest { - r.folderPatchIn = &folderPatchIn - return r -} - -func (r ApiPatchFolderByPathV0FoldersPathPatchRequest) XAgentdriveActor(xAgentdriveActor string) ApiPatchFolderByPathV0FoldersPathPatchRequest { - r.xAgentdriveActor = &xAgentdriveActor - return r -} - -func (r ApiPatchFolderByPathV0FoldersPathPatchRequest) IfMatch(ifMatch string) ApiPatchFolderByPathV0FoldersPathPatchRequest { - r.ifMatch = &ifMatch - return r -} - -func (r ApiPatchFolderByPathV0FoldersPathPatchRequest) Execute() (*FolderOut, *http.Response, error) { - return r.ApiService.PatchFolderByPathV0FoldersPathPatchExecute(r) -} - -/* -PatchFolderByPathV0FoldersPathPatch Update folder metadata by path - -Partial update — field absence leaves the value unchanged; explicit `null` clears the field. Use the by-id endpoint (slice 2) when you need stable addressing across renames. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param path - @return ApiPatchFolderByPathV0FoldersPathPatchRequest -*/ -func (a *DefaultAPIService) PatchFolderByPathV0FoldersPathPatch(ctx context.Context, path string) ApiPatchFolderByPathV0FoldersPathPatchRequest { - return ApiPatchFolderByPathV0FoldersPathPatchRequest{ - ApiService: a, - ctx: ctx, - path: path, - } -} - -// Execute executes the request -// @return FolderOut -func (a *DefaultAPIService) PatchFolderByPathV0FoldersPathPatchExecute(r ApiPatchFolderByPathV0FoldersPathPatchRequest) (*FolderOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *FolderOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.PatchFolderByPathV0FoldersPathPatch") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/folders/{path}" - localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", url.PathEscape(parameterValueToString(r.path, "path")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.folderPatchIn == nil { - return localVarReturnValue, nil, reportError("folderPatchIn is required and must be specified") - } - - // 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{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.xAgentdriveActor != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-actor", r.xAgentdriveActor, "simple", "") - } - if r.ifMatch != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "if-match", r.ifMatch, "simple", "") - } - // body params - localVarPostBody = r.folderPatchIn - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 412 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiPatchGrantRouteV0GrantsGrnIdPatchRequest struct { - ctx context.Context - ApiService *DefaultAPIService - grnId string - grantPatchIn *GrantPatchIn - xAgentdriveActor *string -} - -func (r ApiPatchGrantRouteV0GrantsGrnIdPatchRequest) GrantPatchIn(grantPatchIn GrantPatchIn) ApiPatchGrantRouteV0GrantsGrnIdPatchRequest { - r.grantPatchIn = &grantPatchIn - return r -} - -func (r ApiPatchGrantRouteV0GrantsGrnIdPatchRequest) XAgentdriveActor(xAgentdriveActor string) ApiPatchGrantRouteV0GrantsGrnIdPatchRequest { - r.xAgentdriveActor = &xAgentdriveActor - return r -} - -func (r ApiPatchGrantRouteV0GrantsGrnIdPatchRequest) Execute() (*GrantOut, *http.Response, error) { - return r.ApiService.PatchGrantRouteV0GrantsGrnIdPatchExecute(r) -} - -/* -PatchGrantRouteV0GrantsGrnIdPatch Update a grant's role and/or expiry (requires can_manage) - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param grnId - @return ApiPatchGrantRouteV0GrantsGrnIdPatchRequest -*/ -func (a *DefaultAPIService) PatchGrantRouteV0GrantsGrnIdPatch(ctx context.Context, grnId string) ApiPatchGrantRouteV0GrantsGrnIdPatchRequest { - return ApiPatchGrantRouteV0GrantsGrnIdPatchRequest{ - ApiService: a, - ctx: ctx, - grnId: grnId, - } -} - -// Execute executes the request -// @return GrantOut -func (a *DefaultAPIService) PatchGrantRouteV0GrantsGrnIdPatchExecute(r ApiPatchGrantRouteV0GrantsGrnIdPatchRequest) (*GrantOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *GrantOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.PatchGrantRouteV0GrantsGrnIdPatch") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/grants/{grn_id}" - localVarPath = strings.Replace(localVarPath, "{"+"grn_id"+"}", url.PathEscape(parameterValueToString(r.grnId, "grnId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.grantPatchIn == nil { - return localVarReturnValue, nil, reportError("grantPatchIn is required and must be specified") - } - - // 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{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.xAgentdriveActor != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-actor", r.xAgentdriveActor, "simple", "") - } - // body params - localVarPostBody = r.grantPatchIn - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiPostDescribeV0QueryDescribePostRequest struct { - ctx context.Context - ApiService *DefaultAPIService - describeIn *DescribeIn -} - -func (r ApiPostDescribeV0QueryDescribePostRequest) DescribeIn(describeIn DescribeIn) ApiPostDescribeV0QueryDescribePostRequest { - r.describeIn = &describeIn - return r -} - -func (r ApiPostDescribeV0QueryDescribePostRequest) Execute() (*DatasetDescriptionOut, *http.Response, error) { - return r.ApiService.PostDescribeV0QueryDescribePostExecute(r) -} - -/* -PostDescribeV0QueryDescribePost Describe a dataset's column schema - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiPostDescribeV0QueryDescribePostRequest -*/ -func (a *DefaultAPIService) PostDescribeV0QueryDescribePost(ctx context.Context) ApiPostDescribeV0QueryDescribePostRequest { - return ApiPostDescribeV0QueryDescribePostRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return DatasetDescriptionOut -func (a *DefaultAPIService) PostDescribeV0QueryDescribePostExecute(r ApiPostDescribeV0QueryDescribePostRequest) (*DatasetDescriptionOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *DatasetDescriptionOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.PostDescribeV0QueryDescribePost") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/query/describe" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.describeIn == nil { - return localVarReturnValue, nil, reportError("describeIn is required and must be specified") - } - - // 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{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.describeIn - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 503 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiPostFeedbackV0FeedbackPostRequest struct { - ctx context.Context - ApiService *DefaultAPIService -} - -func (r ApiPostFeedbackV0FeedbackPostRequest) Execute() (*FeedbackCreateOut, *http.Response, error) { - return r.ApiService.PostFeedbackV0FeedbackPostExecute(r) -} - -/* -PostFeedbackV0FeedbackPost Post Feedback - -File feedback. Body: `{kind, title, body, contact?, -attachments?: [art_id, ...]}` — attachments are snapshotted from -this drive's artifacts at submit time. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiPostFeedbackV0FeedbackPostRequest -*/ -func (a *DefaultAPIService) PostFeedbackV0FeedbackPost(ctx context.Context) ApiPostFeedbackV0FeedbackPostRequest { - return ApiPostFeedbackV0FeedbackPostRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return FeedbackCreateOut -func (a *DefaultAPIService) PostFeedbackV0FeedbackPostExecute(r ApiPostFeedbackV0FeedbackPostRequest) (*FeedbackCreateOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *FeedbackCreateOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.PostFeedbackV0FeedbackPost") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/feedback" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiPostLookupValuesV0QueryLookupValuesPostRequest struct { - ctx context.Context - ApiService *DefaultAPIService - lookupValuesIn *LookupValuesIn -} - -func (r ApiPostLookupValuesV0QueryLookupValuesPostRequest) LookupValuesIn(lookupValuesIn LookupValuesIn) ApiPostLookupValuesV0QueryLookupValuesPostRequest { - r.lookupValuesIn = &lookupValuesIn - return r -} - -func (r ApiPostLookupValuesV0QueryLookupValuesPostRequest) Execute() (*LookupValuesOut, *http.Response, error) { - return r.ApiService.PostLookupValuesV0QueryLookupValuesPostExecute(r) -} - -/* -PostLookupValuesV0QueryLookupValuesPost List distinct values of a dataset column - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiPostLookupValuesV0QueryLookupValuesPostRequest -*/ -func (a *DefaultAPIService) PostLookupValuesV0QueryLookupValuesPost(ctx context.Context) ApiPostLookupValuesV0QueryLookupValuesPostRequest { - return ApiPostLookupValuesV0QueryLookupValuesPostRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return LookupValuesOut -func (a *DefaultAPIService) PostLookupValuesV0QueryLookupValuesPostExecute(r ApiPostLookupValuesV0QueryLookupValuesPostRequest) (*LookupValuesOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *LookupValuesOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.PostLookupValuesV0QueryLookupValuesPost") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/query/lookup-values" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.lookupValuesIn == nil { - return localVarReturnValue, nil, reportError("lookupValuesIn is required and must be specified") - } - - // 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{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.lookupValuesIn - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 402 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 503 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiPostQueryV0QueryPostRequest struct { - ctx context.Context - ApiService *DefaultAPIService - queryIn *QueryIn -} - -func (r ApiPostQueryV0QueryPostRequest) QueryIn(queryIn QueryIn) ApiPostQueryV0QueryPostRequest { - r.queryIn = &queryIn - return r -} - -func (r ApiPostQueryV0QueryPostRequest) Execute() (*ResponsePostQueryV0QueryPost, *http.Response, error) { - return r.ApiService.PostQueryV0QueryPostExecute(r) -} - -/* -PostQueryV0QueryPost Run a read-only SQL query over authorized datasets - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiPostQueryV0QueryPostRequest -*/ -func (a *DefaultAPIService) PostQueryV0QueryPost(ctx context.Context) ApiPostQueryV0QueryPostRequest { - return ApiPostQueryV0QueryPostRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return ResponsePostQueryV0QueryPost -func (a *DefaultAPIService) PostQueryV0QueryPostExecute(r ApiPostQueryV0QueryPostRequest) (*ResponsePostQueryV0QueryPost, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ResponsePostQueryV0QueryPost - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.PostQueryV0QueryPost") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/query" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.queryIn == nil { - return localVarReturnValue, nil, reportError("queryIn is required and must be specified") - } - - // 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{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.queryIn - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 402 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 503 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiPutArtifactV0ArtifactsPathPutRequest struct { - ctx context.Context - ApiService *DefaultAPIService - path string - contentType *string - xAgentdriveLabels *string - xAgentdriveMetadata *string - xAgentdriveSource *string - xAgentdriveActor *string - xAgentdriveChangeSummary *string - xAgentdriveChecksum *string - contentMd5 *string - ifMatch *string - ifNoneMatch *string -} - -func (r ApiPutArtifactV0ArtifactsPathPutRequest) ContentType(contentType string) ApiPutArtifactV0ArtifactsPathPutRequest { - r.contentType = &contentType - return r -} - -func (r ApiPutArtifactV0ArtifactsPathPutRequest) XAgentdriveLabels(xAgentdriveLabels string) ApiPutArtifactV0ArtifactsPathPutRequest { - r.xAgentdriveLabels = &xAgentdriveLabels - return r -} - -func (r ApiPutArtifactV0ArtifactsPathPutRequest) XAgentdriveMetadata(xAgentdriveMetadata string) ApiPutArtifactV0ArtifactsPathPutRequest { - r.xAgentdriveMetadata = &xAgentdriveMetadata - return r -} - -func (r ApiPutArtifactV0ArtifactsPathPutRequest) XAgentdriveSource(xAgentdriveSource string) ApiPutArtifactV0ArtifactsPathPutRequest { - r.xAgentdriveSource = &xAgentdriveSource - return r -} - -func (r ApiPutArtifactV0ArtifactsPathPutRequest) XAgentdriveActor(xAgentdriveActor string) ApiPutArtifactV0ArtifactsPathPutRequest { - r.xAgentdriveActor = &xAgentdriveActor - return r -} - -func (r ApiPutArtifactV0ArtifactsPathPutRequest) XAgentdriveChangeSummary(xAgentdriveChangeSummary string) ApiPutArtifactV0ArtifactsPathPutRequest { - r.xAgentdriveChangeSummary = &xAgentdriveChangeSummary - return r -} - -func (r ApiPutArtifactV0ArtifactsPathPutRequest) XAgentdriveChecksum(xAgentdriveChecksum string) ApiPutArtifactV0ArtifactsPathPutRequest { - r.xAgentdriveChecksum = &xAgentdriveChecksum - return r -} - -func (r ApiPutArtifactV0ArtifactsPathPutRequest) ContentMd5(contentMd5 string) ApiPutArtifactV0ArtifactsPathPutRequest { - r.contentMd5 = &contentMd5 - return r -} - -func (r ApiPutArtifactV0ArtifactsPathPutRequest) IfMatch(ifMatch string) ApiPutArtifactV0ArtifactsPathPutRequest { - r.ifMatch = &ifMatch - return r -} - -func (r ApiPutArtifactV0ArtifactsPathPutRequest) IfNoneMatch(ifNoneMatch string) ApiPutArtifactV0ArtifactsPathPutRequest { - r.ifNoneMatch = &ifNoneMatch - return r -} - -func (r ApiPutArtifactV0ArtifactsPathPutRequest) Execute() (*ArtifactOut, *http.Response, error) { - return r.ApiService.PutArtifactV0ArtifactsPathPutExecute(r) -} - -/* -PutArtifactV0ArtifactsPathPut Upload (or overwrite) an artifact - -Upload an artifact at the given path. The path is treated as the artifact's location in the drive — re-uploading the same path overwrites in place (idempotent). Returns 201 when the artifact is created (no prior live artifact at the path), 200 on overwrite — mirroring `PUT /v0/folders/{path}`. - -**Limits:** request body must not exceed **50 MB**. Path must be non-empty, ≤256 chars, only `[A-Za-z0-9_./-]`, no `..` segments, no leading/trailing slash. Per-token write rate limit: 100/hour. - -**Optional headers.** Each preserves the existing artifact's value when omitted on an overwrite, and takes the create-default on a new path; send the header to replace it: -- `X-AgentDrive-Labels`: comma-separated labels (e.g. `draft,report`); an empty value clears them. Each: lowercase `[a-z0-9_-]+`, ≤64 chars; ≤16 labels per artifact. -- `X-AgentDrive-Metadata`: JSON object of agent-attached fields. -- `X-AgentDrive-Source`: JSON `{"refs": [...]}` source provenance (present, including `{"refs": []}`, replaces). -- `X-AgentDrive-Actor`: caller-supplied actor name (≤64 chars) for event-log attribution. Untrusted; never used for authz. - -**Preconditions.** `If-Match: ".."` makes the write conditional on the current composite ETag (→ 412 PRECONDITION_FAILED). `If-None-Match: *` is create-only: it succeeds only if no live artifact occupies the path (→ 412 CREATE_CONFLICT if one does). The two are mutually exclusive (→ 400 BAD_PRECONDITION). - -**Integrity (optional).** `X-AgentDrive-Checksum: :` (`sha256:` or `crc32c:`) or the standard `Content-MD5` (base64 MD5) is verified against the received bytes before they land (→ 400 CHECKSUM_MISMATCH on mismatch); no artifact is created on failure. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param path - @return ApiPutArtifactV0ArtifactsPathPutRequest -*/ -func (a *DefaultAPIService) PutArtifactV0ArtifactsPathPut(ctx context.Context, path string) ApiPutArtifactV0ArtifactsPathPutRequest { - return ApiPutArtifactV0ArtifactsPathPutRequest{ - ApiService: a, - ctx: ctx, - path: path, - } -} - -// Execute executes the request -// @return ArtifactOut -func (a *DefaultAPIService) PutArtifactV0ArtifactsPathPutExecute(r ApiPutArtifactV0ArtifactsPathPutRequest) (*ArtifactOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ArtifactOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.PutArtifactV0ArtifactsPathPut") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/artifacts/{path}" - localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", url.PathEscape(parameterValueToString(r.path, "path")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 r.contentType != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "content-type", r.contentType, "simple", "") - } - if r.xAgentdriveLabels != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-labels", r.xAgentdriveLabels, "simple", "") - } - if r.xAgentdriveMetadata != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-metadata", r.xAgentdriveMetadata, "simple", "") - } - if r.xAgentdriveSource != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-source", r.xAgentdriveSource, "simple", "") - } - if r.xAgentdriveActor != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-actor", r.xAgentdriveActor, "simple", "") - } - if r.xAgentdriveChangeSummary != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-change-summary", r.xAgentdriveChangeSummary, "simple", "") - } - if r.xAgentdriveChecksum != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-checksum", r.xAgentdriveChecksum, "simple", "") - } - if r.contentMd5 != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "content-md5", r.contentMd5, "simple", "") - } - if r.ifMatch != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "if-match", r.ifMatch, "simple", "") - } - if r.ifNoneMatch != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "if-none-match", r.ifNoneMatch, "simple", "") - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 412 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 413 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiPutProjectV0ProjectsFldIdPutRequest struct { - ctx context.Context - ApiService *DefaultAPIService - fldId string - projectConfigIn *ProjectConfigIn -} - -func (r ApiPutProjectV0ProjectsFldIdPutRequest) ProjectConfigIn(projectConfigIn ProjectConfigIn) ApiPutProjectV0ProjectsFldIdPutRequest { - r.projectConfigIn = &projectConfigIn - return r -} - -func (r ApiPutProjectV0ProjectsFldIdPutRequest) Execute() (*CompileProjectOut, *http.Response, error) { - return r.ApiService.PutProjectV0ProjectsFldIdPutExecute(r) -} - -/* -PutProjectV0ProjectsFldIdPut Set a project's compile config (entrypoint/engine/auto_compile) - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param fldId - @return ApiPutProjectV0ProjectsFldIdPutRequest -*/ -func (a *DefaultAPIService) PutProjectV0ProjectsFldIdPut(ctx context.Context, fldId string) ApiPutProjectV0ProjectsFldIdPutRequest { - return ApiPutProjectV0ProjectsFldIdPutRequest{ - ApiService: a, - ctx: ctx, - fldId: fldId, - } -} - -// Execute executes the request -// @return CompileProjectOut -func (a *DefaultAPIService) PutProjectV0ProjectsFldIdPutExecute(r ApiPutProjectV0ProjectsFldIdPutRequest) (*CompileProjectOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPut - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *CompileProjectOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.PutProjectV0ProjectsFldIdPut") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/projects/{fld_id}" - localVarPath = strings.Replace(localVarPath, "{"+"fld_id"+"}", url.PathEscape(parameterValueToString(r.fldId, "fldId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.projectConfigIn == nil { - return localVarReturnValue, nil, reportError("projectConfigIn is required and must be specified") - } - - // 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{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.projectConfigIn - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRedeemShareSShareKeyGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - shareKey string -} - -func (r ApiRedeemShareSShareKeyGetRequest) Execute() (*ShareRedeemOut, *http.Response, error) { - return r.ApiService.RedeemShareSShareKeyGetExecute(r) -} - -/* -RedeemShareSShareKeyGet Redeem Share - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param shareKey - @return ApiRedeemShareSShareKeyGetRequest -*/ -func (a *DefaultAPIService) RedeemShareSShareKeyGet(ctx context.Context, shareKey string) ApiRedeemShareSShareKeyGetRequest { - return ApiRedeemShareSShareKeyGetRequest{ - ApiService: a, - ctx: ctx, - shareKey: shareKey, - } -} - -// Execute executes the request -// @return ShareRedeemOut -func (a *DefaultAPIService) RedeemShareSShareKeyGetExecute(r ApiRedeemShareSShareKeyGetRequest) (*ShareRedeemOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ShareRedeemOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.RedeemShareSShareKeyGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/s/{share_key}" - localVarPath = strings.Replace(localVarPath, "{"+"share_key"+"}", url.PathEscape(parameterValueToString(r.shareKey, "shareKey")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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", "text/html"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ShareErrorOut - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ShareErrorOut - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRedeemShareWithPasswordSShareKeyPostRequest struct { - ctx context.Context - ApiService *DefaultAPIService - shareKey string - password *string -} - -func (r ApiRedeemShareWithPasswordSShareKeyPostRequest) Password(password string) ApiRedeemShareWithPasswordSShareKeyPostRequest { - r.password = &password - return r -} - -func (r ApiRedeemShareWithPasswordSShareKeyPostRequest) Execute() (*ShareRedeemOut, *http.Response, error) { - return r.ApiService.RedeemShareWithPasswordSShareKeyPostExecute(r) -} - -/* -RedeemShareWithPasswordSShareKeyPost Redeem Share With Password - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param shareKey - @return ApiRedeemShareWithPasswordSShareKeyPostRequest -*/ -func (a *DefaultAPIService) RedeemShareWithPasswordSShareKeyPost(ctx context.Context, shareKey string) ApiRedeemShareWithPasswordSShareKeyPostRequest { - return ApiRedeemShareWithPasswordSShareKeyPostRequest{ - ApiService: a, - ctx: ctx, - shareKey: shareKey, - } -} - -// Execute executes the request -// @return ShareRedeemOut -func (a *DefaultAPIService) RedeemShareWithPasswordSShareKeyPostExecute(r ApiRedeemShareWithPasswordSShareKeyPostRequest) (*ShareRedeemOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ShareRedeemOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.RedeemShareWithPasswordSShareKeyPost") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/s/{share_key}" - localVarPath = strings.Replace(localVarPath, "{"+"share_key"+"}", url.PathEscape(parameterValueToString(r.shareKey, "shareKey")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} - - // set Content-Type header - localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) - if localVarHTTPContentType != "" { - localVarHeaderParams["Content-Type"] = localVarHTTPContentType - } - - // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/json", "text/html"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - if r.password != nil { - parameterAddToHeaderOrQuery(localVarFormParams, "password", r.password, "", "") - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ShareErrorOut - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ShareErrorOut - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRestoreArtifactV0ArtifactsArtIdRestorePostRequest struct { - ctx context.Context - ApiService *DefaultAPIService - artId string - rename *string - overwrite *bool - xAgentdriveActor *string - ifMatch *string -} - -// Restore at this path instead of the original. Soft-deletes the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. Mutually exclusive with `overwrite`. -func (r ApiRestoreArtifactV0ArtifactsArtIdRestorePostRequest) Rename(rename string) ApiRestoreArtifactV0ArtifactsArtIdRestorePostRequest { - r.rename = &rename - return r -} - -// Soft-delete the live occupant at the original path and restore there. Audit `metadata.cause='restore_conflict_overwrite'`. Mutually exclusive with `rename`. -func (r ApiRestoreArtifactV0ArtifactsArtIdRestorePostRequest) Overwrite(overwrite bool) ApiRestoreArtifactV0ArtifactsArtIdRestorePostRequest { - r.overwrite = &overwrite - return r -} - -func (r ApiRestoreArtifactV0ArtifactsArtIdRestorePostRequest) XAgentdriveActor(xAgentdriveActor string) ApiRestoreArtifactV0ArtifactsArtIdRestorePostRequest { - r.xAgentdriveActor = &xAgentdriveActor - return r -} - -func (r ApiRestoreArtifactV0ArtifactsArtIdRestorePostRequest) IfMatch(ifMatch string) ApiRestoreArtifactV0ArtifactsArtIdRestorePostRequest { - r.ifMatch = &ifMatch - return r -} - -func (r ApiRestoreArtifactV0ArtifactsArtIdRestorePostRequest) Execute() (*ArtifactOut, *http.Response, error) { - return r.ApiService.RestoreArtifactV0ArtifactsArtIdRestorePostExecute(r) -} - -/* -RestoreArtifactV0ArtifactsArtIdRestorePost Restore a soft-deleted artifact - -Clear `deleted_at` + `purge_at` on a soft-deleted artifact. Available only while the artifact is in trash (i.e. before the GC cleanup cron purges it). Returns 404 if the artifact is live or already hard-deleted; 409 PATH_CONFLICT if its path is now occupied by another live artifact. The 409 payload includes a `restore_options` block with `rename_to` and `force_overwrite` URLs the caller can follow to resolve the conflict — see deletion-design.md §5.4. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param artId - @return ApiRestoreArtifactV0ArtifactsArtIdRestorePostRequest -*/ -func (a *DefaultAPIService) RestoreArtifactV0ArtifactsArtIdRestorePost(ctx context.Context, artId string) ApiRestoreArtifactV0ArtifactsArtIdRestorePostRequest { - return ApiRestoreArtifactV0ArtifactsArtIdRestorePostRequest{ - ApiService: a, - ctx: ctx, - artId: artId, - } -} - -// Execute executes the request -// @return ArtifactOut -func (a *DefaultAPIService) RestoreArtifactV0ArtifactsArtIdRestorePostExecute(r ApiRestoreArtifactV0ArtifactsArtIdRestorePostRequest) (*ArtifactOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ArtifactOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.RestoreArtifactV0ArtifactsArtIdRestorePost") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/artifacts/{art_id}/restore" - localVarPath = strings.Replace(localVarPath, "{"+"art_id"+"}", url.PathEscape(parameterValueToString(r.artId, "artId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.rename != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "rename", r.rename, "form", "") - } - if r.overwrite != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "overwrite", r.overwrite, "form", "") - } else { - var defaultValue bool = false - parameterAddToHeaderOrQuery(localVarQueryParams, "overwrite", defaultValue, "form", "") - r.overwrite = &defaultValue - } - // 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 r.xAgentdriveActor != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-actor", r.xAgentdriveActor, "simple", "") - } - if r.ifMatch != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "if-match", r.ifMatch, "simple", "") - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 412 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePostRequest struct { - ctx context.Context - ApiService *DefaultAPIService - artId string - versionNumber int32 - xAgentdriveActor *string - ifMatch *string -} - -func (r ApiRestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePostRequest) XAgentdriveActor(xAgentdriveActor string) ApiRestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePostRequest { - r.xAgentdriveActor = &xAgentdriveActor - return r -} - -func (r ApiRestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePostRequest) IfMatch(ifMatch string) ApiRestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePostRequest { - r.ifMatch = &ifMatch - return r -} - -func (r ApiRestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePostRequest) Execute() (*ArtifactOut, *http.Response, error) { - return r.ApiService.RestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePostExecute(r) -} - -/* -RestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePost Restore a previous version as a new head version - -Roll the artifact forward to the content of version `version_number` by creating a **new head version** with identical bytes. History is preserved — this never rewrites or deletes past versions. The prior version's content-addressed blob is reused, so no bytes are re-uploaded. A change summary of `Restored version N` is recorded on the new version; `X-AgentDrive-Actor` attributes it. - -Restoring a version whose content already matches the current head (including the head itself) is a **no-op**: it returns the current artifact unchanged, with no new version created. - -Honors `If-Match` on the current head (roll forward only if the head is unchanged → 412 PRECONDITION_FAILED). - -Errors: `404 ARTIFACT_NOT_FOUND`, `404 VERSION_NOT_FOUND`, and `410 VERSION_PRUNED` when the version existed but its bytes were retained out of existence. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param artId - @param versionNumber - @return ApiRestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePostRequest -*/ -func (a *DefaultAPIService) RestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePost(ctx context.Context, artId string, versionNumber int32) ApiRestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePostRequest { - return ApiRestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePostRequest{ - ApiService: a, - ctx: ctx, - artId: artId, - versionNumber: versionNumber, - } -} - -// Execute executes the request -// @return ArtifactOut -func (a *DefaultAPIService) RestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePostExecute(r ApiRestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePostRequest) (*ArtifactOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ArtifactOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.RestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePost") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/artifacts/{art_id}/versions/{version_number}/restore" - localVarPath = strings.Replace(localVarPath, "{"+"art_id"+"}", url.PathEscape(parameterValueToString(r.artId, "artId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"version_number"+"}", url.PathEscape(parameterValueToString(r.versionNumber, "versionNumber")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 r.xAgentdriveActor != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-actor", r.xAgentdriveActor, "simple", "") - } - if r.ifMatch != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "if-match", r.ifMatch, "simple", "") - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 410 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 412 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRestoreDriveRouteV0DrivesDriveIdRestorePostRequest struct { - ctx context.Context - ApiService *DefaultAPIService - driveId string - xAgentdriveActor *string - ifMatch *string -} - -func (r ApiRestoreDriveRouteV0DrivesDriveIdRestorePostRequest) XAgentdriveActor(xAgentdriveActor string) ApiRestoreDriveRouteV0DrivesDriveIdRestorePostRequest { - r.xAgentdriveActor = &xAgentdriveActor - return r -} - -func (r ApiRestoreDriveRouteV0DrivesDriveIdRestorePostRequest) IfMatch(ifMatch string) ApiRestoreDriveRouteV0DrivesDriveIdRestorePostRequest { - r.ifMatch = &ifMatch - return r -} - -func (r ApiRestoreDriveRouteV0DrivesDriveIdRestorePostRequest) Execute() (*DriveRestoreOut, *http.Response, error) { - return r.ApiService.RestoreDriveRouteV0DrivesDriveIdRestorePostExecute(r) -} - -/* -RestoreDriveRouteV0DrivesDriveIdRestorePost Restore a soft-deleted drive - -Clear `deleted_at` + `purge_at` on a soft-deleted drive. Soft-deleted child artifacts get their retention window rebased to the drive-restore moment (see deletion-design.md §5.2). Available only while the drive is in trash. Returns 404 if the drive is live or already hard-deleted. - -**Optimistic concurrency:** send `If-Match` with the trashed drive's composite ETag (`".0."`, e.g. from the delete response's `ETag` header) to make the restore conditional — a stale token returns 412 PRECONDITION_FAILED. A restore WITHOUT an `If-Match` precondition is last-writer-wins. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param driveId - @return ApiRestoreDriveRouteV0DrivesDriveIdRestorePostRequest -*/ -func (a *DefaultAPIService) RestoreDriveRouteV0DrivesDriveIdRestorePost(ctx context.Context, driveId string) ApiRestoreDriveRouteV0DrivesDriveIdRestorePostRequest { - return ApiRestoreDriveRouteV0DrivesDriveIdRestorePostRequest{ - ApiService: a, - ctx: ctx, - driveId: driveId, - } -} - -// Execute executes the request -// @return DriveRestoreOut -func (a *DefaultAPIService) RestoreDriveRouteV0DrivesDriveIdRestorePostExecute(r ApiRestoreDriveRouteV0DrivesDriveIdRestorePostRequest) (*DriveRestoreOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *DriveRestoreOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.RestoreDriveRouteV0DrivesDriveIdRestorePost") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/drives/{drive_id}/restore" - localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 r.xAgentdriveActor != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-actor", r.xAgentdriveActor, "simple", "") - } - if r.ifMatch != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "if-match", r.ifMatch, "simple", "") - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 412 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRestoreFolderByIdV0FoldersFldIdRestorePostRequest struct { - ctx context.Context - ApiService *DefaultAPIService - fldId string - xAgentdriveActor *string - ifMatch *string -} - -func (r ApiRestoreFolderByIdV0FoldersFldIdRestorePostRequest) XAgentdriveActor(xAgentdriveActor string) ApiRestoreFolderByIdV0FoldersFldIdRestorePostRequest { - r.xAgentdriveActor = &xAgentdriveActor - return r -} - -func (r ApiRestoreFolderByIdV0FoldersFldIdRestorePostRequest) IfMatch(ifMatch string) ApiRestoreFolderByIdV0FoldersFldIdRestorePostRequest { - r.ifMatch = &ifMatch - return r -} - -func (r ApiRestoreFolderByIdV0FoldersFldIdRestorePostRequest) Execute() (*FolderRestoreOut, *http.Response, error) { - return r.ApiService.RestoreFolderByIdV0FoldersFldIdRestorePostExecute(r) -} - -/* -RestoreFolderByIdV0FoldersFldIdRestorePost Restore a soft-deleted folder (cascade) - -Mirrors `POST /v0/artifacts/{art_id}/restore` for folders: clear `deleted_at` + `purge_at` on a soft-deleted folder AND exactly the descendants soft-deleted in the same cascade (descendants trashed separately keep their trash state; restore those individually — the per-artifact restore remains for cherry-picking). Available only while the folder is in trash; returns 404 if it is live or already hard-purged. - -Returns 409 `PATH_CONFLICT` when a live folder/artifact now occupies a path this restore would reinstate (`colliding_path` + `kind` identify it). Unlike artifact restore there are NO `rename`/`overwrite` escape hatches — the whole cascade aborts; free the colliding path (or cherry-pick artifacts) and retry. - -`If-Match` (the trashed folder's composite ETag) makes the restore conditional → 412 PRECONDITION_FAILED on a stale token; omitted, the restore is last-writer-wins. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param fldId - @return ApiRestoreFolderByIdV0FoldersFldIdRestorePostRequest -*/ -func (a *DefaultAPIService) RestoreFolderByIdV0FoldersFldIdRestorePost(ctx context.Context, fldId string) ApiRestoreFolderByIdV0FoldersFldIdRestorePostRequest { - return ApiRestoreFolderByIdV0FoldersFldIdRestorePostRequest{ - ApiService: a, - ctx: ctx, - fldId: fldId, - } -} - -// Execute executes the request -// @return FolderRestoreOut -func (a *DefaultAPIService) RestoreFolderByIdV0FoldersFldIdRestorePostExecute(r ApiRestoreFolderByIdV0FoldersFldIdRestorePostRequest) (*FolderRestoreOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *FolderRestoreOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.RestoreFolderByIdV0FoldersFldIdRestorePost") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/folders/{fld_id}/restore" - localVarPath = strings.Replace(localVarPath, "{"+"fld_id"+"}", url.PathEscape(parameterValueToString(r.fldId, "fldId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 r.xAgentdriveActor != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-actor", r.xAgentdriveActor, "simple", "") - } - if r.ifMatch != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "if-match", r.ifMatch, "simple", "") - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 412 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRotateShareRouteV0SharesShrIdRotatePostRequest struct { - ctx context.Context - ApiService *DefaultAPIService - shrId string - xAgentdriveActor *string -} - -func (r ApiRotateShareRouteV0SharesShrIdRotatePostRequest) XAgentdriveActor(xAgentdriveActor string) ApiRotateShareRouteV0SharesShrIdRotatePostRequest { - r.xAgentdriveActor = &xAgentdriveActor - return r -} - -func (r ApiRotateShareRouteV0SharesShrIdRotatePostRequest) Execute() (*ShareMintOut, *http.Response, error) { - return r.ApiService.RotateShareRouteV0SharesShrIdRotatePostExecute(r) -} - -/* -RotateShareRouteV0SharesShrIdRotatePost Revoke + reissue a share link's key (requires can_share) - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param shrId - @return ApiRotateShareRouteV0SharesShrIdRotatePostRequest -*/ -func (a *DefaultAPIService) RotateShareRouteV0SharesShrIdRotatePost(ctx context.Context, shrId string) ApiRotateShareRouteV0SharesShrIdRotatePostRequest { - return ApiRotateShareRouteV0SharesShrIdRotatePostRequest{ - ApiService: a, - ctx: ctx, - shrId: shrId, - } -} - -// Execute executes the request -// @return ShareMintOut -func (a *DefaultAPIService) RotateShareRouteV0SharesShrIdRotatePostExecute(r ApiRotateShareRouteV0SharesShrIdRotatePostRequest) (*ShareMintOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ShareMintOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.RotateShareRouteV0SharesShrIdRotatePost") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/shares/{shr_id}/rotate" - localVarPath = strings.Replace(localVarPath, "{"+"shr_id"+"}", url.PathEscape(parameterValueToString(r.shrId, "shrId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 r.xAgentdriveActor != nil { - parameterAddToHeaderOrQuery(localVarHeaderParams, "x-agentdrive-actor", r.xAgentdriveActor, "simple", "") - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiSearchV0SearchGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - q *string - label *[]string - fileType *string - prefix *string - updatedAfter *time.Time - updatedBefore *time.Time - limit *int32 -} - -func (r ApiSearchV0SearchGetRequest) Q(q string) ApiSearchV0SearchGetRequest { - r.q = &q - return r -} - -func (r ApiSearchV0SearchGetRequest) Label(label []string) ApiSearchV0SearchGetRequest { - r.label = &label - return r -} - -func (r ApiSearchV0SearchGetRequest) FileType(fileType string) ApiSearchV0SearchGetRequest { - r.fileType = &fileType - return r -} - -func (r ApiSearchV0SearchGetRequest) Prefix(prefix string) ApiSearchV0SearchGetRequest { - r.prefix = &prefix - return r -} - -func (r ApiSearchV0SearchGetRequest) UpdatedAfter(updatedAfter time.Time) ApiSearchV0SearchGetRequest { - r.updatedAfter = &updatedAfter - return r -} - -func (r ApiSearchV0SearchGetRequest) UpdatedBefore(updatedBefore time.Time) ApiSearchV0SearchGetRequest { - r.updatedBefore = &updatedBefore - return r -} - -func (r ApiSearchV0SearchGetRequest) Limit(limit int32) ApiSearchV0SearchGetRequest { - r.limit = &limit - return r -} - -func (r ApiSearchV0SearchGetRequest) Execute() (*SearchPage, *http.Response, error) { - return r.ApiService.SearchV0SearchGetExecute(r) -} - -/* -SearchV0SearchGet Full-text search over artifacts in the drive - -Lexical (not semantic) full-text search powered by Postgres `websearch_to_tsquery`. Results are ranked by `ts_rank` over a weighted tsvector (path > content > metadata > labels). - -**Supported query syntax:** -- Words: `kangaroo` (English stemming) -- Phrases: `"exact phrase"` -- Negation: `kangaroo -secret` -- AND (implicit): `kangaroo secret` -- OR: `kangaroo OR koala` -- Paths & filenames: `reports/q3-summary.md` or `q3-summary.md` match by their path words (`/ . _ -` are word boundaries) - -**Not supported (v0):** -- Semantic / embedding similarity -- PDF and image content (only the path + metadata are searchable) -- Non-English stemming -- Fuzzy matching, regex -- Boolean operator parentheses - -**Filters:** `label` (repeatable, AND), `file_type` (enum), `prefix` (path prefix), `updated_after` / `updated_before` (RFC 3339 timestamps, inclusive bounds on `updated_at`). - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiSearchV0SearchGetRequest -*/ -func (a *DefaultAPIService) SearchV0SearchGet(ctx context.Context) ApiSearchV0SearchGetRequest { - return ApiSearchV0SearchGetRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return SearchPage -func (a *DefaultAPIService) SearchV0SearchGetExecute(r ApiSearchV0SearchGetRequest) (*SearchPage, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *SearchPage - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.SearchV0SearchGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/search" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.q == nil { - return localVarReturnValue, nil, reportError("q is required and must be specified") - } - if strlen(*r.q) < 1 { - return localVarReturnValue, nil, reportError("q must have at least 1 elements") - } - if strlen(*r.q) > 200 { - return localVarReturnValue, nil, reportError("q must have less than 200 elements") - } - - parameterAddToHeaderOrQuery(localVarQueryParams, "q", r.q, "form", "") - if r.label != nil { - t := *r.label - if reflect.TypeOf(t).Kind() == reflect.Slice { - s := reflect.ValueOf(t) - for i := 0; i < s.Len(); i++ { - parameterAddToHeaderOrQuery(localVarQueryParams, "label", s.Index(i).Interface(), "form", "multi") - } - } else { - parameterAddToHeaderOrQuery(localVarQueryParams, "label", t, "form", "multi") - } - } - if r.fileType != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "file_type", r.fileType, "form", "") - } - if r.prefix != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "prefix", r.prefix, "form", "") - } - if r.updatedAfter != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "updated_after", r.updatedAfter, "form", "") - } - if r.updatedBefore != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "updated_before", r.updatedBefore, "form", "") - } - if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") - } else { - var defaultValue int32 = 20 - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", defaultValue, "form", "") - r.limit = &defaultValue - } - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiViewArtifactHeadAArtIdHeadGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - artId string -} - -func (r ApiViewArtifactHeadAArtIdHeadGetRequest) Execute() (*ArtifactHeadOut, *http.Response, error) { - return r.ApiService.ViewArtifactHeadAArtIdHeadGetExecute(r) -} - -/* -ViewArtifactHeadAArtIdHeadGet View Artifact Head - -Return `{"version": }` for a readable artifact. - -Auth mirrors the permalink/viewer: the owner, or an `anyone:viewer` -grant (a published artifact), reads. Two deliberate differences from -the HTML viewer: - - * Never redirect to login. A poll is a background `fetch`, not a - navigation — an HTML login page would be a useless body and a - same-origin redirect the client can't act on. Anonymous callers - on a private/absent artifact get a flat 404. - * "Doesn't exist" and "exists but not readable" collapse to the - same 404, so an anonymous poller can't use this as an existence - oracle (matches the permalink/viewer leak guard). - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param artId - @return ApiViewArtifactHeadAArtIdHeadGetRequest -*/ -func (a *DefaultAPIService) ViewArtifactHeadAArtIdHeadGet(ctx context.Context, artId string) ApiViewArtifactHeadAArtIdHeadGetRequest { - return ApiViewArtifactHeadAArtIdHeadGetRequest{ - ApiService: a, - ctx: ctx, - artId: artId, - } -} - -// Execute executes the request -// @return ArtifactHeadOut -func (a *DefaultAPIService) ViewArtifactHeadAArtIdHeadGetExecute(r ApiViewArtifactHeadAArtIdHeadGetRequest) (*ArtifactHeadOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ArtifactHeadOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ViewArtifactHeadAArtIdHeadGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/a/{art_id}/head" - localVarPath = strings.Replace(localVarPath, "{"+"art_id"+"}", url.PathEscape(parameterValueToString(r.artId, "artId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiViewArtifactVersionVArtIdVersionGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - artId string - version int32 - raw *int32 - download *int32 -} - -func (r ApiViewArtifactVersionVArtIdVersionGetRequest) Raw(raw int32) ApiViewArtifactVersionVArtIdVersionGetRequest { - r.raw = &raw - return r -} - -func (r ApiViewArtifactVersionVArtIdVersionGetRequest) Download(download int32) ApiViewArtifactVersionVArtIdVersionGetRequest { - r.download = &download - return r -} - -func (r ApiViewArtifactVersionVArtIdVersionGetRequest) Execute() (*os.File, *http.Response, error) { - return r.ApiService.ViewArtifactVersionVArtIdVersionGetExecute(r) -} - -/* -ViewArtifactVersionVArtIdVersionGet View Artifact Version - -Render version `version` of an artifact, read-only. - -Version history is owner-only. The drive-blind `can_read` gate still -provides the same sign-in-or-404 masking as `/a/{art_id}`, but readable -non-owners cannot browse snapshots. A pruned or never-existed version -renders a friendly unavailable state, never a 500. -`?raw=1` / `?download=1` stream the version's bytes (powering the bar's -Raw / Download buttons) with the same sandbox+nosniff headers as the -head raw path. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param artId - @param version - @return ApiViewArtifactVersionVArtIdVersionGetRequest -*/ -func (a *DefaultAPIService) ViewArtifactVersionVArtIdVersionGet(ctx context.Context, artId string, version int32) ApiViewArtifactVersionVArtIdVersionGetRequest { - return ApiViewArtifactVersionVArtIdVersionGetRequest{ - ApiService: a, - ctx: ctx, - artId: artId, - version: version, - } -} - -// Execute executes the request -// @return *os.File -func (a *DefaultAPIService) ViewArtifactVersionVArtIdVersionGetExecute(r ApiViewArtifactVersionVArtIdVersionGetRequest) (*os.File, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *os.File - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ViewArtifactVersionVArtIdVersionGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v/{art_id}/{version}" - localVarPath = strings.Replace(localVarPath, "{"+"art_id"+"}", url.PathEscape(parameterValueToString(r.artId, "artId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"version"+"}", url.PathEscape(parameterValueToString(r.version, "version")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.raw != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "raw", r.raw, "form", "") - } else { - var defaultValue int32 = 0 - parameterAddToHeaderOrQuery(localVarQueryParams, "raw", defaultValue, "form", "") - r.raw = &defaultValue - } - if r.download != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "download", r.download, "form", "") - } else { - var defaultValue int32 = 0 - parameterAddToHeaderOrQuery(localVarQueryParams, "download", defaultValue, "form", "") - r.download = &defaultValue - } - // 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/octet-stream", "text/html", "application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiViewFileDriveIdPathGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - driveId string - path string - raw *int32 - download *int32 -} - -func (r ApiViewFileDriveIdPathGetRequest) Raw(raw int32) ApiViewFileDriveIdPathGetRequest { - r.raw = &raw - return r -} - -func (r ApiViewFileDriveIdPathGetRequest) Download(download int32) ApiViewFileDriveIdPathGetRequest { - r.download = &download - return r -} - -func (r ApiViewFileDriveIdPathGetRequest) Execute() (*os.File, *http.Response, error) { - return r.ApiService.ViewFileDriveIdPathGetExecute(r) -} +Liveness + DB-reachability probe. Used by Cloud Run / k8s healthchecks +and any uptime monitor. Returns 200 only if the DB pool can serve a +trivial query; 503 otherwise so the orchestrator can pull the instance +out of rotation. -/* -ViewFileDriveIdPathGet View File +NOTE: route is `/health`, NOT `/healthz`. Google's edge infrastructure +intercepts `/healthz` (legacy kubernetes-reserved path) and returns a +generic 404 before traffic reaches Cloud Run — discovered the hard way +during the first prod deploy. Don't rename back. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param driveId - @param path - @return ApiViewFileDriveIdPathGetRequest + @return ApiHealthRequest */ -func (a *DefaultAPIService) ViewFileDriveIdPathGet(ctx context.Context, driveId string, path string) ApiViewFileDriveIdPathGetRequest { - return ApiViewFileDriveIdPathGetRequest{ +func (a *DefaultAPIService) Health(ctx context.Context) ApiHealthRequest { + return ApiHealthRequest{ ApiService: a, ctx: ctx, - driveId: driveId, - path: path, } } // Execute executes the request -// @return *os.File -func (a *DefaultAPIService) ViewFileDriveIdPathGetExecute(r ApiViewFileDriveIdPathGetRequest) (*os.File, *http.Response, error) { +// @return HealthOut +func (a *DefaultAPIService) HealthExecute(r ApiHealthRequest) (*HealthOut, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *os.File + localVarReturnValue *HealthOut ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ViewFileDriveIdPathGet") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.Health") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/{drive_id}/{path}" - localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"path"+"}", url.PathEscape(parameterValueToString(r.path, "path")), -1) + localVarPath := localBasePath + "/health" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.raw != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "raw", r.raw, "form", "") - } else { - var defaultValue int32 = 0 - parameterAddToHeaderOrQuery(localVarQueryParams, "raw", defaultValue, "form", "") - r.raw = &defaultValue - } - if r.download != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "download", r.download, "form", "") - } else { - var defaultValue int32 = 0 - parameterAddToHeaderOrQuery(localVarQueryParams, "download", defaultValue, "form", "") - r.download = &defaultValue - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -13988,7 +85,7 @@ func (a *DefaultAPIService) ViewFileDriveIdPathGetExecute(r ApiViewFileDriveIdPa } // to determine the Accept header - localVarHTTPHeaderAccepts := []string{"application/octet-stream", "text/html", "application/json"} + localVarHTTPHeaderAccepts := []string{"application/json"} // set Accept header localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) @@ -14017,8 +114,8 @@ func (a *DefaultAPIService) ViewFileDriveIdPathGetExecute(r ApiViewFileDriveIdPa body: localVarBody, error: localVarHTTPResponse.Status, } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse + if localVarHTTPResponse.StatusCode == 503 { + var v HealthDegradedResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -14041,241 +138,3 @@ func (a *DefaultAPIService) ViewFileDriveIdPathGetExecute(r ApiViewFileDriveIdPa return localVarReturnValue, localVarHTTPResponse, nil } - -type ApiViewPermalinkArtifactAArtIdGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - artId string -} - -func (r ApiViewPermalinkArtifactAArtIdGetRequest) Execute() (*http.Response, error) { - return r.ApiService.ViewPermalinkArtifactAArtIdGetExecute(r) -} - -/* -ViewPermalinkArtifactAArtIdGet View Permalink Artifact - -Resolve a stable artifact ID to its path-URL and 302 there. - -Auth model matches the path URL: public artifacts redirect for -anyone; private artifacts redirect only for the owner. Non-owners -on private artifacts get 404 — same response as "doesn't exist", -so the ID's existence isn't leaked. The forwarded query-param -allowlist is `raw`, `download` (see _PERMALINK_FORWARDED_PARAMS). - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param artId - @return ApiViewPermalinkArtifactAArtIdGetRequest -*/ -func (a *DefaultAPIService) ViewPermalinkArtifactAArtIdGet(ctx context.Context, artId string) ApiViewPermalinkArtifactAArtIdGetRequest { - return ApiViewPermalinkArtifactAArtIdGetRequest{ - ApiService: a, - ctx: ctx, - artId: artId, - } -} - -// Execute executes the request -func (a *DefaultAPIService) ViewPermalinkArtifactAArtIdGetExecute(r ApiViewPermalinkArtifactAArtIdGetRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ViewPermalinkArtifactAArtIdGet") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/a/{art_id}" - localVarPath = strings.Replace(localVarPath, "{"+"art_id"+"}", url.PathEscape(parameterValueToString(r.artId, "artId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiViewPermalinkFolderFFldIdGetRequest struct { - ctx context.Context - ApiService *DefaultAPIService - fldId string -} - -func (r ApiViewPermalinkFolderFFldIdGetRequest) Execute() (*http.Response, error) { - return r.ApiService.ViewPermalinkFolderFFldIdGetExecute(r) -} - -/* -ViewPermalinkFolderFFldIdGet View Permalink Folder - -Resolve a stable folder ID to its current path-URL and 302. - -Auth model mirrors the artifact permalink: public folder = anon -OK; private folder = owner only, otherwise 404 (no existence -leak). "Public" is an `anyone:viewer` grant on the `fld_*` id -resolved through `can_read` (§4.4); folders carry no visibility -flag of their own. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param fldId - @return ApiViewPermalinkFolderFFldIdGetRequest -*/ -func (a *DefaultAPIService) ViewPermalinkFolderFFldIdGet(ctx context.Context, fldId string) ApiViewPermalinkFolderFFldIdGetRequest { - return ApiViewPermalinkFolderFFldIdGetRequest{ - ApiService: a, - ctx: ctx, - fldId: fldId, - } -} - -// Execute executes the request -func (a *DefaultAPIService) ViewPermalinkFolderFFldIdGetExecute(r ApiViewPermalinkFolderFFldIdGetRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ViewPermalinkFolderFFldIdGet") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/f/{fld_id}" - localVarPath = strings.Replace(localVarPath, "{"+"fld_id"+"}", url.PathEscape(parameterValueToString(r.fldId, "fldId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} diff --git a/sdk/go/api_discovery.go b/sdk/go/api_discovery.go new file mode 100644 index 0000000..4d7fbd7 --- /dev/null +++ b/sdk/go/api_discovery.go @@ -0,0 +1,122 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" +) + + +// DiscoveryAPIService DiscoveryAPI service +type DiscoveryAPIService service + +type ApiOauthProtectedResourceRequest struct { + ctx context.Context + ApiService *DiscoveryAPIService +} + +func (r ApiOauthProtectedResourceRequest) Execute() (map[string]*interface{}, *http.Response, error) { + return r.ApiService.OauthProtectedResourceExecute(r) +} + +/* +OauthProtectedResource Protected-resource metadata (RFC 9728) + +Names the reset v0 surface as a protected resource and points clients at Hub — the only authorization server whose product tokens this deployment accepts. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiOauthProtectedResourceRequest +*/ +func (a *DiscoveryAPIService) OauthProtectedResource(ctx context.Context) ApiOauthProtectedResourceRequest { + return ApiOauthProtectedResourceRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return map[string]*interface{} +func (a *DiscoveryAPIService) OauthProtectedResourceExecute(r ApiOauthProtectedResourceRequest) (map[string]*interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue map[string]*interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DiscoveryAPIService.OauthProtectedResource") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/.well-known/oauth-protected-resource" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // 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 + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/sdk/go/api_drives.go b/sdk/go/api_drives.go index 18461c0..b4f6c90 100644 --- a/sdk/go/api_drives.go +++ b/sdk/go/api_drives.go @@ -1,7 +1,7 @@ /* AgentDrive -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. API version: */ @@ -23,62 +23,74 @@ import ( // DrivesAPIService DrivesAPI service type DrivesAPIService service -type ApiCreateDriveKeyRouteV0DrivesDriveIdKeysPostRequest struct { +type ApiDrivesCreateRequest struct { ctx context.Context ApiService *DrivesAPIService - driveId string - driveApiKeyCreateIn *DriveApiKeyCreateIn + idempotencyKey *string + driveCreateIn *DriveCreateIn + authorization *string } -func (r ApiCreateDriveKeyRouteV0DrivesDriveIdKeysPostRequest) DriveApiKeyCreateIn(driveApiKeyCreateIn DriveApiKeyCreateIn) ApiCreateDriveKeyRouteV0DrivesDriveIdKeysPostRequest { - r.driveApiKeyCreateIn = &driveApiKeyCreateIn +func (r ApiDrivesCreateRequest) IdempotencyKey(idempotencyKey string) ApiDrivesCreateRequest { + r.idempotencyKey = &idempotencyKey return r } -func (r ApiCreateDriveKeyRouteV0DrivesDriveIdKeysPostRequest) Execute() (*DriveApiKeyCreateOut, *http.Response, error) { - return r.ApiService.CreateDriveKeyRouteV0DrivesDriveIdKeysPostExecute(r) +func (r ApiDrivesCreateRequest) DriveCreateIn(driveCreateIn DriveCreateIn) ApiDrivesCreateRequest { + r.driveCreateIn = &driveCreateIn + return r +} + +func (r ApiDrivesCreateRequest) Authorization(authorization string) ApiDrivesCreateRequest { + r.authorization = &authorization + return r +} + +func (r ApiDrivesCreateRequest) Execute() (*DriveOut, *http.Response, error) { + return r.ApiService.DrivesCreateExecute(r) } /* -CreateDriveKeyRouteV0DrivesDriveIdKeysPost Create a drive API key +DrivesCreate Create Drive -Mint a new `ad_live_` key for a drive you manage — a drive may hold several (one per agent/integration). A `label` (a name for the key) is **required**. **Manager only** (404 no-leak otherwise), `full`-scope user token. The raw key is returned **once** — store it now. +Create a drive with its structural root folder and creator-manager +grant(s) in one transaction; idempotent under the ``Idempotency-Key``. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param driveId - @return ApiCreateDriveKeyRouteV0DrivesDriveIdKeysPostRequest + @return ApiDrivesCreateRequest */ -func (a *DrivesAPIService) CreateDriveKeyRouteV0DrivesDriveIdKeysPost(ctx context.Context, driveId string) ApiCreateDriveKeyRouteV0DrivesDriveIdKeysPostRequest { - return ApiCreateDriveKeyRouteV0DrivesDriveIdKeysPostRequest{ +func (a *DrivesAPIService) DrivesCreate(ctx context.Context) ApiDrivesCreateRequest { + return ApiDrivesCreateRequest{ ApiService: a, ctx: ctx, - driveId: driveId, } } // Execute executes the request -// @return DriveApiKeyCreateOut -func (a *DrivesAPIService) CreateDriveKeyRouteV0DrivesDriveIdKeysPostExecute(r ApiCreateDriveKeyRouteV0DrivesDriveIdKeysPostRequest) (*DriveApiKeyCreateOut, *http.Response, error) { +// @return DriveOut +func (a *DrivesAPIService) DrivesCreateExecute(r ApiDrivesCreateRequest) (*DriveOut, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile - localVarReturnValue *DriveApiKeyCreateOut + localVarReturnValue *DriveOut ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesAPIService.CreateDriveKeyRouteV0DrivesDriveIdKeysPost") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesAPIService.DrivesCreate") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v0/drives/{drive_id}/keys" - localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + localVarPath := localBasePath + "/v0/drives" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.driveApiKeyCreateIn == nil { - return localVarReturnValue, nil, reportError("driveApiKeyCreateIn is required and must be specified") + if r.idempotencyKey == nil { + return localVarReturnValue, nil, reportError("idempotencyKey is required and must be specified") + } + if r.driveCreateIn == nil { + return localVarReturnValue, nil, reportError("driveCreateIn is required and must be specified") } // to determine the Content-Type header @@ -98,8 +110,12 @@ func (a *DrivesAPIService) CreateDriveKeyRouteV0DrivesDriveIdKeysPostExecute(r A if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + parameterAddToHeaderOrQuery(localVarHeaderParams, "Idempotency-Key", r.idempotencyKey, "simple", "") + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } // body params - localVarPostBody = r.driveApiKeyCreateIn + localVarPostBody = r.driveCreateIn req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -123,7 +139,7 @@ func (a *DrivesAPIService) CreateDriveKeyRouteV0DrivesDriveIdKeysPostExecute(r A error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse + var v DrivesCreate400Response err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -134,7 +150,7 @@ func (a *DrivesAPIService) CreateDriveKeyRouteV0DrivesDriveIdKeysPostExecute(r A return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse + var v DrivesCreate400Response err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -145,7 +161,7 @@ func (a *DrivesAPIService) CreateDriveKeyRouteV0DrivesDriveIdKeysPostExecute(r A return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse + var v DrivesCreate400Response err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -156,7 +172,29 @@ func (a *DrivesAPIService) CreateDriveKeyRouteV0DrivesDriveIdKeysPostExecute(r A return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse + var v DrivesList400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v DrivesList400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 412 { + var v DrivesList400Response err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -177,8 +215,30 @@ func (a *DrivesAPIService) CreateDriveKeyRouteV0DrivesDriveIdKeysPostExecute(r A newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } + if localVarHTTPResponse.StatusCode == 428 { + var v DrivesList400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -202,66 +262,82 @@ func (a *DrivesAPIService) CreateDriveKeyRouteV0DrivesDriveIdKeysPostExecute(r A return localVarReturnValue, localVarHTTPResponse, nil } -type ApiCreateDriveRouteV0DrivesPostRequest struct { +type ApiDrivesDeleteRequest struct { ctx context.Context ApiService *DrivesAPIService - driveCreateIn *DriveCreateIn + driveId string + idempotencyKey *string + ifMatch *string + authorization *string } -func (r ApiCreateDriveRouteV0DrivesPostRequest) DriveCreateIn(driveCreateIn DriveCreateIn) ApiCreateDriveRouteV0DrivesPostRequest { - r.driveCreateIn = &driveCreateIn +func (r ApiDrivesDeleteRequest) IdempotencyKey(idempotencyKey string) ApiDrivesDeleteRequest { + r.idempotencyKey = &idempotencyKey return r } -func (r ApiCreateDriveRouteV0DrivesPostRequest) Execute() (*DriveCreateOut, *http.Response, error) { - return r.ApiService.CreateDriveRouteV0DrivesPostExecute(r) +func (r ApiDrivesDeleteRequest) IfMatch(ifMatch string) ApiDrivesDeleteRequest { + r.ifMatch = &ifMatch + return r } -/* -CreateDriveRouteV0DrivesPost Create a drive in your active space +func (r ApiDrivesDeleteRequest) Authorization(authorization string) ApiDrivesDeleteRequest { + r.authorization = &authorization + return r +} -Create a named drive. Any **member** of the space may create one; the creator becomes its **owner**. Requires a `full`-scope user token. The response carries the drive's `ad_live_` API key **once** (`api_key`) — store it now, it is never returned again (mint more keys via `POST /v0/drives/{id}/keys`). +func (r ApiDrivesDeleteRequest) Execute() (*DriveOut, *http.Response, error) { + return r.ApiService.DrivesDeleteExecute(r) +} -The target workspace is the user's active organization (`users.default_org`); cross-workspace creation names no other workspace in v0. +/* +DrivesDelete Delete Drive -A space may hold up to its plan's drive limit (workspaces-v2 §4.6; seat-aware for shared drives). A caller at the limit is blocked with `403 DRIVE_LIMIT_REACHED`; the limit is tier-governed, not a hard cap. +Soft-delete a drive. Returns 200 with the deleted representation so the +client has the post-delete revision/ETag for a restore. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateDriveRouteV0DrivesPostRequest + @param driveId + @return ApiDrivesDeleteRequest */ -func (a *DrivesAPIService) CreateDriveRouteV0DrivesPost(ctx context.Context) ApiCreateDriveRouteV0DrivesPostRequest { - return ApiCreateDriveRouteV0DrivesPostRequest{ +func (a *DrivesAPIService) DrivesDelete(ctx context.Context, driveId string) ApiDrivesDeleteRequest { + return ApiDrivesDeleteRequest{ ApiService: a, ctx: ctx, + driveId: driveId, } } // Execute executes the request -// @return DriveCreateOut -func (a *DrivesAPIService) CreateDriveRouteV0DrivesPostExecute(r ApiCreateDriveRouteV0DrivesPostRequest) (*DriveCreateOut, *http.Response, error) { +// @return DriveOut +func (a *DrivesAPIService) DrivesDeleteExecute(r ApiDrivesDeleteRequest) (*DriveOut, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost + localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} formFiles []formFile - localVarReturnValue *DriveCreateOut + localVarReturnValue *DriveOut ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesAPIService.CreateDriveRouteV0DrivesPost") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesAPIService.DrivesDelete") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v0/drives" + localVarPath := localBasePath + "/v0/drives/{drive_id}" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.driveCreateIn == nil { - return localVarReturnValue, nil, reportError("driveCreateIn is required and must be specified") + if r.idempotencyKey == nil { + return localVarReturnValue, nil, reportError("idempotencyKey is required and must be specified") + } + if r.ifMatch == nil { + return localVarReturnValue, nil, reportError("ifMatch is required and must be specified") } // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -277,8 +353,11 @@ func (a *DrivesAPIService) CreateDriveRouteV0DrivesPostExecute(r ApiCreateDriveR if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.driveCreateIn + parameterAddToHeaderOrQuery(localVarHeaderParams, "Idempotency-Key", r.idempotencyKey, "simple", "") + parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Match", r.ifMatch, "simple", "") + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -301,8 +380,19 @@ func (a *DrivesAPIService) CreateDriveRouteV0DrivesPostExecute(r ApiCreateDriveR body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse + var v DrivesCreate400Response err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -313,7 +403,40 @@ func (a *DrivesAPIService) CreateDriveRouteV0DrivesPostExecute(r ApiCreateDriveR return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v DrivesList400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 412 { + var v DrivesList400Response err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -334,8 +457,30 @@ func (a *DrivesAPIService) CreateDriveRouteV0DrivesPostExecute(r ApiCreateDriveR newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } + if localVarHTTPResponse.StatusCode == 428 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -359,75 +504,92 @@ func (a *DrivesAPIService) CreateDriveRouteV0DrivesPostExecute(r ApiCreateDriveR return localVarReturnValue, localVarHTTPResponse, nil } -type ApiListDriveKeysRouteV0DrivesDriveIdKeysGetRequest struct { +type ApiDrivesListRequest struct { ctx context.Context ApiService *DrivesAPIService - driveId string - cursor *string + lifecycle *string limit *int32 + cursor *string + authorization *string } -func (r ApiListDriveKeysRouteV0DrivesDriveIdKeysGetRequest) Cursor(cursor string) ApiListDriveKeysRouteV0DrivesDriveIdKeysGetRequest { - r.cursor = &cursor +func (r ApiDrivesListRequest) Lifecycle(lifecycle string) ApiDrivesListRequest { + r.lifecycle = &lifecycle return r } -func (r ApiListDriveKeysRouteV0DrivesDriveIdKeysGetRequest) Limit(limit int32) ApiListDriveKeysRouteV0DrivesDriveIdKeysGetRequest { +func (r ApiDrivesListRequest) Limit(limit int32) ApiDrivesListRequest { r.limit = &limit return r } -func (r ApiListDriveKeysRouteV0DrivesDriveIdKeysGetRequest) Execute() (*DriveApiKeyListOut, *http.Response, error) { - return r.ApiService.ListDriveKeysRouteV0DrivesDriveIdKeysGetExecute(r) +func (r ApiDrivesListRequest) Cursor(cursor string) ApiDrivesListRequest { + r.cursor = &cursor + return r +} + +func (r ApiDrivesListRequest) Authorization(authorization string) ApiDrivesListRequest { + r.authorization = &authorization + return r +} + +func (r ApiDrivesListRequest) Execute() (*DriveListOut, *http.Response, error) { + return r.ApiService.DrivesListExecute(r) } /* -ListDriveKeysRouteV0DrivesDriveIdKeysGet List a drive's API keys +DrivesList List Drives -List the `ad_live_` keys for a drive you manage (oldest first, including recently-revoked rows — filter on `revoked_at` for live only). **Manager only** (404 no-leak otherwise). A `read`-scope user token may list (metadata reveals no secret), mirroring `GET /v0/drives`. Metadata only — the raw key is never returned after mint. +List the actor's workspace drives, newest-first (keyset paginated). -**Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. +``lifecycle`` (active|deleted|all) exposes soft-deleted drives so a +manager can read the post-delete revision as the If-Match source for a +restore. Unknown query parameters are rejected (§6.3). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param driveId - @return ApiListDriveKeysRouteV0DrivesDriveIdKeysGetRequest + @return ApiDrivesListRequest */ -func (a *DrivesAPIService) ListDriveKeysRouteV0DrivesDriveIdKeysGet(ctx context.Context, driveId string) ApiListDriveKeysRouteV0DrivesDriveIdKeysGetRequest { - return ApiListDriveKeysRouteV0DrivesDriveIdKeysGetRequest{ +func (a *DrivesAPIService) DrivesList(ctx context.Context) ApiDrivesListRequest { + return ApiDrivesListRequest{ ApiService: a, ctx: ctx, - driveId: driveId, } } // Execute executes the request -// @return DriveApiKeyListOut -func (a *DrivesAPIService) ListDriveKeysRouteV0DrivesDriveIdKeysGetExecute(r ApiListDriveKeysRouteV0DrivesDriveIdKeysGetRequest) (*DriveApiKeyListOut, *http.Response, error) { +// @return DriveListOut +func (a *DrivesAPIService) DrivesListExecute(r ApiDrivesListRequest) (*DriveListOut, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *DriveApiKeyListOut + localVarReturnValue *DriveListOut ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesAPIService.ListDriveKeysRouteV0DrivesDriveIdKeysGet") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesAPIService.DrivesList") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v0/drives/{drive_id}/keys" - localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + localVarPath := localBasePath + "/v0/drives" localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.cursor != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") + if r.lifecycle != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "lifecycle", r.lifecycle, "form", "") + } else { + var defaultValue string = "active" + parameterAddToHeaderOrQuery(localVarQueryParams, "lifecycle", defaultValue, "form", "") + r.lifecycle = &defaultValue } if r.limit != nil { parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") } + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") + } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -445,6 +607,9 @@ func (a *DrivesAPIService) ListDriveKeysRouteV0DrivesDriveIdKeysGetExecute(r Api if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -467,8 +632,19 @@ func (a *DrivesAPIService) ListDriveKeysRouteV0DrivesDriveIdKeysGetExecute(r Api body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesList400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse + var v DrivesList400Response err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -479,7 +655,7 @@ func (a *DrivesAPIService) ListDriveKeysRouteV0DrivesDriveIdKeysGetExecute(r Api return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse + var v DrivesList400Response err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -490,7 +666,7 @@ func (a *DrivesAPIService) ListDriveKeysRouteV0DrivesDriveIdKeysGetExecute(r Api return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse + var v DrivesList400Response err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -512,7 +688,18 @@ func (a *DrivesAPIService) ListDriveKeysRouteV0DrivesDriveIdKeysGetExecute(r Api return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse + var v DrivesList400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesList400Response err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -536,71 +723,68 @@ func (a *DrivesAPIService) ListDriveKeysRouteV0DrivesDriveIdKeysGetExecute(r Api return localVarReturnValue, localVarHTTPResponse, nil } -type ApiListDrivesRouteV0DrivesGetRequest struct { +type ApiDrivesReadRequest struct { ctx context.Context ApiService *DrivesAPIService - cursor *string - limit *int32 + driveId string + ifNoneMatch *string + authorization *string } -func (r ApiListDrivesRouteV0DrivesGetRequest) Cursor(cursor string) ApiListDrivesRouteV0DrivesGetRequest { - r.cursor = &cursor +func (r ApiDrivesReadRequest) IfNoneMatch(ifNoneMatch string) ApiDrivesReadRequest { + r.ifNoneMatch = &ifNoneMatch return r } -func (r ApiListDrivesRouteV0DrivesGetRequest) Limit(limit int32) ApiListDrivesRouteV0DrivesGetRequest { - r.limit = &limit +func (r ApiDrivesReadRequest) Authorization(authorization string) ApiDrivesReadRequest { + r.authorization = &authorization return r } -func (r ApiListDrivesRouteV0DrivesGetRequest) Execute() (*DriveList, *http.Response, error) { - return r.ApiService.ListDrivesRouteV0DrivesGetExecute(r) +func (r ApiDrivesReadRequest) Execute() (*DriveOut, *http.Response, error) { + return r.ApiService.DrivesReadExecute(r) } /* -ListDrivesRouteV0DrivesGet List the drives you can see - -Returns drive **metadata** (workspaces-design §4.2): an **admin** sees the whole active workspace's drive inventory (every owner); a **member** sees only the drives they own. Metadata only — owner, size, timestamps — never a raw API key, and never an authorization to read a drive's contents. A `read`-scope token may call this; mutations require `full`. +DrivesRead Read Drive -**Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. +Read one active drive. ETag = quoted revision; matching +``If-None-Match`` → 304. Deleted and cross-workspace drives are 404. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListDrivesRouteV0DrivesGetRequest + @param driveId + @return ApiDrivesReadRequest */ -func (a *DrivesAPIService) ListDrivesRouteV0DrivesGet(ctx context.Context) ApiListDrivesRouteV0DrivesGetRequest { - return ApiListDrivesRouteV0DrivesGetRequest{ +func (a *DrivesAPIService) DrivesRead(ctx context.Context, driveId string) ApiDrivesReadRequest { + return ApiDrivesReadRequest{ ApiService: a, ctx: ctx, + driveId: driveId, } } // Execute executes the request -// @return DriveList -func (a *DrivesAPIService) ListDrivesRouteV0DrivesGetExecute(r ApiListDrivesRouteV0DrivesGetRequest) (*DriveList, *http.Response, error) { +// @return DriveOut +func (a *DrivesAPIService) DrivesReadExecute(r ApiDrivesReadRequest) (*DriveOut, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *DriveList + localVarReturnValue *DriveOut ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesAPIService.ListDrivesRouteV0DrivesGet") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesAPIService.DrivesRead") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v0/drives" + localVarPath := localBasePath + "/v0/drives/{drive_id}" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.cursor != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") - } - if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") - } // to determine the Content-Type header localVarHTTPContentTypes := []string{} @@ -618,6 +802,12 @@ func (a *DrivesAPIService) ListDrivesRouteV0DrivesGetExecute(r ApiListDrivesRout if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.ifNoneMatch != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "If-None-Match", r.ifNoneMatch, "simple", "") + } + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -640,8 +830,19 @@ func (a *DrivesAPIService) ListDrivesRouteV0DrivesGetExecute(r ApiListDrivesRout body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse + var v DrivesCreate400Response err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -652,7 +853,18 @@ func (a *DrivesAPIService) ListDrivesRouteV0DrivesGetExecute(r ApiListDrivesRout return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -674,7 +886,18 @@ func (a *DrivesAPIService) ListDrivesRouteV0DrivesGetExecute(r ApiListDrivesRout return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -698,33 +921,46 @@ func (a *DrivesAPIService) ListDrivesRouteV0DrivesGetExecute(r ApiListDrivesRout return localVarReturnValue, localVarHTTPResponse, nil } -type ApiRenameDriveRouteV0DrivesDriveIdPatchRequest struct { +type ApiDrivesRestoreRequest struct { ctx context.Context ApiService *DrivesAPIService driveId string - driveRenameIn *DriveRenameIn + idempotencyKey *string + ifMatch *string + authorization *string +} + +func (r ApiDrivesRestoreRequest) IdempotencyKey(idempotencyKey string) ApiDrivesRestoreRequest { + r.idempotencyKey = &idempotencyKey + return r } -func (r ApiRenameDriveRouteV0DrivesDriveIdPatchRequest) DriveRenameIn(driveRenameIn DriveRenameIn) ApiRenameDriveRouteV0DrivesDriveIdPatchRequest { - r.driveRenameIn = &driveRenameIn +func (r ApiDrivesRestoreRequest) IfMatch(ifMatch string) ApiDrivesRestoreRequest { + r.ifMatch = &ifMatch return r } -func (r ApiRenameDriveRouteV0DrivesDriveIdPatchRequest) Execute() (*DriveOut, *http.Response, error) { - return r.ApiService.RenameDriveRouteV0DrivesDriveIdPatchExecute(r) +func (r ApiDrivesRestoreRequest) Authorization(authorization string) ApiDrivesRestoreRequest { + r.authorization = &authorization + return r +} + +func (r ApiDrivesRestoreRequest) Execute() (*DriveOut, *http.Response, error) { + return r.ApiService.DrivesRestoreExecute(r) } /* -RenameDriveRouteV0DrivesDriveIdPatch Rename a drive you own +DrivesRestore Restore Drive -Rename a drive. **Owner only** — a drive id that isn't yours returns 404 (no-leak). Requires a `full`-scope user token. +Restore a soft-deleted drive. If-Match must carry the post-delete +revision; restoring an already-active drive is 409 CONFLICT. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param driveId - @return ApiRenameDriveRouteV0DrivesDriveIdPatchRequest + @return ApiDrivesRestoreRequest */ -func (a *DrivesAPIService) RenameDriveRouteV0DrivesDriveIdPatch(ctx context.Context, driveId string) ApiRenameDriveRouteV0DrivesDriveIdPatchRequest { - return ApiRenameDriveRouteV0DrivesDriveIdPatchRequest{ +func (a *DrivesAPIService) DrivesRestore(ctx context.Context, driveId string) ApiDrivesRestoreRequest { + return ApiDrivesRestoreRequest{ ApiService: a, ctx: ctx, driveId: driveId, @@ -733,31 +969,34 @@ func (a *DrivesAPIService) RenameDriveRouteV0DrivesDriveIdPatch(ctx context.Cont // Execute executes the request // @return DriveOut -func (a *DrivesAPIService) RenameDriveRouteV0DrivesDriveIdPatchExecute(r ApiRenameDriveRouteV0DrivesDriveIdPatchRequest) (*DriveOut, *http.Response, error) { +func (a *DrivesAPIService) DrivesRestoreExecute(r ApiDrivesRestoreRequest) (*DriveOut, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPatch + localVarHTTPMethod = http.MethodPost localVarPostBody interface{} formFiles []formFile localVarReturnValue *DriveOut ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesAPIService.RenameDriveRouteV0DrivesDriveIdPatch") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesAPIService.DrivesRestore") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v0/drives/{drive_id}" + localVarPath := localBasePath + "/v0/drives/{drive_id}/restore" localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} - if r.driveRenameIn == nil { - return localVarReturnValue, nil, reportError("driveRenameIn is required and must be specified") + if r.idempotencyKey == nil { + return localVarReturnValue, nil, reportError("idempotencyKey is required and must be specified") + } + if r.ifMatch == nil { + return localVarReturnValue, nil, reportError("ifMatch is required and must be specified") } // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/json"} + localVarHTTPContentTypes := []string{} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -773,8 +1012,11 @@ func (a *DrivesAPIService) RenameDriveRouteV0DrivesDriveIdPatchExecute(r ApiRena if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } - // body params - localVarPostBody = r.driveRenameIn + parameterAddToHeaderOrQuery(localVarHeaderParams, "Idempotency-Key", r.idempotencyKey, "simple", "") + parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Match", r.ifMatch, "simple", "") + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -798,7 +1040,7 @@ func (a *DrivesAPIService) RenameDriveRouteV0DrivesDriveIdPatchExecute(r ApiRena error: localVarHTTPResponse.Status, } if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse + var v DrivesCreate400Response err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -809,7 +1051,7 @@ func (a *DrivesAPIService) RenameDriveRouteV0DrivesDriveIdPatchExecute(r ApiRena return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse + var v DrivesCreate400Response err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -820,7 +1062,7 @@ func (a *DrivesAPIService) RenameDriveRouteV0DrivesDriveIdPatchExecute(r ApiRena return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse + var v DrivesCreate400Response err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -831,7 +1073,7 @@ func (a *DrivesAPIService) RenameDriveRouteV0DrivesDriveIdPatchExecute(r ApiRena return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse + var v DrivesCreate400Response err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -842,7 +1084,18 @@ func (a *DrivesAPIService) RenameDriveRouteV0DrivesDriveIdPatchExecute(r ApiRena return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 409 { - var v ErrorResponse + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 412 { + var v DrivesCreate400Response err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -863,8 +1116,30 @@ func (a *DrivesAPIService) RenameDriveRouteV0DrivesDriveIdPatchExecute(r ApiRena newErr.model = v return localVarReturnValue, localVarHTTPResponse, newErr } + if localVarHTTPResponse.StatusCode == 428 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -888,59 +1163,91 @@ func (a *DrivesAPIService) RenameDriveRouteV0DrivesDriveIdPatchExecute(r ApiRena return localVarReturnValue, localVarHTTPResponse, nil } -type ApiRevokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePostRequest struct { +type ApiDrivesUpdateRequest struct { ctx context.Context ApiService *DrivesAPIService driveId string - keyId string + idempotencyKey *string + ifMatch *string + driveUpdateIn *DriveUpdateIn + authorization *string +} + +func (r ApiDrivesUpdateRequest) IdempotencyKey(idempotencyKey string) ApiDrivesUpdateRequest { + r.idempotencyKey = &idempotencyKey + return r +} + +func (r ApiDrivesUpdateRequest) IfMatch(ifMatch string) ApiDrivesUpdateRequest { + r.ifMatch = &ifMatch + return r +} + +func (r ApiDrivesUpdateRequest) DriveUpdateIn(driveUpdateIn DriveUpdateIn) ApiDrivesUpdateRequest { + r.driveUpdateIn = &driveUpdateIn + return r +} + +func (r ApiDrivesUpdateRequest) Authorization(authorization string) ApiDrivesUpdateRequest { + r.authorization = &authorization + return r } -func (r ApiRevokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePostRequest) Execute() (*http.Response, error) { - return r.ApiService.RevokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePostExecute(r) +func (r ApiDrivesUpdateRequest) Execute() (*DriveOut, *http.Response, error) { + return r.ApiService.DrivesUpdateExecute(r) } /* -RevokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePost Revoke a drive API key +DrivesUpdate Update Drive -Revoke one `ad_live_` key of a drive you manage — anything using it loses access immediately. **Manager only** (404 no-leak otherwise), `full`-scope user token. Idempotent: revoking an unknown/already-revoked key returns 204 too (no existence oracle). +Rename / update a drive's metadata. Requires ``Idempotency-Key`` and +``If-Match`` (428 absent, 412 stale); bumps the revision. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param driveId - @param keyId - @return ApiRevokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePostRequest + @return ApiDrivesUpdateRequest */ -func (a *DrivesAPIService) RevokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePost(ctx context.Context, driveId string, keyId string) ApiRevokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePostRequest { - return ApiRevokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePostRequest{ +func (a *DrivesAPIService) DrivesUpdate(ctx context.Context, driveId string) ApiDrivesUpdateRequest { + return ApiDrivesUpdateRequest{ ApiService: a, ctx: ctx, driveId: driveId, - keyId: keyId, } } // Execute executes the request -func (a *DrivesAPIService) RevokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePostExecute(r ApiRevokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePostRequest) (*http.Response, error) { +// @return DriveOut +func (a *DrivesAPIService) DrivesUpdateExecute(r ApiDrivesUpdateRequest) (*DriveOut, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost + localVarHTTPMethod = http.MethodPatch localVarPostBody interface{} formFiles []formFile + localVarReturnValue *DriveOut ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesAPIService.RevokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePost") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesAPIService.DrivesUpdate") if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v0/drives/{drive_id}/keys/{key_id}/revoke" + localVarPath := localBasePath + "/v0/drives/{drive_id}" localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"key_id"+"}", url.PathEscape(parameterValueToString(r.keyId, "keyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} localVarFormParams := url.Values{} + if r.idempotencyKey == nil { + return localVarReturnValue, nil, reportError("idempotencyKey is required and must be specified") + } + if r.ifMatch == nil { + return localVarReturnValue, nil, reportError("ifMatch is required and must be specified") + } + if r.driveUpdateIn == nil { + return localVarReturnValue, nil, reportError("driveUpdateIn is required and must be specified") + } // to determine the Content-Type header - localVarHTTPContentTypes := []string{} + localVarHTTPContentTypes := []string{"application/json"} // set Content-Type header localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) @@ -956,21 +1263,28 @@ func (a *DrivesAPIService) RevokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePost if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + parameterAddToHeaderOrQuery(localVarHeaderParams, "Idempotency-Key", r.idempotencyKey, "simple", "") + parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Match", r.ifMatch, "simple", "") + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + // body params + localVarPostBody = r.driveUpdateIn req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { - return nil, err + return localVarReturnValue, nil, err } localVarHTTPResponse, err := a.client.callAPI(req) if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) localVarHTTPResponse.Body.Close() localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) if err != nil { - return localVarHTTPResponse, err + return localVarReturnValue, localVarHTTPResponse, err } if localVarHTTPResponse.StatusCode >= 300 { @@ -978,114 +1292,182 @@ func (a *DrivesAPIService) RevokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePost body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse + var v DrivesCreate400Response err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse + var v DrivesCreate400Response err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse + var v DrivesCreate400Response err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 412 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 422 { var v ValidationErrorResponse err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 428 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr } newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) newErr.model = v } - return localVarHTTPResponse, newErr + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr } - return localVarHTTPResponse, nil + return localVarReturnValue, localVarHTTPResponse, nil } -type ApiRotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePostRequest struct { +type ApiDrivesUsageRequest struct { ctx context.Context ApiService *DrivesAPIService driveId string - keyId string + authorization *string +} + +func (r ApiDrivesUsageRequest) Authorization(authorization string) ApiDrivesUsageRequest { + r.authorization = &authorization + return r } -func (r ApiRotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePostRequest) Execute() (*DriveApiKeyCreateOut, *http.Response, error) { - return r.ApiService.RotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePostExecute(r) +func (r ApiDrivesUsageRequest) Execute() (*DriveUsageOut, *http.Response, error) { + return r.ApiService.DrivesUsageExecute(r) } /* -RotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePost Rotate one API key +DrivesUsage Drive Usage -Rotate a single `ad_live_` key: revoke `key_id` and mint a replacement that inherits its label. **Only that key** is affected — the drive's other keys keep working. **Manager only** (404 no-leak otherwise), `full`-scope user token. The new key is returned **once** — store it now. A `key_id` that isn't a live key of this drive is a 404. +Byte counters for one active drive: storage is the live sum of its +versions' sizes; retrieval reads the counter the content-read slice +maintains (0 until it lands). @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param driveId - @param keyId - @return ApiRotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePostRequest + @return ApiDrivesUsageRequest */ -func (a *DrivesAPIService) RotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePost(ctx context.Context, driveId string, keyId string) ApiRotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePostRequest { - return ApiRotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePostRequest{ +func (a *DrivesAPIService) DrivesUsage(ctx context.Context, driveId string) ApiDrivesUsageRequest { + return ApiDrivesUsageRequest{ ApiService: a, ctx: ctx, driveId: driveId, - keyId: keyId, } } // Execute executes the request -// @return DriveApiKeyCreateOut -func (a *DrivesAPIService) RotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePostExecute(r ApiRotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePostRequest) (*DriveApiKeyCreateOut, *http.Response, error) { +// @return DriveUsageOut +func (a *DrivesAPIService) DrivesUsageExecute(r ApiDrivesUsageRequest) (*DriveUsageOut, *http.Response, error) { var ( - localVarHTTPMethod = http.MethodPost + localVarHTTPMethod = http.MethodGet localVarPostBody interface{} formFiles []formFile - localVarReturnValue *DriveApiKeyCreateOut + localVarReturnValue *DriveUsageOut ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesAPIService.RotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePost") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DrivesAPIService.DrivesUsage") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } - localVarPath := localBasePath + "/v0/drives/{drive_id}/keys/{key_id}/rotate" + localVarPath := localBasePath + "/v0/drives/{drive_id}/usage" localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) - localVarPath = strings.Replace(localVarPath, "{"+"key_id"+"}", url.PathEscape(parameterValueToString(r.keyId, "keyId")), -1) localVarHeaderParams := make(map[string]string) localVarQueryParams := url.Values{} @@ -1108,6 +1490,9 @@ func (a *DrivesAPIService) RotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePostEx if localVarHTTPHeaderAccept != "" { localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err @@ -1130,8 +1515,19 @@ func (a *DrivesAPIService) RotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePostEx body: localVarBody, error: localVarHTTPResponse.Status, } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse + var v DrivesCreate400Response err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -1142,7 +1538,7 @@ func (a *DrivesAPIService) RotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePostEx return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse + var v DrivesCreate400Response err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -1153,7 +1549,7 @@ func (a *DrivesAPIService) RotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePostEx return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse + var v DrivesCreate400Response err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() @@ -1175,7 +1571,18 @@ func (a *DrivesAPIService) RotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePostEx return localVarReturnValue, localVarHTTPResponse, newErr } if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) if err != nil { newErr.error = err.Error() diff --git a/sdk/go/api_folders.go b/sdk/go/api_folders.go new file mode 100644 index 0000000..9ab1b8f --- /dev/null +++ b/sdk/go/api_folders.go @@ -0,0 +1,1739 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// FoldersAPIService FoldersAPI service +type FoldersAPIService service + +type ApiFoldersCopyRequest struct { + ctx context.Context + ApiService *FoldersAPIService + driveId string + folderId string + idempotencyKey *string + folderCopyIn *FolderCopyIn + ifMatch *string + authorization *string +} + +func (r ApiFoldersCopyRequest) IdempotencyKey(idempotencyKey string) ApiFoldersCopyRequest { + r.idempotencyKey = &idempotencyKey + return r +} + +func (r ApiFoldersCopyRequest) FolderCopyIn(folderCopyIn FolderCopyIn) ApiFoldersCopyRequest { + r.folderCopyIn = &folderCopyIn + return r +} + +func (r ApiFoldersCopyRequest) IfMatch(ifMatch string) ApiFoldersCopyRequest { + r.ifMatch = &ifMatch + return r +} + +func (r ApiFoldersCopyRequest) Authorization(authorization string) ApiFoldersCopyRequest { + r.authorization = &authorization + return r +} + +func (r ApiFoldersCopyRequest) Execute() (*FolderOut, *http.Response, error) { + return r.ApiService.FoldersCopyExecute(r) +} + +/* +FoldersCopy Copy Folder + +Copy a folder's subtree within the same drive. + +Cross-drive copy is out of v0 scope and rejected (400 INVALID_ARGUMENT). +``destination_drive_id`` must equal the source drive when present. +Materializes the subtree synchronously → 201 + the copied folder. +``If-Match`` is optional; when present it is validated against the source +revision (412 stale). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @param folderId + @return ApiFoldersCopyRequest +*/ +func (a *FoldersAPIService) FoldersCopy(ctx context.Context, driveId string, folderId string) ApiFoldersCopyRequest { + return ApiFoldersCopyRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + folderId: folderId, + } +} + +// Execute executes the request +// @return FolderOut +func (a *FoldersAPIService) FoldersCopyExecute(r ApiFoldersCopyRequest) (*FolderOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FolderOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FoldersAPIService.FoldersCopy") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/folders/{folder_id}/copy" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"folder_id"+"}", url.PathEscape(parameterValueToString(r.folderId, "folderId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.idempotencyKey == nil { + return localVarReturnValue, nil, reportError("idempotencyKey is required and must be specified") + } + if r.folderCopyIn == nil { + return localVarReturnValue, nil, reportError("folderCopyIn is required and must be specified") + } + + // 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{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "Idempotency-Key", r.idempotencyKey, "simple", "") + if r.ifMatch != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Match", r.ifMatch, "simple", "") + } + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + // body params + localVarPostBody = r.folderCopyIn + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 412 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 428 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiFoldersCreateRequest struct { + ctx context.Context + ApiService *FoldersAPIService + driveId string + idempotencyKey *string + folderCreateIn *FolderCreateIn + authorization *string +} + +func (r ApiFoldersCreateRequest) IdempotencyKey(idempotencyKey string) ApiFoldersCreateRequest { + r.idempotencyKey = &idempotencyKey + return r +} + +func (r ApiFoldersCreateRequest) FolderCreateIn(folderCreateIn FolderCreateIn) ApiFoldersCreateRequest { + r.folderCreateIn = &folderCreateIn + return r +} + +func (r ApiFoldersCreateRequest) Authorization(authorization string) ApiFoldersCreateRequest { + r.authorization = &authorization + return r +} + +func (r ApiFoldersCreateRequest) Execute() (*FolderOut, *http.Response, error) { + return r.ApiService.FoldersCreateExecute(r) +} + +/* +FoldersCreate Create Folder + +Create one folder under `parent_id`; idempotent under the +``Idempotency-Key``. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @return ApiFoldersCreateRequest +*/ +func (a *FoldersAPIService) FoldersCreate(ctx context.Context, driveId string) ApiFoldersCreateRequest { + return ApiFoldersCreateRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + } +} + +// Execute executes the request +// @return FolderOut +func (a *FoldersAPIService) FoldersCreateExecute(r ApiFoldersCreateRequest) (*FolderOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FolderOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FoldersAPIService.FoldersCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/folders" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.idempotencyKey == nil { + return localVarReturnValue, nil, reportError("idempotencyKey is required and must be specified") + } + if r.folderCreateIn == nil { + return localVarReturnValue, nil, reportError("folderCreateIn is required and must be specified") + } + + // 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{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "Idempotency-Key", r.idempotencyKey, "simple", "") + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + // body params + localVarPostBody = r.folderCreateIn + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 412 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 428 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiFoldersDeleteRequest struct { + ctx context.Context + ApiService *FoldersAPIService + driveId string + folderId string + idempotencyKey *string + ifMatch *string + recursive *bool + authorization *string +} + +func (r ApiFoldersDeleteRequest) IdempotencyKey(idempotencyKey string) ApiFoldersDeleteRequest { + r.idempotencyKey = &idempotencyKey + return r +} + +func (r ApiFoldersDeleteRequest) IfMatch(ifMatch string) ApiFoldersDeleteRequest { + r.ifMatch = &ifMatch + return r +} + +func (r ApiFoldersDeleteRequest) Recursive(recursive bool) ApiFoldersDeleteRequest { + r.recursive = &recursive + return r +} + +func (r ApiFoldersDeleteRequest) Authorization(authorization string) ApiFoldersDeleteRequest { + r.authorization = &authorization + return r +} + +func (r ApiFoldersDeleteRequest) Execute() (*FolderCascadeOut, *http.Response, error) { + return r.ApiService.FoldersDeleteExecute(r) +} + +/* +FoldersDelete Delete Folder + +Soft-delete a folder and its full live subtree (folders + artifacts) in +one transaction. A non-empty subtree requires ``recursive=true`` (409 +FOLDER_RECURSIVE_REQUIRED otherwise). Returns the deleted root +representation plus exact cascade counts and the post-delete +revision/ETag for a restore. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @param folderId + @return ApiFoldersDeleteRequest +*/ +func (a *FoldersAPIService) FoldersDelete(ctx context.Context, driveId string, folderId string) ApiFoldersDeleteRequest { + return ApiFoldersDeleteRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + folderId: folderId, + } +} + +// Execute executes the request +// @return FolderCascadeOut +func (a *FoldersAPIService) FoldersDeleteExecute(r ApiFoldersDeleteRequest) (*FolderCascadeOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FolderCascadeOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FoldersAPIService.FoldersDelete") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/folders/{folder_id}" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"folder_id"+"}", url.PathEscape(parameterValueToString(r.folderId, "folderId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.idempotencyKey == nil { + return localVarReturnValue, nil, reportError("idempotencyKey is required and must be specified") + } + if r.ifMatch == nil { + return localVarReturnValue, nil, reportError("ifMatch is required and must be specified") + } + + if r.recursive != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "recursive", r.recursive, "form", "") + } else { + var defaultValue bool = false + parameterAddToHeaderOrQuery(localVarQueryParams, "recursive", defaultValue, "form", "") + r.recursive = &defaultValue + } + // 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 + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "Idempotency-Key", r.idempotencyKey, "simple", "") + parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Match", r.ifMatch, "simple", "") + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 412 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 428 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiFoldersListRequest struct { + ctx context.Context + ApiService *FoldersAPIService + driveId string + lifecycle *string + limit *int32 + cursor *string + parentId *string + name *string + authorization *string +} + +func (r ApiFoldersListRequest) Lifecycle(lifecycle string) ApiFoldersListRequest { + r.lifecycle = &lifecycle + return r +} + +func (r ApiFoldersListRequest) Limit(limit int32) ApiFoldersListRequest { + r.limit = &limit + return r +} + +func (r ApiFoldersListRequest) Cursor(cursor string) ApiFoldersListRequest { + r.cursor = &cursor + return r +} + +func (r ApiFoldersListRequest) ParentId(parentId string) ApiFoldersListRequest { + r.parentId = &parentId + return r +} + +func (r ApiFoldersListRequest) Name(name string) ApiFoldersListRequest { + r.name = &name + return r +} + +func (r ApiFoldersListRequest) Authorization(authorization string) ApiFoldersListRequest { + r.authorization = &authorization + return r +} + +func (r ApiFoldersListRequest) Execute() (*FolderListOut, *http.Response, error) { + return r.ApiService.FoldersListExecute(r) +} + +/* +FoldersList List Folders + +List the drive's folders, newest-first (keyset paginated). + +``lifecycle`` (active|deleted|all) exposes soft-deleted folders so the +post-delete revision can be read as the If-Match source for a restore. +``parent_id`` / ``name`` are exact-match filters. Unknown query parameters +are rejected (§6.3). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @return ApiFoldersListRequest +*/ +func (a *FoldersAPIService) FoldersList(ctx context.Context, driveId string) ApiFoldersListRequest { + return ApiFoldersListRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + } +} + +// Execute executes the request +// @return FolderListOut +func (a *FoldersAPIService) FoldersListExecute(r ApiFoldersListRequest) (*FolderListOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FolderListOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FoldersAPIService.FoldersList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/folders" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.lifecycle != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "lifecycle", r.lifecycle, "form", "") + } else { + var defaultValue string = "active" + parameterAddToHeaderOrQuery(localVarQueryParams, "lifecycle", defaultValue, "form", "") + r.lifecycle = &defaultValue + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") + } + if r.parentId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "parent_id", r.parentId, "form", "") + } + if r.name != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "name", r.name, "form", "") + } + // 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 r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiFoldersReadRequest struct { + ctx context.Context + ApiService *FoldersAPIService + driveId string + folderId string + ifNoneMatch *string + authorization *string +} + +func (r ApiFoldersReadRequest) IfNoneMatch(ifNoneMatch string) ApiFoldersReadRequest { + r.ifNoneMatch = &ifNoneMatch + return r +} + +func (r ApiFoldersReadRequest) Authorization(authorization string) ApiFoldersReadRequest { + r.authorization = &authorization + return r +} + +func (r ApiFoldersReadRequest) Execute() (*FolderOut, *http.Response, error) { + return r.ApiService.FoldersReadExecute(r) +} + +/* +FoldersRead Read Folder + +Read one active folder. ETag = quoted revision; matching +``If-None-Match`` → 304. Deleted and cross-workspace folders are 404. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @param folderId + @return ApiFoldersReadRequest +*/ +func (a *FoldersAPIService) FoldersRead(ctx context.Context, driveId string, folderId string) ApiFoldersReadRequest { + return ApiFoldersReadRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + folderId: folderId, + } +} + +// Execute executes the request +// @return FolderOut +func (a *FoldersAPIService) FoldersReadExecute(r ApiFoldersReadRequest) (*FolderOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FolderOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FoldersAPIService.FoldersRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/folders/{folder_id}" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"folder_id"+"}", url.PathEscape(parameterValueToString(r.folderId, "folderId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // 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 r.ifNoneMatch != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "If-None-Match", r.ifNoneMatch, "simple", "") + } + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiFoldersRestoreRequest struct { + ctx context.Context + ApiService *FoldersAPIService + driveId string + folderId string + idempotencyKey *string + ifMatch *string + authorization *string +} + +func (r ApiFoldersRestoreRequest) IdempotencyKey(idempotencyKey string) ApiFoldersRestoreRequest { + r.idempotencyKey = &idempotencyKey + return r +} + +func (r ApiFoldersRestoreRequest) IfMatch(ifMatch string) ApiFoldersRestoreRequest { + r.ifMatch = &ifMatch + return r +} + +func (r ApiFoldersRestoreRequest) Authorization(authorization string) ApiFoldersRestoreRequest { + r.authorization = &authorization + return r +} + +func (r ApiFoldersRestoreRequest) Execute() (*FolderCascadeOut, *http.Response, error) { + return r.ApiService.FoldersRestoreExecute(r) +} + +/* +FoldersRestore Restore Folder + +Restore a soft-deleted folder and its deleted subtree atomically. +If-Match must carry the post-delete revision; restoring an already-active +folder is 409 CONFLICT. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @param folderId + @return ApiFoldersRestoreRequest +*/ +func (a *FoldersAPIService) FoldersRestore(ctx context.Context, driveId string, folderId string) ApiFoldersRestoreRequest { + return ApiFoldersRestoreRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + folderId: folderId, + } +} + +// Execute executes the request +// @return FolderCascadeOut +func (a *FoldersAPIService) FoldersRestoreExecute(r ApiFoldersRestoreRequest) (*FolderCascadeOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FolderCascadeOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FoldersAPIService.FoldersRestore") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/folders/{folder_id}/restore" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"folder_id"+"}", url.PathEscape(parameterValueToString(r.folderId, "folderId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.idempotencyKey == nil { + return localVarReturnValue, nil, reportError("idempotencyKey is required and must be specified") + } + if r.ifMatch == nil { + return localVarReturnValue, nil, reportError("ifMatch is required and must be specified") + } + + // 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 + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "Idempotency-Key", r.idempotencyKey, "simple", "") + parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Match", r.ifMatch, "simple", "") + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 412 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 428 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiFoldersUpdateRequest struct { + ctx context.Context + ApiService *FoldersAPIService + driveId string + folderId string + idempotencyKey *string + ifMatch *string + folderUpdateIn *FolderUpdateIn + authorization *string +} + +func (r ApiFoldersUpdateRequest) IdempotencyKey(idempotencyKey string) ApiFoldersUpdateRequest { + r.idempotencyKey = &idempotencyKey + return r +} + +func (r ApiFoldersUpdateRequest) IfMatch(ifMatch string) ApiFoldersUpdateRequest { + r.ifMatch = &ifMatch + return r +} + +func (r ApiFoldersUpdateRequest) FolderUpdateIn(folderUpdateIn FolderUpdateIn) ApiFoldersUpdateRequest { + r.folderUpdateIn = &folderUpdateIn + return r +} + +func (r ApiFoldersUpdateRequest) Authorization(authorization string) ApiFoldersUpdateRequest { + r.authorization = &authorization + return r +} + +func (r ApiFoldersUpdateRequest) Execute() (*FolderOut, *http.Response, error) { + return r.ApiService.FoldersUpdateExecute(r) +} + +/* +FoldersUpdate Update Folder + +Rename / move / update a folder's metadata or inheritance. Requires +``Idempotency-Key`` and ``If-Match`` (428 absent, 412 stale); bumps the +revision. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @param folderId + @return ApiFoldersUpdateRequest +*/ +func (a *FoldersAPIService) FoldersUpdate(ctx context.Context, driveId string, folderId string) ApiFoldersUpdateRequest { + return ApiFoldersUpdateRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + folderId: folderId, + } +} + +// Execute executes the request +// @return FolderOut +func (a *FoldersAPIService) FoldersUpdateExecute(r ApiFoldersUpdateRequest) (*FolderOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *FolderOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FoldersAPIService.FoldersUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/folders/{folder_id}" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"folder_id"+"}", url.PathEscape(parameterValueToString(r.folderId, "folderId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.idempotencyKey == nil { + return localVarReturnValue, nil, reportError("idempotencyKey is required and must be specified") + } + if r.ifMatch == nil { + return localVarReturnValue, nil, reportError("ifMatch is required and must be specified") + } + if r.folderUpdateIn == nil { + return localVarReturnValue, nil, reportError("folderUpdateIn is required and must be specified") + } + + // 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{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "Idempotency-Key", r.idempotencyKey, "simple", "") + parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Match", r.ifMatch, "simple", "") + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + // body params + localVarPostBody = r.folderUpdateIn + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 412 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 428 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/sdk/go/api_grants.go b/sdk/go/api_grants.go new file mode 100644 index 0000000..d5551ec --- /dev/null +++ b/sdk/go/api_grants.go @@ -0,0 +1,1237 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// GrantsAPIService GrantsAPI service +type GrantsAPIService service + +type ApiGrantsCreateRequest struct { + ctx context.Context + ApiService *GrantsAPIService + driveId string + idempotencyKey *string + grantCreateIn *GrantCreateIn + authorization *string +} + +func (r ApiGrantsCreateRequest) IdempotencyKey(idempotencyKey string) ApiGrantsCreateRequest { + r.idempotencyKey = &idempotencyKey + return r +} + +func (r ApiGrantsCreateRequest) GrantCreateIn(grantCreateIn GrantCreateIn) ApiGrantsCreateRequest { + r.grantCreateIn = &grantCreateIn + return r +} + +func (r ApiGrantsCreateRequest) Authorization(authorization string) ApiGrantsCreateRequest { + r.authorization = &authorization + return r +} + +func (r ApiGrantsCreateRequest) Execute() (*GrantOut, *http.Response, error) { + return r.ApiService.GrantsCreateExecute(r) +} + +/* +GrantsCreate Create Grant + +Grant one principal a role on a drive, folder, or artifact. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @return ApiGrantsCreateRequest +*/ +func (a *GrantsAPIService) GrantsCreate(ctx context.Context, driveId string) ApiGrantsCreateRequest { + return ApiGrantsCreateRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + } +} + +// Execute executes the request +// @return GrantOut +func (a *GrantsAPIService) GrantsCreateExecute(r ApiGrantsCreateRequest) (*GrantOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GrantOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GrantsAPIService.GrantsCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/grants" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.idempotencyKey == nil { + return localVarReturnValue, nil, reportError("idempotencyKey is required and must be specified") + } + if r.grantCreateIn == nil { + return localVarReturnValue, nil, reportError("grantCreateIn is required and must be specified") + } + + // 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{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "Idempotency-Key", r.idempotencyKey, "simple", "") + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + // body params + localVarPostBody = r.grantCreateIn + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 412 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 428 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGrantsListRequest struct { + ctx context.Context + ApiService *GrantsAPIService + driveId string + lifecycle *string + limit *int32 + cursor *string + resourceType *string + resourceId *string + principalType *string + authorization *string +} + +func (r ApiGrantsListRequest) Lifecycle(lifecycle string) ApiGrantsListRequest { + r.lifecycle = &lifecycle + return r +} + +func (r ApiGrantsListRequest) Limit(limit int32) ApiGrantsListRequest { + r.limit = &limit + return r +} + +func (r ApiGrantsListRequest) Cursor(cursor string) ApiGrantsListRequest { + r.cursor = &cursor + return r +} + +func (r ApiGrantsListRequest) ResourceType(resourceType string) ApiGrantsListRequest { + r.resourceType = &resourceType + return r +} + +func (r ApiGrantsListRequest) ResourceId(resourceId string) ApiGrantsListRequest { + r.resourceId = &resourceId + return r +} + +func (r ApiGrantsListRequest) PrincipalType(principalType string) ApiGrantsListRequest { + r.principalType = &principalType + return r +} + +func (r ApiGrantsListRequest) Authorization(authorization string) ApiGrantsListRequest { + r.authorization = &authorization + return r +} + +func (r ApiGrantsListRequest) Execute() (*GrantListOut, *http.Response, error) { + return r.ApiService.GrantsListExecute(r) +} + +/* +GrantsList List Grants + +List explicit grants in the drive, keyset paginated. + +**What you see depends on your role (contract change).** A caller holding +``manager`` on the drive lists EVERY grant in it. Any other caller lists +only the grants that name them — their own agent/user rows, ``workspace`` +grants covering them, and ``public`` grants (which already expose the +resource to them anyway). Previously any drive ``viewer`` could page out +every principal id, role and expiry in the drive; that was an +access-graph disclosure, not a feature. + +The operation is refused (404) only for a caller holding no live grant +anywhere in the drive — never for lack of ``manager``, because seeing +your own access is not a privilege. That admits folder-scoped +principals, who previously 404'd here despite having access to show. A +folder ``manager`` still sees only their own rows, not the roster of the +subtree they administer; scoping the listing by per-resource +administration authority is a follow-up this change does not claim. + +``resource_id`` filters to one resource's grants and REQUIRES +``resource_type`` alongside it — a bare resource id is ambiguous across +the three resource kinds, and guessing the kind from the id prefix would +make the filter's meaning depend on an id format the contract does not +promise to keep. ``resource_type`` on its own remains a valid (and +pre-existing) filter. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @return ApiGrantsListRequest +*/ +func (a *GrantsAPIService) GrantsList(ctx context.Context, driveId string) ApiGrantsListRequest { + return ApiGrantsListRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + } +} + +// Execute executes the request +// @return GrantListOut +func (a *GrantsAPIService) GrantsListExecute(r ApiGrantsListRequest) (*GrantListOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GrantListOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GrantsAPIService.GrantsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/grants" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.lifecycle != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "lifecycle", r.lifecycle, "form", "") + } else { + var defaultValue string = "active" + parameterAddToHeaderOrQuery(localVarQueryParams, "lifecycle", defaultValue, "form", "") + r.lifecycle = &defaultValue + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") + } + if r.resourceType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "resource_type", r.resourceType, "form", "") + } + if r.resourceId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "resource_id", r.resourceId, "form", "") + } + if r.principalType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "principal_type", r.principalType, "form", "") + } + // 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 r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGrantsReadRequest struct { + ctx context.Context + ApiService *GrantsAPIService + driveId string + grantId string + ifNoneMatch *string + authorization *string +} + +func (r ApiGrantsReadRequest) IfNoneMatch(ifNoneMatch string) ApiGrantsReadRequest { + r.ifNoneMatch = &ifNoneMatch + return r +} + +func (r ApiGrantsReadRequest) Authorization(authorization string) ApiGrantsReadRequest { + r.authorization = &authorization + return r +} + +func (r ApiGrantsReadRequest) Execute() (*GrantOut, *http.Response, error) { + return r.ApiService.GrantsReadExecute(r) +} + +/* +GrantsRead Read Grant + +Read one grant in the drive. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @param grantId + @return ApiGrantsReadRequest +*/ +func (a *GrantsAPIService) GrantsRead(ctx context.Context, driveId string, grantId string) ApiGrantsReadRequest { + return ApiGrantsReadRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + grantId: grantId, + } +} + +// Execute executes the request +// @return GrantOut +func (a *GrantsAPIService) GrantsReadExecute(r ApiGrantsReadRequest) (*GrantOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GrantOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GrantsAPIService.GrantsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/grants/{grant_id}" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"grant_id"+"}", url.PathEscape(parameterValueToString(r.grantId, "grantId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // 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 r.ifNoneMatch != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "If-None-Match", r.ifNoneMatch, "simple", "") + } + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGrantsRevokeRequest struct { + ctx context.Context + ApiService *GrantsAPIService + driveId string + grantId string + idempotencyKey *string + ifMatch *string + authorization *string +} + +func (r ApiGrantsRevokeRequest) IdempotencyKey(idempotencyKey string) ApiGrantsRevokeRequest { + r.idempotencyKey = &idempotencyKey + return r +} + +func (r ApiGrantsRevokeRequest) IfMatch(ifMatch string) ApiGrantsRevokeRequest { + r.ifMatch = &ifMatch + return r +} + +func (r ApiGrantsRevokeRequest) Authorization(authorization string) ApiGrantsRevokeRequest { + r.authorization = &authorization + return r +} + +func (r ApiGrantsRevokeRequest) Execute() (*GrantOut, *http.Response, error) { + return r.ApiService.GrantsRevokeExecute(r) +} + +/* +GrantsRevoke Revoke Grant + +Revoke a grant (soft, sets revoked_at) under If-Match. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @param grantId + @return ApiGrantsRevokeRequest +*/ +func (a *GrantsAPIService) GrantsRevoke(ctx context.Context, driveId string, grantId string) ApiGrantsRevokeRequest { + return ApiGrantsRevokeRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + grantId: grantId, + } +} + +// Execute executes the request +// @return GrantOut +func (a *GrantsAPIService) GrantsRevokeExecute(r ApiGrantsRevokeRequest) (*GrantOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GrantOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GrantsAPIService.GrantsRevoke") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/grants/{grant_id}" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"grant_id"+"}", url.PathEscape(parameterValueToString(r.grantId, "grantId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.idempotencyKey == nil { + return localVarReturnValue, nil, reportError("idempotencyKey is required and must be specified") + } + if r.ifMatch == nil { + return localVarReturnValue, nil, reportError("ifMatch is required and must be specified") + } + + // 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 + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "Idempotency-Key", r.idempotencyKey, "simple", "") + parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Match", r.ifMatch, "simple", "") + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 412 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 428 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGrantsUpdateRequest struct { + ctx context.Context + ApiService *GrantsAPIService + driveId string + grantId string + idempotencyKey *string + ifMatch *string + grantUpdateIn *GrantUpdateIn + authorization *string +} + +func (r ApiGrantsUpdateRequest) IdempotencyKey(idempotencyKey string) ApiGrantsUpdateRequest { + r.idempotencyKey = &idempotencyKey + return r +} + +func (r ApiGrantsUpdateRequest) IfMatch(ifMatch string) ApiGrantsUpdateRequest { + r.ifMatch = &ifMatch + return r +} + +func (r ApiGrantsUpdateRequest) GrantUpdateIn(grantUpdateIn GrantUpdateIn) ApiGrantsUpdateRequest { + r.grantUpdateIn = &grantUpdateIn + return r +} + +func (r ApiGrantsUpdateRequest) Authorization(authorization string) ApiGrantsUpdateRequest { + r.authorization = &authorization + return r +} + +func (r ApiGrantsUpdateRequest) Execute() (*GrantOut, *http.Response, error) { + return r.ApiService.GrantsUpdateExecute(r) +} + +/* +GrantsUpdate Update Grant + +Change a grant's role or expiry under If-Match. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @param grantId + @return ApiGrantsUpdateRequest +*/ +func (a *GrantsAPIService) GrantsUpdate(ctx context.Context, driveId string, grantId string) ApiGrantsUpdateRequest { + return ApiGrantsUpdateRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + grantId: grantId, + } +} + +// Execute executes the request +// @return GrantOut +func (a *GrantsAPIService) GrantsUpdateExecute(r ApiGrantsUpdateRequest) (*GrantOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPatch + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *GrantOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "GrantsAPIService.GrantsUpdate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/grants/{grant_id}" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"grant_id"+"}", url.PathEscape(parameterValueToString(r.grantId, "grantId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.idempotencyKey == nil { + return localVarReturnValue, nil, reportError("idempotencyKey is required and must be specified") + } + if r.ifMatch == nil { + return localVarReturnValue, nil, reportError("ifMatch is required and must be specified") + } + if r.grantUpdateIn == nil { + return localVarReturnValue, nil, reportError("grantUpdateIn is required and must be specified") + } + + // 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{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "Idempotency-Key", r.idempotencyKey, "simple", "") + parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Match", r.ifMatch, "simple", "") + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + // body params + localVarPostBody = r.grantUpdateIn + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 412 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 428 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/sdk/go/api_mcp_oauth.go b/sdk/go/api_mcp_oauth.go deleted file mode 100644 index 7037d3d..0000000 --- a/sdk/go/api_mcp_oauth.go +++ /dev/null @@ -1,285 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" -) - - -// McpOauthAPIService McpOauthAPI service -type McpOauthAPIService service - -type ApiOauth2RegisterOauth2RegisterPostRequest struct { - ctx context.Context - ApiService *McpOauthAPIService -} - -func (r ApiOauth2RegisterOauth2RegisterPostRequest) Execute() (*ClientRegistrationOut, *http.Response, error) { - return r.ApiService.Oauth2RegisterOauth2RegisterPostExecute(r) -} - -/* -Oauth2RegisterOauth2RegisterPost Dynamic Client Registration (RFC 7591) - -Anonymous registration endpoint for MCP clients. Public clients only (PKCE, no client_secret). Returns the registered metadata plus the assigned `client_id`. Registration grants nothing by itself — every token still requires a user consent ceremony at /oauth2/authorize. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOauth2RegisterOauth2RegisterPostRequest -*/ -func (a *McpOauthAPIService) Oauth2RegisterOauth2RegisterPost(ctx context.Context) ApiOauth2RegisterOauth2RegisterPostRequest { - return ApiOauth2RegisterOauth2RegisterPostRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return ClientRegistrationOut -func (a *McpOauthAPIService) Oauth2RegisterOauth2RegisterPostExecute(r ApiOauth2RegisterOauth2RegisterPostRequest) (*ClientRegistrationOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *ClientRegistrationOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "McpOauthAPIService.Oauth2RegisterOauth2RegisterPost") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/oauth2/register" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v OAuthProtocolErrorOut - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiOauth2RevokeOauth2RevokePostRequest struct { - ctx context.Context - ApiService *McpOauthAPIService -} - -func (r ApiOauth2RevokeOauth2RevokePostRequest) Execute() (map[string]interface{}, *http.Response, error) { - return r.ApiService.Oauth2RevokeOauth2RevokePostExecute(r) -} - -/* -Oauth2RevokeOauth2RevokePost Token revocation (RFC 7009) - -Revokes an `adat_` access token (that token only) or an `adrt_` refresh token (the whole rotation chain). Unknown tokens return 200 per RFC 7009 §2.2 — existence is not revealed. Public-client endpoint auth (`client_id` form param, no secret). - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiOauth2RevokeOauth2RevokePostRequest -*/ -func (a *McpOauthAPIService) Oauth2RevokeOauth2RevokePost(ctx context.Context) ApiOauth2RevokeOauth2RevokePostRequest { - return ApiOauth2RevokeOauth2RevokePostRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return map[string]interface{} -func (a *McpOauthAPIService) Oauth2RevokeOauth2RevokePostExecute(r ApiOauth2RevokeOauth2RevokePostRequest) (map[string]interface{}, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue map[string]interface{} - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "McpOauthAPIService.Oauth2RevokeOauth2RevokePost") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/oauth2/revoke" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v OAuthProtocolErrorOut - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v OAuthProtocolErrorOut - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v OAuthProtocolErrorOut - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/sdk/go/api_mcp_oauth_ui.go b/sdk/go/api_mcp_oauth_ui.go deleted file mode 100644 index f12aaad..0000000 --- a/sdk/go/api_mcp_oauth_ui.go +++ /dev/null @@ -1,280 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" -) - - -// McpOauthUiAPIService McpOauthUiAPI service -type McpOauthUiAPIService service - -type ApiAuthorizeDecisionOauth2AuthorizePostRequest struct { - ctx context.Context - ApiService *McpOauthUiAPIService - csrf *string -} - -func (r ApiAuthorizeDecisionOauth2AuthorizePostRequest) Csrf(csrf string) ApiAuthorizeDecisionOauth2AuthorizePostRequest { - r.csrf = &csrf - return r -} - -func (r ApiAuthorizeDecisionOauth2AuthorizePostRequest) Execute() (*http.Response, error) { - return r.ApiService.AuthorizeDecisionOauth2AuthorizePostExecute(r) -} - -/* -AuthorizeDecisionOauth2AuthorizePost Authorize Decision - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthorizeDecisionOauth2AuthorizePostRequest -*/ -func (a *McpOauthUiAPIService) AuthorizeDecisionOauth2AuthorizePost(ctx context.Context) ApiAuthorizeDecisionOauth2AuthorizePostRequest { - return ApiAuthorizeDecisionOauth2AuthorizePostRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -func (a *McpOauthUiAPIService) AuthorizeDecisionOauth2AuthorizePostExecute(r ApiAuthorizeDecisionOauth2AuthorizePostRequest) (*http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "McpOauthUiAPIService.AuthorizeDecisionOauth2AuthorizePost") - if err != nil { - return nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/oauth2/authorize" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.csrf == nil { - return nil, reportError("csrf is required and must be specified") - } - - // to determine the Content-Type header - localVarHTTPContentTypes := []string{"application/x-www-form-urlencoded"} - - // 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 - } - parameterAddToHeaderOrQuery(localVarFormParams, "csrf", r.csrf, "", "") - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v OAuthProtocolErrorOut - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v AuthorizeDecisionOauth2AuthorizePost403Response - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarHTTPResponse, newErr - } - - return localVarHTTPResponse, nil -} - -type ApiAuthorizePageOauth2AuthorizeGetRequest struct { - ctx context.Context - ApiService *McpOauthUiAPIService -} - -func (r ApiAuthorizePageOauth2AuthorizeGetRequest) Execute() (string, *http.Response, error) { - return r.ApiService.AuthorizePageOauth2AuthorizeGetExecute(r) -} - -/* -AuthorizePageOauth2AuthorizeGet Authorize Page - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiAuthorizePageOauth2AuthorizeGetRequest -*/ -func (a *McpOauthUiAPIService) AuthorizePageOauth2AuthorizeGet(ctx context.Context) ApiAuthorizePageOauth2AuthorizeGetRequest { - return ApiAuthorizePageOauth2AuthorizeGetRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return string -func (a *McpOauthUiAPIService) AuthorizePageOauth2AuthorizeGetExecute(r ApiAuthorizePageOauth2AuthorizeGetRequest) (string, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue string - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "McpOauthUiAPIService.AuthorizePageOauth2AuthorizeGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/oauth2/authorize" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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{"text/html", "application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v OAuthProtocolErrorOut - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/sdk/go/api_members.go b/sdk/go/api_members.go deleted file mode 100644 index 3da0bc5..0000000 --- a/sdk/go/api_members.go +++ /dev/null @@ -1,1051 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" - "strings" -) - - -// MembersAPIService MembersAPI service -type MembersAPIService service - -type ApiInviteMemberV0MembersInvitePostRequest struct { - ctx context.Context - ApiService *MembersAPIService - memberInviteIn *MemberInviteIn -} - -func (r ApiInviteMemberV0MembersInvitePostRequest) MemberInviteIn(memberInviteIn MemberInviteIn) ApiInviteMemberV0MembersInvitePostRequest { - r.memberInviteIn = &memberInviteIn - return r -} - -func (r ApiInviteMemberV0MembersInvitePostRequest) Execute() (*InviteCreateOut, *http.Response, error) { - return r.ApiService.InviteMemberV0MembersInvitePostExecute(r) -} - -/* -InviteMemberV0MembersInvitePost Invite a person to your workspace by email - -Create a pending invitation in the caller's active workspace and enqueue the invite email. **Admin only**, `full` scope. Inviting an existing member is a no-op success (`already_member: true`). A duplicate pending invite for the same email returns 409 `INVITE_PENDING` (resend it from the members page). The raw invite token is delivered only by email — never in this response. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiInviteMemberV0MembersInvitePostRequest -*/ -func (a *MembersAPIService) InviteMemberV0MembersInvitePost(ctx context.Context) ApiInviteMemberV0MembersInvitePostRequest { - return ApiInviteMemberV0MembersInvitePostRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return InviteCreateOut -func (a *MembersAPIService) InviteMemberV0MembersInvitePostExecute(r ApiInviteMemberV0MembersInvitePostRequest) (*InviteCreateOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *InviteCreateOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MembersAPIService.InviteMemberV0MembersInvitePost") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/members/invite" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.memberInviteIn == nil { - return localVarReturnValue, nil, reportError("memberInviteIn is required and must be specified") - } - - // 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{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.memberInviteIn - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListInvitationsV0InvitationsGetRequest struct { - ctx context.Context - ApiService *MembersAPIService - cursor *string - limit *int32 -} - -func (r ApiListInvitationsV0InvitationsGetRequest) Cursor(cursor string) ApiListInvitationsV0InvitationsGetRequest { - r.cursor = &cursor - return r -} - -func (r ApiListInvitationsV0InvitationsGetRequest) Limit(limit int32) ApiListInvitationsV0InvitationsGetRequest { - r.limit = &limit - return r -} - -func (r ApiListInvitationsV0InvitationsGetRequest) Execute() (*InvitationList, *http.Response, error) { - return r.ApiService.ListInvitationsV0InvitationsGetExecute(r) -} - -/* -ListInvitationsV0InvitationsGet List pending invitations - -List the pending invitations for the caller's active workspace. **Admin only.** Metadata only — the raw invite token is never surfaced. - -Newest first (`created_at` descending, tie-broken by `id`). Paginated: `limit` is clamped to [1, 100] (default 50, never a 422); pass the response's `next_cursor` back as `cursor` for the next page (`null` when the listing is complete). - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListInvitationsV0InvitationsGetRequest -*/ -func (a *MembersAPIService) ListInvitationsV0InvitationsGet(ctx context.Context) ApiListInvitationsV0InvitationsGetRequest { - return ApiListInvitationsV0InvitationsGetRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return InvitationList -func (a *MembersAPIService) ListInvitationsV0InvitationsGetExecute(r ApiListInvitationsV0InvitationsGetRequest) (*InvitationList, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *InvitationList - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MembersAPIService.ListInvitationsV0InvitationsGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/invitations" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.cursor != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") - } - if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") - } - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListMembersV0MembersGetRequest struct { - ctx context.Context - ApiService *MembersAPIService - cursor *string - limit *int32 -} - -func (r ApiListMembersV0MembersGetRequest) Cursor(cursor string) ApiListMembersV0MembersGetRequest { - r.cursor = &cursor - return r -} - -func (r ApiListMembersV0MembersGetRequest) Limit(limit int32) ApiListMembersV0MembersGetRequest { - r.limit = &limit - return r -} - -func (r ApiListMembersV0MembersGetRequest) Execute() (*MemberList, *http.Response, error) { - return r.ApiService.ListMembersV0MembersGetExecute(r) -} - -/* -ListMembersV0MembersGet List the members of your active workspace - -List live members (email, role, joined-at) of the caller's active workspace. Any **member** may list; a `read`-scope token is sufficient. - -Ordered by join time (`created_at`, tie-broken by `user_id`) — **no role grouping is promised**; a dashboard that wants admins-first sorts client-side. Paginated: `limit` is clamped to [1, 100] (default 50, never a 422); pass the response's `next_cursor` back as `cursor` for the next page (`null` when the listing is complete). - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListMembersV0MembersGetRequest -*/ -func (a *MembersAPIService) ListMembersV0MembersGet(ctx context.Context) ApiListMembersV0MembersGetRequest { - return ApiListMembersV0MembersGetRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return MemberList -func (a *MembersAPIService) ListMembersV0MembersGetExecute(r ApiListMembersV0MembersGetRequest) (*MemberList, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *MemberList - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MembersAPIService.ListMembersV0MembersGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/members" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.cursor != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") - } - if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") - } - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRemoveMemberV0MembersTargetUserIdDeleteRequest struct { - ctx context.Context - ApiService *MembersAPIService - targetUserId string - confirm *string -} - -func (r ApiRemoveMemberV0MembersTargetUserIdDeleteRequest) Confirm(confirm string) ApiRemoveMemberV0MembersTargetUserIdDeleteRequest { - r.confirm = &confirm - return r -} - -func (r ApiRemoveMemberV0MembersTargetUserIdDeleteRequest) Execute() (*MemberRemoveOut, *http.Response, error) { - return r.ApiService.RemoveMemberV0MembersTargetUserIdDeleteExecute(r) -} - -/* -RemoveMemberV0MembersTargetUserIdDelete Remove a member (or leave) - -Remove a member from the caller's active workspace, soft-deleting every drive that member owns there (workspaces-design §4.4 — no ownership transfer in v0; their `ad_live_` keys then stop working). **Admin** may remove anyone; **any member** may remove themselves (self-leave). `full` scope. Removing the **last/sole admin** is rejected with 409 `LAST_ADMIN` (promote someone first, or delete the workspace). - -**Explicit confirmation required:** pass `?confirm=DELETE` or the request is rejected with 400 `CONFIRM_REQUIRED` — removal cascades a soft-delete of every drive the member owns, so it carries tenant-level blast radius (uniform with `DELETE /v0/drives/{id}`). - -Deliberately takes NO `If-Match`: membership rows carry no generation/metageneration axis to pin (there is no ETag to echo), so `?confirm=DELETE` is the sole mutation guard here. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param targetUserId - @return ApiRemoveMemberV0MembersTargetUserIdDeleteRequest -*/ -func (a *MembersAPIService) RemoveMemberV0MembersTargetUserIdDelete(ctx context.Context, targetUserId string) ApiRemoveMemberV0MembersTargetUserIdDeleteRequest { - return ApiRemoveMemberV0MembersTargetUserIdDeleteRequest{ - ApiService: a, - ctx: ctx, - targetUserId: targetUserId, - } -} - -// Execute executes the request -// @return MemberRemoveOut -func (a *MembersAPIService) RemoveMemberV0MembersTargetUserIdDeleteExecute(r ApiRemoveMemberV0MembersTargetUserIdDeleteRequest) (*MemberRemoveOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *MemberRemoveOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MembersAPIService.RemoveMemberV0MembersTargetUserIdDelete") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/members/{target_user_id}" - localVarPath = strings.Replace(localVarPath, "{"+"target_user_id"+"}", url.PathEscape(parameterValueToString(r.targetUserId, "targetUserId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.confirm != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "confirm", r.confirm, "form", "") - } - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRevokeInvitationV0InvitationsInvitationIdDeleteRequest struct { - ctx context.Context - ApiService *MembersAPIService - invitationId string -} - -func (r ApiRevokeInvitationV0InvitationsInvitationIdDeleteRequest) Execute() (*RevokeOut, *http.Response, error) { - return r.ApiService.RevokeInvitationV0InvitationsInvitationIdDeleteExecute(r) -} - -/* -RevokeInvitationV0InvitationsInvitationIdDelete Revoke a pending invitation - -Revoke a pending invitation in the caller's active workspace. **Admin only**, `full` scope. Org-scoped + idempotent: `revoked` is a COUNT — 1 when a live invite was revoked, 0 when it was already gone (a forged id, an invite from another workspace, or an already-consumed invite all return `revoked: 0`, no-leak). - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param invitationId - @return ApiRevokeInvitationV0InvitationsInvitationIdDeleteRequest -*/ -func (a *MembersAPIService) RevokeInvitationV0InvitationsInvitationIdDelete(ctx context.Context, invitationId string) ApiRevokeInvitationV0InvitationsInvitationIdDeleteRequest { - return ApiRevokeInvitationV0InvitationsInvitationIdDeleteRequest{ - ApiService: a, - ctx: ctx, - invitationId: invitationId, - } -} - -// Execute executes the request -// @return RevokeOut -func (a *MembersAPIService) RevokeInvitationV0InvitationsInvitationIdDeleteExecute(r ApiRevokeInvitationV0InvitationsInvitationIdDeleteRequest) (*RevokeOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodDelete - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *RevokeOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MembersAPIService.RevokeInvitationV0InvitationsInvitationIdDelete") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/invitations/{invitation_id}" - localVarPath = strings.Replace(localVarPath, "{"+"invitation_id"+"}", url.PathEscape(parameterValueToString(r.invitationId, "invitationId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiSetMemberRoleV0MembersTargetUserIdPatchRequest struct { - ctx context.Context - ApiService *MembersAPIService - targetUserId string - memberRoleIn *MemberRoleIn -} - -func (r ApiSetMemberRoleV0MembersTargetUserIdPatchRequest) MemberRoleIn(memberRoleIn MemberRoleIn) ApiSetMemberRoleV0MembersTargetUserIdPatchRequest { - r.memberRoleIn = &memberRoleIn - return r -} - -func (r ApiSetMemberRoleV0MembersTargetUserIdPatchRequest) Execute() (*MemberOut, *http.Response, error) { - return r.ApiService.SetMemberRoleV0MembersTargetUserIdPatchExecute(r) -} - -/* -SetMemberRoleV0MembersTargetUserIdPatch Change a member's role - -Promote/demote a member in the caller's active workspace. **Admin only**, `full` scope. Demoting the workspace's **last admin** is rejected with 409 `LAST_ADMIN` (promote someone first). - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param targetUserId - @return ApiSetMemberRoleV0MembersTargetUserIdPatchRequest -*/ -func (a *MembersAPIService) SetMemberRoleV0MembersTargetUserIdPatch(ctx context.Context, targetUserId string) ApiSetMemberRoleV0MembersTargetUserIdPatchRequest { - return ApiSetMemberRoleV0MembersTargetUserIdPatchRequest{ - ApiService: a, - ctx: ctx, - targetUserId: targetUserId, - } -} - -// Execute executes the request -// @return MemberOut -func (a *MembersAPIService) SetMemberRoleV0MembersTargetUserIdPatchExecute(r ApiSetMemberRoleV0MembersTargetUserIdPatchRequest) (*MemberOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *MemberOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "MembersAPIService.SetMemberRoleV0MembersTargetUserIdPatch") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/members/{target_user_id}" - localVarPath = strings.Replace(localVarPath, "{"+"target_user_id"+"}", url.PathEscape(parameterValueToString(r.targetUserId, "targetUserId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.memberRoleIn == nil { - return localVarReturnValue, nil, reportError("memberRoleIn is required and must be specified") - } - - // 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{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.memberRoleIn - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/sdk/go/api_search.go b/sdk/go/api_search.go new file mode 100644 index 0000000..7c1f38e --- /dev/null +++ b/sdk/go/api_search.go @@ -0,0 +1,311 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "time" +) + + +// SearchAPIService SearchAPI service +type SearchAPIService service + +type ApiDriveSearchRequest struct { + ctx context.Context + ApiService *SearchAPIService + driveId string + q *string + mode *string + limit *int32 + cursor *string + parentId *string + contentType *string + label *string + updatedAfter *time.Time + updatedBefore *time.Time + authorization *string +} + +func (r ApiDriveSearchRequest) Q(q string) ApiDriveSearchRequest { + r.q = &q + return r +} + +func (r ApiDriveSearchRequest) Mode(mode string) ApiDriveSearchRequest { + r.mode = &mode + return r +} + +func (r ApiDriveSearchRequest) Limit(limit int32) ApiDriveSearchRequest { + r.limit = &limit + return r +} + +func (r ApiDriveSearchRequest) Cursor(cursor string) ApiDriveSearchRequest { + r.cursor = &cursor + return r +} + +func (r ApiDriveSearchRequest) ParentId(parentId string) ApiDriveSearchRequest { + r.parentId = &parentId + return r +} + +func (r ApiDriveSearchRequest) ContentType(contentType string) ApiDriveSearchRequest { + r.contentType = &contentType + return r +} + +func (r ApiDriveSearchRequest) Label(label string) ApiDriveSearchRequest { + r.label = &label + return r +} + +func (r ApiDriveSearchRequest) UpdatedAfter(updatedAfter time.Time) ApiDriveSearchRequest { + r.updatedAfter = &updatedAfter + return r +} + +func (r ApiDriveSearchRequest) UpdatedBefore(updatedBefore time.Time) ApiDriveSearchRequest { + r.updatedBefore = &updatedBefore + return r +} + +func (r ApiDriveSearchRequest) Authorization(authorization string) ApiDriveSearchRequest { + r.authorization = &authorization + return r +} + +func (r ApiDriveSearchRequest) Execute() (*SearchPageOut, *http.Response, error) { + return r.ApiService.DriveSearchExecute(r) +} + +/* +DriveSearch Drive Search + +Search the drive's live artifacts. ``q`` is required and must be +non-empty. + +``mode`` selects the retrieval engine: ``lexical``, ``hybrid``, or +``semantic``. This deployment enables ``lexical`` only; requesting a +disabled mode fails ``400 SEARCH_MODE_UNAVAILABLE``. + +Each hit's ``snippet`` is HTML-safe by contract: artifact content is +entity-escaped and only the server's own ````/```` highlight +pair survives, so a client may render it as HTML. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @return ApiDriveSearchRequest +*/ +func (a *SearchAPIService) DriveSearch(ctx context.Context, driveId string) ApiDriveSearchRequest { + return ApiDriveSearchRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + } +} + +// Execute executes the request +// @return SearchPageOut +func (a *SearchAPIService) DriveSearchExecute(r ApiDriveSearchRequest) (*SearchPageOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *SearchPageOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SearchAPIService.DriveSearch") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/search" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.q == nil { + return localVarReturnValue, nil, reportError("q is required and must be specified") + } + if strlen(*r.q) < 1 { + return localVarReturnValue, nil, reportError("q must have at least 1 elements") + } + + parameterAddToHeaderOrQuery(localVarQueryParams, "q", r.q, "form", "") + if r.mode != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "mode", r.mode, "form", "") + } else { + var defaultValue string = "lexical" + parameterAddToHeaderOrQuery(localVarQueryParams, "mode", defaultValue, "form", "") + r.mode = &defaultValue + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") + } + if r.parentId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "parent_id", r.parentId, "form", "") + } + if r.contentType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "content_type", r.contentType, "form", "") + } + if r.label != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "label", r.label, "form", "") + } + if r.updatedAfter != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "updated_after", r.updatedAfter, "form", "") + } + if r.updatedBefore != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "updated_before", r.updatedBefore, "form", "") + } + // 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 r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesList400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/sdk/go/api_shares.go b/sdk/go/api_shares.go new file mode 100644 index 0000000..fe4a0ec --- /dev/null +++ b/sdk/go/api_shares.go @@ -0,0 +1,1204 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// SharesAPIService SharesAPI service +type SharesAPIService service + +type ApiSharesCreateRequest struct { + ctx context.Context + ApiService *SharesAPIService + driveId string + idempotencyKey *string + shareCreateIn *ShareCreateIn + authorization *string +} + +func (r ApiSharesCreateRequest) IdempotencyKey(idempotencyKey string) ApiSharesCreateRequest { + r.idempotencyKey = &idempotencyKey + return r +} + +func (r ApiSharesCreateRequest) ShareCreateIn(shareCreateIn ShareCreateIn) ApiSharesCreateRequest { + r.shareCreateIn = &shareCreateIn + return r +} + +func (r ApiSharesCreateRequest) Authorization(authorization string) ApiSharesCreateRequest { + r.authorization = &authorization + return r +} + +func (r ApiSharesCreateRequest) Execute() (*ShareCreateOut, *http.Response, error) { + return r.ApiService.SharesCreateExecute(r) +} + +/* +SharesCreate Create Share + +Mint a read-only bearer link. The response carries the plaintext +secret — the only response that does. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @return ApiSharesCreateRequest +*/ +func (a *SharesAPIService) SharesCreate(ctx context.Context, driveId string) ApiSharesCreateRequest { + return ApiSharesCreateRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + } +} + +// Execute executes the request +// @return ShareCreateOut +func (a *SharesAPIService) SharesCreateExecute(r ApiSharesCreateRequest) (*ShareCreateOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ShareCreateOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SharesAPIService.SharesCreate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/shares" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.idempotencyKey == nil { + return localVarReturnValue, nil, reportError("idempotencyKey is required and must be specified") + } + if r.shareCreateIn == nil { + return localVarReturnValue, nil, reportError("shareCreateIn is required and must be specified") + } + + // 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{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "Idempotency-Key", r.idempotencyKey, "simple", "") + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + // body params + localVarPostBody = r.shareCreateIn + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 412 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 428 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSharesListRequest struct { + ctx context.Context + ApiService *SharesAPIService + driveId string + lifecycle *string + limit *int32 + cursor *string + resourceType *string + resourceId *string + authorization *string +} + +func (r ApiSharesListRequest) Lifecycle(lifecycle string) ApiSharesListRequest { + r.lifecycle = &lifecycle + return r +} + +func (r ApiSharesListRequest) Limit(limit int32) ApiSharesListRequest { + r.limit = &limit + return r +} + +func (r ApiSharesListRequest) Cursor(cursor string) ApiSharesListRequest { + r.cursor = &cursor + return r +} + +func (r ApiSharesListRequest) ResourceType(resourceType string) ApiSharesListRequest { + r.resourceType = &resourceType + return r +} + +func (r ApiSharesListRequest) ResourceId(resourceId string) ApiSharesListRequest { + r.resourceId = &resourceId + return r +} + +func (r ApiSharesListRequest) Authorization(authorization string) ApiSharesListRequest { + r.authorization = &authorization + return r +} + +func (r ApiSharesListRequest) Execute() (*ShareListOut, *http.Response, error) { + return r.ApiService.SharesListExecute(r) +} + +/* +SharesList List Shares + +List the drive's shares (no secrets), keyset paginated. + +``resource_id`` narrows the page to one resource's links and REQUIRES +``resource_type`` alongside it — a bare resource id is ambiguous across +``artifact`` / ``artifact_version`` / ``folder``, and inferring the kind +from the id prefix would tie the filter's meaning to an id format the +contract does not promise to keep. ``resource_type`` alone is a valid +filter. Listing shares already requires drive ``manager``, so these +filters only narrow a page the caller could already read in full. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @return ApiSharesListRequest +*/ +func (a *SharesAPIService) SharesList(ctx context.Context, driveId string) ApiSharesListRequest { + return ApiSharesListRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + } +} + +// Execute executes the request +// @return ShareListOut +func (a *SharesAPIService) SharesListExecute(r ApiSharesListRequest) (*ShareListOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ShareListOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SharesAPIService.SharesList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/shares" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.lifecycle != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "lifecycle", r.lifecycle, "form", "") + } else { + var defaultValue string = "active" + parameterAddToHeaderOrQuery(localVarQueryParams, "lifecycle", defaultValue, "form", "") + r.lifecycle = &defaultValue + } + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") + } + if r.resourceType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "resource_type", r.resourceType, "form", "") + } + if r.resourceId != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "resource_id", r.resourceId, "form", "") + } + // 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 r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSharesReadRequest struct { + ctx context.Context + ApiService *SharesAPIService + driveId string + shareId string + ifNoneMatch *string + authorization *string +} + +func (r ApiSharesReadRequest) IfNoneMatch(ifNoneMatch string) ApiSharesReadRequest { + r.ifNoneMatch = &ifNoneMatch + return r +} + +func (r ApiSharesReadRequest) Authorization(authorization string) ApiSharesReadRequest { + r.authorization = &authorization + return r +} + +func (r ApiSharesReadRequest) Execute() (*ShareOut, *http.Response, error) { + return r.ApiService.SharesReadExecute(r) +} + +/* +SharesRead Read Share + +Read one share's management representation (no secret). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @param shareId + @return ApiSharesReadRequest +*/ +func (a *SharesAPIService) SharesRead(ctx context.Context, driveId string, shareId string) ApiSharesReadRequest { + return ApiSharesReadRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + shareId: shareId, + } +} + +// Execute executes the request +// @return ShareOut +func (a *SharesAPIService) SharesReadExecute(r ApiSharesReadRequest) (*ShareOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ShareOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SharesAPIService.SharesRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/shares/{share_id}" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"share_id"+"}", url.PathEscape(parameterValueToString(r.shareId, "shareId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // 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 r.ifNoneMatch != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "If-None-Match", r.ifNoneMatch, "simple", "") + } + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSharesRevokeRequest struct { + ctx context.Context + ApiService *SharesAPIService + driveId string + shareId string + idempotencyKey *string + ifMatch *string + authorization *string +} + +func (r ApiSharesRevokeRequest) IdempotencyKey(idempotencyKey string) ApiSharesRevokeRequest { + r.idempotencyKey = &idempotencyKey + return r +} + +func (r ApiSharesRevokeRequest) IfMatch(ifMatch string) ApiSharesRevokeRequest { + r.ifMatch = &ifMatch + return r +} + +func (r ApiSharesRevokeRequest) Authorization(authorization string) ApiSharesRevokeRequest { + r.authorization = &authorization + return r +} + +func (r ApiSharesRevokeRequest) Execute() (*ShareOut, *http.Response, error) { + return r.ApiService.SharesRevokeExecute(r) +} + +/* +SharesRevoke Revoke Share + +Revoke a share (soft, sets revoked_at) under If-Match. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @param shareId + @return ApiSharesRevokeRequest +*/ +func (a *SharesAPIService) SharesRevoke(ctx context.Context, driveId string, shareId string) ApiSharesRevokeRequest { + return ApiSharesRevokeRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + shareId: shareId, + } +} + +// Execute executes the request +// @return ShareOut +func (a *SharesAPIService) SharesRevokeExecute(r ApiSharesRevokeRequest) (*ShareOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ShareOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SharesAPIService.SharesRevoke") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/shares/{share_id}" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"share_id"+"}", url.PathEscape(parameterValueToString(r.shareId, "shareId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.idempotencyKey == nil { + return localVarReturnValue, nil, reportError("idempotencyKey is required and must be specified") + } + if r.ifMatch == nil { + return localVarReturnValue, nil, reportError("ifMatch is required and must be specified") + } + + // 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 + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "Idempotency-Key", r.idempotencyKey, "simple", "") + parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Match", r.ifMatch, "simple", "") + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 412 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 428 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiSharesRotateRequest struct { + ctx context.Context + ApiService *SharesAPIService + driveId string + shareId string + idempotencyKey *string + ifMatch *string + authorization *string +} + +func (r ApiSharesRotateRequest) IdempotencyKey(idempotencyKey string) ApiSharesRotateRequest { + r.idempotencyKey = &idempotencyKey + return r +} + +func (r ApiSharesRotateRequest) IfMatch(ifMatch string) ApiSharesRotateRequest { + r.ifMatch = &ifMatch + return r +} + +func (r ApiSharesRotateRequest) Authorization(authorization string) ApiSharesRotateRequest { + r.authorization = &authorization + return r +} + +func (r ApiSharesRotateRequest) Execute() (*ShareCreateOut, *http.Response, error) { + return r.ApiService.SharesRotateExecute(r) +} + +/* +SharesRotate Rotate Share + +Rotate the secret in place (same id, no grace window). The response +carries the new plaintext secret. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @param shareId + @return ApiSharesRotateRequest +*/ +func (a *SharesAPIService) SharesRotate(ctx context.Context, driveId string, shareId string) ApiSharesRotateRequest { + return ApiSharesRotateRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + shareId: shareId, + } +} + +// Execute executes the request +// @return ShareCreateOut +func (a *SharesAPIService) SharesRotateExecute(r ApiSharesRotateRequest) (*ShareCreateOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ShareCreateOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SharesAPIService.SharesRotate") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/shares/{share_id}/rotate" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"share_id"+"}", url.PathEscape(parameterValueToString(r.shareId, "shareId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.idempotencyKey == nil { + return localVarReturnValue, nil, reportError("idempotencyKey is required and must be specified") + } + if r.ifMatch == nil { + return localVarReturnValue, nil, reportError("ifMatch is required and must be specified") + } + + // 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 + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "Idempotency-Key", r.idempotencyKey, "simple", "") + parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Match", r.ifMatch, "simple", "") + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 412 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 428 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/sdk/go/api_shares_redemption.go b/sdk/go/api_shares_redemption.go new file mode 100644 index 0000000..456021b --- /dev/null +++ b/sdk/go/api_shares_redemption.go @@ -0,0 +1,156 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// SharesRedemptionAPIService SharesRedemptionAPI service +type SharesRedemptionAPIService service + +type ApiSharesRedeemRequest struct { + ctx context.Context + ApiService *SharesRedemptionAPIService + shareKey string +} + +func (r ApiSharesRedeemRequest) Execute() (interface{}, *http.Response, error) { + return r.ApiService.SharesRedeemExecute(r) +} + +/* +SharesRedeem Redeem Share + +The un-slashed form. Browsers are canonicalized onto `/s/{key}/`. + +This inherits the published `shares_redeem` operation id from the route it +replaced, because for an API client it *is* that operation, unchanged: +same URL, same JSON `Accept`, same bytes, same uniform 404. Only the +browser arm is new. Dropping it from the spec would have described the +route as gone while it kept answering. + +The page links its own sub-resources relatively (`content`), and relative +resolution replaces the last path segment: from `/s/KEY` that reaches +`/s/content`, from `/s/KEY/` it reaches `/s/KEY/content`. The trailing +slash is what makes an image on a share page load at all. Links already in +the wild have no slash, so this redirect is how they keep working. + +It is unconditional and runs before any lookup — redirecting only for keys +that resolve would turn the status code into an existence oracle and undo +the anti-enumeration property the rest of this module maintains. + +Only browsers are moved. JSON and byte clients are answered in place, so +the shipped v0 contract for this URL is unchanged, redirect included. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param shareKey + @return ApiSharesRedeemRequest +*/ +func (a *SharesRedemptionAPIService) SharesRedeem(ctx context.Context, shareKey string) ApiSharesRedeemRequest { + return ApiSharesRedeemRequest{ + ApiService: a, + ctx: ctx, + shareKey: shareKey, + } +} + +// Execute executes the request +// @return interface{} +func (a *SharesRedemptionAPIService) SharesRedeemExecute(r ApiSharesRedeemRequest) (interface{}, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue interface{} + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "SharesRedemptionAPIService.SharesRedeem") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/s/{share_key}" + localVarPath = strings.Replace(localVarPath, "{"+"share_key"+"}", url.PathEscape(parameterValueToString(r.shareKey, "shareKey")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // 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 + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/sdk/go/api_tokens.go b/sdk/go/api_tokens.go deleted file mode 100644 index 7c249b8..0000000 --- a/sdk/go/api_tokens.go +++ /dev/null @@ -1,343 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" - "strings" -) - - -// TokensAPIService TokensAPI service -type TokensAPIService service - -type ApiListTokensV0TokensGetRequest struct { - ctx context.Context - ApiService *TokensAPIService - cursor *string - limit *int32 -} - -func (r ApiListTokensV0TokensGetRequest) Cursor(cursor string) ApiListTokensV0TokensGetRequest { - r.cursor = &cursor - return r -} - -func (r ApiListTokensV0TokensGetRequest) Limit(limit int32) ApiListTokensV0TokensGetRequest { - r.limit = &limit - return r -} - -func (r ApiListTokensV0TokensGetRequest) Execute() (*UserTokenList, *http.Response, error) { - return r.ApiService.ListTokensV0TokensGetExecute(r) -} - -/* -ListTokensV0TokensGet List your user-identity tokens - -List the `ad_user_` tokens belonging to the authenticated user. Metadata only — the raw token is shown once at mint (web only) and is never returned here. Includes recently-revoked tokens (with `revoked_at` set) so the caller can audit them; newest first. - -**Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListTokensV0TokensGetRequest -*/ -func (a *TokensAPIService) ListTokensV0TokensGet(ctx context.Context) ApiListTokensV0TokensGetRequest { - return ApiListTokensV0TokensGetRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return UserTokenList -func (a *TokensAPIService) ListTokensV0TokensGetExecute(r ApiListTokensV0TokensGetRequest) (*UserTokenList, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *UserTokenList - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TokensAPIService.ListTokensV0TokensGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/tokens" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.cursor != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") - } - if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") - } - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRevokeTokenV0TokensTokenIdRevokePostRequest struct { - ctx context.Context - ApiService *TokensAPIService - tokenId string -} - -func (r ApiRevokeTokenV0TokensTokenIdRevokePostRequest) Execute() (*UserTokenOut, *http.Response, error) { - return r.ApiService.RevokeTokenV0TokensTokenIdRevokePostExecute(r) -} - -/* -RevokeTokenV0TokensTokenIdRevokePost Revoke one of your user-identity tokens - -Revoke a single `ad_user_` token by id. Scoped to the authenticated user: a token id that isn't yours returns 404 (no-leak). Idempotent — revoking an already-revoked token also returns 404 (it is no longer a live token of yours to revoke). On success the revoked token's metadata is returned with `revoked_at` set. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param tokenId - @return ApiRevokeTokenV0TokensTokenIdRevokePostRequest -*/ -func (a *TokensAPIService) RevokeTokenV0TokensTokenIdRevokePost(ctx context.Context, tokenId string) ApiRevokeTokenV0TokensTokenIdRevokePostRequest { - return ApiRevokeTokenV0TokensTokenIdRevokePostRequest{ - ApiService: a, - ctx: ctx, - tokenId: tokenId, - } -} - -// Execute executes the request -// @return UserTokenOut -func (a *TokensAPIService) RevokeTokenV0TokensTokenIdRevokePostExecute(r ApiRevokeTokenV0TokensTokenIdRevokePostRequest) (*UserTokenOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *UserTokenOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "TokensAPIService.RevokeTokenV0TokensTokenIdRevokePost") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/tokens/{token_id}/revoke" - localVarPath = strings.Replace(localVarPath, "{"+"token_id"+"}", url.PathEscape(parameterValueToString(r.tokenId, "tokenId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/sdk/go/api_versions.go b/sdk/go/api_versions.go new file mode 100644 index 0000000..c3e3a71 --- /dev/null +++ b/sdk/go/api_versions.go @@ -0,0 +1,1186 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "os" +) + + +// VersionsAPIService VersionsAPI service +type VersionsAPIService service + +type ApiVersionsAppendRequest struct { + ctx context.Context + ApiService *VersionsAPIService + driveId string + artifactId string + idempotencyKey *string + ifMatch *string + content *os.File + authorization *string + contentType *string + sha256 *string +} + +func (r ApiVersionsAppendRequest) IdempotencyKey(idempotencyKey string) ApiVersionsAppendRequest { + r.idempotencyKey = &idempotencyKey + return r +} + +func (r ApiVersionsAppendRequest) IfMatch(ifMatch string) ApiVersionsAppendRequest { + r.ifMatch = &ifMatch + return r +} + +// The artifact bytes. +func (r ApiVersionsAppendRequest) Content(content *os.File) ApiVersionsAppendRequest { + r.content = content + return r +} + +func (r ApiVersionsAppendRequest) Authorization(authorization string) ApiVersionsAppendRequest { + r.authorization = &authorization + return r +} + +// Declared media type. +func (r ApiVersionsAppendRequest) ContentType(contentType string) ApiVersionsAppendRequest { + r.contentType = &contentType + return r +} + +// Optional content sha256 for verification. +func (r ApiVersionsAppendRequest) Sha256(sha256 string) ApiVersionsAppendRequest { + r.sha256 = &sha256 + return r +} + +func (r ApiVersionsAppendRequest) Execute() (*VersionCreatedOut, *http.Response, error) { + return r.ApiService.VersionsAppendExecute(r) +} + +/* +VersionsAppend Append Version + +Append one immutable version and rotate the artifact head. + +Multipart only (415 for a JSON body). Parts: content (bytes), content_type, sha256. content is required; name, parent_id, and metadata are not accepted here. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @param artifactId + @return ApiVersionsAppendRequest +*/ +func (a *VersionsAPIService) VersionsAppend(ctx context.Context, driveId string, artifactId string) ApiVersionsAppendRequest { + return ApiVersionsAppendRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + artifactId: artifactId, + } +} + +// Execute executes the request +// @return VersionCreatedOut +func (a *VersionsAPIService) VersionsAppendExecute(r ApiVersionsAppendRequest) (*VersionCreatedOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *VersionCreatedOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VersionsAPIService.VersionsAppend") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/artifacts/{artifact_id}/versions" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"artifact_id"+"}", url.PathEscape(parameterValueToString(r.artifactId, "artifactId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.idempotencyKey == nil { + return localVarReturnValue, nil, reportError("idempotencyKey is required and must be specified") + } + if r.ifMatch == nil { + return localVarReturnValue, nil, reportError("ifMatch is required and must be specified") + } + if r.content == nil { + return localVarReturnValue, nil, reportError("content is required and must be specified") + } + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"multipart/form-data"} + + // 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 + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "Idempotency-Key", r.idempotencyKey, "simple", "") + parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Match", r.ifMatch, "simple", "") + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + var contentLocalVarFormFileName string + var contentLocalVarFileName string + var contentLocalVarFileBytes []byte + + contentLocalVarFormFileName = "content" + contentLocalVarFile := r.content + + if contentLocalVarFile != nil { + fbs, _ := io.ReadAll(contentLocalVarFile) + + contentLocalVarFileBytes = fbs + contentLocalVarFileName = contentLocalVarFile.Name() + contentLocalVarFile.Close() + formFiles = append(formFiles, formFile{fileBytes: contentLocalVarFileBytes, fileName: contentLocalVarFileName, formFileName: contentLocalVarFormFileName}) + } + if r.contentType != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "content_type", r.contentType, "", "") + } + if r.sha256 != nil { + parameterAddToHeaderOrQuery(localVarFormParams, "sha256", r.sha256, "", "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 412 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 428 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiVersionsContentRequest struct { + ctx context.Context + ApiService *VersionsAPIService + driveId string + artifactId string + versionId string + ifNoneMatch *string + authorization *string +} + +func (r ApiVersionsContentRequest) IfNoneMatch(ifNoneMatch string) ApiVersionsContentRequest { + r.ifNoneMatch = &ifNoneMatch + return r +} + +func (r ApiVersionsContentRequest) Authorization(authorization string) ApiVersionsContentRequest { + r.authorization = &authorization + return r +} + +func (r ApiVersionsContentRequest) Execute() (*os.File, *http.Response, error) { + return r.ApiService.VersionsContentExecute(r) +} + +/* +VersionsContent Read Version Content + +Download one version's immutable bytes — stream or 307. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @param artifactId + @param versionId + @return ApiVersionsContentRequest +*/ +func (a *VersionsAPIService) VersionsContent(ctx context.Context, driveId string, artifactId string, versionId string) ApiVersionsContentRequest { + return ApiVersionsContentRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + artifactId: artifactId, + versionId: versionId, + } +} + +// Execute executes the request +// @return *os.File +func (a *VersionsAPIService) VersionsContentExecute(r ApiVersionsContentRequest) (*os.File, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *os.File + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VersionsAPIService.VersionsContent") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}/content" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"artifact_id"+"}", url.PathEscape(parameterValueToString(r.artifactId, "artifactId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"version_id"+"}", url.PathEscape(parameterValueToString(r.versionId, "versionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // 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/octet-stream", "application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ifNoneMatch != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "If-None-Match", r.ifNoneMatch, "simple", "") + } + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiVersionsListRequest struct { + ctx context.Context + ApiService *VersionsAPIService + driveId string + artifactId string + limit *int32 + cursor *string + authorization *string +} + +func (r ApiVersionsListRequest) Limit(limit int32) ApiVersionsListRequest { + r.limit = &limit + return r +} + +func (r ApiVersionsListRequest) Cursor(cursor string) ApiVersionsListRequest { + r.cursor = &cursor + return r +} + +func (r ApiVersionsListRequest) Authorization(authorization string) ApiVersionsListRequest { + r.authorization = &authorization + return r +} + +func (r ApiVersionsListRequest) Execute() (*VersionListOut, *http.Response, error) { + return r.ApiService.VersionsListExecute(r) +} + +/* +VersionsList List Versions + +List the artifact's version trail, newest first (ordinal DESC). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @param artifactId + @return ApiVersionsListRequest +*/ +func (a *VersionsAPIService) VersionsList(ctx context.Context, driveId string, artifactId string) ApiVersionsListRequest { + return ApiVersionsListRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + artifactId: artifactId, + } +} + +// Execute executes the request +// @return VersionListOut +func (a *VersionsAPIService) VersionsListExecute(r ApiVersionsListRequest) (*VersionListOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *VersionListOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VersionsAPIService.VersionsList") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/artifacts/{artifact_id}/versions" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"artifact_id"+"}", url.PathEscape(parameterValueToString(r.artifactId, "artifactId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.limit != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") + } + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") + } + // 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 r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiVersionsReadRequest struct { + ctx context.Context + ApiService *VersionsAPIService + driveId string + artifactId string + versionId string + ifNoneMatch *string + authorization *string +} + +func (r ApiVersionsReadRequest) IfNoneMatch(ifNoneMatch string) ApiVersionsReadRequest { + r.ifNoneMatch = &ifNoneMatch + return r +} + +func (r ApiVersionsReadRequest) Authorization(authorization string) ApiVersionsReadRequest { + r.authorization = &authorization + return r +} + +func (r ApiVersionsReadRequest) Execute() (*VersionOut, *http.Response, error) { + return r.ApiService.VersionsReadExecute(r) +} + +/* +VersionsRead Read Version + +Read one immutable version. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @param artifactId + @param versionId + @return ApiVersionsReadRequest +*/ +func (a *VersionsAPIService) VersionsRead(ctx context.Context, driveId string, artifactId string, versionId string) ApiVersionsReadRequest { + return ApiVersionsReadRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + artifactId: artifactId, + versionId: versionId, + } +} + +// Execute executes the request +// @return VersionOut +func (a *VersionsAPIService) VersionsReadExecute(r ApiVersionsReadRequest) (*VersionOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *VersionOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VersionsAPIService.VersionsRead") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"artifact_id"+"}", url.PathEscape(parameterValueToString(r.artifactId, "artifactId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"version_id"+"}", url.PathEscape(parameterValueToString(r.versionId, "versionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // 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 r.ifNoneMatch != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "If-None-Match", r.ifNoneMatch, "simple", "") + } + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiVersionsRestoreRequest struct { + ctx context.Context + ApiService *VersionsAPIService + driveId string + artifactId string + versionId string + idempotencyKey *string + ifMatch *string + authorization *string +} + +func (r ApiVersionsRestoreRequest) IdempotencyKey(idempotencyKey string) ApiVersionsRestoreRequest { + r.idempotencyKey = &idempotencyKey + return r +} + +func (r ApiVersionsRestoreRequest) IfMatch(ifMatch string) ApiVersionsRestoreRequest { + r.ifMatch = &ifMatch + return r +} + +func (r ApiVersionsRestoreRequest) Authorization(authorization string) ApiVersionsRestoreRequest { + r.authorization = &authorization + return r +} + +func (r ApiVersionsRestoreRequest) Execute() (*VersionCreatedOut, *http.Response, error) { + return r.ApiService.VersionsRestoreExecute(r) +} + +/* +VersionsRestore Restore Version + +Restore a historical version as a NEW head version (no byte copy). + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param driveId + @param artifactId + @param versionId + @return ApiVersionsRestoreRequest +*/ +func (a *VersionsAPIService) VersionsRestore(ctx context.Context, driveId string, artifactId string, versionId string) ApiVersionsRestoreRequest { + return ApiVersionsRestoreRequest{ + ApiService: a, + ctx: ctx, + driveId: driveId, + artifactId: artifactId, + versionId: versionId, + } +} + +// Execute executes the request +// @return VersionCreatedOut +func (a *VersionsAPIService) VersionsRestoreExecute(r ApiVersionsRestoreRequest) (*VersionCreatedOut, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *VersionCreatedOut + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "VersionsAPIService.VersionsRestore") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}/restore" + localVarPath = strings.Replace(localVarPath, "{"+"drive_id"+"}", url.PathEscape(parameterValueToString(r.driveId, "driveId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"artifact_id"+"}", url.PathEscape(parameterValueToString(r.artifactId, "artifactId")), -1) + localVarPath = strings.Replace(localVarPath, "{"+"version_id"+"}", url.PathEscape(parameterValueToString(r.versionId, "versionId")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + if r.idempotencyKey == nil { + return localVarReturnValue, nil, reportError("idempotencyKey is required and must be specified") + } + if r.ifMatch == nil { + return localVarReturnValue, nil, reportError("ifMatch is required and must be specified") + } + + // 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 + } + parameterAddToHeaderOrQuery(localVarHeaderParams, "Idempotency-Key", r.idempotencyKey, "simple", "") + parameterAddToHeaderOrQuery(localVarHeaderParams, "If-Match", r.ifMatch, "simple", "") + if r.authorization != nil { + parameterAddToHeaderOrQuery(localVarHeaderParams, "authorization", r.authorization, "simple", "") + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 401 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 403 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 404 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 409 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 412 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 422 { + var v ValidationErrorResponse + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 428 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 429 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + return localVarReturnValue, localVarHTTPResponse, newErr + } + if localVarHTTPResponse.StatusCode == 503 { + var v DrivesCreate400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/sdk/go/api_workspaces.go b/sdk/go/api_workspaces.go deleted file mode 100644 index f9fe772..0000000 --- a/sdk/go/api_workspaces.go +++ /dev/null @@ -1,542 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "bytes" - "context" - "io" - "net/http" - "net/url" - "strings" -) - - -// WorkspacesAPIService WorkspacesAPI service -type WorkspacesAPIService service - -type ApiCreateWorkspaceRouteV0WorkspacesPostRequest struct { - ctx context.Context - ApiService *WorkspacesAPIService - workspaceCreateIn *WorkspaceCreateIn -} - -func (r ApiCreateWorkspaceRouteV0WorkspacesPostRequest) WorkspaceCreateIn(workspaceCreateIn WorkspaceCreateIn) ApiCreateWorkspaceRouteV0WorkspacesPostRequest { - r.workspaceCreateIn = &workspaceCreateIn - return r -} - -func (r ApiCreateWorkspaceRouteV0WorkspacesPostRequest) Execute() (*WorkspaceCreateOut, *http.Response, error) { - return r.ApiService.CreateWorkspaceRouteV0WorkspacesPostExecute(r) -} - -/* -CreateWorkspaceRouteV0WorkspacesPost Create a new shared drive - -Create a new **shared drive** — a shared, multi-member space (the `workspaces` path is retained for API stability). You become its **admin** and get a starter drive; the starter drive's `ad_live_` key is returned **once** (`starter_drive_api_key`). - -A user may administer up to their plan's number of shared drives (workspaces-v2 §4.6). A caller at the limit is blocked with `403 WORKSPACE_LIMIT_REACHED`. Requires a `full`-scope user token. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiCreateWorkspaceRouteV0WorkspacesPostRequest -*/ -func (a *WorkspacesAPIService) CreateWorkspaceRouteV0WorkspacesPost(ctx context.Context) ApiCreateWorkspaceRouteV0WorkspacesPostRequest { - return ApiCreateWorkspaceRouteV0WorkspacesPostRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return WorkspaceCreateOut -func (a *WorkspacesAPIService) CreateWorkspaceRouteV0WorkspacesPostExecute(r ApiCreateWorkspaceRouteV0WorkspacesPostRequest) (*WorkspaceCreateOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPost - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *WorkspaceCreateOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WorkspacesAPIService.CreateWorkspaceRouteV0WorkspacesPost") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/workspaces" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.workspaceCreateIn == nil { - return localVarReturnValue, nil, reportError("workspaceCreateIn is required and must be specified") - } - - // 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{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.workspaceCreateIn - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 409 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiListWorkspacesRouteV0WorkspacesGetRequest struct { - ctx context.Context - ApiService *WorkspacesAPIService - cursor *string - limit *int32 -} - -func (r ApiListWorkspacesRouteV0WorkspacesGetRequest) Cursor(cursor string) ApiListWorkspacesRouteV0WorkspacesGetRequest { - r.cursor = &cursor - return r -} - -func (r ApiListWorkspacesRouteV0WorkspacesGetRequest) Limit(limit int32) ApiListWorkspacesRouteV0WorkspacesGetRequest { - r.limit = &limit - return r -} - -func (r ApiListWorkspacesRouteV0WorkspacesGetRequest) Execute() (*WorkspaceList, *http.Response, error) { - return r.ApiService.ListWorkspacesRouteV0WorkspacesGetExecute(r) -} - -/* -ListWorkspacesRouteV0WorkspacesGet List the spaces you belong to - -Return every space the caller is a member of, each carrying the caller's `role` in it. Metadata only. A `read`-scope token is sufficient. - -**Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @return ApiListWorkspacesRouteV0WorkspacesGetRequest -*/ -func (a *WorkspacesAPIService) ListWorkspacesRouteV0WorkspacesGet(ctx context.Context) ApiListWorkspacesRouteV0WorkspacesGetRequest { - return ApiListWorkspacesRouteV0WorkspacesGetRequest{ - ApiService: a, - ctx: ctx, - } -} - -// Execute executes the request -// @return WorkspaceList -func (a *WorkspacesAPIService) ListWorkspacesRouteV0WorkspacesGetExecute(r ApiListWorkspacesRouteV0WorkspacesGetRequest) (*WorkspaceList, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodGet - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *WorkspaceList - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WorkspacesAPIService.ListWorkspacesRouteV0WorkspacesGet") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/workspaces" - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - - if r.cursor != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") - } - if r.limit != nil { - parameterAddToHeaderOrQuery(localVarQueryParams, "limit", r.limit, "form", "") - } - // 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 - } - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} - -type ApiRenameWorkspaceRouteV0WorkspacesOrgIdPatchRequest struct { - ctx context.Context - ApiService *WorkspacesAPIService - orgId string - workspaceRenameIn *WorkspaceRenameIn -} - -func (r ApiRenameWorkspaceRouteV0WorkspacesOrgIdPatchRequest) WorkspaceRenameIn(workspaceRenameIn WorkspaceRenameIn) ApiRenameWorkspaceRouteV0WorkspacesOrgIdPatchRequest { - r.workspaceRenameIn = &workspaceRenameIn - return r -} - -func (r ApiRenameWorkspaceRouteV0WorkspacesOrgIdPatchRequest) Execute() (*WorkspaceOut, *http.Response, error) { - return r.ApiService.RenameWorkspaceRouteV0WorkspacesOrgIdPatchExecute(r) -} - -/* -RenameWorkspaceRouteV0WorkspacesOrgIdPatch Rename a shared drive you administer - -Rename a shared drive. **Admin only** — one you don't administer (or aren't a member of) returns 404 (no-leak). Requires a `full`-scope user token. - - @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). - @param orgId - @return ApiRenameWorkspaceRouteV0WorkspacesOrgIdPatchRequest -*/ -func (a *WorkspacesAPIService) RenameWorkspaceRouteV0WorkspacesOrgIdPatch(ctx context.Context, orgId string) ApiRenameWorkspaceRouteV0WorkspacesOrgIdPatchRequest { - return ApiRenameWorkspaceRouteV0WorkspacesOrgIdPatchRequest{ - ApiService: a, - ctx: ctx, - orgId: orgId, - } -} - -// Execute executes the request -// @return WorkspaceOut -func (a *WorkspacesAPIService) RenameWorkspaceRouteV0WorkspacesOrgIdPatchExecute(r ApiRenameWorkspaceRouteV0WorkspacesOrgIdPatchRequest) (*WorkspaceOut, *http.Response, error) { - var ( - localVarHTTPMethod = http.MethodPatch - localVarPostBody interface{} - formFiles []formFile - localVarReturnValue *WorkspaceOut - ) - - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WorkspacesAPIService.RenameWorkspaceRouteV0WorkspacesOrgIdPatch") - if err != nil { - return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} - } - - localVarPath := localBasePath + "/v0/workspaces/{org_id}" - localVarPath = strings.Replace(localVarPath, "{"+"org_id"+"}", url.PathEscape(parameterValueToString(r.orgId, "orgId")), -1) - - localVarHeaderParams := make(map[string]string) - localVarQueryParams := url.Values{} - localVarFormParams := url.Values{} - if r.workspaceRenameIn == nil { - return localVarReturnValue, nil, reportError("workspaceRenameIn is required and must be specified") - } - - // 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{"application/json"} - - // set Accept header - localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) - if localVarHTTPHeaderAccept != "" { - localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept - } - // body params - localVarPostBody = r.workspaceRenameIn - req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) - if err != nil { - return localVarReturnValue, nil, err - } - - localVarHTTPResponse, err := a.client.callAPI(req) - if err != nil || localVarHTTPResponse == nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) - localVarHTTPResponse.Body.Close() - localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) - if err != nil { - return localVarReturnValue, localVarHTTPResponse, err - } - - if localVarHTTPResponse.StatusCode >= 300 { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: localVarHTTPResponse.Status, - } - if localVarHTTPResponse.StatusCode == 400 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 401 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 403 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 404 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 422 { - var v ValidationErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - return localVarReturnValue, localVarHTTPResponse, newErr - } - if localVarHTTPResponse.StatusCode == 429 { - var v ErrorResponse - err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr.error = err.Error() - return localVarReturnValue, localVarHTTPResponse, newErr - } - newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) - newErr.model = v - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) - if err != nil { - newErr := &GenericOpenAPIError{ - body: localVarBody, - error: err.Error(), - } - return localVarReturnValue, localVarHTTPResponse, newErr - } - - return localVarReturnValue, localVarHTTPResponse, nil -} diff --git a/sdk/go/client.go b/sdk/go/client.go index 8801c73..d240fae 100644 --- a/sdk/go/client.go +++ b/sdk/go/client.go @@ -1,7 +1,7 @@ /* AgentDrive -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. API version: */ @@ -49,21 +49,27 @@ type APIClient struct { // API Services - AgentAuthAPI *AgentAuthAPIService + ArtifactsAPI *ArtifactsAPIService + + ChangesAPI *ChangesAPIService DefaultAPI *DefaultAPIService + DiscoveryAPI *DiscoveryAPIService + DrivesAPI *DrivesAPIService - McpOauthAPI *McpOauthAPIService + FoldersAPI *FoldersAPIService + + GrantsAPI *GrantsAPIService - McpOauthUiAPI *McpOauthUiAPIService + SearchAPI *SearchAPIService - MembersAPI *MembersAPIService + SharesAPI *SharesAPIService - TokensAPI *TokensAPIService + SharesRedemptionAPI *SharesRedemptionAPIService - WorkspacesAPI *WorkspacesAPIService + VersionsAPI *VersionsAPIService } type service struct { @@ -82,14 +88,17 @@ func NewAPIClient(cfg *Configuration) *APIClient { c.common.client = c // API Services - c.AgentAuthAPI = (*AgentAuthAPIService)(&c.common) + c.ArtifactsAPI = (*ArtifactsAPIService)(&c.common) + c.ChangesAPI = (*ChangesAPIService)(&c.common) c.DefaultAPI = (*DefaultAPIService)(&c.common) + c.DiscoveryAPI = (*DiscoveryAPIService)(&c.common) c.DrivesAPI = (*DrivesAPIService)(&c.common) - c.McpOauthAPI = (*McpOauthAPIService)(&c.common) - c.McpOauthUiAPI = (*McpOauthUiAPIService)(&c.common) - c.MembersAPI = (*MembersAPIService)(&c.common) - c.TokensAPI = (*TokensAPIService)(&c.common) - c.WorkspacesAPI = (*WorkspacesAPIService)(&c.common) + c.FoldersAPI = (*FoldersAPIService)(&c.common) + c.GrantsAPI = (*GrantsAPIService)(&c.common) + c.SearchAPI = (*SearchAPIService)(&c.common) + c.SharesAPI = (*SharesAPIService)(&c.common) + c.SharesRedemptionAPI = (*SharesRedemptionAPIService)(&c.common) + c.VersionsAPI = (*VersionsAPIService)(&c.common) return c } diff --git a/sdk/go/configuration.go b/sdk/go/configuration.go index 2af7646..17000a2 100644 --- a/sdk/go/configuration.go +++ b/sdk/go/configuration.go @@ -1,7 +1,7 @@ /* AgentDrive -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. API version: */ diff --git a/sdk/go/docs/AgentAuthAPI.md b/sdk/go/docs/AgentAuthAPI.md deleted file mode 100644 index 2745735..0000000 --- a/sdk/go/docs/AgentAuthAPI.md +++ /dev/null @@ -1,527 +0,0 @@ -# \AgentAuthAPI - -All URIs are relative to *https://api.agentdrive.run* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ExtensionExchangeV0AuthExtensionExchangePost**](AgentAuthAPI.md#ExtensionExchangeV0AuthExtensionExchangePost) | **Post** /v0/auth/extension/exchange | Redeem an extension OAuth ticket for a JWT pair -[**InitiateClaimAgentIdentityClaimPost**](AgentAuthAPI.md#InitiateClaimAgentIdentityClaimPost) | **Post** /agent/identity/claim | Initiate the human-claim ceremony for an agent identity -[**JwksWellKnownJwksJsonGet**](AgentAuthAPI.md#JwksWellKnownJwksJsonGet) | **Get** /.well-known/jwks.json | JSON Web Key Set — public keys for verifying AgentDrive JWTs -[**Oauth2TokenOauth2TokenPost**](AgentAuthAPI.md#Oauth2TokenOauth2TokenPost) | **Post** /oauth2/token | Exchange a credential for an access_token -[**OauthAuthorizationServerWellKnownOauthAuthorizationServerGet**](AgentAuthAPI.md#OauthAuthorizationServerWellKnownOauthAuthorizationServerGet) | **Get** /.well-known/oauth-authorization-server | Authorization-server metadata (RFC 8414 + auth.md agent_auth block) -[**OauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGet**](AgentAuthAPI.md#OauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGet) | **Get** /.well-known/oauth-protected-resource/mcp | Protected-resource metadata for the MCP endpoint (RFC 9728 §3.1) -[**OauthProtectedResourceWellKnownOauthProtectedResourceGet**](AgentAuthAPI.md#OauthProtectedResourceWellKnownOauthProtectedResourceGet) | **Get** /.well-known/oauth-protected-resource | Protected-resource metadata (auth.md / RFC 9728-like discovery) -[**RegisterAgentIdentityAgentIdentityPost**](AgentAuthAPI.md#RegisterAgentIdentityAgentIdentityPost) | **Post** /agent/identity | Register an agent identity (anonymous or ID-JAG) - - - -## ExtensionExchangeV0AuthExtensionExchangePost - -> ExtensionExchangeResponse ExtensionExchangeV0AuthExtensionExchangePost(ctx).ExtensionExchangeRequest(extensionExchangeRequest).Execute() - -Redeem an extension OAuth ticket for a JWT pair - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - extensionExchangeRequest := *openapiclient.NewExtensionExchangeRequest("ExtId_example", "Ticket_example") // ExtensionExchangeRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AgentAuthAPI.ExtensionExchangeV0AuthExtensionExchangePost(context.Background()).ExtensionExchangeRequest(extensionExchangeRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AgentAuthAPI.ExtensionExchangeV0AuthExtensionExchangePost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ExtensionExchangeV0AuthExtensionExchangePost`: ExtensionExchangeResponse - fmt.Fprintf(os.Stdout, "Response from `AgentAuthAPI.ExtensionExchangeV0AuthExtensionExchangePost`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiExtensionExchangeV0AuthExtensionExchangePostRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **extensionExchangeRequest** | [**ExtensionExchangeRequest**](ExtensionExchangeRequest.md) | | - -### Return type - -[**ExtensionExchangeResponse**](ExtensionExchangeResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **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) - - -## InitiateClaimAgentIdentityClaimPost - -> ClaimInitResponse InitiateClaimAgentIdentityClaimPost(ctx).ClaimInitRequest(claimInitRequest).Execute() - -Initiate the human-claim ceremony for an agent identity - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - claimInitRequest := *openapiclient.NewClaimInitRequest("ClaimToken_example") // ClaimInitRequest | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AgentAuthAPI.InitiateClaimAgentIdentityClaimPost(context.Background()).ClaimInitRequest(claimInitRequest).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AgentAuthAPI.InitiateClaimAgentIdentityClaimPost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `InitiateClaimAgentIdentityClaimPost`: ClaimInitResponse - fmt.Fprintf(os.Stdout, "Response from `AgentAuthAPI.InitiateClaimAgentIdentityClaimPost`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiInitiateClaimAgentIdentityClaimPostRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **claimInitRequest** | [**ClaimInitRequest**](ClaimInitRequest.md) | | - -### Return type - -[**ClaimInitResponse**](ClaimInitResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **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) - - -## JwksWellKnownJwksJsonGet - -> JwksOut JwksWellKnownJwksJsonGet(ctx).Execute() - -JSON Web Key Set — public keys for verifying AgentDrive JWTs - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AgentAuthAPI.JwksWellKnownJwksJsonGet(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AgentAuthAPI.JwksWellKnownJwksJsonGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `JwksWellKnownJwksJsonGet`: JwksOut - fmt.Fprintf(os.Stdout, "Response from `AgentAuthAPI.JwksWellKnownJwksJsonGet`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiJwksWellKnownJwksJsonGetRequest struct via the builder pattern - - -### Return type - -[**JwksOut**](JwksOut.md) - -### Authorization - -No authorization required - -### 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) - - -## Oauth2TokenOauth2TokenPost - -> TokenResponse Oauth2TokenOauth2TokenPost(ctx).GrantType(grantType).Assertion(assertion).ClaimToken(claimToken).Execute() - -Exchange a credential for an access_token - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - grantType := "grantType_example" // string | - assertion := "assertion_example" // string | (optional) - claimToken := "claimToken_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AgentAuthAPI.Oauth2TokenOauth2TokenPost(context.Background()).GrantType(grantType).Assertion(assertion).ClaimToken(claimToken).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AgentAuthAPI.Oauth2TokenOauth2TokenPost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `Oauth2TokenOauth2TokenPost`: TokenResponse - fmt.Fprintf(os.Stdout, "Response from `AgentAuthAPI.Oauth2TokenOauth2TokenPost`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiOauth2TokenOauth2TokenPostRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **grantType** | **string** | | - **assertion** | **string** | | - **claimToken** | **string** | | - -### Return type - -[**TokenResponse**](TokenResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **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) - - -## OauthAuthorizationServerWellKnownOauthAuthorizationServerGet - -> AuthorizationServerMetadataOut OauthAuthorizationServerWellKnownOauthAuthorizationServerGet(ctx).Execute() - -Authorization-server metadata (RFC 8414 + auth.md agent_auth block) - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AgentAuthAPI.OauthAuthorizationServerWellKnownOauthAuthorizationServerGet(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AgentAuthAPI.OauthAuthorizationServerWellKnownOauthAuthorizationServerGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OauthAuthorizationServerWellKnownOauthAuthorizationServerGet`: AuthorizationServerMetadataOut - fmt.Fprintf(os.Stdout, "Response from `AgentAuthAPI.OauthAuthorizationServerWellKnownOauthAuthorizationServerGet`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiOauthAuthorizationServerWellKnownOauthAuthorizationServerGetRequest struct via the builder pattern - - -### Return type - -[**AuthorizationServerMetadataOut**](AuthorizationServerMetadataOut.md) - -### Authorization - -No authorization required - -### 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) - - -## OauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGet - -> ProtectedResourceMetadataOut OauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGet(ctx).Execute() - -Protected-resource metadata for the MCP endpoint (RFC 9728 §3.1) - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AgentAuthAPI.OauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGet(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AgentAuthAPI.OauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGet`: ProtectedResourceMetadataOut - fmt.Fprintf(os.Stdout, "Response from `AgentAuthAPI.OauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGet`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiOauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGetRequest struct via the builder pattern - - -### Return type - -[**ProtectedResourceMetadataOut**](ProtectedResourceMetadataOut.md) - -### Authorization - -No authorization required - -### 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) - - -## OauthProtectedResourceWellKnownOauthProtectedResourceGet - -> ProtectedResourceMetadataOut OauthProtectedResourceWellKnownOauthProtectedResourceGet(ctx).Execute() - -Protected-resource metadata (auth.md / RFC 9728-like discovery) - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AgentAuthAPI.OauthProtectedResourceWellKnownOauthProtectedResourceGet(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AgentAuthAPI.OauthProtectedResourceWellKnownOauthProtectedResourceGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `OauthProtectedResourceWellKnownOauthProtectedResourceGet`: ProtectedResourceMetadataOut - fmt.Fprintf(os.Stdout, "Response from `AgentAuthAPI.OauthProtectedResourceWellKnownOauthProtectedResourceGet`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiOauthProtectedResourceWellKnownOauthProtectedResourceGetRequest struct via the builder pattern - - -### Return type - -[**ProtectedResourceMetadataOut**](ProtectedResourceMetadataOut.md) - -### Authorization - -No authorization required - -### 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) - - -## RegisterAgentIdentityAgentIdentityPost - -> AnonymousIdentityResponse RegisterAgentIdentityAgentIdentityPost(ctx).RequestBody(requestBody).Execute() - -Register an agent identity (anonymous or ID-JAG) - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - requestBody := map[string]*interface{}{"key": interface{}(123)} // map[string]*interface{} | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.AgentAuthAPI.RegisterAgentIdentityAgentIdentityPost(context.Background()).RequestBody(requestBody).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `AgentAuthAPI.RegisterAgentIdentityAgentIdentityPost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RegisterAgentIdentityAgentIdentityPost`: AnonymousIdentityResponse - fmt.Fprintf(os.Stdout, "Response from `AgentAuthAPI.RegisterAgentIdentityAgentIdentityPost`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiRegisterAgentIdentityAgentIdentityPostRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requestBody** | **map[string]interface{}** | | - -### Return type - -[**AnonymousIdentityResponse**](AnonymousIdentityResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **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) diff --git a/sdk/go/docs/AgentAuthMetadataOut.md b/sdk/go/docs/AgentAuthMetadataOut.md deleted file mode 100644 index 4d75dcf..0000000 --- a/sdk/go/docs/AgentAuthMetadataOut.md +++ /dev/null @@ -1,185 +0,0 @@ -# AgentAuthMetadataOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ClaimEndpoint** | **string** | | -**EventsEndpoint** | **NullableString** | | -**IdentityAssertion** | [**IdentityAssertionMetadataOut**](IdentityAssertionMetadataOut.md) | | -**IdentityEndpoint** | **string** | | -**IdentityTypesSupported** | **[]string** | | -**Skill** | **string** | | -**SpecVersion** | **string** | | - -## Methods - -### NewAgentAuthMetadataOut - -`func NewAgentAuthMetadataOut(claimEndpoint string, eventsEndpoint NullableString, identityAssertion IdentityAssertionMetadataOut, identityEndpoint string, identityTypesSupported []string, skill string, specVersion string, ) *AgentAuthMetadataOut` - -NewAgentAuthMetadataOut instantiates a new AgentAuthMetadataOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewAgentAuthMetadataOutWithDefaults - -`func NewAgentAuthMetadataOutWithDefaults() *AgentAuthMetadataOut` - -NewAgentAuthMetadataOutWithDefaults instantiates a new AgentAuthMetadataOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetClaimEndpoint - -`func (o *AgentAuthMetadataOut) GetClaimEndpoint() string` - -GetClaimEndpoint returns the ClaimEndpoint field if non-nil, zero value otherwise. - -### GetClaimEndpointOk - -`func (o *AgentAuthMetadataOut) GetClaimEndpointOk() (*string, bool)` - -GetClaimEndpointOk returns a tuple with the ClaimEndpoint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetClaimEndpoint - -`func (o *AgentAuthMetadataOut) SetClaimEndpoint(v string)` - -SetClaimEndpoint sets ClaimEndpoint field to given value. - - -### GetEventsEndpoint - -`func (o *AgentAuthMetadataOut) GetEventsEndpoint() string` - -GetEventsEndpoint returns the EventsEndpoint field if non-nil, zero value otherwise. - -### GetEventsEndpointOk - -`func (o *AgentAuthMetadataOut) GetEventsEndpointOk() (*string, bool)` - -GetEventsEndpointOk returns a tuple with the EventsEndpoint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEventsEndpoint - -`func (o *AgentAuthMetadataOut) SetEventsEndpoint(v string)` - -SetEventsEndpoint sets EventsEndpoint field to given value. - - -### SetEventsEndpointNil - -`func (o *AgentAuthMetadataOut) SetEventsEndpointNil(b bool)` - - SetEventsEndpointNil sets the value for EventsEndpoint to be an explicit nil - -### UnsetEventsEndpoint -`func (o *AgentAuthMetadataOut) UnsetEventsEndpoint()` - -UnsetEventsEndpoint ensures that no value is present for EventsEndpoint, not even an explicit nil -### GetIdentityAssertion - -`func (o *AgentAuthMetadataOut) GetIdentityAssertion() IdentityAssertionMetadataOut` - -GetIdentityAssertion returns the IdentityAssertion field if non-nil, zero value otherwise. - -### GetIdentityAssertionOk - -`func (o *AgentAuthMetadataOut) GetIdentityAssertionOk() (*IdentityAssertionMetadataOut, bool)` - -GetIdentityAssertionOk returns a tuple with the IdentityAssertion field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIdentityAssertion - -`func (o *AgentAuthMetadataOut) SetIdentityAssertion(v IdentityAssertionMetadataOut)` - -SetIdentityAssertion sets IdentityAssertion field to given value. - - -### GetIdentityEndpoint - -`func (o *AgentAuthMetadataOut) GetIdentityEndpoint() string` - -GetIdentityEndpoint returns the IdentityEndpoint field if non-nil, zero value otherwise. - -### GetIdentityEndpointOk - -`func (o *AgentAuthMetadataOut) GetIdentityEndpointOk() (*string, bool)` - -GetIdentityEndpointOk returns a tuple with the IdentityEndpoint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIdentityEndpoint - -`func (o *AgentAuthMetadataOut) SetIdentityEndpoint(v string)` - -SetIdentityEndpoint sets IdentityEndpoint field to given value. - - -### GetIdentityTypesSupported - -`func (o *AgentAuthMetadataOut) GetIdentityTypesSupported() []string` - -GetIdentityTypesSupported returns the IdentityTypesSupported field if non-nil, zero value otherwise. - -### GetIdentityTypesSupportedOk - -`func (o *AgentAuthMetadataOut) GetIdentityTypesSupportedOk() (*[]string, bool)` - -GetIdentityTypesSupportedOk returns a tuple with the IdentityTypesSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIdentityTypesSupported - -`func (o *AgentAuthMetadataOut) SetIdentityTypesSupported(v []string)` - -SetIdentityTypesSupported sets IdentityTypesSupported field to given value. - - -### GetSkill - -`func (o *AgentAuthMetadataOut) GetSkill() string` - -GetSkill returns the Skill field if non-nil, zero value otherwise. - -### GetSkillOk - -`func (o *AgentAuthMetadataOut) GetSkillOk() (*string, bool)` - -GetSkillOk returns a tuple with the Skill field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSkill - -`func (o *AgentAuthMetadataOut) SetSkill(v string)` - -SetSkill sets Skill field to given value. - - -### GetSpecVersion - -`func (o *AgentAuthMetadataOut) GetSpecVersion() string` - -GetSpecVersion returns the SpecVersion field if non-nil, zero value otherwise. - -### GetSpecVersionOk - -`func (o *AgentAuthMetadataOut) GetSpecVersionOk() (*string, bool)` - -GetSpecVersionOk returns a tuple with the SpecVersion field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSpecVersion - -`func (o *AgentAuthMetadataOut) SetSpecVersion(v string)` - -SetSpecVersion sets SpecVersion field to given value. - - - -[[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/sdk/go/docs/AnonymousIdentityResponse.md b/sdk/go/docs/AnonymousIdentityResponse.md deleted file mode 100644 index a5384e2..0000000 --- a/sdk/go/docs/AnonymousIdentityResponse.md +++ /dev/null @@ -1,154 +0,0 @@ -# AnonymousIdentityResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AgentIdentityId** | **string** | | -**ClaimMetadata** | [**ClaimMetadata**](ClaimMetadata.md) | | -**ClaimToken** | **string** | Opaque server-issued secret. Present at POST /agent/identity/claim and at POST /oauth2/token (grant_type=claim). | -**DriveId** | **string** | | -**ExpiresAt** | **time.Time** | | -**IdentityAssertion** | **string** | JWT signed by AgentDrive, scope=pre_claim. 30-day TTL. | - -## Methods - -### NewAnonymousIdentityResponse - -`func NewAnonymousIdentityResponse(agentIdentityId string, claimMetadata ClaimMetadata, claimToken string, driveId string, expiresAt time.Time, identityAssertion string, ) *AnonymousIdentityResponse` - -NewAnonymousIdentityResponse instantiates a new AnonymousIdentityResponse object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewAnonymousIdentityResponseWithDefaults - -`func NewAnonymousIdentityResponseWithDefaults() *AnonymousIdentityResponse` - -NewAnonymousIdentityResponseWithDefaults instantiates a new AnonymousIdentityResponse object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetAgentIdentityId - -`func (o *AnonymousIdentityResponse) GetAgentIdentityId() string` - -GetAgentIdentityId returns the AgentIdentityId field if non-nil, zero value otherwise. - -### GetAgentIdentityIdOk - -`func (o *AnonymousIdentityResponse) GetAgentIdentityIdOk() (*string, bool)` - -GetAgentIdentityIdOk returns a tuple with the AgentIdentityId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAgentIdentityId - -`func (o *AnonymousIdentityResponse) SetAgentIdentityId(v string)` - -SetAgentIdentityId sets AgentIdentityId field to given value. - - -### GetClaimMetadata - -`func (o *AnonymousIdentityResponse) GetClaimMetadata() ClaimMetadata` - -GetClaimMetadata returns the ClaimMetadata field if non-nil, zero value otherwise. - -### GetClaimMetadataOk - -`func (o *AnonymousIdentityResponse) GetClaimMetadataOk() (*ClaimMetadata, bool)` - -GetClaimMetadataOk returns a tuple with the ClaimMetadata field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetClaimMetadata - -`func (o *AnonymousIdentityResponse) SetClaimMetadata(v ClaimMetadata)` - -SetClaimMetadata sets ClaimMetadata field to given value. - - -### GetClaimToken - -`func (o *AnonymousIdentityResponse) GetClaimToken() string` - -GetClaimToken returns the ClaimToken field if non-nil, zero value otherwise. - -### GetClaimTokenOk - -`func (o *AnonymousIdentityResponse) GetClaimTokenOk() (*string, bool)` - -GetClaimTokenOk returns a tuple with the ClaimToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetClaimToken - -`func (o *AnonymousIdentityResponse) SetClaimToken(v string)` - -SetClaimToken sets ClaimToken field to given value. - - -### GetDriveId - -`func (o *AnonymousIdentityResponse) GetDriveId() string` - -GetDriveId returns the DriveId field if non-nil, zero value otherwise. - -### GetDriveIdOk - -`func (o *AnonymousIdentityResponse) GetDriveIdOk() (*string, bool)` - -GetDriveIdOk returns a tuple with the DriveId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDriveId - -`func (o *AnonymousIdentityResponse) SetDriveId(v string)` - -SetDriveId sets DriveId field to given value. - - -### GetExpiresAt - -`func (o *AnonymousIdentityResponse) GetExpiresAt() time.Time` - -GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. - -### GetExpiresAtOk - -`func (o *AnonymousIdentityResponse) GetExpiresAtOk() (*time.Time, bool)` - -GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExpiresAt - -`func (o *AnonymousIdentityResponse) SetExpiresAt(v time.Time)` - -SetExpiresAt sets ExpiresAt field to given value. - - -### GetIdentityAssertion - -`func (o *AnonymousIdentityResponse) GetIdentityAssertion() string` - -GetIdentityAssertion returns the IdentityAssertion field if non-nil, zero value otherwise. - -### GetIdentityAssertionOk - -`func (o *AnonymousIdentityResponse) GetIdentityAssertionOk() (*string, bool)` - -GetIdentityAssertionOk returns a tuple with the IdentityAssertion field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIdentityAssertion - -`func (o *AnonymousIdentityResponse) SetIdentityAssertion(v string)` - -SetIdentityAssertion sets IdentityAssertion field to given value. - - - -[[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/sdk/go/docs/ArtifactCopyIn.md b/sdk/go/docs/ArtifactCopyIn.md new file mode 100644 index 0000000..5dc1868 --- /dev/null +++ b/sdk/go/docs/ArtifactCopyIn.md @@ -0,0 +1,142 @@ +# ArtifactCopyIn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**DestinationDriveId** | Pointer to **NullableString** | | [optional] +**DestinationName** | **string** | | +**DestinationParentId** | **string** | | +**VersionId** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewArtifactCopyIn + +`func NewArtifactCopyIn(destinationName string, destinationParentId string, ) *ArtifactCopyIn` + +NewArtifactCopyIn instantiates a new ArtifactCopyIn object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewArtifactCopyInWithDefaults + +`func NewArtifactCopyInWithDefaults() *ArtifactCopyIn` + +NewArtifactCopyInWithDefaults instantiates a new ArtifactCopyIn object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetDestinationDriveId + +`func (o *ArtifactCopyIn) GetDestinationDriveId() string` + +GetDestinationDriveId returns the DestinationDriveId field if non-nil, zero value otherwise. + +### GetDestinationDriveIdOk + +`func (o *ArtifactCopyIn) GetDestinationDriveIdOk() (*string, bool)` + +GetDestinationDriveIdOk returns a tuple with the DestinationDriveId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDestinationDriveId + +`func (o *ArtifactCopyIn) SetDestinationDriveId(v string)` + +SetDestinationDriveId sets DestinationDriveId field to given value. + +### HasDestinationDriveId + +`func (o *ArtifactCopyIn) HasDestinationDriveId() bool` + +HasDestinationDriveId returns a boolean if a field has been set. + +### SetDestinationDriveIdNil + +`func (o *ArtifactCopyIn) SetDestinationDriveIdNil(b bool)` + + SetDestinationDriveIdNil sets the value for DestinationDriveId to be an explicit nil + +### UnsetDestinationDriveId +`func (o *ArtifactCopyIn) UnsetDestinationDriveId()` + +UnsetDestinationDriveId ensures that no value is present for DestinationDriveId, not even an explicit nil +### GetDestinationName + +`func (o *ArtifactCopyIn) GetDestinationName() string` + +GetDestinationName returns the DestinationName field if non-nil, zero value otherwise. + +### GetDestinationNameOk + +`func (o *ArtifactCopyIn) GetDestinationNameOk() (*string, bool)` + +GetDestinationNameOk returns a tuple with the DestinationName field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDestinationName + +`func (o *ArtifactCopyIn) SetDestinationName(v string)` + +SetDestinationName sets DestinationName field to given value. + + +### GetDestinationParentId + +`func (o *ArtifactCopyIn) GetDestinationParentId() string` + +GetDestinationParentId returns the DestinationParentId field if non-nil, zero value otherwise. + +### GetDestinationParentIdOk + +`func (o *ArtifactCopyIn) GetDestinationParentIdOk() (*string, bool)` + +GetDestinationParentIdOk returns a tuple with the DestinationParentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDestinationParentId + +`func (o *ArtifactCopyIn) SetDestinationParentId(v string)` + +SetDestinationParentId sets DestinationParentId field to given value. + + +### GetVersionId + +`func (o *ArtifactCopyIn) GetVersionId() string` + +GetVersionId returns the VersionId field if non-nil, zero value otherwise. + +### GetVersionIdOk + +`func (o *ArtifactCopyIn) GetVersionIdOk() (*string, bool)` + +GetVersionIdOk returns a tuple with the VersionId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersionId + +`func (o *ArtifactCopyIn) SetVersionId(v string)` + +SetVersionId sets VersionId field to given value. + +### HasVersionId + +`func (o *ArtifactCopyIn) HasVersionId() bool` + +HasVersionId returns a boolean if a field has been set. + +### SetVersionIdNil + +`func (o *ArtifactCopyIn) SetVersionIdNil(b bool)` + + SetVersionIdNil sets the value for VersionId to be an explicit nil + +### UnsetVersionId +`func (o *ArtifactCopyIn) UnsetVersionId()` + +UnsetVersionId ensures that no value is present for VersionId, not even an explicit nil + +[[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/sdk/go/docs/ArtifactDeleteOut.md b/sdk/go/docs/ArtifactDeleteOut.md deleted file mode 100644 index 2c5538f..0000000 --- a/sdk/go/docs/ArtifactDeleteOut.md +++ /dev/null @@ -1,174 +0,0 @@ -# ArtifactDeleteOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DeletedAt** | **time.Time** | | -**Id** | **string** | | -**Ok** | Pointer to **bool** | | [optional] [default to true] -**Path** | **string** | | -**PurgeAt** | **time.Time** | | -**RestoreUrl** | Pointer to **NullableString** | | [optional] - -## Methods - -### NewArtifactDeleteOut - -`func NewArtifactDeleteOut(deletedAt time.Time, id string, path string, purgeAt time.Time, ) *ArtifactDeleteOut` - -NewArtifactDeleteOut instantiates a new ArtifactDeleteOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewArtifactDeleteOutWithDefaults - -`func NewArtifactDeleteOutWithDefaults() *ArtifactDeleteOut` - -NewArtifactDeleteOutWithDefaults instantiates a new ArtifactDeleteOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetDeletedAt - -`func (o *ArtifactDeleteOut) GetDeletedAt() time.Time` - -GetDeletedAt returns the DeletedAt field if non-nil, zero value otherwise. - -### GetDeletedAtOk - -`func (o *ArtifactDeleteOut) GetDeletedAtOk() (*time.Time, bool)` - -GetDeletedAtOk returns a tuple with the DeletedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDeletedAt - -`func (o *ArtifactDeleteOut) SetDeletedAt(v time.Time)` - -SetDeletedAt sets DeletedAt field to given value. - - -### GetId - -`func (o *ArtifactDeleteOut) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *ArtifactDeleteOut) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *ArtifactDeleteOut) SetId(v string)` - -SetId sets Id field to given value. - - -### GetOk - -`func (o *ArtifactDeleteOut) GetOk() bool` - -GetOk returns the Ok field if non-nil, zero value otherwise. - -### GetOkOk - -`func (o *ArtifactDeleteOut) GetOkOk() (*bool, bool)` - -GetOkOk returns a tuple with the Ok field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOk - -`func (o *ArtifactDeleteOut) SetOk(v bool)` - -SetOk sets Ok field to given value. - -### HasOk - -`func (o *ArtifactDeleteOut) HasOk() bool` - -HasOk returns a boolean if a field has been set. - -### GetPath - -`func (o *ArtifactDeleteOut) GetPath() string` - -GetPath returns the Path field if non-nil, zero value otherwise. - -### GetPathOk - -`func (o *ArtifactDeleteOut) GetPathOk() (*string, bool)` - -GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPath - -`func (o *ArtifactDeleteOut) SetPath(v string)` - -SetPath sets Path field to given value. - - -### GetPurgeAt - -`func (o *ArtifactDeleteOut) GetPurgeAt() time.Time` - -GetPurgeAt returns the PurgeAt field if non-nil, zero value otherwise. - -### GetPurgeAtOk - -`func (o *ArtifactDeleteOut) GetPurgeAtOk() (*time.Time, bool)` - -GetPurgeAtOk returns a tuple with the PurgeAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPurgeAt - -`func (o *ArtifactDeleteOut) SetPurgeAt(v time.Time)` - -SetPurgeAt sets PurgeAt field to given value. - - -### GetRestoreUrl - -`func (o *ArtifactDeleteOut) GetRestoreUrl() string` - -GetRestoreUrl returns the RestoreUrl field if non-nil, zero value otherwise. - -### GetRestoreUrlOk - -`func (o *ArtifactDeleteOut) GetRestoreUrlOk() (*string, bool)` - -GetRestoreUrlOk returns a tuple with the RestoreUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRestoreUrl - -`func (o *ArtifactDeleteOut) SetRestoreUrl(v string)` - -SetRestoreUrl sets RestoreUrl field to given value. - -### HasRestoreUrl - -`func (o *ArtifactDeleteOut) HasRestoreUrl() bool` - -HasRestoreUrl returns a boolean if a field has been set. - -### SetRestoreUrlNil - -`func (o *ArtifactDeleteOut) SetRestoreUrlNil(b bool)` - - SetRestoreUrlNil sets the value for RestoreUrl to be an explicit nil - -### UnsetRestoreUrl -`func (o *ArtifactDeleteOut) UnsetRestoreUrl()` - -UnsetRestoreUrl ensures that no value is present for RestoreUrl, not even an explicit nil - -[[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/sdk/go/docs/ArtifactHeadOut.md b/sdk/go/docs/ArtifactHeadOut.md deleted file mode 100644 index 3e36f5c..0000000 --- a/sdk/go/docs/ArtifactHeadOut.md +++ /dev/null @@ -1,49 +0,0 @@ -# ArtifactHeadOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Version** | **int32** | | - -## Methods - -### NewArtifactHeadOut - -`func NewArtifactHeadOut(version int32, ) *ArtifactHeadOut` - -NewArtifactHeadOut instantiates a new ArtifactHeadOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewArtifactHeadOutWithDefaults - -`func NewArtifactHeadOutWithDefaults() *ArtifactHeadOut` - -NewArtifactHeadOutWithDefaults instantiates a new ArtifactHeadOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetVersion - -`func (o *ArtifactHeadOut) GetVersion() int32` - -GetVersion returns the Version field if non-nil, zero value otherwise. - -### GetVersionOk - -`func (o *ArtifactHeadOut) GetVersionOk() (*int32, bool)` - -GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVersion - -`func (o *ArtifactHeadOut) SetVersion(v int32)` - -SetVersion sets Version field to given value. - - - -[[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/sdk/go/docs/ArtifactListOut.md b/sdk/go/docs/ArtifactListOut.md new file mode 100644 index 0000000..fc0f479 --- /dev/null +++ b/sdk/go/docs/ArtifactListOut.md @@ -0,0 +1,80 @@ +# ArtifactListOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Items** | [**[]ArtifactOut**](ArtifactOut.md) | | +**NextCursor** | **NullableString** | | + +## Methods + +### NewArtifactListOut + +`func NewArtifactListOut(items []ArtifactOut, nextCursor NullableString, ) *ArtifactListOut` + +NewArtifactListOut instantiates a new ArtifactListOut object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewArtifactListOutWithDefaults + +`func NewArtifactListOutWithDefaults() *ArtifactListOut` + +NewArtifactListOutWithDefaults instantiates a new ArtifactListOut object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetItems + +`func (o *ArtifactListOut) GetItems() []ArtifactOut` + +GetItems returns the Items field if non-nil, zero value otherwise. + +### GetItemsOk + +`func (o *ArtifactListOut) GetItemsOk() (*[]ArtifactOut, bool)` + +GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItems + +`func (o *ArtifactListOut) SetItems(v []ArtifactOut)` + +SetItems sets Items field to given value. + + +### GetNextCursor + +`func (o *ArtifactListOut) GetNextCursor() string` + +GetNextCursor returns the NextCursor field if non-nil, zero value otherwise. + +### GetNextCursorOk + +`func (o *ArtifactListOut) GetNextCursorOk() (*string, bool)` + +GetNextCursorOk returns a tuple with the NextCursor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextCursor + +`func (o *ArtifactListOut) SetNextCursor(v string)` + +SetNextCursor sets NextCursor field to given value. + + +### SetNextCursorNil + +`func (o *ArtifactListOut) SetNextCursorNil(b bool)` + + SetNextCursorNil sets the value for NextCursor to be an explicit nil + +### UnsetNextCursor +`func (o *ArtifactListOut) UnsetNextCursor()` + +UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil + +[[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/sdk/go/docs/ArtifactMoveIn.md b/sdk/go/docs/ArtifactMoveIn.md deleted file mode 100644 index df79a16..0000000 --- a/sdk/go/docs/ArtifactMoveIn.md +++ /dev/null @@ -1,49 +0,0 @@ -# ArtifactMoveIn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Path** | **string** | | - -## Methods - -### NewArtifactMoveIn - -`func NewArtifactMoveIn(path string, ) *ArtifactMoveIn` - -NewArtifactMoveIn instantiates a new ArtifactMoveIn object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewArtifactMoveInWithDefaults - -`func NewArtifactMoveInWithDefaults() *ArtifactMoveIn` - -NewArtifactMoveInWithDefaults instantiates a new ArtifactMoveIn object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetPath - -`func (o *ArtifactMoveIn) GetPath() string` - -GetPath returns the Path field if non-nil, zero value otherwise. - -### GetPathOk - -`func (o *ArtifactMoveIn) GetPathOk() (*string, bool)` - -GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPath - -`func (o *ArtifactMoveIn) SetPath(v string)` - -SetPath sets Path field to given value. - - - -[[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/sdk/go/docs/ArtifactOut.md b/sdk/go/docs/ArtifactOut.md index 98ad271..f13de15 100644 --- a/sdk/go/docs/ArtifactOut.md +++ b/sdk/go/docs/ArtifactOut.md @@ -4,32 +4,27 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ContentType** | **string** | | +**ContentPreview** | **NullableString** | | +**ContentType** | **NullableString** | | **CreatedAt** | **time.Time** | | +**DeletedAt** | **NullableTime** | | **DriveId** | **string** | | -**EmbeddedAt** | Pointer to **NullableTime** | | [optional] -**Etag** | **string** | | -**FileType** | **string** | | -**Hash** | **string** | | +**EffectiveVisibility** | **string** | Server-computed exposure summary, resolved over the artifact's live grants, its folder ancestry (bounded by the nearest sealed folder), and the drive. 'public' when any live grant has principal_type 'public'; otherwise 'shared' when a live grant names a principal other than the drive's creator; otherwise 'private'. Describes exposure, NOT the caller's own access. | +**HeadVersionId** | **NullableString** | | **Id** | **string** | | -**IndexedAt** | Pointer to **NullableTime** | | [optional] -**Labels** | Pointer to **[]string** | | [optional] -**LlmIndex** | Pointer to **map[string]interface{}** | | [optional] -**Metadata** | Pointer to **map[string]interface{}** | | [optional] -**Metageneration** | Pointer to **int32** | | [optional] [default to 1] -**Path** | **string** | | -**Permalink** | **string** | | -**SizeBytes** | **int32** | | -**Source** | Pointer to [**NullableArtifactSource**](ArtifactSource.md) | | [optional] +**Labels** | **[]string** | | +**Metadata** | **map[string]interface{}** | | +**Name** | **string** | | +**ParentId** | **string** | | +**Revision** | **string** | | +**State** | **string** | | **UpdatedAt** | **time.Time** | | -**Url** | **string** | | -**VersionNumber** | Pointer to **int32** | | [optional] [default to 1] ## Methods ### NewArtifactOut -`func NewArtifactOut(contentType string, createdAt time.Time, driveId string, etag string, fileType string, hash string, id string, path string, permalink string, sizeBytes int32, updatedAt time.Time, url string, ) *ArtifactOut` +`func NewArtifactOut(contentPreview NullableString, contentType NullableString, createdAt time.Time, deletedAt NullableTime, driveId string, effectiveVisibility string, headVersionId NullableString, id string, labels []string, metadata map[string]interface{}, name string, parentId string, revision string, state string, updatedAt time.Time, ) *ArtifactOut` NewArtifactOut instantiates a new ArtifactOut object This constructor will assign default values to properties that have it defined, @@ -44,6 +39,36 @@ NewArtifactOutWithDefaults instantiates a new ArtifactOut object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set +### GetContentPreview + +`func (o *ArtifactOut) GetContentPreview() string` + +GetContentPreview returns the ContentPreview field if non-nil, zero value otherwise. + +### GetContentPreviewOk + +`func (o *ArtifactOut) GetContentPreviewOk() (*string, bool)` + +GetContentPreviewOk returns a tuple with the ContentPreview field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContentPreview + +`func (o *ArtifactOut) SetContentPreview(v string)` + +SetContentPreview sets ContentPreview field to given value. + + +### SetContentPreviewNil + +`func (o *ArtifactOut) SetContentPreviewNil(b bool)` + + SetContentPreviewNil sets the value for ContentPreview to be an explicit nil + +### UnsetContentPreview +`func (o *ArtifactOut) UnsetContentPreview()` + +UnsetContentPreview ensures that no value is present for ContentPreview, not even an explicit nil ### GetContentType `func (o *ArtifactOut) GetContentType() string` @@ -64,6 +89,16 @@ and a boolean to check if the value has been set. SetContentType sets ContentType field to given value. +### SetContentTypeNil + +`func (o *ArtifactOut) SetContentTypeNil(b bool)` + + SetContentTypeNil sets the value for ContentType to be an explicit nil + +### UnsetContentType +`func (o *ArtifactOut) UnsetContentType()` + +UnsetContentType ensures that no value is present for ContentType, not even an explicit nil ### GetCreatedAt `func (o *ArtifactOut) GetCreatedAt() time.Time` @@ -84,121 +119,106 @@ and a boolean to check if the value has been set. SetCreatedAt sets CreatedAt field to given value. -### GetDriveId +### GetDeletedAt -`func (o *ArtifactOut) GetDriveId() string` +`func (o *ArtifactOut) GetDeletedAt() time.Time` -GetDriveId returns the DriveId field if non-nil, zero value otherwise. +GetDeletedAt returns the DeletedAt field if non-nil, zero value otherwise. -### GetDriveIdOk +### GetDeletedAtOk -`func (o *ArtifactOut) GetDriveIdOk() (*string, bool)` +`func (o *ArtifactOut) GetDeletedAtOk() (*time.Time, bool)` -GetDriveIdOk returns a tuple with the DriveId field if it's non-nil, zero value otherwise +GetDeletedAtOk returns a tuple with the DeletedAt field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetDriveId - -`func (o *ArtifactOut) SetDriveId(v string)` - -SetDriveId sets DriveId field to given value. +### SetDeletedAt +`func (o *ArtifactOut) SetDeletedAt(v time.Time)` -### GetEmbeddedAt +SetDeletedAt sets DeletedAt field to given value. -`func (o *ArtifactOut) GetEmbeddedAt() time.Time` -GetEmbeddedAt returns the EmbeddedAt field if non-nil, zero value otherwise. +### SetDeletedAtNil -### GetEmbeddedAtOk +`func (o *ArtifactOut) SetDeletedAtNil(b bool)` -`func (o *ArtifactOut) GetEmbeddedAtOk() (*time.Time, bool)` + SetDeletedAtNil sets the value for DeletedAt to be an explicit nil -GetEmbeddedAtOk returns a tuple with the EmbeddedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. +### UnsetDeletedAt +`func (o *ArtifactOut) UnsetDeletedAt()` -### SetEmbeddedAt +UnsetDeletedAt ensures that no value is present for DeletedAt, not even an explicit nil +### GetDriveId -`func (o *ArtifactOut) SetEmbeddedAt(v time.Time)` +`func (o *ArtifactOut) GetDriveId() string` -SetEmbeddedAt sets EmbeddedAt field to given value. +GetDriveId returns the DriveId field if non-nil, zero value otherwise. -### HasEmbeddedAt +### GetDriveIdOk -`func (o *ArtifactOut) HasEmbeddedAt() bool` +`func (o *ArtifactOut) GetDriveIdOk() (*string, bool)` -HasEmbeddedAt returns a boolean if a field has been set. +GetDriveIdOk returns a tuple with the DriveId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. -### SetEmbeddedAtNil +### SetDriveId -`func (o *ArtifactOut) SetEmbeddedAtNil(b bool)` +`func (o *ArtifactOut) SetDriveId(v string)` - SetEmbeddedAtNil sets the value for EmbeddedAt to be an explicit nil +SetDriveId sets DriveId field to given value. -### UnsetEmbeddedAt -`func (o *ArtifactOut) UnsetEmbeddedAt()` -UnsetEmbeddedAt ensures that no value is present for EmbeddedAt, not even an explicit nil -### GetEtag +### GetEffectiveVisibility -`func (o *ArtifactOut) GetEtag() string` +`func (o *ArtifactOut) GetEffectiveVisibility() string` -GetEtag returns the Etag field if non-nil, zero value otherwise. +GetEffectiveVisibility returns the EffectiveVisibility field if non-nil, zero value otherwise. -### GetEtagOk +### GetEffectiveVisibilityOk -`func (o *ArtifactOut) GetEtagOk() (*string, bool)` +`func (o *ArtifactOut) GetEffectiveVisibilityOk() (*string, bool)` -GetEtagOk returns a tuple with the Etag field if it's non-nil, zero value otherwise +GetEffectiveVisibilityOk returns a tuple with the EffectiveVisibility field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetEtag +### SetEffectiveVisibility -`func (o *ArtifactOut) SetEtag(v string)` +`func (o *ArtifactOut) SetEffectiveVisibility(v string)` -SetEtag sets Etag field to given value. +SetEffectiveVisibility sets EffectiveVisibility field to given value. -### GetFileType +### GetHeadVersionId -`func (o *ArtifactOut) GetFileType() string` +`func (o *ArtifactOut) GetHeadVersionId() string` -GetFileType returns the FileType field if non-nil, zero value otherwise. +GetHeadVersionId returns the HeadVersionId field if non-nil, zero value otherwise. -### GetFileTypeOk +### GetHeadVersionIdOk -`func (o *ArtifactOut) GetFileTypeOk() (*string, bool)` +`func (o *ArtifactOut) GetHeadVersionIdOk() (*string, bool)` -GetFileTypeOk returns a tuple with the FileType field if it's non-nil, zero value otherwise +GetHeadVersionIdOk returns a tuple with the HeadVersionId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetFileType +### SetHeadVersionId -`func (o *ArtifactOut) SetFileType(v string)` +`func (o *ArtifactOut) SetHeadVersionId(v string)` -SetFileType sets FileType field to given value. +SetHeadVersionId sets HeadVersionId field to given value. -### GetHash +### SetHeadVersionIdNil -`func (o *ArtifactOut) GetHash() string` +`func (o *ArtifactOut) SetHeadVersionIdNil(b bool)` -GetHash returns the Hash field if non-nil, zero value otherwise. - -### GetHashOk - -`func (o *ArtifactOut) GetHashOk() (*string, bool)` - -GetHashOk returns a tuple with the Hash field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetHash - -`func (o *ArtifactOut) SetHash(v string)` - -SetHash sets Hash field to given value. + SetHeadVersionIdNil sets the value for HeadVersionId to be an explicit nil +### UnsetHeadVersionId +`func (o *ArtifactOut) UnsetHeadVersionId()` +UnsetHeadVersionId ensures that no value is present for HeadVersionId, not even an explicit nil ### GetId `func (o *ArtifactOut) GetId() string` @@ -219,41 +239,6 @@ and a boolean to check if the value has been set. SetId sets Id field to given value. -### GetIndexedAt - -`func (o *ArtifactOut) GetIndexedAt() time.Time` - -GetIndexedAt returns the IndexedAt field if non-nil, zero value otherwise. - -### GetIndexedAtOk - -`func (o *ArtifactOut) GetIndexedAtOk() (*time.Time, bool)` - -GetIndexedAtOk returns a tuple with the IndexedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIndexedAt - -`func (o *ArtifactOut) SetIndexedAt(v time.Time)` - -SetIndexedAt sets IndexedAt field to given value. - -### HasIndexedAt - -`func (o *ArtifactOut) HasIndexedAt() bool` - -HasIndexedAt returns a boolean if a field has been set. - -### SetIndexedAtNil - -`func (o *ArtifactOut) SetIndexedAtNil(b bool)` - - SetIndexedAtNil sets the value for IndexedAt to be an explicit nil - -### UnsetIndexedAt -`func (o *ArtifactOut) UnsetIndexedAt()` - -UnsetIndexedAt ensures that no value is present for IndexedAt, not even an explicit nil ### GetLabels `func (o *ArtifactOut) GetLabels() []string` @@ -273,47 +258,7 @@ and a boolean to check if the value has been set. SetLabels sets Labels field to given value. -### HasLabels -`func (o *ArtifactOut) HasLabels() bool` - -HasLabels returns a boolean if a field has been set. - -### GetLlmIndex - -`func (o *ArtifactOut) GetLlmIndex() map[string]interface{}` - -GetLlmIndex returns the LlmIndex field if non-nil, zero value otherwise. - -### GetLlmIndexOk - -`func (o *ArtifactOut) GetLlmIndexOk() (*map[string]interface{}, bool)` - -GetLlmIndexOk returns a tuple with the LlmIndex field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLlmIndex - -`func (o *ArtifactOut) SetLlmIndex(v map[string]interface{})` - -SetLlmIndex sets LlmIndex field to given value. - -### HasLlmIndex - -`func (o *ArtifactOut) HasLlmIndex() bool` - -HasLlmIndex returns a boolean if a field has been set. - -### SetLlmIndexNil - -`func (o *ArtifactOut) SetLlmIndexNil(b bool)` - - SetLlmIndexNil sets the value for LlmIndex to be an explicit nil - -### UnsetLlmIndex -`func (o *ArtifactOut) UnsetLlmIndex()` - -UnsetLlmIndex ensures that no value is present for LlmIndex, not even an explicit nil ### GetMetadata `func (o *ArtifactOut) GetMetadata() map[string]interface{}` @@ -333,132 +278,87 @@ and a boolean to check if the value has been set. SetMetadata sets Metadata field to given value. -### HasMetadata - -`func (o *ArtifactOut) HasMetadata() bool` - -HasMetadata returns a boolean if a field has been set. - -### GetMetageneration - -`func (o *ArtifactOut) GetMetageneration() int32` - -GetMetageneration returns the Metageneration field if non-nil, zero value otherwise. - -### GetMetagenerationOk - -`func (o *ArtifactOut) GetMetagenerationOk() (*int32, bool)` - -GetMetagenerationOk returns a tuple with the Metageneration field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMetageneration - -`func (o *ArtifactOut) SetMetageneration(v int32)` - -SetMetageneration sets Metageneration field to given value. - -### HasMetageneration -`func (o *ArtifactOut) HasMetageneration() bool` +### GetName -HasMetageneration returns a boolean if a field has been set. +`func (o *ArtifactOut) GetName() string` -### GetPath +GetName returns the Name field if non-nil, zero value otherwise. -`func (o *ArtifactOut) GetPath() string` +### GetNameOk -GetPath returns the Path field if non-nil, zero value otherwise. +`func (o *ArtifactOut) GetNameOk() (*string, bool)` -### GetPathOk - -`func (o *ArtifactOut) GetPathOk() (*string, bool)` - -GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetPath +### SetName -`func (o *ArtifactOut) SetPath(v string)` +`func (o *ArtifactOut) SetName(v string)` -SetPath sets Path field to given value. +SetName sets Name field to given value. -### GetPermalink +### GetParentId -`func (o *ArtifactOut) GetPermalink() string` +`func (o *ArtifactOut) GetParentId() string` -GetPermalink returns the Permalink field if non-nil, zero value otherwise. +GetParentId returns the ParentId field if non-nil, zero value otherwise. -### GetPermalinkOk +### GetParentIdOk -`func (o *ArtifactOut) GetPermalinkOk() (*string, bool)` +`func (o *ArtifactOut) GetParentIdOk() (*string, bool)` -GetPermalinkOk returns a tuple with the Permalink field if it's non-nil, zero value otherwise +GetParentIdOk returns a tuple with the ParentId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetPermalink +### SetParentId -`func (o *ArtifactOut) SetPermalink(v string)` +`func (o *ArtifactOut) SetParentId(v string)` -SetPermalink sets Permalink field to given value. +SetParentId sets ParentId field to given value. -### GetSizeBytes +### GetRevision -`func (o *ArtifactOut) GetSizeBytes() int32` +`func (o *ArtifactOut) GetRevision() string` -GetSizeBytes returns the SizeBytes field if non-nil, zero value otherwise. +GetRevision returns the Revision field if non-nil, zero value otherwise. -### GetSizeBytesOk +### GetRevisionOk -`func (o *ArtifactOut) GetSizeBytesOk() (*int32, bool)` +`func (o *ArtifactOut) GetRevisionOk() (*string, bool)` -GetSizeBytesOk returns a tuple with the SizeBytes field if it's non-nil, zero value otherwise +GetRevisionOk returns a tuple with the Revision field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetSizeBytes +### SetRevision -`func (o *ArtifactOut) SetSizeBytes(v int32)` +`func (o *ArtifactOut) SetRevision(v string)` -SetSizeBytes sets SizeBytes field to given value. +SetRevision sets Revision field to given value. -### GetSource +### GetState -`func (o *ArtifactOut) GetSource() ArtifactSource` +`func (o *ArtifactOut) GetState() string` -GetSource returns the Source field if non-nil, zero value otherwise. +GetState returns the State field if non-nil, zero value otherwise. -### GetSourceOk +### GetStateOk -`func (o *ArtifactOut) GetSourceOk() (*ArtifactSource, bool)` +`func (o *ArtifactOut) GetStateOk() (*string, bool)` -GetSourceOk returns a tuple with the Source field if it's non-nil, zero value otherwise +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetSource - -`func (o *ArtifactOut) SetSource(v ArtifactSource)` - -SetSource sets Source field to given value. - -### HasSource - -`func (o *ArtifactOut) HasSource() bool` - -HasSource returns a boolean if a field has been set. - -### SetSourceNil +### SetState -`func (o *ArtifactOut) SetSourceNil(b bool)` +`func (o *ArtifactOut) SetState(v string)` - SetSourceNil sets the value for Source to be an explicit nil +SetState sets State field to given value. -### UnsetSource -`func (o *ArtifactOut) UnsetSource()` -UnsetSource ensures that no value is present for Source, not even an explicit nil ### GetUpdatedAt `func (o *ArtifactOut) GetUpdatedAt() time.Time` @@ -479,50 +379,5 @@ and a boolean to check if the value has been set. SetUpdatedAt sets UpdatedAt field to given value. -### GetUrl - -`func (o *ArtifactOut) GetUrl() string` - -GetUrl returns the Url field if non-nil, zero value otherwise. - -### GetUrlOk - -`func (o *ArtifactOut) GetUrlOk() (*string, bool)` - -GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUrl - -`func (o *ArtifactOut) SetUrl(v string)` - -SetUrl sets Url field to given value. - - -### GetVersionNumber - -`func (o *ArtifactOut) GetVersionNumber() int32` - -GetVersionNumber returns the VersionNumber field if non-nil, zero value otherwise. - -### GetVersionNumberOk - -`func (o *ArtifactOut) GetVersionNumberOk() (*int32, bool)` - -GetVersionNumberOk returns a tuple with the VersionNumber field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVersionNumber - -`func (o *ArtifactOut) SetVersionNumber(v int32)` - -SetVersionNumber sets VersionNumber field to given value. - -### HasVersionNumber - -`func (o *ArtifactOut) HasVersionNumber() bool` - -HasVersionNumber returns a boolean if a field has been set. - [[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/sdk/go/docs/ArtifactPatchIn.md b/sdk/go/docs/ArtifactPatchIn.md deleted file mode 100644 index 1a642a1..0000000 --- a/sdk/go/docs/ArtifactPatchIn.md +++ /dev/null @@ -1,136 +0,0 @@ -# ArtifactPatchIn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Labels** | Pointer to **[]string** | | [optional] -**Metadata** | Pointer to **map[string]interface{}** | | [optional] -**Source** | Pointer to [**NullableArtifactSource**](ArtifactSource.md) | | [optional] - -## Methods - -### NewArtifactPatchIn - -`func NewArtifactPatchIn() *ArtifactPatchIn` - -NewArtifactPatchIn instantiates a new ArtifactPatchIn object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewArtifactPatchInWithDefaults - -`func NewArtifactPatchInWithDefaults() *ArtifactPatchIn` - -NewArtifactPatchInWithDefaults instantiates a new ArtifactPatchIn object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetLabels - -`func (o *ArtifactPatchIn) GetLabels() []string` - -GetLabels returns the Labels field if non-nil, zero value otherwise. - -### GetLabelsOk - -`func (o *ArtifactPatchIn) GetLabelsOk() (*[]string, bool)` - -GetLabelsOk returns a tuple with the Labels field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLabels - -`func (o *ArtifactPatchIn) SetLabels(v []string)` - -SetLabels sets Labels field to given value. - -### HasLabels - -`func (o *ArtifactPatchIn) HasLabels() bool` - -HasLabels returns a boolean if a field has been set. - -### SetLabelsNil - -`func (o *ArtifactPatchIn) SetLabelsNil(b bool)` - - SetLabelsNil sets the value for Labels to be an explicit nil - -### UnsetLabels -`func (o *ArtifactPatchIn) UnsetLabels()` - -UnsetLabels ensures that no value is present for Labels, not even an explicit nil -### GetMetadata - -`func (o *ArtifactPatchIn) GetMetadata() map[string]interface{}` - -GetMetadata returns the Metadata field if non-nil, zero value otherwise. - -### GetMetadataOk - -`func (o *ArtifactPatchIn) GetMetadataOk() (*map[string]interface{}, bool)` - -GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMetadata - -`func (o *ArtifactPatchIn) SetMetadata(v map[string]interface{})` - -SetMetadata sets Metadata field to given value. - -### HasMetadata - -`func (o *ArtifactPatchIn) HasMetadata() bool` - -HasMetadata returns a boolean if a field has been set. - -### SetMetadataNil - -`func (o *ArtifactPatchIn) SetMetadataNil(b bool)` - - SetMetadataNil sets the value for Metadata to be an explicit nil - -### UnsetMetadata -`func (o *ArtifactPatchIn) UnsetMetadata()` - -UnsetMetadata ensures that no value is present for Metadata, not even an explicit nil -### GetSource - -`func (o *ArtifactPatchIn) GetSource() ArtifactSource` - -GetSource returns the Source field if non-nil, zero value otherwise. - -### GetSourceOk - -`func (o *ArtifactPatchIn) GetSourceOk() (*ArtifactSource, bool)` - -GetSourceOk returns a tuple with the Source field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSource - -`func (o *ArtifactPatchIn) SetSource(v ArtifactSource)` - -SetSource sets Source field to given value. - -### HasSource - -`func (o *ArtifactPatchIn) HasSource() bool` - -HasSource returns a boolean if a field has been set. - -### SetSourceNil - -`func (o *ArtifactPatchIn) SetSourceNil(b bool)` - - SetSourceNil sets the value for Source to be an explicit nil - -### UnsetSource -`func (o *ArtifactPatchIn) UnsetSource()` - -UnsetSource ensures that no value is present for Source, not even an explicit nil - -[[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/sdk/go/docs/ArtifactSource.md b/sdk/go/docs/ArtifactSource.md deleted file mode 100644 index 2544a19..0000000 --- a/sdk/go/docs/ArtifactSource.md +++ /dev/null @@ -1,54 +0,0 @@ -# ArtifactSource - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Refs** | Pointer to [**[]SourceRef**](SourceRef.md) | | [optional] - -## Methods - -### NewArtifactSource - -`func NewArtifactSource() *ArtifactSource` - -NewArtifactSource instantiates a new ArtifactSource object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewArtifactSourceWithDefaults - -`func NewArtifactSourceWithDefaults() *ArtifactSource` - -NewArtifactSourceWithDefaults instantiates a new ArtifactSource object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetRefs - -`func (o *ArtifactSource) GetRefs() []SourceRef` - -GetRefs returns the Refs field if non-nil, zero value otherwise. - -### GetRefsOk - -`func (o *ArtifactSource) GetRefsOk() (*[]SourceRef, bool)` - -GetRefsOk returns a tuple with the Refs field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRefs - -`func (o *ArtifactSource) SetRefs(v []SourceRef)` - -SetRefs sets Refs field to given value. - -### HasRefs - -`func (o *ArtifactSource) HasRefs() bool` - -HasRefs returns a boolean if a field has been set. - - -[[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/sdk/go/docs/ArtifactUpdateIn.md b/sdk/go/docs/ArtifactUpdateIn.md new file mode 100644 index 0000000..d521d17 --- /dev/null +++ b/sdk/go/docs/ArtifactUpdateIn.md @@ -0,0 +1,172 @@ +# ArtifactUpdateIn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Labels** | Pointer to **[]string** | | [optional] +**Metadata** | Pointer to **map[string]interface{}** | | [optional] +**Name** | Pointer to **NullableString** | | [optional] +**ParentId** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewArtifactUpdateIn + +`func NewArtifactUpdateIn() *ArtifactUpdateIn` + +NewArtifactUpdateIn instantiates a new ArtifactUpdateIn object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewArtifactUpdateInWithDefaults + +`func NewArtifactUpdateInWithDefaults() *ArtifactUpdateIn` + +NewArtifactUpdateInWithDefaults instantiates a new ArtifactUpdateIn object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetLabels + +`func (o *ArtifactUpdateIn) GetLabels() []string` + +GetLabels returns the Labels field if non-nil, zero value otherwise. + +### GetLabelsOk + +`func (o *ArtifactUpdateIn) GetLabelsOk() (*[]string, bool)` + +GetLabelsOk returns a tuple with the Labels field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLabels + +`func (o *ArtifactUpdateIn) SetLabels(v []string)` + +SetLabels sets Labels field to given value. + +### HasLabels + +`func (o *ArtifactUpdateIn) HasLabels() bool` + +HasLabels returns a boolean if a field has been set. + +### SetLabelsNil + +`func (o *ArtifactUpdateIn) SetLabelsNil(b bool)` + + SetLabelsNil sets the value for Labels to be an explicit nil + +### UnsetLabels +`func (o *ArtifactUpdateIn) UnsetLabels()` + +UnsetLabels ensures that no value is present for Labels, not even an explicit nil +### GetMetadata + +`func (o *ArtifactUpdateIn) GetMetadata() map[string]interface{}` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *ArtifactUpdateIn) GetMetadataOk() (*map[string]interface{}, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *ArtifactUpdateIn) SetMetadata(v map[string]interface{})` + +SetMetadata sets Metadata field to given value. + +### HasMetadata + +`func (o *ArtifactUpdateIn) HasMetadata() bool` + +HasMetadata returns a boolean if a field has been set. + +### SetMetadataNil + +`func (o *ArtifactUpdateIn) SetMetadataNil(b bool)` + + SetMetadataNil sets the value for Metadata to be an explicit nil + +### UnsetMetadata +`func (o *ArtifactUpdateIn) UnsetMetadata()` + +UnsetMetadata ensures that no value is present for Metadata, not even an explicit nil +### GetName + +`func (o *ArtifactUpdateIn) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *ArtifactUpdateIn) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *ArtifactUpdateIn) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *ArtifactUpdateIn) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetNameNil + +`func (o *ArtifactUpdateIn) SetNameNil(b bool)` + + SetNameNil sets the value for Name to be an explicit nil + +### UnsetName +`func (o *ArtifactUpdateIn) UnsetName()` + +UnsetName ensures that no value is present for Name, not even an explicit nil +### GetParentId + +`func (o *ArtifactUpdateIn) GetParentId() string` + +GetParentId returns the ParentId field if non-nil, zero value otherwise. + +### GetParentIdOk + +`func (o *ArtifactUpdateIn) GetParentIdOk() (*string, bool)` + +GetParentIdOk returns a tuple with the ParentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParentId + +`func (o *ArtifactUpdateIn) SetParentId(v string)` + +SetParentId sets ParentId field to given value. + +### HasParentId + +`func (o *ArtifactUpdateIn) HasParentId() bool` + +HasParentId returns a boolean if a field has been set. + +### SetParentIdNil + +`func (o *ArtifactUpdateIn) SetParentIdNil(b bool)` + + SetParentIdNil sets the value for ParentId to be an explicit nil + +### UnsetParentId +`func (o *ArtifactUpdateIn) UnsetParentId()` + +UnsetParentId ensures that no value is present for ParentId, not even an explicit nil + +[[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/sdk/go/docs/ArtifactsAPI.md b/sdk/go/docs/ArtifactsAPI.md new file mode 100644 index 0000000..d63e94e --- /dev/null +++ b/sdk/go/docs/ArtifactsAPI.md @@ -0,0 +1,666 @@ +# \ArtifactsAPI + +All URIs are relative to *https://api.agentdrive.run* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ArtifactsContent**](ArtifactsAPI.md#ArtifactsContent) | **Get** /v0/drives/{drive_id}/artifacts/{artifact_id}/content | Read Artifact Content +[**ArtifactsCopy**](ArtifactsAPI.md#ArtifactsCopy) | **Post** /v0/drives/{drive_id}/artifacts/{artifact_id}/copy | Copy Artifact +[**ArtifactsCreate**](ArtifactsAPI.md#ArtifactsCreate) | **Post** /v0/drives/{drive_id}/artifacts | Create Artifact +[**ArtifactsDelete**](ArtifactsAPI.md#ArtifactsDelete) | **Delete** /v0/drives/{drive_id}/artifacts/{artifact_id} | Delete Artifact +[**ArtifactsList**](ArtifactsAPI.md#ArtifactsList) | **Get** /v0/drives/{drive_id}/artifacts | List Artifacts +[**ArtifactsRead**](ArtifactsAPI.md#ArtifactsRead) | **Get** /v0/drives/{drive_id}/artifacts/{artifact_id} | Read Artifact +[**ArtifactsRestore**](ArtifactsAPI.md#ArtifactsRestore) | **Post** /v0/drives/{drive_id}/artifacts/{artifact_id}/restore | Restore Artifact +[**ArtifactsUpdate**](ArtifactsAPI.md#ArtifactsUpdate) | **Patch** /v0/drives/{drive_id}/artifacts/{artifact_id} | Update Artifact + + + +## ArtifactsContent + +> *os.File ArtifactsContent(ctx, driveId, artifactId).IfNoneMatch(ifNoneMatch).Authorization(authorization).Execute() + +Read Artifact Content + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + artifactId := "artifactId_example" // string | + ifNoneMatch := "ifNoneMatch_example" // string | (optional) + authorization := "authorization_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ArtifactsAPI.ArtifactsContent(context.Background(), driveId, artifactId).IfNoneMatch(ifNoneMatch).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ArtifactsAPI.ArtifactsContent``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ArtifactsContent`: *os.File + fmt.Fprintf(os.Stdout, "Response from `ArtifactsAPI.ArtifactsContent`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | +**artifactId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiArtifactsContentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **ifNoneMatch** | **string** | | + **authorization** | **string** | | + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/octet-stream, 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) + + +## ArtifactsCopy + +> ArtifactOut ArtifactsCopy(ctx, driveId, artifactId).IdempotencyKey(idempotencyKey).ArtifactCopyIn(artifactCopyIn).IfMatch(ifMatch).Authorization(authorization).Execute() + +Copy Artifact + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + artifactId := "artifactId_example" // string | + idempotencyKey := "idempotencyKey_example" // string | + artifactCopyIn := *openapiclient.NewArtifactCopyIn("DestinationName_example", "DestinationParentId_example") // ArtifactCopyIn | + ifMatch := "ifMatch_example" // string | (optional) + authorization := "authorization_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ArtifactsAPI.ArtifactsCopy(context.Background(), driveId, artifactId).IdempotencyKey(idempotencyKey).ArtifactCopyIn(artifactCopyIn).IfMatch(ifMatch).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ArtifactsAPI.ArtifactsCopy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ArtifactsCopy`: ArtifactOut + fmt.Fprintf(os.Stdout, "Response from `ArtifactsAPI.ArtifactsCopy`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | +**artifactId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiArtifactsCopyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **idempotencyKey** | **string** | | + **artifactCopyIn** | [**ArtifactCopyIn**](ArtifactCopyIn.md) | | + **ifMatch** | **string** | | + **authorization** | **string** | | + +### Return type + +[**ArtifactOut**](ArtifactOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **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) + + +## ArtifactsCreate + +> ArtifactOut ArtifactsCreate(ctx, driveId).IdempotencyKey(idempotencyKey).Content(content).Name(name).ParentId(parentId).Authorization(authorization).ContentType(contentType).Metadata(metadata).Sha256(sha256).Execute() + +Create Artifact + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + idempotencyKey := "idempotencyKey_example" // string | + content := os.NewFile(1234, "some_file") // *os.File | The artifact bytes. + name := "name_example" // string | Artifact name. + parentId := "parentId_example" // string | Destination folder id (fld_*). + authorization := "authorization_example" // string | (optional) + contentType := "contentType_example" // string | Declared media type. (optional) + metadata := map[string]interface{}{ ... } // map[string]interface{} | Free-form JSON metadata. (optional) + sha256 := "sha256_example" // string | Optional content sha256 for verification. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ArtifactsAPI.ArtifactsCreate(context.Background(), driveId).IdempotencyKey(idempotencyKey).Content(content).Name(name).ParentId(parentId).Authorization(authorization).ContentType(contentType).Metadata(metadata).Sha256(sha256).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ArtifactsAPI.ArtifactsCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ArtifactsCreate`: ArtifactOut + fmt.Fprintf(os.Stdout, "Response from `ArtifactsAPI.ArtifactsCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiArtifactsCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **idempotencyKey** | **string** | | + **content** | ***os.File** | The artifact bytes. | + **name** | **string** | Artifact name. | + **parentId** | **string** | Destination folder id (fld_*). | + **authorization** | **string** | | + **contentType** | **string** | Declared media type. | + **metadata** | [**map[string]interface{}**](map[string]interface{}.md) | Free-form JSON metadata. | + **sha256** | **string** | Optional content sha256 for verification. | + +### Return type + +[**ArtifactOut**](ArtifactOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **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) + + +## ArtifactsDelete + +> ArtifactOut ArtifactsDelete(ctx, driveId, artifactId).IdempotencyKey(idempotencyKey).IfMatch(ifMatch).Authorization(authorization).Execute() + +Delete Artifact + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + artifactId := "artifactId_example" // string | + idempotencyKey := "idempotencyKey_example" // string | + ifMatch := "ifMatch_example" // string | + authorization := "authorization_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ArtifactsAPI.ArtifactsDelete(context.Background(), driveId, artifactId).IdempotencyKey(idempotencyKey).IfMatch(ifMatch).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ArtifactsAPI.ArtifactsDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ArtifactsDelete`: ArtifactOut + fmt.Fprintf(os.Stdout, "Response from `ArtifactsAPI.ArtifactsDelete`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | +**artifactId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiArtifactsDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **idempotencyKey** | **string** | | + **ifMatch** | **string** | | + **authorization** | **string** | | + +### Return type + +[**ArtifactOut**](ArtifactOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### 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) + + +## ArtifactsList + +> ArtifactListOut ArtifactsList(ctx, driveId).Lifecycle(lifecycle).Limit(limit).Cursor(cursor).ParentId(parentId).Name(name).ContentType(contentType).Label(label).UpdatedAfter(updatedAfter).UpdatedBefore(updatedBefore).Authorization(authorization).Execute() + +List Artifacts + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + lifecycle := "lifecycle_example" // string | (optional) (default to "active") + limit := int32(56) // int32 | (optional) + cursor := "cursor_example" // string | (optional) + parentId := "parentId_example" // string | (optional) + name := "name_example" // string | (optional) + contentType := "contentType_example" // string | (optional) + label := "label_example" // string | (optional) + updatedAfter := time.Now() // time.Time | (optional) + updatedBefore := time.Now() // time.Time | (optional) + authorization := "authorization_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ArtifactsAPI.ArtifactsList(context.Background(), driveId).Lifecycle(lifecycle).Limit(limit).Cursor(cursor).ParentId(parentId).Name(name).ContentType(contentType).Label(label).UpdatedAfter(updatedAfter).UpdatedBefore(updatedBefore).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ArtifactsAPI.ArtifactsList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ArtifactsList`: ArtifactListOut + fmt.Fprintf(os.Stdout, "Response from `ArtifactsAPI.ArtifactsList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiArtifactsListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **lifecycle** | **string** | | [default to "active"] + **limit** | **int32** | | + **cursor** | **string** | | + **parentId** | **string** | | + **name** | **string** | | + **contentType** | **string** | | + **label** | **string** | | + **updatedAfter** | **time.Time** | | + **updatedBefore** | **time.Time** | | + **authorization** | **string** | | + +### Return type + +[**ArtifactListOut**](ArtifactListOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### 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) + + +## ArtifactsRead + +> ArtifactOut ArtifactsRead(ctx, driveId, artifactId).IfNoneMatch(ifNoneMatch).Authorization(authorization).Execute() + +Read Artifact + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + artifactId := "artifactId_example" // string | + ifNoneMatch := "ifNoneMatch_example" // string | (optional) + authorization := "authorization_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ArtifactsAPI.ArtifactsRead(context.Background(), driveId, artifactId).IfNoneMatch(ifNoneMatch).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ArtifactsAPI.ArtifactsRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ArtifactsRead`: ArtifactOut + fmt.Fprintf(os.Stdout, "Response from `ArtifactsAPI.ArtifactsRead`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | +**artifactId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiArtifactsReadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **ifNoneMatch** | **string** | | + **authorization** | **string** | | + +### Return type + +[**ArtifactOut**](ArtifactOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### 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) + + +## ArtifactsRestore + +> ArtifactOut ArtifactsRestore(ctx, driveId, artifactId).IdempotencyKey(idempotencyKey).IfMatch(ifMatch).Authorization(authorization).Execute() + +Restore Artifact + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + artifactId := "artifactId_example" // string | + idempotencyKey := "idempotencyKey_example" // string | + ifMatch := "ifMatch_example" // string | + authorization := "authorization_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ArtifactsAPI.ArtifactsRestore(context.Background(), driveId, artifactId).IdempotencyKey(idempotencyKey).IfMatch(ifMatch).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ArtifactsAPI.ArtifactsRestore``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ArtifactsRestore`: ArtifactOut + fmt.Fprintf(os.Stdout, "Response from `ArtifactsAPI.ArtifactsRestore`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | +**artifactId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiArtifactsRestoreRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **idempotencyKey** | **string** | | + **ifMatch** | **string** | | + **authorization** | **string** | | + +### Return type + +[**ArtifactOut**](ArtifactOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### 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) + + +## ArtifactsUpdate + +> ArtifactOut ArtifactsUpdate(ctx, driveId, artifactId).IdempotencyKey(idempotencyKey).IfMatch(ifMatch).ArtifactUpdateIn(artifactUpdateIn).Authorization(authorization).Execute() + +Update Artifact + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + artifactId := "artifactId_example" // string | + idempotencyKey := "idempotencyKey_example" // string | + ifMatch := "ifMatch_example" // string | + artifactUpdateIn := *openapiclient.NewArtifactUpdateIn() // ArtifactUpdateIn | + authorization := "authorization_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ArtifactsAPI.ArtifactsUpdate(context.Background(), driveId, artifactId).IdempotencyKey(idempotencyKey).IfMatch(ifMatch).ArtifactUpdateIn(artifactUpdateIn).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ArtifactsAPI.ArtifactsUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ArtifactsUpdate`: ArtifactOut + fmt.Fprintf(os.Stdout, "Response from `ArtifactsAPI.ArtifactsUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | +**artifactId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiArtifactsUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **idempotencyKey** | **string** | | + **ifMatch** | **string** | | + **artifactUpdateIn** | [**ArtifactUpdateIn**](ArtifactUpdateIn.md) | | + **authorization** | **string** | | + +### Return type + +[**ArtifactOut**](ArtifactOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **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) diff --git a/sdk/go/docs/AuthorizationServerMetadataOut.md b/sdk/go/docs/AuthorizationServerMetadataOut.md deleted file mode 100644 index 6a6b68e..0000000 --- a/sdk/go/docs/AuthorizationServerMetadataOut.md +++ /dev/null @@ -1,343 +0,0 @@ -# AuthorizationServerMetadataOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AgentAuth** | [**AgentAuthMetadataOut**](AgentAuthMetadataOut.md) | | -**AuthorizationEndpoint** | **string** | | -**AuthorizationResponseIssParameterSupported** | **bool** | | -**CodeChallengeMethodsSupported** | **[]string** | | -**GrantTypesSupported** | **[]string** | | -**Issuer** | **string** | | -**JwksUri** | **string** | | -**RegistrationEndpoint** | **string** | | -**ResponseModesSupported** | **[]string** | | -**ResponseTypesSupported** | **[]string** | | -**RevocationEndpoint** | **string** | | -**RevocationEndpointAuthMethodsSupported** | **[]string** | | -**ScopesSupported** | **[]string** | | -**TokenEndpoint** | **string** | | -**TokenEndpointAuthMethodsSupported** | **[]string** | | - -## Methods - -### NewAuthorizationServerMetadataOut - -`func NewAuthorizationServerMetadataOut(agentAuth AgentAuthMetadataOut, authorizationEndpoint string, authorizationResponseIssParameterSupported bool, codeChallengeMethodsSupported []string, grantTypesSupported []string, issuer string, jwksUri string, registrationEndpoint string, responseModesSupported []string, responseTypesSupported []string, revocationEndpoint string, revocationEndpointAuthMethodsSupported []string, scopesSupported []string, tokenEndpoint string, tokenEndpointAuthMethodsSupported []string, ) *AuthorizationServerMetadataOut` - -NewAuthorizationServerMetadataOut instantiates a new AuthorizationServerMetadataOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewAuthorizationServerMetadataOutWithDefaults - -`func NewAuthorizationServerMetadataOutWithDefaults() *AuthorizationServerMetadataOut` - -NewAuthorizationServerMetadataOutWithDefaults instantiates a new AuthorizationServerMetadataOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetAgentAuth - -`func (o *AuthorizationServerMetadataOut) GetAgentAuth() AgentAuthMetadataOut` - -GetAgentAuth returns the AgentAuth field if non-nil, zero value otherwise. - -### GetAgentAuthOk - -`func (o *AuthorizationServerMetadataOut) GetAgentAuthOk() (*AgentAuthMetadataOut, bool)` - -GetAgentAuthOk returns a tuple with the AgentAuth field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAgentAuth - -`func (o *AuthorizationServerMetadataOut) SetAgentAuth(v AgentAuthMetadataOut)` - -SetAgentAuth sets AgentAuth field to given value. - - -### GetAuthorizationEndpoint - -`func (o *AuthorizationServerMetadataOut) GetAuthorizationEndpoint() string` - -GetAuthorizationEndpoint returns the AuthorizationEndpoint field if non-nil, zero value otherwise. - -### GetAuthorizationEndpointOk - -`func (o *AuthorizationServerMetadataOut) GetAuthorizationEndpointOk() (*string, bool)` - -GetAuthorizationEndpointOk returns a tuple with the AuthorizationEndpoint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuthorizationEndpoint - -`func (o *AuthorizationServerMetadataOut) SetAuthorizationEndpoint(v string)` - -SetAuthorizationEndpoint sets AuthorizationEndpoint field to given value. - - -### GetAuthorizationResponseIssParameterSupported - -`func (o *AuthorizationServerMetadataOut) GetAuthorizationResponseIssParameterSupported() bool` - -GetAuthorizationResponseIssParameterSupported returns the AuthorizationResponseIssParameterSupported field if non-nil, zero value otherwise. - -### GetAuthorizationResponseIssParameterSupportedOk - -`func (o *AuthorizationServerMetadataOut) GetAuthorizationResponseIssParameterSupportedOk() (*bool, bool)` - -GetAuthorizationResponseIssParameterSupportedOk returns a tuple with the AuthorizationResponseIssParameterSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuthorizationResponseIssParameterSupported - -`func (o *AuthorizationServerMetadataOut) SetAuthorizationResponseIssParameterSupported(v bool)` - -SetAuthorizationResponseIssParameterSupported sets AuthorizationResponseIssParameterSupported field to given value. - - -### GetCodeChallengeMethodsSupported - -`func (o *AuthorizationServerMetadataOut) GetCodeChallengeMethodsSupported() []string` - -GetCodeChallengeMethodsSupported returns the CodeChallengeMethodsSupported field if non-nil, zero value otherwise. - -### GetCodeChallengeMethodsSupportedOk - -`func (o *AuthorizationServerMetadataOut) GetCodeChallengeMethodsSupportedOk() (*[]string, bool)` - -GetCodeChallengeMethodsSupportedOk returns a tuple with the CodeChallengeMethodsSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCodeChallengeMethodsSupported - -`func (o *AuthorizationServerMetadataOut) SetCodeChallengeMethodsSupported(v []string)` - -SetCodeChallengeMethodsSupported sets CodeChallengeMethodsSupported field to given value. - - -### GetGrantTypesSupported - -`func (o *AuthorizationServerMetadataOut) GetGrantTypesSupported() []string` - -GetGrantTypesSupported returns the GrantTypesSupported field if non-nil, zero value otherwise. - -### GetGrantTypesSupportedOk - -`func (o *AuthorizationServerMetadataOut) GetGrantTypesSupportedOk() (*[]string, bool)` - -GetGrantTypesSupportedOk returns a tuple with the GrantTypesSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetGrantTypesSupported - -`func (o *AuthorizationServerMetadataOut) SetGrantTypesSupported(v []string)` - -SetGrantTypesSupported sets GrantTypesSupported field to given value. - - -### GetIssuer - -`func (o *AuthorizationServerMetadataOut) GetIssuer() string` - -GetIssuer returns the Issuer field if non-nil, zero value otherwise. - -### GetIssuerOk - -`func (o *AuthorizationServerMetadataOut) GetIssuerOk() (*string, bool)` - -GetIssuerOk returns a tuple with the Issuer field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIssuer - -`func (o *AuthorizationServerMetadataOut) SetIssuer(v string)` - -SetIssuer sets Issuer field to given value. - - -### GetJwksUri - -`func (o *AuthorizationServerMetadataOut) GetJwksUri() string` - -GetJwksUri returns the JwksUri field if non-nil, zero value otherwise. - -### GetJwksUriOk - -`func (o *AuthorizationServerMetadataOut) GetJwksUriOk() (*string, bool)` - -GetJwksUriOk returns a tuple with the JwksUri field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetJwksUri - -`func (o *AuthorizationServerMetadataOut) SetJwksUri(v string)` - -SetJwksUri sets JwksUri field to given value. - - -### GetRegistrationEndpoint - -`func (o *AuthorizationServerMetadataOut) GetRegistrationEndpoint() string` - -GetRegistrationEndpoint returns the RegistrationEndpoint field if non-nil, zero value otherwise. - -### GetRegistrationEndpointOk - -`func (o *AuthorizationServerMetadataOut) GetRegistrationEndpointOk() (*string, bool)` - -GetRegistrationEndpointOk returns a tuple with the RegistrationEndpoint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRegistrationEndpoint - -`func (o *AuthorizationServerMetadataOut) SetRegistrationEndpoint(v string)` - -SetRegistrationEndpoint sets RegistrationEndpoint field to given value. - - -### GetResponseModesSupported - -`func (o *AuthorizationServerMetadataOut) GetResponseModesSupported() []string` - -GetResponseModesSupported returns the ResponseModesSupported field if non-nil, zero value otherwise. - -### GetResponseModesSupportedOk - -`func (o *AuthorizationServerMetadataOut) GetResponseModesSupportedOk() (*[]string, bool)` - -GetResponseModesSupportedOk returns a tuple with the ResponseModesSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetResponseModesSupported - -`func (o *AuthorizationServerMetadataOut) SetResponseModesSupported(v []string)` - -SetResponseModesSupported sets ResponseModesSupported field to given value. - - -### GetResponseTypesSupported - -`func (o *AuthorizationServerMetadataOut) GetResponseTypesSupported() []string` - -GetResponseTypesSupported returns the ResponseTypesSupported field if non-nil, zero value otherwise. - -### GetResponseTypesSupportedOk - -`func (o *AuthorizationServerMetadataOut) GetResponseTypesSupportedOk() (*[]string, bool)` - -GetResponseTypesSupportedOk returns a tuple with the ResponseTypesSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetResponseTypesSupported - -`func (o *AuthorizationServerMetadataOut) SetResponseTypesSupported(v []string)` - -SetResponseTypesSupported sets ResponseTypesSupported field to given value. - - -### GetRevocationEndpoint - -`func (o *AuthorizationServerMetadataOut) GetRevocationEndpoint() string` - -GetRevocationEndpoint returns the RevocationEndpoint field if non-nil, zero value otherwise. - -### GetRevocationEndpointOk - -`func (o *AuthorizationServerMetadataOut) GetRevocationEndpointOk() (*string, bool)` - -GetRevocationEndpointOk returns a tuple with the RevocationEndpoint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRevocationEndpoint - -`func (o *AuthorizationServerMetadataOut) SetRevocationEndpoint(v string)` - -SetRevocationEndpoint sets RevocationEndpoint field to given value. - - -### GetRevocationEndpointAuthMethodsSupported - -`func (o *AuthorizationServerMetadataOut) GetRevocationEndpointAuthMethodsSupported() []string` - -GetRevocationEndpointAuthMethodsSupported returns the RevocationEndpointAuthMethodsSupported field if non-nil, zero value otherwise. - -### GetRevocationEndpointAuthMethodsSupportedOk - -`func (o *AuthorizationServerMetadataOut) GetRevocationEndpointAuthMethodsSupportedOk() (*[]string, bool)` - -GetRevocationEndpointAuthMethodsSupportedOk returns a tuple with the RevocationEndpointAuthMethodsSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRevocationEndpointAuthMethodsSupported - -`func (o *AuthorizationServerMetadataOut) SetRevocationEndpointAuthMethodsSupported(v []string)` - -SetRevocationEndpointAuthMethodsSupported sets RevocationEndpointAuthMethodsSupported field to given value. - - -### GetScopesSupported - -`func (o *AuthorizationServerMetadataOut) GetScopesSupported() []string` - -GetScopesSupported returns the ScopesSupported field if non-nil, zero value otherwise. - -### GetScopesSupportedOk - -`func (o *AuthorizationServerMetadataOut) GetScopesSupportedOk() (*[]string, bool)` - -GetScopesSupportedOk returns a tuple with the ScopesSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetScopesSupported - -`func (o *AuthorizationServerMetadataOut) SetScopesSupported(v []string)` - -SetScopesSupported sets ScopesSupported field to given value. - - -### GetTokenEndpoint - -`func (o *AuthorizationServerMetadataOut) GetTokenEndpoint() string` - -GetTokenEndpoint returns the TokenEndpoint field if non-nil, zero value otherwise. - -### GetTokenEndpointOk - -`func (o *AuthorizationServerMetadataOut) GetTokenEndpointOk() (*string, bool)` - -GetTokenEndpointOk returns a tuple with the TokenEndpoint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTokenEndpoint - -`func (o *AuthorizationServerMetadataOut) SetTokenEndpoint(v string)` - -SetTokenEndpoint sets TokenEndpoint field to given value. - - -### GetTokenEndpointAuthMethodsSupported - -`func (o *AuthorizationServerMetadataOut) GetTokenEndpointAuthMethodsSupported() []string` - -GetTokenEndpointAuthMethodsSupported returns the TokenEndpointAuthMethodsSupported field if non-nil, zero value otherwise. - -### GetTokenEndpointAuthMethodsSupportedOk - -`func (o *AuthorizationServerMetadataOut) GetTokenEndpointAuthMethodsSupportedOk() (*[]string, bool)` - -GetTokenEndpointAuthMethodsSupportedOk returns a tuple with the TokenEndpointAuthMethodsSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTokenEndpointAuthMethodsSupported - -`func (o *AuthorizationServerMetadataOut) SetTokenEndpointAuthMethodsSupported(v []string)` - -SetTokenEndpointAuthMethodsSupported sets TokenEndpointAuthMethodsSupported field to given value. - - - -[[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/sdk/go/docs/AuthorizeDecisionOauth2AuthorizePost403Response.md b/sdk/go/docs/AuthorizeDecisionOauth2AuthorizePost403Response.md deleted file mode 100644 index 1cfef43..0000000 --- a/sdk/go/docs/AuthorizeDecisionOauth2AuthorizePost403Response.md +++ /dev/null @@ -1,96 +0,0 @@ -# AuthorizeDecisionOauth2AuthorizePost403Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Error** | **string** | | -**ErrorDescription** | Pointer to **string** | | [optional] -**Detail** | [**ErrorDetail**](ErrorDetail.md) | | - -## Methods - -### NewAuthorizeDecisionOauth2AuthorizePost403Response - -`func NewAuthorizeDecisionOauth2AuthorizePost403Response(error_ string, detail ErrorDetail, ) *AuthorizeDecisionOauth2AuthorizePost403Response` - -NewAuthorizeDecisionOauth2AuthorizePost403Response instantiates a new AuthorizeDecisionOauth2AuthorizePost403Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewAuthorizeDecisionOauth2AuthorizePost403ResponseWithDefaults - -`func NewAuthorizeDecisionOauth2AuthorizePost403ResponseWithDefaults() *AuthorizeDecisionOauth2AuthorizePost403Response` - -NewAuthorizeDecisionOauth2AuthorizePost403ResponseWithDefaults instantiates a new AuthorizeDecisionOauth2AuthorizePost403Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetError - -`func (o *AuthorizeDecisionOauth2AuthorizePost403Response) GetError() string` - -GetError returns the Error field if non-nil, zero value otherwise. - -### GetErrorOk - -`func (o *AuthorizeDecisionOauth2AuthorizePost403Response) GetErrorOk() (*string, bool)` - -GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetError - -`func (o *AuthorizeDecisionOauth2AuthorizePost403Response) SetError(v string)` - -SetError sets Error field to given value. - - -### GetErrorDescription - -`func (o *AuthorizeDecisionOauth2AuthorizePost403Response) GetErrorDescription() string` - -GetErrorDescription returns the ErrorDescription field if non-nil, zero value otherwise. - -### GetErrorDescriptionOk - -`func (o *AuthorizeDecisionOauth2AuthorizePost403Response) GetErrorDescriptionOk() (*string, bool)` - -GetErrorDescriptionOk returns a tuple with the ErrorDescription field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetErrorDescription - -`func (o *AuthorizeDecisionOauth2AuthorizePost403Response) SetErrorDescription(v string)` - -SetErrorDescription sets ErrorDescription field to given value. - -### HasErrorDescription - -`func (o *AuthorizeDecisionOauth2AuthorizePost403Response) HasErrorDescription() bool` - -HasErrorDescription returns a boolean if a field has been set. - -### GetDetail - -`func (o *AuthorizeDecisionOauth2AuthorizePost403Response) GetDetail() ErrorDetail` - -GetDetail returns the Detail field if non-nil, zero value otherwise. - -### GetDetailOk - -`func (o *AuthorizeDecisionOauth2AuthorizePost403Response) GetDetailOk() (*ErrorDetail, bool)` - -GetDetailOk returns a tuple with the Detail field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDetail - -`func (o *AuthorizeDecisionOauth2AuthorizePost403Response) SetDetail(v ErrorDetail)` - -SetDetail sets Detail field to given value. - - - -[[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/sdk/go/docs/ChangeActorOut.md b/sdk/go/docs/ChangeActorOut.md new file mode 100644 index 0000000..2d4c617 --- /dev/null +++ b/sdk/go/docs/ChangeActorOut.md @@ -0,0 +1,80 @@ +# ChangeActorOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **NullableString** | | +**Type** | **string** | | + +## Methods + +### NewChangeActorOut + +`func NewChangeActorOut(id NullableString, type_ string, ) *ChangeActorOut` + +NewChangeActorOut instantiates a new ChangeActorOut object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewChangeActorOutWithDefaults + +`func NewChangeActorOutWithDefaults() *ChangeActorOut` + +NewChangeActorOutWithDefaults instantiates a new ChangeActorOut object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ChangeActorOut) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ChangeActorOut) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ChangeActorOut) SetId(v string)` + +SetId sets Id field to given value. + + +### SetIdNil + +`func (o *ChangeActorOut) SetIdNil(b bool)` + + SetIdNil sets the value for Id to be an explicit nil + +### UnsetId +`func (o *ChangeActorOut) UnsetId()` + +UnsetId ensures that no value is present for Id, not even an explicit nil +### GetType + +`func (o *ChangeActorOut) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ChangeActorOut) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ChangeActorOut) SetType(v string)` + +SetType sets Type field to given value. + + + +[[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/sdk/go/docs/ChangeOut.md b/sdk/go/docs/ChangeOut.md new file mode 100644 index 0000000..d89c03b --- /dev/null +++ b/sdk/go/docs/ChangeOut.md @@ -0,0 +1,258 @@ +# ChangeOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Actor** | [**ChangeActorOut**](ChangeActorOut.md) | | +**ChangeSetId** | **string** | | +**Data** | **map[string]interface{}** | | +**DriveId** | **string** | | +**Id** | **string** | | +**OccurredAt** | **time.Time** | | +**PreviousRevision** | **NullableString** | | +**Resource** | [**ChangeResourceOut**](ChangeResourceOut.md) | | +**Revision** | **NullableString** | | +**Type** | **string** | | + +## Methods + +### NewChangeOut + +`func NewChangeOut(actor ChangeActorOut, changeSetId string, data map[string]interface{}, driveId string, id string, occurredAt time.Time, previousRevision NullableString, resource ChangeResourceOut, revision NullableString, type_ string, ) *ChangeOut` + +NewChangeOut instantiates a new ChangeOut object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewChangeOutWithDefaults + +`func NewChangeOutWithDefaults() *ChangeOut` + +NewChangeOutWithDefaults instantiates a new ChangeOut object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetActor + +`func (o *ChangeOut) GetActor() ChangeActorOut` + +GetActor returns the Actor field if non-nil, zero value otherwise. + +### GetActorOk + +`func (o *ChangeOut) GetActorOk() (*ChangeActorOut, bool)` + +GetActorOk returns a tuple with the Actor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetActor + +`func (o *ChangeOut) SetActor(v ChangeActorOut)` + +SetActor sets Actor field to given value. + + +### GetChangeSetId + +`func (o *ChangeOut) GetChangeSetId() string` + +GetChangeSetId returns the ChangeSetId field if non-nil, zero value otherwise. + +### GetChangeSetIdOk + +`func (o *ChangeOut) GetChangeSetIdOk() (*string, bool)` + +GetChangeSetIdOk returns a tuple with the ChangeSetId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetChangeSetId + +`func (o *ChangeOut) SetChangeSetId(v string)` + +SetChangeSetId sets ChangeSetId field to given value. + + +### GetData + +`func (o *ChangeOut) GetData() map[string]interface{}` + +GetData returns the Data field if non-nil, zero value otherwise. + +### GetDataOk + +`func (o *ChangeOut) GetDataOk() (*map[string]interface{}, bool)` + +GetDataOk returns a tuple with the Data field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetData + +`func (o *ChangeOut) SetData(v map[string]interface{})` + +SetData sets Data field to given value. + + +### GetDriveId + +`func (o *ChangeOut) GetDriveId() string` + +GetDriveId returns the DriveId field if non-nil, zero value otherwise. + +### GetDriveIdOk + +`func (o *ChangeOut) GetDriveIdOk() (*string, bool)` + +GetDriveIdOk returns a tuple with the DriveId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDriveId + +`func (o *ChangeOut) SetDriveId(v string)` + +SetDriveId sets DriveId field to given value. + + +### GetId + +`func (o *ChangeOut) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ChangeOut) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ChangeOut) SetId(v string)` + +SetId sets Id field to given value. + + +### GetOccurredAt + +`func (o *ChangeOut) GetOccurredAt() time.Time` + +GetOccurredAt returns the OccurredAt field if non-nil, zero value otherwise. + +### GetOccurredAtOk + +`func (o *ChangeOut) GetOccurredAtOk() (*time.Time, bool)` + +GetOccurredAtOk returns a tuple with the OccurredAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetOccurredAt + +`func (o *ChangeOut) SetOccurredAt(v time.Time)` + +SetOccurredAt sets OccurredAt field to given value. + + +### GetPreviousRevision + +`func (o *ChangeOut) GetPreviousRevision() string` + +GetPreviousRevision returns the PreviousRevision field if non-nil, zero value otherwise. + +### GetPreviousRevisionOk + +`func (o *ChangeOut) GetPreviousRevisionOk() (*string, bool)` + +GetPreviousRevisionOk returns a tuple with the PreviousRevision field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPreviousRevision + +`func (o *ChangeOut) SetPreviousRevision(v string)` + +SetPreviousRevision sets PreviousRevision field to given value. + + +### SetPreviousRevisionNil + +`func (o *ChangeOut) SetPreviousRevisionNil(b bool)` + + SetPreviousRevisionNil sets the value for PreviousRevision to be an explicit nil + +### UnsetPreviousRevision +`func (o *ChangeOut) UnsetPreviousRevision()` + +UnsetPreviousRevision ensures that no value is present for PreviousRevision, not even an explicit nil +### GetResource + +`func (o *ChangeOut) GetResource() ChangeResourceOut` + +GetResource returns the Resource field if non-nil, zero value otherwise. + +### GetResourceOk + +`func (o *ChangeOut) GetResourceOk() (*ChangeResourceOut, bool)` + +GetResourceOk returns a tuple with the Resource field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResource + +`func (o *ChangeOut) SetResource(v ChangeResourceOut)` + +SetResource sets Resource field to given value. + + +### GetRevision + +`func (o *ChangeOut) GetRevision() string` + +GetRevision returns the Revision field if non-nil, zero value otherwise. + +### GetRevisionOk + +`func (o *ChangeOut) GetRevisionOk() (*string, bool)` + +GetRevisionOk returns a tuple with the Revision field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRevision + +`func (o *ChangeOut) SetRevision(v string)` + +SetRevision sets Revision field to given value. + + +### SetRevisionNil + +`func (o *ChangeOut) SetRevisionNil(b bool)` + + SetRevisionNil sets the value for Revision to be an explicit nil + +### UnsetRevision +`func (o *ChangeOut) UnsetRevision()` + +UnsetRevision ensures that no value is present for Revision, not even an explicit nil +### GetType + +`func (o *ChangeOut) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ChangeOut) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ChangeOut) SetType(v string)` + +SetType sets Type field to given value. + + + +[[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/sdk/go/docs/ChangePageOut.md b/sdk/go/docs/ChangePageOut.md new file mode 100644 index 0000000..a4feb90 --- /dev/null +++ b/sdk/go/docs/ChangePageOut.md @@ -0,0 +1,91 @@ +# ChangePageOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**HasMore** | **bool** | | +**Items** | [**[]ChangeOut**](ChangeOut.md) | | +**NextCursor** | **string** | | + +## Methods + +### NewChangePageOut + +`func NewChangePageOut(hasMore bool, items []ChangeOut, nextCursor string, ) *ChangePageOut` + +NewChangePageOut instantiates a new ChangePageOut object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewChangePageOutWithDefaults + +`func NewChangePageOutWithDefaults() *ChangePageOut` + +NewChangePageOutWithDefaults instantiates a new ChangePageOut object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetHasMore + +`func (o *ChangePageOut) GetHasMore() bool` + +GetHasMore returns the HasMore field if non-nil, zero value otherwise. + +### GetHasMoreOk + +`func (o *ChangePageOut) GetHasMoreOk() (*bool, bool)` + +GetHasMoreOk returns a tuple with the HasMore field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHasMore + +`func (o *ChangePageOut) SetHasMore(v bool)` + +SetHasMore sets HasMore field to given value. + + +### GetItems + +`func (o *ChangePageOut) GetItems() []ChangeOut` + +GetItems returns the Items field if non-nil, zero value otherwise. + +### GetItemsOk + +`func (o *ChangePageOut) GetItemsOk() (*[]ChangeOut, bool)` + +GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItems + +`func (o *ChangePageOut) SetItems(v []ChangeOut)` + +SetItems sets Items field to given value. + + +### GetNextCursor + +`func (o *ChangePageOut) GetNextCursor() string` + +GetNextCursor returns the NextCursor field if non-nil, zero value otherwise. + +### GetNextCursorOk + +`func (o *ChangePageOut) GetNextCursorOk() (*string, bool)` + +GetNextCursorOk returns a tuple with the NextCursor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextCursor + +`func (o *ChangePageOut) SetNextCursor(v string)` + +SetNextCursor sets NextCursor field to given value. + + + +[[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/sdk/go/docs/ChangeResourceOut.md b/sdk/go/docs/ChangeResourceOut.md new file mode 100644 index 0000000..23e6e6b --- /dev/null +++ b/sdk/go/docs/ChangeResourceOut.md @@ -0,0 +1,70 @@ +# ChangeResourceOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Id** | **string** | | +**Type** | **string** | | + +## Methods + +### NewChangeResourceOut + +`func NewChangeResourceOut(id string, type_ string, ) *ChangeResourceOut` + +NewChangeResourceOut instantiates a new ChangeResourceOut object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewChangeResourceOutWithDefaults + +`func NewChangeResourceOutWithDefaults() *ChangeResourceOut` + +NewChangeResourceOutWithDefaults instantiates a new ChangeResourceOut object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetId + +`func (o *ChangeResourceOut) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ChangeResourceOut) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ChangeResourceOut) SetId(v string)` + +SetId sets Id field to given value. + + +### GetType + +`func (o *ChangeResourceOut) GetType() string` + +GetType returns the Type field if non-nil, zero value otherwise. + +### GetTypeOk + +`func (o *ChangeResourceOut) GetTypeOk() (*string, bool)` + +GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetType + +`func (o *ChangeResourceOut) SetType(v string)` + +SetType sets Type field to given value. + + + +[[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/sdk/go/docs/ChangesAPI.md b/sdk/go/docs/ChangesAPI.md new file mode 100644 index 0000000..dd3387c --- /dev/null +++ b/sdk/go/docs/ChangesAPI.md @@ -0,0 +1,86 @@ +# \ChangesAPI + +All URIs are relative to *https://api.agentdrive.run* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**ChangesList**](ChangesAPI.md#ChangesList) | **Get** /v0/drives/{drive_id}/changes | List Changes + + + +## ChangesList + +> ChangePageOut ChangesList(ctx, driveId).Limit(limit).Start(start).Cursor(cursor).Authorization(authorization).Execute() + +List Changes + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + limit := int32(56) // int32 | (optional) + start := "start_example" // string | (optional) + cursor := "cursor_example" // string | (optional) + authorization := "authorization_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.ChangesAPI.ChangesList(context.Background(), driveId).Limit(limit).Start(start).Cursor(cursor).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `ChangesAPI.ChangesList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `ChangesList`: ChangePageOut + fmt.Fprintf(os.Stdout, "Response from `ChangesAPI.ChangesList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiChangesListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **limit** | **int32** | | + **start** | **string** | | + **cursor** | **string** | | + **authorization** | **string** | | + +### Return type + +[**ChangePageOut**](ChangePageOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### 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) diff --git a/sdk/go/docs/ClaimInitRequest.md b/sdk/go/docs/ClaimInitRequest.md deleted file mode 100644 index e6da05c..0000000 --- a/sdk/go/docs/ClaimInitRequest.md +++ /dev/null @@ -1,85 +0,0 @@ -# ClaimInitRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ClaimToken** | **string** | The per-identity claim_token returned by POST /agent/identity. | -**Email** | Pointer to **NullableString** | Optional hint to display on the /claim page so the human knows which account the agent expected. Not enforced (design §14 question #3). | [optional] - -## Methods - -### NewClaimInitRequest - -`func NewClaimInitRequest(claimToken string, ) *ClaimInitRequest` - -NewClaimInitRequest instantiates a new ClaimInitRequest object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewClaimInitRequestWithDefaults - -`func NewClaimInitRequestWithDefaults() *ClaimInitRequest` - -NewClaimInitRequestWithDefaults instantiates a new ClaimInitRequest object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetClaimToken - -`func (o *ClaimInitRequest) GetClaimToken() string` - -GetClaimToken returns the ClaimToken field if non-nil, zero value otherwise. - -### GetClaimTokenOk - -`func (o *ClaimInitRequest) GetClaimTokenOk() (*string, bool)` - -GetClaimTokenOk returns a tuple with the ClaimToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetClaimToken - -`func (o *ClaimInitRequest) SetClaimToken(v string)` - -SetClaimToken sets ClaimToken field to given value. - - -### GetEmail - -`func (o *ClaimInitRequest) GetEmail() string` - -GetEmail returns the Email field if non-nil, zero value otherwise. - -### GetEmailOk - -`func (o *ClaimInitRequest) GetEmailOk() (*string, bool)` - -GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEmail - -`func (o *ClaimInitRequest) SetEmail(v string)` - -SetEmail sets Email field to given value. - -### HasEmail - -`func (o *ClaimInitRequest) HasEmail() bool` - -HasEmail returns a boolean if a field has been set. - -### SetEmailNil - -`func (o *ClaimInitRequest) SetEmailNil(b bool)` - - SetEmailNil sets the value for Email to be an explicit nil - -### UnsetEmail -`func (o *ClaimInitRequest) UnsetEmail()` - -UnsetEmail ensures that no value is present for Email, not even an explicit nil - -[[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/sdk/go/docs/ClaimInitResponse.md b/sdk/go/docs/ClaimInitResponse.md deleted file mode 100644 index 5c49e19..0000000 --- a/sdk/go/docs/ClaimInitResponse.md +++ /dev/null @@ -1,133 +0,0 @@ -# ClaimInitResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ClaimAttemptToken** | **string** | Per-attempt opaque token; the agent does not need to present it. | -**ExpiresAt** | **time.Time** | | -**UserCode** | **string** | Human-readable code the user types/sees on /claim. | -**VerificationUri** | **string** | URL to direct the human to. | -**VerificationUriComplete** | **string** | Convenience: same as `verification_uri` but with the user_code pre-baked so the human doesn't have to type it. RFC 8628 idiom. | - -## Methods - -### NewClaimInitResponse - -`func NewClaimInitResponse(claimAttemptToken string, expiresAt time.Time, userCode string, verificationUri string, verificationUriComplete string, ) *ClaimInitResponse` - -NewClaimInitResponse instantiates a new ClaimInitResponse object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewClaimInitResponseWithDefaults - -`func NewClaimInitResponseWithDefaults() *ClaimInitResponse` - -NewClaimInitResponseWithDefaults instantiates a new ClaimInitResponse object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetClaimAttemptToken - -`func (o *ClaimInitResponse) GetClaimAttemptToken() string` - -GetClaimAttemptToken returns the ClaimAttemptToken field if non-nil, zero value otherwise. - -### GetClaimAttemptTokenOk - -`func (o *ClaimInitResponse) GetClaimAttemptTokenOk() (*string, bool)` - -GetClaimAttemptTokenOk returns a tuple with the ClaimAttemptToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetClaimAttemptToken - -`func (o *ClaimInitResponse) SetClaimAttemptToken(v string)` - -SetClaimAttemptToken sets ClaimAttemptToken field to given value. - - -### GetExpiresAt - -`func (o *ClaimInitResponse) GetExpiresAt() time.Time` - -GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. - -### GetExpiresAtOk - -`func (o *ClaimInitResponse) GetExpiresAtOk() (*time.Time, bool)` - -GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExpiresAt - -`func (o *ClaimInitResponse) SetExpiresAt(v time.Time)` - -SetExpiresAt sets ExpiresAt field to given value. - - -### GetUserCode - -`func (o *ClaimInitResponse) GetUserCode() string` - -GetUserCode returns the UserCode field if non-nil, zero value otherwise. - -### GetUserCodeOk - -`func (o *ClaimInitResponse) GetUserCodeOk() (*string, bool)` - -GetUserCodeOk returns a tuple with the UserCode field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserCode - -`func (o *ClaimInitResponse) SetUserCode(v string)` - -SetUserCode sets UserCode field to given value. - - -### GetVerificationUri - -`func (o *ClaimInitResponse) GetVerificationUri() string` - -GetVerificationUri returns the VerificationUri field if non-nil, zero value otherwise. - -### GetVerificationUriOk - -`func (o *ClaimInitResponse) GetVerificationUriOk() (*string, bool)` - -GetVerificationUriOk returns a tuple with the VerificationUri field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVerificationUri - -`func (o *ClaimInitResponse) SetVerificationUri(v string)` - -SetVerificationUri sets VerificationUri field to given value. - - -### GetVerificationUriComplete - -`func (o *ClaimInitResponse) GetVerificationUriComplete() string` - -GetVerificationUriComplete returns the VerificationUriComplete field if non-nil, zero value otherwise. - -### GetVerificationUriCompleteOk - -`func (o *ClaimInitResponse) GetVerificationUriCompleteOk() (*string, bool)` - -GetVerificationUriCompleteOk returns a tuple with the VerificationUriComplete field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVerificationUriComplete - -`func (o *ClaimInitResponse) SetVerificationUriComplete(v string)` - -SetVerificationUriComplete sets VerificationUriComplete field to given value. - - - -[[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/sdk/go/docs/ClaimMetadata.md b/sdk/go/docs/ClaimMetadata.md deleted file mode 100644 index cdc4350..0000000 --- a/sdk/go/docs/ClaimMetadata.md +++ /dev/null @@ -1,75 +0,0 @@ -# ClaimMetadata - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ClaimEndpoint** | **string** | | -**SupportedEmailHints** | Pointer to **bool** | | [optional] [default to true] - -## Methods - -### NewClaimMetadata - -`func NewClaimMetadata(claimEndpoint string, ) *ClaimMetadata` - -NewClaimMetadata instantiates a new ClaimMetadata object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewClaimMetadataWithDefaults - -`func NewClaimMetadataWithDefaults() *ClaimMetadata` - -NewClaimMetadataWithDefaults instantiates a new ClaimMetadata object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetClaimEndpoint - -`func (o *ClaimMetadata) GetClaimEndpoint() string` - -GetClaimEndpoint returns the ClaimEndpoint field if non-nil, zero value otherwise. - -### GetClaimEndpointOk - -`func (o *ClaimMetadata) GetClaimEndpointOk() (*string, bool)` - -GetClaimEndpointOk returns a tuple with the ClaimEndpoint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetClaimEndpoint - -`func (o *ClaimMetadata) SetClaimEndpoint(v string)` - -SetClaimEndpoint sets ClaimEndpoint field to given value. - - -### GetSupportedEmailHints - -`func (o *ClaimMetadata) GetSupportedEmailHints() bool` - -GetSupportedEmailHints returns the SupportedEmailHints field if non-nil, zero value otherwise. - -### GetSupportedEmailHintsOk - -`func (o *ClaimMetadata) GetSupportedEmailHintsOk() (*bool, bool)` - -GetSupportedEmailHintsOk returns a tuple with the SupportedEmailHints field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSupportedEmailHints - -`func (o *ClaimMetadata) SetSupportedEmailHints(v bool)` - -SetSupportedEmailHints sets SupportedEmailHints field to given value. - -### HasSupportedEmailHints - -`func (o *ClaimMetadata) HasSupportedEmailHints() bool` - -HasSupportedEmailHints returns a boolean if a field has been set. - - -[[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/sdk/go/docs/ClientRegistrationOut.md b/sdk/go/docs/ClientRegistrationOut.md deleted file mode 100644 index 99c9369..0000000 --- a/sdk/go/docs/ClientRegistrationOut.md +++ /dev/null @@ -1,196 +0,0 @@ -# ClientRegistrationOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ClientId** | **string** | | -**ClientIdIssuedAt** | **int32** | | -**ClientName** | **string** | | -**GrantTypes** | **[]string** | | -**RedirectUris** | **[]string** | | -**ResponseTypes** | **[]string** | | -**Scope** | **string** | | -**TokenEndpointAuthMethod** | **string** | | - -## Methods - -### NewClientRegistrationOut - -`func NewClientRegistrationOut(clientId string, clientIdIssuedAt int32, clientName string, grantTypes []string, redirectUris []string, responseTypes []string, scope string, tokenEndpointAuthMethod string, ) *ClientRegistrationOut` - -NewClientRegistrationOut instantiates a new ClientRegistrationOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewClientRegistrationOutWithDefaults - -`func NewClientRegistrationOutWithDefaults() *ClientRegistrationOut` - -NewClientRegistrationOutWithDefaults instantiates a new ClientRegistrationOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetClientId - -`func (o *ClientRegistrationOut) GetClientId() string` - -GetClientId returns the ClientId field if non-nil, zero value otherwise. - -### GetClientIdOk - -`func (o *ClientRegistrationOut) GetClientIdOk() (*string, bool)` - -GetClientIdOk returns a tuple with the ClientId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetClientId - -`func (o *ClientRegistrationOut) SetClientId(v string)` - -SetClientId sets ClientId field to given value. - - -### GetClientIdIssuedAt - -`func (o *ClientRegistrationOut) GetClientIdIssuedAt() int32` - -GetClientIdIssuedAt returns the ClientIdIssuedAt field if non-nil, zero value otherwise. - -### GetClientIdIssuedAtOk - -`func (o *ClientRegistrationOut) GetClientIdIssuedAtOk() (*int32, bool)` - -GetClientIdIssuedAtOk returns a tuple with the ClientIdIssuedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetClientIdIssuedAt - -`func (o *ClientRegistrationOut) SetClientIdIssuedAt(v int32)` - -SetClientIdIssuedAt sets ClientIdIssuedAt field to given value. - - -### GetClientName - -`func (o *ClientRegistrationOut) GetClientName() string` - -GetClientName returns the ClientName field if non-nil, zero value otherwise. - -### GetClientNameOk - -`func (o *ClientRegistrationOut) GetClientNameOk() (*string, bool)` - -GetClientNameOk returns a tuple with the ClientName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetClientName - -`func (o *ClientRegistrationOut) SetClientName(v string)` - -SetClientName sets ClientName field to given value. - - -### GetGrantTypes - -`func (o *ClientRegistrationOut) GetGrantTypes() []string` - -GetGrantTypes returns the GrantTypes field if non-nil, zero value otherwise. - -### GetGrantTypesOk - -`func (o *ClientRegistrationOut) GetGrantTypesOk() (*[]string, bool)` - -GetGrantTypesOk returns a tuple with the GrantTypes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetGrantTypes - -`func (o *ClientRegistrationOut) SetGrantTypes(v []string)` - -SetGrantTypes sets GrantTypes field to given value. - - -### GetRedirectUris - -`func (o *ClientRegistrationOut) GetRedirectUris() []string` - -GetRedirectUris returns the RedirectUris field if non-nil, zero value otherwise. - -### GetRedirectUrisOk - -`func (o *ClientRegistrationOut) GetRedirectUrisOk() (*[]string, bool)` - -GetRedirectUrisOk returns a tuple with the RedirectUris field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRedirectUris - -`func (o *ClientRegistrationOut) SetRedirectUris(v []string)` - -SetRedirectUris sets RedirectUris field to given value. - - -### GetResponseTypes - -`func (o *ClientRegistrationOut) GetResponseTypes() []string` - -GetResponseTypes returns the ResponseTypes field if non-nil, zero value otherwise. - -### GetResponseTypesOk - -`func (o *ClientRegistrationOut) GetResponseTypesOk() (*[]string, bool)` - -GetResponseTypesOk returns a tuple with the ResponseTypes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetResponseTypes - -`func (o *ClientRegistrationOut) SetResponseTypes(v []string)` - -SetResponseTypes sets ResponseTypes field to given value. - - -### GetScope - -`func (o *ClientRegistrationOut) GetScope() string` - -GetScope returns the Scope field if non-nil, zero value otherwise. - -### GetScopeOk - -`func (o *ClientRegistrationOut) GetScopeOk() (*string, bool)` - -GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetScope - -`func (o *ClientRegistrationOut) SetScope(v string)` - -SetScope sets Scope field to given value. - - -### GetTokenEndpointAuthMethod - -`func (o *ClientRegistrationOut) GetTokenEndpointAuthMethod() string` - -GetTokenEndpointAuthMethod returns the TokenEndpointAuthMethod field if non-nil, zero value otherwise. - -### GetTokenEndpointAuthMethodOk - -`func (o *ClientRegistrationOut) GetTokenEndpointAuthMethodOk() (*string, bool)` - -GetTokenEndpointAuthMethodOk returns a tuple with the TokenEndpointAuthMethod field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTokenEndpointAuthMethod - -`func (o *ClientRegistrationOut) SetTokenEndpointAuthMethod(v string)` - -SetTokenEndpointAuthMethod sets TokenEndpointAuthMethod field to given value. - - - -[[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/sdk/go/docs/CompileDiagnosticOut.md b/sdk/go/docs/CompileDiagnosticOut.md deleted file mode 100644 index e7dbe26..0000000 --- a/sdk/go/docs/CompileDiagnosticOut.md +++ /dev/null @@ -1,214 +0,0 @@ -# CompileDiagnosticOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Category** | Pointer to **NullableString** | | [optional] -**File** | Pointer to **NullableString** | | [optional] -**Line** | Pointer to **NullableInt32** | | [optional] -**Message** | **string** | | -**Severity** | **string** | | -**Suggestion** | Pointer to **NullableString** | | [optional] - -## Methods - -### NewCompileDiagnosticOut - -`func NewCompileDiagnosticOut(message string, severity string, ) *CompileDiagnosticOut` - -NewCompileDiagnosticOut instantiates a new CompileDiagnosticOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCompileDiagnosticOutWithDefaults - -`func NewCompileDiagnosticOutWithDefaults() *CompileDiagnosticOut` - -NewCompileDiagnosticOutWithDefaults instantiates a new CompileDiagnosticOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetCategory - -`func (o *CompileDiagnosticOut) GetCategory() string` - -GetCategory returns the Category field if non-nil, zero value otherwise. - -### GetCategoryOk - -`func (o *CompileDiagnosticOut) GetCategoryOk() (*string, bool)` - -GetCategoryOk returns a tuple with the Category field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCategory - -`func (o *CompileDiagnosticOut) SetCategory(v string)` - -SetCategory sets Category field to given value. - -### HasCategory - -`func (o *CompileDiagnosticOut) HasCategory() bool` - -HasCategory returns a boolean if a field has been set. - -### SetCategoryNil - -`func (o *CompileDiagnosticOut) SetCategoryNil(b bool)` - - SetCategoryNil sets the value for Category to be an explicit nil - -### UnsetCategory -`func (o *CompileDiagnosticOut) UnsetCategory()` - -UnsetCategory ensures that no value is present for Category, not even an explicit nil -### GetFile - -`func (o *CompileDiagnosticOut) GetFile() string` - -GetFile returns the File field if non-nil, zero value otherwise. - -### GetFileOk - -`func (o *CompileDiagnosticOut) GetFileOk() (*string, bool)` - -GetFileOk returns a tuple with the File field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFile - -`func (o *CompileDiagnosticOut) SetFile(v string)` - -SetFile sets File field to given value. - -### HasFile - -`func (o *CompileDiagnosticOut) HasFile() bool` - -HasFile returns a boolean if a field has been set. - -### SetFileNil - -`func (o *CompileDiagnosticOut) SetFileNil(b bool)` - - SetFileNil sets the value for File to be an explicit nil - -### UnsetFile -`func (o *CompileDiagnosticOut) UnsetFile()` - -UnsetFile ensures that no value is present for File, not even an explicit nil -### GetLine - -`func (o *CompileDiagnosticOut) GetLine() int32` - -GetLine returns the Line field if non-nil, zero value otherwise. - -### GetLineOk - -`func (o *CompileDiagnosticOut) GetLineOk() (*int32, bool)` - -GetLineOk returns a tuple with the Line field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLine - -`func (o *CompileDiagnosticOut) SetLine(v int32)` - -SetLine sets Line field to given value. - -### HasLine - -`func (o *CompileDiagnosticOut) HasLine() bool` - -HasLine returns a boolean if a field has been set. - -### SetLineNil - -`func (o *CompileDiagnosticOut) SetLineNil(b bool)` - - SetLineNil sets the value for Line to be an explicit nil - -### UnsetLine -`func (o *CompileDiagnosticOut) UnsetLine()` - -UnsetLine ensures that no value is present for Line, not even an explicit nil -### GetMessage - -`func (o *CompileDiagnosticOut) GetMessage() string` - -GetMessage returns the Message field if non-nil, zero value otherwise. - -### GetMessageOk - -`func (o *CompileDiagnosticOut) GetMessageOk() (*string, bool)` - -GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessage - -`func (o *CompileDiagnosticOut) SetMessage(v string)` - -SetMessage sets Message field to given value. - - -### GetSeverity - -`func (o *CompileDiagnosticOut) GetSeverity() string` - -GetSeverity returns the Severity field if non-nil, zero value otherwise. - -### GetSeverityOk - -`func (o *CompileDiagnosticOut) GetSeverityOk() (*string, bool)` - -GetSeverityOk returns a tuple with the Severity field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSeverity - -`func (o *CompileDiagnosticOut) SetSeverity(v string)` - -SetSeverity sets Severity field to given value. - - -### GetSuggestion - -`func (o *CompileDiagnosticOut) GetSuggestion() string` - -GetSuggestion returns the Suggestion field if non-nil, zero value otherwise. - -### GetSuggestionOk - -`func (o *CompileDiagnosticOut) GetSuggestionOk() (*string, bool)` - -GetSuggestionOk returns a tuple with the Suggestion field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSuggestion - -`func (o *CompileDiagnosticOut) SetSuggestion(v string)` - -SetSuggestion sets Suggestion field to given value. - -### HasSuggestion - -`func (o *CompileDiagnosticOut) HasSuggestion() bool` - -HasSuggestion returns a boolean if a field has been set. - -### SetSuggestionNil - -`func (o *CompileDiagnosticOut) SetSuggestionNil(b bool)` - - SetSuggestionNil sets the value for Suggestion to be an explicit nil - -### UnsetSuggestion -`func (o *CompileDiagnosticOut) UnsetSuggestion()` - -UnsetSuggestion ensures that no value is present for Suggestion, not even an explicit nil - -[[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/sdk/go/docs/CompileJobIn.md b/sdk/go/docs/CompileJobIn.md deleted file mode 100644 index e2ae075..0000000 --- a/sdk/go/docs/CompileJobIn.md +++ /dev/null @@ -1,80 +0,0 @@ -# CompileJobIn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Options** | Pointer to [**CompileOptions**](CompileOptions.md) | | [optional] -**Task** | Pointer to **string** | | [optional] [default to "latex.compile"] - -## Methods - -### NewCompileJobIn - -`func NewCompileJobIn() *CompileJobIn` - -NewCompileJobIn instantiates a new CompileJobIn object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCompileJobInWithDefaults - -`func NewCompileJobInWithDefaults() *CompileJobIn` - -NewCompileJobInWithDefaults instantiates a new CompileJobIn object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetOptions - -`func (o *CompileJobIn) GetOptions() CompileOptions` - -GetOptions returns the Options field if non-nil, zero value otherwise. - -### GetOptionsOk - -`func (o *CompileJobIn) GetOptionsOk() (*CompileOptions, bool)` - -GetOptionsOk returns a tuple with the Options field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOptions - -`func (o *CompileJobIn) SetOptions(v CompileOptions)` - -SetOptions sets Options field to given value. - -### HasOptions - -`func (o *CompileJobIn) HasOptions() bool` - -HasOptions returns a boolean if a field has been set. - -### GetTask - -`func (o *CompileJobIn) GetTask() string` - -GetTask returns the Task field if non-nil, zero value otherwise. - -### GetTaskOk - -`func (o *CompileJobIn) GetTaskOk() (*string, bool)` - -GetTaskOk returns a tuple with the Task field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTask - -`func (o *CompileJobIn) SetTask(v string)` - -SetTask sets Task field to given value. - -### HasTask - -`func (o *CompileJobIn) HasTask() bool` - -HasTask returns a boolean if a field has been set. - - -[[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/sdk/go/docs/CompileJobListOut.md b/sdk/go/docs/CompileJobListOut.md deleted file mode 100644 index cc1f32f..0000000 --- a/sdk/go/docs/CompileJobListOut.md +++ /dev/null @@ -1,106 +0,0 @@ -# CompileJobListOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Items** | [**[]CompileJobOut**](CompileJobOut.md) | | -**Jobs** | [**[]CompileJobOut**](CompileJobOut.md) | Deprecated same-value alias for `items`; retained for compatibility. | -**NextCursor** | Pointer to **NullableString** | Opaque continuation token, or null when the listing is complete. | [optional] - -## Methods - -### NewCompileJobListOut - -`func NewCompileJobListOut(items []CompileJobOut, jobs []CompileJobOut, ) *CompileJobListOut` - -NewCompileJobListOut instantiates a new CompileJobListOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCompileJobListOutWithDefaults - -`func NewCompileJobListOutWithDefaults() *CompileJobListOut` - -NewCompileJobListOutWithDefaults instantiates a new CompileJobListOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetItems - -`func (o *CompileJobListOut) GetItems() []CompileJobOut` - -GetItems returns the Items field if non-nil, zero value otherwise. - -### GetItemsOk - -`func (o *CompileJobListOut) GetItemsOk() (*[]CompileJobOut, bool)` - -GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetItems - -`func (o *CompileJobListOut) SetItems(v []CompileJobOut)` - -SetItems sets Items field to given value. - - -### GetJobs - -`func (o *CompileJobListOut) GetJobs() []CompileJobOut` - -GetJobs returns the Jobs field if non-nil, zero value otherwise. - -### GetJobsOk - -`func (o *CompileJobListOut) GetJobsOk() (*[]CompileJobOut, bool)` - -GetJobsOk returns a tuple with the Jobs field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetJobs - -`func (o *CompileJobListOut) SetJobs(v []CompileJobOut)` - -SetJobs sets Jobs field to given value. - - -### GetNextCursor - -`func (o *CompileJobListOut) GetNextCursor() string` - -GetNextCursor returns the NextCursor field if non-nil, zero value otherwise. - -### GetNextCursorOk - -`func (o *CompileJobListOut) GetNextCursorOk() (*string, bool)` - -GetNextCursorOk returns a tuple with the NextCursor field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNextCursor - -`func (o *CompileJobListOut) SetNextCursor(v string)` - -SetNextCursor sets NextCursor field to given value. - -### HasNextCursor - -`func (o *CompileJobListOut) HasNextCursor() bool` - -HasNextCursor returns a boolean if a field has been set. - -### SetNextCursorNil - -`func (o *CompileJobListOut) SetNextCursorNil(b bool)` - - SetNextCursorNil sets the value for NextCursor to be an explicit nil - -### UnsetNextCursor -`func (o *CompileJobListOut) UnsetNextCursor()` - -UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil - -[[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/sdk/go/docs/CompileJobOut.md b/sdk/go/docs/CompileJobOut.md deleted file mode 100644 index 1aa6118..0000000 --- a/sdk/go/docs/CompileJobOut.md +++ /dev/null @@ -1,267 +0,0 @@ -# CompileJobOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CacheHit** | **bool** | | -**Diagnostics** | Pointer to [**[]CompileDiagnosticOut**](CompileDiagnosticOut.md) | | [optional] -**DurationMs** | Pointer to **NullableInt32** | | [optional] -**Engine** | **string** | | -**JobId** | **string** | | -**LogsUrl** | Pointer to **NullableString** | | [optional] -**Output** | Pointer to **map[string]interface{}** | | [optional] -**Status** | **string** | | -**Task** | **string** | | - -## Methods - -### NewCompileJobOut - -`func NewCompileJobOut(cacheHit bool, engine string, jobId string, status string, task string, ) *CompileJobOut` - -NewCompileJobOut instantiates a new CompileJobOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCompileJobOutWithDefaults - -`func NewCompileJobOutWithDefaults() *CompileJobOut` - -NewCompileJobOutWithDefaults instantiates a new CompileJobOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetCacheHit - -`func (o *CompileJobOut) GetCacheHit() bool` - -GetCacheHit returns the CacheHit field if non-nil, zero value otherwise. - -### GetCacheHitOk - -`func (o *CompileJobOut) GetCacheHitOk() (*bool, bool)` - -GetCacheHitOk returns a tuple with the CacheHit field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCacheHit - -`func (o *CompileJobOut) SetCacheHit(v bool)` - -SetCacheHit sets CacheHit field to given value. - - -### GetDiagnostics - -`func (o *CompileJobOut) GetDiagnostics() []CompileDiagnosticOut` - -GetDiagnostics returns the Diagnostics field if non-nil, zero value otherwise. - -### GetDiagnosticsOk - -`func (o *CompileJobOut) GetDiagnosticsOk() (*[]CompileDiagnosticOut, bool)` - -GetDiagnosticsOk returns a tuple with the Diagnostics field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDiagnostics - -`func (o *CompileJobOut) SetDiagnostics(v []CompileDiagnosticOut)` - -SetDiagnostics sets Diagnostics field to given value. - -### HasDiagnostics - -`func (o *CompileJobOut) HasDiagnostics() bool` - -HasDiagnostics returns a boolean if a field has been set. - -### GetDurationMs - -`func (o *CompileJobOut) GetDurationMs() int32` - -GetDurationMs returns the DurationMs field if non-nil, zero value otherwise. - -### GetDurationMsOk - -`func (o *CompileJobOut) GetDurationMsOk() (*int32, bool)` - -GetDurationMsOk returns a tuple with the DurationMs field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDurationMs - -`func (o *CompileJobOut) SetDurationMs(v int32)` - -SetDurationMs sets DurationMs field to given value. - -### HasDurationMs - -`func (o *CompileJobOut) HasDurationMs() bool` - -HasDurationMs returns a boolean if a field has been set. - -### SetDurationMsNil - -`func (o *CompileJobOut) SetDurationMsNil(b bool)` - - SetDurationMsNil sets the value for DurationMs to be an explicit nil - -### UnsetDurationMs -`func (o *CompileJobOut) UnsetDurationMs()` - -UnsetDurationMs ensures that no value is present for DurationMs, not even an explicit nil -### GetEngine - -`func (o *CompileJobOut) GetEngine() string` - -GetEngine returns the Engine field if non-nil, zero value otherwise. - -### GetEngineOk - -`func (o *CompileJobOut) GetEngineOk() (*string, bool)` - -GetEngineOk returns a tuple with the Engine field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEngine - -`func (o *CompileJobOut) SetEngine(v string)` - -SetEngine sets Engine field to given value. - - -### GetJobId - -`func (o *CompileJobOut) GetJobId() string` - -GetJobId returns the JobId field if non-nil, zero value otherwise. - -### GetJobIdOk - -`func (o *CompileJobOut) GetJobIdOk() (*string, bool)` - -GetJobIdOk returns a tuple with the JobId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetJobId - -`func (o *CompileJobOut) SetJobId(v string)` - -SetJobId sets JobId field to given value. - - -### GetLogsUrl - -`func (o *CompileJobOut) GetLogsUrl() string` - -GetLogsUrl returns the LogsUrl field if non-nil, zero value otherwise. - -### GetLogsUrlOk - -`func (o *CompileJobOut) GetLogsUrlOk() (*string, bool)` - -GetLogsUrlOk returns a tuple with the LogsUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLogsUrl - -`func (o *CompileJobOut) SetLogsUrl(v string)` - -SetLogsUrl sets LogsUrl field to given value. - -### HasLogsUrl - -`func (o *CompileJobOut) HasLogsUrl() bool` - -HasLogsUrl returns a boolean if a field has been set. - -### SetLogsUrlNil - -`func (o *CompileJobOut) SetLogsUrlNil(b bool)` - - SetLogsUrlNil sets the value for LogsUrl to be an explicit nil - -### UnsetLogsUrl -`func (o *CompileJobOut) UnsetLogsUrl()` - -UnsetLogsUrl ensures that no value is present for LogsUrl, not even an explicit nil -### GetOutput - -`func (o *CompileJobOut) GetOutput() map[string]interface{}` - -GetOutput returns the Output field if non-nil, zero value otherwise. - -### GetOutputOk - -`func (o *CompileJobOut) GetOutputOk() (*map[string]interface{}, bool)` - -GetOutputOk returns a tuple with the Output field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOutput - -`func (o *CompileJobOut) SetOutput(v map[string]interface{})` - -SetOutput sets Output field to given value. - -### HasOutput - -`func (o *CompileJobOut) HasOutput() bool` - -HasOutput returns a boolean if a field has been set. - -### SetOutputNil - -`func (o *CompileJobOut) SetOutputNil(b bool)` - - SetOutputNil sets the value for Output to be an explicit nil - -### UnsetOutput -`func (o *CompileJobOut) UnsetOutput()` - -UnsetOutput ensures that no value is present for Output, not even an explicit nil -### GetStatus - -`func (o *CompileJobOut) GetStatus() string` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *CompileJobOut) GetStatusOk() (*string, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *CompileJobOut) SetStatus(v string)` - -SetStatus sets Status field to given value. - - -### GetTask - -`func (o *CompileJobOut) GetTask() string` - -GetTask returns the Task field if non-nil, zero value otherwise. - -### GetTaskOk - -`func (o *CompileJobOut) GetTaskOk() (*string, bool)` - -GetTaskOk returns a tuple with the Task field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTask - -`func (o *CompileJobOut) SetTask(v string)` - -SetTask sets Task field to given value. - - - -[[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/sdk/go/docs/CompileOptions.md b/sdk/go/docs/CompileOptions.md deleted file mode 100644 index 769db24..0000000 --- a/sdk/go/docs/CompileOptions.md +++ /dev/null @@ -1,126 +0,0 @@ -# CompileOptions - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Engine** | Pointer to **NullableString** | | [optional] -**Entrypoint** | Pointer to **NullableString** | | [optional] -**Wait** | Pointer to **bool** | | [optional] [default to false] - -## Methods - -### NewCompileOptions - -`func NewCompileOptions() *CompileOptions` - -NewCompileOptions instantiates a new CompileOptions object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCompileOptionsWithDefaults - -`func NewCompileOptionsWithDefaults() *CompileOptions` - -NewCompileOptionsWithDefaults instantiates a new CompileOptions object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetEngine - -`func (o *CompileOptions) GetEngine() string` - -GetEngine returns the Engine field if non-nil, zero value otherwise. - -### GetEngineOk - -`func (o *CompileOptions) GetEngineOk() (*string, bool)` - -GetEngineOk returns a tuple with the Engine field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEngine - -`func (o *CompileOptions) SetEngine(v string)` - -SetEngine sets Engine field to given value. - -### HasEngine - -`func (o *CompileOptions) HasEngine() bool` - -HasEngine returns a boolean if a field has been set. - -### SetEngineNil - -`func (o *CompileOptions) SetEngineNil(b bool)` - - SetEngineNil sets the value for Engine to be an explicit nil - -### UnsetEngine -`func (o *CompileOptions) UnsetEngine()` - -UnsetEngine ensures that no value is present for Engine, not even an explicit nil -### GetEntrypoint - -`func (o *CompileOptions) GetEntrypoint() string` - -GetEntrypoint returns the Entrypoint field if non-nil, zero value otherwise. - -### GetEntrypointOk - -`func (o *CompileOptions) GetEntrypointOk() (*string, bool)` - -GetEntrypointOk returns a tuple with the Entrypoint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEntrypoint - -`func (o *CompileOptions) SetEntrypoint(v string)` - -SetEntrypoint sets Entrypoint field to given value. - -### HasEntrypoint - -`func (o *CompileOptions) HasEntrypoint() bool` - -HasEntrypoint returns a boolean if a field has been set. - -### SetEntrypointNil - -`func (o *CompileOptions) SetEntrypointNil(b bool)` - - SetEntrypointNil sets the value for Entrypoint to be an explicit nil - -### UnsetEntrypoint -`func (o *CompileOptions) UnsetEntrypoint()` - -UnsetEntrypoint ensures that no value is present for Entrypoint, not even an explicit nil -### GetWait - -`func (o *CompileOptions) GetWait() bool` - -GetWait returns the Wait field if non-nil, zero value otherwise. - -### GetWaitOk - -`func (o *CompileOptions) GetWaitOk() (*bool, bool)` - -GetWaitOk returns a tuple with the Wait field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetWait - -`func (o *CompileOptions) SetWait(v bool)` - -SetWait sets Wait field to given value. - -### HasWait - -`func (o *CompileOptions) HasWait() bool` - -HasWait returns a boolean if a field has been set. - - -[[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/sdk/go/docs/CompileProjectOut.md b/sdk/go/docs/CompileProjectOut.md deleted file mode 100644 index 8039cc5..0000000 --- a/sdk/go/docs/CompileProjectOut.md +++ /dev/null @@ -1,112 +0,0 @@ -# CompileProjectOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AutoCompile** | **bool** | | -**Engine** | **string** | | -**Entrypoint** | **string** | | -**FldId** | **string** | | - -## Methods - -### NewCompileProjectOut - -`func NewCompileProjectOut(autoCompile bool, engine string, entrypoint string, fldId string, ) *CompileProjectOut` - -NewCompileProjectOut instantiates a new CompileProjectOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCompileProjectOutWithDefaults - -`func NewCompileProjectOutWithDefaults() *CompileProjectOut` - -NewCompileProjectOutWithDefaults instantiates a new CompileProjectOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetAutoCompile - -`func (o *CompileProjectOut) GetAutoCompile() bool` - -GetAutoCompile returns the AutoCompile field if non-nil, zero value otherwise. - -### GetAutoCompileOk - -`func (o *CompileProjectOut) GetAutoCompileOk() (*bool, bool)` - -GetAutoCompileOk returns a tuple with the AutoCompile field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAutoCompile - -`func (o *CompileProjectOut) SetAutoCompile(v bool)` - -SetAutoCompile sets AutoCompile field to given value. - - -### GetEngine - -`func (o *CompileProjectOut) GetEngine() string` - -GetEngine returns the Engine field if non-nil, zero value otherwise. - -### GetEngineOk - -`func (o *CompileProjectOut) GetEngineOk() (*string, bool)` - -GetEngineOk returns a tuple with the Engine field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEngine - -`func (o *CompileProjectOut) SetEngine(v string)` - -SetEngine sets Engine field to given value. - - -### GetEntrypoint - -`func (o *CompileProjectOut) GetEntrypoint() string` - -GetEntrypoint returns the Entrypoint field if non-nil, zero value otherwise. - -### GetEntrypointOk - -`func (o *CompileProjectOut) GetEntrypointOk() (*string, bool)` - -GetEntrypointOk returns a tuple with the Entrypoint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEntrypoint - -`func (o *CompileProjectOut) SetEntrypoint(v string)` - -SetEntrypoint sets Entrypoint field to given value. - - -### GetFldId - -`func (o *CompileProjectOut) GetFldId() string` - -GetFldId returns the FldId field if non-nil, zero value otherwise. - -### GetFldIdOk - -`func (o *CompileProjectOut) GetFldIdOk() (*string, bool)` - -GetFldIdOk returns a tuple with the FldId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFldId - -`func (o *CompileProjectOut) SetFldId(v string)` - -SetFldId sets FldId field to given value. - - - -[[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/sdk/go/docs/CopyIn.md b/sdk/go/docs/CopyIn.md deleted file mode 100644 index 44299b0..0000000 --- a/sdk/go/docs/CopyIn.md +++ /dev/null @@ -1,121 +0,0 @@ -# CopyIn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**FromGeneration** | Pointer to **NullableInt32** | | [optional] -**Path** | **string** | | -**Source** | Pointer to [**NullableArtifactSource**](ArtifactSource.md) | | [optional] - -## Methods - -### NewCopyIn - -`func NewCopyIn(path string, ) *CopyIn` - -NewCopyIn instantiates a new CopyIn object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewCopyInWithDefaults - -`func NewCopyInWithDefaults() *CopyIn` - -NewCopyInWithDefaults instantiates a new CopyIn object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetFromGeneration - -`func (o *CopyIn) GetFromGeneration() int32` - -GetFromGeneration returns the FromGeneration field if non-nil, zero value otherwise. - -### GetFromGenerationOk - -`func (o *CopyIn) GetFromGenerationOk() (*int32, bool)` - -GetFromGenerationOk returns a tuple with the FromGeneration field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFromGeneration - -`func (o *CopyIn) SetFromGeneration(v int32)` - -SetFromGeneration sets FromGeneration field to given value. - -### HasFromGeneration - -`func (o *CopyIn) HasFromGeneration() bool` - -HasFromGeneration returns a boolean if a field has been set. - -### SetFromGenerationNil - -`func (o *CopyIn) SetFromGenerationNil(b bool)` - - SetFromGenerationNil sets the value for FromGeneration to be an explicit nil - -### UnsetFromGeneration -`func (o *CopyIn) UnsetFromGeneration()` - -UnsetFromGeneration ensures that no value is present for FromGeneration, not even an explicit nil -### GetPath - -`func (o *CopyIn) GetPath() string` - -GetPath returns the Path field if non-nil, zero value otherwise. - -### GetPathOk - -`func (o *CopyIn) GetPathOk() (*string, bool)` - -GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPath - -`func (o *CopyIn) SetPath(v string)` - -SetPath sets Path field to given value. - - -### GetSource - -`func (o *CopyIn) GetSource() ArtifactSource` - -GetSource returns the Source field if non-nil, zero value otherwise. - -### GetSourceOk - -`func (o *CopyIn) GetSourceOk() (*ArtifactSource, bool)` - -GetSourceOk returns a tuple with the Source field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSource - -`func (o *CopyIn) SetSource(v ArtifactSource)` - -SetSource sets Source field to given value. - -### HasSource - -`func (o *CopyIn) HasSource() bool` - -HasSource returns a boolean if a field has been set. - -### SetSourceNil - -`func (o *CopyIn) SetSourceNil(b bool)` - - SetSourceNil sets the value for Source to be an explicit nil - -### UnsetSource -`func (o *CopyIn) UnsetSource()` - -UnsetSource ensures that no value is present for Source, not even an explicit nil - -[[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/sdk/go/docs/DatasetDescriptionOut.md b/sdk/go/docs/DatasetDescriptionOut.md deleted file mode 100644 index da51523..0000000 --- a/sdk/go/docs/DatasetDescriptionOut.md +++ /dev/null @@ -1,70 +0,0 @@ -# DatasetDescriptionOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Columns** | [**[]QueryColumnOut**](QueryColumnOut.md) | | -**Dataset** | **string** | | - -## Methods - -### NewDatasetDescriptionOut - -`func NewDatasetDescriptionOut(columns []QueryColumnOut, dataset string, ) *DatasetDescriptionOut` - -NewDatasetDescriptionOut instantiates a new DatasetDescriptionOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewDatasetDescriptionOutWithDefaults - -`func NewDatasetDescriptionOutWithDefaults() *DatasetDescriptionOut` - -NewDatasetDescriptionOutWithDefaults instantiates a new DatasetDescriptionOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetColumns - -`func (o *DatasetDescriptionOut) GetColumns() []QueryColumnOut` - -GetColumns returns the Columns field if non-nil, zero value otherwise. - -### GetColumnsOk - -`func (o *DatasetDescriptionOut) GetColumnsOk() (*[]QueryColumnOut, bool)` - -GetColumnsOk returns a tuple with the Columns field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetColumns - -`func (o *DatasetDescriptionOut) SetColumns(v []QueryColumnOut)` - -SetColumns sets Columns field to given value. - - -### GetDataset - -`func (o *DatasetDescriptionOut) GetDataset() string` - -GetDataset returns the Dataset field if non-nil, zero value otherwise. - -### GetDatasetOk - -`func (o *DatasetDescriptionOut) GetDatasetOk() (*string, bool)` - -GetDatasetOk returns a tuple with the Dataset field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDataset - -`func (o *DatasetDescriptionOut) SetDataset(v string)` - -SetDataset sets Dataset field to given value. - - - -[[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/sdk/go/docs/DefaultAPI.md b/sdk/go/docs/DefaultAPI.md index cb59b2f..e4cde83 100644 --- a/sdk/go/docs/DefaultAPI.md +++ b/sdk/go/docs/DefaultAPI.md @@ -4,5697 +4,15 @@ All URIs are relative to *https://api.agentdrive.run* Method | HTTP request | Description ------------- | ------------- | ------------- -[**AbortUploadV0UploadsUploadIdDelete**](DefaultAPI.md#AbortUploadV0UploadsUploadIdDelete) | **Delete** /v0/uploads/{upload_id} | Abort a large (direct-to-GCS) upload session -[**BeginUploadV0UploadsPost**](DefaultAPI.md#BeginUploadV0UploadsPost) | **Post** /v0/uploads | Begin a large (direct-to-GCS) upload -[**CallbackAuthCallbackGet**](DefaultAPI.md#CallbackAuthCallbackGet) | **Get** /auth/callback | Callback -[**CancelJobV0JobsJobIdCancelPost**](DefaultAPI.md#CancelJobV0JobsJobIdCancelPost) | **Post** /v0/jobs/{job_id}/cancel | Cancel a queued/running job -[**CommitUploadV0UploadsUploadIdCommitPost**](DefaultAPI.md#CommitUploadV0UploadsUploadIdCommitPost) | **Post** /v0/uploads/{upload_id}/commit | Commit a large (direct-to-GCS) upload -[**CopyArtifactRouteV0ArtifactsArtIdCopyPost**](DefaultAPI.md#CopyArtifactRouteV0ArtifactsArtIdCopyPost) | **Post** /v0/artifacts/{art_id}/copy | Duplicate an artifact to a new path (CAS-shared, new ID) -[**CopyFolderByIdV0FoldersFldIdCopyPost**](DefaultAPI.md#CopyFolderByIdV0FoldersFldIdCopyPost) | **Post** /v0/folders/{fld_id}/copy | Duplicate a folder subtree to a new path (CAS-shared, new IDs) -[**CreateFolderByPathV0FoldersPathPut**](DefaultAPI.md#CreateFolderByPathV0FoldersPathPut) | **Put** /v0/folders/{path} | Create a folder (idempotent) -[**CreateGrantRouteV0GrantsPost**](DefaultAPI.md#CreateGrantRouteV0GrantsPost) | **Post** /v0/grants | Create (or fetch) a per-principal grant on a resource -[**CreateShareRouteV0SharesPost**](DefaultAPI.md#CreateShareRouteV0SharesPost) | **Post** /v0/shares | Mint a share link (returns the share_key once) -[**DeleteArtifactByIdRouteV0ArtifactsArtIdDelete**](DefaultAPI.md#DeleteArtifactByIdRouteV0ArtifactsArtIdDelete) | **Delete** /v0/artifacts/{art_id} | Soft-delete an artifact by its stable ID -[**DeleteArtifactV0ArtifactsPathDelete**](DefaultAPI.md#DeleteArtifactV0ArtifactsPathDelete) | **Delete** /v0/artifacts/{path} | Delete Artifact -[**DeleteDriveRouteV0DrivesDriveIdDelete**](DefaultAPI.md#DeleteDriveRouteV0DrivesDriveIdDelete) | **Delete** /v0/drives/{drive_id} | Soft-delete a drive -[**DeleteFolderByIdV0FoldersFldIdDelete**](DefaultAPI.md#DeleteFolderByIdV0FoldersFldIdDelete) | **Delete** /v0/folders/{fld_id} | Soft-delete a folder by stable ID (cascade with ?recursive=true) -[**DeleteFolderByPathV0FoldersPathDelete**](DefaultAPI.md#DeleteFolderByPathV0FoldersPathDelete) | **Delete** /v0/folders/{path} | Soft-delete a folder (cascade with ?recursive=true) -[**DeleteGrantRouteV0GrantsGrnIdDelete**](DefaultAPI.md#DeleteGrantRouteV0GrantsGrnIdDelete) | **Delete** /v0/grants/{grn_id} | Revoke a grant (can_manage, or self-revoke own grant) -[**DeleteShareRouteV0SharesShrIdDelete**](DefaultAPI.md#DeleteShareRouteV0SharesShrIdDelete) | **Delete** /v0/shares/{shr_id} | Revoke a share link (requires can_manage) -[**DownloadArtifactByIdV0ArtifactsArtIdDownloadGet**](DefaultAPI.md#DownloadArtifactByIdV0ArtifactsArtIdDownloadGet) | **Get** /v0/artifacts/{art_id}/download | Stream the artifact bytes by stable ID (never rendered HTML) -[**DownloadArtifactByPathV0ArtifactsPathDownloadGet**](DefaultAPI.md#DownloadArtifactByPathV0ArtifactsPathDownloadGet) | **Get** /v0/artifacts/{path}/download | Stream the artifact bytes by path (never rendered HTML) -[**DownloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGet**](DefaultAPI.md#DownloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGet) | **Get** /v0/artifacts/{art_id}/versions/{version_number}/download | Stream bytes for a specific version (machine surface) -[**DownloadUrlByIdV0ArtifactsArtIdDownloadUrlGet**](DefaultAPI.md#DownloadUrlByIdV0ArtifactsArtIdDownloadUrlGet) | **Get** /v0/artifacts/{art_id}/download-url | Signed direct-from-GCS download URL by stable ID -[**DownloadUrlByPathV0ArtifactsPathDownloadUrlGet**](DefaultAPI.md#DownloadUrlByPathV0ArtifactsPathDownloadUrlGet) | **Get** /v0/artifacts/{path}/download-url | Signed direct-from-GCS download URL by path -[**DownloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGet**](DefaultAPI.md#DownloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGet) | **Get** /v0/artifacts/{art_id}/versions/{version_number}/download-url | Signed direct-from-GCS download URL for a specific version -[**EnqueueJobV0ProjectsFldIdJobsPost**](DefaultAPI.md#EnqueueJobV0ProjectsFldIdJobsPost) | **Post** /v0/projects/{fld_id}/jobs | Enqueue a compile job for a project (folder) -[**ExtensionStartAuthExtensionStartGet**](DefaultAPI.md#ExtensionStartAuthExtensionStartGet) | **Get** /auth/extension/start | Extension Start -[**FindV0FindGet**](DefaultAPI.md#FindV0FindGet) | **Get** /v0/find | Hybrid passage retrieval over the full file body -[**GetArtifactByIdMetaV0ArtifactsArtIdMetaGet**](DefaultAPI.md#GetArtifactByIdMetaV0ArtifactsArtIdMetaGet) | **Get** /v0/artifacts/{art_id}/meta | Artifact metadata by stable ID (same shape as path /meta) -[**GetArtifactByIdV0ArtifactsArtIdGet**](DefaultAPI.md#GetArtifactByIdV0ArtifactsArtIdGet) | **Get** /v0/artifacts/{art_id} | Canonical lookup of an artifact by its stable ID -[**GetArtifactMetaV0ArtifactsPathMetaGet**](DefaultAPI.md#GetArtifactMetaV0ArtifactsPathMetaGet) | **Get** /v0/artifacts/{path}/meta | Get Artifact Meta -[**GetArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGet**](DefaultAPI.md#GetArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGet) | **Get** /v0/artifacts/{art_id}/versions/{version_number} | Metadata for a specific version of an artifact -[**GetDriveRouteV0DrivesDriveIdGet**](DefaultAPI.md#GetDriveRouteV0DrivesDriveIdGet) | **Get** /v0/drives/{drive_id} | Drive overview by id (same shape as /drives/me) -[**GetFeedbackStatusV0FeedbackFbkIdGet**](DefaultAPI.md#GetFeedbackStatusV0FeedbackFbkIdGet) | **Get** /v0/feedback/{fbk_id} | Get Feedback Status -[**GetFolderByIdMetaV0FoldersFldIdMetaGet**](DefaultAPI.md#GetFolderByIdMetaV0FoldersFldIdMetaGet) | **Get** /v0/folders/{fld_id}/meta | Folder metadata by stable ID (same shape as the bare id route) -[**GetFolderByIdV0FoldersFldIdGet**](DefaultAPI.md#GetFolderByIdV0FoldersFldIdGet) | **Get** /v0/folders/{fld_id} | Canonical lookup of a folder by its stable ID -[**GetFolderByPathMetaV0FoldersPathMetaGet**](DefaultAPI.md#GetFolderByPathMetaV0FoldersPathMetaGet) | **Get** /v0/folders/{path}/meta | Folder metadata by path (same shape as the bare path route) -[**GetFolderByPathV0FoldersPathGet**](DefaultAPI.md#GetFolderByPathV0FoldersPathGet) | **Get** /v0/folders/{path} | Read folder metadata by path -[**GetGrantRouteV0GrantsGrnIdGet**](DefaultAPI.md#GetGrantRouteV0GrantsGrnIdGet) | **Get** /v0/grants/{grn_id} | Read a single grant (can_manage, or the grant's own principal) -[**GetJobLogsV0JobsJobIdLogsGet**](DefaultAPI.md#GetJobLogsV0JobsJobIdLogsGet) | **Get** /v0/jobs/{job_id}/logs | Raw compile log (text/plain) -[**GetJobV0JobsJobIdGet**](DefaultAPI.md#GetJobV0JobsJobIdGet) | **Get** /v0/jobs/{job_id} | Poll a job -[**GetProjectV0ProjectsFldIdGet**](DefaultAPI.md#GetProjectV0ProjectsFldIdGet) | **Get** /v0/projects/{fld_id} | Get a project's compile config -[**GetShareRouteV0SharesShrIdGet**](DefaultAPI.md#GetShareRouteV0SharesShrIdGet) | **Get** /v0/shares/{shr_id} | Read a single share link's metadata (requires can_manage) -[**GetUploadStatusV0UploadsUploadIdGet**](DefaultAPI.md#GetUploadStatusV0UploadsUploadIdGet) | **Get** /v0/uploads/{upload_id} | Get the status of a large (direct-to-GCS) upload session -[**HealthHealthGet**](DefaultAPI.md#HealthHealthGet) | **Get** /health | Health -[**ListArtifactVersionsV0ArtifactsArtIdVersionsGet**](DefaultAPI.md#ListArtifactVersionsV0ArtifactsArtIdVersionsGet) | **Get** /v0/artifacts/{art_id}/versions | List versions of an artifact, newest first -[**ListArtifactsV0ArtifactsGet**](DefaultAPI.md#ListArtifactsV0ArtifactsGet) | **Get** /v0/artifacts | List artifacts in the drive -[**ListEventsRouteV0EventsGet**](DefaultAPI.md#ListEventsRouteV0EventsGet) | **Get** /v0/events | Read the append-only event log for the authenticated drive -[**ListGrantsRouteV0GrantsGet**](DefaultAPI.md#ListGrantsRouteV0GrantsGet) | **Get** /v0/grants | List live grants on a resource (requires can_manage) -[**ListProjectJobsV0ProjectsFldIdJobsGet**](DefaultAPI.md#ListProjectJobsV0ProjectsFldIdJobsGet) | **Get** /v0/projects/{fld_id}/jobs | List a project's jobs -[**ListSharesRouteV0SharesGet**](DefaultAPI.md#ListSharesRouteV0SharesGet) | **Get** /v0/shares | List live share links on a resource (requires can_manage) -[**ListTrashRouteV0DrivesDriveIdTrashGet**](DefaultAPI.md#ListTrashRouteV0DrivesDriveIdTrashGet) | **Get** /v0/drives/{drive_id}/trash | List the authenticated drive's trash -[**LoginAuthLoginGet**](DefaultAPI.md#LoginAuthLoginGet) | **Get** /auth/login | Login -[**LogoutAuthLogoutPost**](DefaultAPI.md#LogoutAuthLogoutPost) | **Post** /auth/logout | Logout -[**MeUsageV0DrivesMeUsageGet**](DefaultAPI.md#MeUsageV0DrivesMeUsageGet) | **Get** /v0/drives/me/usage | Current-period usage + caps for the authenticated drive -[**MeV0DrivesMeGet**](DefaultAPI.md#MeV0DrivesMeGet) | **Get** /v0/drives/me | Me -[**MoveArtifactRouteV0ArtifactsArtIdMovePost**](DefaultAPI.md#MoveArtifactRouteV0ArtifactsArtIdMovePost) | **Post** /v0/artifacts/{art_id}/move | Rename / move an artifact to a new path -[**MoveFolderByIdV0FoldersFldIdMovePost**](DefaultAPI.md#MoveFolderByIdV0FoldersFldIdMovePost) | **Post** /v0/folders/{fld_id}/move | Rename / move a folder by stable ID (cascade descendants) -[**MoveFolderByPathV0FoldersPathMovePost**](DefaultAPI.md#MoveFolderByPathV0FoldersPathMovePost) | **Post** /v0/folders/{path}/move | Rename / move a folder (cascade-update descendants) -[**PatchArtifactRouteV0ArtifactsArtIdPatch**](DefaultAPI.md#PatchArtifactRouteV0ArtifactsArtIdPatch) | **Patch** /v0/artifacts/{art_id} | Edit artifact metadata (labels / metadata / source) -[**PatchFolderByIdV0FoldersFldIdPatch**](DefaultAPI.md#PatchFolderByIdV0FoldersFldIdPatch) | **Patch** /v0/folders/{fld_id} | Update folder metadata by stable ID -[**PatchFolderByPathV0FoldersPathPatch**](DefaultAPI.md#PatchFolderByPathV0FoldersPathPatch) | **Patch** /v0/folders/{path} | Update folder metadata by path -[**PatchGrantRouteV0GrantsGrnIdPatch**](DefaultAPI.md#PatchGrantRouteV0GrantsGrnIdPatch) | **Patch** /v0/grants/{grn_id} | Update a grant's role and/or expiry (requires can_manage) -[**PostDescribeV0QueryDescribePost**](DefaultAPI.md#PostDescribeV0QueryDescribePost) | **Post** /v0/query/describe | Describe a dataset's column schema -[**PostFeedbackV0FeedbackPost**](DefaultAPI.md#PostFeedbackV0FeedbackPost) | **Post** /v0/feedback | Post Feedback -[**PostLookupValuesV0QueryLookupValuesPost**](DefaultAPI.md#PostLookupValuesV0QueryLookupValuesPost) | **Post** /v0/query/lookup-values | List distinct values of a dataset column -[**PostQueryV0QueryPost**](DefaultAPI.md#PostQueryV0QueryPost) | **Post** /v0/query | Run a read-only SQL query over authorized datasets -[**PutArtifactV0ArtifactsPathPut**](DefaultAPI.md#PutArtifactV0ArtifactsPathPut) | **Put** /v0/artifacts/{path} | Upload (or overwrite) an artifact -[**PutProjectV0ProjectsFldIdPut**](DefaultAPI.md#PutProjectV0ProjectsFldIdPut) | **Put** /v0/projects/{fld_id} | Set a project's compile config (entrypoint/engine/auto_compile) -[**RedeemShareSShareKeyGet**](DefaultAPI.md#RedeemShareSShareKeyGet) | **Get** /s/{share_key} | Redeem Share -[**RedeemShareWithPasswordSShareKeyPost**](DefaultAPI.md#RedeemShareWithPasswordSShareKeyPost) | **Post** /s/{share_key} | Redeem Share With Password -[**RestoreArtifactV0ArtifactsArtIdRestorePost**](DefaultAPI.md#RestoreArtifactV0ArtifactsArtIdRestorePost) | **Post** /v0/artifacts/{art_id}/restore | Restore a soft-deleted artifact -[**RestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePost**](DefaultAPI.md#RestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePost) | **Post** /v0/artifacts/{art_id}/versions/{version_number}/restore | Restore a previous version as a new head version -[**RestoreDriveRouteV0DrivesDriveIdRestorePost**](DefaultAPI.md#RestoreDriveRouteV0DrivesDriveIdRestorePost) | **Post** /v0/drives/{drive_id}/restore | Restore a soft-deleted drive -[**RestoreFolderByIdV0FoldersFldIdRestorePost**](DefaultAPI.md#RestoreFolderByIdV0FoldersFldIdRestorePost) | **Post** /v0/folders/{fld_id}/restore | Restore a soft-deleted folder (cascade) -[**RotateShareRouteV0SharesShrIdRotatePost**](DefaultAPI.md#RotateShareRouteV0SharesShrIdRotatePost) | **Post** /v0/shares/{shr_id}/rotate | Revoke + reissue a share link's key (requires can_share) -[**SearchV0SearchGet**](DefaultAPI.md#SearchV0SearchGet) | **Get** /v0/search | Full-text search over artifacts in the drive -[**ViewArtifactHeadAArtIdHeadGet**](DefaultAPI.md#ViewArtifactHeadAArtIdHeadGet) | **Get** /a/{art_id}/head | View Artifact Head -[**ViewArtifactVersionVArtIdVersionGet**](DefaultAPI.md#ViewArtifactVersionVArtIdVersionGet) | **Get** /v/{art_id}/{version} | View Artifact Version -[**ViewFileDriveIdPathGet**](DefaultAPI.md#ViewFileDriveIdPathGet) | **Get** /{drive_id}/{path} | View File -[**ViewPermalinkArtifactAArtIdGet**](DefaultAPI.md#ViewPermalinkArtifactAArtIdGet) | **Get** /a/{art_id} | View Permalink Artifact -[**ViewPermalinkFolderFFldIdGet**](DefaultAPI.md#ViewPermalinkFolderFFldIdGet) | **Get** /f/{fld_id} | View Permalink Folder +[**Health**](DefaultAPI.md#Health) | **Get** /health | Health -## AbortUploadV0UploadsUploadIdDelete +## Health -> UploadAbortOut AbortUploadV0UploadsUploadIdDelete(ctx, uploadId).Execute() +> HealthOut Health(ctx).Execute() -Abort a large (direct-to-GCS) upload session - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - uploadId := "uploadId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.AbortUploadV0UploadsUploadIdDelete(context.Background(), uploadId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.AbortUploadV0UploadsUploadIdDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AbortUploadV0UploadsUploadIdDelete`: UploadAbortOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.AbortUploadV0UploadsUploadIdDelete`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**uploadId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiAbortUploadV0UploadsUploadIdDeleteRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**UploadAbortOut**](UploadAbortOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## BeginUploadV0UploadsPost - -> UploadBeginOut BeginUploadV0UploadsPost(ctx).UploadBeginIn(uploadBeginIn).Execute() - -Begin a large (direct-to-GCS) upload - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - uploadBeginIn := *openapiclient.NewUploadBeginIn("Path_example", int32(123)) // UploadBeginIn | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.BeginUploadV0UploadsPost(context.Background()).UploadBeginIn(uploadBeginIn).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.BeginUploadV0UploadsPost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `BeginUploadV0UploadsPost`: UploadBeginOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.BeginUploadV0UploadsPost`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiBeginUploadV0UploadsPostRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **uploadBeginIn** | [**UploadBeginIn**](UploadBeginIn.md) | | - -### Return type - -[**UploadBeginOut**](UploadBeginOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **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) - - -## CallbackAuthCallbackGet - -> string CallbackAuthCallbackGet(ctx).Code(code).State(state).Error_(error_).Execute() - -Callback - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - code := "code_example" // string | (optional) - state := "state_example" // string | (optional) - error_ := "error__example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.CallbackAuthCallbackGet(context.Background()).Code(code).State(state).Error_(error_).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.CallbackAuthCallbackGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CallbackAuthCallbackGet`: string - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CallbackAuthCallbackGet`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCallbackAuthCallbackGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **code** | **string** | | - **state** | **string** | | - **error_** | **string** | | - -### Return type - -**string** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: text/html, 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) - - -## CancelJobV0JobsJobIdCancelPost - -> CompileJobOut CancelJobV0JobsJobIdCancelPost(ctx, jobId).Execute() - -Cancel a queued/running job - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - jobId := "jobId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.CancelJobV0JobsJobIdCancelPost(context.Background(), jobId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.CancelJobV0JobsJobIdCancelPost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CancelJobV0JobsJobIdCancelPost`: CompileJobOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CancelJobV0JobsJobIdCancelPost`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**jobId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiCancelJobV0JobsJobIdCancelPostRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**CompileJobOut**](CompileJobOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## CommitUploadV0UploadsUploadIdCommitPost - -> ArtifactOut CommitUploadV0UploadsUploadIdCommitPost(ctx, uploadId).Execute() - -Commit a large (direct-to-GCS) upload - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - uploadId := "uploadId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.CommitUploadV0UploadsUploadIdCommitPost(context.Background(), uploadId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.CommitUploadV0UploadsUploadIdCommitPost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CommitUploadV0UploadsUploadIdCommitPost`: ArtifactOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CommitUploadV0UploadsUploadIdCommitPost`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**uploadId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiCommitUploadV0UploadsUploadIdCommitPostRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**ArtifactOut**](ArtifactOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## CopyArtifactRouteV0ArtifactsArtIdCopyPost - -> ArtifactOut CopyArtifactRouteV0ArtifactsArtIdCopyPost(ctx, artId).CopyIn(copyIn).XAgentdriveActor(xAgentdriveActor).IfNoneMatch(ifNoneMatch).Execute() - -Duplicate an artifact to a new path (CAS-shared, new ID) - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - artId := "artId_example" // string | - copyIn := *openapiclient.NewCopyIn("Path_example") // CopyIn | - xAgentdriveActor := "xAgentdriveActor_example" // string | (optional) - ifNoneMatch := "ifNoneMatch_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.CopyArtifactRouteV0ArtifactsArtIdCopyPost(context.Background(), artId).CopyIn(copyIn).XAgentdriveActor(xAgentdriveActor).IfNoneMatch(ifNoneMatch).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.CopyArtifactRouteV0ArtifactsArtIdCopyPost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CopyArtifactRouteV0ArtifactsArtIdCopyPost`: ArtifactOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CopyArtifactRouteV0ArtifactsArtIdCopyPost`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**artId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiCopyArtifactRouteV0ArtifactsArtIdCopyPostRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **copyIn** | [**CopyIn**](CopyIn.md) | | - **xAgentdriveActor** | **string** | | - **ifNoneMatch** | **string** | | - -### Return type - -[**ArtifactOut**](ArtifactOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **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) - - -## CopyFolderByIdV0FoldersFldIdCopyPost - -> FolderCopyOut CopyFolderByIdV0FoldersFldIdCopyPost(ctx, fldId).FolderCopyIn(folderCopyIn).XAgentdriveActor(xAgentdriveActor).IfNoneMatch(ifNoneMatch).Execute() - -Duplicate a folder subtree to a new path (CAS-shared, new IDs) - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - fldId := "fldId_example" // string | - folderCopyIn := *openapiclient.NewFolderCopyIn("Path_example") // FolderCopyIn | - xAgentdriveActor := "xAgentdriveActor_example" // string | (optional) - ifNoneMatch := "ifNoneMatch_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.CopyFolderByIdV0FoldersFldIdCopyPost(context.Background(), fldId).FolderCopyIn(folderCopyIn).XAgentdriveActor(xAgentdriveActor).IfNoneMatch(ifNoneMatch).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.CopyFolderByIdV0FoldersFldIdCopyPost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CopyFolderByIdV0FoldersFldIdCopyPost`: FolderCopyOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CopyFolderByIdV0FoldersFldIdCopyPost`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**fldId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiCopyFolderByIdV0FoldersFldIdCopyPostRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **folderCopyIn** | [**FolderCopyIn**](FolderCopyIn.md) | | - **xAgentdriveActor** | **string** | | - **ifNoneMatch** | **string** | | - -### Return type - -[**FolderCopyOut**](FolderCopyOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **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) - - -## CreateFolderByPathV0FoldersPathPut - -> FolderOut CreateFolderByPathV0FoldersPathPut(ctx, path).XAgentdriveActor(xAgentdriveActor).IfNoneMatch(ifNoneMatch).FolderCreateIn(folderCreateIn).Execute() - -Create a folder (idempotent) - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - path := "path_example" // string | - xAgentdriveActor := "xAgentdriveActor_example" // string | (optional) - ifNoneMatch := "ifNoneMatch_example" // string | (optional) - folderCreateIn := *openapiclient.NewFolderCreateIn() // FolderCreateIn | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.CreateFolderByPathV0FoldersPathPut(context.Background(), path).XAgentdriveActor(xAgentdriveActor).IfNoneMatch(ifNoneMatch).FolderCreateIn(folderCreateIn).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.CreateFolderByPathV0FoldersPathPut``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateFolderByPathV0FoldersPathPut`: FolderOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CreateFolderByPathV0FoldersPathPut`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**path** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateFolderByPathV0FoldersPathPutRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **xAgentdriveActor** | **string** | | - **ifNoneMatch** | **string** | | - **folderCreateIn** | [**FolderCreateIn**](FolderCreateIn.md) | | - -### Return type - -[**FolderOut**](FolderOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **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) - - -## CreateGrantRouteV0GrantsPost - -> GrantOut CreateGrantRouteV0GrantsPost(ctx).GrantCreateIn(grantCreateIn).XAgentdriveActor(xAgentdriveActor).Execute() - -Create (or fetch) a per-principal grant on a resource - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - grantCreateIn := *openapiclient.NewGrantCreateIn(*openapiclient.NewGrantPrincipalIn("Type_example"), "Resource_example", "Role_example") // GrantCreateIn | - xAgentdriveActor := "xAgentdriveActor_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.CreateGrantRouteV0GrantsPost(context.Background()).GrantCreateIn(grantCreateIn).XAgentdriveActor(xAgentdriveActor).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.CreateGrantRouteV0GrantsPost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateGrantRouteV0GrantsPost`: GrantOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CreateGrantRouteV0GrantsPost`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateGrantRouteV0GrantsPostRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **grantCreateIn** | [**GrantCreateIn**](GrantCreateIn.md) | | - **xAgentdriveActor** | **string** | | - -### Return type - -[**GrantOut**](GrantOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **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) - - -## CreateShareRouteV0SharesPost - -> ShareMintOut CreateShareRouteV0SharesPost(ctx).ShareCreateIn(shareCreateIn).XAgentdriveActor(xAgentdriveActor).Execute() - -Mint a share link (returns the share_key once) - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - shareCreateIn := *openapiclient.NewShareCreateIn("Resource_example") // ShareCreateIn | - xAgentdriveActor := "xAgentdriveActor_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.CreateShareRouteV0SharesPost(context.Background()).ShareCreateIn(shareCreateIn).XAgentdriveActor(xAgentdriveActor).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.CreateShareRouteV0SharesPost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateShareRouteV0SharesPost`: ShareMintOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.CreateShareRouteV0SharesPost`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateShareRouteV0SharesPostRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **shareCreateIn** | [**ShareCreateIn**](ShareCreateIn.md) | | - **xAgentdriveActor** | **string** | | - -### Return type - -[**ShareMintOut**](ShareMintOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **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) - - -## DeleteArtifactByIdRouteV0ArtifactsArtIdDelete - -> ArtifactDeleteOut DeleteArtifactByIdRouteV0ArtifactsArtIdDelete(ctx, artId).IfMatch(ifMatch).XAgentdriveActor(xAgentdriveActor).Execute() - -Soft-delete an artifact by its stable ID - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - artId := "artId_example" // string | - ifMatch := "ifMatch_example" // string | (optional) - xAgentdriveActor := "xAgentdriveActor_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.DeleteArtifactByIdRouteV0ArtifactsArtIdDelete(context.Background(), artId).IfMatch(ifMatch).XAgentdriveActor(xAgentdriveActor).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DeleteArtifactByIdRouteV0ArtifactsArtIdDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DeleteArtifactByIdRouteV0ArtifactsArtIdDelete`: ArtifactDeleteOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteArtifactByIdRouteV0ArtifactsArtIdDelete`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**artId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteArtifactByIdRouteV0ArtifactsArtIdDeleteRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **ifMatch** | **string** | | - **xAgentdriveActor** | **string** | | - -### Return type - -[**ArtifactDeleteOut**](ArtifactDeleteOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## DeleteArtifactV0ArtifactsPathDelete - -> ArtifactDeleteOut DeleteArtifactV0ArtifactsPathDelete(ctx, path).IfMatch(ifMatch).XAgentdriveActor(xAgentdriveActor).Execute() - -Delete Artifact - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - path := "path_example" // string | - ifMatch := "ifMatch_example" // string | (optional) - xAgentdriveActor := "xAgentdriveActor_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.DeleteArtifactV0ArtifactsPathDelete(context.Background(), path).IfMatch(ifMatch).XAgentdriveActor(xAgentdriveActor).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DeleteArtifactV0ArtifactsPathDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DeleteArtifactV0ArtifactsPathDelete`: ArtifactDeleteOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteArtifactV0ArtifactsPathDelete`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**path** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteArtifactV0ArtifactsPathDeleteRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **ifMatch** | **string** | | - **xAgentdriveActor** | **string** | | - -### Return type - -[**ArtifactDeleteOut**](ArtifactDeleteOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## DeleteDriveRouteV0DrivesDriveIdDelete - -> DriveDeleteOut DeleteDriveRouteV0DrivesDriveIdDelete(ctx, driveId).Confirm(confirm).XAgentdriveActor(xAgentdriveActor).IfMatch(ifMatch).Execute() - -Soft-delete a drive - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - driveId := "driveId_example" // string | - confirm := "confirm_example" // string | (optional) - xAgentdriveActor := "xAgentdriveActor_example" // string | (optional) - ifMatch := "ifMatch_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.DeleteDriveRouteV0DrivesDriveIdDelete(context.Background(), driveId).Confirm(confirm).XAgentdriveActor(xAgentdriveActor).IfMatch(ifMatch).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DeleteDriveRouteV0DrivesDriveIdDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DeleteDriveRouteV0DrivesDriveIdDelete`: DriveDeleteOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteDriveRouteV0DrivesDriveIdDelete`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**driveId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteDriveRouteV0DrivesDriveIdDeleteRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **confirm** | **string** | | - **xAgentdriveActor** | **string** | | - **ifMatch** | **string** | | - -### Return type - -[**DriveDeleteOut**](DriveDeleteOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## DeleteFolderByIdV0FoldersFldIdDelete - -> FolderDeleteOut DeleteFolderByIdV0FoldersFldIdDelete(ctx, fldId).Recursive(recursive).XAgentdriveActor(xAgentdriveActor).IfMatch(ifMatch).Execute() - -Soft-delete a folder by stable ID (cascade with ?recursive=true) - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - fldId := "fldId_example" // string | - recursive := true // bool | (optional) (default to false) - xAgentdriveActor := "xAgentdriveActor_example" // string | (optional) - ifMatch := "ifMatch_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.DeleteFolderByIdV0FoldersFldIdDelete(context.Background(), fldId).Recursive(recursive).XAgentdriveActor(xAgentdriveActor).IfMatch(ifMatch).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DeleteFolderByIdV0FoldersFldIdDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DeleteFolderByIdV0FoldersFldIdDelete`: FolderDeleteOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteFolderByIdV0FoldersFldIdDelete`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**fldId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteFolderByIdV0FoldersFldIdDeleteRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **recursive** | **bool** | | [default to false] - **xAgentdriveActor** | **string** | | - **ifMatch** | **string** | | - -### Return type - -[**FolderDeleteOut**](FolderDeleteOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## DeleteFolderByPathV0FoldersPathDelete - -> FolderDeleteOut DeleteFolderByPathV0FoldersPathDelete(ctx, path).Recursive(recursive).XAgentdriveActor(xAgentdriveActor).IfMatch(ifMatch).Execute() - -Soft-delete a folder (cascade with ?recursive=true) - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - path := "path_example" // string | - recursive := true // bool | (optional) (default to false) - xAgentdriveActor := "xAgentdriveActor_example" // string | (optional) - ifMatch := "ifMatch_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.DeleteFolderByPathV0FoldersPathDelete(context.Background(), path).Recursive(recursive).XAgentdriveActor(xAgentdriveActor).IfMatch(ifMatch).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DeleteFolderByPathV0FoldersPathDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DeleteFolderByPathV0FoldersPathDelete`: FolderDeleteOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteFolderByPathV0FoldersPathDelete`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**path** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteFolderByPathV0FoldersPathDeleteRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **recursive** | **bool** | | [default to false] - **xAgentdriveActor** | **string** | | - **ifMatch** | **string** | | - -### Return type - -[**FolderDeleteOut**](FolderDeleteOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## DeleteGrantRouteV0GrantsGrnIdDelete - -> RevokeOut DeleteGrantRouteV0GrantsGrnIdDelete(ctx, grnId).XAgentdriveActor(xAgentdriveActor).Execute() - -Revoke a grant (can_manage, or self-revoke own grant) - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - grnId := "grnId_example" // string | - xAgentdriveActor := "xAgentdriveActor_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.DeleteGrantRouteV0GrantsGrnIdDelete(context.Background(), grnId).XAgentdriveActor(xAgentdriveActor).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DeleteGrantRouteV0GrantsGrnIdDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DeleteGrantRouteV0GrantsGrnIdDelete`: RevokeOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteGrantRouteV0GrantsGrnIdDelete`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**grnId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteGrantRouteV0GrantsGrnIdDeleteRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **xAgentdriveActor** | **string** | | - -### Return type - -[**RevokeOut**](RevokeOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## DeleteShareRouteV0SharesShrIdDelete - -> RevokeOut DeleteShareRouteV0SharesShrIdDelete(ctx, shrId).XAgentdriveActor(xAgentdriveActor).Execute() - -Revoke a share link (requires can_manage) - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - shrId := "shrId_example" // string | - xAgentdriveActor := "xAgentdriveActor_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.DeleteShareRouteV0SharesShrIdDelete(context.Background(), shrId).XAgentdriveActor(xAgentdriveActor).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DeleteShareRouteV0SharesShrIdDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DeleteShareRouteV0SharesShrIdDelete`: RevokeOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DeleteShareRouteV0SharesShrIdDelete`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**shrId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDeleteShareRouteV0SharesShrIdDeleteRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **xAgentdriveActor** | **string** | | - -### Return type - -[**RevokeOut**](RevokeOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## DownloadArtifactByIdV0ArtifactsArtIdDownloadGet - -> *os.File DownloadArtifactByIdV0ArtifactsArtIdDownloadGet(ctx, artId).Execute() - -Stream the artifact bytes by stable ID (never rendered HTML) - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - artId := "artId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.DownloadArtifactByIdV0ArtifactsArtIdDownloadGet(context.Background(), artId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DownloadArtifactByIdV0ArtifactsArtIdDownloadGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DownloadArtifactByIdV0ArtifactsArtIdDownloadGet`: *os.File - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DownloadArtifactByIdV0ArtifactsArtIdDownloadGet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**artId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDownloadArtifactByIdV0ArtifactsArtIdDownloadGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[***os.File**](*os.File.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/octet-stream, 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) - - -## DownloadArtifactByPathV0ArtifactsPathDownloadGet - -> *os.File DownloadArtifactByPathV0ArtifactsPathDownloadGet(ctx, path).Execute() - -Stream the artifact bytes by path (never rendered HTML) - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - path := "path_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.DownloadArtifactByPathV0ArtifactsPathDownloadGet(context.Background(), path).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DownloadArtifactByPathV0ArtifactsPathDownloadGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DownloadArtifactByPathV0ArtifactsPathDownloadGet`: *os.File - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DownloadArtifactByPathV0ArtifactsPathDownloadGet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**path** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDownloadArtifactByPathV0ArtifactsPathDownloadGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[***os.File**](*os.File.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/octet-stream, 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) - - -## DownloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGet - -> *os.File DownloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGet(ctx, artId, versionNumber).Execute() - -Stream bytes for a specific version (machine surface) - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - artId := "artId_example" // string | - versionNumber := int32(56) // int32 | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.DownloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGet(context.Background(), artId, versionNumber).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DownloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DownloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGet`: *os.File - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DownloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**artId** | **string** | | -**versionNumber** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDownloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - -### Return type - -[***os.File**](*os.File.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/octet-stream, 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) - - -## DownloadUrlByIdV0ArtifactsArtIdDownloadUrlGet - -> DownloadUrlOut DownloadUrlByIdV0ArtifactsArtIdDownloadUrlGet(ctx, artId).Execute() - -Signed direct-from-GCS download URL by stable ID - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - artId := "artId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.DownloadUrlByIdV0ArtifactsArtIdDownloadUrlGet(context.Background(), artId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DownloadUrlByIdV0ArtifactsArtIdDownloadUrlGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DownloadUrlByIdV0ArtifactsArtIdDownloadUrlGet`: DownloadUrlOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DownloadUrlByIdV0ArtifactsArtIdDownloadUrlGet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**artId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDownloadUrlByIdV0ArtifactsArtIdDownloadUrlGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**DownloadUrlOut**](DownloadUrlOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## DownloadUrlByPathV0ArtifactsPathDownloadUrlGet - -> DownloadUrlOut DownloadUrlByPathV0ArtifactsPathDownloadUrlGet(ctx, path).Execute() - -Signed direct-from-GCS download URL by path - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - path := "path_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.DownloadUrlByPathV0ArtifactsPathDownloadUrlGet(context.Background(), path).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DownloadUrlByPathV0ArtifactsPathDownloadUrlGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DownloadUrlByPathV0ArtifactsPathDownloadUrlGet`: DownloadUrlOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DownloadUrlByPathV0ArtifactsPathDownloadUrlGet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**path** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDownloadUrlByPathV0ArtifactsPathDownloadUrlGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**DownloadUrlOut**](DownloadUrlOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## DownloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGet - -> DownloadUrlOut DownloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGet(ctx, artId, versionNumber).Execute() - -Signed direct-from-GCS download URL for a specific version - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - artId := "artId_example" // string | - versionNumber := int32(56) // int32 | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.DownloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGet(context.Background(), artId, versionNumber).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.DownloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `DownloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGet`: DownloadUrlOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.DownloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**artId** | **string** | | -**versionNumber** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiDownloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - -### Return type - -[**DownloadUrlOut**](DownloadUrlOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## EnqueueJobV0ProjectsFldIdJobsPost - -> CompileJobOut EnqueueJobV0ProjectsFldIdJobsPost(ctx, fldId).CompileJobIn(compileJobIn).XAgentdriveActor(xAgentdriveActor).Execute() - -Enqueue a compile job for a project (folder) - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - fldId := "fldId_example" // string | - compileJobIn := *openapiclient.NewCompileJobIn() // CompileJobIn | - xAgentdriveActor := "xAgentdriveActor_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.EnqueueJobV0ProjectsFldIdJobsPost(context.Background(), fldId).CompileJobIn(compileJobIn).XAgentdriveActor(xAgentdriveActor).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.EnqueueJobV0ProjectsFldIdJobsPost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `EnqueueJobV0ProjectsFldIdJobsPost`: CompileJobOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.EnqueueJobV0ProjectsFldIdJobsPost`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**fldId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiEnqueueJobV0ProjectsFldIdJobsPostRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **compileJobIn** | [**CompileJobIn**](CompileJobIn.md) | | - **xAgentdriveActor** | **string** | | - -### Return type - -[**CompileJobOut**](CompileJobOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **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) - - -## ExtensionStartAuthExtensionStartGet - -> ExtensionStartAuthExtensionStartGet(ctx).ExtId(extId).Execute() - -Extension Start - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - extId := "extId_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.DefaultAPI.ExtensionStartAuthExtensionStartGet(context.Background()).ExtId(extId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.ExtensionStartAuthExtensionStartGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiExtensionStartAuthExtensionStartGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **extId** | **string** | | - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### 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) - - -## FindV0FindGet - -> FindPage FindV0FindGet(ctx).Q(q).Mode(mode).Label(label).FileType(fileType).Prefix(prefix).Modality(modality).UpdatedAfter(updatedAfter).UpdatedBefore(updatedBefore).Limit(limit).Execute() - -Hybrid passage retrieval over the full file body - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - "time" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - q := "q_example" // string | - mode := "mode_example" // string | (optional) (default to "hybrid") - label := []string{"Inner_example"} // []string | (optional) - fileType := "fileType_example" // string | (optional) - prefix := "prefix_example" // string | (optional) - modality := []*string{"Inner_example"} // []*string | (optional) - updatedAfter := time.Now() // time.Time | (optional) - updatedBefore := time.Now() // time.Time | (optional) - limit := int32(56) // int32 | (optional) (default to 20) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.FindV0FindGet(context.Background()).Q(q).Mode(mode).Label(label).FileType(fileType).Prefix(prefix).Modality(modality).UpdatedAfter(updatedAfter).UpdatedBefore(updatedBefore).Limit(limit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.FindV0FindGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `FindV0FindGet`: FindPage - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.FindV0FindGet`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiFindV0FindGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **q** | **string** | | - **mode** | **string** | | [default to "hybrid"] - **label** | **[]string** | | - **fileType** | **string** | | - **prefix** | **string** | | - **modality** | **[]string** | | - **updatedAfter** | **time.Time** | | - **updatedBefore** | **time.Time** | | - **limit** | **int32** | | [default to 20] - -### Return type - -[**FindPage**](FindPage.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## GetArtifactByIdMetaV0ArtifactsArtIdMetaGet - -> ArtifactOut GetArtifactByIdMetaV0ArtifactsArtIdMetaGet(ctx, artId).Execute() - -Artifact metadata by stable ID (same shape as path /meta) - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - artId := "artId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.GetArtifactByIdMetaV0ArtifactsArtIdMetaGet(context.Background(), artId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetArtifactByIdMetaV0ArtifactsArtIdMetaGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetArtifactByIdMetaV0ArtifactsArtIdMetaGet`: ArtifactOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetArtifactByIdMetaV0ArtifactsArtIdMetaGet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**artId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetArtifactByIdMetaV0ArtifactsArtIdMetaGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**ArtifactOut**](ArtifactOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## GetArtifactByIdV0ArtifactsArtIdGet - -> ArtifactOut GetArtifactByIdV0ArtifactsArtIdGet(ctx, artId).Execute() - -Canonical lookup of an artifact by its stable ID - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - artId := "artId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.GetArtifactByIdV0ArtifactsArtIdGet(context.Background(), artId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetArtifactByIdV0ArtifactsArtIdGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetArtifactByIdV0ArtifactsArtIdGet`: ArtifactOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetArtifactByIdV0ArtifactsArtIdGet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**artId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetArtifactByIdV0ArtifactsArtIdGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**ArtifactOut**](ArtifactOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## GetArtifactMetaV0ArtifactsPathMetaGet - -> ArtifactOut GetArtifactMetaV0ArtifactsPathMetaGet(ctx, path).Execute() - -Get Artifact Meta - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - path := "path_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.GetArtifactMetaV0ArtifactsPathMetaGet(context.Background(), path).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetArtifactMetaV0ArtifactsPathMetaGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetArtifactMetaV0ArtifactsPathMetaGet`: ArtifactOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetArtifactMetaV0ArtifactsPathMetaGet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**path** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetArtifactMetaV0ArtifactsPathMetaGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**ArtifactOut**](ArtifactOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## GetArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGet - -> VersionOut GetArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGet(ctx, artId, versionNumber).Execute() - -Metadata for a specific version of an artifact - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - artId := "artId_example" // string | - versionNumber := int32(56) // int32 | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.GetArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGet(context.Background(), artId, versionNumber).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGet`: VersionOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**artId** | **string** | | -**versionNumber** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - -### Return type - -[**VersionOut**](VersionOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## GetDriveRouteV0DrivesDriveIdGet - -> DriveReadOut GetDriveRouteV0DrivesDriveIdGet(ctx, driveId).Execute() - -Drive overview by id (same shape as /drives/me) - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - driveId := "driveId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.GetDriveRouteV0DrivesDriveIdGet(context.Background(), driveId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetDriveRouteV0DrivesDriveIdGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetDriveRouteV0DrivesDriveIdGet`: DriveReadOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetDriveRouteV0DrivesDriveIdGet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**driveId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetDriveRouteV0DrivesDriveIdGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**DriveReadOut**](DriveReadOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## GetFeedbackStatusV0FeedbackFbkIdGet - -> FeedbackStatusOut GetFeedbackStatusV0FeedbackFbkIdGet(ctx, fbkId).Execute() - -Get Feedback Status - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - fbkId := "fbkId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.GetFeedbackStatusV0FeedbackFbkIdGet(context.Background(), fbkId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetFeedbackStatusV0FeedbackFbkIdGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetFeedbackStatusV0FeedbackFbkIdGet`: FeedbackStatusOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetFeedbackStatusV0FeedbackFbkIdGet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**fbkId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetFeedbackStatusV0FeedbackFbkIdGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**FeedbackStatusOut**](FeedbackStatusOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## GetFolderByIdMetaV0FoldersFldIdMetaGet - -> FolderOut GetFolderByIdMetaV0FoldersFldIdMetaGet(ctx, fldId).Execute() - -Folder metadata by stable ID (same shape as the bare id route) - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - fldId := "fldId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.GetFolderByIdMetaV0FoldersFldIdMetaGet(context.Background(), fldId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetFolderByIdMetaV0FoldersFldIdMetaGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetFolderByIdMetaV0FoldersFldIdMetaGet`: FolderOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetFolderByIdMetaV0FoldersFldIdMetaGet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**fldId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetFolderByIdMetaV0FoldersFldIdMetaGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**FolderOut**](FolderOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## GetFolderByIdV0FoldersFldIdGet - -> FolderOut GetFolderByIdV0FoldersFldIdGet(ctx, fldId).Execute() - -Canonical lookup of a folder by its stable ID - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - fldId := "fldId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.GetFolderByIdV0FoldersFldIdGet(context.Background(), fldId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetFolderByIdV0FoldersFldIdGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetFolderByIdV0FoldersFldIdGet`: FolderOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetFolderByIdV0FoldersFldIdGet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**fldId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetFolderByIdV0FoldersFldIdGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**FolderOut**](FolderOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## GetFolderByPathMetaV0FoldersPathMetaGet - -> FolderOut GetFolderByPathMetaV0FoldersPathMetaGet(ctx, path).Execute() - -Folder metadata by path (same shape as the bare path route) - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - path := "path_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.GetFolderByPathMetaV0FoldersPathMetaGet(context.Background(), path).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetFolderByPathMetaV0FoldersPathMetaGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetFolderByPathMetaV0FoldersPathMetaGet`: FolderOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetFolderByPathMetaV0FoldersPathMetaGet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**path** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetFolderByPathMetaV0FoldersPathMetaGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**FolderOut**](FolderOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## GetFolderByPathV0FoldersPathGet - -> FolderOut GetFolderByPathV0FoldersPathGet(ctx, path).Execute() - -Read folder metadata by path - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - path := "path_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.GetFolderByPathV0FoldersPathGet(context.Background(), path).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetFolderByPathV0FoldersPathGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetFolderByPathV0FoldersPathGet`: FolderOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetFolderByPathV0FoldersPathGet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**path** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetFolderByPathV0FoldersPathGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**FolderOut**](FolderOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## GetGrantRouteV0GrantsGrnIdGet - -> GrantOut GetGrantRouteV0GrantsGrnIdGet(ctx, grnId).Execute() - -Read a single grant (can_manage, or the grant's own principal) - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - grnId := "grnId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.GetGrantRouteV0GrantsGrnIdGet(context.Background(), grnId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetGrantRouteV0GrantsGrnIdGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetGrantRouteV0GrantsGrnIdGet`: GrantOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetGrantRouteV0GrantsGrnIdGet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**grnId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetGrantRouteV0GrantsGrnIdGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**GrantOut**](GrantOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## GetJobLogsV0JobsJobIdLogsGet - -> string GetJobLogsV0JobsJobIdLogsGet(ctx, jobId).Execute() - -Raw compile log (text/plain) - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - jobId := "jobId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.GetJobLogsV0JobsJobIdLogsGet(context.Background(), jobId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetJobLogsV0JobsJobIdLogsGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetJobLogsV0JobsJobIdLogsGet`: string - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetJobLogsV0JobsJobIdLogsGet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**jobId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetJobLogsV0JobsJobIdLogsGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -**string** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: text/plain, 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) - - -## GetJobV0JobsJobIdGet - -> CompileJobOut GetJobV0JobsJobIdGet(ctx, jobId).Execute() - -Poll a job - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - jobId := "jobId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.GetJobV0JobsJobIdGet(context.Background(), jobId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetJobV0JobsJobIdGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetJobV0JobsJobIdGet`: CompileJobOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetJobV0JobsJobIdGet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**jobId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetJobV0JobsJobIdGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**CompileJobOut**](CompileJobOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## GetProjectV0ProjectsFldIdGet - -> CompileProjectOut GetProjectV0ProjectsFldIdGet(ctx, fldId).Execute() - -Get a project's compile config - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - fldId := "fldId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.GetProjectV0ProjectsFldIdGet(context.Background(), fldId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetProjectV0ProjectsFldIdGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetProjectV0ProjectsFldIdGet`: CompileProjectOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetProjectV0ProjectsFldIdGet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**fldId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetProjectV0ProjectsFldIdGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**CompileProjectOut**](CompileProjectOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## GetShareRouteV0SharesShrIdGet - -> ShareOut GetShareRouteV0SharesShrIdGet(ctx, shrId).Execute() - -Read a single share link's metadata (requires can_manage) - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - shrId := "shrId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.GetShareRouteV0SharesShrIdGet(context.Background(), shrId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetShareRouteV0SharesShrIdGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetShareRouteV0SharesShrIdGet`: ShareOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetShareRouteV0SharesShrIdGet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**shrId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetShareRouteV0SharesShrIdGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**ShareOut**](ShareOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## GetUploadStatusV0UploadsUploadIdGet - -> UploadStatusOut GetUploadStatusV0UploadsUploadIdGet(ctx, uploadId).Execute() - -Get the status of a large (direct-to-GCS) upload session - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - uploadId := "uploadId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.GetUploadStatusV0UploadsUploadIdGet(context.Background(), uploadId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.GetUploadStatusV0UploadsUploadIdGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `GetUploadStatusV0UploadsUploadIdGet`: UploadStatusOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.GetUploadStatusV0UploadsUploadIdGet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**uploadId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiGetUploadStatusV0UploadsUploadIdGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**UploadStatusOut**](UploadStatusOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## HealthHealthGet - -> HealthOut HealthHealthGet(ctx).Execute() - -Health - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.HealthHealthGet(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.HealthHealthGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `HealthHealthGet`: HealthOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.HealthHealthGet`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiHealthHealthGetRequest struct via the builder pattern - - -### Return type - -[**HealthOut**](HealthOut.md) - -### Authorization - -No authorization required - -### 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) - - -## ListArtifactVersionsV0ArtifactsArtIdVersionsGet - -> VersionPage ListArtifactVersionsV0ArtifactsArtIdVersionsGet(ctx, artId).Cursor(cursor).Limit(limit).Execute() - -List versions of an artifact, newest first - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - artId := "artId_example" // string | - cursor := "cursor_example" // string | (optional) - limit := int32(56) // int32 | (optional) (default to 50) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.ListArtifactVersionsV0ArtifactsArtIdVersionsGet(context.Background(), artId).Cursor(cursor).Limit(limit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.ListArtifactVersionsV0ArtifactsArtIdVersionsGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListArtifactVersionsV0ArtifactsArtIdVersionsGet`: VersionPage - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.ListArtifactVersionsV0ArtifactsArtIdVersionsGet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**artId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiListArtifactVersionsV0ArtifactsArtIdVersionsGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **cursor** | **string** | | - **limit** | **int32** | | [default to 50] - -### Return type - -[**VersionPage**](VersionPage.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## ListArtifactsV0ArtifactsGet - -> Page ListArtifactsV0ArtifactsGet(ctx).Prefix(prefix).Label(label).FileType(fileType).Cursor(cursor).Limit(limit).Execute() - -List artifacts in the drive - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - prefix := "prefix_example" // string | (optional) (default to "") - label := []*string{"Inner_example"} // []*string | (optional) - fileType := "fileType_example" // string | (optional) - cursor := "cursor_example" // string | (optional) - limit := int32(56) // int32 | (optional) (default to 50) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.ListArtifactsV0ArtifactsGet(context.Background()).Prefix(prefix).Label(label).FileType(fileType).Cursor(cursor).Limit(limit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.ListArtifactsV0ArtifactsGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListArtifactsV0ArtifactsGet`: Page - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.ListArtifactsV0ArtifactsGet`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiListArtifactsV0ArtifactsGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **prefix** | **string** | | [default to ""] - **label** | **[]string** | | - **fileType** | **string** | | - **cursor** | **string** | | - **limit** | **int32** | | [default to 50] - -### Return type - -[**Page**](Page.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## ListEventsRouteV0EventsGet - -> EventPage ListEventsRouteV0EventsGet(ctx).ArtId(artId).Action(action).Since(since).Before(before).Cursor(cursor).Limit(limit).Execute() - -Read the append-only event log for the authenticated drive - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - "time" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - artId := "artId_example" // string | (optional) - action := "action_example" // string | (optional) - since := time.Now() // time.Time | (optional) - before := time.Now() // time.Time | (optional) - cursor := "cursor_example" // string | (optional) - limit := int32(56) // int32 | (optional) (default to 50) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.ListEventsRouteV0EventsGet(context.Background()).ArtId(artId).Action(action).Since(since).Before(before).Cursor(cursor).Limit(limit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.ListEventsRouteV0EventsGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListEventsRouteV0EventsGet`: EventPage - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.ListEventsRouteV0EventsGet`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiListEventsRouteV0EventsGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **artId** | **string** | | - **action** | **string** | | - **since** | **time.Time** | | - **before** | **time.Time** | | - **cursor** | **string** | | - **limit** | **int32** | | [default to 50] - -### Return type - -[**EventPage**](EventPage.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## ListGrantsRouteV0GrantsGet - -> GrantList ListGrantsRouteV0GrantsGet(ctx).Resource(resource).Cursor(cursor).Limit(limit).Execute() - -List live grants on a resource (requires can_manage) - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - resource := "resource_example" // string | art_*_/fld_* id or a path - cursor := "cursor_example" // string | (optional) - limit := int32(56) // int32 | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.ListGrantsRouteV0GrantsGet(context.Background()).Resource(resource).Cursor(cursor).Limit(limit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.ListGrantsRouteV0GrantsGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListGrantsRouteV0GrantsGet`: GrantList - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.ListGrantsRouteV0GrantsGet`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiListGrantsRouteV0GrantsGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **resource** | **string** | art_*_/fld_* id or a path | - **cursor** | **string** | | - **limit** | **int32** | | - -### Return type - -[**GrantList**](GrantList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## ListProjectJobsV0ProjectsFldIdJobsGet - -> CompileJobListOut ListProjectJobsV0ProjectsFldIdJobsGet(ctx, fldId).Status(status).Limit(limit).Cursor(cursor).Execute() - -List a project's jobs - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - fldId := "fldId_example" // string | - status := "status_example" // string | (optional) - limit := int32(56) // int32 | (optional) (default to 50) - cursor := "cursor_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.ListProjectJobsV0ProjectsFldIdJobsGet(context.Background(), fldId).Status(status).Limit(limit).Cursor(cursor).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.ListProjectJobsV0ProjectsFldIdJobsGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListProjectJobsV0ProjectsFldIdJobsGet`: CompileJobListOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.ListProjectJobsV0ProjectsFldIdJobsGet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**fldId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiListProjectJobsV0ProjectsFldIdJobsGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **status** | **string** | | - **limit** | **int32** | | [default to 50] - **cursor** | **string** | | - -### Return type - -[**CompileJobListOut**](CompileJobListOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## ListSharesRouteV0SharesGet - -> ShareList ListSharesRouteV0SharesGet(ctx).Resource(resource).Cursor(cursor).Limit(limit).Execute() - -List live share links on a resource (requires can_manage) - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - resource := "resource_example" // string | art_*_/fld_* id or a path - cursor := "cursor_example" // string | (optional) - limit := int32(56) // int32 | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.ListSharesRouteV0SharesGet(context.Background()).Resource(resource).Cursor(cursor).Limit(limit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.ListSharesRouteV0SharesGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListSharesRouteV0SharesGet`: ShareList - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.ListSharesRouteV0SharesGet`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiListSharesRouteV0SharesGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **resource** | **string** | art_*_/fld_* id or a path | - **cursor** | **string** | | - **limit** | **int32** | | - -### Return type - -[**ShareList**](ShareList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## ListTrashRouteV0DrivesDriveIdTrashGet - -> TrashOut ListTrashRouteV0DrivesDriveIdTrashGet(ctx, driveId).Cursor(cursor).Limit(limit).Execute() - -List the authenticated drive's trash - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - driveId := "driveId_example" // string | - cursor := "cursor_example" // string | (optional) - limit := int32(56) // int32 | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.ListTrashRouteV0DrivesDriveIdTrashGet(context.Background(), driveId).Cursor(cursor).Limit(limit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.ListTrashRouteV0DrivesDriveIdTrashGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListTrashRouteV0DrivesDriveIdTrashGet`: TrashOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.ListTrashRouteV0DrivesDriveIdTrashGet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**driveId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiListTrashRouteV0DrivesDriveIdTrashGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **cursor** | **string** | | - **limit** | **int32** | | - -### Return type - -[**TrashOut**](TrashOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## LoginAuthLoginGet - -> LoginAuthLoginGet(ctx).ReturnTo(returnTo).Execute() - -Login - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - returnTo := "returnTo_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.DefaultAPI.LoginAuthLoginGet(context.Background()).ReturnTo(returnTo).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.LoginAuthLoginGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiLoginAuthLoginGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **returnTo** | **string** | | - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### 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) - - -## LogoutAuthLogoutPost - -> LogoutAuthLogoutPost(ctx).Csrf(csrf).Execute() - -Logout - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - csrf := "csrf_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.DefaultAPI.LogoutAuthLogoutPost(context.Background()).Csrf(csrf).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.LogoutAuthLogoutPost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiLogoutAuthLogoutPostRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **csrf** | **string** | | - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **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) - - -## MeUsageV0DrivesMeUsageGet - -> DriveUsageOut MeUsageV0DrivesMeUsageGet(ctx).Execute() - -Current-period usage + caps for the authenticated drive - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.MeUsageV0DrivesMeUsageGet(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.MeUsageV0DrivesMeUsageGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `MeUsageV0DrivesMeUsageGet`: DriveUsageOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.MeUsageV0DrivesMeUsageGet`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiMeUsageV0DrivesMeUsageGetRequest struct via the builder pattern - - -### Return type - -[**DriveUsageOut**](DriveUsageOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## MeV0DrivesMeGet - -> DriveReadOut MeV0DrivesMeGet(ctx).Execute() - -Me - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.MeV0DrivesMeGet(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.MeV0DrivesMeGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `MeV0DrivesMeGet`: DriveReadOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.MeV0DrivesMeGet`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiMeV0DrivesMeGetRequest struct via the builder pattern - - -### Return type - -[**DriveReadOut**](DriveReadOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## MoveArtifactRouteV0ArtifactsArtIdMovePost - -> ArtifactOut MoveArtifactRouteV0ArtifactsArtIdMovePost(ctx, artId).ArtifactMoveIn(artifactMoveIn).XAgentdriveActor(xAgentdriveActor).IfMatch(ifMatch).Execute() - -Rename / move an artifact to a new path - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - artId := "artId_example" // string | - artifactMoveIn := *openapiclient.NewArtifactMoveIn("Path_example") // ArtifactMoveIn | - xAgentdriveActor := "xAgentdriveActor_example" // string | (optional) - ifMatch := "ifMatch_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.MoveArtifactRouteV0ArtifactsArtIdMovePost(context.Background(), artId).ArtifactMoveIn(artifactMoveIn).XAgentdriveActor(xAgentdriveActor).IfMatch(ifMatch).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.MoveArtifactRouteV0ArtifactsArtIdMovePost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `MoveArtifactRouteV0ArtifactsArtIdMovePost`: ArtifactOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.MoveArtifactRouteV0ArtifactsArtIdMovePost`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**artId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiMoveArtifactRouteV0ArtifactsArtIdMovePostRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **artifactMoveIn** | [**ArtifactMoveIn**](ArtifactMoveIn.md) | | - **xAgentdriveActor** | **string** | | - **ifMatch** | **string** | | - -### Return type - -[**ArtifactOut**](ArtifactOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **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) - - -## MoveFolderByIdV0FoldersFldIdMovePost - -> FolderOut MoveFolderByIdV0FoldersFldIdMovePost(ctx, fldId).FolderMoveIn(folderMoveIn).XAgentdriveActor(xAgentdriveActor).IfMatch(ifMatch).Execute() - -Rename / move a folder by stable ID (cascade descendants) - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - fldId := "fldId_example" // string | - folderMoveIn := *openapiclient.NewFolderMoveIn("Path_example") // FolderMoveIn | - xAgentdriveActor := "xAgentdriveActor_example" // string | (optional) - ifMatch := "ifMatch_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.MoveFolderByIdV0FoldersFldIdMovePost(context.Background(), fldId).FolderMoveIn(folderMoveIn).XAgentdriveActor(xAgentdriveActor).IfMatch(ifMatch).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.MoveFolderByIdV0FoldersFldIdMovePost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `MoveFolderByIdV0FoldersFldIdMovePost`: FolderOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.MoveFolderByIdV0FoldersFldIdMovePost`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**fldId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiMoveFolderByIdV0FoldersFldIdMovePostRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **folderMoveIn** | [**FolderMoveIn**](FolderMoveIn.md) | | - **xAgentdriveActor** | **string** | | - **ifMatch** | **string** | | - -### Return type - -[**FolderOut**](FolderOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **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) - - -## MoveFolderByPathV0FoldersPathMovePost - -> FolderOut MoveFolderByPathV0FoldersPathMovePost(ctx, path).FolderMoveIn(folderMoveIn).XAgentdriveActor(xAgentdriveActor).IfMatch(ifMatch).Execute() - -Rename / move a folder (cascade-update descendants) - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - path := "path_example" // string | - folderMoveIn := *openapiclient.NewFolderMoveIn("Path_example") // FolderMoveIn | - xAgentdriveActor := "xAgentdriveActor_example" // string | (optional) - ifMatch := "ifMatch_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.MoveFolderByPathV0FoldersPathMovePost(context.Background(), path).FolderMoveIn(folderMoveIn).XAgentdriveActor(xAgentdriveActor).IfMatch(ifMatch).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.MoveFolderByPathV0FoldersPathMovePost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `MoveFolderByPathV0FoldersPathMovePost`: FolderOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.MoveFolderByPathV0FoldersPathMovePost`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**path** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiMoveFolderByPathV0FoldersPathMovePostRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **folderMoveIn** | [**FolderMoveIn**](FolderMoveIn.md) | | - **xAgentdriveActor** | **string** | | - **ifMatch** | **string** | | - -### Return type - -[**FolderOut**](FolderOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **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) - - -## PatchArtifactRouteV0ArtifactsArtIdPatch - -> ArtifactOut PatchArtifactRouteV0ArtifactsArtIdPatch(ctx, artId).ArtifactPatchIn(artifactPatchIn).XAgentdriveActor(xAgentdriveActor).IfMatch(ifMatch).Execute() - -Edit artifact metadata (labels / metadata / source) - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - artId := "artId_example" // string | - artifactPatchIn := *openapiclient.NewArtifactPatchIn() // ArtifactPatchIn | - xAgentdriveActor := "xAgentdriveActor_example" // string | (optional) - ifMatch := "ifMatch_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.PatchArtifactRouteV0ArtifactsArtIdPatch(context.Background(), artId).ArtifactPatchIn(artifactPatchIn).XAgentdriveActor(xAgentdriveActor).IfMatch(ifMatch).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.PatchArtifactRouteV0ArtifactsArtIdPatch``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `PatchArtifactRouteV0ArtifactsArtIdPatch`: ArtifactOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.PatchArtifactRouteV0ArtifactsArtIdPatch`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**artId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiPatchArtifactRouteV0ArtifactsArtIdPatchRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **artifactPatchIn** | [**ArtifactPatchIn**](ArtifactPatchIn.md) | | - **xAgentdriveActor** | **string** | | - **ifMatch** | **string** | | - -### Return type - -[**ArtifactOut**](ArtifactOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **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) - - -## PatchFolderByIdV0FoldersFldIdPatch - -> FolderOut PatchFolderByIdV0FoldersFldIdPatch(ctx, fldId).FolderPatchIn(folderPatchIn).XAgentdriveActor(xAgentdriveActor).IfMatch(ifMatch).Execute() - -Update folder metadata by stable ID - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - fldId := "fldId_example" // string | - folderPatchIn := *openapiclient.NewFolderPatchIn() // FolderPatchIn | - xAgentdriveActor := "xAgentdriveActor_example" // string | (optional) - ifMatch := "ifMatch_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.PatchFolderByIdV0FoldersFldIdPatch(context.Background(), fldId).FolderPatchIn(folderPatchIn).XAgentdriveActor(xAgentdriveActor).IfMatch(ifMatch).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.PatchFolderByIdV0FoldersFldIdPatch``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `PatchFolderByIdV0FoldersFldIdPatch`: FolderOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.PatchFolderByIdV0FoldersFldIdPatch`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**fldId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiPatchFolderByIdV0FoldersFldIdPatchRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **folderPatchIn** | [**FolderPatchIn**](FolderPatchIn.md) | | - **xAgentdriveActor** | **string** | | - **ifMatch** | **string** | | - -### Return type - -[**FolderOut**](FolderOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **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) - - -## PatchFolderByPathV0FoldersPathPatch - -> FolderOut PatchFolderByPathV0FoldersPathPatch(ctx, path).FolderPatchIn(folderPatchIn).XAgentdriveActor(xAgentdriveActor).IfMatch(ifMatch).Execute() - -Update folder metadata by path - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - path := "path_example" // string | - folderPatchIn := *openapiclient.NewFolderPatchIn() // FolderPatchIn | - xAgentdriveActor := "xAgentdriveActor_example" // string | (optional) - ifMatch := "ifMatch_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.PatchFolderByPathV0FoldersPathPatch(context.Background(), path).FolderPatchIn(folderPatchIn).XAgentdriveActor(xAgentdriveActor).IfMatch(ifMatch).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.PatchFolderByPathV0FoldersPathPatch``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `PatchFolderByPathV0FoldersPathPatch`: FolderOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.PatchFolderByPathV0FoldersPathPatch`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**path** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiPatchFolderByPathV0FoldersPathPatchRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **folderPatchIn** | [**FolderPatchIn**](FolderPatchIn.md) | | - **xAgentdriveActor** | **string** | | - **ifMatch** | **string** | | - -### Return type - -[**FolderOut**](FolderOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **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) - - -## PatchGrantRouteV0GrantsGrnIdPatch - -> GrantOut PatchGrantRouteV0GrantsGrnIdPatch(ctx, grnId).GrantPatchIn(grantPatchIn).XAgentdriveActor(xAgentdriveActor).Execute() - -Update a grant's role and/or expiry (requires can_manage) - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - grnId := "grnId_example" // string | - grantPatchIn := *openapiclient.NewGrantPatchIn() // GrantPatchIn | - xAgentdriveActor := "xAgentdriveActor_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.PatchGrantRouteV0GrantsGrnIdPatch(context.Background(), grnId).GrantPatchIn(grantPatchIn).XAgentdriveActor(xAgentdriveActor).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.PatchGrantRouteV0GrantsGrnIdPatch``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `PatchGrantRouteV0GrantsGrnIdPatch`: GrantOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.PatchGrantRouteV0GrantsGrnIdPatch`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**grnId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiPatchGrantRouteV0GrantsGrnIdPatchRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **grantPatchIn** | [**GrantPatchIn**](GrantPatchIn.md) | | - **xAgentdriveActor** | **string** | | - -### Return type - -[**GrantOut**](GrantOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **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) - - -## PostDescribeV0QueryDescribePost - -> DatasetDescriptionOut PostDescribeV0QueryDescribePost(ctx).DescribeIn(describeIn).Execute() - -Describe a dataset's column schema - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - describeIn := *openapiclient.NewDescribeIn("Dataset_example") // DescribeIn | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.PostDescribeV0QueryDescribePost(context.Background()).DescribeIn(describeIn).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.PostDescribeV0QueryDescribePost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `PostDescribeV0QueryDescribePost`: DatasetDescriptionOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.PostDescribeV0QueryDescribePost`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiPostDescribeV0QueryDescribePostRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **describeIn** | [**DescribeIn**](DescribeIn.md) | | - -### Return type - -[**DatasetDescriptionOut**](DatasetDescriptionOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **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) - - -## PostFeedbackV0FeedbackPost - -> FeedbackCreateOut PostFeedbackV0FeedbackPost(ctx).Execute() - -Post Feedback - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.PostFeedbackV0FeedbackPost(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.PostFeedbackV0FeedbackPost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `PostFeedbackV0FeedbackPost`: FeedbackCreateOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.PostFeedbackV0FeedbackPost`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiPostFeedbackV0FeedbackPostRequest struct via the builder pattern - - -### Return type - -[**FeedbackCreateOut**](FeedbackCreateOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## PostLookupValuesV0QueryLookupValuesPost - -> LookupValuesOut PostLookupValuesV0QueryLookupValuesPost(ctx).LookupValuesIn(lookupValuesIn).Execute() - -List distinct values of a dataset column - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - lookupValuesIn := *openapiclient.NewLookupValuesIn("Column_example", "Dataset_example") // LookupValuesIn | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.PostLookupValuesV0QueryLookupValuesPost(context.Background()).LookupValuesIn(lookupValuesIn).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.PostLookupValuesV0QueryLookupValuesPost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `PostLookupValuesV0QueryLookupValuesPost`: LookupValuesOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.PostLookupValuesV0QueryLookupValuesPost`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiPostLookupValuesV0QueryLookupValuesPostRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **lookupValuesIn** | [**LookupValuesIn**](LookupValuesIn.md) | | - -### Return type - -[**LookupValuesOut**](LookupValuesOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **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) - - -## PostQueryV0QueryPost - -> ResponsePostQueryV0QueryPost PostQueryV0QueryPost(ctx).QueryIn(queryIn).Execute() - -Run a read-only SQL query over authorized datasets - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - queryIn := *openapiclient.NewQueryIn("Sql_example") // QueryIn | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.PostQueryV0QueryPost(context.Background()).QueryIn(queryIn).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.PostQueryV0QueryPost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `PostQueryV0QueryPost`: ResponsePostQueryV0QueryPost - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.PostQueryV0QueryPost`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiPostQueryV0QueryPostRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **queryIn** | [**QueryIn**](QueryIn.md) | | - -### Return type - -[**ResponsePostQueryV0QueryPost**](ResponsePostQueryV0QueryPost.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **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) - - -## PutArtifactV0ArtifactsPathPut - -> ArtifactOut PutArtifactV0ArtifactsPathPut(ctx, path).ContentType(contentType).XAgentdriveLabels(xAgentdriveLabels).XAgentdriveMetadata(xAgentdriveMetadata).XAgentdriveSource(xAgentdriveSource).XAgentdriveActor(xAgentdriveActor).XAgentdriveChangeSummary(xAgentdriveChangeSummary).XAgentdriveChecksum(xAgentdriveChecksum).ContentMd5(contentMd5).IfMatch(ifMatch).IfNoneMatch(ifNoneMatch).Execute() - -Upload (or overwrite) an artifact - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - path := "path_example" // string | - contentType := "contentType_example" // string | (optional) (default to "application/octet-stream") - xAgentdriveLabels := "xAgentdriveLabels_example" // string | (optional) - xAgentdriveMetadata := "xAgentdriveMetadata_example" // string | (optional) - xAgentdriveSource := "xAgentdriveSource_example" // string | (optional) - xAgentdriveActor := "xAgentdriveActor_example" // string | (optional) - xAgentdriveChangeSummary := "xAgentdriveChangeSummary_example" // string | (optional) - xAgentdriveChecksum := "xAgentdriveChecksum_example" // string | (optional) - contentMd5 := "contentMd5_example" // string | (optional) - ifMatch := "ifMatch_example" // string | (optional) - ifNoneMatch := "ifNoneMatch_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.PutArtifactV0ArtifactsPathPut(context.Background(), path).ContentType(contentType).XAgentdriveLabels(xAgentdriveLabels).XAgentdriveMetadata(xAgentdriveMetadata).XAgentdriveSource(xAgentdriveSource).XAgentdriveActor(xAgentdriveActor).XAgentdriveChangeSummary(xAgentdriveChangeSummary).XAgentdriveChecksum(xAgentdriveChecksum).ContentMd5(contentMd5).IfMatch(ifMatch).IfNoneMatch(ifNoneMatch).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.PutArtifactV0ArtifactsPathPut``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `PutArtifactV0ArtifactsPathPut`: ArtifactOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.PutArtifactV0ArtifactsPathPut`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**path** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiPutArtifactV0ArtifactsPathPutRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **contentType** | **string** | | [default to "application/octet-stream"] - **xAgentdriveLabels** | **string** | | - **xAgentdriveMetadata** | **string** | | - **xAgentdriveSource** | **string** | | - **xAgentdriveActor** | **string** | | - **xAgentdriveChangeSummary** | **string** | | - **xAgentdriveChecksum** | **string** | | - **contentMd5** | **string** | | - **ifMatch** | **string** | | - **ifNoneMatch** | **string** | | - -### Return type - -[**ArtifactOut**](ArtifactOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## PutProjectV0ProjectsFldIdPut - -> CompileProjectOut PutProjectV0ProjectsFldIdPut(ctx, fldId).ProjectConfigIn(projectConfigIn).Execute() - -Set a project's compile config (entrypoint/engine/auto_compile) - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - fldId := "fldId_example" // string | - projectConfigIn := *openapiclient.NewProjectConfigIn("Entrypoint_example") // ProjectConfigIn | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.PutProjectV0ProjectsFldIdPut(context.Background(), fldId).ProjectConfigIn(projectConfigIn).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.PutProjectV0ProjectsFldIdPut``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `PutProjectV0ProjectsFldIdPut`: CompileProjectOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.PutProjectV0ProjectsFldIdPut`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**fldId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiPutProjectV0ProjectsFldIdPutRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **projectConfigIn** | [**ProjectConfigIn**](ProjectConfigIn.md) | | - -### Return type - -[**CompileProjectOut**](CompileProjectOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **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) - - -## RedeemShareSShareKeyGet - -> ShareRedeemOut RedeemShareSShareKeyGet(ctx, shareKey).Execute() - -Redeem Share - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - shareKey := "shareKey_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.RedeemShareSShareKeyGet(context.Background(), shareKey).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.RedeemShareSShareKeyGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RedeemShareSShareKeyGet`: ShareRedeemOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.RedeemShareSShareKeyGet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**shareKey** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiRedeemShareSShareKeyGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**ShareRedeemOut**](ShareRedeemOut.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json, text/html - -[[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) - - -## RedeemShareWithPasswordSShareKeyPost - -> ShareRedeemOut RedeemShareWithPasswordSShareKeyPost(ctx, shareKey).Password(password).Execute() - -Redeem Share With Password - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - shareKey := "shareKey_example" // string | - password := "password_example" // string | (optional) (default to "") - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.RedeemShareWithPasswordSShareKeyPost(context.Background(), shareKey).Password(password).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.RedeemShareWithPasswordSShareKeyPost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RedeemShareWithPasswordSShareKeyPost`: ShareRedeemOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.RedeemShareWithPasswordSShareKeyPost`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**shareKey** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiRedeemShareWithPasswordSShareKeyPostRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **password** | **string** | | [default to ""] - -### Return type - -[**ShareRedeemOut**](ShareRedeemOut.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: application/json, text/html - -[[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) - - -## RestoreArtifactV0ArtifactsArtIdRestorePost - -> ArtifactOut RestoreArtifactV0ArtifactsArtIdRestorePost(ctx, artId).Rename(rename).Overwrite(overwrite).XAgentdriveActor(xAgentdriveActor).IfMatch(ifMatch).Execute() - -Restore a soft-deleted artifact - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - artId := "artId_example" // string | - rename := "rename_example" // string | Restore at this path instead of the original. Soft-deletes the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. Mutually exclusive with `overwrite`. (optional) - overwrite := true // bool | Soft-delete the live occupant at the original path and restore there. Audit `metadata.cause='restore_conflict_overwrite'`. Mutually exclusive with `rename`. (optional) (default to false) - xAgentdriveActor := "xAgentdriveActor_example" // string | (optional) - ifMatch := "ifMatch_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.RestoreArtifactV0ArtifactsArtIdRestorePost(context.Background(), artId).Rename(rename).Overwrite(overwrite).XAgentdriveActor(xAgentdriveActor).IfMatch(ifMatch).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.RestoreArtifactV0ArtifactsArtIdRestorePost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RestoreArtifactV0ArtifactsArtIdRestorePost`: ArtifactOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.RestoreArtifactV0ArtifactsArtIdRestorePost`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**artId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiRestoreArtifactV0ArtifactsArtIdRestorePostRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **rename** | **string** | Restore at this path instead of the original. Soft-deletes the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. Mutually exclusive with `overwrite`. | - **overwrite** | **bool** | Soft-delete the live occupant at the original path and restore there. Audit `metadata.cause='restore_conflict_overwrite'`. Mutually exclusive with `rename`. | [default to false] - **xAgentdriveActor** | **string** | | - **ifMatch** | **string** | | - -### Return type - -[**ArtifactOut**](ArtifactOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## RestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePost - -> ArtifactOut RestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePost(ctx, artId, versionNumber).XAgentdriveActor(xAgentdriveActor).IfMatch(ifMatch).Execute() - -Restore a previous version as a new head version - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - artId := "artId_example" // string | - versionNumber := int32(56) // int32 | - xAgentdriveActor := "xAgentdriveActor_example" // string | (optional) - ifMatch := "ifMatch_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.RestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePost(context.Background(), artId, versionNumber).XAgentdriveActor(xAgentdriveActor).IfMatch(ifMatch).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.RestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePost`: ArtifactOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.RestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePost`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**artId** | **string** | | -**versionNumber** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiRestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePostRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **xAgentdriveActor** | **string** | | - **ifMatch** | **string** | | - -### Return type - -[**ArtifactOut**](ArtifactOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## RestoreDriveRouteV0DrivesDriveIdRestorePost - -> DriveRestoreOut RestoreDriveRouteV0DrivesDriveIdRestorePost(ctx, driveId).XAgentdriveActor(xAgentdriveActor).IfMatch(ifMatch).Execute() - -Restore a soft-deleted drive - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - driveId := "driveId_example" // string | - xAgentdriveActor := "xAgentdriveActor_example" // string | (optional) - ifMatch := "ifMatch_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.RestoreDriveRouteV0DrivesDriveIdRestorePost(context.Background(), driveId).XAgentdriveActor(xAgentdriveActor).IfMatch(ifMatch).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.RestoreDriveRouteV0DrivesDriveIdRestorePost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RestoreDriveRouteV0DrivesDriveIdRestorePost`: DriveRestoreOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.RestoreDriveRouteV0DrivesDriveIdRestorePost`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**driveId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiRestoreDriveRouteV0DrivesDriveIdRestorePostRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **xAgentdriveActor** | **string** | | - **ifMatch** | **string** | | - -### Return type - -[**DriveRestoreOut**](DriveRestoreOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## RestoreFolderByIdV0FoldersFldIdRestorePost - -> FolderRestoreOut RestoreFolderByIdV0FoldersFldIdRestorePost(ctx, fldId).XAgentdriveActor(xAgentdriveActor).IfMatch(ifMatch).Execute() - -Restore a soft-deleted folder (cascade) - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - fldId := "fldId_example" // string | - xAgentdriveActor := "xAgentdriveActor_example" // string | (optional) - ifMatch := "ifMatch_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.RestoreFolderByIdV0FoldersFldIdRestorePost(context.Background(), fldId).XAgentdriveActor(xAgentdriveActor).IfMatch(ifMatch).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.RestoreFolderByIdV0FoldersFldIdRestorePost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RestoreFolderByIdV0FoldersFldIdRestorePost`: FolderRestoreOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.RestoreFolderByIdV0FoldersFldIdRestorePost`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**fldId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiRestoreFolderByIdV0FoldersFldIdRestorePostRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **xAgentdriveActor** | **string** | | - **ifMatch** | **string** | | - -### Return type - -[**FolderRestoreOut**](FolderRestoreOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## RotateShareRouteV0SharesShrIdRotatePost - -> ShareMintOut RotateShareRouteV0SharesShrIdRotatePost(ctx, shrId).XAgentdriveActor(xAgentdriveActor).Execute() - -Revoke + reissue a share link's key (requires can_share) - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - shrId := "shrId_example" // string | - xAgentdriveActor := "xAgentdriveActor_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.RotateShareRouteV0SharesShrIdRotatePost(context.Background(), shrId).XAgentdriveActor(xAgentdriveActor).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.RotateShareRouteV0SharesShrIdRotatePost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RotateShareRouteV0SharesShrIdRotatePost`: ShareMintOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.RotateShareRouteV0SharesShrIdRotatePost`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**shrId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiRotateShareRouteV0SharesShrIdRotatePostRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **xAgentdriveActor** | **string** | | - -### Return type - -[**ShareMintOut**](ShareMintOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## SearchV0SearchGet - -> SearchPage SearchV0SearchGet(ctx).Q(q).Label(label).FileType(fileType).Prefix(prefix).UpdatedAfter(updatedAfter).UpdatedBefore(updatedBefore).Limit(limit).Execute() - -Full-text search over artifacts in the drive - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - "time" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - q := "q_example" // string | - label := []string{"Inner_example"} // []string | (optional) - fileType := "fileType_example" // string | (optional) - prefix := "prefix_example" // string | (optional) - updatedAfter := time.Now() // time.Time | (optional) - updatedBefore := time.Now() // time.Time | (optional) - limit := int32(56) // int32 | (optional) (default to 20) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.SearchV0SearchGet(context.Background()).Q(q).Label(label).FileType(fileType).Prefix(prefix).UpdatedAfter(updatedAfter).UpdatedBefore(updatedBefore).Limit(limit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.SearchV0SearchGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SearchV0SearchGet`: SearchPage - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.SearchV0SearchGet`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiSearchV0SearchGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **q** | **string** | | - **label** | **[]string** | | - **fileType** | **string** | | - **prefix** | **string** | | - **updatedAfter** | **time.Time** | | - **updatedBefore** | **time.Time** | | - **limit** | **int32** | | [default to 20] - -### Return type - -[**SearchPage**](SearchPage.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## ViewArtifactHeadAArtIdHeadGet - -> ArtifactHeadOut ViewArtifactHeadAArtIdHeadGet(ctx, artId).Execute() - -View Artifact Head - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - artId := "artId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.ViewArtifactHeadAArtIdHeadGet(context.Background(), artId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.ViewArtifactHeadAArtIdHeadGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ViewArtifactHeadAArtIdHeadGet`: ArtifactHeadOut - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.ViewArtifactHeadAArtIdHeadGet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**artId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiViewArtifactHeadAArtIdHeadGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**ArtifactHeadOut**](ArtifactHeadOut.md) - -### Authorization - -No authorization required - -### 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) - - -## ViewArtifactVersionVArtIdVersionGet - -> *os.File ViewArtifactVersionVArtIdVersionGet(ctx, artId, version).Raw(raw).Download(download).Execute() - -View Artifact Version - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - artId := "artId_example" // string | - version := int32(56) // int32 | - raw := int32(56) // int32 | (optional) (default to 0) - download := int32(56) // int32 | (optional) (default to 0) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.ViewArtifactVersionVArtIdVersionGet(context.Background(), artId, version).Raw(raw).Download(download).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.ViewArtifactVersionVArtIdVersionGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ViewArtifactVersionVArtIdVersionGet`: *os.File - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.ViewArtifactVersionVArtIdVersionGet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**artId** | **string** | | -**version** | **int32** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiViewArtifactVersionVArtIdVersionGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **raw** | **int32** | | [default to 0] - **download** | **int32** | | [default to 0] - -### Return type - -[***os.File**](*os.File.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/octet-stream, text/html, 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) - - -## ViewFileDriveIdPathGet - -> *os.File ViewFileDriveIdPathGet(ctx, driveId, path).Raw(raw).Download(download).Execute() - -View File - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - driveId := "driveId_example" // string | - path := "path_example" // string | - raw := int32(56) // int32 | (optional) (default to 0) - download := int32(56) // int32 | (optional) (default to 0) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DefaultAPI.ViewFileDriveIdPathGet(context.Background(), driveId, path).Raw(raw).Download(download).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.ViewFileDriveIdPathGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ViewFileDriveIdPathGet`: *os.File - fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.ViewFileDriveIdPathGet`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**driveId** | **string** | | -**path** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiViewFileDriveIdPathGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - - **raw** | **int32** | | [default to 0] - **download** | **int32** | | [default to 0] - -### Return type - -[***os.File**](*os.File.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/octet-stream, text/html, 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) - - -## ViewPermalinkArtifactAArtIdGet - -> ViewPermalinkArtifactAArtIdGet(ctx, artId).Execute() - -View Permalink Artifact - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - artId := "artId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.DefaultAPI.ViewPermalinkArtifactAArtIdGet(context.Background(), artId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.ViewPermalinkArtifactAArtIdGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**artId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiViewPermalinkArtifactAArtIdGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### 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) - - -## ViewPermalinkFolderFFldIdGet - -> ViewPermalinkFolderFFldIdGet(ctx, fldId).Execute() - -View Permalink Folder +Health @@ -5711,38 +29,31 @@ import ( ) func main() { - fldId := "fldId_example" // string | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.DefaultAPI.ViewPermalinkFolderFFldIdGet(context.Background(), fldId).Execute() + resp, r, err := apiClient.DefaultAPI.Health(context.Background()).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.ViewPermalinkFolderFFldIdGet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DefaultAPI.Health``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } + // response from `Health`: HealthOut + fmt.Fprintf(os.Stdout, "Response from `DefaultAPI.Health`: %v\n", resp) } ``` ### Path Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**fldId** | **string** | | +This endpoint does not need any parameter. ### Other Parameters -Other parameters are passed through a pointer to a apiViewPermalinkFolderFFldIdGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- +Other parameters are passed through a pointer to a apiHealthRequest struct via the builder pattern ### Return type - (empty response body) +[**HealthOut**](HealthOut.md) ### Authorization diff --git a/sdk/go/docs/DescribeIn.md b/sdk/go/docs/DescribeIn.md deleted file mode 100644 index d2c008b..0000000 --- a/sdk/go/docs/DescribeIn.md +++ /dev/null @@ -1,49 +0,0 @@ -# DescribeIn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Dataset** | **string** | | - -## Methods - -### NewDescribeIn - -`func NewDescribeIn(dataset string, ) *DescribeIn` - -NewDescribeIn instantiates a new DescribeIn object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewDescribeInWithDefaults - -`func NewDescribeInWithDefaults() *DescribeIn` - -NewDescribeInWithDefaults instantiates a new DescribeIn object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetDataset - -`func (o *DescribeIn) GetDataset() string` - -GetDataset returns the Dataset field if non-nil, zero value otherwise. - -### GetDatasetOk - -`func (o *DescribeIn) GetDatasetOk() (*string, bool)` - -GetDatasetOk returns a tuple with the Dataset field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDataset - -`func (o *DescribeIn) SetDataset(v string)` - -SetDataset sets Dataset field to given value. - - - -[[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/sdk/go/docs/DiscoveryAPI.md b/sdk/go/docs/DiscoveryAPI.md new file mode 100644 index 0000000..2fd1f1c --- /dev/null +++ b/sdk/go/docs/DiscoveryAPI.md @@ -0,0 +1,69 @@ +# \DiscoveryAPI + +All URIs are relative to *https://api.agentdrive.run* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**OauthProtectedResource**](DiscoveryAPI.md#OauthProtectedResource) | **Get** /.well-known/oauth-protected-resource | Protected-resource metadata (RFC 9728) + + + +## OauthProtectedResource + +> map[string]*interface{} OauthProtectedResource(ctx).Execute() + +Protected-resource metadata (RFC 9728) + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.DiscoveryAPI.OauthProtectedResource(context.Background()).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `DiscoveryAPI.OauthProtectedResource``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `OauthProtectedResource`: map[string]*interface{} + fmt.Fprintf(os.Stdout, "Response from `DiscoveryAPI.OauthProtectedResource`: %v\n", resp) +} +``` + +### Path Parameters + +This endpoint does not need any parameter. + +### Other Parameters + +Other parameters are passed through a pointer to a apiOauthProtectedResourceRequest struct via the builder pattern + + +### Return type + +**map[string]*interface{}** + +### Authorization + +No authorization required + +### 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) diff --git a/sdk/go/docs/DownloadUrlOut.md b/sdk/go/docs/DownloadUrlOut.md deleted file mode 100644 index 3d79e15..0000000 --- a/sdk/go/docs/DownloadUrlOut.md +++ /dev/null @@ -1,169 +0,0 @@ -# DownloadUrlOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ContentType** | **string** | | -**Direct** | **bool** | | -**DownloadUrl** | **string** | | -**ExpiresAt** | Pointer to **NullableTime** | | [optional] -**Filename** | **string** | | -**SizeBytes** | **int32** | | - -## Methods - -### NewDownloadUrlOut - -`func NewDownloadUrlOut(contentType string, direct bool, downloadUrl string, filename string, sizeBytes int32, ) *DownloadUrlOut` - -NewDownloadUrlOut instantiates a new DownloadUrlOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewDownloadUrlOutWithDefaults - -`func NewDownloadUrlOutWithDefaults() *DownloadUrlOut` - -NewDownloadUrlOutWithDefaults instantiates a new DownloadUrlOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetContentType - -`func (o *DownloadUrlOut) GetContentType() string` - -GetContentType returns the ContentType field if non-nil, zero value otherwise. - -### GetContentTypeOk - -`func (o *DownloadUrlOut) GetContentTypeOk() (*string, bool)` - -GetContentTypeOk returns a tuple with the ContentType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetContentType - -`func (o *DownloadUrlOut) SetContentType(v string)` - -SetContentType sets ContentType field to given value. - - -### GetDirect - -`func (o *DownloadUrlOut) GetDirect() bool` - -GetDirect returns the Direct field if non-nil, zero value otherwise. - -### GetDirectOk - -`func (o *DownloadUrlOut) GetDirectOk() (*bool, bool)` - -GetDirectOk returns a tuple with the Direct field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDirect - -`func (o *DownloadUrlOut) SetDirect(v bool)` - -SetDirect sets Direct field to given value. - - -### GetDownloadUrl - -`func (o *DownloadUrlOut) GetDownloadUrl() string` - -GetDownloadUrl returns the DownloadUrl field if non-nil, zero value otherwise. - -### GetDownloadUrlOk - -`func (o *DownloadUrlOut) GetDownloadUrlOk() (*string, bool)` - -GetDownloadUrlOk returns a tuple with the DownloadUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDownloadUrl - -`func (o *DownloadUrlOut) SetDownloadUrl(v string)` - -SetDownloadUrl sets DownloadUrl field to given value. - - -### GetExpiresAt - -`func (o *DownloadUrlOut) GetExpiresAt() time.Time` - -GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. - -### GetExpiresAtOk - -`func (o *DownloadUrlOut) GetExpiresAtOk() (*time.Time, bool)` - -GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExpiresAt - -`func (o *DownloadUrlOut) SetExpiresAt(v time.Time)` - -SetExpiresAt sets ExpiresAt field to given value. - -### HasExpiresAt - -`func (o *DownloadUrlOut) HasExpiresAt() bool` - -HasExpiresAt returns a boolean if a field has been set. - -### SetExpiresAtNil - -`func (o *DownloadUrlOut) SetExpiresAtNil(b bool)` - - SetExpiresAtNil sets the value for ExpiresAt to be an explicit nil - -### UnsetExpiresAt -`func (o *DownloadUrlOut) UnsetExpiresAt()` - -UnsetExpiresAt ensures that no value is present for ExpiresAt, not even an explicit nil -### GetFilename - -`func (o *DownloadUrlOut) GetFilename() string` - -GetFilename returns the Filename field if non-nil, zero value otherwise. - -### GetFilenameOk - -`func (o *DownloadUrlOut) GetFilenameOk() (*string, bool)` - -GetFilenameOk returns a tuple with the Filename field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFilename - -`func (o *DownloadUrlOut) SetFilename(v string)` - -SetFilename sets Filename field to given value. - - -### GetSizeBytes - -`func (o *DownloadUrlOut) GetSizeBytes() int32` - -GetSizeBytes returns the SizeBytes field if non-nil, zero value otherwise. - -### GetSizeBytesOk - -`func (o *DownloadUrlOut) GetSizeBytesOk() (*int32, bool)` - -GetSizeBytesOk returns a tuple with the SizeBytes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSizeBytes - -`func (o *DownloadUrlOut) SetSizeBytes(v int32)` - -SetSizeBytes sets SizeBytes field to given value. - - - -[[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/sdk/go/docs/DriveApiKeyCreateIn.md b/sdk/go/docs/DriveApiKeyCreateIn.md deleted file mode 100644 index b8cb8c5..0000000 --- a/sdk/go/docs/DriveApiKeyCreateIn.md +++ /dev/null @@ -1,49 +0,0 @@ -# DriveApiKeyCreateIn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Label** | **string** | | - -## Methods - -### NewDriveApiKeyCreateIn - -`func NewDriveApiKeyCreateIn(label string, ) *DriveApiKeyCreateIn` - -NewDriveApiKeyCreateIn instantiates a new DriveApiKeyCreateIn object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewDriveApiKeyCreateInWithDefaults - -`func NewDriveApiKeyCreateInWithDefaults() *DriveApiKeyCreateIn` - -NewDriveApiKeyCreateInWithDefaults instantiates a new DriveApiKeyCreateIn object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetLabel - -`func (o *DriveApiKeyCreateIn) GetLabel() string` - -GetLabel returns the Label field if non-nil, zero value otherwise. - -### GetLabelOk - -`func (o *DriveApiKeyCreateIn) GetLabelOk() (*string, bool)` - -GetLabelOk returns a tuple with the Label field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLabel - -`func (o *DriveApiKeyCreateIn) SetLabel(v string)` - -SetLabel sets Label field to given value. - - - -[[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/sdk/go/docs/DriveApiKeyCreateOut.md b/sdk/go/docs/DriveApiKeyCreateOut.md deleted file mode 100644 index 871ba34..0000000 --- a/sdk/go/docs/DriveApiKeyCreateOut.md +++ /dev/null @@ -1,148 +0,0 @@ -# DriveApiKeyCreateOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ApiKey** | **string** | | -**CreatedAt** | **time.Time** | | -**Id** | **string** | | -**Label** | Pointer to **NullableString** | | [optional] -**Prefix** | **string** | | - -## Methods - -### NewDriveApiKeyCreateOut - -`func NewDriveApiKeyCreateOut(apiKey string, createdAt time.Time, id string, prefix string, ) *DriveApiKeyCreateOut` - -NewDriveApiKeyCreateOut instantiates a new DriveApiKeyCreateOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewDriveApiKeyCreateOutWithDefaults - -`func NewDriveApiKeyCreateOutWithDefaults() *DriveApiKeyCreateOut` - -NewDriveApiKeyCreateOutWithDefaults instantiates a new DriveApiKeyCreateOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetApiKey - -`func (o *DriveApiKeyCreateOut) GetApiKey() string` - -GetApiKey returns the ApiKey field if non-nil, zero value otherwise. - -### GetApiKeyOk - -`func (o *DriveApiKeyCreateOut) GetApiKeyOk() (*string, bool)` - -GetApiKeyOk returns a tuple with the ApiKey field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetApiKey - -`func (o *DriveApiKeyCreateOut) SetApiKey(v string)` - -SetApiKey sets ApiKey field to given value. - - -### GetCreatedAt - -`func (o *DriveApiKeyCreateOut) GetCreatedAt() time.Time` - -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. - -### GetCreatedAtOk - -`func (o *DriveApiKeyCreateOut) GetCreatedAtOk() (*time.Time, bool)` - -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreatedAt - -`func (o *DriveApiKeyCreateOut) SetCreatedAt(v time.Time)` - -SetCreatedAt sets CreatedAt field to given value. - - -### GetId - -`func (o *DriveApiKeyCreateOut) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *DriveApiKeyCreateOut) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *DriveApiKeyCreateOut) SetId(v string)` - -SetId sets Id field to given value. - - -### GetLabel - -`func (o *DriveApiKeyCreateOut) GetLabel() string` - -GetLabel returns the Label field if non-nil, zero value otherwise. - -### GetLabelOk - -`func (o *DriveApiKeyCreateOut) GetLabelOk() (*string, bool)` - -GetLabelOk returns a tuple with the Label field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLabel - -`func (o *DriveApiKeyCreateOut) SetLabel(v string)` - -SetLabel sets Label field to given value. - -### HasLabel - -`func (o *DriveApiKeyCreateOut) HasLabel() bool` - -HasLabel returns a boolean if a field has been set. - -### SetLabelNil - -`func (o *DriveApiKeyCreateOut) SetLabelNil(b bool)` - - SetLabelNil sets the value for Label to be an explicit nil - -### UnsetLabel -`func (o *DriveApiKeyCreateOut) UnsetLabel()` - -UnsetLabel ensures that no value is present for Label, not even an explicit nil -### GetPrefix - -`func (o *DriveApiKeyCreateOut) GetPrefix() string` - -GetPrefix returns the Prefix field if non-nil, zero value otherwise. - -### GetPrefixOk - -`func (o *DriveApiKeyCreateOut) GetPrefixOk() (*string, bool)` - -GetPrefixOk returns a tuple with the Prefix field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPrefix - -`func (o *DriveApiKeyCreateOut) SetPrefix(v string)` - -SetPrefix sets Prefix field to given value. - - - -[[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/sdk/go/docs/DriveApiKeyListOut.md b/sdk/go/docs/DriveApiKeyListOut.md deleted file mode 100644 index 9bd11c4..0000000 --- a/sdk/go/docs/DriveApiKeyListOut.md +++ /dev/null @@ -1,106 +0,0 @@ -# DriveApiKeyListOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Items** | [**[]DriveApiKeyOut**](DriveApiKeyOut.md) | | -**Keys** | [**[]DriveApiKeyOut**](DriveApiKeyOut.md) | | -**NextCursor** | Pointer to **NullableString** | | [optional] - -## Methods - -### NewDriveApiKeyListOut - -`func NewDriveApiKeyListOut(items []DriveApiKeyOut, keys []DriveApiKeyOut, ) *DriveApiKeyListOut` - -NewDriveApiKeyListOut instantiates a new DriveApiKeyListOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewDriveApiKeyListOutWithDefaults - -`func NewDriveApiKeyListOutWithDefaults() *DriveApiKeyListOut` - -NewDriveApiKeyListOutWithDefaults instantiates a new DriveApiKeyListOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetItems - -`func (o *DriveApiKeyListOut) GetItems() []DriveApiKeyOut` - -GetItems returns the Items field if non-nil, zero value otherwise. - -### GetItemsOk - -`func (o *DriveApiKeyListOut) GetItemsOk() (*[]DriveApiKeyOut, bool)` - -GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetItems - -`func (o *DriveApiKeyListOut) SetItems(v []DriveApiKeyOut)` - -SetItems sets Items field to given value. - - -### GetKeys - -`func (o *DriveApiKeyListOut) GetKeys() []DriveApiKeyOut` - -GetKeys returns the Keys field if non-nil, zero value otherwise. - -### GetKeysOk - -`func (o *DriveApiKeyListOut) GetKeysOk() (*[]DriveApiKeyOut, bool)` - -GetKeysOk returns a tuple with the Keys field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetKeys - -`func (o *DriveApiKeyListOut) SetKeys(v []DriveApiKeyOut)` - -SetKeys sets Keys field to given value. - - -### GetNextCursor - -`func (o *DriveApiKeyListOut) GetNextCursor() string` - -GetNextCursor returns the NextCursor field if non-nil, zero value otherwise. - -### GetNextCursorOk - -`func (o *DriveApiKeyListOut) GetNextCursorOk() (*string, bool)` - -GetNextCursorOk returns a tuple with the NextCursor field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNextCursor - -`func (o *DriveApiKeyListOut) SetNextCursor(v string)` - -SetNextCursor sets NextCursor field to given value. - -### HasNextCursor - -`func (o *DriveApiKeyListOut) HasNextCursor() bool` - -HasNextCursor returns a boolean if a field has been set. - -### SetNextCursorNil - -`func (o *DriveApiKeyListOut) SetNextCursorNil(b bool)` - - SetNextCursorNil sets the value for NextCursor to be an explicit nil - -### UnsetNextCursor -`func (o *DriveApiKeyListOut) UnsetNextCursor()` - -UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil - -[[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/sdk/go/docs/DriveApiKeyOut.md b/sdk/go/docs/DriveApiKeyOut.md deleted file mode 100644 index 969c209..0000000 --- a/sdk/go/docs/DriveApiKeyOut.md +++ /dev/null @@ -1,199 +0,0 @@ -# DriveApiKeyOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CreatedAt** | **time.Time** | | -**Id** | **string** | | -**Label** | Pointer to **NullableString** | | [optional] -**LastUsedAt** | Pointer to **NullableTime** | | [optional] -**Prefix** | **string** | | -**RevokedAt** | Pointer to **NullableTime** | | [optional] - -## Methods - -### NewDriveApiKeyOut - -`func NewDriveApiKeyOut(createdAt time.Time, id string, prefix string, ) *DriveApiKeyOut` - -NewDriveApiKeyOut instantiates a new DriveApiKeyOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewDriveApiKeyOutWithDefaults - -`func NewDriveApiKeyOutWithDefaults() *DriveApiKeyOut` - -NewDriveApiKeyOutWithDefaults instantiates a new DriveApiKeyOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetCreatedAt - -`func (o *DriveApiKeyOut) GetCreatedAt() time.Time` - -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. - -### GetCreatedAtOk - -`func (o *DriveApiKeyOut) GetCreatedAtOk() (*time.Time, bool)` - -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreatedAt - -`func (o *DriveApiKeyOut) SetCreatedAt(v time.Time)` - -SetCreatedAt sets CreatedAt field to given value. - - -### GetId - -`func (o *DriveApiKeyOut) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *DriveApiKeyOut) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *DriveApiKeyOut) SetId(v string)` - -SetId sets Id field to given value. - - -### GetLabel - -`func (o *DriveApiKeyOut) GetLabel() string` - -GetLabel returns the Label field if non-nil, zero value otherwise. - -### GetLabelOk - -`func (o *DriveApiKeyOut) GetLabelOk() (*string, bool)` - -GetLabelOk returns a tuple with the Label field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLabel - -`func (o *DriveApiKeyOut) SetLabel(v string)` - -SetLabel sets Label field to given value. - -### HasLabel - -`func (o *DriveApiKeyOut) HasLabel() bool` - -HasLabel returns a boolean if a field has been set. - -### SetLabelNil - -`func (o *DriveApiKeyOut) SetLabelNil(b bool)` - - SetLabelNil sets the value for Label to be an explicit nil - -### UnsetLabel -`func (o *DriveApiKeyOut) UnsetLabel()` - -UnsetLabel ensures that no value is present for Label, not even an explicit nil -### GetLastUsedAt - -`func (o *DriveApiKeyOut) GetLastUsedAt() time.Time` - -GetLastUsedAt returns the LastUsedAt field if non-nil, zero value otherwise. - -### GetLastUsedAtOk - -`func (o *DriveApiKeyOut) GetLastUsedAtOk() (*time.Time, bool)` - -GetLastUsedAtOk returns a tuple with the LastUsedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLastUsedAt - -`func (o *DriveApiKeyOut) SetLastUsedAt(v time.Time)` - -SetLastUsedAt sets LastUsedAt field to given value. - -### HasLastUsedAt - -`func (o *DriveApiKeyOut) HasLastUsedAt() bool` - -HasLastUsedAt returns a boolean if a field has been set. - -### SetLastUsedAtNil - -`func (o *DriveApiKeyOut) SetLastUsedAtNil(b bool)` - - SetLastUsedAtNil sets the value for LastUsedAt to be an explicit nil - -### UnsetLastUsedAt -`func (o *DriveApiKeyOut) UnsetLastUsedAt()` - -UnsetLastUsedAt ensures that no value is present for LastUsedAt, not even an explicit nil -### GetPrefix - -`func (o *DriveApiKeyOut) GetPrefix() string` - -GetPrefix returns the Prefix field if non-nil, zero value otherwise. - -### GetPrefixOk - -`func (o *DriveApiKeyOut) GetPrefixOk() (*string, bool)` - -GetPrefixOk returns a tuple with the Prefix field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPrefix - -`func (o *DriveApiKeyOut) SetPrefix(v string)` - -SetPrefix sets Prefix field to given value. - - -### GetRevokedAt - -`func (o *DriveApiKeyOut) GetRevokedAt() time.Time` - -GetRevokedAt returns the RevokedAt field if non-nil, zero value otherwise. - -### GetRevokedAtOk - -`func (o *DriveApiKeyOut) GetRevokedAtOk() (*time.Time, bool)` - -GetRevokedAtOk returns a tuple with the RevokedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRevokedAt - -`func (o *DriveApiKeyOut) SetRevokedAt(v time.Time)` - -SetRevokedAt sets RevokedAt field to given value. - -### HasRevokedAt - -`func (o *DriveApiKeyOut) HasRevokedAt() bool` - -HasRevokedAt returns a boolean if a field has been set. - -### SetRevokedAtNil - -`func (o *DriveApiKeyOut) SetRevokedAtNil(b bool)` - - SetRevokedAtNil sets the value for RevokedAt to be an explicit nil - -### UnsetRevokedAt -`func (o *DriveApiKeyOut) UnsetRevokedAt()` - -UnsetRevokedAt ensures that no value is present for RevokedAt, not even an explicit nil - -[[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/sdk/go/docs/DriveCreateIn.md b/sdk/go/docs/DriveCreateIn.md index 9842268..e3779f8 100644 --- a/sdk/go/docs/DriveCreateIn.md +++ b/sdk/go/docs/DriveCreateIn.md @@ -4,6 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**Metadata** | Pointer to **map[string]interface{}** | | [optional] **Name** | **string** | | ## Methods @@ -25,6 +26,31 @@ NewDriveCreateInWithDefaults instantiates a new DriveCreateIn object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set +### GetMetadata + +`func (o *DriveCreateIn) GetMetadata() map[string]interface{}` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *DriveCreateIn) GetMetadataOk() (*map[string]interface{}, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *DriveCreateIn) SetMetadata(v map[string]interface{})` + +SetMetadata sets Metadata field to given value. + +### HasMetadata + +`func (o *DriveCreateIn) HasMetadata() bool` + +HasMetadata returns a boolean if a field has been set. + ### GetName `func (o *DriveCreateIn) GetName() string` diff --git a/sdk/go/docs/DriveCreateOut.md b/sdk/go/docs/DriveCreateOut.md deleted file mode 100644 index c49dba2..0000000 --- a/sdk/go/docs/DriveCreateOut.md +++ /dev/null @@ -1,226 +0,0 @@ -# DriveCreateOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ApiKey** | **string** | | -**CreatedAt** | **time.Time** | | -**Id** | **string** | | -**Name** | **string** | | -**OrganizationId** | **string** | | -**OwnerEmail** | Pointer to **NullableString** | | [optional] -**OwnerUserId** | Pointer to **NullableString** | | [optional] -**StorageBytes** | **int32** | | - -## Methods - -### NewDriveCreateOut - -`func NewDriveCreateOut(apiKey string, createdAt time.Time, id string, name string, organizationId string, storageBytes int32, ) *DriveCreateOut` - -NewDriveCreateOut instantiates a new DriveCreateOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewDriveCreateOutWithDefaults - -`func NewDriveCreateOutWithDefaults() *DriveCreateOut` - -NewDriveCreateOutWithDefaults instantiates a new DriveCreateOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetApiKey - -`func (o *DriveCreateOut) GetApiKey() string` - -GetApiKey returns the ApiKey field if non-nil, zero value otherwise. - -### GetApiKeyOk - -`func (o *DriveCreateOut) GetApiKeyOk() (*string, bool)` - -GetApiKeyOk returns a tuple with the ApiKey field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetApiKey - -`func (o *DriveCreateOut) SetApiKey(v string)` - -SetApiKey sets ApiKey field to given value. - - -### GetCreatedAt - -`func (o *DriveCreateOut) GetCreatedAt() time.Time` - -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. - -### GetCreatedAtOk - -`func (o *DriveCreateOut) GetCreatedAtOk() (*time.Time, bool)` - -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreatedAt - -`func (o *DriveCreateOut) SetCreatedAt(v time.Time)` - -SetCreatedAt sets CreatedAt field to given value. - - -### GetId - -`func (o *DriveCreateOut) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *DriveCreateOut) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *DriveCreateOut) SetId(v string)` - -SetId sets Id field to given value. - - -### GetName - -`func (o *DriveCreateOut) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *DriveCreateOut) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *DriveCreateOut) SetName(v string)` - -SetName sets Name field to given value. - - -### GetOrganizationId - -`func (o *DriveCreateOut) GetOrganizationId() string` - -GetOrganizationId returns the OrganizationId field if non-nil, zero value otherwise. - -### GetOrganizationIdOk - -`func (o *DriveCreateOut) GetOrganizationIdOk() (*string, bool)` - -GetOrganizationIdOk returns a tuple with the OrganizationId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOrganizationId - -`func (o *DriveCreateOut) SetOrganizationId(v string)` - -SetOrganizationId sets OrganizationId field to given value. - - -### GetOwnerEmail - -`func (o *DriveCreateOut) GetOwnerEmail() string` - -GetOwnerEmail returns the OwnerEmail field if non-nil, zero value otherwise. - -### GetOwnerEmailOk - -`func (o *DriveCreateOut) GetOwnerEmailOk() (*string, bool)` - -GetOwnerEmailOk returns a tuple with the OwnerEmail field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOwnerEmail - -`func (o *DriveCreateOut) SetOwnerEmail(v string)` - -SetOwnerEmail sets OwnerEmail field to given value. - -### HasOwnerEmail - -`func (o *DriveCreateOut) HasOwnerEmail() bool` - -HasOwnerEmail returns a boolean if a field has been set. - -### SetOwnerEmailNil - -`func (o *DriveCreateOut) SetOwnerEmailNil(b bool)` - - SetOwnerEmailNil sets the value for OwnerEmail to be an explicit nil - -### UnsetOwnerEmail -`func (o *DriveCreateOut) UnsetOwnerEmail()` - -UnsetOwnerEmail ensures that no value is present for OwnerEmail, not even an explicit nil -### GetOwnerUserId - -`func (o *DriveCreateOut) GetOwnerUserId() string` - -GetOwnerUserId returns the OwnerUserId field if non-nil, zero value otherwise. - -### GetOwnerUserIdOk - -`func (o *DriveCreateOut) GetOwnerUserIdOk() (*string, bool)` - -GetOwnerUserIdOk returns a tuple with the OwnerUserId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOwnerUserId - -`func (o *DriveCreateOut) SetOwnerUserId(v string)` - -SetOwnerUserId sets OwnerUserId field to given value. - -### HasOwnerUserId - -`func (o *DriveCreateOut) HasOwnerUserId() bool` - -HasOwnerUserId returns a boolean if a field has been set. - -### SetOwnerUserIdNil - -`func (o *DriveCreateOut) SetOwnerUserIdNil(b bool)` - - SetOwnerUserIdNil sets the value for OwnerUserId to be an explicit nil - -### UnsetOwnerUserId -`func (o *DriveCreateOut) UnsetOwnerUserId()` - -UnsetOwnerUserId ensures that no value is present for OwnerUserId, not even an explicit nil -### GetStorageBytes - -`func (o *DriveCreateOut) GetStorageBytes() int32` - -GetStorageBytes returns the StorageBytes field if non-nil, zero value otherwise. - -### GetStorageBytesOk - -`func (o *DriveCreateOut) GetStorageBytesOk() (*int32, bool)` - -GetStorageBytesOk returns a tuple with the StorageBytes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStorageBytes - -`func (o *DriveCreateOut) SetStorageBytes(v int32)` - -SetStorageBytes sets StorageBytes field to given value. - - - -[[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/sdk/go/docs/DriveDeleteOut.md b/sdk/go/docs/DriveDeleteOut.md deleted file mode 100644 index 0dd4d85..0000000 --- a/sdk/go/docs/DriveDeleteOut.md +++ /dev/null @@ -1,153 +0,0 @@ -# DriveDeleteOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DeletedAt** | **time.Time** | | -**Id** | **string** | | -**Ok** | Pointer to **bool** | | [optional] [default to true] -**PurgeAt** | **time.Time** | | -**RestoreUrl** | Pointer to **NullableString** | | [optional] - -## Methods - -### NewDriveDeleteOut - -`func NewDriveDeleteOut(deletedAt time.Time, id string, purgeAt time.Time, ) *DriveDeleteOut` - -NewDriveDeleteOut instantiates a new DriveDeleteOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewDriveDeleteOutWithDefaults - -`func NewDriveDeleteOutWithDefaults() *DriveDeleteOut` - -NewDriveDeleteOutWithDefaults instantiates a new DriveDeleteOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetDeletedAt - -`func (o *DriveDeleteOut) GetDeletedAt() time.Time` - -GetDeletedAt returns the DeletedAt field if non-nil, zero value otherwise. - -### GetDeletedAtOk - -`func (o *DriveDeleteOut) GetDeletedAtOk() (*time.Time, bool)` - -GetDeletedAtOk returns a tuple with the DeletedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDeletedAt - -`func (o *DriveDeleteOut) SetDeletedAt(v time.Time)` - -SetDeletedAt sets DeletedAt field to given value. - - -### GetId - -`func (o *DriveDeleteOut) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *DriveDeleteOut) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *DriveDeleteOut) SetId(v string)` - -SetId sets Id field to given value. - - -### GetOk - -`func (o *DriveDeleteOut) GetOk() bool` - -GetOk returns the Ok field if non-nil, zero value otherwise. - -### GetOkOk - -`func (o *DriveDeleteOut) GetOkOk() (*bool, bool)` - -GetOkOk returns a tuple with the Ok field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOk - -`func (o *DriveDeleteOut) SetOk(v bool)` - -SetOk sets Ok field to given value. - -### HasOk - -`func (o *DriveDeleteOut) HasOk() bool` - -HasOk returns a boolean if a field has been set. - -### GetPurgeAt - -`func (o *DriveDeleteOut) GetPurgeAt() time.Time` - -GetPurgeAt returns the PurgeAt field if non-nil, zero value otherwise. - -### GetPurgeAtOk - -`func (o *DriveDeleteOut) GetPurgeAtOk() (*time.Time, bool)` - -GetPurgeAtOk returns a tuple with the PurgeAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPurgeAt - -`func (o *DriveDeleteOut) SetPurgeAt(v time.Time)` - -SetPurgeAt sets PurgeAt field to given value. - - -### GetRestoreUrl - -`func (o *DriveDeleteOut) GetRestoreUrl() string` - -GetRestoreUrl returns the RestoreUrl field if non-nil, zero value otherwise. - -### GetRestoreUrlOk - -`func (o *DriveDeleteOut) GetRestoreUrlOk() (*string, bool)` - -GetRestoreUrlOk returns a tuple with the RestoreUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRestoreUrl - -`func (o *DriveDeleteOut) SetRestoreUrl(v string)` - -SetRestoreUrl sets RestoreUrl field to given value. - -### HasRestoreUrl - -`func (o *DriveDeleteOut) HasRestoreUrl() bool` - -HasRestoreUrl returns a boolean if a field has been set. - -### SetRestoreUrlNil - -`func (o *DriveDeleteOut) SetRestoreUrlNil(b bool)` - - SetRestoreUrlNil sets the value for RestoreUrl to be an explicit nil - -### UnsetRestoreUrl -`func (o *DriveDeleteOut) UnsetRestoreUrl()` - -UnsetRestoreUrl ensures that no value is present for RestoreUrl, not even an explicit nil - -[[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/sdk/go/docs/DriveList.md b/sdk/go/docs/DriveList.md deleted file mode 100644 index 512eb62..0000000 --- a/sdk/go/docs/DriveList.md +++ /dev/null @@ -1,85 +0,0 @@ -# DriveList - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Items** | [**[]DriveOut**](DriveOut.md) | | -**NextCursor** | Pointer to **NullableString** | | [optional] - -## Methods - -### NewDriveList - -`func NewDriveList(items []DriveOut, ) *DriveList` - -NewDriveList instantiates a new DriveList object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewDriveListWithDefaults - -`func NewDriveListWithDefaults() *DriveList` - -NewDriveListWithDefaults instantiates a new DriveList object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetItems - -`func (o *DriveList) GetItems() []DriveOut` - -GetItems returns the Items field if non-nil, zero value otherwise. - -### GetItemsOk - -`func (o *DriveList) GetItemsOk() (*[]DriveOut, bool)` - -GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetItems - -`func (o *DriveList) SetItems(v []DriveOut)` - -SetItems sets Items field to given value. - - -### GetNextCursor - -`func (o *DriveList) GetNextCursor() string` - -GetNextCursor returns the NextCursor field if non-nil, zero value otherwise. - -### GetNextCursorOk - -`func (o *DriveList) GetNextCursorOk() (*string, bool)` - -GetNextCursorOk returns a tuple with the NextCursor field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNextCursor - -`func (o *DriveList) SetNextCursor(v string)` - -SetNextCursor sets NextCursor field to given value. - -### HasNextCursor - -`func (o *DriveList) HasNextCursor() bool` - -HasNextCursor returns a boolean if a field has been set. - -### SetNextCursorNil - -`func (o *DriveList) SetNextCursorNil(b bool)` - - SetNextCursorNil sets the value for NextCursor to be an explicit nil - -### UnsetNextCursor -`func (o *DriveList) UnsetNextCursor()` - -UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil - -[[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/sdk/go/docs/DriveListOut.md b/sdk/go/docs/DriveListOut.md new file mode 100644 index 0000000..ab78f05 --- /dev/null +++ b/sdk/go/docs/DriveListOut.md @@ -0,0 +1,80 @@ +# DriveListOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Items** | [**[]DriveOut**](DriveOut.md) | | +**NextCursor** | **NullableString** | | + +## Methods + +### NewDriveListOut + +`func NewDriveListOut(items []DriveOut, nextCursor NullableString, ) *DriveListOut` + +NewDriveListOut instantiates a new DriveListOut object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDriveListOutWithDefaults + +`func NewDriveListOutWithDefaults() *DriveListOut` + +NewDriveListOutWithDefaults instantiates a new DriveListOut object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetItems + +`func (o *DriveListOut) GetItems() []DriveOut` + +GetItems returns the Items field if non-nil, zero value otherwise. + +### GetItemsOk + +`func (o *DriveListOut) GetItemsOk() (*[]DriveOut, bool)` + +GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItems + +`func (o *DriveListOut) SetItems(v []DriveOut)` + +SetItems sets Items field to given value. + + +### GetNextCursor + +`func (o *DriveListOut) GetNextCursor() string` + +GetNextCursor returns the NextCursor field if non-nil, zero value otherwise. + +### GetNextCursorOk + +`func (o *DriveListOut) GetNextCursorOk() (*string, bool)` + +GetNextCursorOk returns a tuple with the NextCursor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextCursor + +`func (o *DriveListOut) SetNextCursor(v string)` + +SetNextCursor sets NextCursor field to given value. + + +### SetNextCursorNil + +`func (o *DriveListOut) SetNextCursorNil(b bool)` + + SetNextCursorNil sets the value for NextCursor to be an explicit nil + +### UnsetNextCursor +`func (o *DriveListOut) UnsetNextCursor()` + +UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil + +[[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/sdk/go/docs/DriveOut.md b/sdk/go/docs/DriveOut.md index 3b4ea54..a453414 100644 --- a/sdk/go/docs/DriveOut.md +++ b/sdk/go/docs/DriveOut.md @@ -5,18 +5,24 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **CreatedAt** | **time.Time** | | +**CreatedBy** | **NullableString** | | +**DeletedAt** | **NullableTime** | | **Id** | **string** | | +**Metadata** | **map[string]interface{}** | | **Name** | **string** | | -**OrganizationId** | **string** | | -**OwnerEmail** | Pointer to **NullableString** | | [optional] -**OwnerUserId** | Pointer to **NullableString** | | [optional] +**RetrievalBytes** | **int32** | | +**Revision** | **string** | | +**RootFolderId** | **string** | | +**State** | **string** | | **StorageBytes** | **int32** | | +**UpdatedAt** | **time.Time** | | +**WorkspaceId** | **string** | | ## Methods ### NewDriveOut -`func NewDriveOut(createdAt time.Time, id string, name string, organizationId string, storageBytes int32, ) *DriveOut` +`func NewDriveOut(createdAt time.Time, createdBy NullableString, deletedAt NullableTime, id string, metadata map[string]interface{}, name string, retrievalBytes int32, revision string, rootFolderId string, state string, storageBytes int32, updatedAt time.Time, workspaceId string, ) *DriveOut` NewDriveOut instantiates a new DriveOut object This constructor will assign default values to properties that have it defined, @@ -51,6 +57,66 @@ and a boolean to check if the value has been set. SetCreatedAt sets CreatedAt field to given value. +### GetCreatedBy + +`func (o *DriveOut) GetCreatedBy() string` + +GetCreatedBy returns the CreatedBy field if non-nil, zero value otherwise. + +### GetCreatedByOk + +`func (o *DriveOut) GetCreatedByOk() (*string, bool)` + +GetCreatedByOk returns a tuple with the CreatedBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedBy + +`func (o *DriveOut) SetCreatedBy(v string)` + +SetCreatedBy sets CreatedBy field to given value. + + +### SetCreatedByNil + +`func (o *DriveOut) SetCreatedByNil(b bool)` + + SetCreatedByNil sets the value for CreatedBy to be an explicit nil + +### UnsetCreatedBy +`func (o *DriveOut) UnsetCreatedBy()` + +UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +### GetDeletedAt + +`func (o *DriveOut) GetDeletedAt() time.Time` + +GetDeletedAt returns the DeletedAt field if non-nil, zero value otherwise. + +### GetDeletedAtOk + +`func (o *DriveOut) GetDeletedAtOk() (*time.Time, bool)` + +GetDeletedAtOk returns a tuple with the DeletedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDeletedAt + +`func (o *DriveOut) SetDeletedAt(v time.Time)` + +SetDeletedAt sets DeletedAt field to given value. + + +### SetDeletedAtNil + +`func (o *DriveOut) SetDeletedAtNil(b bool)` + + SetDeletedAtNil sets the value for DeletedAt to be an explicit nil + +### UnsetDeletedAt +`func (o *DriveOut) UnsetDeletedAt()` + +UnsetDeletedAt ensures that no value is present for DeletedAt, not even an explicit nil ### GetId `func (o *DriveOut) GetId() string` @@ -71,6 +137,26 @@ and a boolean to check if the value has been set. SetId sets Id field to given value. +### GetMetadata + +`func (o *DriveOut) GetMetadata() map[string]interface{}` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *DriveOut) GetMetadataOk() (*map[string]interface{}, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *DriveOut) SetMetadata(v map[string]interface{})` + +SetMetadata sets Metadata field to given value. + + ### GetName `func (o *DriveOut) GetName() string` @@ -91,96 +177,86 @@ and a boolean to check if the value has been set. SetName sets Name field to given value. -### GetOrganizationId +### GetRetrievalBytes -`func (o *DriveOut) GetOrganizationId() string` +`func (o *DriveOut) GetRetrievalBytes() int32` -GetOrganizationId returns the OrganizationId field if non-nil, zero value otherwise. +GetRetrievalBytes returns the RetrievalBytes field if non-nil, zero value otherwise. -### GetOrganizationIdOk +### GetRetrievalBytesOk -`func (o *DriveOut) GetOrganizationIdOk() (*string, bool)` +`func (o *DriveOut) GetRetrievalBytesOk() (*int32, bool)` -GetOrganizationIdOk returns a tuple with the OrganizationId field if it's non-nil, zero value otherwise +GetRetrievalBytesOk returns a tuple with the RetrievalBytes field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetOrganizationId +### SetRetrievalBytes -`func (o *DriveOut) SetOrganizationId(v string)` +`func (o *DriveOut) SetRetrievalBytes(v int32)` -SetOrganizationId sets OrganizationId field to given value. +SetRetrievalBytes sets RetrievalBytes field to given value. -### GetOwnerEmail +### GetRevision -`func (o *DriveOut) GetOwnerEmail() string` +`func (o *DriveOut) GetRevision() string` -GetOwnerEmail returns the OwnerEmail field if non-nil, zero value otherwise. +GetRevision returns the Revision field if non-nil, zero value otherwise. -### GetOwnerEmailOk +### GetRevisionOk -`func (o *DriveOut) GetOwnerEmailOk() (*string, bool)` +`func (o *DriveOut) GetRevisionOk() (*string, bool)` -GetOwnerEmailOk returns a tuple with the OwnerEmail field if it's non-nil, zero value otherwise +GetRevisionOk returns a tuple with the Revision field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetOwnerEmail - -`func (o *DriveOut) SetOwnerEmail(v string)` - -SetOwnerEmail sets OwnerEmail field to given value. +### SetRevision -### HasOwnerEmail +`func (o *DriveOut) SetRevision(v string)` -`func (o *DriveOut) HasOwnerEmail() bool` +SetRevision sets Revision field to given value. -HasOwnerEmail returns a boolean if a field has been set. -### SetOwnerEmailNil +### GetRootFolderId -`func (o *DriveOut) SetOwnerEmailNil(b bool)` +`func (o *DriveOut) GetRootFolderId() string` - SetOwnerEmailNil sets the value for OwnerEmail to be an explicit nil +GetRootFolderId returns the RootFolderId field if non-nil, zero value otherwise. -### UnsetOwnerEmail -`func (o *DriveOut) UnsetOwnerEmail()` +### GetRootFolderIdOk -UnsetOwnerEmail ensures that no value is present for OwnerEmail, not even an explicit nil -### GetOwnerUserId +`func (o *DriveOut) GetRootFolderIdOk() (*string, bool)` -`func (o *DriveOut) GetOwnerUserId() string` +GetRootFolderIdOk returns a tuple with the RootFolderId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. -GetOwnerUserId returns the OwnerUserId field if non-nil, zero value otherwise. +### SetRootFolderId -### GetOwnerUserIdOk +`func (o *DriveOut) SetRootFolderId(v string)` -`func (o *DriveOut) GetOwnerUserIdOk() (*string, bool)` +SetRootFolderId sets RootFolderId field to given value. -GetOwnerUserIdOk returns a tuple with the OwnerUserId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. -### SetOwnerUserId +### GetState -`func (o *DriveOut) SetOwnerUserId(v string)` +`func (o *DriveOut) GetState() string` -SetOwnerUserId sets OwnerUserId field to given value. +GetState returns the State field if non-nil, zero value otherwise. -### HasOwnerUserId +### GetStateOk -`func (o *DriveOut) HasOwnerUserId() bool` +`func (o *DriveOut) GetStateOk() (*string, bool)` -HasOwnerUserId returns a boolean if a field has been set. +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. -### SetOwnerUserIdNil +### SetState -`func (o *DriveOut) SetOwnerUserIdNil(b bool)` +`func (o *DriveOut) SetState(v string)` - SetOwnerUserIdNil sets the value for OwnerUserId to be an explicit nil +SetState sets State field to given value. -### UnsetOwnerUserId -`func (o *DriveOut) UnsetOwnerUserId()` -UnsetOwnerUserId ensures that no value is present for OwnerUserId, not even an explicit nil ### GetStorageBytes `func (o *DriveOut) GetStorageBytes() int32` @@ -201,5 +277,45 @@ and a boolean to check if the value has been set. SetStorageBytes sets StorageBytes field to given value. +### GetUpdatedAt + +`func (o *DriveOut) GetUpdatedAt() time.Time` + +GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. + +### GetUpdatedAtOk + +`func (o *DriveOut) GetUpdatedAtOk() (*time.Time, bool)` + +GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetUpdatedAt + +`func (o *DriveOut) SetUpdatedAt(v time.Time)` + +SetUpdatedAt sets UpdatedAt field to given value. + + +### GetWorkspaceId + +`func (o *DriveOut) GetWorkspaceId() string` + +GetWorkspaceId returns the WorkspaceId field if non-nil, zero value otherwise. + +### GetWorkspaceIdOk + +`func (o *DriveOut) GetWorkspaceIdOk() (*string, bool)` + +GetWorkspaceIdOk returns a tuple with the WorkspaceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetWorkspaceId + +`func (o *DriveOut) SetWorkspaceId(v string)` + +SetWorkspaceId sets WorkspaceId field to given value. + + [[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/sdk/go/docs/DriveReadOut.md b/sdk/go/docs/DriveReadOut.md deleted file mode 100644 index 2b49614..0000000 --- a/sdk/go/docs/DriveReadOut.md +++ /dev/null @@ -1,211 +0,0 @@ -# DriveReadOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CreatedAt** | **time.Time** | | -**Email** | Pointer to **NullableString** | | [optional] -**Etag** | **string** | | -**Id** | **string** | | -**Metageneration** | **int32** | | -**OrganizationId** | **string** | | -**StorageBytes** | **int32** | | -**StorageLimit** | **int32** | | - -## Methods - -### NewDriveReadOut - -`func NewDriveReadOut(createdAt time.Time, etag string, id string, metageneration int32, organizationId string, storageBytes int32, storageLimit int32, ) *DriveReadOut` - -NewDriveReadOut instantiates a new DriveReadOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewDriveReadOutWithDefaults - -`func NewDriveReadOutWithDefaults() *DriveReadOut` - -NewDriveReadOutWithDefaults instantiates a new DriveReadOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetCreatedAt - -`func (o *DriveReadOut) GetCreatedAt() time.Time` - -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. - -### GetCreatedAtOk - -`func (o *DriveReadOut) GetCreatedAtOk() (*time.Time, bool)` - -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreatedAt - -`func (o *DriveReadOut) SetCreatedAt(v time.Time)` - -SetCreatedAt sets CreatedAt field to given value. - - -### GetEmail - -`func (o *DriveReadOut) GetEmail() string` - -GetEmail returns the Email field if non-nil, zero value otherwise. - -### GetEmailOk - -`func (o *DriveReadOut) GetEmailOk() (*string, bool)` - -GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEmail - -`func (o *DriveReadOut) SetEmail(v string)` - -SetEmail sets Email field to given value. - -### HasEmail - -`func (o *DriveReadOut) HasEmail() bool` - -HasEmail returns a boolean if a field has been set. - -### SetEmailNil - -`func (o *DriveReadOut) SetEmailNil(b bool)` - - SetEmailNil sets the value for Email to be an explicit nil - -### UnsetEmail -`func (o *DriveReadOut) UnsetEmail()` - -UnsetEmail ensures that no value is present for Email, not even an explicit nil -### GetEtag - -`func (o *DriveReadOut) GetEtag() string` - -GetEtag returns the Etag field if non-nil, zero value otherwise. - -### GetEtagOk - -`func (o *DriveReadOut) GetEtagOk() (*string, bool)` - -GetEtagOk returns a tuple with the Etag field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEtag - -`func (o *DriveReadOut) SetEtag(v string)` - -SetEtag sets Etag field to given value. - - -### GetId - -`func (o *DriveReadOut) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *DriveReadOut) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *DriveReadOut) SetId(v string)` - -SetId sets Id field to given value. - - -### GetMetageneration - -`func (o *DriveReadOut) GetMetageneration() int32` - -GetMetageneration returns the Metageneration field if non-nil, zero value otherwise. - -### GetMetagenerationOk - -`func (o *DriveReadOut) GetMetagenerationOk() (*int32, bool)` - -GetMetagenerationOk returns a tuple with the Metageneration field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMetageneration - -`func (o *DriveReadOut) SetMetageneration(v int32)` - -SetMetageneration sets Metageneration field to given value. - - -### GetOrganizationId - -`func (o *DriveReadOut) GetOrganizationId() string` - -GetOrganizationId returns the OrganizationId field if non-nil, zero value otherwise. - -### GetOrganizationIdOk - -`func (o *DriveReadOut) GetOrganizationIdOk() (*string, bool)` - -GetOrganizationIdOk returns a tuple with the OrganizationId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOrganizationId - -`func (o *DriveReadOut) SetOrganizationId(v string)` - -SetOrganizationId sets OrganizationId field to given value. - - -### GetStorageBytes - -`func (o *DriveReadOut) GetStorageBytes() int32` - -GetStorageBytes returns the StorageBytes field if non-nil, zero value otherwise. - -### GetStorageBytesOk - -`func (o *DriveReadOut) GetStorageBytesOk() (*int32, bool)` - -GetStorageBytesOk returns a tuple with the StorageBytes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStorageBytes - -`func (o *DriveReadOut) SetStorageBytes(v int32)` - -SetStorageBytes sets StorageBytes field to given value. - - -### GetStorageLimit - -`func (o *DriveReadOut) GetStorageLimit() int32` - -GetStorageLimit returns the StorageLimit field if non-nil, zero value otherwise. - -### GetStorageLimitOk - -`func (o *DriveReadOut) GetStorageLimitOk() (*int32, bool)` - -GetStorageLimitOk returns a tuple with the StorageLimit field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStorageLimit - -`func (o *DriveReadOut) SetStorageLimit(v int32)` - -SetStorageLimit sets StorageLimit field to given value. - - - -[[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/sdk/go/docs/DriveRenameIn.md b/sdk/go/docs/DriveRenameIn.md deleted file mode 100644 index ceb3242..0000000 --- a/sdk/go/docs/DriveRenameIn.md +++ /dev/null @@ -1,49 +0,0 @@ -# DriveRenameIn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | - -## Methods - -### NewDriveRenameIn - -`func NewDriveRenameIn(name string, ) *DriveRenameIn` - -NewDriveRenameIn instantiates a new DriveRenameIn object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewDriveRenameInWithDefaults - -`func NewDriveRenameInWithDefaults() *DriveRenameIn` - -NewDriveRenameInWithDefaults instantiates a new DriveRenameIn object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetName - -`func (o *DriveRenameIn) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *DriveRenameIn) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *DriveRenameIn) SetName(v string)` - -SetName sets Name field to given value. - - - -[[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/sdk/go/docs/DriveRestoreOut.md b/sdk/go/docs/DriveRestoreOut.md deleted file mode 100644 index c817b30..0000000 --- a/sdk/go/docs/DriveRestoreOut.md +++ /dev/null @@ -1,91 +0,0 @@ -# DriveRestoreOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | | -**RebasedArtifactCount** | **int32** | | -**RestoredAt** | **time.Time** | | - -## Methods - -### NewDriveRestoreOut - -`func NewDriveRestoreOut(id string, rebasedArtifactCount int32, restoredAt time.Time, ) *DriveRestoreOut` - -NewDriveRestoreOut instantiates a new DriveRestoreOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewDriveRestoreOutWithDefaults - -`func NewDriveRestoreOutWithDefaults() *DriveRestoreOut` - -NewDriveRestoreOutWithDefaults instantiates a new DriveRestoreOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetId - -`func (o *DriveRestoreOut) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *DriveRestoreOut) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *DriveRestoreOut) SetId(v string)` - -SetId sets Id field to given value. - - -### GetRebasedArtifactCount - -`func (o *DriveRestoreOut) GetRebasedArtifactCount() int32` - -GetRebasedArtifactCount returns the RebasedArtifactCount field if non-nil, zero value otherwise. - -### GetRebasedArtifactCountOk - -`func (o *DriveRestoreOut) GetRebasedArtifactCountOk() (*int32, bool)` - -GetRebasedArtifactCountOk returns a tuple with the RebasedArtifactCount field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRebasedArtifactCount - -`func (o *DriveRestoreOut) SetRebasedArtifactCount(v int32)` - -SetRebasedArtifactCount sets RebasedArtifactCount field to given value. - - -### GetRestoredAt - -`func (o *DriveRestoreOut) GetRestoredAt() time.Time` - -GetRestoredAt returns the RestoredAt field if non-nil, zero value otherwise. - -### GetRestoredAtOk - -`func (o *DriveRestoreOut) GetRestoredAtOk() (*time.Time, bool)` - -GetRestoredAtOk returns a tuple with the RestoredAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRestoredAt - -`func (o *DriveRestoreOut) SetRestoredAt(v time.Time)` - -SetRestoredAt sets RestoredAt field to given value. - - - -[[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/sdk/go/docs/DriveUpdateIn.md b/sdk/go/docs/DriveUpdateIn.md new file mode 100644 index 0000000..2b14e45 --- /dev/null +++ b/sdk/go/docs/DriveUpdateIn.md @@ -0,0 +1,100 @@ +# DriveUpdateIn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Metadata** | Pointer to **map[string]interface{}** | | [optional] +**Name** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewDriveUpdateIn + +`func NewDriveUpdateIn() *DriveUpdateIn` + +NewDriveUpdateIn instantiates a new DriveUpdateIn object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDriveUpdateInWithDefaults + +`func NewDriveUpdateInWithDefaults() *DriveUpdateIn` + +NewDriveUpdateInWithDefaults instantiates a new DriveUpdateIn object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetMetadata + +`func (o *DriveUpdateIn) GetMetadata() map[string]interface{}` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *DriveUpdateIn) GetMetadataOk() (*map[string]interface{}, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *DriveUpdateIn) SetMetadata(v map[string]interface{})` + +SetMetadata sets Metadata field to given value. + +### HasMetadata + +`func (o *DriveUpdateIn) HasMetadata() bool` + +HasMetadata returns a boolean if a field has been set. + +### SetMetadataNil + +`func (o *DriveUpdateIn) SetMetadataNil(b bool)` + + SetMetadataNil sets the value for Metadata to be an explicit nil + +### UnsetMetadata +`func (o *DriveUpdateIn) UnsetMetadata()` + +UnsetMetadata ensures that no value is present for Metadata, not even an explicit nil +### GetName + +`func (o *DriveUpdateIn) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *DriveUpdateIn) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *DriveUpdateIn) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *DriveUpdateIn) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetNameNil + +`func (o *DriveUpdateIn) SetNameNil(b bool)` + + SetNameNil sets the value for Name to be an explicit nil + +### UnsetName +`func (o *DriveUpdateIn) UnsetName()` + +UnsetName ensures that no value is present for Name, not even an explicit nil + +[[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/sdk/go/docs/DriveUsageOut.md b/sdk/go/docs/DriveUsageOut.md index 2520291..431c1dd 100644 --- a/sdk/go/docs/DriveUsageOut.md +++ b/sdk/go/docs/DriveUsageOut.md @@ -4,25 +4,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**AccountFootprint** | [**StorageFootprintOut**](StorageFootprintOut.md) | | -**EgressBytes** | [**UsageCounterOut**](UsageCounterOut.md) | | -**Footprint** | [**StorageFootprintOut**](StorageFootprintOut.md) | | -**IndexedBytes** | [**UsageCounterOut**](UsageCounterOut.md) | | -**IndexingOps** | [**UsageCounterOut**](UsageCounterOut.md) | | -**OpsThisMonth** | [**OperationUsageOut**](OperationUsageOut.md) | | -**Period** | [**UsagePeriodOut**](UsagePeriodOut.md) | | -**RetrievalQueries** | [**UsageCounterOut**](UsageCounterOut.md) | | -**Storage** | [**UsageCounterOut**](UsageCounterOut.md) | | -**StorageBreakdown** | Pointer to [**NullableStorageBreakdownOut**](StorageBreakdownOut.md) | | [optional] -**TokensThisMonth** | [**TokenUsageOut**](TokenUsageOut.md) | | -**VersionRetention** | [**VersionRetentionOut**](VersionRetentionOut.md) | | -**WritesThisHour** | [**HourlyUsageCounterOut**](HourlyUsageCounterOut.md) | | +**RetrievalBytes** | **int32** | | +**StorageBytes** | **int32** | | ## Methods ### NewDriveUsageOut -`func NewDriveUsageOut(accountFootprint StorageFootprintOut, egressBytes UsageCounterOut, footprint StorageFootprintOut, indexedBytes UsageCounterOut, indexingOps UsageCounterOut, opsThisMonth OperationUsageOut, period UsagePeriodOut, retrievalQueries UsageCounterOut, storage UsageCounterOut, tokensThisMonth TokenUsageOut, versionRetention VersionRetentionOut, writesThisHour HourlyUsageCounterOut, ) *DriveUsageOut` +`func NewDriveUsageOut(retrievalBytes int32, storageBytes int32, ) *DriveUsageOut` NewDriveUsageOut instantiates a new DriveUsageOut object This constructor will assign default values to properties that have it defined, @@ -37,279 +26,44 @@ NewDriveUsageOutWithDefaults instantiates a new DriveUsageOut object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set -### GetAccountFootprint +### GetRetrievalBytes -`func (o *DriveUsageOut) GetAccountFootprint() StorageFootprintOut` +`func (o *DriveUsageOut) GetRetrievalBytes() int32` -GetAccountFootprint returns the AccountFootprint field if non-nil, zero value otherwise. +GetRetrievalBytes returns the RetrievalBytes field if non-nil, zero value otherwise. -### GetAccountFootprintOk +### GetRetrievalBytesOk -`func (o *DriveUsageOut) GetAccountFootprintOk() (*StorageFootprintOut, bool)` +`func (o *DriveUsageOut) GetRetrievalBytesOk() (*int32, bool)` -GetAccountFootprintOk returns a tuple with the AccountFootprint field if it's non-nil, zero value otherwise +GetRetrievalBytesOk returns a tuple with the RetrievalBytes field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetAccountFootprint +### SetRetrievalBytes -`func (o *DriveUsageOut) SetAccountFootprint(v StorageFootprintOut)` +`func (o *DriveUsageOut) SetRetrievalBytes(v int32)` -SetAccountFootprint sets AccountFootprint field to given value. +SetRetrievalBytes sets RetrievalBytes field to given value. -### GetEgressBytes +### GetStorageBytes -`func (o *DriveUsageOut) GetEgressBytes() UsageCounterOut` +`func (o *DriveUsageOut) GetStorageBytes() int32` -GetEgressBytes returns the EgressBytes field if non-nil, zero value otherwise. +GetStorageBytes returns the StorageBytes field if non-nil, zero value otherwise. -### GetEgressBytesOk +### GetStorageBytesOk -`func (o *DriveUsageOut) GetEgressBytesOk() (*UsageCounterOut, bool)` +`func (o *DriveUsageOut) GetStorageBytesOk() (*int32, bool)` -GetEgressBytesOk returns a tuple with the EgressBytes field if it's non-nil, zero value otherwise +GetStorageBytesOk returns a tuple with the StorageBytes field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetEgressBytes +### SetStorageBytes -`func (o *DriveUsageOut) SetEgressBytes(v UsageCounterOut)` +`func (o *DriveUsageOut) SetStorageBytes(v int32)` -SetEgressBytes sets EgressBytes field to given value. - - -### GetFootprint - -`func (o *DriveUsageOut) GetFootprint() StorageFootprintOut` - -GetFootprint returns the Footprint field if non-nil, zero value otherwise. - -### GetFootprintOk - -`func (o *DriveUsageOut) GetFootprintOk() (*StorageFootprintOut, bool)` - -GetFootprintOk returns a tuple with the Footprint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFootprint - -`func (o *DriveUsageOut) SetFootprint(v StorageFootprintOut)` - -SetFootprint sets Footprint field to given value. - - -### GetIndexedBytes - -`func (o *DriveUsageOut) GetIndexedBytes() UsageCounterOut` - -GetIndexedBytes returns the IndexedBytes field if non-nil, zero value otherwise. - -### GetIndexedBytesOk - -`func (o *DriveUsageOut) GetIndexedBytesOk() (*UsageCounterOut, bool)` - -GetIndexedBytesOk returns a tuple with the IndexedBytes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIndexedBytes - -`func (o *DriveUsageOut) SetIndexedBytes(v UsageCounterOut)` - -SetIndexedBytes sets IndexedBytes field to given value. - - -### GetIndexingOps - -`func (o *DriveUsageOut) GetIndexingOps() UsageCounterOut` - -GetIndexingOps returns the IndexingOps field if non-nil, zero value otherwise. - -### GetIndexingOpsOk - -`func (o *DriveUsageOut) GetIndexingOpsOk() (*UsageCounterOut, bool)` - -GetIndexingOpsOk returns a tuple with the IndexingOps field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIndexingOps - -`func (o *DriveUsageOut) SetIndexingOps(v UsageCounterOut)` - -SetIndexingOps sets IndexingOps field to given value. - - -### GetOpsThisMonth - -`func (o *DriveUsageOut) GetOpsThisMonth() OperationUsageOut` - -GetOpsThisMonth returns the OpsThisMonth field if non-nil, zero value otherwise. - -### GetOpsThisMonthOk - -`func (o *DriveUsageOut) GetOpsThisMonthOk() (*OperationUsageOut, bool)` - -GetOpsThisMonthOk returns a tuple with the OpsThisMonth field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOpsThisMonth - -`func (o *DriveUsageOut) SetOpsThisMonth(v OperationUsageOut)` - -SetOpsThisMonth sets OpsThisMonth field to given value. - - -### GetPeriod - -`func (o *DriveUsageOut) GetPeriod() UsagePeriodOut` - -GetPeriod returns the Period field if non-nil, zero value otherwise. - -### GetPeriodOk - -`func (o *DriveUsageOut) GetPeriodOk() (*UsagePeriodOut, bool)` - -GetPeriodOk returns a tuple with the Period field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPeriod - -`func (o *DriveUsageOut) SetPeriod(v UsagePeriodOut)` - -SetPeriod sets Period field to given value. - - -### GetRetrievalQueries - -`func (o *DriveUsageOut) GetRetrievalQueries() UsageCounterOut` - -GetRetrievalQueries returns the RetrievalQueries field if non-nil, zero value otherwise. - -### GetRetrievalQueriesOk - -`func (o *DriveUsageOut) GetRetrievalQueriesOk() (*UsageCounterOut, bool)` - -GetRetrievalQueriesOk returns a tuple with the RetrievalQueries field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRetrievalQueries - -`func (o *DriveUsageOut) SetRetrievalQueries(v UsageCounterOut)` - -SetRetrievalQueries sets RetrievalQueries field to given value. - - -### GetStorage - -`func (o *DriveUsageOut) GetStorage() UsageCounterOut` - -GetStorage returns the Storage field if non-nil, zero value otherwise. - -### GetStorageOk - -`func (o *DriveUsageOut) GetStorageOk() (*UsageCounterOut, bool)` - -GetStorageOk returns a tuple with the Storage field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStorage - -`func (o *DriveUsageOut) SetStorage(v UsageCounterOut)` - -SetStorage sets Storage field to given value. - - -### GetStorageBreakdown - -`func (o *DriveUsageOut) GetStorageBreakdown() StorageBreakdownOut` - -GetStorageBreakdown returns the StorageBreakdown field if non-nil, zero value otherwise. - -### GetStorageBreakdownOk - -`func (o *DriveUsageOut) GetStorageBreakdownOk() (*StorageBreakdownOut, bool)` - -GetStorageBreakdownOk returns a tuple with the StorageBreakdown field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStorageBreakdown - -`func (o *DriveUsageOut) SetStorageBreakdown(v StorageBreakdownOut)` - -SetStorageBreakdown sets StorageBreakdown field to given value. - -### HasStorageBreakdown - -`func (o *DriveUsageOut) HasStorageBreakdown() bool` - -HasStorageBreakdown returns a boolean if a field has been set. - -### SetStorageBreakdownNil - -`func (o *DriveUsageOut) SetStorageBreakdownNil(b bool)` - - SetStorageBreakdownNil sets the value for StorageBreakdown to be an explicit nil - -### UnsetStorageBreakdown -`func (o *DriveUsageOut) UnsetStorageBreakdown()` - -UnsetStorageBreakdown ensures that no value is present for StorageBreakdown, not even an explicit nil -### GetTokensThisMonth - -`func (o *DriveUsageOut) GetTokensThisMonth() TokenUsageOut` - -GetTokensThisMonth returns the TokensThisMonth field if non-nil, zero value otherwise. - -### GetTokensThisMonthOk - -`func (o *DriveUsageOut) GetTokensThisMonthOk() (*TokenUsageOut, bool)` - -GetTokensThisMonthOk returns a tuple with the TokensThisMonth field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTokensThisMonth - -`func (o *DriveUsageOut) SetTokensThisMonth(v TokenUsageOut)` - -SetTokensThisMonth sets TokensThisMonth field to given value. - - -### GetVersionRetention - -`func (o *DriveUsageOut) GetVersionRetention() VersionRetentionOut` - -GetVersionRetention returns the VersionRetention field if non-nil, zero value otherwise. - -### GetVersionRetentionOk - -`func (o *DriveUsageOut) GetVersionRetentionOk() (*VersionRetentionOut, bool)` - -GetVersionRetentionOk returns a tuple with the VersionRetention field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVersionRetention - -`func (o *DriveUsageOut) SetVersionRetention(v VersionRetentionOut)` - -SetVersionRetention sets VersionRetention field to given value. - - -### GetWritesThisHour - -`func (o *DriveUsageOut) GetWritesThisHour() HourlyUsageCounterOut` - -GetWritesThisHour returns the WritesThisHour field if non-nil, zero value otherwise. - -### GetWritesThisHourOk - -`func (o *DriveUsageOut) GetWritesThisHourOk() (*HourlyUsageCounterOut, bool)` - -GetWritesThisHourOk returns a tuple with the WritesThisHour field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetWritesThisHour - -`func (o *DriveUsageOut) SetWritesThisHour(v HourlyUsageCounterOut)` - -SetWritesThisHour sets WritesThisHour field to given value. +SetStorageBytes sets StorageBytes field to given value. diff --git a/sdk/go/docs/DrivesAPI.md b/sdk/go/docs/DrivesAPI.md index 3ddf78b..cd60786 100644 --- a/sdk/go/docs/DrivesAPI.md +++ b/sdk/go/docs/DrivesAPI.md @@ -4,21 +4,21 @@ All URIs are relative to *https://api.agentdrive.run* Method | HTTP request | Description ------------- | ------------- | ------------- -[**CreateDriveKeyRouteV0DrivesDriveIdKeysPost**](DrivesAPI.md#CreateDriveKeyRouteV0DrivesDriveIdKeysPost) | **Post** /v0/drives/{drive_id}/keys | Create a drive API key -[**CreateDriveRouteV0DrivesPost**](DrivesAPI.md#CreateDriveRouteV0DrivesPost) | **Post** /v0/drives | Create a drive in your active space -[**ListDriveKeysRouteV0DrivesDriveIdKeysGet**](DrivesAPI.md#ListDriveKeysRouteV0DrivesDriveIdKeysGet) | **Get** /v0/drives/{drive_id}/keys | List a drive's API keys -[**ListDrivesRouteV0DrivesGet**](DrivesAPI.md#ListDrivesRouteV0DrivesGet) | **Get** /v0/drives | List the drives you can see -[**RenameDriveRouteV0DrivesDriveIdPatch**](DrivesAPI.md#RenameDriveRouteV0DrivesDriveIdPatch) | **Patch** /v0/drives/{drive_id} | Rename a drive you own -[**RevokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePost**](DrivesAPI.md#RevokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePost) | **Post** /v0/drives/{drive_id}/keys/{key_id}/revoke | Revoke a drive API key -[**RotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePost**](DrivesAPI.md#RotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePost) | **Post** /v0/drives/{drive_id}/keys/{key_id}/rotate | Rotate one API key +[**DrivesCreate**](DrivesAPI.md#DrivesCreate) | **Post** /v0/drives | Create Drive +[**DrivesDelete**](DrivesAPI.md#DrivesDelete) | **Delete** /v0/drives/{drive_id} | Delete Drive +[**DrivesList**](DrivesAPI.md#DrivesList) | **Get** /v0/drives | List Drives +[**DrivesRead**](DrivesAPI.md#DrivesRead) | **Get** /v0/drives/{drive_id} | Read Drive +[**DrivesRestore**](DrivesAPI.md#DrivesRestore) | **Post** /v0/drives/{drive_id}/restore | Restore Drive +[**DrivesUpdate**](DrivesAPI.md#DrivesUpdate) | **Patch** /v0/drives/{drive_id} | Update Drive +[**DrivesUsage**](DrivesAPI.md#DrivesUsage) | **Get** /v0/drives/{drive_id}/usage | Drive Usage -## CreateDriveKeyRouteV0DrivesDriveIdKeysPost +## DrivesCreate -> DriveApiKeyCreateOut CreateDriveKeyRouteV0DrivesDriveIdKeysPost(ctx, driveId).DriveApiKeyCreateIn(driveApiKeyCreateIn).Execute() +> DriveOut DrivesCreate(ctx).IdempotencyKey(idempotencyKey).DriveCreateIn(driveCreateIn).Authorization(authorization).Execute() -Create a drive API key +Create Drive @@ -35,46 +35,44 @@ import ( ) func main() { - driveId := "driveId_example" // string | - driveApiKeyCreateIn := *openapiclient.NewDriveApiKeyCreateIn("Label_example") // DriveApiKeyCreateIn | + idempotencyKey := "idempotencyKey_example" // string | + driveCreateIn := *openapiclient.NewDriveCreateIn("Name_example") // DriveCreateIn | + authorization := "authorization_example" // string | (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DrivesAPI.CreateDriveKeyRouteV0DrivesDriveIdKeysPost(context.Background(), driveId).DriveApiKeyCreateIn(driveApiKeyCreateIn).Execute() + resp, r, err := apiClient.DrivesAPI.DrivesCreate(context.Background()).IdempotencyKey(idempotencyKey).DriveCreateIn(driveCreateIn).Authorization(authorization).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DrivesAPI.CreateDriveKeyRouteV0DrivesDriveIdKeysPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DrivesAPI.DrivesCreate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `CreateDriveKeyRouteV0DrivesDriveIdKeysPost`: DriveApiKeyCreateOut - fmt.Fprintf(os.Stdout, "Response from `DrivesAPI.CreateDriveKeyRouteV0DrivesDriveIdKeysPost`: %v\n", resp) + // response from `DrivesCreate`: DriveOut + fmt.Fprintf(os.Stdout, "Response from `DrivesAPI.DrivesCreate`: %v\n", resp) } ``` ### Path Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**driveId** | **string** | | ### Other Parameters -Other parameters are passed through a pointer to a apiCreateDriveKeyRouteV0DrivesDriveIdKeysPostRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiDrivesCreateRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - - **driveApiKeyCreateIn** | [**DriveApiKeyCreateIn**](DriveApiKeyCreateIn.md) | | + **idempotencyKey** | **string** | | + **driveCreateIn** | [**DriveCreateIn**](DriveCreateIn.md) | | + **authorization** | **string** | | ### Return type -[**DriveApiKeyCreateOut**](DriveApiKeyCreateOut.md) +[**DriveOut**](DriveOut.md) ### Authorization -[BearerAuth](../README.md#BearerAuth) +[bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -86,11 +84,11 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## CreateDriveRouteV0DrivesPost +## DrivesDelete -> DriveCreateOut CreateDriveRouteV0DrivesPost(ctx).DriveCreateIn(driveCreateIn).Execute() +> DriveOut DrivesDelete(ctx, driveId).IdempotencyKey(idempotencyKey).IfMatch(ifMatch).Authorization(authorization).Execute() -Create a drive in your active space +Delete Drive @@ -107,44 +105,54 @@ import ( ) func main() { - driveCreateIn := *openapiclient.NewDriveCreateIn("Name_example") // DriveCreateIn | + driveId := "driveId_example" // string | + idempotencyKey := "idempotencyKey_example" // string | + ifMatch := "ifMatch_example" // string | + authorization := "authorization_example" // string | (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DrivesAPI.CreateDriveRouteV0DrivesPost(context.Background()).DriveCreateIn(driveCreateIn).Execute() + resp, r, err := apiClient.DrivesAPI.DrivesDelete(context.Background(), driveId).IdempotencyKey(idempotencyKey).IfMatch(ifMatch).Authorization(authorization).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DrivesAPI.CreateDriveRouteV0DrivesPost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DrivesAPI.DrivesDelete``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `CreateDriveRouteV0DrivesPost`: DriveCreateOut - fmt.Fprintf(os.Stdout, "Response from `DrivesAPI.CreateDriveRouteV0DrivesPost`: %v\n", resp) + // response from `DrivesDelete`: DriveOut + fmt.Fprintf(os.Stdout, "Response from `DrivesAPI.DrivesDelete`: %v\n", resp) } ``` ### Path Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | ### Other Parameters -Other parameters are passed through a pointer to a apiCreateDriveRouteV0DrivesPostRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiDrivesDeleteRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **driveCreateIn** | [**DriveCreateIn**](DriveCreateIn.md) | | + + **idempotencyKey** | **string** | | + **ifMatch** | **string** | | + **authorization** | **string** | | ### Return type -[**DriveCreateOut**](DriveCreateOut.md) +[**DriveOut**](DriveOut.md) ### Authorization -[BearerAuth](../README.md#BearerAuth) +[bearerAuth](../README.md#bearerAuth) ### HTTP request headers -- **Content-Type**: application/json +- **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) @@ -152,11 +160,11 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## ListDriveKeysRouteV0DrivesDriveIdKeysGet +## DrivesList -> DriveApiKeyListOut ListDriveKeysRouteV0DrivesDriveIdKeysGet(ctx, driveId).Cursor(cursor).Limit(limit).Execute() +> DriveListOut DrivesList(ctx).Lifecycle(lifecycle).Limit(limit).Cursor(cursor).Authorization(authorization).Execute() -List a drive's API keys +List Drives @@ -173,48 +181,46 @@ import ( ) func main() { - driveId := "driveId_example" // string | - cursor := "cursor_example" // string | (optional) + lifecycle := "lifecycle_example" // string | (optional) (default to "active") limit := int32(56) // int32 | (optional) + cursor := "cursor_example" // string | (optional) + authorization := "authorization_example" // string | (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DrivesAPI.ListDriveKeysRouteV0DrivesDriveIdKeysGet(context.Background(), driveId).Cursor(cursor).Limit(limit).Execute() + resp, r, err := apiClient.DrivesAPI.DrivesList(context.Background()).Lifecycle(lifecycle).Limit(limit).Cursor(cursor).Authorization(authorization).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DrivesAPI.ListDriveKeysRouteV0DrivesDriveIdKeysGet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DrivesAPI.DrivesList``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `ListDriveKeysRouteV0DrivesDriveIdKeysGet`: DriveApiKeyListOut - fmt.Fprintf(os.Stdout, "Response from `DrivesAPI.ListDriveKeysRouteV0DrivesDriveIdKeysGet`: %v\n", resp) + // response from `DrivesList`: DriveListOut + fmt.Fprintf(os.Stdout, "Response from `DrivesAPI.DrivesList`: %v\n", resp) } ``` ### Path Parameters -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**driveId** | **string** | | ### Other Parameters -Other parameters are passed through a pointer to a apiListDriveKeysRouteV0DrivesDriveIdKeysGetRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiDrivesListRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - - **cursor** | **string** | | + **lifecycle** | **string** | | [default to "active"] **limit** | **int32** | | + **cursor** | **string** | | + **authorization** | **string** | | ### Return type -[**DriveApiKeyListOut**](DriveApiKeyListOut.md) +[**DriveListOut**](DriveListOut.md) ### Authorization -[BearerAuth](../README.md#BearerAuth) +[bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -226,11 +232,11 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## ListDrivesRouteV0DrivesGet +## DrivesRead -> DriveList ListDrivesRouteV0DrivesGet(ctx).Cursor(cursor).Limit(limit).Execute() +> DriveOut DrivesRead(ctx, driveId).IfNoneMatch(ifNoneMatch).Authorization(authorization).Execute() -List the drives you can see +Read Drive @@ -247,42 +253,48 @@ import ( ) func main() { - cursor := "cursor_example" // string | (optional) - limit := int32(56) // int32 | (optional) + driveId := "driveId_example" // string | + ifNoneMatch := "ifNoneMatch_example" // string | (optional) + authorization := "authorization_example" // string | (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DrivesAPI.ListDrivesRouteV0DrivesGet(context.Background()).Cursor(cursor).Limit(limit).Execute() + resp, r, err := apiClient.DrivesAPI.DrivesRead(context.Background(), driveId).IfNoneMatch(ifNoneMatch).Authorization(authorization).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DrivesAPI.ListDrivesRouteV0DrivesGet``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DrivesAPI.DrivesRead``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `ListDrivesRouteV0DrivesGet`: DriveList - fmt.Fprintf(os.Stdout, "Response from `DrivesAPI.ListDrivesRouteV0DrivesGet`: %v\n", resp) + // response from `DrivesRead`: DriveOut + fmt.Fprintf(os.Stdout, "Response from `DrivesAPI.DrivesRead`: %v\n", resp) } ``` ### Path Parameters +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | ### Other Parameters -Other parameters are passed through a pointer to a apiListDrivesRouteV0DrivesGetRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiDrivesReadRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **cursor** | **string** | | - **limit** | **int32** | | + + **ifNoneMatch** | **string** | | + **authorization** | **string** | | ### Return type -[**DriveList**](DriveList.md) +[**DriveOut**](DriveOut.md) ### Authorization -[BearerAuth](../README.md#BearerAuth) +[bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -294,11 +306,11 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## RenameDriveRouteV0DrivesDriveIdPatch +## DrivesRestore -> DriveOut RenameDriveRouteV0DrivesDriveIdPatch(ctx, driveId).DriveRenameIn(driveRenameIn).Execute() +> DriveOut DrivesRestore(ctx, driveId).IdempotencyKey(idempotencyKey).IfMatch(ifMatch).Authorization(authorization).Execute() -Rename a drive you own +Restore Drive @@ -316,17 +328,19 @@ import ( func main() { driveId := "driveId_example" // string | - driveRenameIn := *openapiclient.NewDriveRenameIn("Name_example") // DriveRenameIn | + idempotencyKey := "idempotencyKey_example" // string | + ifMatch := "ifMatch_example" // string | + authorization := "authorization_example" // string | (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DrivesAPI.RenameDriveRouteV0DrivesDriveIdPatch(context.Background(), driveId).DriveRenameIn(driveRenameIn).Execute() + resp, r, err := apiClient.DrivesAPI.DrivesRestore(context.Background(), driveId).IdempotencyKey(idempotencyKey).IfMatch(ifMatch).Authorization(authorization).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DrivesAPI.RenameDriveRouteV0DrivesDriveIdPatch``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DrivesAPI.DrivesRestore``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `RenameDriveRouteV0DrivesDriveIdPatch`: DriveOut - fmt.Fprintf(os.Stdout, "Response from `DrivesAPI.RenameDriveRouteV0DrivesDriveIdPatch`: %v\n", resp) + // response from `DrivesRestore`: DriveOut + fmt.Fprintf(os.Stdout, "Response from `DrivesAPI.DrivesRestore`: %v\n", resp) } ``` @@ -340,13 +354,15 @@ Name | Type | Description | Notes ### Other Parameters -Other parameters are passed through a pointer to a apiRenameDriveRouteV0DrivesDriveIdPatchRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiDrivesRestoreRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **driveRenameIn** | [**DriveRenameIn**](DriveRenameIn.md) | | + **idempotencyKey** | **string** | | + **ifMatch** | **string** | | + **authorization** | **string** | | ### Return type @@ -354,11 +370,11 @@ Name | Type | Description | Notes ### Authorization -[BearerAuth](../README.md#BearerAuth) +[bearerAuth](../README.md#bearerAuth) ### HTTP request headers -- **Content-Type**: application/json +- **Content-Type**: Not defined - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) @@ -366,11 +382,11 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## RevokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePost +## DrivesUpdate -> RevokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePost(ctx, driveId, keyId).Execute() +> DriveOut DrivesUpdate(ctx, driveId).IdempotencyKey(idempotencyKey).IfMatch(ifMatch).DriveUpdateIn(driveUpdateIn).Authorization(authorization).Execute() -Revoke a drive API key +Update Drive @@ -388,15 +404,20 @@ import ( func main() { driveId := "driveId_example" // string | - keyId := "keyId_example" // string | + idempotencyKey := "idempotencyKey_example" // string | + ifMatch := "ifMatch_example" // string | + driveUpdateIn := *openapiclient.NewDriveUpdateIn() // DriveUpdateIn | + authorization := "authorization_example" // string | (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.DrivesAPI.RevokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePost(context.Background(), driveId, keyId).Execute() + resp, r, err := apiClient.DrivesAPI.DrivesUpdate(context.Background(), driveId).IdempotencyKey(idempotencyKey).IfMatch(ifMatch).DriveUpdateIn(driveUpdateIn).Authorization(authorization).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DrivesAPI.RevokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DrivesAPI.DrivesUpdate``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } + // response from `DrivesUpdate`: DriveOut + fmt.Fprintf(os.Stdout, "Response from `DrivesAPI.DrivesUpdate`: %v\n", resp) } ``` @@ -407,29 +428,31 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **driveId** | **string** | | -**keyId** | **string** | | ### Other Parameters -Other parameters are passed through a pointer to a apiRevokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePostRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiDrivesUpdateRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - + **idempotencyKey** | **string** | | + **ifMatch** | **string** | | + **driveUpdateIn** | [**DriveUpdateIn**](DriveUpdateIn.md) | | + **authorization** | **string** | | ### Return type - (empty response body) +[**DriveOut**](DriveOut.md) ### Authorization -[BearerAuth](../README.md#BearerAuth) +[bearerAuth](../README.md#bearerAuth) ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: application/json - **Accept**: application/json [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) @@ -437,11 +460,11 @@ Name | Type | Description | Notes [[Back to README]](../README.md) -## RotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePost +## DrivesUsage -> DriveApiKeyCreateOut RotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePost(ctx, driveId, keyId).Execute() +> DriveUsageOut DrivesUsage(ctx, driveId).Authorization(authorization).Execute() -Rotate one API key +Drive Usage @@ -459,17 +482,17 @@ import ( func main() { driveId := "driveId_example" // string | - keyId := "keyId_example" // string | + authorization := "authorization_example" // string | (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.DrivesAPI.RotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePost(context.Background(), driveId, keyId).Execute() + resp, r, err := apiClient.DrivesAPI.DrivesUsage(context.Background(), driveId).Authorization(authorization).Execute() if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `DrivesAPI.RotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePost``: %v\n", err) + fmt.Fprintf(os.Stderr, "Error when calling `DrivesAPI.DrivesUsage``: %v\n", err) fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) } - // response from `RotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePost`: DriveApiKeyCreateOut - fmt.Fprintf(os.Stdout, "Response from `DrivesAPI.RotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePost`: %v\n", resp) + // response from `DrivesUsage`: DriveUsageOut + fmt.Fprintf(os.Stdout, "Response from `DrivesAPI.DrivesUsage`: %v\n", resp) } ``` @@ -480,25 +503,24 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. **driveId** | **string** | | -**keyId** | **string** | | ### Other Parameters -Other parameters are passed through a pointer to a apiRotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePostRequest struct via the builder pattern +Other parameters are passed through a pointer to a apiDrivesUsageRequest struct via the builder pattern Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - + **authorization** | **string** | | ### Return type -[**DriveApiKeyCreateOut**](DriveApiKeyCreateOut.md) +[**DriveUsageOut**](DriveUsageOut.md) ### Authorization -[BearerAuth](../README.md#BearerAuth) +[bearerAuth](../README.md#bearerAuth) ### HTTP request headers diff --git a/sdk/go/docs/DrivesCreate400Response.md b/sdk/go/docs/DrivesCreate400Response.md new file mode 100644 index 0000000..c8839f0 --- /dev/null +++ b/sdk/go/docs/DrivesCreate400Response.md @@ -0,0 +1,49 @@ +# DrivesCreate400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error** | [**DrivesCreate400ResponseError**](DrivesCreate400ResponseError.md) | | + +## Methods + +### NewDrivesCreate400Response + +`func NewDrivesCreate400Response(error_ DrivesCreate400ResponseError, ) *DrivesCreate400Response` + +NewDrivesCreate400Response instantiates a new DrivesCreate400Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDrivesCreate400ResponseWithDefaults + +`func NewDrivesCreate400ResponseWithDefaults() *DrivesCreate400Response` + +NewDrivesCreate400ResponseWithDefaults instantiates a new DrivesCreate400Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetError + +`func (o *DrivesCreate400Response) GetError() DrivesCreate400ResponseError` + +GetError returns the Error field if non-nil, zero value otherwise. + +### GetErrorOk + +`func (o *DrivesCreate400Response) GetErrorOk() (*DrivesCreate400ResponseError, bool)` + +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError + +`func (o *DrivesCreate400Response) SetError(v DrivesCreate400ResponseError)` + +SetError sets Error field to given value. + + + +[[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/sdk/go/docs/DrivesCreate400ResponseError.md b/sdk/go/docs/DrivesCreate400ResponseError.md new file mode 100644 index 0000000..f8a847d --- /dev/null +++ b/sdk/go/docs/DrivesCreate400ResponseError.md @@ -0,0 +1,96 @@ +# DrivesCreate400ResponseError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | **string** | Stable machine-readable error code (see the error-catalog). | +**Details** | Pointer to **map[string]interface{}** | Error-code-specific context (optional). | [optional] +**Message** | **string** | | + +## Methods + +### NewDrivesCreate400ResponseError + +`func NewDrivesCreate400ResponseError(code string, message string, ) *DrivesCreate400ResponseError` + +NewDrivesCreate400ResponseError instantiates a new DrivesCreate400ResponseError object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDrivesCreate400ResponseErrorWithDefaults + +`func NewDrivesCreate400ResponseErrorWithDefaults() *DrivesCreate400ResponseError` + +NewDrivesCreate400ResponseErrorWithDefaults instantiates a new DrivesCreate400ResponseError object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCode + +`func (o *DrivesCreate400ResponseError) GetCode() string` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *DrivesCreate400ResponseError) GetCodeOk() (*string, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *DrivesCreate400ResponseError) SetCode(v string)` + +SetCode sets Code field to given value. + + +### GetDetails + +`func (o *DrivesCreate400ResponseError) GetDetails() map[string]interface{}` + +GetDetails returns the Details field if non-nil, zero value otherwise. + +### GetDetailsOk + +`func (o *DrivesCreate400ResponseError) GetDetailsOk() (*map[string]interface{}, bool)` + +GetDetailsOk returns a tuple with the Details field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDetails + +`func (o *DrivesCreate400ResponseError) SetDetails(v map[string]interface{})` + +SetDetails sets Details field to given value. + +### HasDetails + +`func (o *DrivesCreate400ResponseError) HasDetails() bool` + +HasDetails returns a boolean if a field has been set. + +### GetMessage + +`func (o *DrivesCreate400ResponseError) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *DrivesCreate400ResponseError) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *DrivesCreate400ResponseError) SetMessage(v string)` + +SetMessage sets Message field to given value. + + + +[[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/sdk/go/docs/DrivesList400Response.md b/sdk/go/docs/DrivesList400Response.md new file mode 100644 index 0000000..a6add6c --- /dev/null +++ b/sdk/go/docs/DrivesList400Response.md @@ -0,0 +1,49 @@ +# DrivesList400Response + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error** | [**DrivesList400ResponseError**](DrivesList400ResponseError.md) | | + +## Methods + +### NewDrivesList400Response + +`func NewDrivesList400Response(error_ DrivesList400ResponseError, ) *DrivesList400Response` + +NewDrivesList400Response instantiates a new DrivesList400Response object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDrivesList400ResponseWithDefaults + +`func NewDrivesList400ResponseWithDefaults() *DrivesList400Response` + +NewDrivesList400ResponseWithDefaults instantiates a new DrivesList400Response object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetError + +`func (o *DrivesList400Response) GetError() DrivesList400ResponseError` + +GetError returns the Error field if non-nil, zero value otherwise. + +### GetErrorOk + +`func (o *DrivesList400Response) GetErrorOk() (*DrivesList400ResponseError, bool)` + +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError + +`func (o *DrivesList400Response) SetError(v DrivesList400ResponseError)` + +SetError sets Error field to given value. + + + +[[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/sdk/go/docs/DrivesList400ResponseError.md b/sdk/go/docs/DrivesList400ResponseError.md new file mode 100644 index 0000000..08a2724 --- /dev/null +++ b/sdk/go/docs/DrivesList400ResponseError.md @@ -0,0 +1,106 @@ +# DrivesList400ResponseError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | **string** | Stable machine-readable error code (see the error-catalog). | +**Details** | Pointer to **map[string]interface{}** | Error-code-specific context (optional). | [optional] +**Message** | **NullableString** | | + +## Methods + +### NewDrivesList400ResponseError + +`func NewDrivesList400ResponseError(code string, message NullableString, ) *DrivesList400ResponseError` + +NewDrivesList400ResponseError instantiates a new DrivesList400ResponseError object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewDrivesList400ResponseErrorWithDefaults + +`func NewDrivesList400ResponseErrorWithDefaults() *DrivesList400ResponseError` + +NewDrivesList400ResponseErrorWithDefaults instantiates a new DrivesList400ResponseError object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCode + +`func (o *DrivesList400ResponseError) GetCode() string` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *DrivesList400ResponseError) GetCodeOk() (*string, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *DrivesList400ResponseError) SetCode(v string)` + +SetCode sets Code field to given value. + + +### GetDetails + +`func (o *DrivesList400ResponseError) GetDetails() map[string]interface{}` + +GetDetails returns the Details field if non-nil, zero value otherwise. + +### GetDetailsOk + +`func (o *DrivesList400ResponseError) GetDetailsOk() (*map[string]interface{}, bool)` + +GetDetailsOk returns a tuple with the Details field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDetails + +`func (o *DrivesList400ResponseError) SetDetails(v map[string]interface{})` + +SetDetails sets Details field to given value. + +### HasDetails + +`func (o *DrivesList400ResponseError) HasDetails() bool` + +HasDetails returns a boolean if a field has been set. + +### GetMessage + +`func (o *DrivesList400ResponseError) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *DrivesList400ResponseError) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *DrivesList400ResponseError) SetMessage(v string)` + +SetMessage sets Message field to given value. + + +### SetMessageNil + +`func (o *DrivesList400ResponseError) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *DrivesList400ResponseError) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[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/sdk/go/docs/ErrorBody.md b/sdk/go/docs/ErrorBody.md deleted file mode 100644 index e77b3cb..0000000 --- a/sdk/go/docs/ErrorBody.md +++ /dev/null @@ -1,70 +0,0 @@ -# ErrorBody - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Code** | **string** | | -**Message** | **string** | | - -## Methods - -### NewErrorBody - -`func NewErrorBody(code string, message string, ) *ErrorBody` - -NewErrorBody instantiates a new ErrorBody object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewErrorBodyWithDefaults - -`func NewErrorBodyWithDefaults() *ErrorBody` - -NewErrorBodyWithDefaults instantiates a new ErrorBody object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetCode - -`func (o *ErrorBody) GetCode() string` - -GetCode returns the Code field if non-nil, zero value otherwise. - -### GetCodeOk - -`func (o *ErrorBody) GetCodeOk() (*string, bool)` - -GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCode - -`func (o *ErrorBody) SetCode(v string)` - -SetCode sets Code field to given value. - - -### GetMessage - -`func (o *ErrorBody) GetMessage() string` - -GetMessage returns the Message field if non-nil, zero value otherwise. - -### GetMessageOk - -`func (o *ErrorBody) GetMessageOk() (*string, bool)` - -GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessage - -`func (o *ErrorBody) SetMessage(v string)` - -SetMessage sets Message field to given value. - - - -[[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/sdk/go/docs/ErrorDetail.md b/sdk/go/docs/ErrorDetail.md deleted file mode 100644 index 7a235d9..0000000 --- a/sdk/go/docs/ErrorDetail.md +++ /dev/null @@ -1,49 +0,0 @@ -# ErrorDetail - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Error** | [**ErrorBody**](ErrorBody.md) | | - -## Methods - -### NewErrorDetail - -`func NewErrorDetail(error_ ErrorBody, ) *ErrorDetail` - -NewErrorDetail instantiates a new ErrorDetail object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewErrorDetailWithDefaults - -`func NewErrorDetailWithDefaults() *ErrorDetail` - -NewErrorDetailWithDefaults instantiates a new ErrorDetail object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetError - -`func (o *ErrorDetail) GetError() ErrorBody` - -GetError returns the Error field if non-nil, zero value otherwise. - -### GetErrorOk - -`func (o *ErrorDetail) GetErrorOk() (*ErrorBody, bool)` - -GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetError - -`func (o *ErrorDetail) SetError(v ErrorBody)` - -SetError sets Error field to given value. - - - -[[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/sdk/go/docs/ErrorResponse.md b/sdk/go/docs/ErrorResponse.md index fc4b3c1..4a70c0d 100644 --- a/sdk/go/docs/ErrorResponse.md +++ b/sdk/go/docs/ErrorResponse.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Detail** | [**ErrorDetail**](ErrorDetail.md) | | +**Error** | [**DrivesCreate400ResponseError**](DrivesCreate400ResponseError.md) | | ## Methods ### NewErrorResponse -`func NewErrorResponse(detail ErrorDetail, ) *ErrorResponse` +`func NewErrorResponse(error_ DrivesCreate400ResponseError, ) *ErrorResponse` NewErrorResponse instantiates a new ErrorResponse object This constructor will assign default values to properties that have it defined, @@ -25,24 +25,24 @@ NewErrorResponseWithDefaults instantiates a new ErrorResponse object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set -### GetDetail +### GetError -`func (o *ErrorResponse) GetDetail() ErrorDetail` +`func (o *ErrorResponse) GetError() DrivesCreate400ResponseError` -GetDetail returns the Detail field if non-nil, zero value otherwise. +GetError returns the Error field if non-nil, zero value otherwise. -### GetDetailOk +### GetErrorOk -`func (o *ErrorResponse) GetDetailOk() (*ErrorDetail, bool)` +`func (o *ErrorResponse) GetErrorOk() (*DrivesCreate400ResponseError, bool)` -GetDetailOk returns a tuple with the Detail field if it's non-nil, zero value otherwise +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetDetail +### SetError -`func (o *ErrorResponse) SetDetail(v ErrorDetail)` +`func (o *ErrorResponse) SetError(v DrivesCreate400ResponseError)` -SetDetail sets Detail field to given value. +SetError sets Error field to given value. diff --git a/sdk/go/docs/EventOut.md b/sdk/go/docs/EventOut.md deleted file mode 100644 index bca0170..0000000 --- a/sdk/go/docs/EventOut.md +++ /dev/null @@ -1,210 +0,0 @@ -# EventOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Action** | **string** | | -**ActorName** | Pointer to **NullableString** | | [optional] -**ArtId** | Pointer to **NullableString** | | [optional] -**CreatedAt** | **time.Time** | | -**DriveId** | **string** | | -**Id** | **string** | | -**Metadata** | Pointer to **map[string]interface{}** | | [optional] - -## Methods - -### NewEventOut - -`func NewEventOut(action string, createdAt time.Time, driveId string, id string, ) *EventOut` - -NewEventOut instantiates a new EventOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewEventOutWithDefaults - -`func NewEventOutWithDefaults() *EventOut` - -NewEventOutWithDefaults instantiates a new EventOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetAction - -`func (o *EventOut) GetAction() string` - -GetAction returns the Action field if non-nil, zero value otherwise. - -### GetActionOk - -`func (o *EventOut) GetActionOk() (*string, bool)` - -GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAction - -`func (o *EventOut) SetAction(v string)` - -SetAction sets Action field to given value. - - -### GetActorName - -`func (o *EventOut) GetActorName() string` - -GetActorName returns the ActorName field if non-nil, zero value otherwise. - -### GetActorNameOk - -`func (o *EventOut) GetActorNameOk() (*string, bool)` - -GetActorNameOk returns a tuple with the ActorName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetActorName - -`func (o *EventOut) SetActorName(v string)` - -SetActorName sets ActorName field to given value. - -### HasActorName - -`func (o *EventOut) HasActorName() bool` - -HasActorName returns a boolean if a field has been set. - -### SetActorNameNil - -`func (o *EventOut) SetActorNameNil(b bool)` - - SetActorNameNil sets the value for ActorName to be an explicit nil - -### UnsetActorName -`func (o *EventOut) UnsetActorName()` - -UnsetActorName ensures that no value is present for ActorName, not even an explicit nil -### GetArtId - -`func (o *EventOut) GetArtId() string` - -GetArtId returns the ArtId field if non-nil, zero value otherwise. - -### GetArtIdOk - -`func (o *EventOut) GetArtIdOk() (*string, bool)` - -GetArtIdOk returns a tuple with the ArtId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetArtId - -`func (o *EventOut) SetArtId(v string)` - -SetArtId sets ArtId field to given value. - -### HasArtId - -`func (o *EventOut) HasArtId() bool` - -HasArtId returns a boolean if a field has been set. - -### SetArtIdNil - -`func (o *EventOut) SetArtIdNil(b bool)` - - SetArtIdNil sets the value for ArtId to be an explicit nil - -### UnsetArtId -`func (o *EventOut) UnsetArtId()` - -UnsetArtId ensures that no value is present for ArtId, not even an explicit nil -### GetCreatedAt - -`func (o *EventOut) GetCreatedAt() time.Time` - -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. - -### GetCreatedAtOk - -`func (o *EventOut) GetCreatedAtOk() (*time.Time, bool)` - -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreatedAt - -`func (o *EventOut) SetCreatedAt(v time.Time)` - -SetCreatedAt sets CreatedAt field to given value. - - -### GetDriveId - -`func (o *EventOut) GetDriveId() string` - -GetDriveId returns the DriveId field if non-nil, zero value otherwise. - -### GetDriveIdOk - -`func (o *EventOut) GetDriveIdOk() (*string, bool)` - -GetDriveIdOk returns a tuple with the DriveId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDriveId - -`func (o *EventOut) SetDriveId(v string)` - -SetDriveId sets DriveId field to given value. - - -### GetId - -`func (o *EventOut) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *EventOut) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *EventOut) SetId(v string)` - -SetId sets Id field to given value. - - -### GetMetadata - -`func (o *EventOut) GetMetadata() map[string]interface{}` - -GetMetadata returns the Metadata field if non-nil, zero value otherwise. - -### GetMetadataOk - -`func (o *EventOut) GetMetadataOk() (*map[string]interface{}, bool)` - -GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMetadata - -`func (o *EventOut) SetMetadata(v map[string]interface{})` - -SetMetadata sets Metadata field to given value. - -### HasMetadata - -`func (o *EventOut) HasMetadata() bool` - -HasMetadata returns a boolean if a field has been set. - - -[[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/sdk/go/docs/EventPage.md b/sdk/go/docs/EventPage.md deleted file mode 100644 index 9cc525f..0000000 --- a/sdk/go/docs/EventPage.md +++ /dev/null @@ -1,85 +0,0 @@ -# EventPage - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Items** | [**[]EventOut**](EventOut.md) | | -**NextCursor** | Pointer to **NullableString** | | [optional] - -## Methods - -### NewEventPage - -`func NewEventPage(items []EventOut, ) *EventPage` - -NewEventPage instantiates a new EventPage object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewEventPageWithDefaults - -`func NewEventPageWithDefaults() *EventPage` - -NewEventPageWithDefaults instantiates a new EventPage object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetItems - -`func (o *EventPage) GetItems() []EventOut` - -GetItems returns the Items field if non-nil, zero value otherwise. - -### GetItemsOk - -`func (o *EventPage) GetItemsOk() (*[]EventOut, bool)` - -GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetItems - -`func (o *EventPage) SetItems(v []EventOut)` - -SetItems sets Items field to given value. - - -### GetNextCursor - -`func (o *EventPage) GetNextCursor() string` - -GetNextCursor returns the NextCursor field if non-nil, zero value otherwise. - -### GetNextCursorOk - -`func (o *EventPage) GetNextCursorOk() (*string, bool)` - -GetNextCursorOk returns a tuple with the NextCursor field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNextCursor - -`func (o *EventPage) SetNextCursor(v string)` - -SetNextCursor sets NextCursor field to given value. - -### HasNextCursor - -`func (o *EventPage) HasNextCursor() bool` - -HasNextCursor returns a boolean if a field has been set. - -### SetNextCursorNil - -`func (o *EventPage) SetNextCursorNil(b bool)` - - SetNextCursorNil sets the value for NextCursor to be an explicit nil - -### UnsetNextCursor -`func (o *EventPage) UnsetNextCursor()` - -UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil - -[[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/sdk/go/docs/ExtensionExchangeRequest.md b/sdk/go/docs/ExtensionExchangeRequest.md deleted file mode 100644 index c95884e..0000000 --- a/sdk/go/docs/ExtensionExchangeRequest.md +++ /dev/null @@ -1,70 +0,0 @@ -# ExtensionExchangeRequest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ExtId** | **string** | The extension's ID (Chrome Web Store ID or unpacked dev ID). | -**Ticket** | **string** | The opaque ticket from the /auth/callback handoff. | - -## Methods - -### NewExtensionExchangeRequest - -`func NewExtensionExchangeRequest(extId string, ticket string, ) *ExtensionExchangeRequest` - -NewExtensionExchangeRequest instantiates a new ExtensionExchangeRequest object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewExtensionExchangeRequestWithDefaults - -`func NewExtensionExchangeRequestWithDefaults() *ExtensionExchangeRequest` - -NewExtensionExchangeRequestWithDefaults instantiates a new ExtensionExchangeRequest object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetExtId - -`func (o *ExtensionExchangeRequest) GetExtId() string` - -GetExtId returns the ExtId field if non-nil, zero value otherwise. - -### GetExtIdOk - -`func (o *ExtensionExchangeRequest) GetExtIdOk() (*string, bool)` - -GetExtIdOk returns a tuple with the ExtId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExtId - -`func (o *ExtensionExchangeRequest) SetExtId(v string)` - -SetExtId sets ExtId field to given value. - - -### GetTicket - -`func (o *ExtensionExchangeRequest) GetTicket() string` - -GetTicket returns the Ticket field if non-nil, zero value otherwise. - -### GetTicketOk - -`func (o *ExtensionExchangeRequest) GetTicketOk() (*string, bool)` - -GetTicketOk returns a tuple with the Ticket field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTicket - -`func (o *ExtensionExchangeRequest) SetTicket(v string)` - -SetTicket sets Ticket field to given value. - - - -[[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/sdk/go/docs/ExtensionExchangeResponse.md b/sdk/go/docs/ExtensionExchangeResponse.md deleted file mode 100644 index 65b7bb4..0000000 --- a/sdk/go/docs/ExtensionExchangeResponse.md +++ /dev/null @@ -1,164 +0,0 @@ -# ExtensionExchangeResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AccessToken** | **string** | 15-minute access_token (scope=extension). | -**DriveId** | **string** | The drive these credentials are scoped to. | -**ExpiresIn** | **int32** | Seconds until access_token expiry. | -**IdentityAssertion** | **string** | 90-day identity_assertion. Refresh via POST /oauth2/token. | -**Scope** | Pointer to **string** | | [optional] [default to "extension"] -**TokenType** | Pointer to **string** | | [optional] [default to "Bearer"] - -## Methods - -### NewExtensionExchangeResponse - -`func NewExtensionExchangeResponse(accessToken string, driveId string, expiresIn int32, identityAssertion string, ) *ExtensionExchangeResponse` - -NewExtensionExchangeResponse instantiates a new ExtensionExchangeResponse object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewExtensionExchangeResponseWithDefaults - -`func NewExtensionExchangeResponseWithDefaults() *ExtensionExchangeResponse` - -NewExtensionExchangeResponseWithDefaults instantiates a new ExtensionExchangeResponse object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetAccessToken - -`func (o *ExtensionExchangeResponse) GetAccessToken() string` - -GetAccessToken returns the AccessToken field if non-nil, zero value otherwise. - -### GetAccessTokenOk - -`func (o *ExtensionExchangeResponse) GetAccessTokenOk() (*string, bool)` - -GetAccessTokenOk returns a tuple with the AccessToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAccessToken - -`func (o *ExtensionExchangeResponse) SetAccessToken(v string)` - -SetAccessToken sets AccessToken field to given value. - - -### GetDriveId - -`func (o *ExtensionExchangeResponse) GetDriveId() string` - -GetDriveId returns the DriveId field if non-nil, zero value otherwise. - -### GetDriveIdOk - -`func (o *ExtensionExchangeResponse) GetDriveIdOk() (*string, bool)` - -GetDriveIdOk returns a tuple with the DriveId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDriveId - -`func (o *ExtensionExchangeResponse) SetDriveId(v string)` - -SetDriveId sets DriveId field to given value. - - -### GetExpiresIn - -`func (o *ExtensionExchangeResponse) GetExpiresIn() int32` - -GetExpiresIn returns the ExpiresIn field if non-nil, zero value otherwise. - -### GetExpiresInOk - -`func (o *ExtensionExchangeResponse) GetExpiresInOk() (*int32, bool)` - -GetExpiresInOk returns a tuple with the ExpiresIn field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExpiresIn - -`func (o *ExtensionExchangeResponse) SetExpiresIn(v int32)` - -SetExpiresIn sets ExpiresIn field to given value. - - -### GetIdentityAssertion - -`func (o *ExtensionExchangeResponse) GetIdentityAssertion() string` - -GetIdentityAssertion returns the IdentityAssertion field if non-nil, zero value otherwise. - -### GetIdentityAssertionOk - -`func (o *ExtensionExchangeResponse) GetIdentityAssertionOk() (*string, bool)` - -GetIdentityAssertionOk returns a tuple with the IdentityAssertion field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIdentityAssertion - -`func (o *ExtensionExchangeResponse) SetIdentityAssertion(v string)` - -SetIdentityAssertion sets IdentityAssertion field to given value. - - -### GetScope - -`func (o *ExtensionExchangeResponse) GetScope() string` - -GetScope returns the Scope field if non-nil, zero value otherwise. - -### GetScopeOk - -`func (o *ExtensionExchangeResponse) GetScopeOk() (*string, bool)` - -GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetScope - -`func (o *ExtensionExchangeResponse) SetScope(v string)` - -SetScope sets Scope field to given value. - -### HasScope - -`func (o *ExtensionExchangeResponse) HasScope() bool` - -HasScope returns a boolean if a field has been set. - -### GetTokenType - -`func (o *ExtensionExchangeResponse) GetTokenType() string` - -GetTokenType returns the TokenType field if non-nil, zero value otherwise. - -### GetTokenTypeOk - -`func (o *ExtensionExchangeResponse) GetTokenTypeOk() (*string, bool)` - -GetTokenTypeOk returns a tuple with the TokenType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTokenType - -`func (o *ExtensionExchangeResponse) SetTokenType(v string)` - -SetTokenType sets TokenType field to given value. - -### HasTokenType - -`func (o *ExtensionExchangeResponse) HasTokenType() bool` - -HasTokenType returns a boolean if a field has been set. - - -[[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/sdk/go/docs/FeedbackCreateOut.md b/sdk/go/docs/FeedbackCreateOut.md deleted file mode 100644 index 8ca0d5e..0000000 --- a/sdk/go/docs/FeedbackCreateOut.md +++ /dev/null @@ -1,127 +0,0 @@ -# FeedbackCreateOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Contact** | **bool** | | -**Id** | **string** | | -**Note** | Pointer to **NullableString** | | [optional] -**Status** | **string** | | - -## Methods - -### NewFeedbackCreateOut - -`func NewFeedbackCreateOut(contact bool, id string, status string, ) *FeedbackCreateOut` - -NewFeedbackCreateOut instantiates a new FeedbackCreateOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewFeedbackCreateOutWithDefaults - -`func NewFeedbackCreateOutWithDefaults() *FeedbackCreateOut` - -NewFeedbackCreateOutWithDefaults instantiates a new FeedbackCreateOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetContact - -`func (o *FeedbackCreateOut) GetContact() bool` - -GetContact returns the Contact field if non-nil, zero value otherwise. - -### GetContactOk - -`func (o *FeedbackCreateOut) GetContactOk() (*bool, bool)` - -GetContactOk returns a tuple with the Contact field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetContact - -`func (o *FeedbackCreateOut) SetContact(v bool)` - -SetContact sets Contact field to given value. - - -### GetId - -`func (o *FeedbackCreateOut) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *FeedbackCreateOut) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *FeedbackCreateOut) SetId(v string)` - -SetId sets Id field to given value. - - -### GetNote - -`func (o *FeedbackCreateOut) GetNote() string` - -GetNote returns the Note field if non-nil, zero value otherwise. - -### GetNoteOk - -`func (o *FeedbackCreateOut) GetNoteOk() (*string, bool)` - -GetNoteOk returns a tuple with the Note field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNote - -`func (o *FeedbackCreateOut) SetNote(v string)` - -SetNote sets Note field to given value. - -### HasNote - -`func (o *FeedbackCreateOut) HasNote() bool` - -HasNote returns a boolean if a field has been set. - -### SetNoteNil - -`func (o *FeedbackCreateOut) SetNoteNil(b bool)` - - SetNoteNil sets the value for Note to be an explicit nil - -### UnsetNote -`func (o *FeedbackCreateOut) UnsetNote()` - -UnsetNote ensures that no value is present for Note, not even an explicit nil -### GetStatus - -`func (o *FeedbackCreateOut) GetStatus() string` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *FeedbackCreateOut) GetStatusOk() (*string, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *FeedbackCreateOut) SetStatus(v string)` - -SetStatus sets Status field to given value. - - - -[[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/sdk/go/docs/FeedbackStatusOut.md b/sdk/go/docs/FeedbackStatusOut.md deleted file mode 100644 index 08b320d..0000000 --- a/sdk/go/docs/FeedbackStatusOut.md +++ /dev/null @@ -1,211 +0,0 @@ -# FeedbackStatusOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Contact** | **bool** | | -**CreatedAt** | **time.Time** | | -**DuplicateOf** | Pointer to **NullableString** | | [optional] -**Id** | **string** | | -**Kind** | **string** | | -**Status** | **string** | | -**StatusChangedAt** | **time.Time** | | -**Title** | **string** | | - -## Methods - -### NewFeedbackStatusOut - -`func NewFeedbackStatusOut(contact bool, createdAt time.Time, id string, kind string, status string, statusChangedAt time.Time, title string, ) *FeedbackStatusOut` - -NewFeedbackStatusOut instantiates a new FeedbackStatusOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewFeedbackStatusOutWithDefaults - -`func NewFeedbackStatusOutWithDefaults() *FeedbackStatusOut` - -NewFeedbackStatusOutWithDefaults instantiates a new FeedbackStatusOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetContact - -`func (o *FeedbackStatusOut) GetContact() bool` - -GetContact returns the Contact field if non-nil, zero value otherwise. - -### GetContactOk - -`func (o *FeedbackStatusOut) GetContactOk() (*bool, bool)` - -GetContactOk returns a tuple with the Contact field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetContact - -`func (o *FeedbackStatusOut) SetContact(v bool)` - -SetContact sets Contact field to given value. - - -### GetCreatedAt - -`func (o *FeedbackStatusOut) GetCreatedAt() time.Time` - -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. - -### GetCreatedAtOk - -`func (o *FeedbackStatusOut) GetCreatedAtOk() (*time.Time, bool)` - -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreatedAt - -`func (o *FeedbackStatusOut) SetCreatedAt(v time.Time)` - -SetCreatedAt sets CreatedAt field to given value. - - -### GetDuplicateOf - -`func (o *FeedbackStatusOut) GetDuplicateOf() string` - -GetDuplicateOf returns the DuplicateOf field if non-nil, zero value otherwise. - -### GetDuplicateOfOk - -`func (o *FeedbackStatusOut) GetDuplicateOfOk() (*string, bool)` - -GetDuplicateOfOk returns a tuple with the DuplicateOf field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDuplicateOf - -`func (o *FeedbackStatusOut) SetDuplicateOf(v string)` - -SetDuplicateOf sets DuplicateOf field to given value. - -### HasDuplicateOf - -`func (o *FeedbackStatusOut) HasDuplicateOf() bool` - -HasDuplicateOf returns a boolean if a field has been set. - -### SetDuplicateOfNil - -`func (o *FeedbackStatusOut) SetDuplicateOfNil(b bool)` - - SetDuplicateOfNil sets the value for DuplicateOf to be an explicit nil - -### UnsetDuplicateOf -`func (o *FeedbackStatusOut) UnsetDuplicateOf()` - -UnsetDuplicateOf ensures that no value is present for DuplicateOf, not even an explicit nil -### GetId - -`func (o *FeedbackStatusOut) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *FeedbackStatusOut) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *FeedbackStatusOut) SetId(v string)` - -SetId sets Id field to given value. - - -### GetKind - -`func (o *FeedbackStatusOut) GetKind() string` - -GetKind returns the Kind field if non-nil, zero value otherwise. - -### GetKindOk - -`func (o *FeedbackStatusOut) GetKindOk() (*string, bool)` - -GetKindOk returns a tuple with the Kind field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetKind - -`func (o *FeedbackStatusOut) SetKind(v string)` - -SetKind sets Kind field to given value. - - -### GetStatus - -`func (o *FeedbackStatusOut) GetStatus() string` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *FeedbackStatusOut) GetStatusOk() (*string, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *FeedbackStatusOut) SetStatus(v string)` - -SetStatus sets Status field to given value. - - -### GetStatusChangedAt - -`func (o *FeedbackStatusOut) GetStatusChangedAt() time.Time` - -GetStatusChangedAt returns the StatusChangedAt field if non-nil, zero value otherwise. - -### GetStatusChangedAtOk - -`func (o *FeedbackStatusOut) GetStatusChangedAtOk() (*time.Time, bool)` - -GetStatusChangedAtOk returns a tuple with the StatusChangedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatusChangedAt - -`func (o *FeedbackStatusOut) SetStatusChangedAt(v time.Time)` - -SetStatusChangedAt sets StatusChangedAt field to given value. - - -### GetTitle - -`func (o *FeedbackStatusOut) GetTitle() string` - -GetTitle returns the Title field if non-nil, zero value otherwise. - -### GetTitleOk - -`func (o *FeedbackStatusOut) GetTitleOk() (*string, bool)` - -GetTitleOk returns a tuple with the Title field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTitle - -`func (o *FeedbackStatusOut) SetTitle(v string)` - -SetTitle sets Title field to given value. - - - -[[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/sdk/go/docs/FindHitOut.md b/sdk/go/docs/FindHitOut.md deleted file mode 100644 index 51b3b84..0000000 --- a/sdk/go/docs/FindHitOut.md +++ /dev/null @@ -1,615 +0,0 @@ -# FindHitOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ArtId** | **string** | | -**CharEnd** | Pointer to **NullableInt32** | | [optional] -**CharStart** | Pointer to **NullableInt32** | | [optional] -**ContentType** | **string** | | -**DriveId** | **string** | | -**FileType** | **string** | | -**Labels** | Pointer to **[]string** | | [optional] -**Modality** | **string** | | -**Ord** | **int32** | | -**PageEnd** | Pointer to **NullableInt32** | | [optional] -**PageStart** | Pointer to **NullableInt32** | | [optional] -**Path** | **string** | | -**RankLexical** | Pointer to **NullableInt32** | | [optional] -**RankSemantic** | Pointer to **NullableInt32** | | [optional] -**Score** | **float32** | | -**Snippet** | **string** | | -**Text** | **string** | | -**TimeEndMs** | Pointer to **NullableInt32** | | [optional] -**TimeStartMs** | Pointer to **NullableInt32** | | [optional] -**UpdatedAt** | **time.Time** | | -**Url** | **string** | | -**VersionNumber** | **int32** | | - -## Methods - -### NewFindHitOut - -`func NewFindHitOut(artId string, contentType string, driveId string, fileType string, modality string, ord int32, path string, score float32, snippet string, text string, updatedAt time.Time, url string, versionNumber int32, ) *FindHitOut` - -NewFindHitOut instantiates a new FindHitOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewFindHitOutWithDefaults - -`func NewFindHitOutWithDefaults() *FindHitOut` - -NewFindHitOutWithDefaults instantiates a new FindHitOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetArtId - -`func (o *FindHitOut) GetArtId() string` - -GetArtId returns the ArtId field if non-nil, zero value otherwise. - -### GetArtIdOk - -`func (o *FindHitOut) GetArtIdOk() (*string, bool)` - -GetArtIdOk returns a tuple with the ArtId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetArtId - -`func (o *FindHitOut) SetArtId(v string)` - -SetArtId sets ArtId field to given value. - - -### GetCharEnd - -`func (o *FindHitOut) GetCharEnd() int32` - -GetCharEnd returns the CharEnd field if non-nil, zero value otherwise. - -### GetCharEndOk - -`func (o *FindHitOut) GetCharEndOk() (*int32, bool)` - -GetCharEndOk returns a tuple with the CharEnd field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCharEnd - -`func (o *FindHitOut) SetCharEnd(v int32)` - -SetCharEnd sets CharEnd field to given value. - -### HasCharEnd - -`func (o *FindHitOut) HasCharEnd() bool` - -HasCharEnd returns a boolean if a field has been set. - -### SetCharEndNil - -`func (o *FindHitOut) SetCharEndNil(b bool)` - - SetCharEndNil sets the value for CharEnd to be an explicit nil - -### UnsetCharEnd -`func (o *FindHitOut) UnsetCharEnd()` - -UnsetCharEnd ensures that no value is present for CharEnd, not even an explicit nil -### GetCharStart - -`func (o *FindHitOut) GetCharStart() int32` - -GetCharStart returns the CharStart field if non-nil, zero value otherwise. - -### GetCharStartOk - -`func (o *FindHitOut) GetCharStartOk() (*int32, bool)` - -GetCharStartOk returns a tuple with the CharStart field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCharStart - -`func (o *FindHitOut) SetCharStart(v int32)` - -SetCharStart sets CharStart field to given value. - -### HasCharStart - -`func (o *FindHitOut) HasCharStart() bool` - -HasCharStart returns a boolean if a field has been set. - -### SetCharStartNil - -`func (o *FindHitOut) SetCharStartNil(b bool)` - - SetCharStartNil sets the value for CharStart to be an explicit nil - -### UnsetCharStart -`func (o *FindHitOut) UnsetCharStart()` - -UnsetCharStart ensures that no value is present for CharStart, not even an explicit nil -### GetContentType - -`func (o *FindHitOut) GetContentType() string` - -GetContentType returns the ContentType field if non-nil, zero value otherwise. - -### GetContentTypeOk - -`func (o *FindHitOut) GetContentTypeOk() (*string, bool)` - -GetContentTypeOk returns a tuple with the ContentType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetContentType - -`func (o *FindHitOut) SetContentType(v string)` - -SetContentType sets ContentType field to given value. - - -### GetDriveId - -`func (o *FindHitOut) GetDriveId() string` - -GetDriveId returns the DriveId field if non-nil, zero value otherwise. - -### GetDriveIdOk - -`func (o *FindHitOut) GetDriveIdOk() (*string, bool)` - -GetDriveIdOk returns a tuple with the DriveId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDriveId - -`func (o *FindHitOut) SetDriveId(v string)` - -SetDriveId sets DriveId field to given value. - - -### GetFileType - -`func (o *FindHitOut) GetFileType() string` - -GetFileType returns the FileType field if non-nil, zero value otherwise. - -### GetFileTypeOk - -`func (o *FindHitOut) GetFileTypeOk() (*string, bool)` - -GetFileTypeOk returns a tuple with the FileType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFileType - -`func (o *FindHitOut) SetFileType(v string)` - -SetFileType sets FileType field to given value. - - -### GetLabels - -`func (o *FindHitOut) GetLabels() []string` - -GetLabels returns the Labels field if non-nil, zero value otherwise. - -### GetLabelsOk - -`func (o *FindHitOut) GetLabelsOk() (*[]string, bool)` - -GetLabelsOk returns a tuple with the Labels field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLabels - -`func (o *FindHitOut) SetLabels(v []string)` - -SetLabels sets Labels field to given value. - -### HasLabels - -`func (o *FindHitOut) HasLabels() bool` - -HasLabels returns a boolean if a field has been set. - -### GetModality - -`func (o *FindHitOut) GetModality() string` - -GetModality returns the Modality field if non-nil, zero value otherwise. - -### GetModalityOk - -`func (o *FindHitOut) GetModalityOk() (*string, bool)` - -GetModalityOk returns a tuple with the Modality field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetModality - -`func (o *FindHitOut) SetModality(v string)` - -SetModality sets Modality field to given value. - - -### GetOrd - -`func (o *FindHitOut) GetOrd() int32` - -GetOrd returns the Ord field if non-nil, zero value otherwise. - -### GetOrdOk - -`func (o *FindHitOut) GetOrdOk() (*int32, bool)` - -GetOrdOk returns a tuple with the Ord field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOrd - -`func (o *FindHitOut) SetOrd(v int32)` - -SetOrd sets Ord field to given value. - - -### GetPageEnd - -`func (o *FindHitOut) GetPageEnd() int32` - -GetPageEnd returns the PageEnd field if non-nil, zero value otherwise. - -### GetPageEndOk - -`func (o *FindHitOut) GetPageEndOk() (*int32, bool)` - -GetPageEndOk returns a tuple with the PageEnd field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPageEnd - -`func (o *FindHitOut) SetPageEnd(v int32)` - -SetPageEnd sets PageEnd field to given value. - -### HasPageEnd - -`func (o *FindHitOut) HasPageEnd() bool` - -HasPageEnd returns a boolean if a field has been set. - -### SetPageEndNil - -`func (o *FindHitOut) SetPageEndNil(b bool)` - - SetPageEndNil sets the value for PageEnd to be an explicit nil - -### UnsetPageEnd -`func (o *FindHitOut) UnsetPageEnd()` - -UnsetPageEnd ensures that no value is present for PageEnd, not even an explicit nil -### GetPageStart - -`func (o *FindHitOut) GetPageStart() int32` - -GetPageStart returns the PageStart field if non-nil, zero value otherwise. - -### GetPageStartOk - -`func (o *FindHitOut) GetPageStartOk() (*int32, bool)` - -GetPageStartOk returns a tuple with the PageStart field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPageStart - -`func (o *FindHitOut) SetPageStart(v int32)` - -SetPageStart sets PageStart field to given value. - -### HasPageStart - -`func (o *FindHitOut) HasPageStart() bool` - -HasPageStart returns a boolean if a field has been set. - -### SetPageStartNil - -`func (o *FindHitOut) SetPageStartNil(b bool)` - - SetPageStartNil sets the value for PageStart to be an explicit nil - -### UnsetPageStart -`func (o *FindHitOut) UnsetPageStart()` - -UnsetPageStart ensures that no value is present for PageStart, not even an explicit nil -### GetPath - -`func (o *FindHitOut) GetPath() string` - -GetPath returns the Path field if non-nil, zero value otherwise. - -### GetPathOk - -`func (o *FindHitOut) GetPathOk() (*string, bool)` - -GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPath - -`func (o *FindHitOut) SetPath(v string)` - -SetPath sets Path field to given value. - - -### GetRankLexical - -`func (o *FindHitOut) GetRankLexical() int32` - -GetRankLexical returns the RankLexical field if non-nil, zero value otherwise. - -### GetRankLexicalOk - -`func (o *FindHitOut) GetRankLexicalOk() (*int32, bool)` - -GetRankLexicalOk returns a tuple with the RankLexical field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRankLexical - -`func (o *FindHitOut) SetRankLexical(v int32)` - -SetRankLexical sets RankLexical field to given value. - -### HasRankLexical - -`func (o *FindHitOut) HasRankLexical() bool` - -HasRankLexical returns a boolean if a field has been set. - -### SetRankLexicalNil - -`func (o *FindHitOut) SetRankLexicalNil(b bool)` - - SetRankLexicalNil sets the value for RankLexical to be an explicit nil - -### UnsetRankLexical -`func (o *FindHitOut) UnsetRankLexical()` - -UnsetRankLexical ensures that no value is present for RankLexical, not even an explicit nil -### GetRankSemantic - -`func (o *FindHitOut) GetRankSemantic() int32` - -GetRankSemantic returns the RankSemantic field if non-nil, zero value otherwise. - -### GetRankSemanticOk - -`func (o *FindHitOut) GetRankSemanticOk() (*int32, bool)` - -GetRankSemanticOk returns a tuple with the RankSemantic field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRankSemantic - -`func (o *FindHitOut) SetRankSemantic(v int32)` - -SetRankSemantic sets RankSemantic field to given value. - -### HasRankSemantic - -`func (o *FindHitOut) HasRankSemantic() bool` - -HasRankSemantic returns a boolean if a field has been set. - -### SetRankSemanticNil - -`func (o *FindHitOut) SetRankSemanticNil(b bool)` - - SetRankSemanticNil sets the value for RankSemantic to be an explicit nil - -### UnsetRankSemantic -`func (o *FindHitOut) UnsetRankSemantic()` - -UnsetRankSemantic ensures that no value is present for RankSemantic, not even an explicit nil -### GetScore - -`func (o *FindHitOut) GetScore() float32` - -GetScore returns the Score field if non-nil, zero value otherwise. - -### GetScoreOk - -`func (o *FindHitOut) GetScoreOk() (*float32, bool)` - -GetScoreOk returns a tuple with the Score field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetScore - -`func (o *FindHitOut) SetScore(v float32)` - -SetScore sets Score field to given value. - - -### GetSnippet - -`func (o *FindHitOut) GetSnippet() string` - -GetSnippet returns the Snippet field if non-nil, zero value otherwise. - -### GetSnippetOk - -`func (o *FindHitOut) GetSnippetOk() (*string, bool)` - -GetSnippetOk returns a tuple with the Snippet field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSnippet - -`func (o *FindHitOut) SetSnippet(v string)` - -SetSnippet sets Snippet field to given value. - - -### GetText - -`func (o *FindHitOut) GetText() string` - -GetText returns the Text field if non-nil, zero value otherwise. - -### GetTextOk - -`func (o *FindHitOut) GetTextOk() (*string, bool)` - -GetTextOk returns a tuple with the Text field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetText - -`func (o *FindHitOut) SetText(v string)` - -SetText sets Text field to given value. - - -### GetTimeEndMs - -`func (o *FindHitOut) GetTimeEndMs() int32` - -GetTimeEndMs returns the TimeEndMs field if non-nil, zero value otherwise. - -### GetTimeEndMsOk - -`func (o *FindHitOut) GetTimeEndMsOk() (*int32, bool)` - -GetTimeEndMsOk returns a tuple with the TimeEndMs field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTimeEndMs - -`func (o *FindHitOut) SetTimeEndMs(v int32)` - -SetTimeEndMs sets TimeEndMs field to given value. - -### HasTimeEndMs - -`func (o *FindHitOut) HasTimeEndMs() bool` - -HasTimeEndMs returns a boolean if a field has been set. - -### SetTimeEndMsNil - -`func (o *FindHitOut) SetTimeEndMsNil(b bool)` - - SetTimeEndMsNil sets the value for TimeEndMs to be an explicit nil - -### UnsetTimeEndMs -`func (o *FindHitOut) UnsetTimeEndMs()` - -UnsetTimeEndMs ensures that no value is present for TimeEndMs, not even an explicit nil -### GetTimeStartMs - -`func (o *FindHitOut) GetTimeStartMs() int32` - -GetTimeStartMs returns the TimeStartMs field if non-nil, zero value otherwise. - -### GetTimeStartMsOk - -`func (o *FindHitOut) GetTimeStartMsOk() (*int32, bool)` - -GetTimeStartMsOk returns a tuple with the TimeStartMs field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTimeStartMs - -`func (o *FindHitOut) SetTimeStartMs(v int32)` - -SetTimeStartMs sets TimeStartMs field to given value. - -### HasTimeStartMs - -`func (o *FindHitOut) HasTimeStartMs() bool` - -HasTimeStartMs returns a boolean if a field has been set. - -### SetTimeStartMsNil - -`func (o *FindHitOut) SetTimeStartMsNil(b bool)` - - SetTimeStartMsNil sets the value for TimeStartMs to be an explicit nil - -### UnsetTimeStartMs -`func (o *FindHitOut) UnsetTimeStartMs()` - -UnsetTimeStartMs ensures that no value is present for TimeStartMs, not even an explicit nil -### GetUpdatedAt - -`func (o *FindHitOut) GetUpdatedAt() time.Time` - -GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. - -### GetUpdatedAtOk - -`func (o *FindHitOut) GetUpdatedAtOk() (*time.Time, bool)` - -GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUpdatedAt - -`func (o *FindHitOut) SetUpdatedAt(v time.Time)` - -SetUpdatedAt sets UpdatedAt field to given value. - - -### GetUrl - -`func (o *FindHitOut) GetUrl() string` - -GetUrl returns the Url field if non-nil, zero value otherwise. - -### GetUrlOk - -`func (o *FindHitOut) GetUrlOk() (*string, bool)` - -GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUrl - -`func (o *FindHitOut) SetUrl(v string)` - -SetUrl sets Url field to given value. - - -### GetVersionNumber - -`func (o *FindHitOut) GetVersionNumber() int32` - -GetVersionNumber returns the VersionNumber field if non-nil, zero value otherwise. - -### GetVersionNumberOk - -`func (o *FindHitOut) GetVersionNumberOk() (*int32, bool)` - -GetVersionNumberOk returns a tuple with the VersionNumber field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVersionNumber - -`func (o *FindHitOut) SetVersionNumber(v int32)` - -SetVersionNumber sets VersionNumber field to given value. - - - -[[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/sdk/go/docs/FindPage.md b/sdk/go/docs/FindPage.md deleted file mode 100644 index c784561..0000000 --- a/sdk/go/docs/FindPage.md +++ /dev/null @@ -1,49 +0,0 @@ -# FindPage - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Items** | [**[]FindHitOut**](FindHitOut.md) | | - -## Methods - -### NewFindPage - -`func NewFindPage(items []FindHitOut, ) *FindPage` - -NewFindPage instantiates a new FindPage object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewFindPageWithDefaults - -`func NewFindPageWithDefaults() *FindPage` - -NewFindPageWithDefaults instantiates a new FindPage object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetItems - -`func (o *FindPage) GetItems() []FindHitOut` - -GetItems returns the Items field if non-nil, zero value otherwise. - -### GetItemsOk - -`func (o *FindPage) GetItemsOk() (*[]FindHitOut, bool)` - -GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetItems - -`func (o *FindPage) SetItems(v []FindHitOut)` - -SetItems sets Items field to given value. - - - -[[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/sdk/go/docs/FolderCascadeOut.md b/sdk/go/docs/FolderCascadeOut.md new file mode 100644 index 0000000..deffd58 --- /dev/null +++ b/sdk/go/docs/FolderCascadeOut.md @@ -0,0 +1,70 @@ +# FolderCascadeOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Cascade** | **map[string]int32** | | +**Folder** | [**FolderOut**](FolderOut.md) | | + +## Methods + +### NewFolderCascadeOut + +`func NewFolderCascadeOut(cascade map[string]int32, folder FolderOut, ) *FolderCascadeOut` + +NewFolderCascadeOut instantiates a new FolderCascadeOut object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFolderCascadeOutWithDefaults + +`func NewFolderCascadeOutWithDefaults() *FolderCascadeOut` + +NewFolderCascadeOutWithDefaults instantiates a new FolderCascadeOut object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCascade + +`func (o *FolderCascadeOut) GetCascade() map[string]int32` + +GetCascade returns the Cascade field if non-nil, zero value otherwise. + +### GetCascadeOk + +`func (o *FolderCascadeOut) GetCascadeOk() (*map[string]int32, bool)` + +GetCascadeOk returns a tuple with the Cascade field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCascade + +`func (o *FolderCascadeOut) SetCascade(v map[string]int32)` + +SetCascade sets Cascade field to given value. + + +### GetFolder + +`func (o *FolderCascadeOut) GetFolder() FolderOut` + +GetFolder returns the Folder field if non-nil, zero value otherwise. + +### GetFolderOk + +`func (o *FolderCascadeOut) GetFolderOk() (*FolderOut, bool)` + +GetFolderOk returns a tuple with the Folder field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFolder + +`func (o *FolderCascadeOut) SetFolder(v FolderOut)` + +SetFolder sets Folder field to given value. + + + +[[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/sdk/go/docs/FolderCopyIn.md b/sdk/go/docs/FolderCopyIn.md index 903a3a0..d83f133 100644 --- a/sdk/go/docs/FolderCopyIn.md +++ b/sdk/go/docs/FolderCopyIn.md @@ -4,14 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**FromMetageneration** | Pointer to **NullableInt32** | | [optional] -**Path** | **string** | | +**DestinationDriveId** | Pointer to **NullableString** | | [optional] +**DestinationName** | **string** | | +**DestinationParentId** | **string** | | ## Methods ### NewFolderCopyIn -`func NewFolderCopyIn(path string, ) *FolderCopyIn` +`func NewFolderCopyIn(destinationName string, destinationParentId string, ) *FolderCopyIn` NewFolderCopyIn instantiates a new FolderCopyIn object This constructor will assign default values to properties that have it defined, @@ -26,59 +27,79 @@ NewFolderCopyInWithDefaults instantiates a new FolderCopyIn object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set -### GetFromMetageneration +### GetDestinationDriveId -`func (o *FolderCopyIn) GetFromMetageneration() int32` +`func (o *FolderCopyIn) GetDestinationDriveId() string` -GetFromMetageneration returns the FromMetageneration field if non-nil, zero value otherwise. +GetDestinationDriveId returns the DestinationDriveId field if non-nil, zero value otherwise. -### GetFromMetagenerationOk +### GetDestinationDriveIdOk -`func (o *FolderCopyIn) GetFromMetagenerationOk() (*int32, bool)` +`func (o *FolderCopyIn) GetDestinationDriveIdOk() (*string, bool)` -GetFromMetagenerationOk returns a tuple with the FromMetageneration field if it's non-nil, zero value otherwise +GetDestinationDriveIdOk returns a tuple with the DestinationDriveId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetFromMetageneration +### SetDestinationDriveId -`func (o *FolderCopyIn) SetFromMetageneration(v int32)` +`func (o *FolderCopyIn) SetDestinationDriveId(v string)` -SetFromMetageneration sets FromMetageneration field to given value. +SetDestinationDriveId sets DestinationDriveId field to given value. -### HasFromMetageneration +### HasDestinationDriveId -`func (o *FolderCopyIn) HasFromMetageneration() bool` +`func (o *FolderCopyIn) HasDestinationDriveId() bool` -HasFromMetageneration returns a boolean if a field has been set. +HasDestinationDriveId returns a boolean if a field has been set. -### SetFromMetagenerationNil +### SetDestinationDriveIdNil -`func (o *FolderCopyIn) SetFromMetagenerationNil(b bool)` +`func (o *FolderCopyIn) SetDestinationDriveIdNil(b bool)` - SetFromMetagenerationNil sets the value for FromMetageneration to be an explicit nil + SetDestinationDriveIdNil sets the value for DestinationDriveId to be an explicit nil -### UnsetFromMetageneration -`func (o *FolderCopyIn) UnsetFromMetageneration()` +### UnsetDestinationDriveId +`func (o *FolderCopyIn) UnsetDestinationDriveId()` -UnsetFromMetageneration ensures that no value is present for FromMetageneration, not even an explicit nil -### GetPath +UnsetDestinationDriveId ensures that no value is present for DestinationDriveId, not even an explicit nil +### GetDestinationName -`func (o *FolderCopyIn) GetPath() string` +`func (o *FolderCopyIn) GetDestinationName() string` -GetPath returns the Path field if non-nil, zero value otherwise. +GetDestinationName returns the DestinationName field if non-nil, zero value otherwise. -### GetPathOk +### GetDestinationNameOk -`func (o *FolderCopyIn) GetPathOk() (*string, bool)` +`func (o *FolderCopyIn) GetDestinationNameOk() (*string, bool)` -GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise +GetDestinationNameOk returns a tuple with the DestinationName field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetPath +### SetDestinationName -`func (o *FolderCopyIn) SetPath(v string)` +`func (o *FolderCopyIn) SetDestinationName(v string)` -SetPath sets Path field to given value. +SetDestinationName sets DestinationName field to given value. + + +### GetDestinationParentId + +`func (o *FolderCopyIn) GetDestinationParentId() string` + +GetDestinationParentId returns the DestinationParentId field if non-nil, zero value otherwise. + +### GetDestinationParentIdOk + +`func (o *FolderCopyIn) GetDestinationParentIdOk() (*string, bool)` + +GetDestinationParentIdOk returns a tuple with the DestinationParentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDestinationParentId + +`func (o *FolderCopyIn) SetDestinationParentId(v string)` + +SetDestinationParentId sets DestinationParentId field to given value. diff --git a/sdk/go/docs/FolderCopyOut.md b/sdk/go/docs/FolderCopyOut.md deleted file mode 100644 index 5f1d2d7..0000000 --- a/sdk/go/docs/FolderCopyOut.md +++ /dev/null @@ -1,356 +0,0 @@ -# FolderCopyOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CreatedAt** | **time.Time** | | -**DeletedAt** | Pointer to **NullableTime** | | [optional] -**Description** | Pointer to **NullableString** | | [optional] -**DriveId** | **string** | | -**Etag** | **string** | | -**FromFldId** | **string** | | -**Id** | **string** | | -**InheritGrants** | Pointer to **bool** | | [optional] [default to true] -**Metageneration** | Pointer to **int32** | | [optional] [default to 1] -**NArtifactsCopied** | **int32** | | -**Path** | **string** | | -**PurgeAt** | Pointer to **NullableTime** | | [optional] -**UpdatedAt** | **time.Time** | | - -## Methods - -### NewFolderCopyOut - -`func NewFolderCopyOut(createdAt time.Time, driveId string, etag string, fromFldId string, id string, nArtifactsCopied int32, path string, updatedAt time.Time, ) *FolderCopyOut` - -NewFolderCopyOut instantiates a new FolderCopyOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewFolderCopyOutWithDefaults - -`func NewFolderCopyOutWithDefaults() *FolderCopyOut` - -NewFolderCopyOutWithDefaults instantiates a new FolderCopyOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetCreatedAt - -`func (o *FolderCopyOut) GetCreatedAt() time.Time` - -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. - -### GetCreatedAtOk - -`func (o *FolderCopyOut) GetCreatedAtOk() (*time.Time, bool)` - -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreatedAt - -`func (o *FolderCopyOut) SetCreatedAt(v time.Time)` - -SetCreatedAt sets CreatedAt field to given value. - - -### GetDeletedAt - -`func (o *FolderCopyOut) GetDeletedAt() time.Time` - -GetDeletedAt returns the DeletedAt field if non-nil, zero value otherwise. - -### GetDeletedAtOk - -`func (o *FolderCopyOut) GetDeletedAtOk() (*time.Time, bool)` - -GetDeletedAtOk returns a tuple with the DeletedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDeletedAt - -`func (o *FolderCopyOut) SetDeletedAt(v time.Time)` - -SetDeletedAt sets DeletedAt field to given value. - -### HasDeletedAt - -`func (o *FolderCopyOut) HasDeletedAt() bool` - -HasDeletedAt returns a boolean if a field has been set. - -### SetDeletedAtNil - -`func (o *FolderCopyOut) SetDeletedAtNil(b bool)` - - SetDeletedAtNil sets the value for DeletedAt to be an explicit nil - -### UnsetDeletedAt -`func (o *FolderCopyOut) UnsetDeletedAt()` - -UnsetDeletedAt ensures that no value is present for DeletedAt, not even an explicit nil -### GetDescription - -`func (o *FolderCopyOut) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *FolderCopyOut) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *FolderCopyOut) SetDescription(v string)` - -SetDescription sets Description field to given value. - -### HasDescription - -`func (o *FolderCopyOut) HasDescription() bool` - -HasDescription returns a boolean if a field has been set. - -### SetDescriptionNil - -`func (o *FolderCopyOut) SetDescriptionNil(b bool)` - - SetDescriptionNil sets the value for Description to be an explicit nil - -### UnsetDescription -`func (o *FolderCopyOut) UnsetDescription()` - -UnsetDescription ensures that no value is present for Description, not even an explicit nil -### GetDriveId - -`func (o *FolderCopyOut) GetDriveId() string` - -GetDriveId returns the DriveId field if non-nil, zero value otherwise. - -### GetDriveIdOk - -`func (o *FolderCopyOut) GetDriveIdOk() (*string, bool)` - -GetDriveIdOk returns a tuple with the DriveId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDriveId - -`func (o *FolderCopyOut) SetDriveId(v string)` - -SetDriveId sets DriveId field to given value. - - -### GetEtag - -`func (o *FolderCopyOut) GetEtag() string` - -GetEtag returns the Etag field if non-nil, zero value otherwise. - -### GetEtagOk - -`func (o *FolderCopyOut) GetEtagOk() (*string, bool)` - -GetEtagOk returns a tuple with the Etag field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEtag - -`func (o *FolderCopyOut) SetEtag(v string)` - -SetEtag sets Etag field to given value. - - -### GetFromFldId - -`func (o *FolderCopyOut) GetFromFldId() string` - -GetFromFldId returns the FromFldId field if non-nil, zero value otherwise. - -### GetFromFldIdOk - -`func (o *FolderCopyOut) GetFromFldIdOk() (*string, bool)` - -GetFromFldIdOk returns a tuple with the FromFldId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFromFldId - -`func (o *FolderCopyOut) SetFromFldId(v string)` - -SetFromFldId sets FromFldId field to given value. - - -### GetId - -`func (o *FolderCopyOut) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *FolderCopyOut) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *FolderCopyOut) SetId(v string)` - -SetId sets Id field to given value. - - -### GetInheritGrants - -`func (o *FolderCopyOut) GetInheritGrants() bool` - -GetInheritGrants returns the InheritGrants field if non-nil, zero value otherwise. - -### GetInheritGrantsOk - -`func (o *FolderCopyOut) GetInheritGrantsOk() (*bool, bool)` - -GetInheritGrantsOk returns a tuple with the InheritGrants field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetInheritGrants - -`func (o *FolderCopyOut) SetInheritGrants(v bool)` - -SetInheritGrants sets InheritGrants field to given value. - -### HasInheritGrants - -`func (o *FolderCopyOut) HasInheritGrants() bool` - -HasInheritGrants returns a boolean if a field has been set. - -### GetMetageneration - -`func (o *FolderCopyOut) GetMetageneration() int32` - -GetMetageneration returns the Metageneration field if non-nil, zero value otherwise. - -### GetMetagenerationOk - -`func (o *FolderCopyOut) GetMetagenerationOk() (*int32, bool)` - -GetMetagenerationOk returns a tuple with the Metageneration field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMetageneration - -`func (o *FolderCopyOut) SetMetageneration(v int32)` - -SetMetageneration sets Metageneration field to given value. - -### HasMetageneration - -`func (o *FolderCopyOut) HasMetageneration() bool` - -HasMetageneration returns a boolean if a field has been set. - -### GetNArtifactsCopied - -`func (o *FolderCopyOut) GetNArtifactsCopied() int32` - -GetNArtifactsCopied returns the NArtifactsCopied field if non-nil, zero value otherwise. - -### GetNArtifactsCopiedOk - -`func (o *FolderCopyOut) GetNArtifactsCopiedOk() (*int32, bool)` - -GetNArtifactsCopiedOk returns a tuple with the NArtifactsCopied field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNArtifactsCopied - -`func (o *FolderCopyOut) SetNArtifactsCopied(v int32)` - -SetNArtifactsCopied sets NArtifactsCopied field to given value. - - -### GetPath - -`func (o *FolderCopyOut) GetPath() string` - -GetPath returns the Path field if non-nil, zero value otherwise. - -### GetPathOk - -`func (o *FolderCopyOut) GetPathOk() (*string, bool)` - -GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPath - -`func (o *FolderCopyOut) SetPath(v string)` - -SetPath sets Path field to given value. - - -### GetPurgeAt - -`func (o *FolderCopyOut) GetPurgeAt() time.Time` - -GetPurgeAt returns the PurgeAt field if non-nil, zero value otherwise. - -### GetPurgeAtOk - -`func (o *FolderCopyOut) GetPurgeAtOk() (*time.Time, bool)` - -GetPurgeAtOk returns a tuple with the PurgeAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPurgeAt - -`func (o *FolderCopyOut) SetPurgeAt(v time.Time)` - -SetPurgeAt sets PurgeAt field to given value. - -### HasPurgeAt - -`func (o *FolderCopyOut) HasPurgeAt() bool` - -HasPurgeAt returns a boolean if a field has been set. - -### SetPurgeAtNil - -`func (o *FolderCopyOut) SetPurgeAtNil(b bool)` - - SetPurgeAtNil sets the value for PurgeAt to be an explicit nil - -### UnsetPurgeAt -`func (o *FolderCopyOut) UnsetPurgeAt()` - -UnsetPurgeAt ensures that no value is present for PurgeAt, not even an explicit nil -### GetUpdatedAt - -`func (o *FolderCopyOut) GetUpdatedAt() time.Time` - -GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. - -### GetUpdatedAtOk - -`func (o *FolderCopyOut) GetUpdatedAtOk() (*time.Time, bool)` - -GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUpdatedAt - -`func (o *FolderCopyOut) SetUpdatedAt(v time.Time)` - -SetUpdatedAt sets UpdatedAt field to given value. - - - -[[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/sdk/go/docs/FolderCreateIn.md b/sdk/go/docs/FolderCreateIn.md index a70b3d9..ebf9f94 100644 --- a/sdk/go/docs/FolderCreateIn.md +++ b/sdk/go/docs/FolderCreateIn.md @@ -4,13 +4,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Description** | Pointer to **NullableString** | | [optional] +**GrantInheritance** | Pointer to **string** | | [optional] [default to "inherit"] +**Metadata** | Pointer to **map[string]interface{}** | | [optional] +**Name** | **string** | | +**ParentId** | **string** | | ## Methods ### NewFolderCreateIn -`func NewFolderCreateIn() *FolderCreateIn` +`func NewFolderCreateIn(name string, parentId string, ) *FolderCreateIn` NewFolderCreateIn instantiates a new FolderCreateIn object This constructor will assign default values to properties that have it defined, @@ -25,40 +28,95 @@ NewFolderCreateInWithDefaults instantiates a new FolderCreateIn object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set -### GetDescription +### GetGrantInheritance -`func (o *FolderCreateIn) GetDescription() string` +`func (o *FolderCreateIn) GetGrantInheritance() string` -GetDescription returns the Description field if non-nil, zero value otherwise. +GetGrantInheritance returns the GrantInheritance field if non-nil, zero value otherwise. -### GetDescriptionOk +### GetGrantInheritanceOk -`func (o *FolderCreateIn) GetDescriptionOk() (*string, bool)` +`func (o *FolderCreateIn) GetGrantInheritanceOk() (*string, bool)` -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise +GetGrantInheritanceOk returns a tuple with the GrantInheritance field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetDescription +### SetGrantInheritance -`func (o *FolderCreateIn) SetDescription(v string)` +`func (o *FolderCreateIn) SetGrantInheritance(v string)` -SetDescription sets Description field to given value. +SetGrantInheritance sets GrantInheritance field to given value. -### HasDescription +### HasGrantInheritance -`func (o *FolderCreateIn) HasDescription() bool` +`func (o *FolderCreateIn) HasGrantInheritance() bool` -HasDescription returns a boolean if a field has been set. +HasGrantInheritance returns a boolean if a field has been set. -### SetDescriptionNil +### GetMetadata -`func (o *FolderCreateIn) SetDescriptionNil(b bool)` +`func (o *FolderCreateIn) GetMetadata() map[string]interface{}` - SetDescriptionNil sets the value for Description to be an explicit nil +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *FolderCreateIn) GetMetadataOk() (*map[string]interface{}, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *FolderCreateIn) SetMetadata(v map[string]interface{})` + +SetMetadata sets Metadata field to given value. + +### HasMetadata + +`func (o *FolderCreateIn) HasMetadata() bool` + +HasMetadata returns a boolean if a field has been set. + +### GetName + +`func (o *FolderCreateIn) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *FolderCreateIn) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *FolderCreateIn) SetName(v string)` + +SetName sets Name field to given value. + + +### GetParentId + +`func (o *FolderCreateIn) GetParentId() string` + +GetParentId returns the ParentId field if non-nil, zero value otherwise. + +### GetParentIdOk + +`func (o *FolderCreateIn) GetParentIdOk() (*string, bool)` + +GetParentIdOk returns a tuple with the ParentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParentId + +`func (o *FolderCreateIn) SetParentId(v string)` + +SetParentId sets ParentId field to given value. -### UnsetDescription -`func (o *FolderCreateIn) UnsetDescription()` -UnsetDescription ensures that no value is present for Description, not even an explicit nil [[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/sdk/go/docs/FolderDeleteOut.md b/sdk/go/docs/FolderDeleteOut.md deleted file mode 100644 index 6f35dcc..0000000 --- a/sdk/go/docs/FolderDeleteOut.md +++ /dev/null @@ -1,201 +0,0 @@ -# FolderDeleteOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DeletedAt** | **time.Time** | | -**Id** | **string** | | -**NArtifactsDeleted** | **int32** | | -**NSubfoldersDeleted** | **int32** | | -**Ok** | Pointer to **bool** | | [optional] [default to true] -**Path** | **string** | | -**PurgeAt** | **time.Time** | | -**RetentionDays** | **int32** | | - -## Methods - -### NewFolderDeleteOut - -`func NewFolderDeleteOut(deletedAt time.Time, id string, nArtifactsDeleted int32, nSubfoldersDeleted int32, path string, purgeAt time.Time, retentionDays int32, ) *FolderDeleteOut` - -NewFolderDeleteOut instantiates a new FolderDeleteOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewFolderDeleteOutWithDefaults - -`func NewFolderDeleteOutWithDefaults() *FolderDeleteOut` - -NewFolderDeleteOutWithDefaults instantiates a new FolderDeleteOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetDeletedAt - -`func (o *FolderDeleteOut) GetDeletedAt() time.Time` - -GetDeletedAt returns the DeletedAt field if non-nil, zero value otherwise. - -### GetDeletedAtOk - -`func (o *FolderDeleteOut) GetDeletedAtOk() (*time.Time, bool)` - -GetDeletedAtOk returns a tuple with the DeletedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDeletedAt - -`func (o *FolderDeleteOut) SetDeletedAt(v time.Time)` - -SetDeletedAt sets DeletedAt field to given value. - - -### GetId - -`func (o *FolderDeleteOut) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *FolderDeleteOut) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *FolderDeleteOut) SetId(v string)` - -SetId sets Id field to given value. - - -### GetNArtifactsDeleted - -`func (o *FolderDeleteOut) GetNArtifactsDeleted() int32` - -GetNArtifactsDeleted returns the NArtifactsDeleted field if non-nil, zero value otherwise. - -### GetNArtifactsDeletedOk - -`func (o *FolderDeleteOut) GetNArtifactsDeletedOk() (*int32, bool)` - -GetNArtifactsDeletedOk returns a tuple with the NArtifactsDeleted field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNArtifactsDeleted - -`func (o *FolderDeleteOut) SetNArtifactsDeleted(v int32)` - -SetNArtifactsDeleted sets NArtifactsDeleted field to given value. - - -### GetNSubfoldersDeleted - -`func (o *FolderDeleteOut) GetNSubfoldersDeleted() int32` - -GetNSubfoldersDeleted returns the NSubfoldersDeleted field if non-nil, zero value otherwise. - -### GetNSubfoldersDeletedOk - -`func (o *FolderDeleteOut) GetNSubfoldersDeletedOk() (*int32, bool)` - -GetNSubfoldersDeletedOk returns a tuple with the NSubfoldersDeleted field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNSubfoldersDeleted - -`func (o *FolderDeleteOut) SetNSubfoldersDeleted(v int32)` - -SetNSubfoldersDeleted sets NSubfoldersDeleted field to given value. - - -### GetOk - -`func (o *FolderDeleteOut) GetOk() bool` - -GetOk returns the Ok field if non-nil, zero value otherwise. - -### GetOkOk - -`func (o *FolderDeleteOut) GetOkOk() (*bool, bool)` - -GetOkOk returns a tuple with the Ok field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOk - -`func (o *FolderDeleteOut) SetOk(v bool)` - -SetOk sets Ok field to given value. - -### HasOk - -`func (o *FolderDeleteOut) HasOk() bool` - -HasOk returns a boolean if a field has been set. - -### GetPath - -`func (o *FolderDeleteOut) GetPath() string` - -GetPath returns the Path field if non-nil, zero value otherwise. - -### GetPathOk - -`func (o *FolderDeleteOut) GetPathOk() (*string, bool)` - -GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPath - -`func (o *FolderDeleteOut) SetPath(v string)` - -SetPath sets Path field to given value. - - -### GetPurgeAt - -`func (o *FolderDeleteOut) GetPurgeAt() time.Time` - -GetPurgeAt returns the PurgeAt field if non-nil, zero value otherwise. - -### GetPurgeAtOk - -`func (o *FolderDeleteOut) GetPurgeAtOk() (*time.Time, bool)` - -GetPurgeAtOk returns a tuple with the PurgeAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPurgeAt - -`func (o *FolderDeleteOut) SetPurgeAt(v time.Time)` - -SetPurgeAt sets PurgeAt field to given value. - - -### GetRetentionDays - -`func (o *FolderDeleteOut) GetRetentionDays() int32` - -GetRetentionDays returns the RetentionDays field if non-nil, zero value otherwise. - -### GetRetentionDaysOk - -`func (o *FolderDeleteOut) GetRetentionDaysOk() (*int32, bool)` - -GetRetentionDaysOk returns a tuple with the RetentionDays field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRetentionDays - -`func (o *FolderDeleteOut) SetRetentionDays(v int32)` - -SetRetentionDays sets RetentionDays field to given value. - - - -[[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/sdk/go/docs/FolderListOut.md b/sdk/go/docs/FolderListOut.md new file mode 100644 index 0000000..180fa32 --- /dev/null +++ b/sdk/go/docs/FolderListOut.md @@ -0,0 +1,80 @@ +# FolderListOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Items** | [**[]FolderOut**](FolderOut.md) | | +**NextCursor** | **NullableString** | | + +## Methods + +### NewFolderListOut + +`func NewFolderListOut(items []FolderOut, nextCursor NullableString, ) *FolderListOut` + +NewFolderListOut instantiates a new FolderListOut object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFolderListOutWithDefaults + +`func NewFolderListOutWithDefaults() *FolderListOut` + +NewFolderListOutWithDefaults instantiates a new FolderListOut object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetItems + +`func (o *FolderListOut) GetItems() []FolderOut` + +GetItems returns the Items field if non-nil, zero value otherwise. + +### GetItemsOk + +`func (o *FolderListOut) GetItemsOk() (*[]FolderOut, bool)` + +GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItems + +`func (o *FolderListOut) SetItems(v []FolderOut)` + +SetItems sets Items field to given value. + + +### GetNextCursor + +`func (o *FolderListOut) GetNextCursor() string` + +GetNextCursor returns the NextCursor field if non-nil, zero value otherwise. + +### GetNextCursorOk + +`func (o *FolderListOut) GetNextCursorOk() (*string, bool)` + +GetNextCursorOk returns a tuple with the NextCursor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextCursor + +`func (o *FolderListOut) SetNextCursor(v string)` + +SetNextCursor sets NextCursor field to given value. + + +### SetNextCursorNil + +`func (o *FolderListOut) SetNextCursorNil(b bool)` + + SetNextCursorNil sets the value for NextCursor to be an explicit nil + +### UnsetNextCursor +`func (o *FolderListOut) UnsetNextCursor()` + +UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil + +[[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/sdk/go/docs/FolderMoveIn.md b/sdk/go/docs/FolderMoveIn.md deleted file mode 100644 index db1c587..0000000 --- a/sdk/go/docs/FolderMoveIn.md +++ /dev/null @@ -1,49 +0,0 @@ -# FolderMoveIn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Path** | **string** | | - -## Methods - -### NewFolderMoveIn - -`func NewFolderMoveIn(path string, ) *FolderMoveIn` - -NewFolderMoveIn instantiates a new FolderMoveIn object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewFolderMoveInWithDefaults - -`func NewFolderMoveInWithDefaults() *FolderMoveIn` - -NewFolderMoveInWithDefaults instantiates a new FolderMoveIn object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetPath - -`func (o *FolderMoveIn) GetPath() string` - -GetPath returns the Path field if non-nil, zero value otherwise. - -### GetPathOk - -`func (o *FolderMoveIn) GetPathOk() (*string, bool)` - -GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPath - -`func (o *FolderMoveIn) SetPath(v string)` - -SetPath sets Path field to given value. - - - -[[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/sdk/go/docs/FolderOut.md b/sdk/go/docs/FolderOut.md index f34e333..9afbc0c 100644 --- a/sdk/go/docs/FolderOut.md +++ b/sdk/go/docs/FolderOut.md @@ -5,22 +5,22 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **CreatedAt** | **time.Time** | | -**DeletedAt** | Pointer to **NullableTime** | | [optional] -**Description** | Pointer to **NullableString** | | [optional] +**DeletedAt** | **NullableTime** | | **DriveId** | **string** | | -**Etag** | **string** | | +**GrantInheritance** | **string** | | **Id** | **string** | | -**InheritGrants** | Pointer to **bool** | | [optional] [default to true] -**Metageneration** | Pointer to **int32** | | [optional] [default to 1] -**Path** | **string** | | -**PurgeAt** | Pointer to **NullableTime** | | [optional] +**Metadata** | **map[string]interface{}** | | +**Name** | **NullableString** | | +**ParentId** | **NullableString** | | +**Revision** | **string** | | +**State** | **string** | | **UpdatedAt** | **time.Time** | | ## Methods ### NewFolderOut -`func NewFolderOut(createdAt time.Time, driveId string, etag string, id string, path string, updatedAt time.Time, ) *FolderOut` +`func NewFolderOut(createdAt time.Time, deletedAt NullableTime, driveId string, grantInheritance string, id string, metadata map[string]interface{}, name NullableString, parentId NullableString, revision string, state string, updatedAt time.Time, ) *FolderOut` NewFolderOut instantiates a new FolderOut object This constructor will assign default values to properties that have it defined, @@ -74,11 +74,6 @@ and a boolean to check if the value has been set. SetDeletedAt sets DeletedAt field to given value. -### HasDeletedAt - -`func (o *FolderOut) HasDeletedAt() bool` - -HasDeletedAt returns a boolean if a field has been set. ### SetDeletedAtNil @@ -90,41 +85,6 @@ HasDeletedAt returns a boolean if a field has been set. `func (o *FolderOut) UnsetDeletedAt()` UnsetDeletedAt ensures that no value is present for DeletedAt, not even an explicit nil -### GetDescription - -`func (o *FolderOut) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *FolderOut) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *FolderOut) SetDescription(v string)` - -SetDescription sets Description field to given value. - -### HasDescription - -`func (o *FolderOut) HasDescription() bool` - -HasDescription returns a boolean if a field has been set. - -### SetDescriptionNil - -`func (o *FolderOut) SetDescriptionNil(b bool)` - - SetDescriptionNil sets the value for Description to be an explicit nil - -### UnsetDescription -`func (o *FolderOut) UnsetDescription()` - -UnsetDescription ensures that no value is present for Description, not even an explicit nil ### GetDriveId `func (o *FolderOut) GetDriveId() string` @@ -145,24 +105,24 @@ and a boolean to check if the value has been set. SetDriveId sets DriveId field to given value. -### GetEtag +### GetGrantInheritance -`func (o *FolderOut) GetEtag() string` +`func (o *FolderOut) GetGrantInheritance() string` -GetEtag returns the Etag field if non-nil, zero value otherwise. +GetGrantInheritance returns the GrantInheritance field if non-nil, zero value otherwise. -### GetEtagOk +### GetGrantInheritanceOk -`func (o *FolderOut) GetEtagOk() (*string, bool)` +`func (o *FolderOut) GetGrantInheritanceOk() (*string, bool)` -GetEtagOk returns a tuple with the Etag field if it's non-nil, zero value otherwise +GetGrantInheritanceOk returns a tuple with the GrantInheritance field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetEtag +### SetGrantInheritance -`func (o *FolderOut) SetEtag(v string)` +`func (o *FolderOut) SetGrantInheritance(v string)` -SetEtag sets Etag field to given value. +SetGrantInheritance sets GrantInheritance field to given value. ### GetId @@ -185,111 +145,126 @@ and a boolean to check if the value has been set. SetId sets Id field to given value. -### GetInheritGrants +### GetMetadata -`func (o *FolderOut) GetInheritGrants() bool` +`func (o *FolderOut) GetMetadata() map[string]interface{}` -GetInheritGrants returns the InheritGrants field if non-nil, zero value otherwise. +GetMetadata returns the Metadata field if non-nil, zero value otherwise. -### GetInheritGrantsOk +### GetMetadataOk -`func (o *FolderOut) GetInheritGrantsOk() (*bool, bool)` +`func (o *FolderOut) GetMetadataOk() (*map[string]interface{}, bool)` -GetInheritGrantsOk returns a tuple with the InheritGrants field if it's non-nil, zero value otherwise +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetInheritGrants +### SetMetadata -`func (o *FolderOut) SetInheritGrants(v bool)` +`func (o *FolderOut) SetMetadata(v map[string]interface{})` -SetInheritGrants sets InheritGrants field to given value. +SetMetadata sets Metadata field to given value. -### HasInheritGrants -`func (o *FolderOut) HasInheritGrants() bool` +### GetName -HasInheritGrants returns a boolean if a field has been set. +`func (o *FolderOut) GetName() string` -### GetMetageneration +GetName returns the Name field if non-nil, zero value otherwise. -`func (o *FolderOut) GetMetageneration() int32` +### GetNameOk -GetMetageneration returns the Metageneration field if non-nil, zero value otherwise. +`func (o *FolderOut) GetNameOk() (*string, bool)` -### GetMetagenerationOk +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. -`func (o *FolderOut) GetMetagenerationOk() (*int32, bool)` +### SetName -GetMetagenerationOk returns a tuple with the Metageneration field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. +`func (o *FolderOut) SetName(v string)` -### SetMetageneration +SetName sets Name field to given value. -`func (o *FolderOut) SetMetageneration(v int32)` -SetMetageneration sets Metageneration field to given value. +### SetNameNil -### HasMetageneration +`func (o *FolderOut) SetNameNil(b bool)` -`func (o *FolderOut) HasMetageneration() bool` + SetNameNil sets the value for Name to be an explicit nil -HasMetageneration returns a boolean if a field has been set. +### UnsetName +`func (o *FolderOut) UnsetName()` -### GetPath +UnsetName ensures that no value is present for Name, not even an explicit nil +### GetParentId -`func (o *FolderOut) GetPath() string` +`func (o *FolderOut) GetParentId() string` -GetPath returns the Path field if non-nil, zero value otherwise. +GetParentId returns the ParentId field if non-nil, zero value otherwise. -### GetPathOk +### GetParentIdOk -`func (o *FolderOut) GetPathOk() (*string, bool)` +`func (o *FolderOut) GetParentIdOk() (*string, bool)` -GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise +GetParentIdOk returns a tuple with the ParentId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetPath +### SetParentId + +`func (o *FolderOut) SetParentId(v string)` + +SetParentId sets ParentId field to given value. -`func (o *FolderOut) SetPath(v string)` -SetPath sets Path field to given value. +### SetParentIdNil +`func (o *FolderOut) SetParentIdNil(b bool)` -### GetPurgeAt + SetParentIdNil sets the value for ParentId to be an explicit nil -`func (o *FolderOut) GetPurgeAt() time.Time` +### UnsetParentId +`func (o *FolderOut) UnsetParentId()` -GetPurgeAt returns the PurgeAt field if non-nil, zero value otherwise. +UnsetParentId ensures that no value is present for ParentId, not even an explicit nil +### GetRevision -### GetPurgeAtOk +`func (o *FolderOut) GetRevision() string` -`func (o *FolderOut) GetPurgeAtOk() (*time.Time, bool)` +GetRevision returns the Revision field if non-nil, zero value otherwise. -GetPurgeAtOk returns a tuple with the PurgeAt field if it's non-nil, zero value otherwise +### GetRevisionOk + +`func (o *FolderOut) GetRevisionOk() (*string, bool)` + +GetRevisionOk returns a tuple with the Revision field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetPurgeAt +### SetRevision + +`func (o *FolderOut) SetRevision(v string)` + +SetRevision sets Revision field to given value. -`func (o *FolderOut) SetPurgeAt(v time.Time)` -SetPurgeAt sets PurgeAt field to given value. +### GetState -### HasPurgeAt +`func (o *FolderOut) GetState() string` -`func (o *FolderOut) HasPurgeAt() bool` +GetState returns the State field if non-nil, zero value otherwise. -HasPurgeAt returns a boolean if a field has been set. +### GetStateOk + +`func (o *FolderOut) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. -### SetPurgeAtNil +### SetState -`func (o *FolderOut) SetPurgeAtNil(b bool)` +`func (o *FolderOut) SetState(v string)` - SetPurgeAtNil sets the value for PurgeAt to be an explicit nil +SetState sets State field to given value. -### UnsetPurgeAt -`func (o *FolderOut) UnsetPurgeAt()` -UnsetPurgeAt ensures that no value is present for PurgeAt, not even an explicit nil ### GetUpdatedAt `func (o *FolderOut) GetUpdatedAt() time.Time` diff --git a/sdk/go/docs/FolderPatchIn.md b/sdk/go/docs/FolderPatchIn.md deleted file mode 100644 index 77d201f..0000000 --- a/sdk/go/docs/FolderPatchIn.md +++ /dev/null @@ -1,100 +0,0 @@ -# FolderPatchIn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Description** | Pointer to **NullableString** | | [optional] -**InheritGrants** | Pointer to **NullableBool** | | [optional] - -## Methods - -### NewFolderPatchIn - -`func NewFolderPatchIn() *FolderPatchIn` - -NewFolderPatchIn instantiates a new FolderPatchIn object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewFolderPatchInWithDefaults - -`func NewFolderPatchInWithDefaults() *FolderPatchIn` - -NewFolderPatchInWithDefaults instantiates a new FolderPatchIn object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetDescription - -`func (o *FolderPatchIn) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *FolderPatchIn) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *FolderPatchIn) SetDescription(v string)` - -SetDescription sets Description field to given value. - -### HasDescription - -`func (o *FolderPatchIn) HasDescription() bool` - -HasDescription returns a boolean if a field has been set. - -### SetDescriptionNil - -`func (o *FolderPatchIn) SetDescriptionNil(b bool)` - - SetDescriptionNil sets the value for Description to be an explicit nil - -### UnsetDescription -`func (o *FolderPatchIn) UnsetDescription()` - -UnsetDescription ensures that no value is present for Description, not even an explicit nil -### GetInheritGrants - -`func (o *FolderPatchIn) GetInheritGrants() bool` - -GetInheritGrants returns the InheritGrants field if non-nil, zero value otherwise. - -### GetInheritGrantsOk - -`func (o *FolderPatchIn) GetInheritGrantsOk() (*bool, bool)` - -GetInheritGrantsOk returns a tuple with the InheritGrants field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetInheritGrants - -`func (o *FolderPatchIn) SetInheritGrants(v bool)` - -SetInheritGrants sets InheritGrants field to given value. - -### HasInheritGrants - -`func (o *FolderPatchIn) HasInheritGrants() bool` - -HasInheritGrants returns a boolean if a field has been set. - -### SetInheritGrantsNil - -`func (o *FolderPatchIn) SetInheritGrantsNil(b bool)` - - SetInheritGrantsNil sets the value for InheritGrants to be an explicit nil - -### UnsetInheritGrants -`func (o *FolderPatchIn) UnsetInheritGrants()` - -UnsetInheritGrants ensures that no value is present for InheritGrants, not even an explicit nil - -[[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/sdk/go/docs/FolderRestoreOut.md b/sdk/go/docs/FolderRestoreOut.md deleted file mode 100644 index 9447150..0000000 --- a/sdk/go/docs/FolderRestoreOut.md +++ /dev/null @@ -1,356 +0,0 @@ -# FolderRestoreOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CreatedAt** | **time.Time** | | -**DeletedAt** | Pointer to **NullableTime** | | [optional] -**Description** | Pointer to **NullableString** | | [optional] -**DriveId** | **string** | | -**Etag** | **string** | | -**Id** | **string** | | -**InheritGrants** | Pointer to **bool** | | [optional] [default to true] -**Metageneration** | Pointer to **int32** | | [optional] [default to 1] -**NArtifactsRestored** | **int32** | | -**NSubfoldersRestored** | **int32** | | -**Path** | **string** | | -**PurgeAt** | Pointer to **NullableTime** | | [optional] -**UpdatedAt** | **time.Time** | | - -## Methods - -### NewFolderRestoreOut - -`func NewFolderRestoreOut(createdAt time.Time, driveId string, etag string, id string, nArtifactsRestored int32, nSubfoldersRestored int32, path string, updatedAt time.Time, ) *FolderRestoreOut` - -NewFolderRestoreOut instantiates a new FolderRestoreOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewFolderRestoreOutWithDefaults - -`func NewFolderRestoreOutWithDefaults() *FolderRestoreOut` - -NewFolderRestoreOutWithDefaults instantiates a new FolderRestoreOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetCreatedAt - -`func (o *FolderRestoreOut) GetCreatedAt() time.Time` - -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. - -### GetCreatedAtOk - -`func (o *FolderRestoreOut) GetCreatedAtOk() (*time.Time, bool)` - -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreatedAt - -`func (o *FolderRestoreOut) SetCreatedAt(v time.Time)` - -SetCreatedAt sets CreatedAt field to given value. - - -### GetDeletedAt - -`func (o *FolderRestoreOut) GetDeletedAt() time.Time` - -GetDeletedAt returns the DeletedAt field if non-nil, zero value otherwise. - -### GetDeletedAtOk - -`func (o *FolderRestoreOut) GetDeletedAtOk() (*time.Time, bool)` - -GetDeletedAtOk returns a tuple with the DeletedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDeletedAt - -`func (o *FolderRestoreOut) SetDeletedAt(v time.Time)` - -SetDeletedAt sets DeletedAt field to given value. - -### HasDeletedAt - -`func (o *FolderRestoreOut) HasDeletedAt() bool` - -HasDeletedAt returns a boolean if a field has been set. - -### SetDeletedAtNil - -`func (o *FolderRestoreOut) SetDeletedAtNil(b bool)` - - SetDeletedAtNil sets the value for DeletedAt to be an explicit nil - -### UnsetDeletedAt -`func (o *FolderRestoreOut) UnsetDeletedAt()` - -UnsetDeletedAt ensures that no value is present for DeletedAt, not even an explicit nil -### GetDescription - -`func (o *FolderRestoreOut) GetDescription() string` - -GetDescription returns the Description field if non-nil, zero value otherwise. - -### GetDescriptionOk - -`func (o *FolderRestoreOut) GetDescriptionOk() (*string, bool)` - -GetDescriptionOk returns a tuple with the Description field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDescription - -`func (o *FolderRestoreOut) SetDescription(v string)` - -SetDescription sets Description field to given value. - -### HasDescription - -`func (o *FolderRestoreOut) HasDescription() bool` - -HasDescription returns a boolean if a field has been set. - -### SetDescriptionNil - -`func (o *FolderRestoreOut) SetDescriptionNil(b bool)` - - SetDescriptionNil sets the value for Description to be an explicit nil - -### UnsetDescription -`func (o *FolderRestoreOut) UnsetDescription()` - -UnsetDescription ensures that no value is present for Description, not even an explicit nil -### GetDriveId - -`func (o *FolderRestoreOut) GetDriveId() string` - -GetDriveId returns the DriveId field if non-nil, zero value otherwise. - -### GetDriveIdOk - -`func (o *FolderRestoreOut) GetDriveIdOk() (*string, bool)` - -GetDriveIdOk returns a tuple with the DriveId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDriveId - -`func (o *FolderRestoreOut) SetDriveId(v string)` - -SetDriveId sets DriveId field to given value. - - -### GetEtag - -`func (o *FolderRestoreOut) GetEtag() string` - -GetEtag returns the Etag field if non-nil, zero value otherwise. - -### GetEtagOk - -`func (o *FolderRestoreOut) GetEtagOk() (*string, bool)` - -GetEtagOk returns a tuple with the Etag field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEtag - -`func (o *FolderRestoreOut) SetEtag(v string)` - -SetEtag sets Etag field to given value. - - -### GetId - -`func (o *FolderRestoreOut) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *FolderRestoreOut) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *FolderRestoreOut) SetId(v string)` - -SetId sets Id field to given value. - - -### GetInheritGrants - -`func (o *FolderRestoreOut) GetInheritGrants() bool` - -GetInheritGrants returns the InheritGrants field if non-nil, zero value otherwise. - -### GetInheritGrantsOk - -`func (o *FolderRestoreOut) GetInheritGrantsOk() (*bool, bool)` - -GetInheritGrantsOk returns a tuple with the InheritGrants field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetInheritGrants - -`func (o *FolderRestoreOut) SetInheritGrants(v bool)` - -SetInheritGrants sets InheritGrants field to given value. - -### HasInheritGrants - -`func (o *FolderRestoreOut) HasInheritGrants() bool` - -HasInheritGrants returns a boolean if a field has been set. - -### GetMetageneration - -`func (o *FolderRestoreOut) GetMetageneration() int32` - -GetMetageneration returns the Metageneration field if non-nil, zero value otherwise. - -### GetMetagenerationOk - -`func (o *FolderRestoreOut) GetMetagenerationOk() (*int32, bool)` - -GetMetagenerationOk returns a tuple with the Metageneration field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMetageneration - -`func (o *FolderRestoreOut) SetMetageneration(v int32)` - -SetMetageneration sets Metageneration field to given value. - -### HasMetageneration - -`func (o *FolderRestoreOut) HasMetageneration() bool` - -HasMetageneration returns a boolean if a field has been set. - -### GetNArtifactsRestored - -`func (o *FolderRestoreOut) GetNArtifactsRestored() int32` - -GetNArtifactsRestored returns the NArtifactsRestored field if non-nil, zero value otherwise. - -### GetNArtifactsRestoredOk - -`func (o *FolderRestoreOut) GetNArtifactsRestoredOk() (*int32, bool)` - -GetNArtifactsRestoredOk returns a tuple with the NArtifactsRestored field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNArtifactsRestored - -`func (o *FolderRestoreOut) SetNArtifactsRestored(v int32)` - -SetNArtifactsRestored sets NArtifactsRestored field to given value. - - -### GetNSubfoldersRestored - -`func (o *FolderRestoreOut) GetNSubfoldersRestored() int32` - -GetNSubfoldersRestored returns the NSubfoldersRestored field if non-nil, zero value otherwise. - -### GetNSubfoldersRestoredOk - -`func (o *FolderRestoreOut) GetNSubfoldersRestoredOk() (*int32, bool)` - -GetNSubfoldersRestoredOk returns a tuple with the NSubfoldersRestored field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNSubfoldersRestored - -`func (o *FolderRestoreOut) SetNSubfoldersRestored(v int32)` - -SetNSubfoldersRestored sets NSubfoldersRestored field to given value. - - -### GetPath - -`func (o *FolderRestoreOut) GetPath() string` - -GetPath returns the Path field if non-nil, zero value otherwise. - -### GetPathOk - -`func (o *FolderRestoreOut) GetPathOk() (*string, bool)` - -GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPath - -`func (o *FolderRestoreOut) SetPath(v string)` - -SetPath sets Path field to given value. - - -### GetPurgeAt - -`func (o *FolderRestoreOut) GetPurgeAt() time.Time` - -GetPurgeAt returns the PurgeAt field if non-nil, zero value otherwise. - -### GetPurgeAtOk - -`func (o *FolderRestoreOut) GetPurgeAtOk() (*time.Time, bool)` - -GetPurgeAtOk returns a tuple with the PurgeAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPurgeAt - -`func (o *FolderRestoreOut) SetPurgeAt(v time.Time)` - -SetPurgeAt sets PurgeAt field to given value. - -### HasPurgeAt - -`func (o *FolderRestoreOut) HasPurgeAt() bool` - -HasPurgeAt returns a boolean if a field has been set. - -### SetPurgeAtNil - -`func (o *FolderRestoreOut) SetPurgeAtNil(b bool)` - - SetPurgeAtNil sets the value for PurgeAt to be an explicit nil - -### UnsetPurgeAt -`func (o *FolderRestoreOut) UnsetPurgeAt()` - -UnsetPurgeAt ensures that no value is present for PurgeAt, not even an explicit nil -### GetUpdatedAt - -`func (o *FolderRestoreOut) GetUpdatedAt() time.Time` - -GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. - -### GetUpdatedAtOk - -`func (o *FolderRestoreOut) GetUpdatedAtOk() (*time.Time, bool)` - -GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUpdatedAt - -`func (o *FolderRestoreOut) SetUpdatedAt(v time.Time)` - -SetUpdatedAt sets UpdatedAt field to given value. - - - -[[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/sdk/go/docs/FolderUpdateIn.md b/sdk/go/docs/FolderUpdateIn.md new file mode 100644 index 0000000..eb98029 --- /dev/null +++ b/sdk/go/docs/FolderUpdateIn.md @@ -0,0 +1,172 @@ +# FolderUpdateIn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**GrantInheritance** | Pointer to **NullableString** | | [optional] +**Metadata** | Pointer to **map[string]interface{}** | | [optional] +**Name** | Pointer to **NullableString** | | [optional] +**ParentId** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewFolderUpdateIn + +`func NewFolderUpdateIn() *FolderUpdateIn` + +NewFolderUpdateIn instantiates a new FolderUpdateIn object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewFolderUpdateInWithDefaults + +`func NewFolderUpdateInWithDefaults() *FolderUpdateIn` + +NewFolderUpdateInWithDefaults instantiates a new FolderUpdateIn object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetGrantInheritance + +`func (o *FolderUpdateIn) GetGrantInheritance() string` + +GetGrantInheritance returns the GrantInheritance field if non-nil, zero value otherwise. + +### GetGrantInheritanceOk + +`func (o *FolderUpdateIn) GetGrantInheritanceOk() (*string, bool)` + +GetGrantInheritanceOk returns a tuple with the GrantInheritance field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetGrantInheritance + +`func (o *FolderUpdateIn) SetGrantInheritance(v string)` + +SetGrantInheritance sets GrantInheritance field to given value. + +### HasGrantInheritance + +`func (o *FolderUpdateIn) HasGrantInheritance() bool` + +HasGrantInheritance returns a boolean if a field has been set. + +### SetGrantInheritanceNil + +`func (o *FolderUpdateIn) SetGrantInheritanceNil(b bool)` + + SetGrantInheritanceNil sets the value for GrantInheritance to be an explicit nil + +### UnsetGrantInheritance +`func (o *FolderUpdateIn) UnsetGrantInheritance()` + +UnsetGrantInheritance ensures that no value is present for GrantInheritance, not even an explicit nil +### GetMetadata + +`func (o *FolderUpdateIn) GetMetadata() map[string]interface{}` + +GetMetadata returns the Metadata field if non-nil, zero value otherwise. + +### GetMetadataOk + +`func (o *FolderUpdateIn) GetMetadataOk() (*map[string]interface{}, bool)` + +GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMetadata + +`func (o *FolderUpdateIn) SetMetadata(v map[string]interface{})` + +SetMetadata sets Metadata field to given value. + +### HasMetadata + +`func (o *FolderUpdateIn) HasMetadata() bool` + +HasMetadata returns a boolean if a field has been set. + +### SetMetadataNil + +`func (o *FolderUpdateIn) SetMetadataNil(b bool)` + + SetMetadataNil sets the value for Metadata to be an explicit nil + +### UnsetMetadata +`func (o *FolderUpdateIn) UnsetMetadata()` + +UnsetMetadata ensures that no value is present for Metadata, not even an explicit nil +### GetName + +`func (o *FolderUpdateIn) GetName() string` + +GetName returns the Name field if non-nil, zero value otherwise. + +### GetNameOk + +`func (o *FolderUpdateIn) GetNameOk() (*string, bool)` + +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetName + +`func (o *FolderUpdateIn) SetName(v string)` + +SetName sets Name field to given value. + +### HasName + +`func (o *FolderUpdateIn) HasName() bool` + +HasName returns a boolean if a field has been set. + +### SetNameNil + +`func (o *FolderUpdateIn) SetNameNil(b bool)` + + SetNameNil sets the value for Name to be an explicit nil + +### UnsetName +`func (o *FolderUpdateIn) UnsetName()` + +UnsetName ensures that no value is present for Name, not even an explicit nil +### GetParentId + +`func (o *FolderUpdateIn) GetParentId() string` + +GetParentId returns the ParentId field if non-nil, zero value otherwise. + +### GetParentIdOk + +`func (o *FolderUpdateIn) GetParentIdOk() (*string, bool)` + +GetParentIdOk returns a tuple with the ParentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParentId + +`func (o *FolderUpdateIn) SetParentId(v string)` + +SetParentId sets ParentId field to given value. + +### HasParentId + +`func (o *FolderUpdateIn) HasParentId() bool` + +HasParentId returns a boolean if a field has been set. + +### SetParentIdNil + +`func (o *FolderUpdateIn) SetParentIdNil(b bool)` + + SetParentIdNil sets the value for ParentId to be an explicit nil + +### UnsetParentId +`func (o *FolderUpdateIn) UnsetParentId()` + +UnsetParentId ensures that no value is present for ParentId, not even an explicit nil + +[[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/sdk/go/docs/FoldersAPI.md b/sdk/go/docs/FoldersAPI.md new file mode 100644 index 0000000..5bb0441 --- /dev/null +++ b/sdk/go/docs/FoldersAPI.md @@ -0,0 +1,571 @@ +# \FoldersAPI + +All URIs are relative to *https://api.agentdrive.run* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**FoldersCopy**](FoldersAPI.md#FoldersCopy) | **Post** /v0/drives/{drive_id}/folders/{folder_id}/copy | Copy Folder +[**FoldersCreate**](FoldersAPI.md#FoldersCreate) | **Post** /v0/drives/{drive_id}/folders | Create Folder +[**FoldersDelete**](FoldersAPI.md#FoldersDelete) | **Delete** /v0/drives/{drive_id}/folders/{folder_id} | Delete Folder +[**FoldersList**](FoldersAPI.md#FoldersList) | **Get** /v0/drives/{drive_id}/folders | List Folders +[**FoldersRead**](FoldersAPI.md#FoldersRead) | **Get** /v0/drives/{drive_id}/folders/{folder_id} | Read Folder +[**FoldersRestore**](FoldersAPI.md#FoldersRestore) | **Post** /v0/drives/{drive_id}/folders/{folder_id}/restore | Restore Folder +[**FoldersUpdate**](FoldersAPI.md#FoldersUpdate) | **Patch** /v0/drives/{drive_id}/folders/{folder_id} | Update Folder + + + +## FoldersCopy + +> FolderOut FoldersCopy(ctx, driveId, folderId).IdempotencyKey(idempotencyKey).FolderCopyIn(folderCopyIn).IfMatch(ifMatch).Authorization(authorization).Execute() + +Copy Folder + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + folderId := "folderId_example" // string | + idempotencyKey := "idempotencyKey_example" // string | + folderCopyIn := *openapiclient.NewFolderCopyIn("DestinationName_example", "DestinationParentId_example") // FolderCopyIn | + ifMatch := "ifMatch_example" // string | (optional) + authorization := "authorization_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FoldersAPI.FoldersCopy(context.Background(), driveId, folderId).IdempotencyKey(idempotencyKey).FolderCopyIn(folderCopyIn).IfMatch(ifMatch).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FoldersAPI.FoldersCopy``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `FoldersCopy`: FolderOut + fmt.Fprintf(os.Stdout, "Response from `FoldersAPI.FoldersCopy`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | +**folderId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiFoldersCopyRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **idempotencyKey** | **string** | | + **folderCopyIn** | [**FolderCopyIn**](FolderCopyIn.md) | | + **ifMatch** | **string** | | + **authorization** | **string** | | + +### Return type + +[**FolderOut**](FolderOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **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) + + +## FoldersCreate + +> FolderOut FoldersCreate(ctx, driveId).IdempotencyKey(idempotencyKey).FolderCreateIn(folderCreateIn).Authorization(authorization).Execute() + +Create Folder + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + idempotencyKey := "idempotencyKey_example" // string | + folderCreateIn := *openapiclient.NewFolderCreateIn("Name_example", "ParentId_example") // FolderCreateIn | + authorization := "authorization_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FoldersAPI.FoldersCreate(context.Background(), driveId).IdempotencyKey(idempotencyKey).FolderCreateIn(folderCreateIn).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FoldersAPI.FoldersCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `FoldersCreate`: FolderOut + fmt.Fprintf(os.Stdout, "Response from `FoldersAPI.FoldersCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiFoldersCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **idempotencyKey** | **string** | | + **folderCreateIn** | [**FolderCreateIn**](FolderCreateIn.md) | | + **authorization** | **string** | | + +### Return type + +[**FolderOut**](FolderOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **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) + + +## FoldersDelete + +> FolderCascadeOut FoldersDelete(ctx, driveId, folderId).IdempotencyKey(idempotencyKey).IfMatch(ifMatch).Recursive(recursive).Authorization(authorization).Execute() + +Delete Folder + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + folderId := "folderId_example" // string | + idempotencyKey := "idempotencyKey_example" // string | + ifMatch := "ifMatch_example" // string | + recursive := true // bool | (optional) (default to false) + authorization := "authorization_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FoldersAPI.FoldersDelete(context.Background(), driveId, folderId).IdempotencyKey(idempotencyKey).IfMatch(ifMatch).Recursive(recursive).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FoldersAPI.FoldersDelete``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `FoldersDelete`: FolderCascadeOut + fmt.Fprintf(os.Stdout, "Response from `FoldersAPI.FoldersDelete`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | +**folderId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiFoldersDeleteRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **idempotencyKey** | **string** | | + **ifMatch** | **string** | | + **recursive** | **bool** | | [default to false] + **authorization** | **string** | | + +### Return type + +[**FolderCascadeOut**](FolderCascadeOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### 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) + + +## FoldersList + +> FolderListOut FoldersList(ctx, driveId).Lifecycle(lifecycle).Limit(limit).Cursor(cursor).ParentId(parentId).Name(name).Authorization(authorization).Execute() + +List Folders + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + lifecycle := "lifecycle_example" // string | (optional) (default to "active") + limit := int32(56) // int32 | (optional) + cursor := "cursor_example" // string | (optional) + parentId := "parentId_example" // string | (optional) + name := "name_example" // string | (optional) + authorization := "authorization_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FoldersAPI.FoldersList(context.Background(), driveId).Lifecycle(lifecycle).Limit(limit).Cursor(cursor).ParentId(parentId).Name(name).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FoldersAPI.FoldersList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `FoldersList`: FolderListOut + fmt.Fprintf(os.Stdout, "Response from `FoldersAPI.FoldersList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiFoldersListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **lifecycle** | **string** | | [default to "active"] + **limit** | **int32** | | + **cursor** | **string** | | + **parentId** | **string** | | + **name** | **string** | | + **authorization** | **string** | | + +### Return type + +[**FolderListOut**](FolderListOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### 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) + + +## FoldersRead + +> FolderOut FoldersRead(ctx, driveId, folderId).IfNoneMatch(ifNoneMatch).Authorization(authorization).Execute() + +Read Folder + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + folderId := "folderId_example" // string | + ifNoneMatch := "ifNoneMatch_example" // string | (optional) + authorization := "authorization_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FoldersAPI.FoldersRead(context.Background(), driveId, folderId).IfNoneMatch(ifNoneMatch).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FoldersAPI.FoldersRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `FoldersRead`: FolderOut + fmt.Fprintf(os.Stdout, "Response from `FoldersAPI.FoldersRead`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | +**folderId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiFoldersReadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **ifNoneMatch** | **string** | | + **authorization** | **string** | | + +### Return type + +[**FolderOut**](FolderOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### 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) + + +## FoldersRestore + +> FolderCascadeOut FoldersRestore(ctx, driveId, folderId).IdempotencyKey(idempotencyKey).IfMatch(ifMatch).Authorization(authorization).Execute() + +Restore Folder + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + folderId := "folderId_example" // string | + idempotencyKey := "idempotencyKey_example" // string | + ifMatch := "ifMatch_example" // string | + authorization := "authorization_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FoldersAPI.FoldersRestore(context.Background(), driveId, folderId).IdempotencyKey(idempotencyKey).IfMatch(ifMatch).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FoldersAPI.FoldersRestore``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `FoldersRestore`: FolderCascadeOut + fmt.Fprintf(os.Stdout, "Response from `FoldersAPI.FoldersRestore`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | +**folderId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiFoldersRestoreRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **idempotencyKey** | **string** | | + **ifMatch** | **string** | | + **authorization** | **string** | | + +### Return type + +[**FolderCascadeOut**](FolderCascadeOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### 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) + + +## FoldersUpdate + +> FolderOut FoldersUpdate(ctx, driveId, folderId).IdempotencyKey(idempotencyKey).IfMatch(ifMatch).FolderUpdateIn(folderUpdateIn).Authorization(authorization).Execute() + +Update Folder + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + folderId := "folderId_example" // string | + idempotencyKey := "idempotencyKey_example" // string | + ifMatch := "ifMatch_example" // string | + folderUpdateIn := *openapiclient.NewFolderUpdateIn() // FolderUpdateIn | + authorization := "authorization_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.FoldersAPI.FoldersUpdate(context.Background(), driveId, folderId).IdempotencyKey(idempotencyKey).IfMatch(ifMatch).FolderUpdateIn(folderUpdateIn).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `FoldersAPI.FoldersUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `FoldersUpdate`: FolderOut + fmt.Fprintf(os.Stdout, "Response from `FoldersAPI.FoldersUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | +**folderId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiFoldersUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **idempotencyKey** | **string** | | + **ifMatch** | **string** | | + **folderUpdateIn** | [**FolderUpdateIn**](FolderUpdateIn.md) | | + **authorization** | **string** | | + +### Return type + +[**FolderOut**](FolderOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **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) diff --git a/sdk/go/docs/GrantCreateIn.md b/sdk/go/docs/GrantCreateIn.md index 5d90665..1058c77 100644 --- a/sdk/go/docs/GrantCreateIn.md +++ b/sdk/go/docs/GrantCreateIn.md @@ -4,16 +4,18 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ExpiresIn** | Pointer to **NullableInt32** | | [optional] -**Principal** | [**GrantPrincipalIn**](GrantPrincipalIn.md) | | -**Resource** | **string** | | +**ExpiresAt** | Pointer to **NullableTime** | | [optional] +**PrincipalId** | Pointer to **NullableString** | | [optional] +**PrincipalType** | **string** | | +**ResourceId** | **string** | | +**ResourceType** | **string** | | **Role** | **string** | | ## Methods ### NewGrantCreateIn -`func NewGrantCreateIn(principal GrantPrincipalIn, resource string, role string, ) *GrantCreateIn` +`func NewGrantCreateIn(principalType string, resourceId string, resourceType string, role string, ) *GrantCreateIn` NewGrantCreateIn instantiates a new GrantCreateIn object This constructor will assign default values to properties that have it defined, @@ -28,79 +30,134 @@ NewGrantCreateInWithDefaults instantiates a new GrantCreateIn object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set -### GetExpiresIn +### GetExpiresAt -`func (o *GrantCreateIn) GetExpiresIn() int32` +`func (o *GrantCreateIn) GetExpiresAt() time.Time` -GetExpiresIn returns the ExpiresIn field if non-nil, zero value otherwise. +GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. -### GetExpiresInOk +### GetExpiresAtOk -`func (o *GrantCreateIn) GetExpiresInOk() (*int32, bool)` +`func (o *GrantCreateIn) GetExpiresAtOk() (*time.Time, bool)` -GetExpiresInOk returns a tuple with the ExpiresIn field if it's non-nil, zero value otherwise +GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetExpiresIn +### SetExpiresAt -`func (o *GrantCreateIn) SetExpiresIn(v int32)` +`func (o *GrantCreateIn) SetExpiresAt(v time.Time)` -SetExpiresIn sets ExpiresIn field to given value. +SetExpiresAt sets ExpiresAt field to given value. -### HasExpiresIn +### HasExpiresAt -`func (o *GrantCreateIn) HasExpiresIn() bool` +`func (o *GrantCreateIn) HasExpiresAt() bool` -HasExpiresIn returns a boolean if a field has been set. +HasExpiresAt returns a boolean if a field has been set. -### SetExpiresInNil +### SetExpiresAtNil -`func (o *GrantCreateIn) SetExpiresInNil(b bool)` +`func (o *GrantCreateIn) SetExpiresAtNil(b bool)` - SetExpiresInNil sets the value for ExpiresIn to be an explicit nil + SetExpiresAtNil sets the value for ExpiresAt to be an explicit nil -### UnsetExpiresIn -`func (o *GrantCreateIn) UnsetExpiresIn()` +### UnsetExpiresAt +`func (o *GrantCreateIn) UnsetExpiresAt()` -UnsetExpiresIn ensures that no value is present for ExpiresIn, not even an explicit nil -### GetPrincipal +UnsetExpiresAt ensures that no value is present for ExpiresAt, not even an explicit nil +### GetPrincipalId -`func (o *GrantCreateIn) GetPrincipal() GrantPrincipalIn` +`func (o *GrantCreateIn) GetPrincipalId() string` -GetPrincipal returns the Principal field if non-nil, zero value otherwise. +GetPrincipalId returns the PrincipalId field if non-nil, zero value otherwise. -### GetPrincipalOk +### GetPrincipalIdOk -`func (o *GrantCreateIn) GetPrincipalOk() (*GrantPrincipalIn, bool)` +`func (o *GrantCreateIn) GetPrincipalIdOk() (*string, bool)` -GetPrincipalOk returns a tuple with the Principal field if it's non-nil, zero value otherwise +GetPrincipalIdOk returns a tuple with the PrincipalId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetPrincipal +### SetPrincipalId -`func (o *GrantCreateIn) SetPrincipal(v GrantPrincipalIn)` +`func (o *GrantCreateIn) SetPrincipalId(v string)` -SetPrincipal sets Principal field to given value. +SetPrincipalId sets PrincipalId field to given value. +### HasPrincipalId -### GetResource +`func (o *GrantCreateIn) HasPrincipalId() bool` -`func (o *GrantCreateIn) GetResource() string` +HasPrincipalId returns a boolean if a field has been set. -GetResource returns the Resource field if non-nil, zero value otherwise. +### SetPrincipalIdNil -### GetResourceOk +`func (o *GrantCreateIn) SetPrincipalIdNil(b bool)` -`func (o *GrantCreateIn) GetResourceOk() (*string, bool)` + SetPrincipalIdNil sets the value for PrincipalId to be an explicit nil -GetResourceOk returns a tuple with the Resource field if it's non-nil, zero value otherwise +### UnsetPrincipalId +`func (o *GrantCreateIn) UnsetPrincipalId()` + +UnsetPrincipalId ensures that no value is present for PrincipalId, not even an explicit nil +### GetPrincipalType + +`func (o *GrantCreateIn) GetPrincipalType() string` + +GetPrincipalType returns the PrincipalType field if non-nil, zero value otherwise. + +### GetPrincipalTypeOk + +`func (o *GrantCreateIn) GetPrincipalTypeOk() (*string, bool)` + +GetPrincipalTypeOk returns a tuple with the PrincipalType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetPrincipalType + +`func (o *GrantCreateIn) SetPrincipalType(v string)` + +SetPrincipalType sets PrincipalType field to given value. + + +### GetResourceId + +`func (o *GrantCreateIn) GetResourceId() string` + +GetResourceId returns the ResourceId field if non-nil, zero value otherwise. + +### GetResourceIdOk + +`func (o *GrantCreateIn) GetResourceIdOk() (*string, bool)` + +GetResourceIdOk returns a tuple with the ResourceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResourceId + +`func (o *GrantCreateIn) SetResourceId(v string)` + +SetResourceId sets ResourceId field to given value. + + +### GetResourceType + +`func (o *GrantCreateIn) GetResourceType() string` + +GetResourceType returns the ResourceType field if non-nil, zero value otherwise. + +### GetResourceTypeOk + +`func (o *GrantCreateIn) GetResourceTypeOk() (*string, bool)` + +GetResourceTypeOk returns a tuple with the ResourceType field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetResource +### SetResourceType -`func (o *GrantCreateIn) SetResource(v string)` +`func (o *GrantCreateIn) SetResourceType(v string)` -SetResource sets Resource field to given value. +SetResourceType sets ResourceType field to given value. ### GetRole diff --git a/sdk/go/docs/GrantList.md b/sdk/go/docs/GrantList.md deleted file mode 100644 index f498f3b..0000000 --- a/sdk/go/docs/GrantList.md +++ /dev/null @@ -1,85 +0,0 @@ -# GrantList - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Items** | [**[]GrantOut**](GrantOut.md) | | -**NextCursor** | Pointer to **NullableString** | | [optional] - -## Methods - -### NewGrantList - -`func NewGrantList(items []GrantOut, ) *GrantList` - -NewGrantList instantiates a new GrantList object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGrantListWithDefaults - -`func NewGrantListWithDefaults() *GrantList` - -NewGrantListWithDefaults instantiates a new GrantList object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetItems - -`func (o *GrantList) GetItems() []GrantOut` - -GetItems returns the Items field if non-nil, zero value otherwise. - -### GetItemsOk - -`func (o *GrantList) GetItemsOk() (*[]GrantOut, bool)` - -GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetItems - -`func (o *GrantList) SetItems(v []GrantOut)` - -SetItems sets Items field to given value. - - -### GetNextCursor - -`func (o *GrantList) GetNextCursor() string` - -GetNextCursor returns the NextCursor field if non-nil, zero value otherwise. - -### GetNextCursorOk - -`func (o *GrantList) GetNextCursorOk() (*string, bool)` - -GetNextCursorOk returns a tuple with the NextCursor field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNextCursor - -`func (o *GrantList) SetNextCursor(v string)` - -SetNextCursor sets NextCursor field to given value. - -### HasNextCursor - -`func (o *GrantList) HasNextCursor() bool` - -HasNextCursor returns a boolean if a field has been set. - -### SetNextCursorNil - -`func (o *GrantList) SetNextCursorNil(b bool)` - - SetNextCursorNil sets the value for NextCursor to be an explicit nil - -### UnsetNextCursor -`func (o *GrantList) UnsetNextCursor()` - -UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil - -[[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/sdk/go/docs/GrantListOut.md b/sdk/go/docs/GrantListOut.md new file mode 100644 index 0000000..00a6a96 --- /dev/null +++ b/sdk/go/docs/GrantListOut.md @@ -0,0 +1,80 @@ +# GrantListOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Items** | [**[]GrantOut**](GrantOut.md) | | +**NextCursor** | **NullableString** | | + +## Methods + +### NewGrantListOut + +`func NewGrantListOut(items []GrantOut, nextCursor NullableString, ) *GrantListOut` + +NewGrantListOut instantiates a new GrantListOut object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGrantListOutWithDefaults + +`func NewGrantListOutWithDefaults() *GrantListOut` + +NewGrantListOutWithDefaults instantiates a new GrantListOut object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetItems + +`func (o *GrantListOut) GetItems() []GrantOut` + +GetItems returns the Items field if non-nil, zero value otherwise. + +### GetItemsOk + +`func (o *GrantListOut) GetItemsOk() (*[]GrantOut, bool)` + +GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItems + +`func (o *GrantListOut) SetItems(v []GrantOut)` + +SetItems sets Items field to given value. + + +### GetNextCursor + +`func (o *GrantListOut) GetNextCursor() string` + +GetNextCursor returns the NextCursor field if non-nil, zero value otherwise. + +### GetNextCursorOk + +`func (o *GrantListOut) GetNextCursorOk() (*string, bool)` + +GetNextCursorOk returns a tuple with the NextCursor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextCursor + +`func (o *GrantListOut) SetNextCursor(v string)` + +SetNextCursor sets NextCursor field to given value. + + +### SetNextCursorNil + +`func (o *GrantListOut) SetNextCursorNil(b bool)` + + SetNextCursorNil sets the value for NextCursor to be an explicit nil + +### UnsetNextCursor +`func (o *GrantListOut) UnsetNextCursor()` + +UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil + +[[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/sdk/go/docs/GrantOut.md b/sdk/go/docs/GrantOut.md index 26d2674..3857e55 100644 --- a/sdk/go/docs/GrantOut.md +++ b/sdk/go/docs/GrantOut.md @@ -4,25 +4,24 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ArtifactsAffected** | Pointer to **NullableInt32** | | [optional] **CreatedAt** | **time.Time** | | -**ExpiresAt** | Pointer to **NullableTime** | | [optional] -**GrantedById** | **string** | | -**GrantedByType** | **string** | | +**DriveId** | **string** | | +**ExpiresAt** | **NullableTime** | | **Id** | **string** | | -**OnBehalfOf** | Pointer to **NullableString** | | [optional] -**PrincipalEmail** | Pointer to **NullableString** | | [optional] -**PrincipalId** | Pointer to **NullableString** | | [optional] +**PrincipalId** | **NullableString** | | **PrincipalType** | **string** | | **ResourceId** | **string** | | **ResourceType** | **string** | | +**Revision** | **string** | | +**RevokedAt** | **NullableTime** | | **Role** | **string** | | +**State** | **string** | | ## Methods ### NewGrantOut -`func NewGrantOut(createdAt time.Time, grantedById string, grantedByType string, id string, principalType string, resourceId string, resourceType string, role string, ) *GrantOut` +`func NewGrantOut(createdAt time.Time, driveId string, expiresAt NullableTime, id string, principalId NullableString, principalType string, resourceId string, resourceType string, revision string, revokedAt NullableTime, role string, state string, ) *GrantOut` NewGrantOut instantiates a new GrantOut object This constructor will assign default values to properties that have it defined, @@ -37,59 +36,44 @@ NewGrantOutWithDefaults instantiates a new GrantOut object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set -### GetArtifactsAffected +### GetCreatedAt -`func (o *GrantOut) GetArtifactsAffected() int32` +`func (o *GrantOut) GetCreatedAt() time.Time` -GetArtifactsAffected returns the ArtifactsAffected field if non-nil, zero value otherwise. +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. -### GetArtifactsAffectedOk +### GetCreatedAtOk -`func (o *GrantOut) GetArtifactsAffectedOk() (*int32, bool)` +`func (o *GrantOut) GetCreatedAtOk() (*time.Time, bool)` -GetArtifactsAffectedOk returns a tuple with the ArtifactsAffected field if it's non-nil, zero value otherwise +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetArtifactsAffected - -`func (o *GrantOut) SetArtifactsAffected(v int32)` - -SetArtifactsAffected sets ArtifactsAffected field to given value. - -### HasArtifactsAffected - -`func (o *GrantOut) HasArtifactsAffected() bool` +### SetCreatedAt -HasArtifactsAffected returns a boolean if a field has been set. +`func (o *GrantOut) SetCreatedAt(v time.Time)` -### SetArtifactsAffectedNil +SetCreatedAt sets CreatedAt field to given value. -`func (o *GrantOut) SetArtifactsAffectedNil(b bool)` - SetArtifactsAffectedNil sets the value for ArtifactsAffected to be an explicit nil +### GetDriveId -### UnsetArtifactsAffected -`func (o *GrantOut) UnsetArtifactsAffected()` +`func (o *GrantOut) GetDriveId() string` -UnsetArtifactsAffected ensures that no value is present for ArtifactsAffected, not even an explicit nil -### GetCreatedAt +GetDriveId returns the DriveId field if non-nil, zero value otherwise. -`func (o *GrantOut) GetCreatedAt() time.Time` +### GetDriveIdOk -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. +`func (o *GrantOut) GetDriveIdOk() (*string, bool)` -### GetCreatedAtOk - -`func (o *GrantOut) GetCreatedAtOk() (*time.Time, bool)` - -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +GetDriveIdOk returns a tuple with the DriveId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetCreatedAt +### SetDriveId -`func (o *GrantOut) SetCreatedAt(v time.Time)` +`func (o *GrantOut) SetDriveId(v string)` -SetCreatedAt sets CreatedAt field to given value. +SetDriveId sets DriveId field to given value. ### GetExpiresAt @@ -111,11 +95,6 @@ and a boolean to check if the value has been set. SetExpiresAt sets ExpiresAt field to given value. -### HasExpiresAt - -`func (o *GrantOut) HasExpiresAt() bool` - -HasExpiresAt returns a boolean if a field has been set. ### SetExpiresAtNil @@ -127,46 +106,6 @@ HasExpiresAt returns a boolean if a field has been set. `func (o *GrantOut) UnsetExpiresAt()` UnsetExpiresAt ensures that no value is present for ExpiresAt, not even an explicit nil -### GetGrantedById - -`func (o *GrantOut) GetGrantedById() string` - -GetGrantedById returns the GrantedById field if non-nil, zero value otherwise. - -### GetGrantedByIdOk - -`func (o *GrantOut) GetGrantedByIdOk() (*string, bool)` - -GetGrantedByIdOk returns a tuple with the GrantedById field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetGrantedById - -`func (o *GrantOut) SetGrantedById(v string)` - -SetGrantedById sets GrantedById field to given value. - - -### GetGrantedByType - -`func (o *GrantOut) GetGrantedByType() string` - -GetGrantedByType returns the GrantedByType field if non-nil, zero value otherwise. - -### GetGrantedByTypeOk - -`func (o *GrantOut) GetGrantedByTypeOk() (*string, bool)` - -GetGrantedByTypeOk returns a tuple with the GrantedByType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetGrantedByType - -`func (o *GrantOut) SetGrantedByType(v string)` - -SetGrantedByType sets GrantedByType field to given value. - - ### GetId `func (o *GrantOut) GetId() string` @@ -187,76 +126,6 @@ and a boolean to check if the value has been set. SetId sets Id field to given value. -### GetOnBehalfOf - -`func (o *GrantOut) GetOnBehalfOf() string` - -GetOnBehalfOf returns the OnBehalfOf field if non-nil, zero value otherwise. - -### GetOnBehalfOfOk - -`func (o *GrantOut) GetOnBehalfOfOk() (*string, bool)` - -GetOnBehalfOfOk returns a tuple with the OnBehalfOf field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOnBehalfOf - -`func (o *GrantOut) SetOnBehalfOf(v string)` - -SetOnBehalfOf sets OnBehalfOf field to given value. - -### HasOnBehalfOf - -`func (o *GrantOut) HasOnBehalfOf() bool` - -HasOnBehalfOf returns a boolean if a field has been set. - -### SetOnBehalfOfNil - -`func (o *GrantOut) SetOnBehalfOfNil(b bool)` - - SetOnBehalfOfNil sets the value for OnBehalfOf to be an explicit nil - -### UnsetOnBehalfOf -`func (o *GrantOut) UnsetOnBehalfOf()` - -UnsetOnBehalfOf ensures that no value is present for OnBehalfOf, not even an explicit nil -### GetPrincipalEmail - -`func (o *GrantOut) GetPrincipalEmail() string` - -GetPrincipalEmail returns the PrincipalEmail field if non-nil, zero value otherwise. - -### GetPrincipalEmailOk - -`func (o *GrantOut) GetPrincipalEmailOk() (*string, bool)` - -GetPrincipalEmailOk returns a tuple with the PrincipalEmail field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPrincipalEmail - -`func (o *GrantOut) SetPrincipalEmail(v string)` - -SetPrincipalEmail sets PrincipalEmail field to given value. - -### HasPrincipalEmail - -`func (o *GrantOut) HasPrincipalEmail() bool` - -HasPrincipalEmail returns a boolean if a field has been set. - -### SetPrincipalEmailNil - -`func (o *GrantOut) SetPrincipalEmailNil(b bool)` - - SetPrincipalEmailNil sets the value for PrincipalEmail to be an explicit nil - -### UnsetPrincipalEmail -`func (o *GrantOut) UnsetPrincipalEmail()` - -UnsetPrincipalEmail ensures that no value is present for PrincipalEmail, not even an explicit nil ### GetPrincipalId `func (o *GrantOut) GetPrincipalId() string` @@ -276,11 +145,6 @@ and a boolean to check if the value has been set. SetPrincipalId sets PrincipalId field to given value. -### HasPrincipalId - -`func (o *GrantOut) HasPrincipalId() bool` - -HasPrincipalId returns a boolean if a field has been set. ### SetPrincipalIdNil @@ -352,6 +216,56 @@ and a boolean to check if the value has been set. SetResourceType sets ResourceType field to given value. +### GetRevision + +`func (o *GrantOut) GetRevision() string` + +GetRevision returns the Revision field if non-nil, zero value otherwise. + +### GetRevisionOk + +`func (o *GrantOut) GetRevisionOk() (*string, bool)` + +GetRevisionOk returns a tuple with the Revision field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRevision + +`func (o *GrantOut) SetRevision(v string)` + +SetRevision sets Revision field to given value. + + +### GetRevokedAt + +`func (o *GrantOut) GetRevokedAt() time.Time` + +GetRevokedAt returns the RevokedAt field if non-nil, zero value otherwise. + +### GetRevokedAtOk + +`func (o *GrantOut) GetRevokedAtOk() (*time.Time, bool)` + +GetRevokedAtOk returns a tuple with the RevokedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRevokedAt + +`func (o *GrantOut) SetRevokedAt(v time.Time)` + +SetRevokedAt sets RevokedAt field to given value. + + +### SetRevokedAtNil + +`func (o *GrantOut) SetRevokedAtNil(b bool)` + + SetRevokedAtNil sets the value for RevokedAt to be an explicit nil + +### UnsetRevokedAt +`func (o *GrantOut) UnsetRevokedAt()` + +UnsetRevokedAt ensures that no value is present for RevokedAt, not even an explicit nil ### GetRole `func (o *GrantOut) GetRole() string` @@ -372,5 +286,25 @@ and a boolean to check if the value has been set. SetRole sets Role field to given value. +### GetState + +`func (o *GrantOut) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *GrantOut) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *GrantOut) SetState(v string)` + +SetState sets State field to given value. + + [[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/sdk/go/docs/GrantPatchIn.md b/sdk/go/docs/GrantPatchIn.md deleted file mode 100644 index b9e2357..0000000 --- a/sdk/go/docs/GrantPatchIn.md +++ /dev/null @@ -1,100 +0,0 @@ -# GrantPatchIn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ExpiresIn** | Pointer to **NullableInt32** | | [optional] -**Role** | Pointer to **NullableString** | | [optional] - -## Methods - -### NewGrantPatchIn - -`func NewGrantPatchIn() *GrantPatchIn` - -NewGrantPatchIn instantiates a new GrantPatchIn object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGrantPatchInWithDefaults - -`func NewGrantPatchInWithDefaults() *GrantPatchIn` - -NewGrantPatchInWithDefaults instantiates a new GrantPatchIn object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetExpiresIn - -`func (o *GrantPatchIn) GetExpiresIn() int32` - -GetExpiresIn returns the ExpiresIn field if non-nil, zero value otherwise. - -### GetExpiresInOk - -`func (o *GrantPatchIn) GetExpiresInOk() (*int32, bool)` - -GetExpiresInOk returns a tuple with the ExpiresIn field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExpiresIn - -`func (o *GrantPatchIn) SetExpiresIn(v int32)` - -SetExpiresIn sets ExpiresIn field to given value. - -### HasExpiresIn - -`func (o *GrantPatchIn) HasExpiresIn() bool` - -HasExpiresIn returns a boolean if a field has been set. - -### SetExpiresInNil - -`func (o *GrantPatchIn) SetExpiresInNil(b bool)` - - SetExpiresInNil sets the value for ExpiresIn to be an explicit nil - -### UnsetExpiresIn -`func (o *GrantPatchIn) UnsetExpiresIn()` - -UnsetExpiresIn ensures that no value is present for ExpiresIn, not even an explicit nil -### GetRole - -`func (o *GrantPatchIn) GetRole() string` - -GetRole returns the Role field if non-nil, zero value otherwise. - -### GetRoleOk - -`func (o *GrantPatchIn) GetRoleOk() (*string, bool)` - -GetRoleOk returns a tuple with the Role field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRole - -`func (o *GrantPatchIn) SetRole(v string)` - -SetRole sets Role field to given value. - -### HasRole - -`func (o *GrantPatchIn) HasRole() bool` - -HasRole returns a boolean if a field has been set. - -### SetRoleNil - -`func (o *GrantPatchIn) SetRoleNil(b bool)` - - SetRoleNil sets the value for Role to be an explicit nil - -### UnsetRole -`func (o *GrantPatchIn) UnsetRole()` - -UnsetRole ensures that no value is present for Role, not even an explicit nil - -[[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/sdk/go/docs/GrantPrincipalIn.md b/sdk/go/docs/GrantPrincipalIn.md deleted file mode 100644 index f29070d..0000000 --- a/sdk/go/docs/GrantPrincipalIn.md +++ /dev/null @@ -1,121 +0,0 @@ -# GrantPrincipalIn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | Pointer to **NullableString** | | [optional] -**Id** | Pointer to **NullableString** | | [optional] -**Type** | **string** | | - -## Methods - -### NewGrantPrincipalIn - -`func NewGrantPrincipalIn(type_ string, ) *GrantPrincipalIn` - -NewGrantPrincipalIn instantiates a new GrantPrincipalIn object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewGrantPrincipalInWithDefaults - -`func NewGrantPrincipalInWithDefaults() *GrantPrincipalIn` - -NewGrantPrincipalInWithDefaults instantiates a new GrantPrincipalIn object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetEmail - -`func (o *GrantPrincipalIn) GetEmail() string` - -GetEmail returns the Email field if non-nil, zero value otherwise. - -### GetEmailOk - -`func (o *GrantPrincipalIn) GetEmailOk() (*string, bool)` - -GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEmail - -`func (o *GrantPrincipalIn) SetEmail(v string)` - -SetEmail sets Email field to given value. - -### HasEmail - -`func (o *GrantPrincipalIn) HasEmail() bool` - -HasEmail returns a boolean if a field has been set. - -### SetEmailNil - -`func (o *GrantPrincipalIn) SetEmailNil(b bool)` - - SetEmailNil sets the value for Email to be an explicit nil - -### UnsetEmail -`func (o *GrantPrincipalIn) UnsetEmail()` - -UnsetEmail ensures that no value is present for Email, not even an explicit nil -### GetId - -`func (o *GrantPrincipalIn) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *GrantPrincipalIn) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *GrantPrincipalIn) SetId(v string)` - -SetId sets Id field to given value. - -### HasId - -`func (o *GrantPrincipalIn) HasId() bool` - -HasId returns a boolean if a field has been set. - -### SetIdNil - -`func (o *GrantPrincipalIn) SetIdNil(b bool)` - - SetIdNil sets the value for Id to be an explicit nil - -### UnsetId -`func (o *GrantPrincipalIn) UnsetId()` - -UnsetId ensures that no value is present for Id, not even an explicit nil -### GetType - -`func (o *GrantPrincipalIn) GetType() string` - -GetType returns the Type field if non-nil, zero value otherwise. - -### GetTypeOk - -`func (o *GrantPrincipalIn) GetTypeOk() (*string, bool)` - -GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetType - -`func (o *GrantPrincipalIn) SetType(v string)` - -SetType sets Type field to given value. - - - -[[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/sdk/go/docs/GrantUpdateIn.md b/sdk/go/docs/GrantUpdateIn.md new file mode 100644 index 0000000..cabca6f --- /dev/null +++ b/sdk/go/docs/GrantUpdateIn.md @@ -0,0 +1,100 @@ +# GrantUpdateIn + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ExpiresAt** | Pointer to **NullableTime** | | [optional] +**Role** | Pointer to **NullableString** | | [optional] + +## Methods + +### NewGrantUpdateIn + +`func NewGrantUpdateIn() *GrantUpdateIn` + +NewGrantUpdateIn instantiates a new GrantUpdateIn object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewGrantUpdateInWithDefaults + +`func NewGrantUpdateInWithDefaults() *GrantUpdateIn` + +NewGrantUpdateInWithDefaults instantiates a new GrantUpdateIn object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetExpiresAt + +`func (o *GrantUpdateIn) GetExpiresAt() time.Time` + +GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. + +### GetExpiresAtOk + +`func (o *GrantUpdateIn) GetExpiresAtOk() (*time.Time, bool)` + +GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpiresAt + +`func (o *GrantUpdateIn) SetExpiresAt(v time.Time)` + +SetExpiresAt sets ExpiresAt field to given value. + +### HasExpiresAt + +`func (o *GrantUpdateIn) HasExpiresAt() bool` + +HasExpiresAt returns a boolean if a field has been set. + +### SetExpiresAtNil + +`func (o *GrantUpdateIn) SetExpiresAtNil(b bool)` + + SetExpiresAtNil sets the value for ExpiresAt to be an explicit nil + +### UnsetExpiresAt +`func (o *GrantUpdateIn) UnsetExpiresAt()` + +UnsetExpiresAt ensures that no value is present for ExpiresAt, not even an explicit nil +### GetRole + +`func (o *GrantUpdateIn) GetRole() string` + +GetRole returns the Role field if non-nil, zero value otherwise. + +### GetRoleOk + +`func (o *GrantUpdateIn) GetRoleOk() (*string, bool)` + +GetRoleOk returns a tuple with the Role field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRole + +`func (o *GrantUpdateIn) SetRole(v string)` + +SetRole sets Role field to given value. + +### HasRole + +`func (o *GrantUpdateIn) HasRole() bool` + +HasRole returns a boolean if a field has been set. + +### SetRoleNil + +`func (o *GrantUpdateIn) SetRoleNil(b bool)` + + SetRoleNil sets the value for Role to be an explicit nil + +### UnsetRole +`func (o *GrantUpdateIn) UnsetRole()` + +UnsetRole ensures that no value is present for Role, not even an explicit nil + +[[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/sdk/go/docs/GrantsAPI.md b/sdk/go/docs/GrantsAPI.md new file mode 100644 index 0000000..e8130b5 --- /dev/null +++ b/sdk/go/docs/GrantsAPI.md @@ -0,0 +1,409 @@ +# \GrantsAPI + +All URIs are relative to *https://api.agentdrive.run* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**GrantsCreate**](GrantsAPI.md#GrantsCreate) | **Post** /v0/drives/{drive_id}/grants | Create Grant +[**GrantsList**](GrantsAPI.md#GrantsList) | **Get** /v0/drives/{drive_id}/grants | List Grants +[**GrantsRead**](GrantsAPI.md#GrantsRead) | **Get** /v0/drives/{drive_id}/grants/{grant_id} | Read Grant +[**GrantsRevoke**](GrantsAPI.md#GrantsRevoke) | **Delete** /v0/drives/{drive_id}/grants/{grant_id} | Revoke Grant +[**GrantsUpdate**](GrantsAPI.md#GrantsUpdate) | **Patch** /v0/drives/{drive_id}/grants/{grant_id} | Update Grant + + + +## GrantsCreate + +> GrantOut GrantsCreate(ctx, driveId).IdempotencyKey(idempotencyKey).GrantCreateIn(grantCreateIn).Authorization(authorization).Execute() + +Create Grant + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + idempotencyKey := "idempotencyKey_example" // string | + grantCreateIn := *openapiclient.NewGrantCreateIn("PrincipalType_example", "ResourceId_example", "ResourceType_example", "Role_example") // GrantCreateIn | + authorization := "authorization_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GrantsAPI.GrantsCreate(context.Background(), driveId).IdempotencyKey(idempotencyKey).GrantCreateIn(grantCreateIn).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GrantsAPI.GrantsCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GrantsCreate`: GrantOut + fmt.Fprintf(os.Stdout, "Response from `GrantsAPI.GrantsCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGrantsCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **idempotencyKey** | **string** | | + **grantCreateIn** | [**GrantCreateIn**](GrantCreateIn.md) | | + **authorization** | **string** | | + +### Return type + +[**GrantOut**](GrantOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **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) + + +## GrantsList + +> GrantListOut GrantsList(ctx, driveId).Lifecycle(lifecycle).Limit(limit).Cursor(cursor).ResourceType(resourceType).ResourceId(resourceId).PrincipalType(principalType).Authorization(authorization).Execute() + +List Grants + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + lifecycle := "lifecycle_example" // string | (optional) (default to "active") + limit := int32(56) // int32 | (optional) + cursor := "cursor_example" // string | (optional) + resourceType := "resourceType_example" // string | (optional) + resourceId := "resourceId_example" // string | (optional) + principalType := "principalType_example" // string | (optional) + authorization := "authorization_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GrantsAPI.GrantsList(context.Background(), driveId).Lifecycle(lifecycle).Limit(limit).Cursor(cursor).ResourceType(resourceType).ResourceId(resourceId).PrincipalType(principalType).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GrantsAPI.GrantsList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GrantsList`: GrantListOut + fmt.Fprintf(os.Stdout, "Response from `GrantsAPI.GrantsList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGrantsListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **lifecycle** | **string** | | [default to "active"] + **limit** | **int32** | | + **cursor** | **string** | | + **resourceType** | **string** | | + **resourceId** | **string** | | + **principalType** | **string** | | + **authorization** | **string** | | + +### Return type + +[**GrantListOut**](GrantListOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### 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) + + +## GrantsRead + +> GrantOut GrantsRead(ctx, driveId, grantId).IfNoneMatch(ifNoneMatch).Authorization(authorization).Execute() + +Read Grant + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + grantId := "grantId_example" // string | + ifNoneMatch := "ifNoneMatch_example" // string | (optional) + authorization := "authorization_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GrantsAPI.GrantsRead(context.Background(), driveId, grantId).IfNoneMatch(ifNoneMatch).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GrantsAPI.GrantsRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GrantsRead`: GrantOut + fmt.Fprintf(os.Stdout, "Response from `GrantsAPI.GrantsRead`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | +**grantId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGrantsReadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **ifNoneMatch** | **string** | | + **authorization** | **string** | | + +### Return type + +[**GrantOut**](GrantOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### 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) + + +## GrantsRevoke + +> GrantOut GrantsRevoke(ctx, driveId, grantId).IdempotencyKey(idempotencyKey).IfMatch(ifMatch).Authorization(authorization).Execute() + +Revoke Grant + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + grantId := "grantId_example" // string | + idempotencyKey := "idempotencyKey_example" // string | + ifMatch := "ifMatch_example" // string | + authorization := "authorization_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GrantsAPI.GrantsRevoke(context.Background(), driveId, grantId).IdempotencyKey(idempotencyKey).IfMatch(ifMatch).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GrantsAPI.GrantsRevoke``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GrantsRevoke`: GrantOut + fmt.Fprintf(os.Stdout, "Response from `GrantsAPI.GrantsRevoke`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | +**grantId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGrantsRevokeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **idempotencyKey** | **string** | | + **ifMatch** | **string** | | + **authorization** | **string** | | + +### Return type + +[**GrantOut**](GrantOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### 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) + + +## GrantsUpdate + +> GrantOut GrantsUpdate(ctx, driveId, grantId).IdempotencyKey(idempotencyKey).IfMatch(ifMatch).GrantUpdateIn(grantUpdateIn).Authorization(authorization).Execute() + +Update Grant + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + grantId := "grantId_example" // string | + idempotencyKey := "idempotencyKey_example" // string | + ifMatch := "ifMatch_example" // string | + grantUpdateIn := *openapiclient.NewGrantUpdateIn() // GrantUpdateIn | + authorization := "authorization_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.GrantsAPI.GrantsUpdate(context.Background(), driveId, grantId).IdempotencyKey(idempotencyKey).IfMatch(ifMatch).GrantUpdateIn(grantUpdateIn).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `GrantsAPI.GrantsUpdate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `GrantsUpdate`: GrantOut + fmt.Fprintf(os.Stdout, "Response from `GrantsAPI.GrantsUpdate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | +**grantId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiGrantsUpdateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **idempotencyKey** | **string** | | + **ifMatch** | **string** | | + **grantUpdateIn** | [**GrantUpdateIn**](GrantUpdateIn.md) | | + **authorization** | **string** | | + +### Return type + +[**GrantOut**](GrantOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **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) diff --git a/sdk/go/docs/HourlyUsageCounterOut.md b/sdk/go/docs/HourlyUsageCounterOut.md deleted file mode 100644 index bbbf634..0000000 --- a/sdk/go/docs/HourlyUsageCounterOut.md +++ /dev/null @@ -1,91 +0,0 @@ -# HourlyUsageCounterOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Limit** | **int32** | | -**ResetAt** | **time.Time** | | -**Used** | **int32** | | - -## Methods - -### NewHourlyUsageCounterOut - -`func NewHourlyUsageCounterOut(limit int32, resetAt time.Time, used int32, ) *HourlyUsageCounterOut` - -NewHourlyUsageCounterOut instantiates a new HourlyUsageCounterOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewHourlyUsageCounterOutWithDefaults - -`func NewHourlyUsageCounterOutWithDefaults() *HourlyUsageCounterOut` - -NewHourlyUsageCounterOutWithDefaults instantiates a new HourlyUsageCounterOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetLimit - -`func (o *HourlyUsageCounterOut) GetLimit() int32` - -GetLimit returns the Limit field if non-nil, zero value otherwise. - -### GetLimitOk - -`func (o *HourlyUsageCounterOut) GetLimitOk() (*int32, bool)` - -GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLimit - -`func (o *HourlyUsageCounterOut) SetLimit(v int32)` - -SetLimit sets Limit field to given value. - - -### GetResetAt - -`func (o *HourlyUsageCounterOut) GetResetAt() time.Time` - -GetResetAt returns the ResetAt field if non-nil, zero value otherwise. - -### GetResetAtOk - -`func (o *HourlyUsageCounterOut) GetResetAtOk() (*time.Time, bool)` - -GetResetAtOk returns a tuple with the ResetAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetResetAt - -`func (o *HourlyUsageCounterOut) SetResetAt(v time.Time)` - -SetResetAt sets ResetAt field to given value. - - -### GetUsed - -`func (o *HourlyUsageCounterOut) GetUsed() int32` - -GetUsed returns the Used field if non-nil, zero value otherwise. - -### GetUsedOk - -`func (o *HourlyUsageCounterOut) GetUsedOk() (*int32, bool)` - -GetUsedOk returns a tuple with the Used field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUsed - -`func (o *HourlyUsageCounterOut) SetUsed(v int32)` - -SetUsed sets Used field to given value. - - - -[[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/sdk/go/docs/IdentityAssertionMetadataOut.md b/sdk/go/docs/IdentityAssertionMetadataOut.md deleted file mode 100644 index 519ab3e..0000000 --- a/sdk/go/docs/IdentityAssertionMetadataOut.md +++ /dev/null @@ -1,91 +0,0 @@ -# IdentityAssertionMetadataOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Alg** | **string** | | -**Iss** | **string** | | -**Version** | **int32** | | - -## Methods - -### NewIdentityAssertionMetadataOut - -`func NewIdentityAssertionMetadataOut(alg string, iss string, version int32, ) *IdentityAssertionMetadataOut` - -NewIdentityAssertionMetadataOut instantiates a new IdentityAssertionMetadataOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewIdentityAssertionMetadataOutWithDefaults - -`func NewIdentityAssertionMetadataOutWithDefaults() *IdentityAssertionMetadataOut` - -NewIdentityAssertionMetadataOutWithDefaults instantiates a new IdentityAssertionMetadataOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetAlg - -`func (o *IdentityAssertionMetadataOut) GetAlg() string` - -GetAlg returns the Alg field if non-nil, zero value otherwise. - -### GetAlgOk - -`func (o *IdentityAssertionMetadataOut) GetAlgOk() (*string, bool)` - -GetAlgOk returns a tuple with the Alg field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAlg - -`func (o *IdentityAssertionMetadataOut) SetAlg(v string)` - -SetAlg sets Alg field to given value. - - -### GetIss - -`func (o *IdentityAssertionMetadataOut) GetIss() string` - -GetIss returns the Iss field if non-nil, zero value otherwise. - -### GetIssOk - -`func (o *IdentityAssertionMetadataOut) GetIssOk() (*string, bool)` - -GetIssOk returns a tuple with the Iss field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIss - -`func (o *IdentityAssertionMetadataOut) SetIss(v string)` - -SetIss sets Iss field to given value. - - -### GetVersion - -`func (o *IdentityAssertionMetadataOut) GetVersion() int32` - -GetVersion returns the Version field if non-nil, zero value otherwise. - -### GetVersionOk - -`func (o *IdentityAssertionMetadataOut) GetVersionOk() (*int32, bool)` - -GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVersion - -`func (o *IdentityAssertionMetadataOut) SetVersion(v int32)` - -SetVersion sets Version field to given value. - - - -[[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/sdk/go/docs/InvitationList.md b/sdk/go/docs/InvitationList.md deleted file mode 100644 index 1872785..0000000 --- a/sdk/go/docs/InvitationList.md +++ /dev/null @@ -1,85 +0,0 @@ -# InvitationList - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Items** | [**[]InvitationOut**](InvitationOut.md) | | -**NextCursor** | Pointer to **NullableString** | | [optional] - -## Methods - -### NewInvitationList - -`func NewInvitationList(items []InvitationOut, ) *InvitationList` - -NewInvitationList instantiates a new InvitationList object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewInvitationListWithDefaults - -`func NewInvitationListWithDefaults() *InvitationList` - -NewInvitationListWithDefaults instantiates a new InvitationList object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetItems - -`func (o *InvitationList) GetItems() []InvitationOut` - -GetItems returns the Items field if non-nil, zero value otherwise. - -### GetItemsOk - -`func (o *InvitationList) GetItemsOk() (*[]InvitationOut, bool)` - -GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetItems - -`func (o *InvitationList) SetItems(v []InvitationOut)` - -SetItems sets Items field to given value. - - -### GetNextCursor - -`func (o *InvitationList) GetNextCursor() string` - -GetNextCursor returns the NextCursor field if non-nil, zero value otherwise. - -### GetNextCursorOk - -`func (o *InvitationList) GetNextCursorOk() (*string, bool)` - -GetNextCursorOk returns a tuple with the NextCursor field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNextCursor - -`func (o *InvitationList) SetNextCursor(v string)` - -SetNextCursor sets NextCursor field to given value. - -### HasNextCursor - -`func (o *InvitationList) HasNextCursor() bool` - -HasNextCursor returns a boolean if a field has been set. - -### SetNextCursorNil - -`func (o *InvitationList) SetNextCursorNil(b bool)` - - SetNextCursorNil sets the value for NextCursor to be an explicit nil - -### UnsetNextCursor -`func (o *InvitationList) UnsetNextCursor()` - -UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil - -[[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/sdk/go/docs/InvitationOut.md b/sdk/go/docs/InvitationOut.md deleted file mode 100644 index 7b91e2e..0000000 --- a/sdk/go/docs/InvitationOut.md +++ /dev/null @@ -1,211 +0,0 @@ -# InvitationOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CreatedAt** | **time.Time** | | -**Email** | **string** | | -**ExpiresAt** | **time.Time** | | -**Id** | **string** | | -**InvitedBy** | Pointer to **NullableString** | | [optional] -**OrganizationId** | **string** | | -**Role** | **string** | | -**Status** | **string** | | - -## Methods - -### NewInvitationOut - -`func NewInvitationOut(createdAt time.Time, email string, expiresAt time.Time, id string, organizationId string, role string, status string, ) *InvitationOut` - -NewInvitationOut instantiates a new InvitationOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewInvitationOutWithDefaults - -`func NewInvitationOutWithDefaults() *InvitationOut` - -NewInvitationOutWithDefaults instantiates a new InvitationOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetCreatedAt - -`func (o *InvitationOut) GetCreatedAt() time.Time` - -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. - -### GetCreatedAtOk - -`func (o *InvitationOut) GetCreatedAtOk() (*time.Time, bool)` - -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreatedAt - -`func (o *InvitationOut) SetCreatedAt(v time.Time)` - -SetCreatedAt sets CreatedAt field to given value. - - -### GetEmail - -`func (o *InvitationOut) GetEmail() string` - -GetEmail returns the Email field if non-nil, zero value otherwise. - -### GetEmailOk - -`func (o *InvitationOut) GetEmailOk() (*string, bool)` - -GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEmail - -`func (o *InvitationOut) SetEmail(v string)` - -SetEmail sets Email field to given value. - - -### GetExpiresAt - -`func (o *InvitationOut) GetExpiresAt() time.Time` - -GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. - -### GetExpiresAtOk - -`func (o *InvitationOut) GetExpiresAtOk() (*time.Time, bool)` - -GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExpiresAt - -`func (o *InvitationOut) SetExpiresAt(v time.Time)` - -SetExpiresAt sets ExpiresAt field to given value. - - -### GetId - -`func (o *InvitationOut) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *InvitationOut) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *InvitationOut) SetId(v string)` - -SetId sets Id field to given value. - - -### GetInvitedBy - -`func (o *InvitationOut) GetInvitedBy() string` - -GetInvitedBy returns the InvitedBy field if non-nil, zero value otherwise. - -### GetInvitedByOk - -`func (o *InvitationOut) GetInvitedByOk() (*string, bool)` - -GetInvitedByOk returns a tuple with the InvitedBy field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetInvitedBy - -`func (o *InvitationOut) SetInvitedBy(v string)` - -SetInvitedBy sets InvitedBy field to given value. - -### HasInvitedBy - -`func (o *InvitationOut) HasInvitedBy() bool` - -HasInvitedBy returns a boolean if a field has been set. - -### SetInvitedByNil - -`func (o *InvitationOut) SetInvitedByNil(b bool)` - - SetInvitedByNil sets the value for InvitedBy to be an explicit nil - -### UnsetInvitedBy -`func (o *InvitationOut) UnsetInvitedBy()` - -UnsetInvitedBy ensures that no value is present for InvitedBy, not even an explicit nil -### GetOrganizationId - -`func (o *InvitationOut) GetOrganizationId() string` - -GetOrganizationId returns the OrganizationId field if non-nil, zero value otherwise. - -### GetOrganizationIdOk - -`func (o *InvitationOut) GetOrganizationIdOk() (*string, bool)` - -GetOrganizationIdOk returns a tuple with the OrganizationId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOrganizationId - -`func (o *InvitationOut) SetOrganizationId(v string)` - -SetOrganizationId sets OrganizationId field to given value. - - -### GetRole - -`func (o *InvitationOut) GetRole() string` - -GetRole returns the Role field if non-nil, zero value otherwise. - -### GetRoleOk - -`func (o *InvitationOut) GetRoleOk() (*string, bool)` - -GetRoleOk returns a tuple with the Role field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRole - -`func (o *InvitationOut) SetRole(v string)` - -SetRole sets Role field to given value. - - -### GetStatus - -`func (o *InvitationOut) GetStatus() string` - -GetStatus returns the Status field if non-nil, zero value otherwise. - -### GetStatusOk - -`func (o *InvitationOut) GetStatusOk() (*string, bool)` - -GetStatusOk returns a tuple with the Status field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStatus - -`func (o *InvitationOut) SetStatus(v string)` - -SetStatus sets Status field to given value. - - - -[[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/sdk/go/docs/InviteCreateOut.md b/sdk/go/docs/InviteCreateOut.md deleted file mode 100644 index 0252572..0000000 --- a/sdk/go/docs/InviteCreateOut.md +++ /dev/null @@ -1,116 +0,0 @@ -# InviteCreateOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AlreadyMember** | Pointer to **bool** | | [optional] [default to false] -**EmailDelivered** | Pointer to **bool** | | [optional] [default to true] -**Invitation** | Pointer to [**NullableInvitationOut**](InvitationOut.md) | | [optional] - -## Methods - -### NewInviteCreateOut - -`func NewInviteCreateOut() *InviteCreateOut` - -NewInviteCreateOut instantiates a new InviteCreateOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewInviteCreateOutWithDefaults - -`func NewInviteCreateOutWithDefaults() *InviteCreateOut` - -NewInviteCreateOutWithDefaults instantiates a new InviteCreateOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetAlreadyMember - -`func (o *InviteCreateOut) GetAlreadyMember() bool` - -GetAlreadyMember returns the AlreadyMember field if non-nil, zero value otherwise. - -### GetAlreadyMemberOk - -`func (o *InviteCreateOut) GetAlreadyMemberOk() (*bool, bool)` - -GetAlreadyMemberOk returns a tuple with the AlreadyMember field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAlreadyMember - -`func (o *InviteCreateOut) SetAlreadyMember(v bool)` - -SetAlreadyMember sets AlreadyMember field to given value. - -### HasAlreadyMember - -`func (o *InviteCreateOut) HasAlreadyMember() bool` - -HasAlreadyMember returns a boolean if a field has been set. - -### GetEmailDelivered - -`func (o *InviteCreateOut) GetEmailDelivered() bool` - -GetEmailDelivered returns the EmailDelivered field if non-nil, zero value otherwise. - -### GetEmailDeliveredOk - -`func (o *InviteCreateOut) GetEmailDeliveredOk() (*bool, bool)` - -GetEmailDeliveredOk returns a tuple with the EmailDelivered field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEmailDelivered - -`func (o *InviteCreateOut) SetEmailDelivered(v bool)` - -SetEmailDelivered sets EmailDelivered field to given value. - -### HasEmailDelivered - -`func (o *InviteCreateOut) HasEmailDelivered() bool` - -HasEmailDelivered returns a boolean if a field has been set. - -### GetInvitation - -`func (o *InviteCreateOut) GetInvitation() InvitationOut` - -GetInvitation returns the Invitation field if non-nil, zero value otherwise. - -### GetInvitationOk - -`func (o *InviteCreateOut) GetInvitationOk() (*InvitationOut, bool)` - -GetInvitationOk returns a tuple with the Invitation field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetInvitation - -`func (o *InviteCreateOut) SetInvitation(v InvitationOut)` - -SetInvitation sets Invitation field to given value. - -### HasInvitation - -`func (o *InviteCreateOut) HasInvitation() bool` - -HasInvitation returns a boolean if a field has been set. - -### SetInvitationNil - -`func (o *InviteCreateOut) SetInvitationNil(b bool)` - - SetInvitationNil sets the value for Invitation to be an explicit nil - -### UnsetInvitation -`func (o *InviteCreateOut) UnsetInvitation()` - -UnsetInvitation ensures that no value is present for Invitation, not even an explicit nil - -[[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/sdk/go/docs/JwkOut.md b/sdk/go/docs/JwkOut.md deleted file mode 100644 index 90a2086..0000000 --- a/sdk/go/docs/JwkOut.md +++ /dev/null @@ -1,154 +0,0 @@ -# JwkOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Alg** | **string** | | -**E** | **string** | | -**Kid** | **string** | | -**Kty** | **string** | | -**N** | **string** | | -**Use** | **string** | | - -## Methods - -### NewJwkOut - -`func NewJwkOut(alg string, e string, kid string, kty string, n string, use string, ) *JwkOut` - -NewJwkOut instantiates a new JwkOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewJwkOutWithDefaults - -`func NewJwkOutWithDefaults() *JwkOut` - -NewJwkOutWithDefaults instantiates a new JwkOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetAlg - -`func (o *JwkOut) GetAlg() string` - -GetAlg returns the Alg field if non-nil, zero value otherwise. - -### GetAlgOk - -`func (o *JwkOut) GetAlgOk() (*string, bool)` - -GetAlgOk returns a tuple with the Alg field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAlg - -`func (o *JwkOut) SetAlg(v string)` - -SetAlg sets Alg field to given value. - - -### GetE - -`func (o *JwkOut) GetE() string` - -GetE returns the E field if non-nil, zero value otherwise. - -### GetEOk - -`func (o *JwkOut) GetEOk() (*string, bool)` - -GetEOk returns a tuple with the E field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetE - -`func (o *JwkOut) SetE(v string)` - -SetE sets E field to given value. - - -### GetKid - -`func (o *JwkOut) GetKid() string` - -GetKid returns the Kid field if non-nil, zero value otherwise. - -### GetKidOk - -`func (o *JwkOut) GetKidOk() (*string, bool)` - -GetKidOk returns a tuple with the Kid field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetKid - -`func (o *JwkOut) SetKid(v string)` - -SetKid sets Kid field to given value. - - -### GetKty - -`func (o *JwkOut) GetKty() string` - -GetKty returns the Kty field if non-nil, zero value otherwise. - -### GetKtyOk - -`func (o *JwkOut) GetKtyOk() (*string, bool)` - -GetKtyOk returns a tuple with the Kty field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetKty - -`func (o *JwkOut) SetKty(v string)` - -SetKty sets Kty field to given value. - - -### GetN - -`func (o *JwkOut) GetN() string` - -GetN returns the N field if non-nil, zero value otherwise. - -### GetNOk - -`func (o *JwkOut) GetNOk() (*string, bool)` - -GetNOk returns a tuple with the N field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetN - -`func (o *JwkOut) SetN(v string)` - -SetN sets N field to given value. - - -### GetUse - -`func (o *JwkOut) GetUse() string` - -GetUse returns the Use field if non-nil, zero value otherwise. - -### GetUseOk - -`func (o *JwkOut) GetUseOk() (*string, bool)` - -GetUseOk returns a tuple with the Use field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUse - -`func (o *JwkOut) SetUse(v string)` - -SetUse sets Use field to given value. - - - -[[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/sdk/go/docs/JwksOut.md b/sdk/go/docs/JwksOut.md deleted file mode 100644 index c5535ac..0000000 --- a/sdk/go/docs/JwksOut.md +++ /dev/null @@ -1,49 +0,0 @@ -# JwksOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Keys** | [**[]JwkOut**](JwkOut.md) | | - -## Methods - -### NewJwksOut - -`func NewJwksOut(keys []JwkOut, ) *JwksOut` - -NewJwksOut instantiates a new JwksOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewJwksOutWithDefaults - -`func NewJwksOutWithDefaults() *JwksOut` - -NewJwksOutWithDefaults instantiates a new JwksOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetKeys - -`func (o *JwksOut) GetKeys() []JwkOut` - -GetKeys returns the Keys field if non-nil, zero value otherwise. - -### GetKeysOk - -`func (o *JwksOut) GetKeysOk() (*[]JwkOut, bool)` - -GetKeysOk returns a tuple with the Keys field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetKeys - -`func (o *JwksOut) SetKeys(v []JwkOut)` - -SetKeys sets Keys field to given value. - - - -[[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/sdk/go/docs/LookupValuesIn.md b/sdk/go/docs/LookupValuesIn.md deleted file mode 100644 index 85641cb..0000000 --- a/sdk/go/docs/LookupValuesIn.md +++ /dev/null @@ -1,96 +0,0 @@ -# LookupValuesIn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Column** | **string** | | -**Dataset** | **string** | | -**Limit** | Pointer to **int32** | | [optional] [default to 50] - -## Methods - -### NewLookupValuesIn - -`func NewLookupValuesIn(column string, dataset string, ) *LookupValuesIn` - -NewLookupValuesIn instantiates a new LookupValuesIn object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewLookupValuesInWithDefaults - -`func NewLookupValuesInWithDefaults() *LookupValuesIn` - -NewLookupValuesInWithDefaults instantiates a new LookupValuesIn object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetColumn - -`func (o *LookupValuesIn) GetColumn() string` - -GetColumn returns the Column field if non-nil, zero value otherwise. - -### GetColumnOk - -`func (o *LookupValuesIn) GetColumnOk() (*string, bool)` - -GetColumnOk returns a tuple with the Column field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetColumn - -`func (o *LookupValuesIn) SetColumn(v string)` - -SetColumn sets Column field to given value. - - -### GetDataset - -`func (o *LookupValuesIn) GetDataset() string` - -GetDataset returns the Dataset field if non-nil, zero value otherwise. - -### GetDatasetOk - -`func (o *LookupValuesIn) GetDatasetOk() (*string, bool)` - -GetDatasetOk returns a tuple with the Dataset field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDataset - -`func (o *LookupValuesIn) SetDataset(v string)` - -SetDataset sets Dataset field to given value. - - -### GetLimit - -`func (o *LookupValuesIn) GetLimit() int32` - -GetLimit returns the Limit field if non-nil, zero value otherwise. - -### GetLimitOk - -`func (o *LookupValuesIn) GetLimitOk() (*int32, bool)` - -GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLimit - -`func (o *LookupValuesIn) SetLimit(v int32)` - -SetLimit sets Limit field to given value. - -### HasLimit - -`func (o *LookupValuesIn) HasLimit() bool` - -HasLimit returns a boolean if a field has been set. - - -[[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/sdk/go/docs/LookupValuesOut.md b/sdk/go/docs/LookupValuesOut.md deleted file mode 100644 index 1dc80e5..0000000 --- a/sdk/go/docs/LookupValuesOut.md +++ /dev/null @@ -1,91 +0,0 @@ -# LookupValuesOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Column** | **string** | | -**Dataset** | **string** | | -**Values** | **[]interface{}** | | - -## Methods - -### NewLookupValuesOut - -`func NewLookupValuesOut(column string, dataset string, values []interface{}, ) *LookupValuesOut` - -NewLookupValuesOut instantiates a new LookupValuesOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewLookupValuesOutWithDefaults - -`func NewLookupValuesOutWithDefaults() *LookupValuesOut` - -NewLookupValuesOutWithDefaults instantiates a new LookupValuesOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetColumn - -`func (o *LookupValuesOut) GetColumn() string` - -GetColumn returns the Column field if non-nil, zero value otherwise. - -### GetColumnOk - -`func (o *LookupValuesOut) GetColumnOk() (*string, bool)` - -GetColumnOk returns a tuple with the Column field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetColumn - -`func (o *LookupValuesOut) SetColumn(v string)` - -SetColumn sets Column field to given value. - - -### GetDataset - -`func (o *LookupValuesOut) GetDataset() string` - -GetDataset returns the Dataset field if non-nil, zero value otherwise. - -### GetDatasetOk - -`func (o *LookupValuesOut) GetDatasetOk() (*string, bool)` - -GetDatasetOk returns a tuple with the Dataset field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDataset - -`func (o *LookupValuesOut) SetDataset(v string)` - -SetDataset sets Dataset field to given value. - - -### GetValues - -`func (o *LookupValuesOut) GetValues() []interface{}` - -GetValues returns the Values field if non-nil, zero value otherwise. - -### GetValuesOk - -`func (o *LookupValuesOut) GetValuesOk() (*[]interface{}, bool)` - -GetValuesOk returns a tuple with the Values field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetValues - -`func (o *LookupValuesOut) SetValues(v []interface{})` - -SetValues sets Values field to given value. - - - -[[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/sdk/go/docs/McpOauthAPI.md b/sdk/go/docs/McpOauthAPI.md deleted file mode 100644 index 4ef650d..0000000 --- a/sdk/go/docs/McpOauthAPI.md +++ /dev/null @@ -1,131 +0,0 @@ -# \McpOauthAPI - -All URIs are relative to *https://api.agentdrive.run* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**Oauth2RegisterOauth2RegisterPost**](McpOauthAPI.md#Oauth2RegisterOauth2RegisterPost) | **Post** /oauth2/register | Dynamic Client Registration (RFC 7591) -[**Oauth2RevokeOauth2RevokePost**](McpOauthAPI.md#Oauth2RevokeOauth2RevokePost) | **Post** /oauth2/revoke | Token revocation (RFC 7009) - - - -## Oauth2RegisterOauth2RegisterPost - -> ClientRegistrationOut Oauth2RegisterOauth2RegisterPost(ctx).Execute() - -Dynamic Client Registration (RFC 7591) - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.McpOauthAPI.Oauth2RegisterOauth2RegisterPost(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `McpOauthAPI.Oauth2RegisterOauth2RegisterPost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `Oauth2RegisterOauth2RegisterPost`: ClientRegistrationOut - fmt.Fprintf(os.Stdout, "Response from `McpOauthAPI.Oauth2RegisterOauth2RegisterPost`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiOauth2RegisterOauth2RegisterPostRequest struct via the builder pattern - - -### Return type - -[**ClientRegistrationOut**](ClientRegistrationOut.md) - -### Authorization - -No authorization required - -### 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) - - -## Oauth2RevokeOauth2RevokePost - -> map[string]interface{} Oauth2RevokeOauth2RevokePost(ctx).Execute() - -Token revocation (RFC 7009) - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.McpOauthAPI.Oauth2RevokeOauth2RevokePost(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `McpOauthAPI.Oauth2RevokeOauth2RevokePost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `Oauth2RevokeOauth2RevokePost`: map[string]interface{} - fmt.Fprintf(os.Stdout, "Response from `McpOauthAPI.Oauth2RevokeOauth2RevokePost`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiOauth2RevokeOauth2RevokePostRequest struct via the builder pattern - - -### Return type - -**map[string]interface{}** - -### Authorization - -No authorization required - -### 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) diff --git a/sdk/go/docs/McpOauthUiAPI.md b/sdk/go/docs/McpOauthUiAPI.md deleted file mode 100644 index 9a52360..0000000 --- a/sdk/go/docs/McpOauthUiAPI.md +++ /dev/null @@ -1,130 +0,0 @@ -# \McpOauthUiAPI - -All URIs are relative to *https://api.agentdrive.run* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AuthorizeDecisionOauth2AuthorizePost**](McpOauthUiAPI.md#AuthorizeDecisionOauth2AuthorizePost) | **Post** /oauth2/authorize | Authorize Decision -[**AuthorizePageOauth2AuthorizeGet**](McpOauthUiAPI.md#AuthorizePageOauth2AuthorizeGet) | **Get** /oauth2/authorize | Authorize Page - - - -## AuthorizeDecisionOauth2AuthorizePost - -> AuthorizeDecisionOauth2AuthorizePost(ctx).Csrf(csrf).Execute() - -Authorize Decision - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - csrf := "csrf_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - r, err := apiClient.McpOauthUiAPI.AuthorizeDecisionOauth2AuthorizePost(context.Background()).Csrf(csrf).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `McpOauthUiAPI.AuthorizeDecisionOauth2AuthorizePost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiAuthorizeDecisionOauth2AuthorizePostRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **csrf** | **string** | | - -### Return type - - (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **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) - - -## AuthorizePageOauth2AuthorizeGet - -> string AuthorizePageOauth2AuthorizeGet(ctx).Execute() - -Authorize Page - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.McpOauthUiAPI.AuthorizePageOauth2AuthorizeGet(context.Background()).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `McpOauthUiAPI.AuthorizePageOauth2AuthorizeGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `AuthorizePageOauth2AuthorizeGet`: string - fmt.Fprintf(os.Stdout, "Response from `McpOauthUiAPI.AuthorizePageOauth2AuthorizeGet`: %v\n", resp) -} -``` - -### Path Parameters - -This endpoint does not need any parameter. - -### Other Parameters - -Other parameters are passed through a pointer to a apiAuthorizePageOauth2AuthorizeGetRequest struct via the builder pattern - - -### Return type - -**string** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: text/html, 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) diff --git a/sdk/go/docs/MemberInviteIn.md b/sdk/go/docs/MemberInviteIn.md deleted file mode 100644 index a3e9950..0000000 --- a/sdk/go/docs/MemberInviteIn.md +++ /dev/null @@ -1,75 +0,0 @@ -# MemberInviteIn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Email** | **string** | | -**Role** | Pointer to **string** | | [optional] [default to "member"] - -## Methods - -### NewMemberInviteIn - -`func NewMemberInviteIn(email string, ) *MemberInviteIn` - -NewMemberInviteIn instantiates a new MemberInviteIn object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewMemberInviteInWithDefaults - -`func NewMemberInviteInWithDefaults() *MemberInviteIn` - -NewMemberInviteInWithDefaults instantiates a new MemberInviteIn object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetEmail - -`func (o *MemberInviteIn) GetEmail() string` - -GetEmail returns the Email field if non-nil, zero value otherwise. - -### GetEmailOk - -`func (o *MemberInviteIn) GetEmailOk() (*string, bool)` - -GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEmail - -`func (o *MemberInviteIn) SetEmail(v string)` - -SetEmail sets Email field to given value. - - -### GetRole - -`func (o *MemberInviteIn) GetRole() string` - -GetRole returns the Role field if non-nil, zero value otherwise. - -### GetRoleOk - -`func (o *MemberInviteIn) GetRoleOk() (*string, bool)` - -GetRoleOk returns a tuple with the Role field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRole - -`func (o *MemberInviteIn) SetRole(v string)` - -SetRole sets Role field to given value. - -### HasRole - -`func (o *MemberInviteIn) HasRole() bool` - -HasRole returns a boolean if a field has been set. - - -[[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/sdk/go/docs/MemberList.md b/sdk/go/docs/MemberList.md deleted file mode 100644 index f748e36..0000000 --- a/sdk/go/docs/MemberList.md +++ /dev/null @@ -1,85 +0,0 @@ -# MemberList - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Items** | [**[]MemberOut**](MemberOut.md) | | -**NextCursor** | Pointer to **NullableString** | | [optional] - -## Methods - -### NewMemberList - -`func NewMemberList(items []MemberOut, ) *MemberList` - -NewMemberList instantiates a new MemberList object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewMemberListWithDefaults - -`func NewMemberListWithDefaults() *MemberList` - -NewMemberListWithDefaults instantiates a new MemberList object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetItems - -`func (o *MemberList) GetItems() []MemberOut` - -GetItems returns the Items field if non-nil, zero value otherwise. - -### GetItemsOk - -`func (o *MemberList) GetItemsOk() (*[]MemberOut, bool)` - -GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetItems - -`func (o *MemberList) SetItems(v []MemberOut)` - -SetItems sets Items field to given value. - - -### GetNextCursor - -`func (o *MemberList) GetNextCursor() string` - -GetNextCursor returns the NextCursor field if non-nil, zero value otherwise. - -### GetNextCursorOk - -`func (o *MemberList) GetNextCursorOk() (*string, bool)` - -GetNextCursorOk returns a tuple with the NextCursor field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNextCursor - -`func (o *MemberList) SetNextCursor(v string)` - -SetNextCursor sets NextCursor field to given value. - -### HasNextCursor - -`func (o *MemberList) HasNextCursor() bool` - -HasNextCursor returns a boolean if a field has been set. - -### SetNextCursorNil - -`func (o *MemberList) SetNextCursorNil(b bool)` - - SetNextCursorNil sets the value for NextCursor to be an explicit nil - -### UnsetNextCursor -`func (o *MemberList) UnsetNextCursor()` - -UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil - -[[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/sdk/go/docs/MemberOut.md b/sdk/go/docs/MemberOut.md deleted file mode 100644 index 1778757..0000000 --- a/sdk/go/docs/MemberOut.md +++ /dev/null @@ -1,184 +0,0 @@ -# MemberOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CreatedAt** | **time.Time** | | -**Email** | **string** | | -**FirstName** | Pointer to **NullableString** | | [optional] -**LastName** | Pointer to **NullableString** | | [optional] -**Role** | **string** | | -**UserId** | **string** | | - -## Methods - -### NewMemberOut - -`func NewMemberOut(createdAt time.Time, email string, role string, userId string, ) *MemberOut` - -NewMemberOut instantiates a new MemberOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewMemberOutWithDefaults - -`func NewMemberOutWithDefaults() *MemberOut` - -NewMemberOutWithDefaults instantiates a new MemberOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetCreatedAt - -`func (o *MemberOut) GetCreatedAt() time.Time` - -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. - -### GetCreatedAtOk - -`func (o *MemberOut) GetCreatedAtOk() (*time.Time, bool)` - -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreatedAt - -`func (o *MemberOut) SetCreatedAt(v time.Time)` - -SetCreatedAt sets CreatedAt field to given value. - - -### GetEmail - -`func (o *MemberOut) GetEmail() string` - -GetEmail returns the Email field if non-nil, zero value otherwise. - -### GetEmailOk - -`func (o *MemberOut) GetEmailOk() (*string, bool)` - -GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEmail - -`func (o *MemberOut) SetEmail(v string)` - -SetEmail sets Email field to given value. - - -### GetFirstName - -`func (o *MemberOut) GetFirstName() string` - -GetFirstName returns the FirstName field if non-nil, zero value otherwise. - -### GetFirstNameOk - -`func (o *MemberOut) GetFirstNameOk() (*string, bool)` - -GetFirstNameOk returns a tuple with the FirstName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFirstName - -`func (o *MemberOut) SetFirstName(v string)` - -SetFirstName sets FirstName field to given value. - -### HasFirstName - -`func (o *MemberOut) HasFirstName() bool` - -HasFirstName returns a boolean if a field has been set. - -### SetFirstNameNil - -`func (o *MemberOut) SetFirstNameNil(b bool)` - - SetFirstNameNil sets the value for FirstName to be an explicit nil - -### UnsetFirstName -`func (o *MemberOut) UnsetFirstName()` - -UnsetFirstName ensures that no value is present for FirstName, not even an explicit nil -### GetLastName - -`func (o *MemberOut) GetLastName() string` - -GetLastName returns the LastName field if non-nil, zero value otherwise. - -### GetLastNameOk - -`func (o *MemberOut) GetLastNameOk() (*string, bool)` - -GetLastNameOk returns a tuple with the LastName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLastName - -`func (o *MemberOut) SetLastName(v string)` - -SetLastName sets LastName field to given value. - -### HasLastName - -`func (o *MemberOut) HasLastName() bool` - -HasLastName returns a boolean if a field has been set. - -### SetLastNameNil - -`func (o *MemberOut) SetLastNameNil(b bool)` - - SetLastNameNil sets the value for LastName to be an explicit nil - -### UnsetLastName -`func (o *MemberOut) UnsetLastName()` - -UnsetLastName ensures that no value is present for LastName, not even an explicit nil -### GetRole - -`func (o *MemberOut) GetRole() string` - -GetRole returns the Role field if non-nil, zero value otherwise. - -### GetRoleOk - -`func (o *MemberOut) GetRoleOk() (*string, bool)` - -GetRoleOk returns a tuple with the Role field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRole - -`func (o *MemberOut) SetRole(v string)` - -SetRole sets Role field to given value. - - -### GetUserId - -`func (o *MemberOut) GetUserId() string` - -GetUserId returns the UserId field if non-nil, zero value otherwise. - -### GetUserIdOk - -`func (o *MemberOut) GetUserIdOk() (*string, bool)` - -GetUserIdOk returns a tuple with the UserId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUserId - -`func (o *MemberOut) SetUserId(v string)` - -SetUserId sets UserId field to given value. - - - -[[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/sdk/go/docs/MemberRemoveOut.md b/sdk/go/docs/MemberRemoveOut.md deleted file mode 100644 index 43a5230..0000000 --- a/sdk/go/docs/MemberRemoveOut.md +++ /dev/null @@ -1,96 +0,0 @@ -# MemberRemoveOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | | -**Ok** | Pointer to **bool** | | [optional] [default to true] -**OrganizationId** | **string** | | - -## Methods - -### NewMemberRemoveOut - -`func NewMemberRemoveOut(id string, organizationId string, ) *MemberRemoveOut` - -NewMemberRemoveOut instantiates a new MemberRemoveOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewMemberRemoveOutWithDefaults - -`func NewMemberRemoveOutWithDefaults() *MemberRemoveOut` - -NewMemberRemoveOutWithDefaults instantiates a new MemberRemoveOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetId - -`func (o *MemberRemoveOut) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *MemberRemoveOut) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *MemberRemoveOut) SetId(v string)` - -SetId sets Id field to given value. - - -### GetOk - -`func (o *MemberRemoveOut) GetOk() bool` - -GetOk returns the Ok field if non-nil, zero value otherwise. - -### GetOkOk - -`func (o *MemberRemoveOut) GetOkOk() (*bool, bool)` - -GetOkOk returns a tuple with the Ok field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOk - -`func (o *MemberRemoveOut) SetOk(v bool)` - -SetOk sets Ok field to given value. - -### HasOk - -`func (o *MemberRemoveOut) HasOk() bool` - -HasOk returns a boolean if a field has been set. - -### GetOrganizationId - -`func (o *MemberRemoveOut) GetOrganizationId() string` - -GetOrganizationId returns the OrganizationId field if non-nil, zero value otherwise. - -### GetOrganizationIdOk - -`func (o *MemberRemoveOut) GetOrganizationIdOk() (*string, bool)` - -GetOrganizationIdOk returns a tuple with the OrganizationId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOrganizationId - -`func (o *MemberRemoveOut) SetOrganizationId(v string)` - -SetOrganizationId sets OrganizationId field to given value. - - - -[[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/sdk/go/docs/MemberRoleIn.md b/sdk/go/docs/MemberRoleIn.md deleted file mode 100644 index cc8de5f..0000000 --- a/sdk/go/docs/MemberRoleIn.md +++ /dev/null @@ -1,49 +0,0 @@ -# MemberRoleIn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Role** | **string** | | - -## Methods - -### NewMemberRoleIn - -`func NewMemberRoleIn(role string, ) *MemberRoleIn` - -NewMemberRoleIn instantiates a new MemberRoleIn object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewMemberRoleInWithDefaults - -`func NewMemberRoleInWithDefaults() *MemberRoleIn` - -NewMemberRoleInWithDefaults instantiates a new MemberRoleIn object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetRole - -`func (o *MemberRoleIn) GetRole() string` - -GetRole returns the Role field if non-nil, zero value otherwise. - -### GetRoleOk - -`func (o *MemberRoleIn) GetRoleOk() (*string, bool)` - -GetRoleOk returns a tuple with the Role field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRole - -`func (o *MemberRoleIn) SetRole(v string)` - -SetRole sets Role field to given value. - - - -[[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/sdk/go/docs/MembersAPI.md b/sdk/go/docs/MembersAPI.md deleted file mode 100644 index ff28da8..0000000 --- a/sdk/go/docs/MembersAPI.md +++ /dev/null @@ -1,429 +0,0 @@ -# \MembersAPI - -All URIs are relative to *https://api.agentdrive.run* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**InviteMemberV0MembersInvitePost**](MembersAPI.md#InviteMemberV0MembersInvitePost) | **Post** /v0/members/invite | Invite a person to your workspace by email -[**ListInvitationsV0InvitationsGet**](MembersAPI.md#ListInvitationsV0InvitationsGet) | **Get** /v0/invitations | List pending invitations -[**ListMembersV0MembersGet**](MembersAPI.md#ListMembersV0MembersGet) | **Get** /v0/members | List the members of your active workspace -[**RemoveMemberV0MembersTargetUserIdDelete**](MembersAPI.md#RemoveMemberV0MembersTargetUserIdDelete) | **Delete** /v0/members/{target_user_id} | Remove a member (or leave) -[**RevokeInvitationV0InvitationsInvitationIdDelete**](MembersAPI.md#RevokeInvitationV0InvitationsInvitationIdDelete) | **Delete** /v0/invitations/{invitation_id} | Revoke a pending invitation -[**SetMemberRoleV0MembersTargetUserIdPatch**](MembersAPI.md#SetMemberRoleV0MembersTargetUserIdPatch) | **Patch** /v0/members/{target_user_id} | Change a member's role - - - -## InviteMemberV0MembersInvitePost - -> InviteCreateOut InviteMemberV0MembersInvitePost(ctx).MemberInviteIn(memberInviteIn).Execute() - -Invite a person to your workspace by email - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - memberInviteIn := *openapiclient.NewMemberInviteIn("Email_example") // MemberInviteIn | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MembersAPI.InviteMemberV0MembersInvitePost(context.Background()).MemberInviteIn(memberInviteIn).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MembersAPI.InviteMemberV0MembersInvitePost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `InviteMemberV0MembersInvitePost`: InviteCreateOut - fmt.Fprintf(os.Stdout, "Response from `MembersAPI.InviteMemberV0MembersInvitePost`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiInviteMemberV0MembersInvitePostRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **memberInviteIn** | [**MemberInviteIn**](MemberInviteIn.md) | | - -### Return type - -[**InviteCreateOut**](InviteCreateOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **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) - - -## ListInvitationsV0InvitationsGet - -> InvitationList ListInvitationsV0InvitationsGet(ctx).Cursor(cursor).Limit(limit).Execute() - -List pending invitations - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - cursor := "cursor_example" // string | (optional) - limit := int32(56) // int32 | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MembersAPI.ListInvitationsV0InvitationsGet(context.Background()).Cursor(cursor).Limit(limit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MembersAPI.ListInvitationsV0InvitationsGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListInvitationsV0InvitationsGet`: InvitationList - fmt.Fprintf(os.Stdout, "Response from `MembersAPI.ListInvitationsV0InvitationsGet`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiListInvitationsV0InvitationsGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **cursor** | **string** | | - **limit** | **int32** | | - -### Return type - -[**InvitationList**](InvitationList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## ListMembersV0MembersGet - -> MemberList ListMembersV0MembersGet(ctx).Cursor(cursor).Limit(limit).Execute() - -List the members of your active workspace - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - cursor := "cursor_example" // string | (optional) - limit := int32(56) // int32 | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MembersAPI.ListMembersV0MembersGet(context.Background()).Cursor(cursor).Limit(limit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MembersAPI.ListMembersV0MembersGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListMembersV0MembersGet`: MemberList - fmt.Fprintf(os.Stdout, "Response from `MembersAPI.ListMembersV0MembersGet`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiListMembersV0MembersGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **cursor** | **string** | | - **limit** | **int32** | | - -### Return type - -[**MemberList**](MemberList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## RemoveMemberV0MembersTargetUserIdDelete - -> MemberRemoveOut RemoveMemberV0MembersTargetUserIdDelete(ctx, targetUserId).Confirm(confirm).Execute() - -Remove a member (or leave) - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - targetUserId := "targetUserId_example" // string | - confirm := "confirm_example" // string | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MembersAPI.RemoveMemberV0MembersTargetUserIdDelete(context.Background(), targetUserId).Confirm(confirm).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MembersAPI.RemoveMemberV0MembersTargetUserIdDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RemoveMemberV0MembersTargetUserIdDelete`: MemberRemoveOut - fmt.Fprintf(os.Stdout, "Response from `MembersAPI.RemoveMemberV0MembersTargetUserIdDelete`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**targetUserId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiRemoveMemberV0MembersTargetUserIdDeleteRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **confirm** | **string** | | - -### Return type - -[**MemberRemoveOut**](MemberRemoveOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## RevokeInvitationV0InvitationsInvitationIdDelete - -> RevokeOut RevokeInvitationV0InvitationsInvitationIdDelete(ctx, invitationId).Execute() - -Revoke a pending invitation - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - invitationId := "invitationId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MembersAPI.RevokeInvitationV0InvitationsInvitationIdDelete(context.Background(), invitationId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MembersAPI.RevokeInvitationV0InvitationsInvitationIdDelete``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RevokeInvitationV0InvitationsInvitationIdDelete`: RevokeOut - fmt.Fprintf(os.Stdout, "Response from `MembersAPI.RevokeInvitationV0InvitationsInvitationIdDelete`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**invitationId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiRevokeInvitationV0InvitationsInvitationIdDeleteRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**RevokeOut**](RevokeOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## SetMemberRoleV0MembersTargetUserIdPatch - -> MemberOut SetMemberRoleV0MembersTargetUserIdPatch(ctx, targetUserId).MemberRoleIn(memberRoleIn).Execute() - -Change a member's role - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - targetUserId := "targetUserId_example" // string | - memberRoleIn := *openapiclient.NewMemberRoleIn("Role_example") // MemberRoleIn | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.MembersAPI.SetMemberRoleV0MembersTargetUserIdPatch(context.Background(), targetUserId).MemberRoleIn(memberRoleIn).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `MembersAPI.SetMemberRoleV0MembersTargetUserIdPatch``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `SetMemberRoleV0MembersTargetUserIdPatch`: MemberOut - fmt.Fprintf(os.Stdout, "Response from `MembersAPI.SetMemberRoleV0MembersTargetUserIdPatch`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**targetUserId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiSetMemberRoleV0MembersTargetUserIdPatchRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **memberRoleIn** | [**MemberRoleIn**](MemberRoleIn.md) | | - -### Return type - -[**MemberOut**](MemberOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **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) diff --git a/sdk/go/docs/OAuthProtocolErrorOut.md b/sdk/go/docs/OAuthProtocolErrorOut.md deleted file mode 100644 index c6f8607..0000000 --- a/sdk/go/docs/OAuthProtocolErrorOut.md +++ /dev/null @@ -1,85 +0,0 @@ -# OAuthProtocolErrorOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Error** | **string** | | -**ErrorDescription** | Pointer to **NullableString** | | [optional] - -## Methods - -### NewOAuthProtocolErrorOut - -`func NewOAuthProtocolErrorOut(error_ string, ) *OAuthProtocolErrorOut` - -NewOAuthProtocolErrorOut instantiates a new OAuthProtocolErrorOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewOAuthProtocolErrorOutWithDefaults - -`func NewOAuthProtocolErrorOutWithDefaults() *OAuthProtocolErrorOut` - -NewOAuthProtocolErrorOutWithDefaults instantiates a new OAuthProtocolErrorOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetError - -`func (o *OAuthProtocolErrorOut) GetError() string` - -GetError returns the Error field if non-nil, zero value otherwise. - -### GetErrorOk - -`func (o *OAuthProtocolErrorOut) GetErrorOk() (*string, bool)` - -GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetError - -`func (o *OAuthProtocolErrorOut) SetError(v string)` - -SetError sets Error field to given value. - - -### GetErrorDescription - -`func (o *OAuthProtocolErrorOut) GetErrorDescription() string` - -GetErrorDescription returns the ErrorDescription field if non-nil, zero value otherwise. - -### GetErrorDescriptionOk - -`func (o *OAuthProtocolErrorOut) GetErrorDescriptionOk() (*string, bool)` - -GetErrorDescriptionOk returns a tuple with the ErrorDescription field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetErrorDescription - -`func (o *OAuthProtocolErrorOut) SetErrorDescription(v string)` - -SetErrorDescription sets ErrorDescription field to given value. - -### HasErrorDescription - -`func (o *OAuthProtocolErrorOut) HasErrorDescription() bool` - -HasErrorDescription returns a boolean if a field has been set. - -### SetErrorDescriptionNil - -`func (o *OAuthProtocolErrorOut) SetErrorDescriptionNil(b bool)` - - SetErrorDescriptionNil sets the value for ErrorDescription to be an explicit nil - -### UnsetErrorDescription -`func (o *OAuthProtocolErrorOut) UnsetErrorDescription()` - -UnsetErrorDescription ensures that no value is present for ErrorDescription, not even an explicit nil - -[[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/sdk/go/docs/OperationUsageOut.md b/sdk/go/docs/OperationUsageOut.md deleted file mode 100644 index 3396b5a..0000000 --- a/sdk/go/docs/OperationUsageOut.md +++ /dev/null @@ -1,70 +0,0 @@ -# OperationUsageOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Reads** | **int32** | | -**Writes** | **int32** | | - -## Methods - -### NewOperationUsageOut - -`func NewOperationUsageOut(reads int32, writes int32, ) *OperationUsageOut` - -NewOperationUsageOut instantiates a new OperationUsageOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewOperationUsageOutWithDefaults - -`func NewOperationUsageOutWithDefaults() *OperationUsageOut` - -NewOperationUsageOutWithDefaults instantiates a new OperationUsageOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetReads - -`func (o *OperationUsageOut) GetReads() int32` - -GetReads returns the Reads field if non-nil, zero value otherwise. - -### GetReadsOk - -`func (o *OperationUsageOut) GetReadsOk() (*int32, bool)` - -GetReadsOk returns a tuple with the Reads field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetReads - -`func (o *OperationUsageOut) SetReads(v int32)` - -SetReads sets Reads field to given value. - - -### GetWrites - -`func (o *OperationUsageOut) GetWrites() int32` - -GetWrites returns the Writes field if non-nil, zero value otherwise. - -### GetWritesOk - -`func (o *OperationUsageOut) GetWritesOk() (*int32, bool)` - -GetWritesOk returns a tuple with the Writes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetWrites - -`func (o *OperationUsageOut) SetWrites(v int32)` - -SetWrites sets Writes field to given value. - - - -[[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/sdk/go/docs/Page.md b/sdk/go/docs/Page.md deleted file mode 100644 index 4e1301a..0000000 --- a/sdk/go/docs/Page.md +++ /dev/null @@ -1,85 +0,0 @@ -# Page - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Items** | [**[]ArtifactOut**](ArtifactOut.md) | | -**NextCursor** | Pointer to **NullableString** | | [optional] - -## Methods - -### NewPage - -`func NewPage(items []ArtifactOut, ) *Page` - -NewPage instantiates a new Page object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewPageWithDefaults - -`func NewPageWithDefaults() *Page` - -NewPageWithDefaults instantiates a new Page object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetItems - -`func (o *Page) GetItems() []ArtifactOut` - -GetItems returns the Items field if non-nil, zero value otherwise. - -### GetItemsOk - -`func (o *Page) GetItemsOk() (*[]ArtifactOut, bool)` - -GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetItems - -`func (o *Page) SetItems(v []ArtifactOut)` - -SetItems sets Items field to given value. - - -### GetNextCursor - -`func (o *Page) GetNextCursor() string` - -GetNextCursor returns the NextCursor field if non-nil, zero value otherwise. - -### GetNextCursorOk - -`func (o *Page) GetNextCursorOk() (*string, bool)` - -GetNextCursorOk returns a tuple with the NextCursor field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNextCursor - -`func (o *Page) SetNextCursor(v string)` - -SetNextCursor sets NextCursor field to given value. - -### HasNextCursor - -`func (o *Page) HasNextCursor() bool` - -HasNextCursor returns a boolean if a field has been set. - -### SetNextCursorNil - -`func (o *Page) SetNextCursorNil(b bool)` - - SetNextCursorNil sets the value for NextCursor to be an explicit nil - -### UnsetNextCursor -`func (o *Page) UnsetNextCursor()` - -UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil - -[[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/sdk/go/docs/ProjectConfigIn.md b/sdk/go/docs/ProjectConfigIn.md deleted file mode 100644 index b44cf5a..0000000 --- a/sdk/go/docs/ProjectConfigIn.md +++ /dev/null @@ -1,111 +0,0 @@ -# ProjectConfigIn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AutoCompile** | Pointer to **bool** | | [optional] [default to false] -**Engine** | Pointer to **NullableString** | | [optional] -**Entrypoint** | **string** | | - -## Methods - -### NewProjectConfigIn - -`func NewProjectConfigIn(entrypoint string, ) *ProjectConfigIn` - -NewProjectConfigIn instantiates a new ProjectConfigIn object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewProjectConfigInWithDefaults - -`func NewProjectConfigInWithDefaults() *ProjectConfigIn` - -NewProjectConfigInWithDefaults instantiates a new ProjectConfigIn object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetAutoCompile - -`func (o *ProjectConfigIn) GetAutoCompile() bool` - -GetAutoCompile returns the AutoCompile field if non-nil, zero value otherwise. - -### GetAutoCompileOk - -`func (o *ProjectConfigIn) GetAutoCompileOk() (*bool, bool)` - -GetAutoCompileOk returns a tuple with the AutoCompile field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAutoCompile - -`func (o *ProjectConfigIn) SetAutoCompile(v bool)` - -SetAutoCompile sets AutoCompile field to given value. - -### HasAutoCompile - -`func (o *ProjectConfigIn) HasAutoCompile() bool` - -HasAutoCompile returns a boolean if a field has been set. - -### GetEngine - -`func (o *ProjectConfigIn) GetEngine() string` - -GetEngine returns the Engine field if non-nil, zero value otherwise. - -### GetEngineOk - -`func (o *ProjectConfigIn) GetEngineOk() (*string, bool)` - -GetEngineOk returns a tuple with the Engine field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEngine - -`func (o *ProjectConfigIn) SetEngine(v string)` - -SetEngine sets Engine field to given value. - -### HasEngine - -`func (o *ProjectConfigIn) HasEngine() bool` - -HasEngine returns a boolean if a field has been set. - -### SetEngineNil - -`func (o *ProjectConfigIn) SetEngineNil(b bool)` - - SetEngineNil sets the value for Engine to be an explicit nil - -### UnsetEngine -`func (o *ProjectConfigIn) UnsetEngine()` - -UnsetEngine ensures that no value is present for Engine, not even an explicit nil -### GetEntrypoint - -`func (o *ProjectConfigIn) GetEntrypoint() string` - -GetEntrypoint returns the Entrypoint field if non-nil, zero value otherwise. - -### GetEntrypointOk - -`func (o *ProjectConfigIn) GetEntrypointOk() (*string, bool)` - -GetEntrypointOk returns a tuple with the Entrypoint field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEntrypoint - -`func (o *ProjectConfigIn) SetEntrypoint(v string)` - -SetEntrypoint sets Entrypoint field to given value. - - - -[[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/sdk/go/docs/ProtectedResourceMetadataOut.md b/sdk/go/docs/ProtectedResourceMetadataOut.md deleted file mode 100644 index 91d7802..0000000 --- a/sdk/go/docs/ProtectedResourceMetadataOut.md +++ /dev/null @@ -1,112 +0,0 @@ -# ProtectedResourceMetadataOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AuthorizationServers** | **[]string** | | -**BearerMethodsSupported** | **[]string** | | -**Resource** | **string** | | -**ScopesSupported** | **[]string** | | - -## Methods - -### NewProtectedResourceMetadataOut - -`func NewProtectedResourceMetadataOut(authorizationServers []string, bearerMethodsSupported []string, resource string, scopesSupported []string, ) *ProtectedResourceMetadataOut` - -NewProtectedResourceMetadataOut instantiates a new ProtectedResourceMetadataOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewProtectedResourceMetadataOutWithDefaults - -`func NewProtectedResourceMetadataOutWithDefaults() *ProtectedResourceMetadataOut` - -NewProtectedResourceMetadataOutWithDefaults instantiates a new ProtectedResourceMetadataOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetAuthorizationServers - -`func (o *ProtectedResourceMetadataOut) GetAuthorizationServers() []string` - -GetAuthorizationServers returns the AuthorizationServers field if non-nil, zero value otherwise. - -### GetAuthorizationServersOk - -`func (o *ProtectedResourceMetadataOut) GetAuthorizationServersOk() (*[]string, bool)` - -GetAuthorizationServersOk returns a tuple with the AuthorizationServers field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAuthorizationServers - -`func (o *ProtectedResourceMetadataOut) SetAuthorizationServers(v []string)` - -SetAuthorizationServers sets AuthorizationServers field to given value. - - -### GetBearerMethodsSupported - -`func (o *ProtectedResourceMetadataOut) GetBearerMethodsSupported() []string` - -GetBearerMethodsSupported returns the BearerMethodsSupported field if non-nil, zero value otherwise. - -### GetBearerMethodsSupportedOk - -`func (o *ProtectedResourceMetadataOut) GetBearerMethodsSupportedOk() (*[]string, bool)` - -GetBearerMethodsSupportedOk returns a tuple with the BearerMethodsSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetBearerMethodsSupported - -`func (o *ProtectedResourceMetadataOut) SetBearerMethodsSupported(v []string)` - -SetBearerMethodsSupported sets BearerMethodsSupported field to given value. - - -### GetResource - -`func (o *ProtectedResourceMetadataOut) GetResource() string` - -GetResource returns the Resource field if non-nil, zero value otherwise. - -### GetResourceOk - -`func (o *ProtectedResourceMetadataOut) GetResourceOk() (*string, bool)` - -GetResourceOk returns a tuple with the Resource field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetResource - -`func (o *ProtectedResourceMetadataOut) SetResource(v string)` - -SetResource sets Resource field to given value. - - -### GetScopesSupported - -`func (o *ProtectedResourceMetadataOut) GetScopesSupported() []string` - -GetScopesSupported returns the ScopesSupported field if non-nil, zero value otherwise. - -### GetScopesSupportedOk - -`func (o *ProtectedResourceMetadataOut) GetScopesSupportedOk() (*[]string, bool)` - -GetScopesSupportedOk returns a tuple with the ScopesSupported field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetScopesSupported - -`func (o *ProtectedResourceMetadataOut) SetScopesSupported(v []string)` - -SetScopesSupported sets ScopesSupported field to given value. - - - -[[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/sdk/go/docs/QueryColumnOut.md b/sdk/go/docs/QueryColumnOut.md deleted file mode 100644 index 0af4c5c..0000000 --- a/sdk/go/docs/QueryColumnOut.md +++ /dev/null @@ -1,85 +0,0 @@ -# QueryColumnOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | -**Type** | Pointer to **NullableString** | | [optional] - -## Methods - -### NewQueryColumnOut - -`func NewQueryColumnOut(name string, ) *QueryColumnOut` - -NewQueryColumnOut instantiates a new QueryColumnOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewQueryColumnOutWithDefaults - -`func NewQueryColumnOutWithDefaults() *QueryColumnOut` - -NewQueryColumnOutWithDefaults instantiates a new QueryColumnOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetName - -`func (o *QueryColumnOut) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *QueryColumnOut) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *QueryColumnOut) SetName(v string)` - -SetName sets Name field to given value. - - -### GetType - -`func (o *QueryColumnOut) GetType() string` - -GetType returns the Type field if non-nil, zero value otherwise. - -### GetTypeOk - -`func (o *QueryColumnOut) GetTypeOk() (*string, bool)` - -GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetType - -`func (o *QueryColumnOut) SetType(v string)` - -SetType sets Type field to given value. - -### HasType - -`func (o *QueryColumnOut) HasType() bool` - -HasType returns a boolean if a field has been set. - -### SetTypeNil - -`func (o *QueryColumnOut) SetTypeNil(b bool)` - - SetTypeNil sets the value for Type to be an explicit nil - -### UnsetType -`func (o *QueryColumnOut) UnsetType()` - -UnsetType ensures that no value is present for Type, not even an explicit nil - -[[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/sdk/go/docs/QueryDryRunOut.md b/sdk/go/docs/QueryDryRunOut.md deleted file mode 100644 index 0e81ec2..0000000 --- a/sdk/go/docs/QueryDryRunOut.md +++ /dev/null @@ -1,133 +0,0 @@ -# QueryDryRunOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DryRun** | **bool** | | -**Engine** | **string** | | -**EstimatedBytesProcessed** | **int32** | | -**ResultSchema** | [**[]QueryColumnOut**](QueryColumnOut.md) | | -**Valid** | **bool** | | - -## Methods - -### NewQueryDryRunOut - -`func NewQueryDryRunOut(dryRun bool, engine string, estimatedBytesProcessed int32, resultSchema []QueryColumnOut, valid bool, ) *QueryDryRunOut` - -NewQueryDryRunOut instantiates a new QueryDryRunOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewQueryDryRunOutWithDefaults - -`func NewQueryDryRunOutWithDefaults() *QueryDryRunOut` - -NewQueryDryRunOutWithDefaults instantiates a new QueryDryRunOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetDryRun - -`func (o *QueryDryRunOut) GetDryRun() bool` - -GetDryRun returns the DryRun field if non-nil, zero value otherwise. - -### GetDryRunOk - -`func (o *QueryDryRunOut) GetDryRunOk() (*bool, bool)` - -GetDryRunOk returns a tuple with the DryRun field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDryRun - -`func (o *QueryDryRunOut) SetDryRun(v bool)` - -SetDryRun sets DryRun field to given value. - - -### GetEngine - -`func (o *QueryDryRunOut) GetEngine() string` - -GetEngine returns the Engine field if non-nil, zero value otherwise. - -### GetEngineOk - -`func (o *QueryDryRunOut) GetEngineOk() (*string, bool)` - -GetEngineOk returns a tuple with the Engine field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEngine - -`func (o *QueryDryRunOut) SetEngine(v string)` - -SetEngine sets Engine field to given value. - - -### GetEstimatedBytesProcessed - -`func (o *QueryDryRunOut) GetEstimatedBytesProcessed() int32` - -GetEstimatedBytesProcessed returns the EstimatedBytesProcessed field if non-nil, zero value otherwise. - -### GetEstimatedBytesProcessedOk - -`func (o *QueryDryRunOut) GetEstimatedBytesProcessedOk() (*int32, bool)` - -GetEstimatedBytesProcessedOk returns a tuple with the EstimatedBytesProcessed field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEstimatedBytesProcessed - -`func (o *QueryDryRunOut) SetEstimatedBytesProcessed(v int32)` - -SetEstimatedBytesProcessed sets EstimatedBytesProcessed field to given value. - - -### GetResultSchema - -`func (o *QueryDryRunOut) GetResultSchema() []QueryColumnOut` - -GetResultSchema returns the ResultSchema field if non-nil, zero value otherwise. - -### GetResultSchemaOk - -`func (o *QueryDryRunOut) GetResultSchemaOk() (*[]QueryColumnOut, bool)` - -GetResultSchemaOk returns a tuple with the ResultSchema field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetResultSchema - -`func (o *QueryDryRunOut) SetResultSchema(v []QueryColumnOut)` - -SetResultSchema sets ResultSchema field to given value. - - -### GetValid - -`func (o *QueryDryRunOut) GetValid() bool` - -GetValid returns the Valid field if non-nil, zero value otherwise. - -### GetValidOk - -`func (o *QueryDryRunOut) GetValidOk() (*bool, bool)` - -GetValidOk returns a tuple with the Valid field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetValid - -`func (o *QueryDryRunOut) SetValid(v bool)` - -SetValid sets Valid field to given value. - - - -[[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/sdk/go/docs/QueryIn.md b/sdk/go/docs/QueryIn.md deleted file mode 100644 index c883822..0000000 --- a/sdk/go/docs/QueryIn.md +++ /dev/null @@ -1,101 +0,0 @@ -# QueryIn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DryRun** | Pointer to **bool** | | [optional] [default to false] -**Inputs** | Pointer to **map[string]string** | | [optional] -**Sql** | **string** | | - -## Methods - -### NewQueryIn - -`func NewQueryIn(sql string, ) *QueryIn` - -NewQueryIn instantiates a new QueryIn object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewQueryInWithDefaults - -`func NewQueryInWithDefaults() *QueryIn` - -NewQueryInWithDefaults instantiates a new QueryIn object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetDryRun - -`func (o *QueryIn) GetDryRun() bool` - -GetDryRun returns the DryRun field if non-nil, zero value otherwise. - -### GetDryRunOk - -`func (o *QueryIn) GetDryRunOk() (*bool, bool)` - -GetDryRunOk returns a tuple with the DryRun field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDryRun - -`func (o *QueryIn) SetDryRun(v bool)` - -SetDryRun sets DryRun field to given value. - -### HasDryRun - -`func (o *QueryIn) HasDryRun() bool` - -HasDryRun returns a boolean if a field has been set. - -### GetInputs - -`func (o *QueryIn) GetInputs() map[string]string` - -GetInputs returns the Inputs field if non-nil, zero value otherwise. - -### GetInputsOk - -`func (o *QueryIn) GetInputsOk() (*map[string]string, bool)` - -GetInputsOk returns a tuple with the Inputs field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetInputs - -`func (o *QueryIn) SetInputs(v map[string]string)` - -SetInputs sets Inputs field to given value. - -### HasInputs - -`func (o *QueryIn) HasInputs() bool` - -HasInputs returns a boolean if a field has been set. - -### GetSql - -`func (o *QueryIn) GetSql() string` - -GetSql returns the Sql field if non-nil, zero value otherwise. - -### GetSqlOk - -`func (o *QueryIn) GetSqlOk() (*string, bool)` - -GetSqlOk returns a tuple with the Sql field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSql - -`func (o *QueryIn) SetSql(v string)` - -SetSql sets Sql field to given value. - - - -[[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/sdk/go/docs/QueryResultOut.md b/sdk/go/docs/QueryResultOut.md deleted file mode 100644 index fe39ce7..0000000 --- a/sdk/go/docs/QueryResultOut.md +++ /dev/null @@ -1,175 +0,0 @@ -# QueryResultOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**BytesProcessed** | **int32** | | -**CacheHit** | **bool** | | -**Engine** | **string** | | -**Preview** | **[]map[string]interface{}** | | -**ResultArtId** | **string** | | -**ResultSchema** | [**[]QueryColumnOut**](QueryColumnOut.md) | | -**RowCount** | **int32** | | - -## Methods - -### NewQueryResultOut - -`func NewQueryResultOut(bytesProcessed int32, cacheHit bool, engine string, preview []*map[string]interface{}, resultArtId string, resultSchema []QueryColumnOut, rowCount int32, ) *QueryResultOut` - -NewQueryResultOut instantiates a new QueryResultOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewQueryResultOutWithDefaults - -`func NewQueryResultOutWithDefaults() *QueryResultOut` - -NewQueryResultOutWithDefaults instantiates a new QueryResultOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetBytesProcessed - -`func (o *QueryResultOut) GetBytesProcessed() int32` - -GetBytesProcessed returns the BytesProcessed field if non-nil, zero value otherwise. - -### GetBytesProcessedOk - -`func (o *QueryResultOut) GetBytesProcessedOk() (*int32, bool)` - -GetBytesProcessedOk returns a tuple with the BytesProcessed field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetBytesProcessed - -`func (o *QueryResultOut) SetBytesProcessed(v int32)` - -SetBytesProcessed sets BytesProcessed field to given value. - - -### GetCacheHit - -`func (o *QueryResultOut) GetCacheHit() bool` - -GetCacheHit returns the CacheHit field if non-nil, zero value otherwise. - -### GetCacheHitOk - -`func (o *QueryResultOut) GetCacheHitOk() (*bool, bool)` - -GetCacheHitOk returns a tuple with the CacheHit field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCacheHit - -`func (o *QueryResultOut) SetCacheHit(v bool)` - -SetCacheHit sets CacheHit field to given value. - - -### GetEngine - -`func (o *QueryResultOut) GetEngine() string` - -GetEngine returns the Engine field if non-nil, zero value otherwise. - -### GetEngineOk - -`func (o *QueryResultOut) GetEngineOk() (*string, bool)` - -GetEngineOk returns a tuple with the Engine field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEngine - -`func (o *QueryResultOut) SetEngine(v string)` - -SetEngine sets Engine field to given value. - - -### GetPreview - -`func (o *QueryResultOut) GetPreview() []*map[string]interface{}` - -GetPreview returns the Preview field if non-nil, zero value otherwise. - -### GetPreviewOk - -`func (o *QueryResultOut) GetPreviewOk() (*[]*map[string]interface{}, bool)` - -GetPreviewOk returns a tuple with the Preview field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPreview - -`func (o *QueryResultOut) SetPreview(v []*map[string]interface{})` - -SetPreview sets Preview field to given value. - - -### GetResultArtId - -`func (o *QueryResultOut) GetResultArtId() string` - -GetResultArtId returns the ResultArtId field if non-nil, zero value otherwise. - -### GetResultArtIdOk - -`func (o *QueryResultOut) GetResultArtIdOk() (*string, bool)` - -GetResultArtIdOk returns a tuple with the ResultArtId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetResultArtId - -`func (o *QueryResultOut) SetResultArtId(v string)` - -SetResultArtId sets ResultArtId field to given value. - - -### GetResultSchema - -`func (o *QueryResultOut) GetResultSchema() []QueryColumnOut` - -GetResultSchema returns the ResultSchema field if non-nil, zero value otherwise. - -### GetResultSchemaOk - -`func (o *QueryResultOut) GetResultSchemaOk() (*[]QueryColumnOut, bool)` - -GetResultSchemaOk returns a tuple with the ResultSchema field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetResultSchema - -`func (o *QueryResultOut) SetResultSchema(v []QueryColumnOut)` - -SetResultSchema sets ResultSchema field to given value. - - -### GetRowCount - -`func (o *QueryResultOut) GetRowCount() int32` - -GetRowCount returns the RowCount field if non-nil, zero value otherwise. - -### GetRowCountOk - -`func (o *QueryResultOut) GetRowCountOk() (*int32, bool)` - -GetRowCountOk returns a tuple with the RowCount field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRowCount - -`func (o *QueryResultOut) SetRowCount(v int32)` - -SetRowCount sets RowCount field to given value. - - - -[[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/sdk/go/docs/RegisterAgentIdentityAgentIdentityPost422Response.md b/sdk/go/docs/RegisterAgentIdentityAgentIdentityPost422Response.md deleted file mode 100644 index bd5c5a1..0000000 --- a/sdk/go/docs/RegisterAgentIdentityAgentIdentityPost422Response.md +++ /dev/null @@ -1,49 +0,0 @@ -# RegisterAgentIdentityAgentIdentityPost422Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Detail** | [**ErrorDetail**](ErrorDetail.md) | | - -## Methods - -### NewRegisterAgentIdentityAgentIdentityPost422Response - -`func NewRegisterAgentIdentityAgentIdentityPost422Response(detail ErrorDetail, ) *RegisterAgentIdentityAgentIdentityPost422Response` - -NewRegisterAgentIdentityAgentIdentityPost422Response instantiates a new RegisterAgentIdentityAgentIdentityPost422Response object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRegisterAgentIdentityAgentIdentityPost422ResponseWithDefaults - -`func NewRegisterAgentIdentityAgentIdentityPost422ResponseWithDefaults() *RegisterAgentIdentityAgentIdentityPost422Response` - -NewRegisterAgentIdentityAgentIdentityPost422ResponseWithDefaults instantiates a new RegisterAgentIdentityAgentIdentityPost422Response object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetDetail - -`func (o *RegisterAgentIdentityAgentIdentityPost422Response) GetDetail() ErrorDetail` - -GetDetail returns the Detail field if non-nil, zero value otherwise. - -### GetDetailOk - -`func (o *RegisterAgentIdentityAgentIdentityPost422Response) GetDetailOk() (*ErrorDetail, bool)` - -GetDetailOk returns a tuple with the Detail field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDetail - -`func (o *RegisterAgentIdentityAgentIdentityPost422Response) SetDetail(v ErrorDetail)` - -SetDetail sets Detail field to given value. - - - -[[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/sdk/go/docs/ResponsePostQueryV0QueryPost.md b/sdk/go/docs/ResponsePostQueryV0QueryPost.md deleted file mode 100644 index 0fd1101..0000000 --- a/sdk/go/docs/ResponsePostQueryV0QueryPost.md +++ /dev/null @@ -1,238 +0,0 @@ -# ResponsePostQueryV0QueryPost - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DryRun** | **bool** | | -**Engine** | **string** | | -**EstimatedBytesProcessed** | **int32** | | -**ResultSchema** | [**[]QueryColumnOut**](QueryColumnOut.md) | | -**Valid** | **bool** | | -**BytesProcessed** | **int32** | | -**CacheHit** | **bool** | | -**Preview** | **[]map[string]interface{}** | | -**ResultArtId** | **string** | | -**RowCount** | **int32** | | - -## Methods - -### NewResponsePostQueryV0QueryPost - -`func NewResponsePostQueryV0QueryPost(dryRun bool, engine string, estimatedBytesProcessed int32, resultSchema []QueryColumnOut, valid bool, bytesProcessed int32, cacheHit bool, preview []map[string]interface{}, resultArtId string, rowCount int32, ) *ResponsePostQueryV0QueryPost` - -NewResponsePostQueryV0QueryPost instantiates a new ResponsePostQueryV0QueryPost object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewResponsePostQueryV0QueryPostWithDefaults - -`func NewResponsePostQueryV0QueryPostWithDefaults() *ResponsePostQueryV0QueryPost` - -NewResponsePostQueryV0QueryPostWithDefaults instantiates a new ResponsePostQueryV0QueryPost object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetDryRun - -`func (o *ResponsePostQueryV0QueryPost) GetDryRun() bool` - -GetDryRun returns the DryRun field if non-nil, zero value otherwise. - -### GetDryRunOk - -`func (o *ResponsePostQueryV0QueryPost) GetDryRunOk() (*bool, bool)` - -GetDryRunOk returns a tuple with the DryRun field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDryRun - -`func (o *ResponsePostQueryV0QueryPost) SetDryRun(v bool)` - -SetDryRun sets DryRun field to given value. - - -### GetEngine - -`func (o *ResponsePostQueryV0QueryPost) GetEngine() string` - -GetEngine returns the Engine field if non-nil, zero value otherwise. - -### GetEngineOk - -`func (o *ResponsePostQueryV0QueryPost) GetEngineOk() (*string, bool)` - -GetEngineOk returns a tuple with the Engine field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEngine - -`func (o *ResponsePostQueryV0QueryPost) SetEngine(v string)` - -SetEngine sets Engine field to given value. - - -### GetEstimatedBytesProcessed - -`func (o *ResponsePostQueryV0QueryPost) GetEstimatedBytesProcessed() int32` - -GetEstimatedBytesProcessed returns the EstimatedBytesProcessed field if non-nil, zero value otherwise. - -### GetEstimatedBytesProcessedOk - -`func (o *ResponsePostQueryV0QueryPost) GetEstimatedBytesProcessedOk() (*int32, bool)` - -GetEstimatedBytesProcessedOk returns a tuple with the EstimatedBytesProcessed field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEstimatedBytesProcessed - -`func (o *ResponsePostQueryV0QueryPost) SetEstimatedBytesProcessed(v int32)` - -SetEstimatedBytesProcessed sets EstimatedBytesProcessed field to given value. - - -### GetResultSchema - -`func (o *ResponsePostQueryV0QueryPost) GetResultSchema() []QueryColumnOut` - -GetResultSchema returns the ResultSchema field if non-nil, zero value otherwise. - -### GetResultSchemaOk - -`func (o *ResponsePostQueryV0QueryPost) GetResultSchemaOk() (*[]QueryColumnOut, bool)` - -GetResultSchemaOk returns a tuple with the ResultSchema field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetResultSchema - -`func (o *ResponsePostQueryV0QueryPost) SetResultSchema(v []QueryColumnOut)` - -SetResultSchema sets ResultSchema field to given value. - - -### GetValid - -`func (o *ResponsePostQueryV0QueryPost) GetValid() bool` - -GetValid returns the Valid field if non-nil, zero value otherwise. - -### GetValidOk - -`func (o *ResponsePostQueryV0QueryPost) GetValidOk() (*bool, bool)` - -GetValidOk returns a tuple with the Valid field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetValid - -`func (o *ResponsePostQueryV0QueryPost) SetValid(v bool)` - -SetValid sets Valid field to given value. - - -### GetBytesProcessed - -`func (o *ResponsePostQueryV0QueryPost) GetBytesProcessed() int32` - -GetBytesProcessed returns the BytesProcessed field if non-nil, zero value otherwise. - -### GetBytesProcessedOk - -`func (o *ResponsePostQueryV0QueryPost) GetBytesProcessedOk() (*int32, bool)` - -GetBytesProcessedOk returns a tuple with the BytesProcessed field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetBytesProcessed - -`func (o *ResponsePostQueryV0QueryPost) SetBytesProcessed(v int32)` - -SetBytesProcessed sets BytesProcessed field to given value. - - -### GetCacheHit - -`func (o *ResponsePostQueryV0QueryPost) GetCacheHit() bool` - -GetCacheHit returns the CacheHit field if non-nil, zero value otherwise. - -### GetCacheHitOk - -`func (o *ResponsePostQueryV0QueryPost) GetCacheHitOk() (*bool, bool)` - -GetCacheHitOk returns a tuple with the CacheHit field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCacheHit - -`func (o *ResponsePostQueryV0QueryPost) SetCacheHit(v bool)` - -SetCacheHit sets CacheHit field to given value. - - -### GetPreview - -`func (o *ResponsePostQueryV0QueryPost) GetPreview() []map[string]interface{}` - -GetPreview returns the Preview field if non-nil, zero value otherwise. - -### GetPreviewOk - -`func (o *ResponsePostQueryV0QueryPost) GetPreviewOk() (*[]map[string]interface{}, bool)` - -GetPreviewOk returns a tuple with the Preview field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPreview - -`func (o *ResponsePostQueryV0QueryPost) SetPreview(v []map[string]interface{})` - -SetPreview sets Preview field to given value. - - -### GetResultArtId - -`func (o *ResponsePostQueryV0QueryPost) GetResultArtId() string` - -GetResultArtId returns the ResultArtId field if non-nil, zero value otherwise. - -### GetResultArtIdOk - -`func (o *ResponsePostQueryV0QueryPost) GetResultArtIdOk() (*string, bool)` - -GetResultArtIdOk returns a tuple with the ResultArtId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetResultArtId - -`func (o *ResponsePostQueryV0QueryPost) SetResultArtId(v string)` - -SetResultArtId sets ResultArtId field to given value. - - -### GetRowCount - -`func (o *ResponsePostQueryV0QueryPost) GetRowCount() int32` - -GetRowCount returns the RowCount field if non-nil, zero value otherwise. - -### GetRowCountOk - -`func (o *ResponsePostQueryV0QueryPost) GetRowCountOk() (*int32, bool)` - -GetRowCountOk returns a tuple with the RowCount field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRowCount - -`func (o *ResponsePostQueryV0QueryPost) SetRowCount(v int32)` - -SetRowCount sets RowCount field to given value. - - - -[[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/sdk/go/docs/RevokeOut.md b/sdk/go/docs/RevokeOut.md deleted file mode 100644 index 14ad785..0000000 --- a/sdk/go/docs/RevokeOut.md +++ /dev/null @@ -1,96 +0,0 @@ -# RevokeOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | | -**Ok** | Pointer to **bool** | | [optional] [default to true] -**Revoked** | **int32** | | - -## Methods - -### NewRevokeOut - -`func NewRevokeOut(id string, revoked int32, ) *RevokeOut` - -NewRevokeOut instantiates a new RevokeOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewRevokeOutWithDefaults - -`func NewRevokeOutWithDefaults() *RevokeOut` - -NewRevokeOutWithDefaults instantiates a new RevokeOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetId - -`func (o *RevokeOut) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *RevokeOut) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *RevokeOut) SetId(v string)` - -SetId sets Id field to given value. - - -### GetOk - -`func (o *RevokeOut) GetOk() bool` - -GetOk returns the Ok field if non-nil, zero value otherwise. - -### GetOkOk - -`func (o *RevokeOut) GetOkOk() (*bool, bool)` - -GetOkOk returns a tuple with the Ok field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetOk - -`func (o *RevokeOut) SetOk(v bool)` - -SetOk sets Ok field to given value. - -### HasOk - -`func (o *RevokeOut) HasOk() bool` - -HasOk returns a boolean if a field has been set. - -### GetRevoked - -`func (o *RevokeOut) GetRevoked() int32` - -GetRevoked returns the Revoked field if non-nil, zero value otherwise. - -### GetRevokedOk - -`func (o *RevokeOut) GetRevokedOk() (*int32, bool)` - -GetRevokedOk returns a tuple with the Revoked field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRevoked - -`func (o *RevokeOut) SetRevoked(v int32)` - -SetRevoked sets Revoked field to given value. - - - -[[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/sdk/go/docs/SearchAPI.md b/sdk/go/docs/SearchAPI.md new file mode 100644 index 0000000..881771e --- /dev/null +++ b/sdk/go/docs/SearchAPI.md @@ -0,0 +1,99 @@ +# \SearchAPI + +All URIs are relative to *https://api.agentdrive.run* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**DriveSearch**](SearchAPI.md#DriveSearch) | **Get** /v0/drives/{drive_id}/search | Drive Search + + + +## DriveSearch + +> SearchPageOut DriveSearch(ctx, driveId).Q(q).Mode(mode).Limit(limit).Cursor(cursor).ParentId(parentId).ContentType(contentType).Label(label).UpdatedAfter(updatedAfter).UpdatedBefore(updatedBefore).Authorization(authorization).Execute() + +Drive Search + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + "time" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + q := "q_example" // string | + mode := "mode_example" // string | (optional) (default to "lexical") + limit := int32(56) // int32 | (optional) + cursor := "cursor_example" // string | (optional) + parentId := "parentId_example" // string | (optional) + contentType := "contentType_example" // string | (optional) + label := "label_example" // string | (optional) + updatedAfter := time.Now() // time.Time | (optional) + updatedBefore := time.Now() // time.Time | (optional) + authorization := "authorization_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SearchAPI.DriveSearch(context.Background(), driveId).Q(q).Mode(mode).Limit(limit).Cursor(cursor).ParentId(parentId).ContentType(contentType).Label(label).UpdatedAfter(updatedAfter).UpdatedBefore(updatedBefore).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SearchAPI.DriveSearch``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `DriveSearch`: SearchPageOut + fmt.Fprintf(os.Stdout, "Response from `SearchAPI.DriveSearch`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiDriveSearchRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **q** | **string** | | + **mode** | **string** | | [default to "lexical"] + **limit** | **int32** | | + **cursor** | **string** | | + **parentId** | **string** | | + **contentType** | **string** | | + **label** | **string** | | + **updatedAfter** | **time.Time** | | + **updatedBefore** | **time.Time** | | + **authorization** | **string** | | + +### Return type + +[**SearchPageOut**](SearchPageOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### 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) diff --git a/sdk/go/docs/SearchHitOut.md b/sdk/go/docs/SearchHitOut.md index 2d103aa..d66c9ad 100644 --- a/sdk/go/docs/SearchHitOut.md +++ b/sdk/go/docs/SearchHitOut.md @@ -4,23 +4,21 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ArtId** | **string** | | -**ContentType** | **string** | | +**ContentType** | **NullableString** | | **DriveId** | **string** | | -**FileType** | **string** | | -**Labels** | Pointer to **[]string** | | [optional] -**Path** | **string** | | -**Score** | **float32** | | -**Snippet** | **string** | | +**Id** | **string** | | +**Name** | **string** | | +**ParentId** | **NullableString** | | +**Rank** | **float32** | | +**Snippet** | **string** | HTML-safe highlighted excerpt. The ONLY markup it may contain is the server's own <mark>...</mark> highlight pair; artifact content is entity-escaped, so this may be rendered as HTML. | **UpdatedAt** | **time.Time** | | -**Url** | **string** | | -**VersionNumber** | **int32** | | +**VersionId** | **NullableString** | | ## Methods ### NewSearchHitOut -`func NewSearchHitOut(artId string, contentType string, driveId string, fileType string, path string, score float32, snippet string, updatedAt time.Time, url string, versionNumber int32, ) *SearchHitOut` +`func NewSearchHitOut(contentType NullableString, driveId string, id string, name string, parentId NullableString, rank float32, snippet string, updatedAt time.Time, versionId NullableString, ) *SearchHitOut` NewSearchHitOut instantiates a new SearchHitOut object This constructor will assign default values to properties that have it defined, @@ -35,26 +33,6 @@ NewSearchHitOutWithDefaults instantiates a new SearchHitOut object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set -### GetArtId - -`func (o *SearchHitOut) GetArtId() string` - -GetArtId returns the ArtId field if non-nil, zero value otherwise. - -### GetArtIdOk - -`func (o *SearchHitOut) GetArtIdOk() (*string, bool)` - -GetArtIdOk returns a tuple with the ArtId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetArtId - -`func (o *SearchHitOut) SetArtId(v string)` - -SetArtId sets ArtId field to given value. - - ### GetContentType `func (o *SearchHitOut) GetContentType() string` @@ -75,6 +53,16 @@ and a boolean to check if the value has been set. SetContentType sets ContentType field to given value. +### SetContentTypeNil + +`func (o *SearchHitOut) SetContentTypeNil(b bool)` + + SetContentTypeNil sets the value for ContentType to be an explicit nil + +### UnsetContentType +`func (o *SearchHitOut) UnsetContentType()` + +UnsetContentType ensures that no value is present for ContentType, not even an explicit nil ### GetDriveId `func (o *SearchHitOut) GetDriveId() string` @@ -95,89 +83,94 @@ and a boolean to check if the value has been set. SetDriveId sets DriveId field to given value. -### GetFileType +### GetId -`func (o *SearchHitOut) GetFileType() string` +`func (o *SearchHitOut) GetId() string` -GetFileType returns the FileType field if non-nil, zero value otherwise. +GetId returns the Id field if non-nil, zero value otherwise. -### GetFileTypeOk +### GetIdOk -`func (o *SearchHitOut) GetFileTypeOk() (*string, bool)` +`func (o *SearchHitOut) GetIdOk() (*string, bool)` -GetFileTypeOk returns a tuple with the FileType field if it's non-nil, zero value otherwise +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetFileType +### SetId -`func (o *SearchHitOut) SetFileType(v string)` +`func (o *SearchHitOut) SetId(v string)` -SetFileType sets FileType field to given value. +SetId sets Id field to given value. -### GetLabels +### GetName -`func (o *SearchHitOut) GetLabels() []string` +`func (o *SearchHitOut) GetName() string` -GetLabels returns the Labels field if non-nil, zero value otherwise. +GetName returns the Name field if non-nil, zero value otherwise. -### GetLabelsOk +### GetNameOk -`func (o *SearchHitOut) GetLabelsOk() (*[]string, bool)` +`func (o *SearchHitOut) GetNameOk() (*string, bool)` -GetLabelsOk returns a tuple with the Labels field if it's non-nil, zero value otherwise +GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetLabels +### SetName -`func (o *SearchHitOut) SetLabels(v []string)` +`func (o *SearchHitOut) SetName(v string)` -SetLabels sets Labels field to given value. +SetName sets Name field to given value. -### HasLabels -`func (o *SearchHitOut) HasLabels() bool` +### GetParentId -HasLabels returns a boolean if a field has been set. +`func (o *SearchHitOut) GetParentId() string` -### GetPath +GetParentId returns the ParentId field if non-nil, zero value otherwise. -`func (o *SearchHitOut) GetPath() string` +### GetParentIdOk -GetPath returns the Path field if non-nil, zero value otherwise. +`func (o *SearchHitOut) GetParentIdOk() (*string, bool)` -### GetPathOk +GetParentIdOk returns a tuple with the ParentId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. -`func (o *SearchHitOut) GetPathOk() (*string, bool)` +### SetParentId -GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. +`func (o *SearchHitOut) SetParentId(v string)` -### SetPath +SetParentId sets ParentId field to given value. -`func (o *SearchHitOut) SetPath(v string)` -SetPath sets Path field to given value. +### SetParentIdNil +`func (o *SearchHitOut) SetParentIdNil(b bool)` -### GetScore + SetParentIdNil sets the value for ParentId to be an explicit nil -`func (o *SearchHitOut) GetScore() float32` +### UnsetParentId +`func (o *SearchHitOut) UnsetParentId()` -GetScore returns the Score field if non-nil, zero value otherwise. +UnsetParentId ensures that no value is present for ParentId, not even an explicit nil +### GetRank -### GetScoreOk +`func (o *SearchHitOut) GetRank() float32` -`func (o *SearchHitOut) GetScoreOk() (*float32, bool)` +GetRank returns the Rank field if non-nil, zero value otherwise. -GetScoreOk returns a tuple with the Score field if it's non-nil, zero value otherwise +### GetRankOk + +`func (o *SearchHitOut) GetRankOk() (*float32, bool)` + +GetRankOk returns a tuple with the Rank field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetScore +### SetRank -`func (o *SearchHitOut) SetScore(v float32)` +`func (o *SearchHitOut) SetRank(v float32)` -SetScore sets Score field to given value. +SetRank sets Rank field to given value. ### GetSnippet @@ -220,45 +213,35 @@ and a boolean to check if the value has been set. SetUpdatedAt sets UpdatedAt field to given value. -### GetUrl +### GetVersionId -`func (o *SearchHitOut) GetUrl() string` +`func (o *SearchHitOut) GetVersionId() string` -GetUrl returns the Url field if non-nil, zero value otherwise. +GetVersionId returns the VersionId field if non-nil, zero value otherwise. -### GetUrlOk +### GetVersionIdOk -`func (o *SearchHitOut) GetUrlOk() (*string, bool)` +`func (o *SearchHitOut) GetVersionIdOk() (*string, bool)` -GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise +GetVersionIdOk returns a tuple with the VersionId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetUrl - -`func (o *SearchHitOut) SetUrl(v string)` +### SetVersionId -SetUrl sets Url field to given value. +`func (o *SearchHitOut) SetVersionId(v string)` +SetVersionId sets VersionId field to given value. -### GetVersionNumber - -`func (o *SearchHitOut) GetVersionNumber() int32` - -GetVersionNumber returns the VersionNumber field if non-nil, zero value otherwise. - -### GetVersionNumberOk - -`func (o *SearchHitOut) GetVersionNumberOk() (*int32, bool)` - -GetVersionNumberOk returns a tuple with the VersionNumber field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. -### SetVersionNumber +### SetVersionIdNil -`func (o *SearchHitOut) SetVersionNumber(v int32)` +`func (o *SearchHitOut) SetVersionIdNil(b bool)` -SetVersionNumber sets VersionNumber field to given value. + SetVersionIdNil sets the value for VersionId to be an explicit nil +### UnsetVersionId +`func (o *SearchHitOut) UnsetVersionId()` +UnsetVersionId ensures that no value is present for VersionId, not even an explicit nil [[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/sdk/go/docs/SearchPage.md b/sdk/go/docs/SearchPage.md deleted file mode 100644 index 97451c9..0000000 --- a/sdk/go/docs/SearchPage.md +++ /dev/null @@ -1,49 +0,0 @@ -# SearchPage - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Items** | [**[]SearchHitOut**](SearchHitOut.md) | | - -## Methods - -### NewSearchPage - -`func NewSearchPage(items []SearchHitOut, ) *SearchPage` - -NewSearchPage instantiates a new SearchPage object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewSearchPageWithDefaults - -`func NewSearchPageWithDefaults() *SearchPage` - -NewSearchPageWithDefaults instantiates a new SearchPage object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetItems - -`func (o *SearchPage) GetItems() []SearchHitOut` - -GetItems returns the Items field if non-nil, zero value otherwise. - -### GetItemsOk - -`func (o *SearchPage) GetItemsOk() (*[]SearchHitOut, bool)` - -GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetItems - -`func (o *SearchPage) SetItems(v []SearchHitOut)` - -SetItems sets Items field to given value. - - - -[[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/sdk/go/docs/SearchPageOut.md b/sdk/go/docs/SearchPageOut.md new file mode 100644 index 0000000..afec7fb --- /dev/null +++ b/sdk/go/docs/SearchPageOut.md @@ -0,0 +1,80 @@ +# SearchPageOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Items** | [**[]SearchHitOut**](SearchHitOut.md) | | +**NextCursor** | **NullableString** | | + +## Methods + +### NewSearchPageOut + +`func NewSearchPageOut(items []SearchHitOut, nextCursor NullableString, ) *SearchPageOut` + +NewSearchPageOut instantiates a new SearchPageOut object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewSearchPageOutWithDefaults + +`func NewSearchPageOutWithDefaults() *SearchPageOut` + +NewSearchPageOutWithDefaults instantiates a new SearchPageOut object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetItems + +`func (o *SearchPageOut) GetItems() []SearchHitOut` + +GetItems returns the Items field if non-nil, zero value otherwise. + +### GetItemsOk + +`func (o *SearchPageOut) GetItemsOk() (*[]SearchHitOut, bool)` + +GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItems + +`func (o *SearchPageOut) SetItems(v []SearchHitOut)` + +SetItems sets Items field to given value. + + +### GetNextCursor + +`func (o *SearchPageOut) GetNextCursor() string` + +GetNextCursor returns the NextCursor field if non-nil, zero value otherwise. + +### GetNextCursorOk + +`func (o *SearchPageOut) GetNextCursorOk() (*string, bool)` + +GetNextCursorOk returns a tuple with the NextCursor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextCursor + +`func (o *SearchPageOut) SetNextCursor(v string)` + +SetNextCursor sets NextCursor field to given value. + + +### SetNextCursorNil + +`func (o *SearchPageOut) SetNextCursorNil(b bool)` + + SetNextCursorNil sets the value for NextCursor to be an explicit nil + +### UnsetNextCursor +`func (o *SearchPageOut) UnsetNextCursor()` + +UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil + +[[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/sdk/go/docs/ShareCreateIn.md b/sdk/go/docs/ShareCreateIn.md index 1d4b6bd..c721b93 100644 --- a/sdk/go/docs/ShareCreateIn.md +++ b/sdk/go/docs/ShareCreateIn.md @@ -4,16 +4,15 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ExpiresIn** | Pointer to **NullableInt32** | | [optional] -**Password** | Pointer to **NullableString** | | [optional] -**Resource** | **string** | | -**Role** | Pointer to **string** | | [optional] [default to "viewer"] +**ExpiresAt** | Pointer to **NullableTime** | | [optional] +**ResourceId** | **string** | | +**ResourceType** | **string** | | ## Methods ### NewShareCreateIn -`func NewShareCreateIn(resource string, ) *ShareCreateIn` +`func NewShareCreateIn(resourceId string, resourceType string, ) *ShareCreateIn` NewShareCreateIn instantiates a new ShareCreateIn object This constructor will assign default values to properties that have it defined, @@ -28,120 +27,80 @@ NewShareCreateInWithDefaults instantiates a new ShareCreateIn object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set -### GetExpiresIn +### GetExpiresAt -`func (o *ShareCreateIn) GetExpiresIn() int32` +`func (o *ShareCreateIn) GetExpiresAt() time.Time` -GetExpiresIn returns the ExpiresIn field if non-nil, zero value otherwise. +GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. -### GetExpiresInOk +### GetExpiresAtOk -`func (o *ShareCreateIn) GetExpiresInOk() (*int32, bool)` +`func (o *ShareCreateIn) GetExpiresAtOk() (*time.Time, bool)` -GetExpiresInOk returns a tuple with the ExpiresIn field if it's non-nil, zero value otherwise +GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetExpiresIn +### SetExpiresAt -`func (o *ShareCreateIn) SetExpiresIn(v int32)` +`func (o *ShareCreateIn) SetExpiresAt(v time.Time)` -SetExpiresIn sets ExpiresIn field to given value. +SetExpiresAt sets ExpiresAt field to given value. -### HasExpiresIn +### HasExpiresAt -`func (o *ShareCreateIn) HasExpiresIn() bool` +`func (o *ShareCreateIn) HasExpiresAt() bool` -HasExpiresIn returns a boolean if a field has been set. +HasExpiresAt returns a boolean if a field has been set. -### SetExpiresInNil +### SetExpiresAtNil -`func (o *ShareCreateIn) SetExpiresInNil(b bool)` +`func (o *ShareCreateIn) SetExpiresAtNil(b bool)` - SetExpiresInNil sets the value for ExpiresIn to be an explicit nil + SetExpiresAtNil sets the value for ExpiresAt to be an explicit nil -### UnsetExpiresIn -`func (o *ShareCreateIn) UnsetExpiresIn()` +### UnsetExpiresAt +`func (o *ShareCreateIn) UnsetExpiresAt()` -UnsetExpiresIn ensures that no value is present for ExpiresIn, not even an explicit nil -### GetPassword +UnsetExpiresAt ensures that no value is present for ExpiresAt, not even an explicit nil +### GetResourceId -`func (o *ShareCreateIn) GetPassword() string` +`func (o *ShareCreateIn) GetResourceId() string` -GetPassword returns the Password field if non-nil, zero value otherwise. +GetResourceId returns the ResourceId field if non-nil, zero value otherwise. -### GetPasswordOk +### GetResourceIdOk -`func (o *ShareCreateIn) GetPasswordOk() (*string, bool)` +`func (o *ShareCreateIn) GetResourceIdOk() (*string, bool)` -GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise +GetResourceIdOk returns a tuple with the ResourceId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetPassword +### SetResourceId -`func (o *ShareCreateIn) SetPassword(v string)` +`func (o *ShareCreateIn) SetResourceId(v string)` -SetPassword sets Password field to given value. +SetResourceId sets ResourceId field to given value. -### HasPassword -`func (o *ShareCreateIn) HasPassword() bool` +### GetResourceType -HasPassword returns a boolean if a field has been set. +`func (o *ShareCreateIn) GetResourceType() string` -### SetPasswordNil +GetResourceType returns the ResourceType field if non-nil, zero value otherwise. -`func (o *ShareCreateIn) SetPasswordNil(b bool)` +### GetResourceTypeOk - SetPasswordNil sets the value for Password to be an explicit nil +`func (o *ShareCreateIn) GetResourceTypeOk() (*string, bool)` -### UnsetPassword -`func (o *ShareCreateIn) UnsetPassword()` - -UnsetPassword ensures that no value is present for Password, not even an explicit nil -### GetResource - -`func (o *ShareCreateIn) GetResource() string` - -GetResource returns the Resource field if non-nil, zero value otherwise. - -### GetResourceOk - -`func (o *ShareCreateIn) GetResourceOk() (*string, bool)` - -GetResourceOk returns a tuple with the Resource field if it's non-nil, zero value otherwise +GetResourceTypeOk returns a tuple with the ResourceType field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetResource - -`func (o *ShareCreateIn) SetResource(v string)` - -SetResource sets Resource field to given value. - - -### GetRole - -`func (o *ShareCreateIn) GetRole() string` - -GetRole returns the Role field if non-nil, zero value otherwise. - -### GetRoleOk - -`func (o *ShareCreateIn) GetRoleOk() (*string, bool)` - -GetRoleOk returns a tuple with the Role field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRole - -`func (o *ShareCreateIn) SetRole(v string)` - -SetRole sets Role field to given value. +### SetResourceType -### HasRole +`func (o *ShareCreateIn) SetResourceType(v string)` -`func (o *ShareCreateIn) HasRole() bool` +SetResourceType sets ResourceType field to given value. -HasRole returns a boolean if a field has been set. [[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/sdk/go/docs/ShareCreateOut.md b/sdk/go/docs/ShareCreateOut.md new file mode 100644 index 0000000..8a0b169 --- /dev/null +++ b/sdk/go/docs/ShareCreateOut.md @@ -0,0 +1,335 @@ +# ShareCreateOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**CreatedAt** | **time.Time** | | +**CreatedBy** | **NullableString** | | +**DriveId** | **string** | | +**ExpiresAt** | **NullableTime** | | +**Id** | **string** | | +**ResourceId** | **string** | | +**ResourceType** | **string** | | +**Revision** | **string** | | +**RevokedAt** | **NullableTime** | | +**RotatedAt** | **NullableTime** | | +**Secret** | Pointer to **NullableString** | Plaintext share secret. Present only on first execution of a create or rotate; null on idempotent replay — rotate to obtain a new secret. | [optional] +**State** | **string** | | + +## Methods + +### NewShareCreateOut + +`func NewShareCreateOut(createdAt time.Time, createdBy NullableString, driveId string, expiresAt NullableTime, id string, resourceId string, resourceType string, revision string, revokedAt NullableTime, rotatedAt NullableTime, state string, ) *ShareCreateOut` + +NewShareCreateOut instantiates a new ShareCreateOut object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewShareCreateOutWithDefaults + +`func NewShareCreateOutWithDefaults() *ShareCreateOut` + +NewShareCreateOutWithDefaults instantiates a new ShareCreateOut object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCreatedAt + +`func (o *ShareCreateOut) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *ShareCreateOut) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *ShareCreateOut) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + + +### GetCreatedBy + +`func (o *ShareCreateOut) GetCreatedBy() string` + +GetCreatedBy returns the CreatedBy field if non-nil, zero value otherwise. + +### GetCreatedByOk + +`func (o *ShareCreateOut) GetCreatedByOk() (*string, bool)` + +GetCreatedByOk returns a tuple with the CreatedBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedBy + +`func (o *ShareCreateOut) SetCreatedBy(v string)` + +SetCreatedBy sets CreatedBy field to given value. + + +### SetCreatedByNil + +`func (o *ShareCreateOut) SetCreatedByNil(b bool)` + + SetCreatedByNil sets the value for CreatedBy to be an explicit nil + +### UnsetCreatedBy +`func (o *ShareCreateOut) UnsetCreatedBy()` + +UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +### GetDriveId + +`func (o *ShareCreateOut) GetDriveId() string` + +GetDriveId returns the DriveId field if non-nil, zero value otherwise. + +### GetDriveIdOk + +`func (o *ShareCreateOut) GetDriveIdOk() (*string, bool)` + +GetDriveIdOk returns a tuple with the DriveId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDriveId + +`func (o *ShareCreateOut) SetDriveId(v string)` + +SetDriveId sets DriveId field to given value. + + +### GetExpiresAt + +`func (o *ShareCreateOut) GetExpiresAt() time.Time` + +GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. + +### GetExpiresAtOk + +`func (o *ShareCreateOut) GetExpiresAtOk() (*time.Time, bool)` + +GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetExpiresAt + +`func (o *ShareCreateOut) SetExpiresAt(v time.Time)` + +SetExpiresAt sets ExpiresAt field to given value. + + +### SetExpiresAtNil + +`func (o *ShareCreateOut) SetExpiresAtNil(b bool)` + + SetExpiresAtNil sets the value for ExpiresAt to be an explicit nil + +### UnsetExpiresAt +`func (o *ShareCreateOut) UnsetExpiresAt()` + +UnsetExpiresAt ensures that no value is present for ExpiresAt, not even an explicit nil +### GetId + +`func (o *ShareCreateOut) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *ShareCreateOut) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *ShareCreateOut) SetId(v string)` + +SetId sets Id field to given value. + + +### GetResourceId + +`func (o *ShareCreateOut) GetResourceId() string` + +GetResourceId returns the ResourceId field if non-nil, zero value otherwise. + +### GetResourceIdOk + +`func (o *ShareCreateOut) GetResourceIdOk() (*string, bool)` + +GetResourceIdOk returns a tuple with the ResourceId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResourceId + +`func (o *ShareCreateOut) SetResourceId(v string)` + +SetResourceId sets ResourceId field to given value. + + +### GetResourceType + +`func (o *ShareCreateOut) GetResourceType() string` + +GetResourceType returns the ResourceType field if non-nil, zero value otherwise. + +### GetResourceTypeOk + +`func (o *ShareCreateOut) GetResourceTypeOk() (*string, bool)` + +GetResourceTypeOk returns a tuple with the ResourceType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetResourceType + +`func (o *ShareCreateOut) SetResourceType(v string)` + +SetResourceType sets ResourceType field to given value. + + +### GetRevision + +`func (o *ShareCreateOut) GetRevision() string` + +GetRevision returns the Revision field if non-nil, zero value otherwise. + +### GetRevisionOk + +`func (o *ShareCreateOut) GetRevisionOk() (*string, bool)` + +GetRevisionOk returns a tuple with the Revision field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRevision + +`func (o *ShareCreateOut) SetRevision(v string)` + +SetRevision sets Revision field to given value. + + +### GetRevokedAt + +`func (o *ShareCreateOut) GetRevokedAt() time.Time` + +GetRevokedAt returns the RevokedAt field if non-nil, zero value otherwise. + +### GetRevokedAtOk + +`func (o *ShareCreateOut) GetRevokedAtOk() (*time.Time, bool)` + +GetRevokedAtOk returns a tuple with the RevokedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRevokedAt + +`func (o *ShareCreateOut) SetRevokedAt(v time.Time)` + +SetRevokedAt sets RevokedAt field to given value. + + +### SetRevokedAtNil + +`func (o *ShareCreateOut) SetRevokedAtNil(b bool)` + + SetRevokedAtNil sets the value for RevokedAt to be an explicit nil + +### UnsetRevokedAt +`func (o *ShareCreateOut) UnsetRevokedAt()` + +UnsetRevokedAt ensures that no value is present for RevokedAt, not even an explicit nil +### GetRotatedAt + +`func (o *ShareCreateOut) GetRotatedAt() time.Time` + +GetRotatedAt returns the RotatedAt field if non-nil, zero value otherwise. + +### GetRotatedAtOk + +`func (o *ShareCreateOut) GetRotatedAtOk() (*time.Time, bool)` + +GetRotatedAtOk returns a tuple with the RotatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetRotatedAt + +`func (o *ShareCreateOut) SetRotatedAt(v time.Time)` + +SetRotatedAt sets RotatedAt field to given value. + + +### SetRotatedAtNil + +`func (o *ShareCreateOut) SetRotatedAtNil(b bool)` + + SetRotatedAtNil sets the value for RotatedAt to be an explicit nil + +### UnsetRotatedAt +`func (o *ShareCreateOut) UnsetRotatedAt()` + +UnsetRotatedAt ensures that no value is present for RotatedAt, not even an explicit nil +### GetSecret + +`func (o *ShareCreateOut) GetSecret() string` + +GetSecret returns the Secret field if non-nil, zero value otherwise. + +### GetSecretOk + +`func (o *ShareCreateOut) GetSecretOk() (*string, bool)` + +GetSecretOk returns a tuple with the Secret field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSecret + +`func (o *ShareCreateOut) SetSecret(v string)` + +SetSecret sets Secret field to given value. + +### HasSecret + +`func (o *ShareCreateOut) HasSecret() bool` + +HasSecret returns a boolean if a field has been set. + +### SetSecretNil + +`func (o *ShareCreateOut) SetSecretNil(b bool)` + + SetSecretNil sets the value for Secret to be an explicit nil + +### UnsetSecret +`func (o *ShareCreateOut) UnsetSecret()` + +UnsetSecret ensures that no value is present for Secret, not even an explicit nil +### GetState + +`func (o *ShareCreateOut) GetState() string` + +GetState returns the State field if non-nil, zero value otherwise. + +### GetStateOk + +`func (o *ShareCreateOut) GetStateOk() (*string, bool)` + +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetState + +`func (o *ShareCreateOut) SetState(v string)` + +SetState sets State field to given value. + + + +[[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/sdk/go/docs/ShareErrorOut.md b/sdk/go/docs/ShareErrorOut.md deleted file mode 100644 index 0b42ade..0000000 --- a/sdk/go/docs/ShareErrorOut.md +++ /dev/null @@ -1,49 +0,0 @@ -# ShareErrorOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Error** | [**ErrorBody**](ErrorBody.md) | | - -## Methods - -### NewShareErrorOut - -`func NewShareErrorOut(error_ ErrorBody, ) *ShareErrorOut` - -NewShareErrorOut instantiates a new ShareErrorOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewShareErrorOutWithDefaults - -`func NewShareErrorOutWithDefaults() *ShareErrorOut` - -NewShareErrorOutWithDefaults instantiates a new ShareErrorOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetError - -`func (o *ShareErrorOut) GetError() ErrorBody` - -GetError returns the Error field if non-nil, zero value otherwise. - -### GetErrorOk - -`func (o *ShareErrorOut) GetErrorOk() (*ErrorBody, bool)` - -GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetError - -`func (o *ShareErrorOut) SetError(v ErrorBody)` - -SetError sets Error field to given value. - - - -[[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/sdk/go/docs/ShareList.md b/sdk/go/docs/ShareList.md deleted file mode 100644 index c8760b3..0000000 --- a/sdk/go/docs/ShareList.md +++ /dev/null @@ -1,85 +0,0 @@ -# ShareList - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Items** | [**[]ShareOut**](ShareOut.md) | | -**NextCursor** | Pointer to **NullableString** | | [optional] - -## Methods - -### NewShareList - -`func NewShareList(items []ShareOut, ) *ShareList` - -NewShareList instantiates a new ShareList object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewShareListWithDefaults - -`func NewShareListWithDefaults() *ShareList` - -NewShareListWithDefaults instantiates a new ShareList object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetItems - -`func (o *ShareList) GetItems() []ShareOut` - -GetItems returns the Items field if non-nil, zero value otherwise. - -### GetItemsOk - -`func (o *ShareList) GetItemsOk() (*[]ShareOut, bool)` - -GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetItems - -`func (o *ShareList) SetItems(v []ShareOut)` - -SetItems sets Items field to given value. - - -### GetNextCursor - -`func (o *ShareList) GetNextCursor() string` - -GetNextCursor returns the NextCursor field if non-nil, zero value otherwise. - -### GetNextCursorOk - -`func (o *ShareList) GetNextCursorOk() (*string, bool)` - -GetNextCursorOk returns a tuple with the NextCursor field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNextCursor - -`func (o *ShareList) SetNextCursor(v string)` - -SetNextCursor sets NextCursor field to given value. - -### HasNextCursor - -`func (o *ShareList) HasNextCursor() bool` - -HasNextCursor returns a boolean if a field has been set. - -### SetNextCursorNil - -`func (o *ShareList) SetNextCursorNil(b bool)` - - SetNextCursorNil sets the value for NextCursor to be an explicit nil - -### UnsetNextCursor -`func (o *ShareList) UnsetNextCursor()` - -UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil - -[[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/sdk/go/docs/ShareListOut.md b/sdk/go/docs/ShareListOut.md new file mode 100644 index 0000000..b0c808a --- /dev/null +++ b/sdk/go/docs/ShareListOut.md @@ -0,0 +1,80 @@ +# ShareListOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Items** | [**[]ShareOut**](ShareOut.md) | | +**NextCursor** | **NullableString** | | + +## Methods + +### NewShareListOut + +`func NewShareListOut(items []ShareOut, nextCursor NullableString, ) *ShareListOut` + +NewShareListOut instantiates a new ShareListOut object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewShareListOutWithDefaults + +`func NewShareListOutWithDefaults() *ShareListOut` + +NewShareListOutWithDefaults instantiates a new ShareListOut object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetItems + +`func (o *ShareListOut) GetItems() []ShareOut` + +GetItems returns the Items field if non-nil, zero value otherwise. + +### GetItemsOk + +`func (o *ShareListOut) GetItemsOk() (*[]ShareOut, bool)` + +GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItems + +`func (o *ShareListOut) SetItems(v []ShareOut)` + +SetItems sets Items field to given value. + + +### GetNextCursor + +`func (o *ShareListOut) GetNextCursor() string` + +GetNextCursor returns the NextCursor field if non-nil, zero value otherwise. + +### GetNextCursorOk + +`func (o *ShareListOut) GetNextCursorOk() (*string, bool)` + +GetNextCursorOk returns a tuple with the NextCursor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextCursor + +`func (o *ShareListOut) SetNextCursor(v string)` + +SetNextCursor sets NextCursor field to given value. + + +### SetNextCursorNil + +`func (o *ShareListOut) SetNextCursorNil(b bool)` + + SetNextCursorNil sets the value for NextCursor to be an explicit nil + +### UnsetNextCursor +`func (o *ShareListOut) UnsetNextCursor()` + +UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil + +[[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/sdk/go/docs/ShareMintOut.md b/sdk/go/docs/ShareMintOut.md deleted file mode 100644 index 995bd4a..0000000 --- a/sdk/go/docs/ShareMintOut.md +++ /dev/null @@ -1,315 +0,0 @@ -# ShareMintOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AccessCount** | Pointer to **int32** | | [optional] [default to 0] -**Audience** | **string** | | -**CreatedAt** | **time.Time** | | -**ExpiresAt** | Pointer to **NullableTime** | | [optional] -**HasPassword** | **bool** | | -**Id** | **string** | | -**LastAccessedAt** | Pointer to **NullableTime** | | [optional] -**ResourceId** | **string** | | -**ResourceType** | **string** | | -**Role** | **string** | | -**ShareKey** | **string** | | -**Url** | **string** | | - -## Methods - -### NewShareMintOut - -`func NewShareMintOut(audience string, createdAt time.Time, hasPassword bool, id string, resourceId string, resourceType string, role string, shareKey string, url string, ) *ShareMintOut` - -NewShareMintOut instantiates a new ShareMintOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewShareMintOutWithDefaults - -`func NewShareMintOutWithDefaults() *ShareMintOut` - -NewShareMintOutWithDefaults instantiates a new ShareMintOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetAccessCount - -`func (o *ShareMintOut) GetAccessCount() int32` - -GetAccessCount returns the AccessCount field if non-nil, zero value otherwise. - -### GetAccessCountOk - -`func (o *ShareMintOut) GetAccessCountOk() (*int32, bool)` - -GetAccessCountOk returns a tuple with the AccessCount field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAccessCount - -`func (o *ShareMintOut) SetAccessCount(v int32)` - -SetAccessCount sets AccessCount field to given value. - -### HasAccessCount - -`func (o *ShareMintOut) HasAccessCount() bool` - -HasAccessCount returns a boolean if a field has been set. - -### GetAudience - -`func (o *ShareMintOut) GetAudience() string` - -GetAudience returns the Audience field if non-nil, zero value otherwise. - -### GetAudienceOk - -`func (o *ShareMintOut) GetAudienceOk() (*string, bool)` - -GetAudienceOk returns a tuple with the Audience field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAudience - -`func (o *ShareMintOut) SetAudience(v string)` - -SetAudience sets Audience field to given value. - - -### GetCreatedAt - -`func (o *ShareMintOut) GetCreatedAt() time.Time` - -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. - -### GetCreatedAtOk - -`func (o *ShareMintOut) GetCreatedAtOk() (*time.Time, bool)` - -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreatedAt - -`func (o *ShareMintOut) SetCreatedAt(v time.Time)` - -SetCreatedAt sets CreatedAt field to given value. - - -### GetExpiresAt - -`func (o *ShareMintOut) GetExpiresAt() time.Time` - -GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. - -### GetExpiresAtOk - -`func (o *ShareMintOut) GetExpiresAtOk() (*time.Time, bool)` - -GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExpiresAt - -`func (o *ShareMintOut) SetExpiresAt(v time.Time)` - -SetExpiresAt sets ExpiresAt field to given value. - -### HasExpiresAt - -`func (o *ShareMintOut) HasExpiresAt() bool` - -HasExpiresAt returns a boolean if a field has been set. - -### SetExpiresAtNil - -`func (o *ShareMintOut) SetExpiresAtNil(b bool)` - - SetExpiresAtNil sets the value for ExpiresAt to be an explicit nil - -### UnsetExpiresAt -`func (o *ShareMintOut) UnsetExpiresAt()` - -UnsetExpiresAt ensures that no value is present for ExpiresAt, not even an explicit nil -### GetHasPassword - -`func (o *ShareMintOut) GetHasPassword() bool` - -GetHasPassword returns the HasPassword field if non-nil, zero value otherwise. - -### GetHasPasswordOk - -`func (o *ShareMintOut) GetHasPasswordOk() (*bool, bool)` - -GetHasPasswordOk returns a tuple with the HasPassword field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetHasPassword - -`func (o *ShareMintOut) SetHasPassword(v bool)` - -SetHasPassword sets HasPassword field to given value. - - -### GetId - -`func (o *ShareMintOut) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *ShareMintOut) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *ShareMintOut) SetId(v string)` - -SetId sets Id field to given value. - - -### GetLastAccessedAt - -`func (o *ShareMintOut) GetLastAccessedAt() time.Time` - -GetLastAccessedAt returns the LastAccessedAt field if non-nil, zero value otherwise. - -### GetLastAccessedAtOk - -`func (o *ShareMintOut) GetLastAccessedAtOk() (*time.Time, bool)` - -GetLastAccessedAtOk returns a tuple with the LastAccessedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLastAccessedAt - -`func (o *ShareMintOut) SetLastAccessedAt(v time.Time)` - -SetLastAccessedAt sets LastAccessedAt field to given value. - -### HasLastAccessedAt - -`func (o *ShareMintOut) HasLastAccessedAt() bool` - -HasLastAccessedAt returns a boolean if a field has been set. - -### SetLastAccessedAtNil - -`func (o *ShareMintOut) SetLastAccessedAtNil(b bool)` - - SetLastAccessedAtNil sets the value for LastAccessedAt to be an explicit nil - -### UnsetLastAccessedAt -`func (o *ShareMintOut) UnsetLastAccessedAt()` - -UnsetLastAccessedAt ensures that no value is present for LastAccessedAt, not even an explicit nil -### GetResourceId - -`func (o *ShareMintOut) GetResourceId() string` - -GetResourceId returns the ResourceId field if non-nil, zero value otherwise. - -### GetResourceIdOk - -`func (o *ShareMintOut) GetResourceIdOk() (*string, bool)` - -GetResourceIdOk returns a tuple with the ResourceId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetResourceId - -`func (o *ShareMintOut) SetResourceId(v string)` - -SetResourceId sets ResourceId field to given value. - - -### GetResourceType - -`func (o *ShareMintOut) GetResourceType() string` - -GetResourceType returns the ResourceType field if non-nil, zero value otherwise. - -### GetResourceTypeOk - -`func (o *ShareMintOut) GetResourceTypeOk() (*string, bool)` - -GetResourceTypeOk returns a tuple with the ResourceType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetResourceType - -`func (o *ShareMintOut) SetResourceType(v string)` - -SetResourceType sets ResourceType field to given value. - - -### GetRole - -`func (o *ShareMintOut) GetRole() string` - -GetRole returns the Role field if non-nil, zero value otherwise. - -### GetRoleOk - -`func (o *ShareMintOut) GetRoleOk() (*string, bool)` - -GetRoleOk returns a tuple with the Role field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRole - -`func (o *ShareMintOut) SetRole(v string)` - -SetRole sets Role field to given value. - - -### GetShareKey - -`func (o *ShareMintOut) GetShareKey() string` - -GetShareKey returns the ShareKey field if non-nil, zero value otherwise. - -### GetShareKeyOk - -`func (o *ShareMintOut) GetShareKeyOk() (*string, bool)` - -GetShareKeyOk returns a tuple with the ShareKey field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetShareKey - -`func (o *ShareMintOut) SetShareKey(v string)` - -SetShareKey sets ShareKey field to given value. - - -### GetUrl - -`func (o *ShareMintOut) GetUrl() string` - -GetUrl returns the Url field if non-nil, zero value otherwise. - -### GetUrlOk - -`func (o *ShareMintOut) GetUrlOk() (*string, bool)` - -GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUrl - -`func (o *ShareMintOut) SetUrl(v string)` - -SetUrl sets Url field to given value. - - - -[[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/sdk/go/docs/ShareOut.md b/sdk/go/docs/ShareOut.md index a60442d..233d41e 100644 --- a/sdk/go/docs/ShareOut.md +++ b/sdk/go/docs/ShareOut.md @@ -4,22 +4,23 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**AccessCount** | Pointer to **int32** | | [optional] [default to 0] -**Audience** | **string** | | **CreatedAt** | **time.Time** | | -**ExpiresAt** | Pointer to **NullableTime** | | [optional] -**HasPassword** | **bool** | | +**CreatedBy** | **NullableString** | | +**DriveId** | **string** | | +**ExpiresAt** | **NullableTime** | | **Id** | **string** | | -**LastAccessedAt** | Pointer to **NullableTime** | | [optional] **ResourceId** | **string** | | **ResourceType** | **string** | | -**Role** | **string** | | +**Revision** | **string** | | +**RevokedAt** | **NullableTime** | | +**RotatedAt** | **NullableTime** | | +**State** | **string** | | ## Methods ### NewShareOut -`func NewShareOut(audience string, createdAt time.Time, hasPassword bool, id string, resourceId string, resourceType string, role string, ) *ShareOut` +`func NewShareOut(createdAt time.Time, createdBy NullableString, driveId string, expiresAt NullableTime, id string, resourceId string, resourceType string, revision string, revokedAt NullableTime, rotatedAt NullableTime, state string, ) *ShareOut` NewShareOut instantiates a new ShareOut object This constructor will assign default values to properties that have it defined, @@ -34,69 +35,74 @@ NewShareOutWithDefaults instantiates a new ShareOut object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set -### GetAccessCount +### GetCreatedAt -`func (o *ShareOut) GetAccessCount() int32` +`func (o *ShareOut) GetCreatedAt() time.Time` -GetAccessCount returns the AccessCount field if non-nil, zero value otherwise. +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. -### GetAccessCountOk +### GetCreatedAtOk -`func (o *ShareOut) GetAccessCountOk() (*int32, bool)` +`func (o *ShareOut) GetCreatedAtOk() (*time.Time, bool)` -GetAccessCountOk returns a tuple with the AccessCount field if it's non-nil, zero value otherwise +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetAccessCount +### SetCreatedAt -`func (o *ShareOut) SetAccessCount(v int32)` +`func (o *ShareOut) SetCreatedAt(v time.Time)` -SetAccessCount sets AccessCount field to given value. +SetCreatedAt sets CreatedAt field to given value. -### HasAccessCount -`func (o *ShareOut) HasAccessCount() bool` +### GetCreatedBy -HasAccessCount returns a boolean if a field has been set. +`func (o *ShareOut) GetCreatedBy() string` -### GetAudience +GetCreatedBy returns the CreatedBy field if non-nil, zero value otherwise. -`func (o *ShareOut) GetAudience() string` +### GetCreatedByOk -GetAudience returns the Audience field if non-nil, zero value otherwise. +`func (o *ShareOut) GetCreatedByOk() (*string, bool)` -### GetAudienceOk +GetCreatedByOk returns a tuple with the CreatedBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. -`func (o *ShareOut) GetAudienceOk() (*string, bool)` +### SetCreatedBy -GetAudienceOk returns a tuple with the Audience field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. +`func (o *ShareOut) SetCreatedBy(v string)` -### SetAudience +SetCreatedBy sets CreatedBy field to given value. -`func (o *ShareOut) SetAudience(v string)` -SetAudience sets Audience field to given value. +### SetCreatedByNil +`func (o *ShareOut) SetCreatedByNil(b bool)` -### GetCreatedAt + SetCreatedByNil sets the value for CreatedBy to be an explicit nil -`func (o *ShareOut) GetCreatedAt() time.Time` +### UnsetCreatedBy +`func (o *ShareOut) UnsetCreatedBy()` -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. +UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +### GetDriveId -### GetCreatedAtOk +`func (o *ShareOut) GetDriveId() string` -`func (o *ShareOut) GetCreatedAtOk() (*time.Time, bool)` +GetDriveId returns the DriveId field if non-nil, zero value otherwise. -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +### GetDriveIdOk + +`func (o *ShareOut) GetDriveIdOk() (*string, bool)` + +GetDriveIdOk returns a tuple with the DriveId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetCreatedAt +### SetDriveId -`func (o *ShareOut) SetCreatedAt(v time.Time)` +`func (o *ShareOut) SetDriveId(v string)` -SetCreatedAt sets CreatedAt field to given value. +SetDriveId sets DriveId field to given value. ### GetExpiresAt @@ -118,11 +124,6 @@ and a boolean to check if the value has been set. SetExpiresAt sets ExpiresAt field to given value. -### HasExpiresAt - -`func (o *ShareOut) HasExpiresAt() bool` - -HasExpiresAt returns a boolean if a field has been set. ### SetExpiresAtNil @@ -134,139 +135,164 @@ HasExpiresAt returns a boolean if a field has been set. `func (o *ShareOut) UnsetExpiresAt()` UnsetExpiresAt ensures that no value is present for ExpiresAt, not even an explicit nil -### GetHasPassword +### GetId -`func (o *ShareOut) GetHasPassword() bool` +`func (o *ShareOut) GetId() string` -GetHasPassword returns the HasPassword field if non-nil, zero value otherwise. +GetId returns the Id field if non-nil, zero value otherwise. -### GetHasPasswordOk +### GetIdOk -`func (o *ShareOut) GetHasPasswordOk() (*bool, bool)` +`func (o *ShareOut) GetIdOk() (*string, bool)` -GetHasPasswordOk returns a tuple with the HasPassword field if it's non-nil, zero value otherwise +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetHasPassword +### SetId -`func (o *ShareOut) SetHasPassword(v bool)` +`func (o *ShareOut) SetId(v string)` -SetHasPassword sets HasPassword field to given value. +SetId sets Id field to given value. -### GetId +### GetResourceId -`func (o *ShareOut) GetId() string` +`func (o *ShareOut) GetResourceId() string` -GetId returns the Id field if non-nil, zero value otherwise. +GetResourceId returns the ResourceId field if non-nil, zero value otherwise. -### GetIdOk +### GetResourceIdOk -`func (o *ShareOut) GetIdOk() (*string, bool)` +`func (o *ShareOut) GetResourceIdOk() (*string, bool)` -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +GetResourceIdOk returns a tuple with the ResourceId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetId +### SetResourceId -`func (o *ShareOut) SetId(v string)` +`func (o *ShareOut) SetResourceId(v string)` -SetId sets Id field to given value. +SetResourceId sets ResourceId field to given value. -### GetLastAccessedAt +### GetResourceType -`func (o *ShareOut) GetLastAccessedAt() time.Time` +`func (o *ShareOut) GetResourceType() string` -GetLastAccessedAt returns the LastAccessedAt field if non-nil, zero value otherwise. +GetResourceType returns the ResourceType field if non-nil, zero value otherwise. -### GetLastAccessedAtOk +### GetResourceTypeOk -`func (o *ShareOut) GetLastAccessedAtOk() (*time.Time, bool)` +`func (o *ShareOut) GetResourceTypeOk() (*string, bool)` -GetLastAccessedAtOk returns a tuple with the LastAccessedAt field if it's non-nil, zero value otherwise +GetResourceTypeOk returns a tuple with the ResourceType field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetLastAccessedAt +### SetResourceType -`func (o *ShareOut) SetLastAccessedAt(v time.Time)` +`func (o *ShareOut) SetResourceType(v string)` -SetLastAccessedAt sets LastAccessedAt field to given value. +SetResourceType sets ResourceType field to given value. -### HasLastAccessedAt -`func (o *ShareOut) HasLastAccessedAt() bool` +### GetRevision -HasLastAccessedAt returns a boolean if a field has been set. +`func (o *ShareOut) GetRevision() string` -### SetLastAccessedAtNil +GetRevision returns the Revision field if non-nil, zero value otherwise. -`func (o *ShareOut) SetLastAccessedAtNil(b bool)` +### GetRevisionOk - SetLastAccessedAtNil sets the value for LastAccessedAt to be an explicit nil +`func (o *ShareOut) GetRevisionOk() (*string, bool)` -### UnsetLastAccessedAt -`func (o *ShareOut) UnsetLastAccessedAt()` +GetRevisionOk returns a tuple with the Revision field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. -UnsetLastAccessedAt ensures that no value is present for LastAccessedAt, not even an explicit nil -### GetResourceId +### SetRevision -`func (o *ShareOut) GetResourceId() string` +`func (o *ShareOut) SetRevision(v string)` -GetResourceId returns the ResourceId field if non-nil, zero value otherwise. +SetRevision sets Revision field to given value. -### GetResourceIdOk -`func (o *ShareOut) GetResourceIdOk() (*string, bool)` +### GetRevokedAt -GetResourceIdOk returns a tuple with the ResourceId field if it's non-nil, zero value otherwise +`func (o *ShareOut) GetRevokedAt() time.Time` + +GetRevokedAt returns the RevokedAt field if non-nil, zero value otherwise. + +### GetRevokedAtOk + +`func (o *ShareOut) GetRevokedAtOk() (*time.Time, bool)` + +GetRevokedAtOk returns a tuple with the RevokedAt field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetResourceId +### SetRevokedAt -`func (o *ShareOut) SetResourceId(v string)` +`func (o *ShareOut) SetRevokedAt(v time.Time)` -SetResourceId sets ResourceId field to given value. +SetRevokedAt sets RevokedAt field to given value. -### GetResourceType +### SetRevokedAtNil -`func (o *ShareOut) GetResourceType() string` +`func (o *ShareOut) SetRevokedAtNil(b bool)` -GetResourceType returns the ResourceType field if non-nil, zero value otherwise. + SetRevokedAtNil sets the value for RevokedAt to be an explicit nil -### GetResourceTypeOk +### UnsetRevokedAt +`func (o *ShareOut) UnsetRevokedAt()` -`func (o *ShareOut) GetResourceTypeOk() (*string, bool)` +UnsetRevokedAt ensures that no value is present for RevokedAt, not even an explicit nil +### GetRotatedAt -GetResourceTypeOk returns a tuple with the ResourceType field if it's non-nil, zero value otherwise +`func (o *ShareOut) GetRotatedAt() time.Time` + +GetRotatedAt returns the RotatedAt field if non-nil, zero value otherwise. + +### GetRotatedAtOk + +`func (o *ShareOut) GetRotatedAtOk() (*time.Time, bool)` + +GetRotatedAtOk returns a tuple with the RotatedAt field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetResourceType +### SetRotatedAt -`func (o *ShareOut) SetResourceType(v string)` +`func (o *ShareOut) SetRotatedAt(v time.Time)` -SetResourceType sets ResourceType field to given value. +SetRotatedAt sets RotatedAt field to given value. + + +### SetRotatedAtNil + +`func (o *ShareOut) SetRotatedAtNil(b bool)` + + SetRotatedAtNil sets the value for RotatedAt to be an explicit nil +### UnsetRotatedAt +`func (o *ShareOut) UnsetRotatedAt()` -### GetRole +UnsetRotatedAt ensures that no value is present for RotatedAt, not even an explicit nil +### GetState -`func (o *ShareOut) GetRole() string` +`func (o *ShareOut) GetState() string` -GetRole returns the Role field if non-nil, zero value otherwise. +GetState returns the State field if non-nil, zero value otherwise. -### GetRoleOk +### GetStateOk -`func (o *ShareOut) GetRoleOk() (*string, bool)` +`func (o *ShareOut) GetStateOk() (*string, bool)` -GetRoleOk returns a tuple with the Role field if it's non-nil, zero value otherwise +GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetRole +### SetState -`func (o *ShareOut) SetRole(v string)` +`func (o *ShareOut) SetState(v string)` -SetRole sets Role field to given value. +SetState sets State field to given value. diff --git a/sdk/go/docs/ShareRedeemOut.md b/sdk/go/docs/ShareRedeemOut.md deleted file mode 100644 index a9be17e..0000000 --- a/sdk/go/docs/ShareRedeemOut.md +++ /dev/null @@ -1,112 +0,0 @@ -# ShareRedeemOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ExpiresAt** | **time.Time** | | -**Role** | **string** | | -**Token** | **string** | | -**Url** | **string** | | - -## Methods - -### NewShareRedeemOut - -`func NewShareRedeemOut(expiresAt time.Time, role string, token string, url string, ) *ShareRedeemOut` - -NewShareRedeemOut instantiates a new ShareRedeemOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewShareRedeemOutWithDefaults - -`func NewShareRedeemOutWithDefaults() *ShareRedeemOut` - -NewShareRedeemOutWithDefaults instantiates a new ShareRedeemOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetExpiresAt - -`func (o *ShareRedeemOut) GetExpiresAt() time.Time` - -GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. - -### GetExpiresAtOk - -`func (o *ShareRedeemOut) GetExpiresAtOk() (*time.Time, bool)` - -GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExpiresAt - -`func (o *ShareRedeemOut) SetExpiresAt(v time.Time)` - -SetExpiresAt sets ExpiresAt field to given value. - - -### GetRole - -`func (o *ShareRedeemOut) GetRole() string` - -GetRole returns the Role field if non-nil, zero value otherwise. - -### GetRoleOk - -`func (o *ShareRedeemOut) GetRoleOk() (*string, bool)` - -GetRoleOk returns a tuple with the Role field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRole - -`func (o *ShareRedeemOut) SetRole(v string)` - -SetRole sets Role field to given value. - - -### GetToken - -`func (o *ShareRedeemOut) GetToken() string` - -GetToken returns the Token field if non-nil, zero value otherwise. - -### GetTokenOk - -`func (o *ShareRedeemOut) GetTokenOk() (*string, bool)` - -GetTokenOk returns a tuple with the Token field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetToken - -`func (o *ShareRedeemOut) SetToken(v string)` - -SetToken sets Token field to given value. - - -### GetUrl - -`func (o *ShareRedeemOut) GetUrl() string` - -GetUrl returns the Url field if non-nil, zero value otherwise. - -### GetUrlOk - -`func (o *ShareRedeemOut) GetUrlOk() (*string, bool)` - -GetUrlOk returns a tuple with the Url field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUrl - -`func (o *ShareRedeemOut) SetUrl(v string)` - -SetUrl sets Url field to given value. - - - -[[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/sdk/go/docs/SharesAPI.md b/sdk/go/docs/SharesAPI.md new file mode 100644 index 0000000..5ad5713 --- /dev/null +++ b/sdk/go/docs/SharesAPI.md @@ -0,0 +1,405 @@ +# \SharesAPI + +All URIs are relative to *https://api.agentdrive.run* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SharesCreate**](SharesAPI.md#SharesCreate) | **Post** /v0/drives/{drive_id}/shares | Create Share +[**SharesList**](SharesAPI.md#SharesList) | **Get** /v0/drives/{drive_id}/shares | List Shares +[**SharesRead**](SharesAPI.md#SharesRead) | **Get** /v0/drives/{drive_id}/shares/{share_id} | Read Share +[**SharesRevoke**](SharesAPI.md#SharesRevoke) | **Delete** /v0/drives/{drive_id}/shares/{share_id} | Revoke Share +[**SharesRotate**](SharesAPI.md#SharesRotate) | **Post** /v0/drives/{drive_id}/shares/{share_id}/rotate | Rotate Share + + + +## SharesCreate + +> ShareCreateOut SharesCreate(ctx, driveId).IdempotencyKey(idempotencyKey).ShareCreateIn(shareCreateIn).Authorization(authorization).Execute() + +Create Share + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + idempotencyKey := "idempotencyKey_example" // string | + shareCreateIn := *openapiclient.NewShareCreateIn("ResourceId_example", "ResourceType_example") // ShareCreateIn | + authorization := "authorization_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SharesAPI.SharesCreate(context.Background(), driveId).IdempotencyKey(idempotencyKey).ShareCreateIn(shareCreateIn).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SharesAPI.SharesCreate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SharesCreate`: ShareCreateOut + fmt.Fprintf(os.Stdout, "Response from `SharesAPI.SharesCreate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSharesCreateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **idempotencyKey** | **string** | | + **shareCreateIn** | [**ShareCreateIn**](ShareCreateIn.md) | | + **authorization** | **string** | | + +### Return type + +[**ShareCreateOut**](ShareCreateOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **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) + + +## SharesList + +> ShareListOut SharesList(ctx, driveId).Lifecycle(lifecycle).Limit(limit).Cursor(cursor).ResourceType(resourceType).ResourceId(resourceId).Authorization(authorization).Execute() + +List Shares + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + lifecycle := "lifecycle_example" // string | (optional) (default to "active") + limit := int32(56) // int32 | (optional) + cursor := "cursor_example" // string | (optional) + resourceType := "resourceType_example" // string | (optional) + resourceId := "resourceId_example" // string | (optional) + authorization := "authorization_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SharesAPI.SharesList(context.Background(), driveId).Lifecycle(lifecycle).Limit(limit).Cursor(cursor).ResourceType(resourceType).ResourceId(resourceId).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SharesAPI.SharesList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SharesList`: ShareListOut + fmt.Fprintf(os.Stdout, "Response from `SharesAPI.SharesList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSharesListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + **lifecycle** | **string** | | [default to "active"] + **limit** | **int32** | | + **cursor** | **string** | | + **resourceType** | **string** | | + **resourceId** | **string** | | + **authorization** | **string** | | + +### Return type + +[**ShareListOut**](ShareListOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### 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) + + +## SharesRead + +> ShareOut SharesRead(ctx, driveId, shareId).IfNoneMatch(ifNoneMatch).Authorization(authorization).Execute() + +Read Share + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + shareId := "shareId_example" // string | + ifNoneMatch := "ifNoneMatch_example" // string | (optional) + authorization := "authorization_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SharesAPI.SharesRead(context.Background(), driveId, shareId).IfNoneMatch(ifNoneMatch).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SharesAPI.SharesRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SharesRead`: ShareOut + fmt.Fprintf(os.Stdout, "Response from `SharesAPI.SharesRead`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | +**shareId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSharesReadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **ifNoneMatch** | **string** | | + **authorization** | **string** | | + +### Return type + +[**ShareOut**](ShareOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### 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) + + +## SharesRevoke + +> ShareOut SharesRevoke(ctx, driveId, shareId).IdempotencyKey(idempotencyKey).IfMatch(ifMatch).Authorization(authorization).Execute() + +Revoke Share + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + shareId := "shareId_example" // string | + idempotencyKey := "idempotencyKey_example" // string | + ifMatch := "ifMatch_example" // string | + authorization := "authorization_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SharesAPI.SharesRevoke(context.Background(), driveId, shareId).IdempotencyKey(idempotencyKey).IfMatch(ifMatch).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SharesAPI.SharesRevoke``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SharesRevoke`: ShareOut + fmt.Fprintf(os.Stdout, "Response from `SharesAPI.SharesRevoke`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | +**shareId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSharesRevokeRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **idempotencyKey** | **string** | | + **ifMatch** | **string** | | + **authorization** | **string** | | + +### Return type + +[**ShareOut**](ShareOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### 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) + + +## SharesRotate + +> ShareCreateOut SharesRotate(ctx, driveId, shareId).IdempotencyKey(idempotencyKey).IfMatch(ifMatch).Authorization(authorization).Execute() + +Rotate Share + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + shareId := "shareId_example" // string | + idempotencyKey := "idempotencyKey_example" // string | + ifMatch := "ifMatch_example" // string | + authorization := "authorization_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SharesAPI.SharesRotate(context.Background(), driveId, shareId).IdempotencyKey(idempotencyKey).IfMatch(ifMatch).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SharesAPI.SharesRotate``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SharesRotate`: ShareCreateOut + fmt.Fprintf(os.Stdout, "Response from `SharesAPI.SharesRotate`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | +**shareId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSharesRotateRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **idempotencyKey** | **string** | | + **ifMatch** | **string** | | + **authorization** | **string** | | + +### Return type + +[**ShareCreateOut**](ShareCreateOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### 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) diff --git a/sdk/go/docs/SharesRedemptionAPI.md b/sdk/go/docs/SharesRedemptionAPI.md new file mode 100644 index 0000000..aecf88f --- /dev/null +++ b/sdk/go/docs/SharesRedemptionAPI.md @@ -0,0 +1,78 @@ +# \SharesRedemptionAPI + +All URIs are relative to *https://api.agentdrive.run* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**SharesRedeem**](SharesRedemptionAPI.md#SharesRedeem) | **Get** /s/{share_key} | Redeem Share + + + +## SharesRedeem + +> interface{} SharesRedeem(ctx, shareKey).Execute() + +Redeem Share + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + shareKey := "shareKey_example" // string | + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.SharesRedemptionAPI.SharesRedeem(context.Background(), shareKey).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `SharesRedemptionAPI.SharesRedeem``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `SharesRedeem`: interface{} + fmt.Fprintf(os.Stdout, "Response from `SharesRedemptionAPI.SharesRedeem`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**shareKey** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiSharesRedeemRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + +### Return type + +**interface{}** + +### Authorization + +No authorization required + +### 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) diff --git a/sdk/go/docs/SourceRef.md b/sdk/go/docs/SourceRef.md deleted file mode 100644 index bec23d4..0000000 --- a/sdk/go/docs/SourceRef.md +++ /dev/null @@ -1,106 +0,0 @@ -# SourceRef - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **string** | | -**Metadata** | Pointer to **map[string]interface{}** | | [optional] -**Type** | **string** | | - -## Methods - -### NewSourceRef - -`func NewSourceRef(id string, type_ string, ) *SourceRef` - -NewSourceRef instantiates a new SourceRef object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewSourceRefWithDefaults - -`func NewSourceRefWithDefaults() *SourceRef` - -NewSourceRefWithDefaults instantiates a new SourceRef object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetId - -`func (o *SourceRef) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *SourceRef) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *SourceRef) SetId(v string)` - -SetId sets Id field to given value. - - -### GetMetadata - -`func (o *SourceRef) GetMetadata() map[string]interface{}` - -GetMetadata returns the Metadata field if non-nil, zero value otherwise. - -### GetMetadataOk - -`func (o *SourceRef) GetMetadataOk() (*map[string]interface{}, bool)` - -GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMetadata - -`func (o *SourceRef) SetMetadata(v map[string]interface{})` - -SetMetadata sets Metadata field to given value. - -### HasMetadata - -`func (o *SourceRef) HasMetadata() bool` - -HasMetadata returns a boolean if a field has been set. - -### SetMetadataNil - -`func (o *SourceRef) SetMetadataNil(b bool)` - - SetMetadataNil sets the value for Metadata to be an explicit nil - -### UnsetMetadata -`func (o *SourceRef) UnsetMetadata()` - -UnsetMetadata ensures that no value is present for Metadata, not even an explicit nil -### GetType - -`func (o *SourceRef) GetType() string` - -GetType returns the Type field if non-nil, zero value otherwise. - -### GetTypeOk - -`func (o *SourceRef) GetTypeOk() (*string, bool)` - -GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetType - -`func (o *SourceRef) SetType(v string)` - -SetType sets Type field to given value. - - - -[[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/sdk/go/docs/StorageBreakdownOut.md b/sdk/go/docs/StorageBreakdownOut.md deleted file mode 100644 index 12c453b..0000000 --- a/sdk/go/docs/StorageBreakdownOut.md +++ /dev/null @@ -1,112 +0,0 @@ -# StorageBreakdownOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AsOf** | **string** | | -**LiveBytes** | **int32** | | -**TrashBytes** | **int32** | | -**VersionBytes** | **int32** | | - -## Methods - -### NewStorageBreakdownOut - -`func NewStorageBreakdownOut(asOf string, liveBytes int32, trashBytes int32, versionBytes int32, ) *StorageBreakdownOut` - -NewStorageBreakdownOut instantiates a new StorageBreakdownOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewStorageBreakdownOutWithDefaults - -`func NewStorageBreakdownOutWithDefaults() *StorageBreakdownOut` - -NewStorageBreakdownOutWithDefaults instantiates a new StorageBreakdownOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetAsOf - -`func (o *StorageBreakdownOut) GetAsOf() string` - -GetAsOf returns the AsOf field if non-nil, zero value otherwise. - -### GetAsOfOk - -`func (o *StorageBreakdownOut) GetAsOfOk() (*string, bool)` - -GetAsOfOk returns a tuple with the AsOf field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAsOf - -`func (o *StorageBreakdownOut) SetAsOf(v string)` - -SetAsOf sets AsOf field to given value. - - -### GetLiveBytes - -`func (o *StorageBreakdownOut) GetLiveBytes() int32` - -GetLiveBytes returns the LiveBytes field if non-nil, zero value otherwise. - -### GetLiveBytesOk - -`func (o *StorageBreakdownOut) GetLiveBytesOk() (*int32, bool)` - -GetLiveBytesOk returns a tuple with the LiveBytes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLiveBytes - -`func (o *StorageBreakdownOut) SetLiveBytes(v int32)` - -SetLiveBytes sets LiveBytes field to given value. - - -### GetTrashBytes - -`func (o *StorageBreakdownOut) GetTrashBytes() int32` - -GetTrashBytes returns the TrashBytes field if non-nil, zero value otherwise. - -### GetTrashBytesOk - -`func (o *StorageBreakdownOut) GetTrashBytesOk() (*int32, bool)` - -GetTrashBytesOk returns a tuple with the TrashBytes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTrashBytes - -`func (o *StorageBreakdownOut) SetTrashBytes(v int32)` - -SetTrashBytes sets TrashBytes field to given value. - - -### GetVersionBytes - -`func (o *StorageBreakdownOut) GetVersionBytes() int32` - -GetVersionBytes returns the VersionBytes field if non-nil, zero value otherwise. - -### GetVersionBytesOk - -`func (o *StorageBreakdownOut) GetVersionBytesOk() (*int32, bool)` - -GetVersionBytesOk returns a tuple with the VersionBytes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVersionBytes - -`func (o *StorageBreakdownOut) SetVersionBytes(v int32)` - -SetVersionBytes sets VersionBytes field to given value. - - - -[[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/sdk/go/docs/StorageFootprintOut.md b/sdk/go/docs/StorageFootprintOut.md deleted file mode 100644 index dcb722d..0000000 --- a/sdk/go/docs/StorageFootprintOut.md +++ /dev/null @@ -1,148 +0,0 @@ -# StorageFootprintOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AsOf** | Pointer to **NullableString** | | [optional] -**LiveBytes** | **int32** | | -**TotalBytes** | **int32** | | -**TrashBytes** | **int32** | | -**VersionBytes** | **int32** | | - -## Methods - -### NewStorageFootprintOut - -`func NewStorageFootprintOut(liveBytes int32, totalBytes int32, trashBytes int32, versionBytes int32, ) *StorageFootprintOut` - -NewStorageFootprintOut instantiates a new StorageFootprintOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewStorageFootprintOutWithDefaults - -`func NewStorageFootprintOutWithDefaults() *StorageFootprintOut` - -NewStorageFootprintOutWithDefaults instantiates a new StorageFootprintOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetAsOf - -`func (o *StorageFootprintOut) GetAsOf() string` - -GetAsOf returns the AsOf field if non-nil, zero value otherwise. - -### GetAsOfOk - -`func (o *StorageFootprintOut) GetAsOfOk() (*string, bool)` - -GetAsOfOk returns a tuple with the AsOf field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAsOf - -`func (o *StorageFootprintOut) SetAsOf(v string)` - -SetAsOf sets AsOf field to given value. - -### HasAsOf - -`func (o *StorageFootprintOut) HasAsOf() bool` - -HasAsOf returns a boolean if a field has been set. - -### SetAsOfNil - -`func (o *StorageFootprintOut) SetAsOfNil(b bool)` - - SetAsOfNil sets the value for AsOf to be an explicit nil - -### UnsetAsOf -`func (o *StorageFootprintOut) UnsetAsOf()` - -UnsetAsOf ensures that no value is present for AsOf, not even an explicit nil -### GetLiveBytes - -`func (o *StorageFootprintOut) GetLiveBytes() int32` - -GetLiveBytes returns the LiveBytes field if non-nil, zero value otherwise. - -### GetLiveBytesOk - -`func (o *StorageFootprintOut) GetLiveBytesOk() (*int32, bool)` - -GetLiveBytesOk returns a tuple with the LiveBytes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLiveBytes - -`func (o *StorageFootprintOut) SetLiveBytes(v int32)` - -SetLiveBytes sets LiveBytes field to given value. - - -### GetTotalBytes - -`func (o *StorageFootprintOut) GetTotalBytes() int32` - -GetTotalBytes returns the TotalBytes field if non-nil, zero value otherwise. - -### GetTotalBytesOk - -`func (o *StorageFootprintOut) GetTotalBytesOk() (*int32, bool)` - -GetTotalBytesOk returns a tuple with the TotalBytes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTotalBytes - -`func (o *StorageFootprintOut) SetTotalBytes(v int32)` - -SetTotalBytes sets TotalBytes field to given value. - - -### GetTrashBytes - -`func (o *StorageFootprintOut) GetTrashBytes() int32` - -GetTrashBytes returns the TrashBytes field if non-nil, zero value otherwise. - -### GetTrashBytesOk - -`func (o *StorageFootprintOut) GetTrashBytesOk() (*int32, bool)` - -GetTrashBytesOk returns a tuple with the TrashBytes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTrashBytes - -`func (o *StorageFootprintOut) SetTrashBytes(v int32)` - -SetTrashBytes sets TrashBytes field to given value. - - -### GetVersionBytes - -`func (o *StorageFootprintOut) GetVersionBytes() int32` - -GetVersionBytes returns the VersionBytes field if non-nil, zero value otherwise. - -### GetVersionBytesOk - -`func (o *StorageFootprintOut) GetVersionBytesOk() (*int32, bool)` - -GetVersionBytesOk returns a tuple with the VersionBytes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVersionBytes - -`func (o *StorageFootprintOut) SetVersionBytes(v int32)` - -SetVersionBytes sets VersionBytes field to given value. - - - -[[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/sdk/go/docs/TokenResponse.md b/sdk/go/docs/TokenResponse.md deleted file mode 100644 index cefc97f..0000000 --- a/sdk/go/docs/TokenResponse.md +++ /dev/null @@ -1,153 +0,0 @@ -# TokenResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AccessToken** | **string** | | -**ExpiresIn** | **int32** | Seconds until access_token expiry. | -**IdentityAssertion** | Pointer to **NullableString** | | [optional] -**Scope** | **string** | | -**TokenType** | Pointer to **string** | | [optional] [default to "Bearer"] - -## Methods - -### NewTokenResponse - -`func NewTokenResponse(accessToken string, expiresIn int32, scope string, ) *TokenResponse` - -NewTokenResponse instantiates a new TokenResponse object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewTokenResponseWithDefaults - -`func NewTokenResponseWithDefaults() *TokenResponse` - -NewTokenResponseWithDefaults instantiates a new TokenResponse object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetAccessToken - -`func (o *TokenResponse) GetAccessToken() string` - -GetAccessToken returns the AccessToken field if non-nil, zero value otherwise. - -### GetAccessTokenOk - -`func (o *TokenResponse) GetAccessTokenOk() (*string, bool)` - -GetAccessTokenOk returns a tuple with the AccessToken field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetAccessToken - -`func (o *TokenResponse) SetAccessToken(v string)` - -SetAccessToken sets AccessToken field to given value. - - -### GetExpiresIn - -`func (o *TokenResponse) GetExpiresIn() int32` - -GetExpiresIn returns the ExpiresIn field if non-nil, zero value otherwise. - -### GetExpiresInOk - -`func (o *TokenResponse) GetExpiresInOk() (*int32, bool)` - -GetExpiresInOk returns a tuple with the ExpiresIn field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExpiresIn - -`func (o *TokenResponse) SetExpiresIn(v int32)` - -SetExpiresIn sets ExpiresIn field to given value. - - -### GetIdentityAssertion - -`func (o *TokenResponse) GetIdentityAssertion() string` - -GetIdentityAssertion returns the IdentityAssertion field if non-nil, zero value otherwise. - -### GetIdentityAssertionOk - -`func (o *TokenResponse) GetIdentityAssertionOk() (*string, bool)` - -GetIdentityAssertionOk returns a tuple with the IdentityAssertion field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIdentityAssertion - -`func (o *TokenResponse) SetIdentityAssertion(v string)` - -SetIdentityAssertion sets IdentityAssertion field to given value. - -### HasIdentityAssertion - -`func (o *TokenResponse) HasIdentityAssertion() bool` - -HasIdentityAssertion returns a boolean if a field has been set. - -### SetIdentityAssertionNil - -`func (o *TokenResponse) SetIdentityAssertionNil(b bool)` - - SetIdentityAssertionNil sets the value for IdentityAssertion to be an explicit nil - -### UnsetIdentityAssertion -`func (o *TokenResponse) UnsetIdentityAssertion()` - -UnsetIdentityAssertion ensures that no value is present for IdentityAssertion, not even an explicit nil -### GetScope - -`func (o *TokenResponse) GetScope() string` - -GetScope returns the Scope field if non-nil, zero value otherwise. - -### GetScopeOk - -`func (o *TokenResponse) GetScopeOk() (*string, bool)` - -GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetScope - -`func (o *TokenResponse) SetScope(v string)` - -SetScope sets Scope field to given value. - - -### GetTokenType - -`func (o *TokenResponse) GetTokenType() string` - -GetTokenType returns the TokenType field if non-nil, zero value otherwise. - -### GetTokenTypeOk - -`func (o *TokenResponse) GetTokenTypeOk() (*string, bool)` - -GetTokenTypeOk returns a tuple with the TokenType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTokenType - -`func (o *TokenResponse) SetTokenType(v string)` - -SetTokenType sets TokenType field to given value. - -### HasTokenType - -`func (o *TokenResponse) HasTokenType() bool` - -HasTokenType returns a boolean if a field has been set. - - -[[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/sdk/go/docs/TokenUsageOut.md b/sdk/go/docs/TokenUsageOut.md deleted file mode 100644 index f292459..0000000 --- a/sdk/go/docs/TokenUsageOut.md +++ /dev/null @@ -1,112 +0,0 @@ -# TokenUsageOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Embed** | **int32** | | -**LlmCached** | **int32** | | -**LlmInput** | **int32** | | -**LlmOutput** | **int32** | | - -## Methods - -### NewTokenUsageOut - -`func NewTokenUsageOut(embed int32, llmCached int32, llmInput int32, llmOutput int32, ) *TokenUsageOut` - -NewTokenUsageOut instantiates a new TokenUsageOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewTokenUsageOutWithDefaults - -`func NewTokenUsageOutWithDefaults() *TokenUsageOut` - -NewTokenUsageOutWithDefaults instantiates a new TokenUsageOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetEmbed - -`func (o *TokenUsageOut) GetEmbed() int32` - -GetEmbed returns the Embed field if non-nil, zero value otherwise. - -### GetEmbedOk - -`func (o *TokenUsageOut) GetEmbedOk() (*int32, bool)` - -GetEmbedOk returns a tuple with the Embed field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEmbed - -`func (o *TokenUsageOut) SetEmbed(v int32)` - -SetEmbed sets Embed field to given value. - - -### GetLlmCached - -`func (o *TokenUsageOut) GetLlmCached() int32` - -GetLlmCached returns the LlmCached field if non-nil, zero value otherwise. - -### GetLlmCachedOk - -`func (o *TokenUsageOut) GetLlmCachedOk() (*int32, bool)` - -GetLlmCachedOk returns a tuple with the LlmCached field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLlmCached - -`func (o *TokenUsageOut) SetLlmCached(v int32)` - -SetLlmCached sets LlmCached field to given value. - - -### GetLlmInput - -`func (o *TokenUsageOut) GetLlmInput() int32` - -GetLlmInput returns the LlmInput field if non-nil, zero value otherwise. - -### GetLlmInputOk - -`func (o *TokenUsageOut) GetLlmInputOk() (*int32, bool)` - -GetLlmInputOk returns a tuple with the LlmInput field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLlmInput - -`func (o *TokenUsageOut) SetLlmInput(v int32)` - -SetLlmInput sets LlmInput field to given value. - - -### GetLlmOutput - -`func (o *TokenUsageOut) GetLlmOutput() int32` - -GetLlmOutput returns the LlmOutput field if non-nil, zero value otherwise. - -### GetLlmOutputOk - -`func (o *TokenUsageOut) GetLlmOutputOk() (*int32, bool)` - -GetLlmOutputOk returns a tuple with the LlmOutput field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLlmOutput - -`func (o *TokenUsageOut) SetLlmOutput(v int32)` - -SetLlmOutput sets LlmOutput field to given value. - - - -[[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/sdk/go/docs/TokensAPI.md b/sdk/go/docs/TokensAPI.md deleted file mode 100644 index 93ed131..0000000 --- a/sdk/go/docs/TokensAPI.md +++ /dev/null @@ -1,147 +0,0 @@ -# \TokensAPI - -All URIs are relative to *https://api.agentdrive.run* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**ListTokensV0TokensGet**](TokensAPI.md#ListTokensV0TokensGet) | **Get** /v0/tokens | List your user-identity tokens -[**RevokeTokenV0TokensTokenIdRevokePost**](TokensAPI.md#RevokeTokenV0TokensTokenIdRevokePost) | **Post** /v0/tokens/{token_id}/revoke | Revoke one of your user-identity tokens - - - -## ListTokensV0TokensGet - -> UserTokenList ListTokensV0TokensGet(ctx).Cursor(cursor).Limit(limit).Execute() - -List your user-identity tokens - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - cursor := "cursor_example" // string | (optional) - limit := int32(56) // int32 | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.TokensAPI.ListTokensV0TokensGet(context.Background()).Cursor(cursor).Limit(limit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TokensAPI.ListTokensV0TokensGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListTokensV0TokensGet`: UserTokenList - fmt.Fprintf(os.Stdout, "Response from `TokensAPI.ListTokensV0TokensGet`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiListTokensV0TokensGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **cursor** | **string** | | - **limit** | **int32** | | - -### Return type - -[**UserTokenList**](UserTokenList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## RevokeTokenV0TokensTokenIdRevokePost - -> UserTokenOut RevokeTokenV0TokensTokenIdRevokePost(ctx, tokenId).Execute() - -Revoke one of your user-identity tokens - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - tokenId := "tokenId_example" // string | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.TokensAPI.RevokeTokenV0TokensTokenIdRevokePost(context.Background(), tokenId).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `TokensAPI.RevokeTokenV0TokensTokenIdRevokePost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RevokeTokenV0TokensTokenIdRevokePost`: UserTokenOut - fmt.Fprintf(os.Stdout, "Response from `TokensAPI.RevokeTokenV0TokensTokenIdRevokePost`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**tokenId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiRevokeTokenV0TokensTokenIdRevokePostRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - -### Return type - -[**UserTokenOut**](UserTokenOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) diff --git a/sdk/go/docs/TrashArtifactOut.md b/sdk/go/docs/TrashArtifactOut.md deleted file mode 100644 index 7484bec..0000000 --- a/sdk/go/docs/TrashArtifactOut.md +++ /dev/null @@ -1,184 +0,0 @@ -# TrashArtifactOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DeletedAt** | Pointer to **NullableTime** | | [optional] -**Id** | **string** | | -**Path** | **string** | | -**PurgeAt** | Pointer to **NullableTime** | | [optional] -**RestoreUrl** | **string** | | -**SizeBytes** | **int32** | | - -## Methods - -### NewTrashArtifactOut - -`func NewTrashArtifactOut(id string, path string, restoreUrl string, sizeBytes int32, ) *TrashArtifactOut` - -NewTrashArtifactOut instantiates a new TrashArtifactOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewTrashArtifactOutWithDefaults - -`func NewTrashArtifactOutWithDefaults() *TrashArtifactOut` - -NewTrashArtifactOutWithDefaults instantiates a new TrashArtifactOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetDeletedAt - -`func (o *TrashArtifactOut) GetDeletedAt() time.Time` - -GetDeletedAt returns the DeletedAt field if non-nil, zero value otherwise. - -### GetDeletedAtOk - -`func (o *TrashArtifactOut) GetDeletedAtOk() (*time.Time, bool)` - -GetDeletedAtOk returns a tuple with the DeletedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDeletedAt - -`func (o *TrashArtifactOut) SetDeletedAt(v time.Time)` - -SetDeletedAt sets DeletedAt field to given value. - -### HasDeletedAt - -`func (o *TrashArtifactOut) HasDeletedAt() bool` - -HasDeletedAt returns a boolean if a field has been set. - -### SetDeletedAtNil - -`func (o *TrashArtifactOut) SetDeletedAtNil(b bool)` - - SetDeletedAtNil sets the value for DeletedAt to be an explicit nil - -### UnsetDeletedAt -`func (o *TrashArtifactOut) UnsetDeletedAt()` - -UnsetDeletedAt ensures that no value is present for DeletedAt, not even an explicit nil -### GetId - -`func (o *TrashArtifactOut) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *TrashArtifactOut) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *TrashArtifactOut) SetId(v string)` - -SetId sets Id field to given value. - - -### GetPath - -`func (o *TrashArtifactOut) GetPath() string` - -GetPath returns the Path field if non-nil, zero value otherwise. - -### GetPathOk - -`func (o *TrashArtifactOut) GetPathOk() (*string, bool)` - -GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPath - -`func (o *TrashArtifactOut) SetPath(v string)` - -SetPath sets Path field to given value. - - -### GetPurgeAt - -`func (o *TrashArtifactOut) GetPurgeAt() time.Time` - -GetPurgeAt returns the PurgeAt field if non-nil, zero value otherwise. - -### GetPurgeAtOk - -`func (o *TrashArtifactOut) GetPurgeAtOk() (*time.Time, bool)` - -GetPurgeAtOk returns a tuple with the PurgeAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPurgeAt - -`func (o *TrashArtifactOut) SetPurgeAt(v time.Time)` - -SetPurgeAt sets PurgeAt field to given value. - -### HasPurgeAt - -`func (o *TrashArtifactOut) HasPurgeAt() bool` - -HasPurgeAt returns a boolean if a field has been set. - -### SetPurgeAtNil - -`func (o *TrashArtifactOut) SetPurgeAtNil(b bool)` - - SetPurgeAtNil sets the value for PurgeAt to be an explicit nil - -### UnsetPurgeAt -`func (o *TrashArtifactOut) UnsetPurgeAt()` - -UnsetPurgeAt ensures that no value is present for PurgeAt, not even an explicit nil -### GetRestoreUrl - -`func (o *TrashArtifactOut) GetRestoreUrl() string` - -GetRestoreUrl returns the RestoreUrl field if non-nil, zero value otherwise. - -### GetRestoreUrlOk - -`func (o *TrashArtifactOut) GetRestoreUrlOk() (*string, bool)` - -GetRestoreUrlOk returns a tuple with the RestoreUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRestoreUrl - -`func (o *TrashArtifactOut) SetRestoreUrl(v string)` - -SetRestoreUrl sets RestoreUrl field to given value. - - -### GetSizeBytes - -`func (o *TrashArtifactOut) GetSizeBytes() int32` - -GetSizeBytes returns the SizeBytes field if non-nil, zero value otherwise. - -### GetSizeBytesOk - -`func (o *TrashArtifactOut) GetSizeBytesOk() (*int32, bool)` - -GetSizeBytesOk returns a tuple with the SizeBytes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSizeBytes - -`func (o *TrashArtifactOut) SetSizeBytes(v int32)` - -SetSizeBytes sets SizeBytes field to given value. - - - -[[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/sdk/go/docs/TrashDriveOut.md b/sdk/go/docs/TrashDriveOut.md deleted file mode 100644 index e9d18fe..0000000 --- a/sdk/go/docs/TrashDriveOut.md +++ /dev/null @@ -1,85 +0,0 @@ -# TrashDriveOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**DeletedAt** | Pointer to **NullableTime** | | [optional] -**Id** | **string** | | - -## Methods - -### NewTrashDriveOut - -`func NewTrashDriveOut(id string, ) *TrashDriveOut` - -NewTrashDriveOut instantiates a new TrashDriveOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewTrashDriveOutWithDefaults - -`func NewTrashDriveOutWithDefaults() *TrashDriveOut` - -NewTrashDriveOutWithDefaults instantiates a new TrashDriveOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetDeletedAt - -`func (o *TrashDriveOut) GetDeletedAt() time.Time` - -GetDeletedAt returns the DeletedAt field if non-nil, zero value otherwise. - -### GetDeletedAtOk - -`func (o *TrashDriveOut) GetDeletedAtOk() (*time.Time, bool)` - -GetDeletedAtOk returns a tuple with the DeletedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDeletedAt - -`func (o *TrashDriveOut) SetDeletedAt(v time.Time)` - -SetDeletedAt sets DeletedAt field to given value. - -### HasDeletedAt - -`func (o *TrashDriveOut) HasDeletedAt() bool` - -HasDeletedAt returns a boolean if a field has been set. - -### SetDeletedAtNil - -`func (o *TrashDriveOut) SetDeletedAtNil(b bool)` - - SetDeletedAtNil sets the value for DeletedAt to be an explicit nil - -### UnsetDeletedAt -`func (o *TrashDriveOut) UnsetDeletedAt()` - -UnsetDeletedAt ensures that no value is present for DeletedAt, not even an explicit nil -### GetId - -`func (o *TrashDriveOut) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *TrashDriveOut) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *TrashDriveOut) SetId(v string)` - -SetId sets Id field to given value. - - - -[[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/sdk/go/docs/TrashOut.md b/sdk/go/docs/TrashOut.md deleted file mode 100644 index 6d4923d..0000000 --- a/sdk/go/docs/TrashOut.md +++ /dev/null @@ -1,127 +0,0 @@ -# TrashOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Artifacts** | [**[]TrashArtifactOut**](TrashArtifactOut.md) | Deprecated alias of items. | -**Drive** | [**TrashDriveOut**](TrashDriveOut.md) | | -**Items** | [**[]TrashArtifactOut**](TrashArtifactOut.md) | | -**NextCursor** | Pointer to **NullableString** | | [optional] - -## Methods - -### NewTrashOut - -`func NewTrashOut(artifacts []TrashArtifactOut, drive TrashDriveOut, items []TrashArtifactOut, ) *TrashOut` - -NewTrashOut instantiates a new TrashOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewTrashOutWithDefaults - -`func NewTrashOutWithDefaults() *TrashOut` - -NewTrashOutWithDefaults instantiates a new TrashOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetArtifacts - -`func (o *TrashOut) GetArtifacts() []TrashArtifactOut` - -GetArtifacts returns the Artifacts field if non-nil, zero value otherwise. - -### GetArtifactsOk - -`func (o *TrashOut) GetArtifactsOk() (*[]TrashArtifactOut, bool)` - -GetArtifactsOk returns a tuple with the Artifacts field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetArtifacts - -`func (o *TrashOut) SetArtifacts(v []TrashArtifactOut)` - -SetArtifacts sets Artifacts field to given value. - - -### GetDrive - -`func (o *TrashOut) GetDrive() TrashDriveOut` - -GetDrive returns the Drive field if non-nil, zero value otherwise. - -### GetDriveOk - -`func (o *TrashOut) GetDriveOk() (*TrashDriveOut, bool)` - -GetDriveOk returns a tuple with the Drive field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDrive - -`func (o *TrashOut) SetDrive(v TrashDriveOut)` - -SetDrive sets Drive field to given value. - - -### GetItems - -`func (o *TrashOut) GetItems() []TrashArtifactOut` - -GetItems returns the Items field if non-nil, zero value otherwise. - -### GetItemsOk - -`func (o *TrashOut) GetItemsOk() (*[]TrashArtifactOut, bool)` - -GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetItems - -`func (o *TrashOut) SetItems(v []TrashArtifactOut)` - -SetItems sets Items field to given value. - - -### GetNextCursor - -`func (o *TrashOut) GetNextCursor() string` - -GetNextCursor returns the NextCursor field if non-nil, zero value otherwise. - -### GetNextCursorOk - -`func (o *TrashOut) GetNextCursorOk() (*string, bool)` - -GetNextCursorOk returns a tuple with the NextCursor field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNextCursor - -`func (o *TrashOut) SetNextCursor(v string)` - -SetNextCursor sets NextCursor field to given value. - -### HasNextCursor - -`func (o *TrashOut) HasNextCursor() bool` - -HasNextCursor returns a boolean if a field has been set. - -### SetNextCursorNil - -`func (o *TrashOut) SetNextCursorNil(b bool)` - - SetNextCursorNil sets the value for NextCursor to be an explicit nil - -### UnsetNextCursor -`func (o *TrashOut) UnsetNextCursor()` - -UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil - -[[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/sdk/go/docs/UploadAbortOut.md b/sdk/go/docs/UploadAbortOut.md deleted file mode 100644 index edeaea9..0000000 --- a/sdk/go/docs/UploadAbortOut.md +++ /dev/null @@ -1,96 +0,0 @@ -# UploadAbortOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ReleasedBytes** | **int32** | | -**State** | Pointer to **string** | | [optional] [default to "aborted"] -**UploadId** | **string** | | - -## Methods - -### NewUploadAbortOut - -`func NewUploadAbortOut(releasedBytes int32, uploadId string, ) *UploadAbortOut` - -NewUploadAbortOut instantiates a new UploadAbortOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUploadAbortOutWithDefaults - -`func NewUploadAbortOutWithDefaults() *UploadAbortOut` - -NewUploadAbortOutWithDefaults instantiates a new UploadAbortOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetReleasedBytes - -`func (o *UploadAbortOut) GetReleasedBytes() int32` - -GetReleasedBytes returns the ReleasedBytes field if non-nil, zero value otherwise. - -### GetReleasedBytesOk - -`func (o *UploadAbortOut) GetReleasedBytesOk() (*int32, bool)` - -GetReleasedBytesOk returns a tuple with the ReleasedBytes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetReleasedBytes - -`func (o *UploadAbortOut) SetReleasedBytes(v int32)` - -SetReleasedBytes sets ReleasedBytes field to given value. - - -### GetState - -`func (o *UploadAbortOut) GetState() string` - -GetState returns the State field if non-nil, zero value otherwise. - -### GetStateOk - -`func (o *UploadAbortOut) GetStateOk() (*string, bool)` - -GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetState - -`func (o *UploadAbortOut) SetState(v string)` - -SetState sets State field to given value. - -### HasState - -`func (o *UploadAbortOut) HasState() bool` - -HasState returns a boolean if a field has been set. - -### GetUploadId - -`func (o *UploadAbortOut) GetUploadId() string` - -GetUploadId returns the UploadId field if non-nil, zero value otherwise. - -### GetUploadIdOk - -`func (o *UploadAbortOut) GetUploadIdOk() (*string, bool)` - -GetUploadIdOk returns a tuple with the UploadId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUploadId - -`func (o *UploadAbortOut) SetUploadId(v string)` - -SetUploadId sets UploadId field to given value. - - - -[[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/sdk/go/docs/UploadBeginIn.md b/sdk/go/docs/UploadBeginIn.md deleted file mode 100644 index 00b105a..0000000 --- a/sdk/go/docs/UploadBeginIn.md +++ /dev/null @@ -1,410 +0,0 @@ -# UploadBeginIn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ActorName** | Pointer to **NullableString** | | [optional] -**ChangeSummary** | Pointer to **NullableString** | | [optional] -**ContentType** | Pointer to **string** | | [optional] [default to "application/octet-stream"] -**CorsOrigin** | Pointer to **NullableString** | Web origin (scheme://host[:port]) of the browser that will PUT the bytes, e.g. `https://app.example.com`. Set this when the `upload_url` is handed to browser code: GCS binds CORS at session initiate, so the returned session only echoes `Access-Control-Allow-Origin` (and is thus PUT-able from a browser) when opened with the caller's origin. A trusted backend relaying a browser upload forwards the browser's `Origin` here. Omit for server/desktop uploads (no CORS enforcement). | [optional] -**Crc32c** | Pointer to **NullableString** | | [optional] -**IfMatch** | Pointer to **NullableInt32** | | [optional] -**IfNoneMatch** | Pointer to **bool** | | [optional] [default to false] -**Labels** | Pointer to **[]string** | | [optional] -**Metadata** | Pointer to **map[string]interface{}** | | [optional] -**Path** | **string** | | -**SizeBytes** | **int32** | | -**Source** | Pointer to [**NullableArtifactSource**](ArtifactSource.md) | | [optional] - -## Methods - -### NewUploadBeginIn - -`func NewUploadBeginIn(path string, sizeBytes int32, ) *UploadBeginIn` - -NewUploadBeginIn instantiates a new UploadBeginIn object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUploadBeginInWithDefaults - -`func NewUploadBeginInWithDefaults() *UploadBeginIn` - -NewUploadBeginInWithDefaults instantiates a new UploadBeginIn object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetActorName - -`func (o *UploadBeginIn) GetActorName() string` - -GetActorName returns the ActorName field if non-nil, zero value otherwise. - -### GetActorNameOk - -`func (o *UploadBeginIn) GetActorNameOk() (*string, bool)` - -GetActorNameOk returns a tuple with the ActorName field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetActorName - -`func (o *UploadBeginIn) SetActorName(v string)` - -SetActorName sets ActorName field to given value. - -### HasActorName - -`func (o *UploadBeginIn) HasActorName() bool` - -HasActorName returns a boolean if a field has been set. - -### SetActorNameNil - -`func (o *UploadBeginIn) SetActorNameNil(b bool)` - - SetActorNameNil sets the value for ActorName to be an explicit nil - -### UnsetActorName -`func (o *UploadBeginIn) UnsetActorName()` - -UnsetActorName ensures that no value is present for ActorName, not even an explicit nil -### GetChangeSummary - -`func (o *UploadBeginIn) GetChangeSummary() string` - -GetChangeSummary returns the ChangeSummary field if non-nil, zero value otherwise. - -### GetChangeSummaryOk - -`func (o *UploadBeginIn) GetChangeSummaryOk() (*string, bool)` - -GetChangeSummaryOk returns a tuple with the ChangeSummary field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetChangeSummary - -`func (o *UploadBeginIn) SetChangeSummary(v string)` - -SetChangeSummary sets ChangeSummary field to given value. - -### HasChangeSummary - -`func (o *UploadBeginIn) HasChangeSummary() bool` - -HasChangeSummary returns a boolean if a field has been set. - -### SetChangeSummaryNil - -`func (o *UploadBeginIn) SetChangeSummaryNil(b bool)` - - SetChangeSummaryNil sets the value for ChangeSummary to be an explicit nil - -### UnsetChangeSummary -`func (o *UploadBeginIn) UnsetChangeSummary()` - -UnsetChangeSummary ensures that no value is present for ChangeSummary, not even an explicit nil -### GetContentType - -`func (o *UploadBeginIn) GetContentType() string` - -GetContentType returns the ContentType field if non-nil, zero value otherwise. - -### GetContentTypeOk - -`func (o *UploadBeginIn) GetContentTypeOk() (*string, bool)` - -GetContentTypeOk returns a tuple with the ContentType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetContentType - -`func (o *UploadBeginIn) SetContentType(v string)` - -SetContentType sets ContentType field to given value. - -### HasContentType - -`func (o *UploadBeginIn) HasContentType() bool` - -HasContentType returns a boolean if a field has been set. - -### GetCorsOrigin - -`func (o *UploadBeginIn) GetCorsOrigin() string` - -GetCorsOrigin returns the CorsOrigin field if non-nil, zero value otherwise. - -### GetCorsOriginOk - -`func (o *UploadBeginIn) GetCorsOriginOk() (*string, bool)` - -GetCorsOriginOk returns a tuple with the CorsOrigin field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCorsOrigin - -`func (o *UploadBeginIn) SetCorsOrigin(v string)` - -SetCorsOrigin sets CorsOrigin field to given value. - -### HasCorsOrigin - -`func (o *UploadBeginIn) HasCorsOrigin() bool` - -HasCorsOrigin returns a boolean if a field has been set. - -### SetCorsOriginNil - -`func (o *UploadBeginIn) SetCorsOriginNil(b bool)` - - SetCorsOriginNil sets the value for CorsOrigin to be an explicit nil - -### UnsetCorsOrigin -`func (o *UploadBeginIn) UnsetCorsOrigin()` - -UnsetCorsOrigin ensures that no value is present for CorsOrigin, not even an explicit nil -### GetCrc32c - -`func (o *UploadBeginIn) GetCrc32c() string` - -GetCrc32c returns the Crc32c field if non-nil, zero value otherwise. - -### GetCrc32cOk - -`func (o *UploadBeginIn) GetCrc32cOk() (*string, bool)` - -GetCrc32cOk returns a tuple with the Crc32c field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCrc32c - -`func (o *UploadBeginIn) SetCrc32c(v string)` - -SetCrc32c sets Crc32c field to given value. - -### HasCrc32c - -`func (o *UploadBeginIn) HasCrc32c() bool` - -HasCrc32c returns a boolean if a field has been set. - -### SetCrc32cNil - -`func (o *UploadBeginIn) SetCrc32cNil(b bool)` - - SetCrc32cNil sets the value for Crc32c to be an explicit nil - -### UnsetCrc32c -`func (o *UploadBeginIn) UnsetCrc32c()` - -UnsetCrc32c ensures that no value is present for Crc32c, not even an explicit nil -### GetIfMatch - -`func (o *UploadBeginIn) GetIfMatch() int32` - -GetIfMatch returns the IfMatch field if non-nil, zero value otherwise. - -### GetIfMatchOk - -`func (o *UploadBeginIn) GetIfMatchOk() (*int32, bool)` - -GetIfMatchOk returns a tuple with the IfMatch field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIfMatch - -`func (o *UploadBeginIn) SetIfMatch(v int32)` - -SetIfMatch sets IfMatch field to given value. - -### HasIfMatch - -`func (o *UploadBeginIn) HasIfMatch() bool` - -HasIfMatch returns a boolean if a field has been set. - -### SetIfMatchNil - -`func (o *UploadBeginIn) SetIfMatchNil(b bool)` - - SetIfMatchNil sets the value for IfMatch to be an explicit nil - -### UnsetIfMatch -`func (o *UploadBeginIn) UnsetIfMatch()` - -UnsetIfMatch ensures that no value is present for IfMatch, not even an explicit nil -### GetIfNoneMatch - -`func (o *UploadBeginIn) GetIfNoneMatch() bool` - -GetIfNoneMatch returns the IfNoneMatch field if non-nil, zero value otherwise. - -### GetIfNoneMatchOk - -`func (o *UploadBeginIn) GetIfNoneMatchOk() (*bool, bool)` - -GetIfNoneMatchOk returns a tuple with the IfNoneMatch field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetIfNoneMatch - -`func (o *UploadBeginIn) SetIfNoneMatch(v bool)` - -SetIfNoneMatch sets IfNoneMatch field to given value. - -### HasIfNoneMatch - -`func (o *UploadBeginIn) HasIfNoneMatch() bool` - -HasIfNoneMatch returns a boolean if a field has been set. - -### GetLabels - -`func (o *UploadBeginIn) GetLabels() []string` - -GetLabels returns the Labels field if non-nil, zero value otherwise. - -### GetLabelsOk - -`func (o *UploadBeginIn) GetLabelsOk() (*[]string, bool)` - -GetLabelsOk returns a tuple with the Labels field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLabels - -`func (o *UploadBeginIn) SetLabels(v []string)` - -SetLabels sets Labels field to given value. - -### HasLabels - -`func (o *UploadBeginIn) HasLabels() bool` - -HasLabels returns a boolean if a field has been set. - -### SetLabelsNil - -`func (o *UploadBeginIn) SetLabelsNil(b bool)` - - SetLabelsNil sets the value for Labels to be an explicit nil - -### UnsetLabels -`func (o *UploadBeginIn) UnsetLabels()` - -UnsetLabels ensures that no value is present for Labels, not even an explicit nil -### GetMetadata - -`func (o *UploadBeginIn) GetMetadata() map[string]interface{}` - -GetMetadata returns the Metadata field if non-nil, zero value otherwise. - -### GetMetadataOk - -`func (o *UploadBeginIn) GetMetadataOk() (*map[string]interface{}, bool)` - -GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMetadata - -`func (o *UploadBeginIn) SetMetadata(v map[string]interface{})` - -SetMetadata sets Metadata field to given value. - -### HasMetadata - -`func (o *UploadBeginIn) HasMetadata() bool` - -HasMetadata returns a boolean if a field has been set. - -### SetMetadataNil - -`func (o *UploadBeginIn) SetMetadataNil(b bool)` - - SetMetadataNil sets the value for Metadata to be an explicit nil - -### UnsetMetadata -`func (o *UploadBeginIn) UnsetMetadata()` - -UnsetMetadata ensures that no value is present for Metadata, not even an explicit nil -### GetPath - -`func (o *UploadBeginIn) GetPath() string` - -GetPath returns the Path field if non-nil, zero value otherwise. - -### GetPathOk - -`func (o *UploadBeginIn) GetPathOk() (*string, bool)` - -GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPath - -`func (o *UploadBeginIn) SetPath(v string)` - -SetPath sets Path field to given value. - - -### GetSizeBytes - -`func (o *UploadBeginIn) GetSizeBytes() int32` - -GetSizeBytes returns the SizeBytes field if non-nil, zero value otherwise. - -### GetSizeBytesOk - -`func (o *UploadBeginIn) GetSizeBytesOk() (*int32, bool)` - -GetSizeBytesOk returns a tuple with the SizeBytes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSizeBytes - -`func (o *UploadBeginIn) SetSizeBytes(v int32)` - -SetSizeBytes sets SizeBytes field to given value. - - -### GetSource - -`func (o *UploadBeginIn) GetSource() ArtifactSource` - -GetSource returns the Source field if non-nil, zero value otherwise. - -### GetSourceOk - -`func (o *UploadBeginIn) GetSourceOk() (*ArtifactSource, bool)` - -GetSourceOk returns a tuple with the Source field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSource - -`func (o *UploadBeginIn) SetSource(v ArtifactSource)` - -SetSource sets Source field to given value. - -### HasSource - -`func (o *UploadBeginIn) HasSource() bool` - -HasSource returns a boolean if a field has been set. - -### SetSourceNil - -`func (o *UploadBeginIn) SetSourceNil(b bool)` - - SetSourceNil sets the value for Source to be an explicit nil - -### UnsetSource -`func (o *UploadBeginIn) UnsetSource()` - -UnsetSource ensures that no value is present for Source, not even an explicit nil - -[[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/sdk/go/docs/UploadBeginOut.md b/sdk/go/docs/UploadBeginOut.md deleted file mode 100644 index ae3698e..0000000 --- a/sdk/go/docs/UploadBeginOut.md +++ /dev/null @@ -1,159 +0,0 @@ -# UploadBeginOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ExpiresAt** | **time.Time** | | -**Headers** | **map[string]string** | | -**MaxBytes** | **int32** | | -**Method** | Pointer to **string** | | [optional] [default to "PUT"] -**UploadId** | **string** | | -**UploadUrl** | **string** | | - -## Methods - -### NewUploadBeginOut - -`func NewUploadBeginOut(expiresAt time.Time, headers map[string]string, maxBytes int32, uploadId string, uploadUrl string, ) *UploadBeginOut` - -NewUploadBeginOut instantiates a new UploadBeginOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUploadBeginOutWithDefaults - -`func NewUploadBeginOutWithDefaults() *UploadBeginOut` - -NewUploadBeginOutWithDefaults instantiates a new UploadBeginOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetExpiresAt - -`func (o *UploadBeginOut) GetExpiresAt() time.Time` - -GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. - -### GetExpiresAtOk - -`func (o *UploadBeginOut) GetExpiresAtOk() (*time.Time, bool)` - -GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExpiresAt - -`func (o *UploadBeginOut) SetExpiresAt(v time.Time)` - -SetExpiresAt sets ExpiresAt field to given value. - - -### GetHeaders - -`func (o *UploadBeginOut) GetHeaders() map[string]string` - -GetHeaders returns the Headers field if non-nil, zero value otherwise. - -### GetHeadersOk - -`func (o *UploadBeginOut) GetHeadersOk() (*map[string]string, bool)` - -GetHeadersOk returns a tuple with the Headers field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetHeaders - -`func (o *UploadBeginOut) SetHeaders(v map[string]string)` - -SetHeaders sets Headers field to given value. - - -### GetMaxBytes - -`func (o *UploadBeginOut) GetMaxBytes() int32` - -GetMaxBytes returns the MaxBytes field if non-nil, zero value otherwise. - -### GetMaxBytesOk - -`func (o *UploadBeginOut) GetMaxBytesOk() (*int32, bool)` - -GetMaxBytesOk returns a tuple with the MaxBytes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMaxBytes - -`func (o *UploadBeginOut) SetMaxBytes(v int32)` - -SetMaxBytes sets MaxBytes field to given value. - - -### GetMethod - -`func (o *UploadBeginOut) GetMethod() string` - -GetMethod returns the Method field if non-nil, zero value otherwise. - -### GetMethodOk - -`func (o *UploadBeginOut) GetMethodOk() (*string, bool)` - -GetMethodOk returns a tuple with the Method field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMethod - -`func (o *UploadBeginOut) SetMethod(v string)` - -SetMethod sets Method field to given value. - -### HasMethod - -`func (o *UploadBeginOut) HasMethod() bool` - -HasMethod returns a boolean if a field has been set. - -### GetUploadId - -`func (o *UploadBeginOut) GetUploadId() string` - -GetUploadId returns the UploadId field if non-nil, zero value otherwise. - -### GetUploadIdOk - -`func (o *UploadBeginOut) GetUploadIdOk() (*string, bool)` - -GetUploadIdOk returns a tuple with the UploadId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUploadId - -`func (o *UploadBeginOut) SetUploadId(v string)` - -SetUploadId sets UploadId field to given value. - - -### GetUploadUrl - -`func (o *UploadBeginOut) GetUploadUrl() string` - -GetUploadUrl returns the UploadUrl field if non-nil, zero value otherwise. - -### GetUploadUrlOk - -`func (o *UploadBeginOut) GetUploadUrlOk() (*string, bool)` - -GetUploadUrlOk returns a tuple with the UploadUrl field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUploadUrl - -`func (o *UploadBeginOut) SetUploadUrl(v string)` - -SetUploadUrl sets UploadUrl field to given value. - - - -[[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/sdk/go/docs/UploadStatusOut.md b/sdk/go/docs/UploadStatusOut.md deleted file mode 100644 index b7e3ba6..0000000 --- a/sdk/go/docs/UploadStatusOut.md +++ /dev/null @@ -1,232 +0,0 @@ -# UploadStatusOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CommittedAt** | Pointer to **NullableTime** | | [optional] -**ContentType** | **string** | | -**CreatedAt** | **time.Time** | | -**ExpiresAt** | **time.Time** | | -**MaxBytes** | **int32** | | -**Path** | **string** | | -**SizeBytes** | **int32** | | -**State** | **string** | | -**UploadId** | **string** | | - -## Methods - -### NewUploadStatusOut - -`func NewUploadStatusOut(contentType string, createdAt time.Time, expiresAt time.Time, maxBytes int32, path string, sizeBytes int32, state string, uploadId string, ) *UploadStatusOut` - -NewUploadStatusOut instantiates a new UploadStatusOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUploadStatusOutWithDefaults - -`func NewUploadStatusOutWithDefaults() *UploadStatusOut` - -NewUploadStatusOutWithDefaults instantiates a new UploadStatusOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetCommittedAt - -`func (o *UploadStatusOut) GetCommittedAt() time.Time` - -GetCommittedAt returns the CommittedAt field if non-nil, zero value otherwise. - -### GetCommittedAtOk - -`func (o *UploadStatusOut) GetCommittedAtOk() (*time.Time, bool)` - -GetCommittedAtOk returns a tuple with the CommittedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCommittedAt - -`func (o *UploadStatusOut) SetCommittedAt(v time.Time)` - -SetCommittedAt sets CommittedAt field to given value. - -### HasCommittedAt - -`func (o *UploadStatusOut) HasCommittedAt() bool` - -HasCommittedAt returns a boolean if a field has been set. - -### SetCommittedAtNil - -`func (o *UploadStatusOut) SetCommittedAtNil(b bool)` - - SetCommittedAtNil sets the value for CommittedAt to be an explicit nil - -### UnsetCommittedAt -`func (o *UploadStatusOut) UnsetCommittedAt()` - -UnsetCommittedAt ensures that no value is present for CommittedAt, not even an explicit nil -### GetContentType - -`func (o *UploadStatusOut) GetContentType() string` - -GetContentType returns the ContentType field if non-nil, zero value otherwise. - -### GetContentTypeOk - -`func (o *UploadStatusOut) GetContentTypeOk() (*string, bool)` - -GetContentTypeOk returns a tuple with the ContentType field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetContentType - -`func (o *UploadStatusOut) SetContentType(v string)` - -SetContentType sets ContentType field to given value. - - -### GetCreatedAt - -`func (o *UploadStatusOut) GetCreatedAt() time.Time` - -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. - -### GetCreatedAtOk - -`func (o *UploadStatusOut) GetCreatedAtOk() (*time.Time, bool)` - -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreatedAt - -`func (o *UploadStatusOut) SetCreatedAt(v time.Time)` - -SetCreatedAt sets CreatedAt field to given value. - - -### GetExpiresAt - -`func (o *UploadStatusOut) GetExpiresAt() time.Time` - -GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. - -### GetExpiresAtOk - -`func (o *UploadStatusOut) GetExpiresAtOk() (*time.Time, bool)` - -GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExpiresAt - -`func (o *UploadStatusOut) SetExpiresAt(v time.Time)` - -SetExpiresAt sets ExpiresAt field to given value. - - -### GetMaxBytes - -`func (o *UploadStatusOut) GetMaxBytes() int32` - -GetMaxBytes returns the MaxBytes field if non-nil, zero value otherwise. - -### GetMaxBytesOk - -`func (o *UploadStatusOut) GetMaxBytesOk() (*int32, bool)` - -GetMaxBytesOk returns a tuple with the MaxBytes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMaxBytes - -`func (o *UploadStatusOut) SetMaxBytes(v int32)` - -SetMaxBytes sets MaxBytes field to given value. - - -### GetPath - -`func (o *UploadStatusOut) GetPath() string` - -GetPath returns the Path field if non-nil, zero value otherwise. - -### GetPathOk - -`func (o *UploadStatusOut) GetPathOk() (*string, bool)` - -GetPathOk returns a tuple with the Path field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPath - -`func (o *UploadStatusOut) SetPath(v string)` - -SetPath sets Path field to given value. - - -### GetSizeBytes - -`func (o *UploadStatusOut) GetSizeBytes() int32` - -GetSizeBytes returns the SizeBytes field if non-nil, zero value otherwise. - -### GetSizeBytesOk - -`func (o *UploadStatusOut) GetSizeBytesOk() (*int32, bool)` - -GetSizeBytesOk returns a tuple with the SizeBytes field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetSizeBytes - -`func (o *UploadStatusOut) SetSizeBytes(v int32)` - -SetSizeBytes sets SizeBytes field to given value. - - -### GetState - -`func (o *UploadStatusOut) GetState() string` - -GetState returns the State field if non-nil, zero value otherwise. - -### GetStateOk - -`func (o *UploadStatusOut) GetStateOk() (*string, bool)` - -GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetState - -`func (o *UploadStatusOut) SetState(v string)` - -SetState sets State field to given value. - - -### GetUploadId - -`func (o *UploadStatusOut) GetUploadId() string` - -GetUploadId returns the UploadId field if non-nil, zero value otherwise. - -### GetUploadIdOk - -`func (o *UploadStatusOut) GetUploadIdOk() (*string, bool)` - -GetUploadIdOk returns a tuple with the UploadId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUploadId - -`func (o *UploadStatusOut) SetUploadId(v string)` - -SetUploadId sets UploadId field to given value. - - - -[[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/sdk/go/docs/UsageCounterOut.md b/sdk/go/docs/UsageCounterOut.md deleted file mode 100644 index 2ea7ca5..0000000 --- a/sdk/go/docs/UsageCounterOut.md +++ /dev/null @@ -1,70 +0,0 @@ -# UsageCounterOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Limit** | **int32** | | -**Used** | **int32** | | - -## Methods - -### NewUsageCounterOut - -`func NewUsageCounterOut(limit int32, used int32, ) *UsageCounterOut` - -NewUsageCounterOut instantiates a new UsageCounterOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUsageCounterOutWithDefaults - -`func NewUsageCounterOutWithDefaults() *UsageCounterOut` - -NewUsageCounterOutWithDefaults instantiates a new UsageCounterOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetLimit - -`func (o *UsageCounterOut) GetLimit() int32` - -GetLimit returns the Limit field if non-nil, zero value otherwise. - -### GetLimitOk - -`func (o *UsageCounterOut) GetLimitOk() (*int32, bool)` - -GetLimitOk returns a tuple with the Limit field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLimit - -`func (o *UsageCounterOut) SetLimit(v int32)` - -SetLimit sets Limit field to given value. - - -### GetUsed - -`func (o *UsageCounterOut) GetUsed() int32` - -GetUsed returns the Used field if non-nil, zero value otherwise. - -### GetUsedOk - -`func (o *UsageCounterOut) GetUsedOk() (*int32, bool)` - -GetUsedOk returns a tuple with the Used field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetUsed - -`func (o *UsageCounterOut) SetUsed(v int32)` - -SetUsed sets Used field to given value. - - - -[[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/sdk/go/docs/UsagePeriodOut.md b/sdk/go/docs/UsagePeriodOut.md deleted file mode 100644 index 2835d9c..0000000 --- a/sdk/go/docs/UsagePeriodOut.md +++ /dev/null @@ -1,91 +0,0 @@ -# UsagePeriodOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Ends** | **time.Time** | | -**Starts** | **time.Time** | | -**YearMonth** | **string** | | - -## Methods - -### NewUsagePeriodOut - -`func NewUsagePeriodOut(ends time.Time, starts time.Time, yearMonth string, ) *UsagePeriodOut` - -NewUsagePeriodOut instantiates a new UsagePeriodOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUsagePeriodOutWithDefaults - -`func NewUsagePeriodOutWithDefaults() *UsagePeriodOut` - -NewUsagePeriodOutWithDefaults instantiates a new UsagePeriodOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetEnds - -`func (o *UsagePeriodOut) GetEnds() time.Time` - -GetEnds returns the Ends field if non-nil, zero value otherwise. - -### GetEndsOk - -`func (o *UsagePeriodOut) GetEndsOk() (*time.Time, bool)` - -GetEndsOk returns a tuple with the Ends field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetEnds - -`func (o *UsagePeriodOut) SetEnds(v time.Time)` - -SetEnds sets Ends field to given value. - - -### GetStarts - -`func (o *UsagePeriodOut) GetStarts() time.Time` - -GetStarts returns the Starts field if non-nil, zero value otherwise. - -### GetStartsOk - -`func (o *UsagePeriodOut) GetStartsOk() (*time.Time, bool)` - -GetStartsOk returns a tuple with the Starts field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStarts - -`func (o *UsagePeriodOut) SetStarts(v time.Time)` - -SetStarts sets Starts field to given value. - - -### GetYearMonth - -`func (o *UsagePeriodOut) GetYearMonth() string` - -GetYearMonth returns the YearMonth field if non-nil, zero value otherwise. - -### GetYearMonthOk - -`func (o *UsagePeriodOut) GetYearMonthOk() (*string, bool)` - -GetYearMonthOk returns a tuple with the YearMonth field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetYearMonth - -`func (o *UsagePeriodOut) SetYearMonth(v string)` - -SetYearMonth sets YearMonth field to given value. - - - -[[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/sdk/go/docs/UserTokenList.md b/sdk/go/docs/UserTokenList.md deleted file mode 100644 index ae9b760..0000000 --- a/sdk/go/docs/UserTokenList.md +++ /dev/null @@ -1,85 +0,0 @@ -# UserTokenList - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Items** | [**[]UserTokenOut**](UserTokenOut.md) | | -**NextCursor** | Pointer to **NullableString** | | [optional] - -## Methods - -### NewUserTokenList - -`func NewUserTokenList(items []UserTokenOut, ) *UserTokenList` - -NewUserTokenList instantiates a new UserTokenList object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUserTokenListWithDefaults - -`func NewUserTokenListWithDefaults() *UserTokenList` - -NewUserTokenListWithDefaults instantiates a new UserTokenList object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetItems - -`func (o *UserTokenList) GetItems() []UserTokenOut` - -GetItems returns the Items field if non-nil, zero value otherwise. - -### GetItemsOk - -`func (o *UserTokenList) GetItemsOk() (*[]UserTokenOut, bool)` - -GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetItems - -`func (o *UserTokenList) SetItems(v []UserTokenOut)` - -SetItems sets Items field to given value. - - -### GetNextCursor - -`func (o *UserTokenList) GetNextCursor() string` - -GetNextCursor returns the NextCursor field if non-nil, zero value otherwise. - -### GetNextCursorOk - -`func (o *UserTokenList) GetNextCursorOk() (*string, bool)` - -GetNextCursorOk returns a tuple with the NextCursor field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNextCursor - -`func (o *UserTokenList) SetNextCursor(v string)` - -SetNextCursor sets NextCursor field to given value. - -### HasNextCursor - -`func (o *UserTokenList) HasNextCursor() bool` - -HasNextCursor returns a boolean if a field has been set. - -### SetNextCursorNil - -`func (o *UserTokenList) SetNextCursorNil(b bool)` - - SetNextCursorNil sets the value for NextCursor to be an explicit nil - -### UnsetNextCursor -`func (o *UserTokenList) UnsetNextCursor()` - -UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil - -[[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/sdk/go/docs/UserTokenOut.md b/sdk/go/docs/UserTokenOut.md deleted file mode 100644 index 5d011a2..0000000 --- a/sdk/go/docs/UserTokenOut.md +++ /dev/null @@ -1,292 +0,0 @@ -# UserTokenOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CreatedAt** | **time.Time** | | -**DefaultDriveId** | Pointer to **NullableString** | | [optional] -**ExpiresAt** | Pointer to **NullableTime** | | [optional] -**Id** | **string** | | -**Label** | Pointer to **NullableString** | | [optional] -**LastUsedAt** | Pointer to **NullableTime** | | [optional] -**Prefix** | **string** | | -**RevokedAt** | Pointer to **NullableTime** | | [optional] -**Scope** | **string** | | - -## Methods - -### NewUserTokenOut - -`func NewUserTokenOut(createdAt time.Time, id string, prefix string, scope string, ) *UserTokenOut` - -NewUserTokenOut instantiates a new UserTokenOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewUserTokenOutWithDefaults - -`func NewUserTokenOutWithDefaults() *UserTokenOut` - -NewUserTokenOutWithDefaults instantiates a new UserTokenOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetCreatedAt - -`func (o *UserTokenOut) GetCreatedAt() time.Time` - -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. - -### GetCreatedAtOk - -`func (o *UserTokenOut) GetCreatedAtOk() (*time.Time, bool)` - -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreatedAt - -`func (o *UserTokenOut) SetCreatedAt(v time.Time)` - -SetCreatedAt sets CreatedAt field to given value. - - -### GetDefaultDriveId - -`func (o *UserTokenOut) GetDefaultDriveId() string` - -GetDefaultDriveId returns the DefaultDriveId field if non-nil, zero value otherwise. - -### GetDefaultDriveIdOk - -`func (o *UserTokenOut) GetDefaultDriveIdOk() (*string, bool)` - -GetDefaultDriveIdOk returns a tuple with the DefaultDriveId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetDefaultDriveId - -`func (o *UserTokenOut) SetDefaultDriveId(v string)` - -SetDefaultDriveId sets DefaultDriveId field to given value. - -### HasDefaultDriveId - -`func (o *UserTokenOut) HasDefaultDriveId() bool` - -HasDefaultDriveId returns a boolean if a field has been set. - -### SetDefaultDriveIdNil - -`func (o *UserTokenOut) SetDefaultDriveIdNil(b bool)` - - SetDefaultDriveIdNil sets the value for DefaultDriveId to be an explicit nil - -### UnsetDefaultDriveId -`func (o *UserTokenOut) UnsetDefaultDriveId()` - -UnsetDefaultDriveId ensures that no value is present for DefaultDriveId, not even an explicit nil -### GetExpiresAt - -`func (o *UserTokenOut) GetExpiresAt() time.Time` - -GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. - -### GetExpiresAtOk - -`func (o *UserTokenOut) GetExpiresAtOk() (*time.Time, bool)` - -GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetExpiresAt - -`func (o *UserTokenOut) SetExpiresAt(v time.Time)` - -SetExpiresAt sets ExpiresAt field to given value. - -### HasExpiresAt - -`func (o *UserTokenOut) HasExpiresAt() bool` - -HasExpiresAt returns a boolean if a field has been set. - -### SetExpiresAtNil - -`func (o *UserTokenOut) SetExpiresAtNil(b bool)` - - SetExpiresAtNil sets the value for ExpiresAt to be an explicit nil - -### UnsetExpiresAt -`func (o *UserTokenOut) UnsetExpiresAt()` - -UnsetExpiresAt ensures that no value is present for ExpiresAt, not even an explicit nil -### GetId - -`func (o *UserTokenOut) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *UserTokenOut) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *UserTokenOut) SetId(v string)` - -SetId sets Id field to given value. - - -### GetLabel - -`func (o *UserTokenOut) GetLabel() string` - -GetLabel returns the Label field if non-nil, zero value otherwise. - -### GetLabelOk - -`func (o *UserTokenOut) GetLabelOk() (*string, bool)` - -GetLabelOk returns a tuple with the Label field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLabel - -`func (o *UserTokenOut) SetLabel(v string)` - -SetLabel sets Label field to given value. - -### HasLabel - -`func (o *UserTokenOut) HasLabel() bool` - -HasLabel returns a boolean if a field has been set. - -### SetLabelNil - -`func (o *UserTokenOut) SetLabelNil(b bool)` - - SetLabelNil sets the value for Label to be an explicit nil - -### UnsetLabel -`func (o *UserTokenOut) UnsetLabel()` - -UnsetLabel ensures that no value is present for Label, not even an explicit nil -### GetLastUsedAt - -`func (o *UserTokenOut) GetLastUsedAt() time.Time` - -GetLastUsedAt returns the LastUsedAt field if non-nil, zero value otherwise. - -### GetLastUsedAtOk - -`func (o *UserTokenOut) GetLastUsedAtOk() (*time.Time, bool)` - -GetLastUsedAtOk returns a tuple with the LastUsedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLastUsedAt - -`func (o *UserTokenOut) SetLastUsedAt(v time.Time)` - -SetLastUsedAt sets LastUsedAt field to given value. - -### HasLastUsedAt - -`func (o *UserTokenOut) HasLastUsedAt() bool` - -HasLastUsedAt returns a boolean if a field has been set. - -### SetLastUsedAtNil - -`func (o *UserTokenOut) SetLastUsedAtNil(b bool)` - - SetLastUsedAtNil sets the value for LastUsedAt to be an explicit nil - -### UnsetLastUsedAt -`func (o *UserTokenOut) UnsetLastUsedAt()` - -UnsetLastUsedAt ensures that no value is present for LastUsedAt, not even an explicit nil -### GetPrefix - -`func (o *UserTokenOut) GetPrefix() string` - -GetPrefix returns the Prefix field if non-nil, zero value otherwise. - -### GetPrefixOk - -`func (o *UserTokenOut) GetPrefixOk() (*string, bool)` - -GetPrefixOk returns a tuple with the Prefix field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPrefix - -`func (o *UserTokenOut) SetPrefix(v string)` - -SetPrefix sets Prefix field to given value. - - -### GetRevokedAt - -`func (o *UserTokenOut) GetRevokedAt() time.Time` - -GetRevokedAt returns the RevokedAt field if non-nil, zero value otherwise. - -### GetRevokedAtOk - -`func (o *UserTokenOut) GetRevokedAtOk() (*time.Time, bool)` - -GetRevokedAtOk returns a tuple with the RevokedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRevokedAt - -`func (o *UserTokenOut) SetRevokedAt(v time.Time)` - -SetRevokedAt sets RevokedAt field to given value. - -### HasRevokedAt - -`func (o *UserTokenOut) HasRevokedAt() bool` - -HasRevokedAt returns a boolean if a field has been set. - -### SetRevokedAtNil - -`func (o *UserTokenOut) SetRevokedAtNil(b bool)` - - SetRevokedAtNil sets the value for RevokedAt to be an explicit nil - -### UnsetRevokedAt -`func (o *UserTokenOut) UnsetRevokedAt()` - -UnsetRevokedAt ensures that no value is present for RevokedAt, not even an explicit nil -### GetScope - -`func (o *UserTokenOut) GetScope() string` - -GetScope returns the Scope field if non-nil, zero value otherwise. - -### GetScopeOk - -`func (o *UserTokenOut) GetScopeOk() (*string, bool)` - -GetScopeOk returns a tuple with the Scope field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetScope - -`func (o *UserTokenOut) SetScope(v string)` - -SetScope sets Scope field to given value. - - - -[[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/sdk/go/docs/V0ErrorEnvelope.md b/sdk/go/docs/V0ErrorEnvelope.md new file mode 100644 index 0000000..0cac47e --- /dev/null +++ b/sdk/go/docs/V0ErrorEnvelope.md @@ -0,0 +1,49 @@ +# V0ErrorEnvelope + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Error** | [**DrivesCreate400ResponseError**](DrivesCreate400ResponseError.md) | | + +## Methods + +### NewV0ErrorEnvelope + +`func NewV0ErrorEnvelope(error_ DrivesCreate400ResponseError, ) *V0ErrorEnvelope` + +NewV0ErrorEnvelope instantiates a new V0ErrorEnvelope object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewV0ErrorEnvelopeWithDefaults + +`func NewV0ErrorEnvelopeWithDefaults() *V0ErrorEnvelope` + +NewV0ErrorEnvelopeWithDefaults instantiates a new V0ErrorEnvelope object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetError + +`func (o *V0ErrorEnvelope) GetError() DrivesCreate400ResponseError` + +GetError returns the Error field if non-nil, zero value otherwise. + +### GetErrorOk + +`func (o *V0ErrorEnvelope) GetErrorOk() (*DrivesCreate400ResponseError, bool)` + +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetError + +`func (o *V0ErrorEnvelope) SetError(v DrivesCreate400ResponseError)` + +SetError sets Error field to given value. + + + +[[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/sdk/go/docs/ValidationErrorBody.md b/sdk/go/docs/ValidationErrorBody.md deleted file mode 100644 index 43b0135..0000000 --- a/sdk/go/docs/ValidationErrorBody.md +++ /dev/null @@ -1,91 +0,0 @@ -# ValidationErrorBody - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Code** | **string** | | -**Fields** | [**[]ValidationIssue**](ValidationIssue.md) | | -**Message** | **string** | | - -## Methods - -### NewValidationErrorBody - -`func NewValidationErrorBody(code string, fields []ValidationIssue, message string, ) *ValidationErrorBody` - -NewValidationErrorBody instantiates a new ValidationErrorBody object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewValidationErrorBodyWithDefaults - -`func NewValidationErrorBodyWithDefaults() *ValidationErrorBody` - -NewValidationErrorBodyWithDefaults instantiates a new ValidationErrorBody object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetCode - -`func (o *ValidationErrorBody) GetCode() string` - -GetCode returns the Code field if non-nil, zero value otherwise. - -### GetCodeOk - -`func (o *ValidationErrorBody) GetCodeOk() (*string, bool)` - -GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCode - -`func (o *ValidationErrorBody) SetCode(v string)` - -SetCode sets Code field to given value. - - -### GetFields - -`func (o *ValidationErrorBody) GetFields() []ValidationIssue` - -GetFields returns the Fields field if non-nil, zero value otherwise. - -### GetFieldsOk - -`func (o *ValidationErrorBody) GetFieldsOk() (*[]ValidationIssue, bool)` - -GetFieldsOk returns a tuple with the Fields field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetFields - -`func (o *ValidationErrorBody) SetFields(v []ValidationIssue)` - -SetFields sets Fields field to given value. - - -### GetMessage - -`func (o *ValidationErrorBody) GetMessage() string` - -GetMessage returns the Message field if non-nil, zero value otherwise. - -### GetMessageOk - -`func (o *ValidationErrorBody) GetMessageOk() (*string, bool)` - -GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMessage - -`func (o *ValidationErrorBody) SetMessage(v string)` - -SetMessage sets Message field to given value. - - - -[[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/sdk/go/docs/ValidationErrorDetail.md b/sdk/go/docs/ValidationErrorDetail.md deleted file mode 100644 index e5764d4..0000000 --- a/sdk/go/docs/ValidationErrorDetail.md +++ /dev/null @@ -1,49 +0,0 @@ -# ValidationErrorDetail - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Error** | [**ValidationErrorBody**](ValidationErrorBody.md) | | - -## Methods - -### NewValidationErrorDetail - -`func NewValidationErrorDetail(error_ ValidationErrorBody, ) *ValidationErrorDetail` - -NewValidationErrorDetail instantiates a new ValidationErrorDetail object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewValidationErrorDetailWithDefaults - -`func NewValidationErrorDetailWithDefaults() *ValidationErrorDetail` - -NewValidationErrorDetailWithDefaults instantiates a new ValidationErrorDetail object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetError - -`func (o *ValidationErrorDetail) GetError() ValidationErrorBody` - -GetError returns the Error field if non-nil, zero value otherwise. - -### GetErrorOk - -`func (o *ValidationErrorDetail) GetErrorOk() (*ValidationErrorBody, bool)` - -GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetError - -`func (o *ValidationErrorDetail) SetError(v ValidationErrorBody)` - -SetError sets Error field to given value. - - - -[[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/sdk/go/docs/ValidationErrorResponse.md b/sdk/go/docs/ValidationErrorResponse.md index 5ef2a2c..de5ce20 100644 --- a/sdk/go/docs/ValidationErrorResponse.md +++ b/sdk/go/docs/ValidationErrorResponse.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**Detail** | [**ValidationErrorDetail**](ValidationErrorDetail.md) | | +**Error** | [**ValidationErrorResponseError**](ValidationErrorResponseError.md) | | ## Methods ### NewValidationErrorResponse -`func NewValidationErrorResponse(detail ValidationErrorDetail, ) *ValidationErrorResponse` +`func NewValidationErrorResponse(error_ ValidationErrorResponseError, ) *ValidationErrorResponse` NewValidationErrorResponse instantiates a new ValidationErrorResponse object This constructor will assign default values to properties that have it defined, @@ -25,24 +25,24 @@ NewValidationErrorResponseWithDefaults instantiates a new ValidationErrorRespons This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set -### GetDetail +### GetError -`func (o *ValidationErrorResponse) GetDetail() ValidationErrorDetail` +`func (o *ValidationErrorResponse) GetError() ValidationErrorResponseError` -GetDetail returns the Detail field if non-nil, zero value otherwise. +GetError returns the Error field if non-nil, zero value otherwise. -### GetDetailOk +### GetErrorOk -`func (o *ValidationErrorResponse) GetDetailOk() (*ValidationErrorDetail, bool)` +`func (o *ValidationErrorResponse) GetErrorOk() (*ValidationErrorResponseError, bool)` -GetDetailOk returns a tuple with the Detail field if it's non-nil, zero value otherwise +GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetDetail +### SetError -`func (o *ValidationErrorResponse) SetDetail(v ValidationErrorDetail)` +`func (o *ValidationErrorResponse) SetError(v ValidationErrorResponseError)` -SetDetail sets Detail field to given value. +SetError sets Error field to given value. diff --git a/sdk/go/docs/ValidationErrorResponseError.md b/sdk/go/docs/ValidationErrorResponseError.md new file mode 100644 index 0000000..2208b39 --- /dev/null +++ b/sdk/go/docs/ValidationErrorResponseError.md @@ -0,0 +1,116 @@ +# ValidationErrorResponseError + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Code** | **NullableString** | | +**Details** | Pointer to [**ValidationErrorResponseErrorDetails**](ValidationErrorResponseErrorDetails.md) | | [optional] +**Message** | **NullableString** | | + +## Methods + +### NewValidationErrorResponseError + +`func NewValidationErrorResponseError(code NullableString, message NullableString, ) *ValidationErrorResponseError` + +NewValidationErrorResponseError instantiates a new ValidationErrorResponseError object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewValidationErrorResponseErrorWithDefaults + +`func NewValidationErrorResponseErrorWithDefaults() *ValidationErrorResponseError` + +NewValidationErrorResponseErrorWithDefaults instantiates a new ValidationErrorResponseError object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetCode + +`func (o *ValidationErrorResponseError) GetCode() string` + +GetCode returns the Code field if non-nil, zero value otherwise. + +### GetCodeOk + +`func (o *ValidationErrorResponseError) GetCodeOk() (*string, bool)` + +GetCodeOk returns a tuple with the Code field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCode + +`func (o *ValidationErrorResponseError) SetCode(v string)` + +SetCode sets Code field to given value. + + +### SetCodeNil + +`func (o *ValidationErrorResponseError) SetCodeNil(b bool)` + + SetCodeNil sets the value for Code to be an explicit nil + +### UnsetCode +`func (o *ValidationErrorResponseError) UnsetCode()` + +UnsetCode ensures that no value is present for Code, not even an explicit nil +### GetDetails + +`func (o *ValidationErrorResponseError) GetDetails() ValidationErrorResponseErrorDetails` + +GetDetails returns the Details field if non-nil, zero value otherwise. + +### GetDetailsOk + +`func (o *ValidationErrorResponseError) GetDetailsOk() (*ValidationErrorResponseErrorDetails, bool)` + +GetDetailsOk returns a tuple with the Details field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetDetails + +`func (o *ValidationErrorResponseError) SetDetails(v ValidationErrorResponseErrorDetails)` + +SetDetails sets Details field to given value. + +### HasDetails + +`func (o *ValidationErrorResponseError) HasDetails() bool` + +HasDetails returns a boolean if a field has been set. + +### GetMessage + +`func (o *ValidationErrorResponseError) GetMessage() string` + +GetMessage returns the Message field if non-nil, zero value otherwise. + +### GetMessageOk + +`func (o *ValidationErrorResponseError) GetMessageOk() (*string, bool)` + +GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetMessage + +`func (o *ValidationErrorResponseError) SetMessage(v string)` + +SetMessage sets Message field to given value. + + +### SetMessageNil + +`func (o *ValidationErrorResponseError) SetMessageNil(b bool)` + + SetMessageNil sets the value for Message to be an explicit nil + +### UnsetMessage +`func (o *ValidationErrorResponseError) UnsetMessage()` + +UnsetMessage ensures that no value is present for Message, not even an explicit nil + +[[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/sdk/go/docs/ValidationErrorResponseErrorDetails.md b/sdk/go/docs/ValidationErrorResponseErrorDetails.md new file mode 100644 index 0000000..db3dbcf --- /dev/null +++ b/sdk/go/docs/ValidationErrorResponseErrorDetails.md @@ -0,0 +1,54 @@ +# ValidationErrorResponseErrorDetails + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Fields** | Pointer to [**[]ValidationErrorResponseErrorDetailsFieldsInner**](ValidationErrorResponseErrorDetailsFieldsInner.md) | | [optional] + +## Methods + +### NewValidationErrorResponseErrorDetails + +`func NewValidationErrorResponseErrorDetails() *ValidationErrorResponseErrorDetails` + +NewValidationErrorResponseErrorDetails instantiates a new ValidationErrorResponseErrorDetails object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewValidationErrorResponseErrorDetailsWithDefaults + +`func NewValidationErrorResponseErrorDetailsWithDefaults() *ValidationErrorResponseErrorDetails` + +NewValidationErrorResponseErrorDetailsWithDefaults instantiates a new ValidationErrorResponseErrorDetails object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetFields + +`func (o *ValidationErrorResponseErrorDetails) GetFields() []ValidationErrorResponseErrorDetailsFieldsInner` + +GetFields returns the Fields field if non-nil, zero value otherwise. + +### GetFieldsOk + +`func (o *ValidationErrorResponseErrorDetails) GetFieldsOk() (*[]ValidationErrorResponseErrorDetailsFieldsInner, bool)` + +GetFieldsOk returns a tuple with the Fields field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetFields + +`func (o *ValidationErrorResponseErrorDetails) SetFields(v []ValidationErrorResponseErrorDetailsFieldsInner)` + +SetFields sets Fields field to given value. + +### HasFields + +`func (o *ValidationErrorResponseErrorDetails) HasFields() bool` + +HasFields returns a boolean if a field has been set. + + +[[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/sdk/go/docs/ValidationErrorResponseErrorDetailsFieldsInner.md b/sdk/go/docs/ValidationErrorResponseErrorDetailsFieldsInner.md new file mode 100644 index 0000000..771c05d --- /dev/null +++ b/sdk/go/docs/ValidationErrorResponseErrorDetailsFieldsInner.md @@ -0,0 +1,80 @@ +# ValidationErrorResponseErrorDetailsFieldsInner + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Location** | Pointer to **string** | | [optional] +**Reason** | Pointer to **string** | | [optional] + +## Methods + +### NewValidationErrorResponseErrorDetailsFieldsInner + +`func NewValidationErrorResponseErrorDetailsFieldsInner() *ValidationErrorResponseErrorDetailsFieldsInner` + +NewValidationErrorResponseErrorDetailsFieldsInner instantiates a new ValidationErrorResponseErrorDetailsFieldsInner object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewValidationErrorResponseErrorDetailsFieldsInnerWithDefaults + +`func NewValidationErrorResponseErrorDetailsFieldsInnerWithDefaults() *ValidationErrorResponseErrorDetailsFieldsInner` + +NewValidationErrorResponseErrorDetailsFieldsInnerWithDefaults instantiates a new ValidationErrorResponseErrorDetailsFieldsInner object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetLocation + +`func (o *ValidationErrorResponseErrorDetailsFieldsInner) GetLocation() string` + +GetLocation returns the Location field if non-nil, zero value otherwise. + +### GetLocationOk + +`func (o *ValidationErrorResponseErrorDetailsFieldsInner) GetLocationOk() (*string, bool)` + +GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetLocation + +`func (o *ValidationErrorResponseErrorDetailsFieldsInner) SetLocation(v string)` + +SetLocation sets Location field to given value. + +### HasLocation + +`func (o *ValidationErrorResponseErrorDetailsFieldsInner) HasLocation() bool` + +HasLocation returns a boolean if a field has been set. + +### GetReason + +`func (o *ValidationErrorResponseErrorDetailsFieldsInner) GetReason() string` + +GetReason returns the Reason field if non-nil, zero value otherwise. + +### GetReasonOk + +`func (o *ValidationErrorResponseErrorDetailsFieldsInner) GetReasonOk() (*string, bool)` + +GetReasonOk returns a tuple with the Reason field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetReason + +`func (o *ValidationErrorResponseErrorDetailsFieldsInner) SetReason(v string)` + +SetReason sets Reason field to given value. + +### HasReason + +`func (o *ValidationErrorResponseErrorDetailsFieldsInner) HasReason() bool` + +HasReason returns a boolean if a field has been set. + + +[[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/sdk/go/docs/ValidationIssue.md b/sdk/go/docs/ValidationIssue.md deleted file mode 100644 index 06b9543..0000000 --- a/sdk/go/docs/ValidationIssue.md +++ /dev/null @@ -1,163 +0,0 @@ -# ValidationIssue - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Ctx** | Pointer to **map[string]interface{}** | | [optional] -**Input** | Pointer to **interface{}** | | [optional] -**Loc** | **[]interface{}** | | -**Msg** | **string** | | -**Type** | **string** | | - -## Methods - -### NewValidationIssue - -`func NewValidationIssue(loc []interface{}, msg string, type_ string, ) *ValidationIssue` - -NewValidationIssue instantiates a new ValidationIssue object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewValidationIssueWithDefaults - -`func NewValidationIssueWithDefaults() *ValidationIssue` - -NewValidationIssueWithDefaults instantiates a new ValidationIssue object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetCtx - -`func (o *ValidationIssue) GetCtx() map[string]interface{}` - -GetCtx returns the Ctx field if non-nil, zero value otherwise. - -### GetCtxOk - -`func (o *ValidationIssue) GetCtxOk() (*map[string]interface{}, bool)` - -GetCtxOk returns a tuple with the Ctx field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCtx - -`func (o *ValidationIssue) SetCtx(v map[string]interface{})` - -SetCtx sets Ctx field to given value. - -### HasCtx - -`func (o *ValidationIssue) HasCtx() bool` - -HasCtx returns a boolean if a field has been set. - -### SetCtxNil - -`func (o *ValidationIssue) SetCtxNil(b bool)` - - SetCtxNil sets the value for Ctx to be an explicit nil - -### UnsetCtx -`func (o *ValidationIssue) UnsetCtx()` - -UnsetCtx ensures that no value is present for Ctx, not even an explicit nil -### GetInput - -`func (o *ValidationIssue) GetInput() interface{}` - -GetInput returns the Input field if non-nil, zero value otherwise. - -### GetInputOk - -`func (o *ValidationIssue) GetInputOk() (*interface{}, bool)` - -GetInputOk returns a tuple with the Input field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetInput - -`func (o *ValidationIssue) SetInput(v interface{})` - -SetInput sets Input field to given value. - -### HasInput - -`func (o *ValidationIssue) HasInput() bool` - -HasInput returns a boolean if a field has been set. - -### SetInputNil - -`func (o *ValidationIssue) SetInputNil(b bool)` - - SetInputNil sets the value for Input to be an explicit nil - -### UnsetInput -`func (o *ValidationIssue) UnsetInput()` - -UnsetInput ensures that no value is present for Input, not even an explicit nil -### GetLoc - -`func (o *ValidationIssue) GetLoc() []interface{}` - -GetLoc returns the Loc field if non-nil, zero value otherwise. - -### GetLocOk - -`func (o *ValidationIssue) GetLocOk() (*[]interface{}, bool)` - -GetLocOk returns a tuple with the Loc field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetLoc - -`func (o *ValidationIssue) SetLoc(v []interface{})` - -SetLoc sets Loc field to given value. - - -### GetMsg - -`func (o *ValidationIssue) GetMsg() string` - -GetMsg returns the Msg field if non-nil, zero value otherwise. - -### GetMsgOk - -`func (o *ValidationIssue) GetMsgOk() (*string, bool)` - -GetMsgOk returns a tuple with the Msg field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetMsg - -`func (o *ValidationIssue) SetMsg(v string)` - -SetMsg sets Msg field to given value. - - -### GetType - -`func (o *ValidationIssue) GetType() string` - -GetType returns the Type field if non-nil, zero value otherwise. - -### GetTypeOk - -`func (o *ValidationIssue) GetTypeOk() (*string, bool)` - -GetTypeOk returns a tuple with the Type field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetType - -`func (o *ValidationIssue) SetType(v string)` - -SetType sets Type field to given value. - - - -[[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/sdk/go/docs/VersionCreatedOut.md b/sdk/go/docs/VersionCreatedOut.md new file mode 100644 index 0000000..78d0b6a --- /dev/null +++ b/sdk/go/docs/VersionCreatedOut.md @@ -0,0 +1,258 @@ +# VersionCreatedOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**ArtifactId** | **string** | | +**ArtifactRevision** | **string** | The artifact's revision after this version became head — the If-Match value for the next mutation. | +**ContentType** | **string** | | +**CreatedAt** | **time.Time** | | +**CreatedBy** | **NullableString** | | +**Hash** | **string** | | +**Id** | **string** | | +**ParentVersionId** | **NullableString** | | +**SizeBytes** | **int32** | | +**VersionNumber** | **int32** | | + +## Methods + +### NewVersionCreatedOut + +`func NewVersionCreatedOut(artifactId string, artifactRevision string, contentType string, createdAt time.Time, createdBy NullableString, hash string, id string, parentVersionId NullableString, sizeBytes int32, versionNumber int32, ) *VersionCreatedOut` + +NewVersionCreatedOut instantiates a new VersionCreatedOut object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewVersionCreatedOutWithDefaults + +`func NewVersionCreatedOutWithDefaults() *VersionCreatedOut` + +NewVersionCreatedOutWithDefaults instantiates a new VersionCreatedOut object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetArtifactId + +`func (o *VersionCreatedOut) GetArtifactId() string` + +GetArtifactId returns the ArtifactId field if non-nil, zero value otherwise. + +### GetArtifactIdOk + +`func (o *VersionCreatedOut) GetArtifactIdOk() (*string, bool)` + +GetArtifactIdOk returns a tuple with the ArtifactId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArtifactId + +`func (o *VersionCreatedOut) SetArtifactId(v string)` + +SetArtifactId sets ArtifactId field to given value. + + +### GetArtifactRevision + +`func (o *VersionCreatedOut) GetArtifactRevision() string` + +GetArtifactRevision returns the ArtifactRevision field if non-nil, zero value otherwise. + +### GetArtifactRevisionOk + +`func (o *VersionCreatedOut) GetArtifactRevisionOk() (*string, bool)` + +GetArtifactRevisionOk returns a tuple with the ArtifactRevision field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetArtifactRevision + +`func (o *VersionCreatedOut) SetArtifactRevision(v string)` + +SetArtifactRevision sets ArtifactRevision field to given value. + + +### GetContentType + +`func (o *VersionCreatedOut) GetContentType() string` + +GetContentType returns the ContentType field if non-nil, zero value otherwise. + +### GetContentTypeOk + +`func (o *VersionCreatedOut) GetContentTypeOk() (*string, bool)` + +GetContentTypeOk returns a tuple with the ContentType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetContentType + +`func (o *VersionCreatedOut) SetContentType(v string)` + +SetContentType sets ContentType field to given value. + + +### GetCreatedAt + +`func (o *VersionCreatedOut) GetCreatedAt() time.Time` + +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. + +### GetCreatedAtOk + +`func (o *VersionCreatedOut) GetCreatedAtOk() (*time.Time, bool)` + +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedAt + +`func (o *VersionCreatedOut) SetCreatedAt(v time.Time)` + +SetCreatedAt sets CreatedAt field to given value. + + +### GetCreatedBy + +`func (o *VersionCreatedOut) GetCreatedBy() string` + +GetCreatedBy returns the CreatedBy field if non-nil, zero value otherwise. + +### GetCreatedByOk + +`func (o *VersionCreatedOut) GetCreatedByOk() (*string, bool)` + +GetCreatedByOk returns a tuple with the CreatedBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetCreatedBy + +`func (o *VersionCreatedOut) SetCreatedBy(v string)` + +SetCreatedBy sets CreatedBy field to given value. + + +### SetCreatedByNil + +`func (o *VersionCreatedOut) SetCreatedByNil(b bool)` + + SetCreatedByNil sets the value for CreatedBy to be an explicit nil + +### UnsetCreatedBy +`func (o *VersionCreatedOut) UnsetCreatedBy()` + +UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +### GetHash + +`func (o *VersionCreatedOut) GetHash() string` + +GetHash returns the Hash field if non-nil, zero value otherwise. + +### GetHashOk + +`func (o *VersionCreatedOut) GetHashOk() (*string, bool)` + +GetHashOk returns a tuple with the Hash field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetHash + +`func (o *VersionCreatedOut) SetHash(v string)` + +SetHash sets Hash field to given value. + + +### GetId + +`func (o *VersionCreatedOut) GetId() string` + +GetId returns the Id field if non-nil, zero value otherwise. + +### GetIdOk + +`func (o *VersionCreatedOut) GetIdOk() (*string, bool)` + +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetId + +`func (o *VersionCreatedOut) SetId(v string)` + +SetId sets Id field to given value. + + +### GetParentVersionId + +`func (o *VersionCreatedOut) GetParentVersionId() string` + +GetParentVersionId returns the ParentVersionId field if non-nil, zero value otherwise. + +### GetParentVersionIdOk + +`func (o *VersionCreatedOut) GetParentVersionIdOk() (*string, bool)` + +GetParentVersionIdOk returns a tuple with the ParentVersionId field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetParentVersionId + +`func (o *VersionCreatedOut) SetParentVersionId(v string)` + +SetParentVersionId sets ParentVersionId field to given value. + + +### SetParentVersionIdNil + +`func (o *VersionCreatedOut) SetParentVersionIdNil(b bool)` + + SetParentVersionIdNil sets the value for ParentVersionId to be an explicit nil + +### UnsetParentVersionId +`func (o *VersionCreatedOut) UnsetParentVersionId()` + +UnsetParentVersionId ensures that no value is present for ParentVersionId, not even an explicit nil +### GetSizeBytes + +`func (o *VersionCreatedOut) GetSizeBytes() int32` + +GetSizeBytes returns the SizeBytes field if non-nil, zero value otherwise. + +### GetSizeBytesOk + +`func (o *VersionCreatedOut) GetSizeBytesOk() (*int32, bool)` + +GetSizeBytesOk returns a tuple with the SizeBytes field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetSizeBytes + +`func (o *VersionCreatedOut) SetSizeBytes(v int32)` + +SetSizeBytes sets SizeBytes field to given value. + + +### GetVersionNumber + +`func (o *VersionCreatedOut) GetVersionNumber() int32` + +GetVersionNumber returns the VersionNumber field if non-nil, zero value otherwise. + +### GetVersionNumberOk + +`func (o *VersionCreatedOut) GetVersionNumberOk() (*int32, bool)` + +GetVersionNumberOk returns a tuple with the VersionNumber field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetVersionNumber + +`func (o *VersionCreatedOut) SetVersionNumber(v int32)` + +SetVersionNumber sets VersionNumber field to given value. + + + +[[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/sdk/go/docs/VersionListOut.md b/sdk/go/docs/VersionListOut.md new file mode 100644 index 0000000..c8716bb --- /dev/null +++ b/sdk/go/docs/VersionListOut.md @@ -0,0 +1,80 @@ +# VersionListOut + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**Items** | [**[]VersionOut**](VersionOut.md) | | +**NextCursor** | **NullableString** | | + +## Methods + +### NewVersionListOut + +`func NewVersionListOut(items []VersionOut, nextCursor NullableString, ) *VersionListOut` + +NewVersionListOut instantiates a new VersionListOut object +This constructor will assign default values to properties that have it defined, +and makes sure properties required by API are set, but the set of arguments +will change when the set of required properties is changed + +### NewVersionListOutWithDefaults + +`func NewVersionListOutWithDefaults() *VersionListOut` + +NewVersionListOutWithDefaults instantiates a new VersionListOut object +This constructor will only assign default values to properties that have it defined, +but it doesn't guarantee that properties required by API are set + +### GetItems + +`func (o *VersionListOut) GetItems() []VersionOut` + +GetItems returns the Items field if non-nil, zero value otherwise. + +### GetItemsOk + +`func (o *VersionListOut) GetItemsOk() (*[]VersionOut, bool)` + +GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetItems + +`func (o *VersionListOut) SetItems(v []VersionOut)` + +SetItems sets Items field to given value. + + +### GetNextCursor + +`func (o *VersionListOut) GetNextCursor() string` + +GetNextCursor returns the NextCursor field if non-nil, zero value otherwise. + +### GetNextCursorOk + +`func (o *VersionListOut) GetNextCursorOk() (*string, bool)` + +GetNextCursorOk returns a tuple with the NextCursor field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. + +### SetNextCursor + +`func (o *VersionListOut) SetNextCursor(v string)` + +SetNextCursor sets NextCursor field to given value. + + +### SetNextCursorNil + +`func (o *VersionListOut) SetNextCursorNil(b bool)` + + SetNextCursorNil sets the value for NextCursor to be an explicit nil + +### UnsetNextCursor +`func (o *VersionListOut) UnsetNextCursor()` + +UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil + +[[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/sdk/go/docs/VersionOut.md b/sdk/go/docs/VersionOut.md index 9e65968..adf6d1f 100644 --- a/sdk/go/docs/VersionOut.md +++ b/sdk/go/docs/VersionOut.md @@ -4,12 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ActorName** | Pointer to **NullableString** | | [optional] -**ArtId** | **string** | | -**ChangeSummary** | Pointer to **NullableString** | | [optional] +**ArtifactId** | **string** | | **ContentType** | **string** | | **CreatedAt** | **time.Time** | | +**CreatedBy** | **NullableString** | | **Hash** | **string** | | +**Id** | **string** | | +**ParentVersionId** | **NullableString** | | **SizeBytes** | **int32** | | **VersionNumber** | **int32** | | @@ -17,7 +18,7 @@ Name | Type | Description | Notes ### NewVersionOut -`func NewVersionOut(artId string, contentType string, createdAt time.Time, hash string, sizeBytes int32, versionNumber int32, ) *VersionOut` +`func NewVersionOut(artifactId string, contentType string, createdAt time.Time, createdBy NullableString, hash string, id string, parentVersionId NullableString, sizeBytes int32, versionNumber int32, ) *VersionOut` NewVersionOut instantiates a new VersionOut object This constructor will assign default values to properties that have it defined, @@ -32,156 +33,166 @@ NewVersionOutWithDefaults instantiates a new VersionOut object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set -### GetActorName +### GetArtifactId -`func (o *VersionOut) GetActorName() string` +`func (o *VersionOut) GetArtifactId() string` -GetActorName returns the ActorName field if non-nil, zero value otherwise. +GetArtifactId returns the ArtifactId field if non-nil, zero value otherwise. -### GetActorNameOk +### GetArtifactIdOk -`func (o *VersionOut) GetActorNameOk() (*string, bool)` +`func (o *VersionOut) GetArtifactIdOk() (*string, bool)` -GetActorNameOk returns a tuple with the ActorName field if it's non-nil, zero value otherwise +GetArtifactIdOk returns a tuple with the ArtifactId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetActorName +### SetArtifactId -`func (o *VersionOut) SetActorName(v string)` +`func (o *VersionOut) SetArtifactId(v string)` -SetActorName sets ActorName field to given value. +SetArtifactId sets ArtifactId field to given value. -### HasActorName -`func (o *VersionOut) HasActorName() bool` +### GetContentType -HasActorName returns a boolean if a field has been set. +`func (o *VersionOut) GetContentType() string` -### SetActorNameNil +GetContentType returns the ContentType field if non-nil, zero value otherwise. -`func (o *VersionOut) SetActorNameNil(b bool)` +### GetContentTypeOk - SetActorNameNil sets the value for ActorName to be an explicit nil +`func (o *VersionOut) GetContentTypeOk() (*string, bool)` -### UnsetActorName -`func (o *VersionOut) UnsetActorName()` +GetContentTypeOk returns a tuple with the ContentType field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. -UnsetActorName ensures that no value is present for ActorName, not even an explicit nil -### GetArtId +### SetContentType -`func (o *VersionOut) GetArtId() string` +`func (o *VersionOut) SetContentType(v string)` -GetArtId returns the ArtId field if non-nil, zero value otherwise. +SetContentType sets ContentType field to given value. -### GetArtIdOk -`func (o *VersionOut) GetArtIdOk() (*string, bool)` +### GetCreatedAt -GetArtIdOk returns a tuple with the ArtId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. +`func (o *VersionOut) GetCreatedAt() time.Time` -### SetArtId +GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. -`func (o *VersionOut) SetArtId(v string)` +### GetCreatedAtOk -SetArtId sets ArtId field to given value. +`func (o *VersionOut) GetCreatedAtOk() (*time.Time, bool)` +GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. -### GetChangeSummary +### SetCreatedAt -`func (o *VersionOut) GetChangeSummary() string` +`func (o *VersionOut) SetCreatedAt(v time.Time)` -GetChangeSummary returns the ChangeSummary field if non-nil, zero value otherwise. +SetCreatedAt sets CreatedAt field to given value. -### GetChangeSummaryOk -`func (o *VersionOut) GetChangeSummaryOk() (*string, bool)` +### GetCreatedBy -GetChangeSummaryOk returns a tuple with the ChangeSummary field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. +`func (o *VersionOut) GetCreatedBy() string` -### SetChangeSummary +GetCreatedBy returns the CreatedBy field if non-nil, zero value otherwise. -`func (o *VersionOut) SetChangeSummary(v string)` +### GetCreatedByOk -SetChangeSummary sets ChangeSummary field to given value. +`func (o *VersionOut) GetCreatedByOk() (*string, bool)` -### HasChangeSummary +GetCreatedByOk returns a tuple with the CreatedBy field if it's non-nil, zero value otherwise +and a boolean to check if the value has been set. -`func (o *VersionOut) HasChangeSummary() bool` +### SetCreatedBy -HasChangeSummary returns a boolean if a field has been set. +`func (o *VersionOut) SetCreatedBy(v string)` -### SetChangeSummaryNil +SetCreatedBy sets CreatedBy field to given value. -`func (o *VersionOut) SetChangeSummaryNil(b bool)` - SetChangeSummaryNil sets the value for ChangeSummary to be an explicit nil +### SetCreatedByNil -### UnsetChangeSummary -`func (o *VersionOut) UnsetChangeSummary()` +`func (o *VersionOut) SetCreatedByNil(b bool)` -UnsetChangeSummary ensures that no value is present for ChangeSummary, not even an explicit nil -### GetContentType + SetCreatedByNil sets the value for CreatedBy to be an explicit nil -`func (o *VersionOut) GetContentType() string` +### UnsetCreatedBy +`func (o *VersionOut) UnsetCreatedBy()` -GetContentType returns the ContentType field if non-nil, zero value otherwise. +UnsetCreatedBy ensures that no value is present for CreatedBy, not even an explicit nil +### GetHash -### GetContentTypeOk +`func (o *VersionOut) GetHash() string` -`func (o *VersionOut) GetContentTypeOk() (*string, bool)` +GetHash returns the Hash field if non-nil, zero value otherwise. -GetContentTypeOk returns a tuple with the ContentType field if it's non-nil, zero value otherwise +### GetHashOk + +`func (o *VersionOut) GetHashOk() (*string, bool)` + +GetHashOk returns a tuple with the Hash field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetContentType +### SetHash -`func (o *VersionOut) SetContentType(v string)` +`func (o *VersionOut) SetHash(v string)` -SetContentType sets ContentType field to given value. +SetHash sets Hash field to given value. -### GetCreatedAt +### GetId -`func (o *VersionOut) GetCreatedAt() time.Time` +`func (o *VersionOut) GetId() string` -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. +GetId returns the Id field if non-nil, zero value otherwise. -### GetCreatedAtOk +### GetIdOk -`func (o *VersionOut) GetCreatedAtOk() (*time.Time, bool)` +`func (o *VersionOut) GetIdOk() (*string, bool)` -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise +GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetCreatedAt +### SetId -`func (o *VersionOut) SetCreatedAt(v time.Time)` +`func (o *VersionOut) SetId(v string)` -SetCreatedAt sets CreatedAt field to given value. +SetId sets Id field to given value. -### GetHash +### GetParentVersionId -`func (o *VersionOut) GetHash() string` +`func (o *VersionOut) GetParentVersionId() string` -GetHash returns the Hash field if non-nil, zero value otherwise. +GetParentVersionId returns the ParentVersionId field if non-nil, zero value otherwise. -### GetHashOk +### GetParentVersionIdOk -`func (o *VersionOut) GetHashOk() (*string, bool)` +`func (o *VersionOut) GetParentVersionIdOk() (*string, bool)` -GetHashOk returns a tuple with the Hash field if it's non-nil, zero value otherwise +GetParentVersionIdOk returns a tuple with the ParentVersionId field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. -### SetHash +### SetParentVersionId -`func (o *VersionOut) SetHash(v string)` +`func (o *VersionOut) SetParentVersionId(v string)` -SetHash sets Hash field to given value. +SetParentVersionId sets ParentVersionId field to given value. + + +### SetParentVersionIdNil + +`func (o *VersionOut) SetParentVersionIdNil(b bool)` + + SetParentVersionIdNil sets the value for ParentVersionId to be an explicit nil +### UnsetParentVersionId +`func (o *VersionOut) UnsetParentVersionId()` +UnsetParentVersionId ensures that no value is present for ParentVersionId, not even an explicit nil ### GetSizeBytes `func (o *VersionOut) GetSizeBytes() int32` diff --git a/sdk/go/docs/VersionPage.md b/sdk/go/docs/VersionPage.md deleted file mode 100644 index 3e5022a..0000000 --- a/sdk/go/docs/VersionPage.md +++ /dev/null @@ -1,121 +0,0 @@ -# VersionPage - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Items** | [**[]VersionOut**](VersionOut.md) | | -**NextCursor** | Pointer to **NullableString** | | [optional] -**PrunedBefore** | Pointer to **NullableInt32** | | [optional] - -## Methods - -### NewVersionPage - -`func NewVersionPage(items []VersionOut, ) *VersionPage` - -NewVersionPage instantiates a new VersionPage object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewVersionPageWithDefaults - -`func NewVersionPageWithDefaults() *VersionPage` - -NewVersionPageWithDefaults instantiates a new VersionPage object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetItems - -`func (o *VersionPage) GetItems() []VersionOut` - -GetItems returns the Items field if non-nil, zero value otherwise. - -### GetItemsOk - -`func (o *VersionPage) GetItemsOk() (*[]VersionOut, bool)` - -GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetItems - -`func (o *VersionPage) SetItems(v []VersionOut)` - -SetItems sets Items field to given value. - - -### GetNextCursor - -`func (o *VersionPage) GetNextCursor() string` - -GetNextCursor returns the NextCursor field if non-nil, zero value otherwise. - -### GetNextCursorOk - -`func (o *VersionPage) GetNextCursorOk() (*string, bool)` - -GetNextCursorOk returns a tuple with the NextCursor field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNextCursor - -`func (o *VersionPage) SetNextCursor(v string)` - -SetNextCursor sets NextCursor field to given value. - -### HasNextCursor - -`func (o *VersionPage) HasNextCursor() bool` - -HasNextCursor returns a boolean if a field has been set. - -### SetNextCursorNil - -`func (o *VersionPage) SetNextCursorNil(b bool)` - - SetNextCursorNil sets the value for NextCursor to be an explicit nil - -### UnsetNextCursor -`func (o *VersionPage) UnsetNextCursor()` - -UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil -### GetPrunedBefore - -`func (o *VersionPage) GetPrunedBefore() int32` - -GetPrunedBefore returns the PrunedBefore field if non-nil, zero value otherwise. - -### GetPrunedBeforeOk - -`func (o *VersionPage) GetPrunedBeforeOk() (*int32, bool)` - -GetPrunedBeforeOk returns a tuple with the PrunedBefore field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetPrunedBefore - -`func (o *VersionPage) SetPrunedBefore(v int32)` - -SetPrunedBefore sets PrunedBefore field to given value. - -### HasPrunedBefore - -`func (o *VersionPage) HasPrunedBefore() bool` - -HasPrunedBefore returns a boolean if a field has been set. - -### SetPrunedBeforeNil - -`func (o *VersionPage) SetPrunedBeforeNil(b bool)` - - SetPrunedBeforeNil sets the value for PrunedBefore to be an explicit nil - -### UnsetPrunedBefore -`func (o *VersionPage) UnsetPrunedBefore()` - -UnsetPrunedBefore ensures that no value is present for PrunedBefore, not even an explicit nil - -[[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/sdk/go/docs/VersionRetentionOut.md b/sdk/go/docs/VersionRetentionOut.md deleted file mode 100644 index 40329bb..0000000 --- a/sdk/go/docs/VersionRetentionOut.md +++ /dev/null @@ -1,49 +0,0 @@ -# VersionRetentionOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**VersionsMax** | **int32** | | - -## Methods - -### NewVersionRetentionOut - -`func NewVersionRetentionOut(versionsMax int32, ) *VersionRetentionOut` - -NewVersionRetentionOut instantiates a new VersionRetentionOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewVersionRetentionOutWithDefaults - -`func NewVersionRetentionOutWithDefaults() *VersionRetentionOut` - -NewVersionRetentionOutWithDefaults instantiates a new VersionRetentionOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetVersionsMax - -`func (o *VersionRetentionOut) GetVersionsMax() int32` - -GetVersionsMax returns the VersionsMax field if non-nil, zero value otherwise. - -### GetVersionsMaxOk - -`func (o *VersionRetentionOut) GetVersionsMaxOk() (*int32, bool)` - -GetVersionsMaxOk returns a tuple with the VersionsMax field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetVersionsMax - -`func (o *VersionRetentionOut) SetVersionsMax(v int32)` - -SetVersionsMax sets VersionsMax field to given value. - - - -[[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/sdk/go/docs/VersionsAPI.md b/sdk/go/docs/VersionsAPI.md new file mode 100644 index 0000000..0905e7b --- /dev/null +++ b/sdk/go/docs/VersionsAPI.md @@ -0,0 +1,418 @@ +# \VersionsAPI + +All URIs are relative to *https://api.agentdrive.run* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**VersionsAppend**](VersionsAPI.md#VersionsAppend) | **Post** /v0/drives/{drive_id}/artifacts/{artifact_id}/versions | Append Version +[**VersionsContent**](VersionsAPI.md#VersionsContent) | **Get** /v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}/content | Read Version Content +[**VersionsList**](VersionsAPI.md#VersionsList) | **Get** /v0/drives/{drive_id}/artifacts/{artifact_id}/versions | List Versions +[**VersionsRead**](VersionsAPI.md#VersionsRead) | **Get** /v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id} | Read Version +[**VersionsRestore**](VersionsAPI.md#VersionsRestore) | **Post** /v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}/restore | Restore Version + + + +## VersionsAppend + +> VersionCreatedOut VersionsAppend(ctx, driveId, artifactId).IdempotencyKey(idempotencyKey).IfMatch(ifMatch).Content(content).Authorization(authorization).ContentType(contentType).Sha256(sha256).Execute() + +Append Version + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + artifactId := "artifactId_example" // string | + idempotencyKey := "idempotencyKey_example" // string | + ifMatch := "ifMatch_example" // string | + content := os.NewFile(1234, "some_file") // *os.File | The artifact bytes. + authorization := "authorization_example" // string | (optional) + contentType := "contentType_example" // string | Declared media type. (optional) + sha256 := "sha256_example" // string | Optional content sha256 for verification. (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.VersionsAPI.VersionsAppend(context.Background(), driveId, artifactId).IdempotencyKey(idempotencyKey).IfMatch(ifMatch).Content(content).Authorization(authorization).ContentType(contentType).Sha256(sha256).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VersionsAPI.VersionsAppend``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `VersionsAppend`: VersionCreatedOut + fmt.Fprintf(os.Stdout, "Response from `VersionsAPI.VersionsAppend`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | +**artifactId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiVersionsAppendRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **idempotencyKey** | **string** | | + **ifMatch** | **string** | | + **content** | ***os.File** | The artifact bytes. | + **authorization** | **string** | | + **contentType** | **string** | Declared media type. | + **sha256** | **string** | Optional content sha256 for verification. | + +### Return type + +[**VersionCreatedOut**](VersionCreatedOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: multipart/form-data +- **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) + + +## VersionsContent + +> *os.File VersionsContent(ctx, driveId, artifactId, versionId).IfNoneMatch(ifNoneMatch).Authorization(authorization).Execute() + +Read Version Content + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + artifactId := "artifactId_example" // string | + versionId := "versionId_example" // string | + ifNoneMatch := "ifNoneMatch_example" // string | (optional) + authorization := "authorization_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.VersionsAPI.VersionsContent(context.Background(), driveId, artifactId, versionId).IfNoneMatch(ifNoneMatch).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VersionsAPI.VersionsContent``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `VersionsContent`: *os.File + fmt.Fprintf(os.Stdout, "Response from `VersionsAPI.VersionsContent`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | +**artifactId** | **string** | | +**versionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiVersionsContentRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **ifNoneMatch** | **string** | | + **authorization** | **string** | | + +### Return type + +[***os.File**](*os.File.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/octet-stream, 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) + + +## VersionsList + +> VersionListOut VersionsList(ctx, driveId, artifactId).Limit(limit).Cursor(cursor).Authorization(authorization).Execute() + +List Versions + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + artifactId := "artifactId_example" // string | + limit := int32(56) // int32 | (optional) + cursor := "cursor_example" // string | (optional) + authorization := "authorization_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.VersionsAPI.VersionsList(context.Background(), driveId, artifactId).Limit(limit).Cursor(cursor).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VersionsAPI.VersionsList``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `VersionsList`: VersionListOut + fmt.Fprintf(os.Stdout, "Response from `VersionsAPI.VersionsList`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | +**artifactId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiVersionsListRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + **limit** | **int32** | | + **cursor** | **string** | | + **authorization** | **string** | | + +### Return type + +[**VersionListOut**](VersionListOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### 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) + + +## VersionsRead + +> VersionOut VersionsRead(ctx, driveId, artifactId, versionId).IfNoneMatch(ifNoneMatch).Authorization(authorization).Execute() + +Read Version + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + artifactId := "artifactId_example" // string | + versionId := "versionId_example" // string | + ifNoneMatch := "ifNoneMatch_example" // string | (optional) + authorization := "authorization_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.VersionsAPI.VersionsRead(context.Background(), driveId, artifactId, versionId).IfNoneMatch(ifNoneMatch).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VersionsAPI.VersionsRead``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `VersionsRead`: VersionOut + fmt.Fprintf(os.Stdout, "Response from `VersionsAPI.VersionsRead`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | +**artifactId** | **string** | | +**versionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiVersionsReadRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **ifNoneMatch** | **string** | | + **authorization** | **string** | | + +### Return type + +[**VersionOut**](VersionOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### 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) + + +## VersionsRestore + +> VersionCreatedOut VersionsRestore(ctx, driveId, artifactId, versionId).IdempotencyKey(idempotencyKey).IfMatch(ifMatch).Authorization(authorization).Execute() + +Restore Version + + + +### Example + +```go +package main + +import ( + "context" + "fmt" + "os" + openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" +) + +func main() { + driveId := "driveId_example" // string | + artifactId := "artifactId_example" // string | + versionId := "versionId_example" // string | + idempotencyKey := "idempotencyKey_example" // string | + ifMatch := "ifMatch_example" // string | + authorization := "authorization_example" // string | (optional) + + configuration := openapiclient.NewConfiguration() + apiClient := openapiclient.NewAPIClient(configuration) + resp, r, err := apiClient.VersionsAPI.VersionsRestore(context.Background(), driveId, artifactId, versionId).IdempotencyKey(idempotencyKey).IfMatch(ifMatch).Authorization(authorization).Execute() + if err != nil { + fmt.Fprintf(os.Stderr, "Error when calling `VersionsAPI.VersionsRestore``: %v\n", err) + fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) + } + // response from `VersionsRestore`: VersionCreatedOut + fmt.Fprintf(os.Stdout, "Response from `VersionsAPI.VersionsRestore`: %v\n", resp) +} +``` + +### Path Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. +**driveId** | **string** | | +**artifactId** | **string** | | +**versionId** | **string** | | + +### Other Parameters + +Other parameters are passed through a pointer to a apiVersionsRestoreRequest struct via the builder pattern + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + + + + **idempotencyKey** | **string** | | + **ifMatch** | **string** | | + **authorization** | **string** | | + +### Return type + +[**VersionCreatedOut**](VersionCreatedOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### 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) diff --git a/sdk/go/docs/WorkspaceCreateIn.md b/sdk/go/docs/WorkspaceCreateIn.md deleted file mode 100644 index b2b3779..0000000 --- a/sdk/go/docs/WorkspaceCreateIn.md +++ /dev/null @@ -1,49 +0,0 @@ -# WorkspaceCreateIn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | - -## Methods - -### NewWorkspaceCreateIn - -`func NewWorkspaceCreateIn(name string, ) *WorkspaceCreateIn` - -NewWorkspaceCreateIn instantiates a new WorkspaceCreateIn object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewWorkspaceCreateInWithDefaults - -`func NewWorkspaceCreateInWithDefaults() *WorkspaceCreateIn` - -NewWorkspaceCreateInWithDefaults instantiates a new WorkspaceCreateIn object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetName - -`func (o *WorkspaceCreateIn) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *WorkspaceCreateIn) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *WorkspaceCreateIn) SetName(v string)` - -SetName sets Name field to given value. - - - -[[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/sdk/go/docs/WorkspaceCreateOut.md b/sdk/go/docs/WorkspaceCreateOut.md deleted file mode 100644 index 3c3172d..0000000 --- a/sdk/go/docs/WorkspaceCreateOut.md +++ /dev/null @@ -1,91 +0,0 @@ -# WorkspaceCreateOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**StarterDriveApiKey** | **string** | | -**StarterDriveId** | **string** | | -**Workspace** | [**WorkspaceOut**](WorkspaceOut.md) | | - -## Methods - -### NewWorkspaceCreateOut - -`func NewWorkspaceCreateOut(starterDriveApiKey string, starterDriveId string, workspace WorkspaceOut, ) *WorkspaceCreateOut` - -NewWorkspaceCreateOut instantiates a new WorkspaceCreateOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewWorkspaceCreateOutWithDefaults - -`func NewWorkspaceCreateOutWithDefaults() *WorkspaceCreateOut` - -NewWorkspaceCreateOutWithDefaults instantiates a new WorkspaceCreateOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetStarterDriveApiKey - -`func (o *WorkspaceCreateOut) GetStarterDriveApiKey() string` - -GetStarterDriveApiKey returns the StarterDriveApiKey field if non-nil, zero value otherwise. - -### GetStarterDriveApiKeyOk - -`func (o *WorkspaceCreateOut) GetStarterDriveApiKeyOk() (*string, bool)` - -GetStarterDriveApiKeyOk returns a tuple with the StarterDriveApiKey field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStarterDriveApiKey - -`func (o *WorkspaceCreateOut) SetStarterDriveApiKey(v string)` - -SetStarterDriveApiKey sets StarterDriveApiKey field to given value. - - -### GetStarterDriveId - -`func (o *WorkspaceCreateOut) GetStarterDriveId() string` - -GetStarterDriveId returns the StarterDriveId field if non-nil, zero value otherwise. - -### GetStarterDriveIdOk - -`func (o *WorkspaceCreateOut) GetStarterDriveIdOk() (*string, bool)` - -GetStarterDriveIdOk returns a tuple with the StarterDriveId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetStarterDriveId - -`func (o *WorkspaceCreateOut) SetStarterDriveId(v string)` - -SetStarterDriveId sets StarterDriveId field to given value. - - -### GetWorkspace - -`func (o *WorkspaceCreateOut) GetWorkspace() WorkspaceOut` - -GetWorkspace returns the Workspace field if non-nil, zero value otherwise. - -### GetWorkspaceOk - -`func (o *WorkspaceCreateOut) GetWorkspaceOk() (*WorkspaceOut, bool)` - -GetWorkspaceOk returns a tuple with the Workspace field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetWorkspace - -`func (o *WorkspaceCreateOut) SetWorkspace(v WorkspaceOut)` - -SetWorkspace sets Workspace field to given value. - - - -[[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/sdk/go/docs/WorkspaceList.md b/sdk/go/docs/WorkspaceList.md deleted file mode 100644 index 7b56130..0000000 --- a/sdk/go/docs/WorkspaceList.md +++ /dev/null @@ -1,85 +0,0 @@ -# WorkspaceList - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Items** | [**[]WorkspaceOut**](WorkspaceOut.md) | | -**NextCursor** | Pointer to **NullableString** | | [optional] - -## Methods - -### NewWorkspaceList - -`func NewWorkspaceList(items []WorkspaceOut, ) *WorkspaceList` - -NewWorkspaceList instantiates a new WorkspaceList object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewWorkspaceListWithDefaults - -`func NewWorkspaceListWithDefaults() *WorkspaceList` - -NewWorkspaceListWithDefaults instantiates a new WorkspaceList object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetItems - -`func (o *WorkspaceList) GetItems() []WorkspaceOut` - -GetItems returns the Items field if non-nil, zero value otherwise. - -### GetItemsOk - -`func (o *WorkspaceList) GetItemsOk() (*[]WorkspaceOut, bool)` - -GetItemsOk returns a tuple with the Items field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetItems - -`func (o *WorkspaceList) SetItems(v []WorkspaceOut)` - -SetItems sets Items field to given value. - - -### GetNextCursor - -`func (o *WorkspaceList) GetNextCursor() string` - -GetNextCursor returns the NextCursor field if non-nil, zero value otherwise. - -### GetNextCursorOk - -`func (o *WorkspaceList) GetNextCursorOk() (*string, bool)` - -GetNextCursorOk returns a tuple with the NextCursor field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetNextCursor - -`func (o *WorkspaceList) SetNextCursor(v string)` - -SetNextCursor sets NextCursor field to given value. - -### HasNextCursor - -`func (o *WorkspaceList) HasNextCursor() bool` - -HasNextCursor returns a boolean if a field has been set. - -### SetNextCursorNil - -`func (o *WorkspaceList) SetNextCursorNil(b bool)` - - SetNextCursorNil sets the value for NextCursor to be an explicit nil - -### UnsetNextCursor -`func (o *WorkspaceList) UnsetNextCursor()` - -UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil - -[[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/sdk/go/docs/WorkspaceOut.md b/sdk/go/docs/WorkspaceOut.md deleted file mode 100644 index a70db61..0000000 --- a/sdk/go/docs/WorkspaceOut.md +++ /dev/null @@ -1,133 +0,0 @@ -# WorkspaceOut - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**CreatedAt** | **time.Time** | | -**Id** | **string** | | -**Name** | **string** | | -**Role** | **string** | | -**TierId** | **string** | | - -## Methods - -### NewWorkspaceOut - -`func NewWorkspaceOut(createdAt time.Time, id string, name string, role string, tierId string, ) *WorkspaceOut` - -NewWorkspaceOut instantiates a new WorkspaceOut object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewWorkspaceOutWithDefaults - -`func NewWorkspaceOutWithDefaults() *WorkspaceOut` - -NewWorkspaceOutWithDefaults instantiates a new WorkspaceOut object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetCreatedAt - -`func (o *WorkspaceOut) GetCreatedAt() time.Time` - -GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. - -### GetCreatedAtOk - -`func (o *WorkspaceOut) GetCreatedAtOk() (*time.Time, bool)` - -GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetCreatedAt - -`func (o *WorkspaceOut) SetCreatedAt(v time.Time)` - -SetCreatedAt sets CreatedAt field to given value. - - -### GetId - -`func (o *WorkspaceOut) GetId() string` - -GetId returns the Id field if non-nil, zero value otherwise. - -### GetIdOk - -`func (o *WorkspaceOut) GetIdOk() (*string, bool)` - -GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetId - -`func (o *WorkspaceOut) SetId(v string)` - -SetId sets Id field to given value. - - -### GetName - -`func (o *WorkspaceOut) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *WorkspaceOut) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *WorkspaceOut) SetName(v string)` - -SetName sets Name field to given value. - - -### GetRole - -`func (o *WorkspaceOut) GetRole() string` - -GetRole returns the Role field if non-nil, zero value otherwise. - -### GetRoleOk - -`func (o *WorkspaceOut) GetRoleOk() (*string, bool)` - -GetRoleOk returns a tuple with the Role field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetRole - -`func (o *WorkspaceOut) SetRole(v string)` - -SetRole sets Role field to given value. - - -### GetTierId - -`func (o *WorkspaceOut) GetTierId() string` - -GetTierId returns the TierId field if non-nil, zero value otherwise. - -### GetTierIdOk - -`func (o *WorkspaceOut) GetTierIdOk() (*string, bool)` - -GetTierIdOk returns a tuple with the TierId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetTierId - -`func (o *WorkspaceOut) SetTierId(v string)` - -SetTierId sets TierId field to given value. - - - -[[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/sdk/go/docs/WorkspaceRenameIn.md b/sdk/go/docs/WorkspaceRenameIn.md deleted file mode 100644 index 9ec007a..0000000 --- a/sdk/go/docs/WorkspaceRenameIn.md +++ /dev/null @@ -1,49 +0,0 @@ -# WorkspaceRenameIn - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | - -## Methods - -### NewWorkspaceRenameIn - -`func NewWorkspaceRenameIn(name string, ) *WorkspaceRenameIn` - -NewWorkspaceRenameIn instantiates a new WorkspaceRenameIn object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewWorkspaceRenameInWithDefaults - -`func NewWorkspaceRenameInWithDefaults() *WorkspaceRenameIn` - -NewWorkspaceRenameInWithDefaults instantiates a new WorkspaceRenameIn object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetName - -`func (o *WorkspaceRenameIn) GetName() string` - -GetName returns the Name field if non-nil, zero value otherwise. - -### GetNameOk - -`func (o *WorkspaceRenameIn) GetNameOk() (*string, bool)` - -GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetName - -`func (o *WorkspaceRenameIn) SetName(v string)` - -SetName sets Name field to given value. - - - -[[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/sdk/go/docs/WorkspacesAPI.md b/sdk/go/docs/WorkspacesAPI.md deleted file mode 100644 index 1de0f5c..0000000 --- a/sdk/go/docs/WorkspacesAPI.md +++ /dev/null @@ -1,216 +0,0 @@ -# \WorkspacesAPI - -All URIs are relative to *https://api.agentdrive.run* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateWorkspaceRouteV0WorkspacesPost**](WorkspacesAPI.md#CreateWorkspaceRouteV0WorkspacesPost) | **Post** /v0/workspaces | Create a new shared drive -[**ListWorkspacesRouteV0WorkspacesGet**](WorkspacesAPI.md#ListWorkspacesRouteV0WorkspacesGet) | **Get** /v0/workspaces | List the spaces you belong to -[**RenameWorkspaceRouteV0WorkspacesOrgIdPatch**](WorkspacesAPI.md#RenameWorkspaceRouteV0WorkspacesOrgIdPatch) | **Patch** /v0/workspaces/{org_id} | Rename a shared drive you administer - - - -## CreateWorkspaceRouteV0WorkspacesPost - -> WorkspaceCreateOut CreateWorkspaceRouteV0WorkspacesPost(ctx).WorkspaceCreateIn(workspaceCreateIn).Execute() - -Create a new shared drive - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - workspaceCreateIn := *openapiclient.NewWorkspaceCreateIn("Name_example") // WorkspaceCreateIn | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.WorkspacesAPI.CreateWorkspaceRouteV0WorkspacesPost(context.Background()).WorkspaceCreateIn(workspaceCreateIn).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `WorkspacesAPI.CreateWorkspaceRouteV0WorkspacesPost``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `CreateWorkspaceRouteV0WorkspacesPost`: WorkspaceCreateOut - fmt.Fprintf(os.Stdout, "Response from `WorkspacesAPI.CreateWorkspaceRouteV0WorkspacesPost`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiCreateWorkspaceRouteV0WorkspacesPostRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **workspaceCreateIn** | [**WorkspaceCreateIn**](WorkspaceCreateIn.md) | | - -### Return type - -[**WorkspaceCreateOut**](WorkspaceCreateOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **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) - - -## ListWorkspacesRouteV0WorkspacesGet - -> WorkspaceList ListWorkspacesRouteV0WorkspacesGet(ctx).Cursor(cursor).Limit(limit).Execute() - -List the spaces you belong to - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - cursor := "cursor_example" // string | (optional) - limit := int32(56) // int32 | (optional) - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.WorkspacesAPI.ListWorkspacesRouteV0WorkspacesGet(context.Background()).Cursor(cursor).Limit(limit).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `WorkspacesAPI.ListWorkspacesRouteV0WorkspacesGet``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `ListWorkspacesRouteV0WorkspacesGet`: WorkspaceList - fmt.Fprintf(os.Stdout, "Response from `WorkspacesAPI.ListWorkspacesRouteV0WorkspacesGet`: %v\n", resp) -} -``` - -### Path Parameters - - - -### Other Parameters - -Other parameters are passed through a pointer to a apiListWorkspacesRouteV0WorkspacesGetRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **cursor** | **string** | | - **limit** | **int32** | | - -### Return type - -[**WorkspaceList**](WorkspaceList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### 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) - - -## RenameWorkspaceRouteV0WorkspacesOrgIdPatch - -> WorkspaceOut RenameWorkspaceRouteV0WorkspacesOrgIdPatch(ctx, orgId).WorkspaceRenameIn(workspaceRenameIn).Execute() - -Rename a shared drive you administer - - - -### Example - -```go -package main - -import ( - "context" - "fmt" - "os" - openapiclient "github.com/Mnexa-AI/agentdrive-sdk/agentdrive" -) - -func main() { - orgId := "orgId_example" // string | - workspaceRenameIn := *openapiclient.NewWorkspaceRenameIn("Name_example") // WorkspaceRenameIn | - - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) - resp, r, err := apiClient.WorkspacesAPI.RenameWorkspaceRouteV0WorkspacesOrgIdPatch(context.Background(), orgId).WorkspaceRenameIn(workspaceRenameIn).Execute() - if err != nil { - fmt.Fprintf(os.Stderr, "Error when calling `WorkspacesAPI.RenameWorkspaceRouteV0WorkspacesOrgIdPatch``: %v\n", err) - fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) - } - // response from `RenameWorkspaceRouteV0WorkspacesOrgIdPatch`: WorkspaceOut - fmt.Fprintf(os.Stdout, "Response from `WorkspacesAPI.RenameWorkspaceRouteV0WorkspacesOrgIdPatch`: %v\n", resp) -} -``` - -### Path Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -**ctx** | **context.Context** | context for authentication, logging, cancellation, deadlines, tracing, etc. -**orgId** | **string** | | - -### Other Parameters - -Other parameters are passed through a pointer to a apiRenameWorkspaceRouteV0WorkspacesOrgIdPatchRequest struct via the builder pattern - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - - **workspaceRenameIn** | [**WorkspaceRenameIn**](WorkspaceRenameIn.md) | | - -### Return type - -[**WorkspaceOut**](WorkspaceOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: application/json -- **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) diff --git a/sdk/go/go.mod b/sdk/go/go.mod index 6ed44d4..863254b 100644 --- a/sdk/go/go.mod +++ b/sdk/go/go.mod @@ -3,5 +3,4 @@ module github.com/Mnexa-AI/agentdrive-sdk/sdk/go go 1.23 require ( - gopkg.in/validator.v2 v2.0.1 ) diff --git a/sdk/go/go.sum b/sdk/go/go.sum index 525afa0..c966c8d 100644 --- a/sdk/go/go.sum +++ b/sdk/go/go.sum @@ -9,5 +9,3 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -gopkg.in/validator.v2 v2.0.1 h1:xF0KWyGWXm/LM2G1TrEjqOu4pa6coO9AlWSf3msVfDY= -gopkg.in/validator.v2 v2.0.1/go.mod h1:lIUZBlB3Im4s/eYp39Ry/wkR02yOPhZ9IwIRBjuPuG8= diff --git a/sdk/go/model_agent_auth_metadata_out.go b/sdk/go/model_agent_auth_metadata_out.go deleted file mode 100644 index 537a15b..0000000 --- a/sdk/go/model_agent_auth_metadata_out.go +++ /dev/null @@ -1,342 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "fmt" -) - -// checks if the AgentAuthMetadataOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AgentAuthMetadataOut{} - -// AgentAuthMetadataOut struct for AgentAuthMetadataOut -type AgentAuthMetadataOut struct { - ClaimEndpoint string `json:"claim_endpoint"` - EventsEndpoint NullableString `json:"events_endpoint"` - IdentityAssertion IdentityAssertionMetadataOut `json:"identity_assertion"` - IdentityEndpoint string `json:"identity_endpoint"` - IdentityTypesSupported []string `json:"identity_types_supported"` - Skill string `json:"skill"` - SpecVersion string `json:"spec_version"` - AdditionalProperties map[string]interface{} -} - -type _AgentAuthMetadataOut AgentAuthMetadataOut - -// NewAgentAuthMetadataOut instantiates a new AgentAuthMetadataOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAgentAuthMetadataOut(claimEndpoint string, eventsEndpoint NullableString, identityAssertion IdentityAssertionMetadataOut, identityEndpoint string, identityTypesSupported []string, skill string, specVersion string) *AgentAuthMetadataOut { - this := AgentAuthMetadataOut{} - this.ClaimEndpoint = claimEndpoint - this.EventsEndpoint = eventsEndpoint - this.IdentityAssertion = identityAssertion - this.IdentityEndpoint = identityEndpoint - this.IdentityTypesSupported = identityTypesSupported - this.Skill = skill - this.SpecVersion = specVersion - return &this -} - -// NewAgentAuthMetadataOutWithDefaults instantiates a new AgentAuthMetadataOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAgentAuthMetadataOutWithDefaults() *AgentAuthMetadataOut { - this := AgentAuthMetadataOut{} - return &this -} - -// GetClaimEndpoint returns the ClaimEndpoint field value -func (o *AgentAuthMetadataOut) GetClaimEndpoint() string { - if o == nil { - var ret string - return ret - } - - return o.ClaimEndpoint -} - -// GetClaimEndpointOk returns a tuple with the ClaimEndpoint field value -// and a boolean to check if the value has been set. -func (o *AgentAuthMetadataOut) GetClaimEndpointOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ClaimEndpoint, true -} - -// SetClaimEndpoint sets field value -func (o *AgentAuthMetadataOut) SetClaimEndpoint(v string) { - o.ClaimEndpoint = v -} - -// GetEventsEndpoint returns the EventsEndpoint field value -// If the value is explicit nil, the zero value for string will be returned -func (o *AgentAuthMetadataOut) GetEventsEndpoint() string { - if o == nil || o.EventsEndpoint.Get() == nil { - var ret string - return ret - } - - return *o.EventsEndpoint.Get() -} - -// GetEventsEndpointOk returns a tuple with the EventsEndpoint field value -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *AgentAuthMetadataOut) GetEventsEndpointOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.EventsEndpoint.Get(), o.EventsEndpoint.IsSet() -} - -// SetEventsEndpoint sets field value -func (o *AgentAuthMetadataOut) SetEventsEndpoint(v string) { - o.EventsEndpoint.Set(&v) -} - -// GetIdentityAssertion returns the IdentityAssertion field value -func (o *AgentAuthMetadataOut) GetIdentityAssertion() IdentityAssertionMetadataOut { - if o == nil { - var ret IdentityAssertionMetadataOut - return ret - } - - return o.IdentityAssertion -} - -// GetIdentityAssertionOk returns a tuple with the IdentityAssertion field value -// and a boolean to check if the value has been set. -func (o *AgentAuthMetadataOut) GetIdentityAssertionOk() (*IdentityAssertionMetadataOut, bool) { - if o == nil { - return nil, false - } - return &o.IdentityAssertion, true -} - -// SetIdentityAssertion sets field value -func (o *AgentAuthMetadataOut) SetIdentityAssertion(v IdentityAssertionMetadataOut) { - o.IdentityAssertion = v -} - -// GetIdentityEndpoint returns the IdentityEndpoint field value -func (o *AgentAuthMetadataOut) GetIdentityEndpoint() string { - if o == nil { - var ret string - return ret - } - - return o.IdentityEndpoint -} - -// GetIdentityEndpointOk returns a tuple with the IdentityEndpoint field value -// and a boolean to check if the value has been set. -func (o *AgentAuthMetadataOut) GetIdentityEndpointOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.IdentityEndpoint, true -} - -// SetIdentityEndpoint sets field value -func (o *AgentAuthMetadataOut) SetIdentityEndpoint(v string) { - o.IdentityEndpoint = v -} - -// GetIdentityTypesSupported returns the IdentityTypesSupported field value -func (o *AgentAuthMetadataOut) GetIdentityTypesSupported() []string { - if o == nil { - var ret []string - return ret - } - - return o.IdentityTypesSupported -} - -// GetIdentityTypesSupportedOk returns a tuple with the IdentityTypesSupported field value -// and a boolean to check if the value has been set. -func (o *AgentAuthMetadataOut) GetIdentityTypesSupportedOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.IdentityTypesSupported, true -} - -// SetIdentityTypesSupported sets field value -func (o *AgentAuthMetadataOut) SetIdentityTypesSupported(v []string) { - o.IdentityTypesSupported = v -} - -// GetSkill returns the Skill field value -func (o *AgentAuthMetadataOut) GetSkill() string { - if o == nil { - var ret string - return ret - } - - return o.Skill -} - -// GetSkillOk returns a tuple with the Skill field value -// and a boolean to check if the value has been set. -func (o *AgentAuthMetadataOut) GetSkillOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Skill, true -} - -// SetSkill sets field value -func (o *AgentAuthMetadataOut) SetSkill(v string) { - o.Skill = v -} - -// GetSpecVersion returns the SpecVersion field value -func (o *AgentAuthMetadataOut) GetSpecVersion() string { - if o == nil { - var ret string - return ret - } - - return o.SpecVersion -} - -// GetSpecVersionOk returns a tuple with the SpecVersion field value -// and a boolean to check if the value has been set. -func (o *AgentAuthMetadataOut) GetSpecVersionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SpecVersion, true -} - -// SetSpecVersion sets field value -func (o *AgentAuthMetadataOut) SetSpecVersion(v string) { - o.SpecVersion = v -} - -func (o AgentAuthMetadataOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AgentAuthMetadataOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["claim_endpoint"] = o.ClaimEndpoint - toSerialize["events_endpoint"] = o.EventsEndpoint.Get() - toSerialize["identity_assertion"] = o.IdentityAssertion - toSerialize["identity_endpoint"] = o.IdentityEndpoint - toSerialize["identity_types_supported"] = o.IdentityTypesSupported - toSerialize["skill"] = o.Skill - toSerialize["spec_version"] = o.SpecVersion - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *AgentAuthMetadataOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "claim_endpoint", - "events_endpoint", - "identity_assertion", - "identity_endpoint", - "identity_types_supported", - "skill", - "spec_version", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varAgentAuthMetadataOut := _AgentAuthMetadataOut{} - - err = json.Unmarshal(data, &varAgentAuthMetadataOut) - - if err != nil { - return err - } - - *o = AgentAuthMetadataOut(varAgentAuthMetadataOut) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "claim_endpoint") - delete(additionalProperties, "events_endpoint") - delete(additionalProperties, "identity_assertion") - delete(additionalProperties, "identity_endpoint") - delete(additionalProperties, "identity_types_supported") - delete(additionalProperties, "skill") - delete(additionalProperties, "spec_version") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableAgentAuthMetadataOut struct { - value *AgentAuthMetadataOut - isSet bool -} - -func (v NullableAgentAuthMetadataOut) Get() *AgentAuthMetadataOut { - return v.value -} - -func (v *NullableAgentAuthMetadataOut) Set(val *AgentAuthMetadataOut) { - v.value = val - v.isSet = true -} - -func (v NullableAgentAuthMetadataOut) IsSet() bool { - return v.isSet -} - -func (v *NullableAgentAuthMetadataOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAgentAuthMetadataOut(val *AgentAuthMetadataOut) *NullableAgentAuthMetadataOut { - return &NullableAgentAuthMetadataOut{value: val, isSet: true} -} - -func (v NullableAgentAuthMetadataOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAgentAuthMetadataOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_anonymous_identity_response.go b/sdk/go/model_anonymous_identity_response.go deleted file mode 100644 index fd2fed9..0000000 --- a/sdk/go/model_anonymous_identity_response.go +++ /dev/null @@ -1,299 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "time" - "bytes" - "fmt" -) - -// checks if the AnonymousIdentityResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AnonymousIdentityResponse{} - -// AnonymousIdentityResponse `POST /agent/identity` response on the anonymous path. The agent stores `identity_assertion` as its long-lived credential and uses `claim_token` to initiate the claim ceremony when the human is ready. -type AnonymousIdentityResponse struct { - AgentIdentityId string `json:"agent_identity_id"` - ClaimMetadata ClaimMetadata `json:"claim_metadata"` - // Opaque server-issued secret. Present at POST /agent/identity/claim and at POST /oauth2/token (grant_type=claim). - ClaimToken string `json:"claim_token"` - DriveId string `json:"drive_id"` - ExpiresAt time.Time `json:"expires_at"` - // JWT signed by AgentDrive, scope=pre_claim. 30-day TTL. - IdentityAssertion string `json:"identity_assertion"` -} - -type _AnonymousIdentityResponse AnonymousIdentityResponse - -// NewAnonymousIdentityResponse instantiates a new AnonymousIdentityResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAnonymousIdentityResponse(agentIdentityId string, claimMetadata ClaimMetadata, claimToken string, driveId string, expiresAt time.Time, identityAssertion string) *AnonymousIdentityResponse { - this := AnonymousIdentityResponse{} - this.AgentIdentityId = agentIdentityId - this.ClaimMetadata = claimMetadata - this.ClaimToken = claimToken - this.DriveId = driveId - this.ExpiresAt = expiresAt - this.IdentityAssertion = identityAssertion - return &this -} - -// NewAnonymousIdentityResponseWithDefaults instantiates a new AnonymousIdentityResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAnonymousIdentityResponseWithDefaults() *AnonymousIdentityResponse { - this := AnonymousIdentityResponse{} - return &this -} - -// GetAgentIdentityId returns the AgentIdentityId field value -func (o *AnonymousIdentityResponse) GetAgentIdentityId() string { - if o == nil { - var ret string - return ret - } - - return o.AgentIdentityId -} - -// GetAgentIdentityIdOk returns a tuple with the AgentIdentityId field value -// and a boolean to check if the value has been set. -func (o *AnonymousIdentityResponse) GetAgentIdentityIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AgentIdentityId, true -} - -// SetAgentIdentityId sets field value -func (o *AnonymousIdentityResponse) SetAgentIdentityId(v string) { - o.AgentIdentityId = v -} - -// GetClaimMetadata returns the ClaimMetadata field value -func (o *AnonymousIdentityResponse) GetClaimMetadata() ClaimMetadata { - if o == nil { - var ret ClaimMetadata - return ret - } - - return o.ClaimMetadata -} - -// GetClaimMetadataOk returns a tuple with the ClaimMetadata field value -// and a boolean to check if the value has been set. -func (o *AnonymousIdentityResponse) GetClaimMetadataOk() (*ClaimMetadata, bool) { - if o == nil { - return nil, false - } - return &o.ClaimMetadata, true -} - -// SetClaimMetadata sets field value -func (o *AnonymousIdentityResponse) SetClaimMetadata(v ClaimMetadata) { - o.ClaimMetadata = v -} - -// GetClaimToken returns the ClaimToken field value -func (o *AnonymousIdentityResponse) GetClaimToken() string { - if o == nil { - var ret string - return ret - } - - return o.ClaimToken -} - -// GetClaimTokenOk returns a tuple with the ClaimToken field value -// and a boolean to check if the value has been set. -func (o *AnonymousIdentityResponse) GetClaimTokenOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ClaimToken, true -} - -// SetClaimToken sets field value -func (o *AnonymousIdentityResponse) SetClaimToken(v string) { - o.ClaimToken = v -} - -// GetDriveId returns the DriveId field value -func (o *AnonymousIdentityResponse) GetDriveId() string { - if o == nil { - var ret string - return ret - } - - return o.DriveId -} - -// GetDriveIdOk returns a tuple with the DriveId field value -// and a boolean to check if the value has been set. -func (o *AnonymousIdentityResponse) GetDriveIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.DriveId, true -} - -// SetDriveId sets field value -func (o *AnonymousIdentityResponse) SetDriveId(v string) { - o.DriveId = v -} - -// GetExpiresAt returns the ExpiresAt field value -func (o *AnonymousIdentityResponse) GetExpiresAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.ExpiresAt -} - -// GetExpiresAtOk returns a tuple with the ExpiresAt field value -// and a boolean to check if the value has been set. -func (o *AnonymousIdentityResponse) GetExpiresAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.ExpiresAt, true -} - -// SetExpiresAt sets field value -func (o *AnonymousIdentityResponse) SetExpiresAt(v time.Time) { - o.ExpiresAt = v -} - -// GetIdentityAssertion returns the IdentityAssertion field value -func (o *AnonymousIdentityResponse) GetIdentityAssertion() string { - if o == nil { - var ret string - return ret - } - - return o.IdentityAssertion -} - -// GetIdentityAssertionOk returns a tuple with the IdentityAssertion field value -// and a boolean to check if the value has been set. -func (o *AnonymousIdentityResponse) GetIdentityAssertionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.IdentityAssertion, true -} - -// SetIdentityAssertion sets field value -func (o *AnonymousIdentityResponse) SetIdentityAssertion(v string) { - o.IdentityAssertion = v -} - -func (o AnonymousIdentityResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AnonymousIdentityResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["agent_identity_id"] = o.AgentIdentityId - toSerialize["claim_metadata"] = o.ClaimMetadata - toSerialize["claim_token"] = o.ClaimToken - toSerialize["drive_id"] = o.DriveId - toSerialize["expires_at"] = o.ExpiresAt - toSerialize["identity_assertion"] = o.IdentityAssertion - return toSerialize, nil -} - -func (o *AnonymousIdentityResponse) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "agent_identity_id", - "claim_metadata", - "claim_token", - "drive_id", - "expires_at", - "identity_assertion", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varAnonymousIdentityResponse := _AnonymousIdentityResponse{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varAnonymousIdentityResponse) - - if err != nil { - return err - } - - *o = AnonymousIdentityResponse(varAnonymousIdentityResponse) - - return err -} - -type NullableAnonymousIdentityResponse struct { - value *AnonymousIdentityResponse - isSet bool -} - -func (v NullableAnonymousIdentityResponse) Get() *AnonymousIdentityResponse { - return v.value -} - -func (v *NullableAnonymousIdentityResponse) Set(val *AnonymousIdentityResponse) { - v.value = val - v.isSet = true -} - -func (v NullableAnonymousIdentityResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableAnonymousIdentityResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAnonymousIdentityResponse(val *AnonymousIdentityResponse) *NullableAnonymousIdentityResponse { - return &NullableAnonymousIdentityResponse{value: val, isSet: true} -} - -func (v NullableAnonymousIdentityResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAnonymousIdentityResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_artifact_copy_in.go b/sdk/go/model_artifact_copy_in.go new file mode 100644 index 0000000..96dfe31 --- /dev/null +++ b/sdk/go/model_artifact_copy_in.go @@ -0,0 +1,276 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ArtifactCopyIn type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ArtifactCopyIn{} + +// ArtifactCopyIn POST /v0/drives/{id}/artifacts/{artifact_id}/copy body. ``destination_drive_id`` must equal the source drive (or be absent) — cross-drive copy is out of v0 scope and rejected. +type ArtifactCopyIn struct { + DestinationDriveId NullableString `json:"destination_drive_id,omitempty" validate:"regexp=^drv_[a-f0-9]{16}$"` + DestinationName string `json:"destination_name"` + DestinationParentId string `json:"destination_parent_id" validate:"regexp=^fld_[a-f0-9]{16}$"` + VersionId NullableString `json:"version_id,omitempty" validate:"regexp=^ver_[a-f0-9]{16}$"` +} + +type _ArtifactCopyIn ArtifactCopyIn + +// NewArtifactCopyIn instantiates a new ArtifactCopyIn object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewArtifactCopyIn(destinationName string, destinationParentId string) *ArtifactCopyIn { + this := ArtifactCopyIn{} + this.DestinationName = destinationName + this.DestinationParentId = destinationParentId + return &this +} + +// NewArtifactCopyInWithDefaults instantiates a new ArtifactCopyIn object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewArtifactCopyInWithDefaults() *ArtifactCopyIn { + this := ArtifactCopyIn{} + return &this +} + +// GetDestinationDriveId returns the DestinationDriveId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ArtifactCopyIn) GetDestinationDriveId() string { + if o == nil || IsNil(o.DestinationDriveId.Get()) { + var ret string + return ret + } + return *o.DestinationDriveId.Get() +} + +// GetDestinationDriveIdOk returns a tuple with the DestinationDriveId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ArtifactCopyIn) GetDestinationDriveIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.DestinationDriveId.Get(), o.DestinationDriveId.IsSet() +} + +// HasDestinationDriveId returns a boolean if a field has been set. +func (o *ArtifactCopyIn) HasDestinationDriveId() bool { + if o != nil && o.DestinationDriveId.IsSet() { + return true + } + + return false +} + +// SetDestinationDriveId gets a reference to the given NullableString and assigns it to the DestinationDriveId field. +func (o *ArtifactCopyIn) SetDestinationDriveId(v string) { + o.DestinationDriveId.Set(&v) +} +// SetDestinationDriveIdNil sets the value for DestinationDriveId to be an explicit nil +func (o *ArtifactCopyIn) SetDestinationDriveIdNil() { + o.DestinationDriveId.Set(nil) +} + +// UnsetDestinationDriveId ensures that no value is present for DestinationDriveId, not even an explicit nil +func (o *ArtifactCopyIn) UnsetDestinationDriveId() { + o.DestinationDriveId.Unset() +} + +// GetDestinationName returns the DestinationName field value +func (o *ArtifactCopyIn) GetDestinationName() string { + if o == nil { + var ret string + return ret + } + + return o.DestinationName +} + +// GetDestinationNameOk returns a tuple with the DestinationName field value +// and a boolean to check if the value has been set. +func (o *ArtifactCopyIn) GetDestinationNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DestinationName, true +} + +// SetDestinationName sets field value +func (o *ArtifactCopyIn) SetDestinationName(v string) { + o.DestinationName = v +} + +// GetDestinationParentId returns the DestinationParentId field value +func (o *ArtifactCopyIn) GetDestinationParentId() string { + if o == nil { + var ret string + return ret + } + + return o.DestinationParentId +} + +// GetDestinationParentIdOk returns a tuple with the DestinationParentId field value +// and a boolean to check if the value has been set. +func (o *ArtifactCopyIn) GetDestinationParentIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DestinationParentId, true +} + +// SetDestinationParentId sets field value +func (o *ArtifactCopyIn) SetDestinationParentId(v string) { + o.DestinationParentId = v +} + +// GetVersionId returns the VersionId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ArtifactCopyIn) GetVersionId() string { + if o == nil || IsNil(o.VersionId.Get()) { + var ret string + return ret + } + return *o.VersionId.Get() +} + +// GetVersionIdOk returns a tuple with the VersionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ArtifactCopyIn) GetVersionIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.VersionId.Get(), o.VersionId.IsSet() +} + +// HasVersionId returns a boolean if a field has been set. +func (o *ArtifactCopyIn) HasVersionId() bool { + if o != nil && o.VersionId.IsSet() { + return true + } + + return false +} + +// SetVersionId gets a reference to the given NullableString and assigns it to the VersionId field. +func (o *ArtifactCopyIn) SetVersionId(v string) { + o.VersionId.Set(&v) +} +// SetVersionIdNil sets the value for VersionId to be an explicit nil +func (o *ArtifactCopyIn) SetVersionIdNil() { + o.VersionId.Set(nil) +} + +// UnsetVersionId ensures that no value is present for VersionId, not even an explicit nil +func (o *ArtifactCopyIn) UnsetVersionId() { + o.VersionId.Unset() +} + +func (o ArtifactCopyIn) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ArtifactCopyIn) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.DestinationDriveId.IsSet() { + toSerialize["destination_drive_id"] = o.DestinationDriveId.Get() + } + toSerialize["destination_name"] = o.DestinationName + toSerialize["destination_parent_id"] = o.DestinationParentId + if o.VersionId.IsSet() { + toSerialize["version_id"] = o.VersionId.Get() + } + return toSerialize, nil +} + +func (o *ArtifactCopyIn) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "destination_name", + "destination_parent_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varArtifactCopyIn := _ArtifactCopyIn{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varArtifactCopyIn) + + if err != nil { + return err + } + + *o = ArtifactCopyIn(varArtifactCopyIn) + + return err +} + +type NullableArtifactCopyIn struct { + value *ArtifactCopyIn + isSet bool +} + +func (v NullableArtifactCopyIn) Get() *ArtifactCopyIn { + return v.value +} + +func (v *NullableArtifactCopyIn) Set(val *ArtifactCopyIn) { + v.value = val + v.isSet = true +} + +func (v NullableArtifactCopyIn) IsSet() bool { + return v.isSet +} + +func (v *NullableArtifactCopyIn) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableArtifactCopyIn(val *ArtifactCopyIn) *NullableArtifactCopyIn { + return &NullableArtifactCopyIn{value: val, isSet: true} +} + +func (v NullableArtifactCopyIn) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableArtifactCopyIn) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/sdk/go/model_artifact_delete_out.go b/sdk/go/model_artifact_delete_out.go deleted file mode 100644 index 2bc7cdf..0000000 --- a/sdk/go/model_artifact_delete_out.go +++ /dev/null @@ -1,327 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "time" - "bytes" - "fmt" -) - -// checks if the ArtifactDeleteOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ArtifactDeleteOut{} - -// ArtifactDeleteOut DELETE /v0/artifacts/{art_id} response — the soft-delete receipt. Reversible until the GC cron hard-deletes at `purge_at`; `restore_url` points at the by-id restore endpoint (deletion-design.md §5.3). -type ArtifactDeleteOut struct { - DeletedAt time.Time `json:"deleted_at"` - Id string `json:"id"` - Ok *bool `json:"ok,omitempty"` - Path string `json:"path"` - PurgeAt time.Time `json:"purge_at"` - RestoreUrl NullableString `json:"restore_url,omitempty"` -} - -type _ArtifactDeleteOut ArtifactDeleteOut - -// NewArtifactDeleteOut instantiates a new ArtifactDeleteOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewArtifactDeleteOut(deletedAt time.Time, id string, path string, purgeAt time.Time) *ArtifactDeleteOut { - this := ArtifactDeleteOut{} - this.DeletedAt = deletedAt - this.Id = id - var ok bool = true - this.Ok = &ok - this.Path = path - this.PurgeAt = purgeAt - return &this -} - -// NewArtifactDeleteOutWithDefaults instantiates a new ArtifactDeleteOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewArtifactDeleteOutWithDefaults() *ArtifactDeleteOut { - this := ArtifactDeleteOut{} - var ok bool = true - this.Ok = &ok - return &this -} - -// GetDeletedAt returns the DeletedAt field value -func (o *ArtifactDeleteOut) GetDeletedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.DeletedAt -} - -// GetDeletedAtOk returns a tuple with the DeletedAt field value -// and a boolean to check if the value has been set. -func (o *ArtifactDeleteOut) GetDeletedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.DeletedAt, true -} - -// SetDeletedAt sets field value -func (o *ArtifactDeleteOut) SetDeletedAt(v time.Time) { - o.DeletedAt = v -} - -// GetId returns the Id field value -func (o *ArtifactDeleteOut) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *ArtifactDeleteOut) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *ArtifactDeleteOut) SetId(v string) { - o.Id = v -} - -// GetOk returns the Ok field value if set, zero value otherwise. -func (o *ArtifactDeleteOut) GetOk() bool { - if o == nil || IsNil(o.Ok) { - var ret bool - return ret - } - return *o.Ok -} - -// GetOkOk returns a tuple with the Ok field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ArtifactDeleteOut) GetOkOk() (*bool, bool) { - if o == nil || IsNil(o.Ok) { - return nil, false - } - return o.Ok, true -} - -// HasOk returns a boolean if a field has been set. -func (o *ArtifactDeleteOut) HasOk() bool { - if o != nil && !IsNil(o.Ok) { - return true - } - - return false -} - -// SetOk gets a reference to the given bool and assigns it to the Ok field. -func (o *ArtifactDeleteOut) SetOk(v bool) { - o.Ok = &v -} - -// GetPath returns the Path field value -func (o *ArtifactDeleteOut) GetPath() string { - if o == nil { - var ret string - return ret - } - - return o.Path -} - -// GetPathOk returns a tuple with the Path field value -// and a boolean to check if the value has been set. -func (o *ArtifactDeleteOut) GetPathOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Path, true -} - -// SetPath sets field value -func (o *ArtifactDeleteOut) SetPath(v string) { - o.Path = v -} - -// GetPurgeAt returns the PurgeAt field value -func (o *ArtifactDeleteOut) GetPurgeAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.PurgeAt -} - -// GetPurgeAtOk returns a tuple with the PurgeAt field value -// and a boolean to check if the value has been set. -func (o *ArtifactDeleteOut) GetPurgeAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.PurgeAt, true -} - -// SetPurgeAt sets field value -func (o *ArtifactDeleteOut) SetPurgeAt(v time.Time) { - o.PurgeAt = v -} - -// GetRestoreUrl returns the RestoreUrl field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ArtifactDeleteOut) GetRestoreUrl() string { - if o == nil || IsNil(o.RestoreUrl.Get()) { - var ret string - return ret - } - return *o.RestoreUrl.Get() -} - -// GetRestoreUrlOk returns a tuple with the RestoreUrl field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ArtifactDeleteOut) GetRestoreUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.RestoreUrl.Get(), o.RestoreUrl.IsSet() -} - -// HasRestoreUrl returns a boolean if a field has been set. -func (o *ArtifactDeleteOut) HasRestoreUrl() bool { - if o != nil && o.RestoreUrl.IsSet() { - return true - } - - return false -} - -// SetRestoreUrl gets a reference to the given NullableString and assigns it to the RestoreUrl field. -func (o *ArtifactDeleteOut) SetRestoreUrl(v string) { - o.RestoreUrl.Set(&v) -} -// SetRestoreUrlNil sets the value for RestoreUrl to be an explicit nil -func (o *ArtifactDeleteOut) SetRestoreUrlNil() { - o.RestoreUrl.Set(nil) -} - -// UnsetRestoreUrl ensures that no value is present for RestoreUrl, not even an explicit nil -func (o *ArtifactDeleteOut) UnsetRestoreUrl() { - o.RestoreUrl.Unset() -} - -func (o ArtifactDeleteOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ArtifactDeleteOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["deleted_at"] = o.DeletedAt - toSerialize["id"] = o.Id - if !IsNil(o.Ok) { - toSerialize["ok"] = o.Ok - } - toSerialize["path"] = o.Path - toSerialize["purge_at"] = o.PurgeAt - if o.RestoreUrl.IsSet() { - toSerialize["restore_url"] = o.RestoreUrl.Get() - } - return toSerialize, nil -} - -func (o *ArtifactDeleteOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "deleted_at", - "id", - "path", - "purge_at", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varArtifactDeleteOut := _ArtifactDeleteOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varArtifactDeleteOut) - - if err != nil { - return err - } - - *o = ArtifactDeleteOut(varArtifactDeleteOut) - - return err -} - -type NullableArtifactDeleteOut struct { - value *ArtifactDeleteOut - isSet bool -} - -func (v NullableArtifactDeleteOut) Get() *ArtifactDeleteOut { - return v.value -} - -func (v *NullableArtifactDeleteOut) Set(val *ArtifactDeleteOut) { - v.value = val - v.isSet = true -} - -func (v NullableArtifactDeleteOut) IsSet() bool { - return v.isSet -} - -func (v *NullableArtifactDeleteOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableArtifactDeleteOut(val *ArtifactDeleteOut) *NullableArtifactDeleteOut { - return &NullableArtifactDeleteOut{value: val, isSet: true} -} - -func (v NullableArtifactDeleteOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableArtifactDeleteOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_artifact_head_out.go b/sdk/go/model_artifact_head_out.go deleted file mode 100644 index c4593e1..0000000 --- a/sdk/go/model_artifact_head_out.go +++ /dev/null @@ -1,156 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the ArtifactHeadOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ArtifactHeadOut{} - -// ArtifactHeadOut struct for ArtifactHeadOut -type ArtifactHeadOut struct { - Version int32 `json:"version"` -} - -type _ArtifactHeadOut ArtifactHeadOut - -// NewArtifactHeadOut instantiates a new ArtifactHeadOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewArtifactHeadOut(version int32) *ArtifactHeadOut { - this := ArtifactHeadOut{} - this.Version = version - return &this -} - -// NewArtifactHeadOutWithDefaults instantiates a new ArtifactHeadOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewArtifactHeadOutWithDefaults() *ArtifactHeadOut { - this := ArtifactHeadOut{} - return &this -} - -// GetVersion returns the Version field value -func (o *ArtifactHeadOut) GetVersion() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Version -} - -// GetVersionOk returns a tuple with the Version field value -// and a boolean to check if the value has been set. -func (o *ArtifactHeadOut) GetVersionOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Version, true -} - -// SetVersion sets field value -func (o *ArtifactHeadOut) SetVersion(v int32) { - o.Version = v -} - -func (o ArtifactHeadOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ArtifactHeadOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["version"] = o.Version - return toSerialize, nil -} - -func (o *ArtifactHeadOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "version", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varArtifactHeadOut := _ArtifactHeadOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varArtifactHeadOut) - - if err != nil { - return err - } - - *o = ArtifactHeadOut(varArtifactHeadOut) - - return err -} - -type NullableArtifactHeadOut struct { - value *ArtifactHeadOut - isSet bool -} - -func (v NullableArtifactHeadOut) Get() *ArtifactHeadOut { - return v.value -} - -func (v *NullableArtifactHeadOut) Set(val *ArtifactHeadOut) { - v.value = val - v.isSet = true -} - -func (v NullableArtifactHeadOut) IsSet() bool { - return v.isSet -} - -func (v *NullableArtifactHeadOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableArtifactHeadOut(val *ArtifactHeadOut) *NullableArtifactHeadOut { - return &NullableArtifactHeadOut{value: val, isSet: true} -} - -func (v NullableArtifactHeadOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableArtifactHeadOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_artifact_list_out.go b/sdk/go/model_artifact_list_out.go new file mode 100644 index 0000000..29be3b1 --- /dev/null +++ b/sdk/go/model_artifact_list_out.go @@ -0,0 +1,186 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ArtifactListOut type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ArtifactListOut{} + +// ArtifactListOut struct for ArtifactListOut +type ArtifactListOut struct { + Items []ArtifactOut `json:"items"` + NextCursor NullableString `json:"next_cursor"` +} + +type _ArtifactListOut ArtifactListOut + +// NewArtifactListOut instantiates a new ArtifactListOut object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewArtifactListOut(items []ArtifactOut, nextCursor NullableString) *ArtifactListOut { + this := ArtifactListOut{} + this.Items = items + this.NextCursor = nextCursor + return &this +} + +// NewArtifactListOutWithDefaults instantiates a new ArtifactListOut object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewArtifactListOutWithDefaults() *ArtifactListOut { + this := ArtifactListOut{} + return &this +} + +// GetItems returns the Items field value +func (o *ArtifactListOut) GetItems() []ArtifactOut { + if o == nil { + var ret []ArtifactOut + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *ArtifactListOut) GetItemsOk() ([]ArtifactOut, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *ArtifactListOut) SetItems(v []ArtifactOut) { + o.Items = v +} + +// GetNextCursor returns the NextCursor field value +// If the value is explicit nil, the zero value for string will be returned +func (o *ArtifactListOut) GetNextCursor() string { + if o == nil || o.NextCursor.Get() == nil { + var ret string + return ret + } + + return *o.NextCursor.Get() +} + +// GetNextCursorOk returns a tuple with the NextCursor field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ArtifactListOut) GetNextCursorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.NextCursor.Get(), o.NextCursor.IsSet() +} + +// SetNextCursor sets field value +func (o *ArtifactListOut) SetNextCursor(v string) { + o.NextCursor.Set(&v) +} + +func (o ArtifactListOut) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ArtifactListOut) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + toSerialize["next_cursor"] = o.NextCursor.Get() + return toSerialize, nil +} + +func (o *ArtifactListOut) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "items", + "next_cursor", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varArtifactListOut := _ArtifactListOut{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varArtifactListOut) + + if err != nil { + return err + } + + *o = ArtifactListOut(varArtifactListOut) + + return err +} + +type NullableArtifactListOut struct { + value *ArtifactListOut + isSet bool +} + +func (v NullableArtifactListOut) Get() *ArtifactListOut { + return v.value +} + +func (v *NullableArtifactListOut) Set(val *ArtifactListOut) { + v.value = val + v.isSet = true +} + +func (v NullableArtifactListOut) IsSet() bool { + return v.isSet +} + +func (v *NullableArtifactListOut) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableArtifactListOut(val *ArtifactListOut) *NullableArtifactListOut { + return &NullableArtifactListOut{value: val, isSet: true} +} + +func (v NullableArtifactListOut) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableArtifactListOut) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/sdk/go/model_artifact_move_in.go b/sdk/go/model_artifact_move_in.go deleted file mode 100644 index c0355c5..0000000 --- a/sdk/go/model_artifact_move_in.go +++ /dev/null @@ -1,156 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the ArtifactMoveIn type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ArtifactMoveIn{} - -// ArtifactMoveIn POST /v0/artifacts/{art_id}/move body — rename / move to a new path on the same drive. Mirrors `FolderMoveIn`; its own schema (vs. reusing another body) keeps the move surface self-documenting in the OpenAPI spec. -type ArtifactMoveIn struct { - Path string `json:"path"` -} - -type _ArtifactMoveIn ArtifactMoveIn - -// NewArtifactMoveIn instantiates a new ArtifactMoveIn object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewArtifactMoveIn(path string) *ArtifactMoveIn { - this := ArtifactMoveIn{} - this.Path = path - return &this -} - -// NewArtifactMoveInWithDefaults instantiates a new ArtifactMoveIn object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewArtifactMoveInWithDefaults() *ArtifactMoveIn { - this := ArtifactMoveIn{} - return &this -} - -// GetPath returns the Path field value -func (o *ArtifactMoveIn) GetPath() string { - if o == nil { - var ret string - return ret - } - - return o.Path -} - -// GetPathOk returns a tuple with the Path field value -// and a boolean to check if the value has been set. -func (o *ArtifactMoveIn) GetPathOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Path, true -} - -// SetPath sets field value -func (o *ArtifactMoveIn) SetPath(v string) { - o.Path = v -} - -func (o ArtifactMoveIn) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ArtifactMoveIn) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["path"] = o.Path - return toSerialize, nil -} - -func (o *ArtifactMoveIn) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "path", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varArtifactMoveIn := _ArtifactMoveIn{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varArtifactMoveIn) - - if err != nil { - return err - } - - *o = ArtifactMoveIn(varArtifactMoveIn) - - return err -} - -type NullableArtifactMoveIn struct { - value *ArtifactMoveIn - isSet bool -} - -func (v NullableArtifactMoveIn) Get() *ArtifactMoveIn { - return v.value -} - -func (v *NullableArtifactMoveIn) Set(val *ArtifactMoveIn) { - v.value = val - v.isSet = true -} - -func (v NullableArtifactMoveIn) IsSet() bool { - return v.isSet -} - -func (v *NullableArtifactMoveIn) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableArtifactMoveIn(val *ArtifactMoveIn) *NullableArtifactMoveIn { - return &NullableArtifactMoveIn{value: val, isSet: true} -} - -func (v NullableArtifactMoveIn) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableArtifactMoveIn) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_artifact_out.go b/sdk/go/model_artifact_out.go index c16a73b..47c381c 100644 --- a/sdk/go/model_artifact_out.go +++ b/sdk/go/model_artifact_out.go @@ -1,7 +1,7 @@ /* AgentDrive -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. API version: */ @@ -22,26 +22,22 @@ var _ MappedNullable = &ArtifactOut{} // ArtifactOut struct for ArtifactOut type ArtifactOut struct { - ContentType string `json:"content_type"` + ContentPreview NullableString `json:"content_preview"` + ContentType NullableString `json:"content_type"` CreatedAt time.Time `json:"created_at"` - DriveId string `json:"drive_id"` - EmbeddedAt NullableTime `json:"embedded_at,omitempty"` - Etag string `json:"etag"` - FileType string `json:"file_type"` - Hash string `json:"hash"` - Id string `json:"id"` - IndexedAt NullableTime `json:"indexed_at,omitempty"` - Labels []string `json:"labels,omitempty"` - LlmIndex map[string]interface{} `json:"llm_index,omitempty"` - Metadata map[string]interface{} `json:"metadata,omitempty"` - Metageneration *int32 `json:"metageneration,omitempty"` - Path string `json:"path"` - Permalink string `json:"permalink"` - SizeBytes int32 `json:"size_bytes"` - Source NullableArtifactSource `json:"source,omitempty"` + DeletedAt NullableTime `json:"deleted_at"` + DriveId string `json:"drive_id" validate:"regexp=^drv_[a-f0-9]{16}$"` + // Server-computed exposure summary, resolved over the artifact's live grants, its folder ancestry (bounded by the nearest sealed folder), and the drive. 'public' when any live grant has principal_type 'public'; otherwise 'shared' when a live grant names a principal other than the drive's creator; otherwise 'private'. Describes exposure, NOT the caller's own access. + EffectiveVisibility string `json:"effective_visibility"` + HeadVersionId NullableString `json:"head_version_id"` + Id string `json:"id" validate:"regexp=^art_[a-f0-9]{16}$"` + Labels []string `json:"labels"` + Metadata map[string]interface{} `json:"metadata"` + Name string `json:"name"` + ParentId string `json:"parent_id" validate:"regexp=^fld_[a-f0-9]{16}$"` + Revision string `json:"revision" validate:"regexp=^rev_[a-f0-9]{16}$"` + State string `json:"state"` UpdatedAt time.Time `json:"updated_at"` - Url string `json:"url"` - VersionNumber *int32 `json:"version_number,omitempty"` } type _ArtifactOut ArtifactOut @@ -50,24 +46,23 @@ type _ArtifactOut ArtifactOut // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewArtifactOut(contentType string, createdAt time.Time, driveId string, etag string, fileType string, hash string, id string, path string, permalink string, sizeBytes int32, updatedAt time.Time, url string) *ArtifactOut { +func NewArtifactOut(contentPreview NullableString, contentType NullableString, createdAt time.Time, deletedAt NullableTime, driveId string, effectiveVisibility string, headVersionId NullableString, id string, labels []string, metadata map[string]interface{}, name string, parentId string, revision string, state string, updatedAt time.Time) *ArtifactOut { this := ArtifactOut{} + this.ContentPreview = contentPreview this.ContentType = contentType this.CreatedAt = createdAt + this.DeletedAt = deletedAt this.DriveId = driveId - this.Etag = etag - this.FileType = fileType - this.Hash = hash + this.EffectiveVisibility = effectiveVisibility + this.HeadVersionId = headVersionId this.Id = id - var metageneration int32 = 1 - this.Metageneration = &metageneration - this.Path = path - this.Permalink = permalink - this.SizeBytes = sizeBytes + this.Labels = labels + this.Metadata = metadata + this.Name = name + this.ParentId = parentId + this.Revision = revision + this.State = state this.UpdatedAt = updatedAt - this.Url = url - var versionNumber int32 = 1 - this.VersionNumber = &versionNumber return &this } @@ -76,35 +71,59 @@ func NewArtifactOut(contentType string, createdAt time.Time, driveId string, eta // but it doesn't guarantee that properties required by API are set func NewArtifactOutWithDefaults() *ArtifactOut { this := ArtifactOut{} - var metageneration int32 = 1 - this.Metageneration = &metageneration - var versionNumber int32 = 1 - this.VersionNumber = &versionNumber return &this } +// GetContentPreview returns the ContentPreview field value +// If the value is explicit nil, the zero value for string will be returned +func (o *ArtifactOut) GetContentPreview() string { + if o == nil || o.ContentPreview.Get() == nil { + var ret string + return ret + } + + return *o.ContentPreview.Get() +} + +// GetContentPreviewOk returns a tuple with the ContentPreview field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ArtifactOut) GetContentPreviewOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ContentPreview.Get(), o.ContentPreview.IsSet() +} + +// SetContentPreview sets field value +func (o *ArtifactOut) SetContentPreview(v string) { + o.ContentPreview.Set(&v) +} + // GetContentType returns the ContentType field value +// If the value is explicit nil, the zero value for string will be returned func (o *ArtifactOut) GetContentType() string { - if o == nil { + if o == nil || o.ContentType.Get() == nil { var ret string return ret } - return o.ContentType + return *o.ContentType.Get() } // GetContentTypeOk returns a tuple with the ContentType field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ArtifactOut) GetContentTypeOk() (*string, bool) { if o == nil { return nil, false } - return &o.ContentType, true + return o.ContentType.Get(), o.ContentType.IsSet() } // SetContentType sets field value func (o *ArtifactOut) SetContentType(v string) { - o.ContentType = v + o.ContentType.Set(&v) } // GetCreatedAt returns the CreatedAt field value @@ -131,142 +150,104 @@ func (o *ArtifactOut) SetCreatedAt(v time.Time) { o.CreatedAt = v } -// GetDriveId returns the DriveId field value -func (o *ArtifactOut) GetDriveId() string { - if o == nil { - var ret string - return ret - } - - return o.DriveId -} - -// GetDriveIdOk returns a tuple with the DriveId field value -// and a boolean to check if the value has been set. -func (o *ArtifactOut) GetDriveIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.DriveId, true -} - -// SetDriveId sets field value -func (o *ArtifactOut) SetDriveId(v string) { - o.DriveId = v -} - -// GetEmbeddedAt returns the EmbeddedAt field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ArtifactOut) GetEmbeddedAt() time.Time { - if o == nil || IsNil(o.EmbeddedAt.Get()) { +// GetDeletedAt returns the DeletedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *ArtifactOut) GetDeletedAt() time.Time { + if o == nil || o.DeletedAt.Get() == nil { var ret time.Time return ret } - return *o.EmbeddedAt.Get() + + return *o.DeletedAt.Get() } -// GetEmbeddedAtOk returns a tuple with the EmbeddedAt field value if set, nil otherwise +// GetDeletedAtOk returns a tuple with the DeletedAt field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ArtifactOut) GetEmbeddedAtOk() (*time.Time, bool) { +func (o *ArtifactOut) GetDeletedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return o.EmbeddedAt.Get(), o.EmbeddedAt.IsSet() -} - -// HasEmbeddedAt returns a boolean if a field has been set. -func (o *ArtifactOut) HasEmbeddedAt() bool { - if o != nil && o.EmbeddedAt.IsSet() { - return true - } - - return false -} - -// SetEmbeddedAt gets a reference to the given NullableTime and assigns it to the EmbeddedAt field. -func (o *ArtifactOut) SetEmbeddedAt(v time.Time) { - o.EmbeddedAt.Set(&v) -} -// SetEmbeddedAtNil sets the value for EmbeddedAt to be an explicit nil -func (o *ArtifactOut) SetEmbeddedAtNil() { - o.EmbeddedAt.Set(nil) + return o.DeletedAt.Get(), o.DeletedAt.IsSet() } -// UnsetEmbeddedAt ensures that no value is present for EmbeddedAt, not even an explicit nil -func (o *ArtifactOut) UnsetEmbeddedAt() { - o.EmbeddedAt.Unset() +// SetDeletedAt sets field value +func (o *ArtifactOut) SetDeletedAt(v time.Time) { + o.DeletedAt.Set(&v) } -// GetEtag returns the Etag field value -func (o *ArtifactOut) GetEtag() string { +// GetDriveId returns the DriveId field value +func (o *ArtifactOut) GetDriveId() string { if o == nil { var ret string return ret } - return o.Etag + return o.DriveId } -// GetEtagOk returns a tuple with the Etag field value +// GetDriveIdOk returns a tuple with the DriveId field value // and a boolean to check if the value has been set. -func (o *ArtifactOut) GetEtagOk() (*string, bool) { +func (o *ArtifactOut) GetDriveIdOk() (*string, bool) { if o == nil { return nil, false } - return &o.Etag, true + return &o.DriveId, true } -// SetEtag sets field value -func (o *ArtifactOut) SetEtag(v string) { - o.Etag = v +// SetDriveId sets field value +func (o *ArtifactOut) SetDriveId(v string) { + o.DriveId = v } -// GetFileType returns the FileType field value -func (o *ArtifactOut) GetFileType() string { +// GetEffectiveVisibility returns the EffectiveVisibility field value +func (o *ArtifactOut) GetEffectiveVisibility() string { if o == nil { var ret string return ret } - return o.FileType + return o.EffectiveVisibility } -// GetFileTypeOk returns a tuple with the FileType field value +// GetEffectiveVisibilityOk returns a tuple with the EffectiveVisibility field value // and a boolean to check if the value has been set. -func (o *ArtifactOut) GetFileTypeOk() (*string, bool) { +func (o *ArtifactOut) GetEffectiveVisibilityOk() (*string, bool) { if o == nil { return nil, false } - return &o.FileType, true + return &o.EffectiveVisibility, true } -// SetFileType sets field value -func (o *ArtifactOut) SetFileType(v string) { - o.FileType = v +// SetEffectiveVisibility sets field value +func (o *ArtifactOut) SetEffectiveVisibility(v string) { + o.EffectiveVisibility = v } -// GetHash returns the Hash field value -func (o *ArtifactOut) GetHash() string { - if o == nil { +// GetHeadVersionId returns the HeadVersionId field value +// If the value is explicit nil, the zero value for string will be returned +func (o *ArtifactOut) GetHeadVersionId() string { + if o == nil || o.HeadVersionId.Get() == nil { var ret string return ret } - return o.Hash + return *o.HeadVersionId.Get() } -// GetHashOk returns a tuple with the Hash field value +// GetHeadVersionIdOk returns a tuple with the HeadVersionId field value // and a boolean to check if the value has been set. -func (o *ArtifactOut) GetHashOk() (*string, bool) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ArtifactOut) GetHeadVersionIdOk() (*string, bool) { if o == nil { return nil, false } - return &o.Hash, true + return o.HeadVersionId.Get(), o.HeadVersionId.IsSet() } -// SetHash sets field value -func (o *ArtifactOut) SetHash(v string) { - o.Hash = v +// SetHeadVersionId sets field value +func (o *ArtifactOut) SetHeadVersionId(v string) { + o.HeadVersionId.Set(&v) } // GetId returns the Id field value @@ -293,289 +274,148 @@ func (o *ArtifactOut) SetId(v string) { o.Id = v } -// GetIndexedAt returns the IndexedAt field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ArtifactOut) GetIndexedAt() time.Time { - if o == nil || IsNil(o.IndexedAt.Get()) { - var ret time.Time - return ret - } - return *o.IndexedAt.Get() -} - -// GetIndexedAtOk returns a tuple with the IndexedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ArtifactOut) GetIndexedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.IndexedAt.Get(), o.IndexedAt.IsSet() -} - -// HasIndexedAt returns a boolean if a field has been set. -func (o *ArtifactOut) HasIndexedAt() bool { - if o != nil && o.IndexedAt.IsSet() { - return true - } - - return false -} - -// SetIndexedAt gets a reference to the given NullableTime and assigns it to the IndexedAt field. -func (o *ArtifactOut) SetIndexedAt(v time.Time) { - o.IndexedAt.Set(&v) -} -// SetIndexedAtNil sets the value for IndexedAt to be an explicit nil -func (o *ArtifactOut) SetIndexedAtNil() { - o.IndexedAt.Set(nil) -} - -// UnsetIndexedAt ensures that no value is present for IndexedAt, not even an explicit nil -func (o *ArtifactOut) UnsetIndexedAt() { - o.IndexedAt.Unset() -} - -// GetLabels returns the Labels field value if set, zero value otherwise. +// GetLabels returns the Labels field value func (o *ArtifactOut) GetLabels() []string { - if o == nil || IsNil(o.Labels) { + if o == nil { var ret []string return ret } + return o.Labels } -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// GetLabelsOk returns a tuple with the Labels field value // and a boolean to check if the value has been set. func (o *ArtifactOut) GetLabelsOk() ([]string, bool) { - if o == nil || IsNil(o.Labels) { + if o == nil { return nil, false } return o.Labels, true } -// HasLabels returns a boolean if a field has been set. -func (o *ArtifactOut) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given []string and assigns it to the Labels field. +// SetLabels sets field value func (o *ArtifactOut) SetLabels(v []string) { o.Labels = v } -// GetLlmIndex returns the LlmIndex field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ArtifactOut) GetLlmIndex() map[string]interface{} { +// GetMetadata returns the Metadata field value +func (o *ArtifactOut) GetMetadata() map[string]interface{} { if o == nil { var ret map[string]interface{} return ret } - return o.LlmIndex -} - -// GetLlmIndexOk returns a tuple with the LlmIndex field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ArtifactOut) GetLlmIndexOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.LlmIndex) { - return map[string]interface{}{}, false - } - return o.LlmIndex, true -} - -// HasLlmIndex returns a boolean if a field has been set. -func (o *ArtifactOut) HasLlmIndex() bool { - if o != nil && !IsNil(o.LlmIndex) { - return true - } - - return false -} - -// SetLlmIndex gets a reference to the given map[string]interface{} and assigns it to the LlmIndex field. -func (o *ArtifactOut) SetLlmIndex(v map[string]interface{}) { - o.LlmIndex = v -} -// GetMetadata returns the Metadata field value if set, zero value otherwise. -func (o *ArtifactOut) GetMetadata() map[string]interface{} { - if o == nil || IsNil(o.Metadata) { - var ret map[string]interface{} - return ret - } return o.Metadata } -// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// GetMetadataOk returns a tuple with the Metadata field value // and a boolean to check if the value has been set. func (o *ArtifactOut) GetMetadataOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Metadata) { + if o == nil { return map[string]interface{}{}, false } return o.Metadata, true } -// HasMetadata returns a boolean if a field has been set. -func (o *ArtifactOut) HasMetadata() bool { - if o != nil && !IsNil(o.Metadata) { - return true - } - - return false -} - -// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. +// SetMetadata sets field value func (o *ArtifactOut) SetMetadata(v map[string]interface{}) { o.Metadata = v } -// GetMetageneration returns the Metageneration field value if set, zero value otherwise. -func (o *ArtifactOut) GetMetageneration() int32 { - if o == nil || IsNil(o.Metageneration) { - var ret int32 - return ret - } - return *o.Metageneration -} - -// GetMetagenerationOk returns a tuple with the Metageneration field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ArtifactOut) GetMetagenerationOk() (*int32, bool) { - if o == nil || IsNil(o.Metageneration) { - return nil, false - } - return o.Metageneration, true -} - -// HasMetageneration returns a boolean if a field has been set. -func (o *ArtifactOut) HasMetageneration() bool { - if o != nil && !IsNil(o.Metageneration) { - return true - } - - return false -} - -// SetMetageneration gets a reference to the given int32 and assigns it to the Metageneration field. -func (o *ArtifactOut) SetMetageneration(v int32) { - o.Metageneration = &v -} - -// GetPath returns the Path field value -func (o *ArtifactOut) GetPath() string { +// GetName returns the Name field value +func (o *ArtifactOut) GetName() string { if o == nil { var ret string return ret } - return o.Path + return o.Name } -// GetPathOk returns a tuple with the Path field value +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. -func (o *ArtifactOut) GetPathOk() (*string, bool) { +func (o *ArtifactOut) GetNameOk() (*string, bool) { if o == nil { return nil, false } - return &o.Path, true + return &o.Name, true } -// SetPath sets field value -func (o *ArtifactOut) SetPath(v string) { - o.Path = v +// SetName sets field value +func (o *ArtifactOut) SetName(v string) { + o.Name = v } -// GetPermalink returns the Permalink field value -func (o *ArtifactOut) GetPermalink() string { +// GetParentId returns the ParentId field value +func (o *ArtifactOut) GetParentId() string { if o == nil { var ret string return ret } - return o.Permalink + return o.ParentId } -// GetPermalinkOk returns a tuple with the Permalink field value +// GetParentIdOk returns a tuple with the ParentId field value // and a boolean to check if the value has been set. -func (o *ArtifactOut) GetPermalinkOk() (*string, bool) { +func (o *ArtifactOut) GetParentIdOk() (*string, bool) { if o == nil { return nil, false } - return &o.Permalink, true + return &o.ParentId, true } -// SetPermalink sets field value -func (o *ArtifactOut) SetPermalink(v string) { - o.Permalink = v +// SetParentId sets field value +func (o *ArtifactOut) SetParentId(v string) { + o.ParentId = v } -// GetSizeBytes returns the SizeBytes field value -func (o *ArtifactOut) GetSizeBytes() int32 { +// GetRevision returns the Revision field value +func (o *ArtifactOut) GetRevision() string { if o == nil { - var ret int32 + var ret string return ret } - return o.SizeBytes + return o.Revision } -// GetSizeBytesOk returns a tuple with the SizeBytes field value +// GetRevisionOk returns a tuple with the Revision field value // and a boolean to check if the value has been set. -func (o *ArtifactOut) GetSizeBytesOk() (*int32, bool) { +func (o *ArtifactOut) GetRevisionOk() (*string, bool) { if o == nil { return nil, false } - return &o.SizeBytes, true + return &o.Revision, true } -// SetSizeBytes sets field value -func (o *ArtifactOut) SetSizeBytes(v int32) { - o.SizeBytes = v +// SetRevision sets field value +func (o *ArtifactOut) SetRevision(v string) { + o.Revision = v } -// GetSource returns the Source field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ArtifactOut) GetSource() ArtifactSource { - if o == nil || IsNil(o.Source.Get()) { - var ret ArtifactSource +// GetState returns the State field value +func (o *ArtifactOut) GetState() string { + if o == nil { + var ret string return ret } - return *o.Source.Get() + + return o.State } -// GetSourceOk returns a tuple with the Source field value if set, nil otherwise +// GetStateOk returns a tuple with the State field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ArtifactOut) GetSourceOk() (*ArtifactSource, bool) { +func (o *ArtifactOut) GetStateOk() (*string, bool) { if o == nil { return nil, false } - return o.Source.Get(), o.Source.IsSet() -} - -// HasSource returns a boolean if a field has been set. -func (o *ArtifactOut) HasSource() bool { - if o != nil && o.Source.IsSet() { - return true - } - - return false -} - -// SetSource gets a reference to the given NullableArtifactSource and assigns it to the Source field. -func (o *ArtifactOut) SetSource(v ArtifactSource) { - o.Source.Set(&v) -} -// SetSourceNil sets the value for Source to be an explicit nil -func (o *ArtifactOut) SetSourceNil() { - o.Source.Set(nil) + return &o.State, true } -// UnsetSource ensures that no value is present for Source, not even an explicit nil -func (o *ArtifactOut) UnsetSource() { - o.Source.Unset() +// SetState sets field value +func (o *ArtifactOut) SetState(v string) { + o.State = v } // GetUpdatedAt returns the UpdatedAt field value @@ -602,62 +442,6 @@ func (o *ArtifactOut) SetUpdatedAt(v time.Time) { o.UpdatedAt = v } -// GetUrl returns the Url field value -func (o *ArtifactOut) GetUrl() string { - if o == nil { - var ret string - return ret - } - - return o.Url -} - -// GetUrlOk returns a tuple with the Url field value -// and a boolean to check if the value has been set. -func (o *ArtifactOut) GetUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Url, true -} - -// SetUrl sets field value -func (o *ArtifactOut) SetUrl(v string) { - o.Url = v -} - -// GetVersionNumber returns the VersionNumber field value if set, zero value otherwise. -func (o *ArtifactOut) GetVersionNumber() int32 { - if o == nil || IsNil(o.VersionNumber) { - var ret int32 - return ret - } - return *o.VersionNumber -} - -// GetVersionNumberOk returns a tuple with the VersionNumber field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ArtifactOut) GetVersionNumberOk() (*int32, bool) { - if o == nil || IsNil(o.VersionNumber) { - return nil, false - } - return o.VersionNumber, true -} - -// HasVersionNumber returns a boolean if a field has been set. -func (o *ArtifactOut) HasVersionNumber() bool { - if o != nil && !IsNil(o.VersionNumber) { - return true - } - - return false -} - -// SetVersionNumber gets a reference to the given int32 and assigns it to the VersionNumber field. -func (o *ArtifactOut) SetVersionNumber(v int32) { - o.VersionNumber = &v -} - func (o ArtifactOut) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { @@ -668,42 +452,21 @@ func (o ArtifactOut) MarshalJSON() ([]byte, error) { func (o ArtifactOut) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["content_type"] = o.ContentType + toSerialize["content_preview"] = o.ContentPreview.Get() + toSerialize["content_type"] = o.ContentType.Get() toSerialize["created_at"] = o.CreatedAt + toSerialize["deleted_at"] = o.DeletedAt.Get() toSerialize["drive_id"] = o.DriveId - if o.EmbeddedAt.IsSet() { - toSerialize["embedded_at"] = o.EmbeddedAt.Get() - } - toSerialize["etag"] = o.Etag - toSerialize["file_type"] = o.FileType - toSerialize["hash"] = o.Hash + toSerialize["effective_visibility"] = o.EffectiveVisibility + toSerialize["head_version_id"] = o.HeadVersionId.Get() toSerialize["id"] = o.Id - if o.IndexedAt.IsSet() { - toSerialize["indexed_at"] = o.IndexedAt.Get() - } - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - if o.LlmIndex != nil { - toSerialize["llm_index"] = o.LlmIndex - } - if !IsNil(o.Metadata) { - toSerialize["metadata"] = o.Metadata - } - if !IsNil(o.Metageneration) { - toSerialize["metageneration"] = o.Metageneration - } - toSerialize["path"] = o.Path - toSerialize["permalink"] = o.Permalink - toSerialize["size_bytes"] = o.SizeBytes - if o.Source.IsSet() { - toSerialize["source"] = o.Source.Get() - } + toSerialize["labels"] = o.Labels + toSerialize["metadata"] = o.Metadata + toSerialize["name"] = o.Name + toSerialize["parent_id"] = o.ParentId + toSerialize["revision"] = o.Revision + toSerialize["state"] = o.State toSerialize["updated_at"] = o.UpdatedAt - toSerialize["url"] = o.Url - if !IsNil(o.VersionNumber) { - toSerialize["version_number"] = o.VersionNumber - } return toSerialize, nil } @@ -712,18 +475,21 @@ func (o *ArtifactOut) UnmarshalJSON(data []byte) (err error) { // by unmarshalling the object into a generic map with string keys and checking // that every required field exists as a key in the generic map. requiredProperties := []string{ + "content_preview", "content_type", "created_at", + "deleted_at", "drive_id", - "etag", - "file_type", - "hash", + "effective_visibility", + "head_version_id", "id", - "path", - "permalink", - "size_bytes", + "labels", + "metadata", + "name", + "parent_id", + "revision", + "state", "updated_at", - "url", } allProperties := make(map[string]interface{}) diff --git a/sdk/go/model_artifact_patch_in.go b/sdk/go/model_artifact_patch_in.go deleted file mode 100644 index c50b929..0000000 --- a/sdk/go/model_artifact_patch_in.go +++ /dev/null @@ -1,239 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" -) - -// checks if the ArtifactPatchIn type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ArtifactPatchIn{} - -// ArtifactPatchIn PATCH /v0/artifacts/{art_id} body — metadata-only partial (JSON-merge-patch) update. Every field is optional. Presence is what matters, not the value: a field left out of the body (per Pydantic `model_fields_set`) is left unchanged; a field that IS present is applied — with an explicit `null` / `[]` / `{}` meaning \"clear it\". This mirrors the MCP `set_metadata` tool and the core `patch_artifact_metadata` sentinel semantics (omitted = preserve, present = replace/clear). * `labels` — replace the label set; `[]` or `null` clears it. * `metadata` — replace the free-form metadata object; `{}` or `null` clears it. * `source` — replace provenance refs; `null` (or `{\"refs\": []}`) clears them. PATCH is metadata-only: to move/rename an artifact, use `POST /v0/artifacts/{art_id}/move`. `extra=\"forbid\"` makes a stray field (notably a legacy `path`) a hard 422 rather than a silent no-op — a clean-break signal to migrate to the move verb. -type ArtifactPatchIn struct { - Labels []string `json:"labels,omitempty"` - Metadata map[string]interface{} `json:"metadata,omitempty"` - Source NullableArtifactSource `json:"source,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _ArtifactPatchIn ArtifactPatchIn - -// NewArtifactPatchIn instantiates a new ArtifactPatchIn object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewArtifactPatchIn() *ArtifactPatchIn { - this := ArtifactPatchIn{} - return &this -} - -// NewArtifactPatchInWithDefaults instantiates a new ArtifactPatchIn object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewArtifactPatchInWithDefaults() *ArtifactPatchIn { - this := ArtifactPatchIn{} - return &this -} - -// GetLabels returns the Labels field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ArtifactPatchIn) GetLabels() []string { - if o == nil { - var ret []string - return ret - } - return o.Labels -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ArtifactPatchIn) GetLabelsOk() ([]string, bool) { - if o == nil || IsNil(o.Labels) { - return nil, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *ArtifactPatchIn) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given []string and assigns it to the Labels field. -func (o *ArtifactPatchIn) SetLabels(v []string) { - o.Labels = v -} - -// GetMetadata returns the Metadata field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ArtifactPatchIn) GetMetadata() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - return o.Metadata -} - -// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ArtifactPatchIn) GetMetadataOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Metadata) { - return map[string]interface{}{}, false - } - return o.Metadata, true -} - -// HasMetadata returns a boolean if a field has been set. -func (o *ArtifactPatchIn) HasMetadata() bool { - if o != nil && !IsNil(o.Metadata) { - return true - } - - return false -} - -// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. -func (o *ArtifactPatchIn) SetMetadata(v map[string]interface{}) { - o.Metadata = v -} - -// GetSource returns the Source field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ArtifactPatchIn) GetSource() ArtifactSource { - if o == nil || IsNil(o.Source.Get()) { - var ret ArtifactSource - return ret - } - return *o.Source.Get() -} - -// GetSourceOk returns a tuple with the Source field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ArtifactPatchIn) GetSourceOk() (*ArtifactSource, bool) { - if o == nil { - return nil, false - } - return o.Source.Get(), o.Source.IsSet() -} - -// HasSource returns a boolean if a field has been set. -func (o *ArtifactPatchIn) HasSource() bool { - if o != nil && o.Source.IsSet() { - return true - } - - return false -} - -// SetSource gets a reference to the given NullableArtifactSource and assigns it to the Source field. -func (o *ArtifactPatchIn) SetSource(v ArtifactSource) { - o.Source.Set(&v) -} -// SetSourceNil sets the value for Source to be an explicit nil -func (o *ArtifactPatchIn) SetSourceNil() { - o.Source.Set(nil) -} - -// UnsetSource ensures that no value is present for Source, not even an explicit nil -func (o *ArtifactPatchIn) UnsetSource() { - o.Source.Unset() -} - -func (o ArtifactPatchIn) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ArtifactPatchIn) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Labels != nil { - toSerialize["labels"] = o.Labels - } - if o.Metadata != nil { - toSerialize["metadata"] = o.Metadata - } - if o.Source.IsSet() { - toSerialize["source"] = o.Source.Get() - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *ArtifactPatchIn) UnmarshalJSON(data []byte) (err error) { - varArtifactPatchIn := _ArtifactPatchIn{} - - err = json.Unmarshal(data, &varArtifactPatchIn) - - if err != nil { - return err - } - - *o = ArtifactPatchIn(varArtifactPatchIn) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "labels") - delete(additionalProperties, "metadata") - delete(additionalProperties, "source") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableArtifactPatchIn struct { - value *ArtifactPatchIn - isSet bool -} - -func (v NullableArtifactPatchIn) Get() *ArtifactPatchIn { - return v.value -} - -func (v *NullableArtifactPatchIn) Set(val *ArtifactPatchIn) { - v.value = val - v.isSet = true -} - -func (v NullableArtifactPatchIn) IsSet() bool { - return v.isSet -} - -func (v *NullableArtifactPatchIn) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableArtifactPatchIn(val *ArtifactPatchIn) *NullableArtifactPatchIn { - return &NullableArtifactPatchIn{value: val, isSet: true} -} - -func (v NullableArtifactPatchIn) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableArtifactPatchIn) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_artifact_source.go b/sdk/go/model_artifact_source.go deleted file mode 100644 index 42f9a02..0000000 --- a/sdk/go/model_artifact_source.go +++ /dev/null @@ -1,124 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" -) - -// checks if the ArtifactSource type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ArtifactSource{} - -// ArtifactSource Caller-supplied provenance metadata, attached to an artifact. v0.6 model: a list of typed refs. The legacy v0.5 fields (`agent_id`, `run_id`, `prompt_hash`) were never validated and are superseded by the `refs` shape (an agent-id ref would be `{\"type\": \"agent\", \"id\": \"...\"}` in v0.6 vocabulary). -type ArtifactSource struct { - Refs []SourceRef `json:"refs,omitempty"` -} - -// NewArtifactSource instantiates a new ArtifactSource object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewArtifactSource() *ArtifactSource { - this := ArtifactSource{} - return &this -} - -// NewArtifactSourceWithDefaults instantiates a new ArtifactSource object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewArtifactSourceWithDefaults() *ArtifactSource { - this := ArtifactSource{} - return &this -} - -// GetRefs returns the Refs field value if set, zero value otherwise. -func (o *ArtifactSource) GetRefs() []SourceRef { - if o == nil || IsNil(o.Refs) { - var ret []SourceRef - return ret - } - return o.Refs -} - -// GetRefsOk returns a tuple with the Refs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ArtifactSource) GetRefsOk() ([]SourceRef, bool) { - if o == nil || IsNil(o.Refs) { - return nil, false - } - return o.Refs, true -} - -// HasRefs returns a boolean if a field has been set. -func (o *ArtifactSource) HasRefs() bool { - if o != nil && !IsNil(o.Refs) { - return true - } - - return false -} - -// SetRefs gets a reference to the given []SourceRef and assigns it to the Refs field. -func (o *ArtifactSource) SetRefs(v []SourceRef) { - o.Refs = v -} - -func (o ArtifactSource) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ArtifactSource) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Refs) { - toSerialize["refs"] = o.Refs - } - return toSerialize, nil -} - -type NullableArtifactSource struct { - value *ArtifactSource - isSet bool -} - -func (v NullableArtifactSource) Get() *ArtifactSource { - return v.value -} - -func (v *NullableArtifactSource) Set(val *ArtifactSource) { - v.value = val - v.isSet = true -} - -func (v NullableArtifactSource) IsSet() bool { - return v.isSet -} - -func (v *NullableArtifactSource) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableArtifactSource(val *ArtifactSource) *NullableArtifactSource { - return &NullableArtifactSource{value: val, isSet: true} -} - -func (v NullableArtifactSource) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableArtifactSource) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_artifact_update_in.go b/sdk/go/model_artifact_update_in.go new file mode 100644 index 0000000..c24f155 --- /dev/null +++ b/sdk/go/model_artifact_update_in.go @@ -0,0 +1,286 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "encoding/json" +) + +// checks if the ArtifactUpdateIn type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ArtifactUpdateIn{} + +// ArtifactUpdateIn PATCH /v0/drives/{id}/artifacts/{artifact_id} body — at least one field is required. +type ArtifactUpdateIn struct { + Labels []string `json:"labels,omitempty"` + Metadata map[string]interface{} `json:"metadata,omitempty"` + Name NullableString `json:"name,omitempty"` + ParentId NullableString `json:"parent_id,omitempty" validate:"regexp=^fld_[a-f0-9]{16}$"` + AdditionalProperties map[string]interface{} +} + +type _ArtifactUpdateIn ArtifactUpdateIn + +// NewArtifactUpdateIn instantiates a new ArtifactUpdateIn object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewArtifactUpdateIn() *ArtifactUpdateIn { + this := ArtifactUpdateIn{} + return &this +} + +// NewArtifactUpdateInWithDefaults instantiates a new ArtifactUpdateIn object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewArtifactUpdateInWithDefaults() *ArtifactUpdateIn { + this := ArtifactUpdateIn{} + return &this +} + +// GetLabels returns the Labels field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ArtifactUpdateIn) GetLabels() []string { + if o == nil { + var ret []string + return ret + } + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ArtifactUpdateIn) GetLabelsOk() ([]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *ArtifactUpdateIn) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given []string and assigns it to the Labels field. +func (o *ArtifactUpdateIn) SetLabels(v []string) { + o.Labels = v +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ArtifactUpdateIn) GetMetadata() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ArtifactUpdateIn) GetMetadataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Metadata) { + return map[string]interface{}{}, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *ArtifactUpdateIn) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. +func (o *ArtifactUpdateIn) SetMetadata(v map[string]interface{}) { + o.Metadata = v +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ArtifactUpdateIn) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ArtifactUpdateIn) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *ArtifactUpdateIn) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *ArtifactUpdateIn) SetName(v string) { + o.Name.Set(&v) +} +// SetNameNil sets the value for Name to be an explicit nil +func (o *ArtifactUpdateIn) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *ArtifactUpdateIn) UnsetName() { + o.Name.Unset() +} + +// GetParentId returns the ParentId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ArtifactUpdateIn) GetParentId() string { + if o == nil || IsNil(o.ParentId.Get()) { + var ret string + return ret + } + return *o.ParentId.Get() +} + +// GetParentIdOk returns a tuple with the ParentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ArtifactUpdateIn) GetParentIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ParentId.Get(), o.ParentId.IsSet() +} + +// HasParentId returns a boolean if a field has been set. +func (o *ArtifactUpdateIn) HasParentId() bool { + if o != nil && o.ParentId.IsSet() { + return true + } + + return false +} + +// SetParentId gets a reference to the given NullableString and assigns it to the ParentId field. +func (o *ArtifactUpdateIn) SetParentId(v string) { + o.ParentId.Set(&v) +} +// SetParentIdNil sets the value for ParentId to be an explicit nil +func (o *ArtifactUpdateIn) SetParentIdNil() { + o.ParentId.Set(nil) +} + +// UnsetParentId ensures that no value is present for ParentId, not even an explicit nil +func (o *ArtifactUpdateIn) UnsetParentId() { + o.ParentId.Unset() +} + +func (o ArtifactUpdateIn) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ArtifactUpdateIn) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Labels != nil { + toSerialize["labels"] = o.Labels + } + if o.Metadata != nil { + toSerialize["metadata"] = o.Metadata + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.ParentId.IsSet() { + toSerialize["parent_id"] = o.ParentId.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ArtifactUpdateIn) UnmarshalJSON(data []byte) (err error) { + varArtifactUpdateIn := _ArtifactUpdateIn{} + + err = json.Unmarshal(data, &varArtifactUpdateIn) + + if err != nil { + return err + } + + *o = ArtifactUpdateIn(varArtifactUpdateIn) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "labels") + delete(additionalProperties, "metadata") + delete(additionalProperties, "name") + delete(additionalProperties, "parent_id") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableArtifactUpdateIn struct { + value *ArtifactUpdateIn + isSet bool +} + +func (v NullableArtifactUpdateIn) Get() *ArtifactUpdateIn { + return v.value +} + +func (v *NullableArtifactUpdateIn) Set(val *ArtifactUpdateIn) { + v.value = val + v.isSet = true +} + +func (v NullableArtifactUpdateIn) IsSet() bool { + return v.isSet +} + +func (v *NullableArtifactUpdateIn) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableArtifactUpdateIn(val *ArtifactUpdateIn) *NullableArtifactUpdateIn { + return &NullableArtifactUpdateIn{value: val, isSet: true} +} + +func (v NullableArtifactUpdateIn) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableArtifactUpdateIn) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/sdk/go/model_authorization_server_metadata_out.go b/sdk/go/model_authorization_server_metadata_out.go deleted file mode 100644 index 4fcecfb..0000000 --- a/sdk/go/model_authorization_server_metadata_out.go +++ /dev/null @@ -1,572 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "fmt" -) - -// checks if the AuthorizationServerMetadataOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &AuthorizationServerMetadataOut{} - -// AuthorizationServerMetadataOut struct for AuthorizationServerMetadataOut -type AuthorizationServerMetadataOut struct { - AgentAuth AgentAuthMetadataOut `json:"agent_auth"` - AuthorizationEndpoint string `json:"authorization_endpoint"` - AuthorizationResponseIssParameterSupported bool `json:"authorization_response_iss_parameter_supported"` - CodeChallengeMethodsSupported []string `json:"code_challenge_methods_supported"` - GrantTypesSupported []string `json:"grant_types_supported"` - Issuer string `json:"issuer"` - JwksUri string `json:"jwks_uri"` - RegistrationEndpoint string `json:"registration_endpoint"` - ResponseModesSupported []string `json:"response_modes_supported"` - ResponseTypesSupported []string `json:"response_types_supported"` - RevocationEndpoint string `json:"revocation_endpoint"` - RevocationEndpointAuthMethodsSupported []string `json:"revocation_endpoint_auth_methods_supported"` - ScopesSupported []string `json:"scopes_supported"` - TokenEndpoint string `json:"token_endpoint"` - TokenEndpointAuthMethodsSupported []string `json:"token_endpoint_auth_methods_supported"` - AdditionalProperties map[string]interface{} -} - -type _AuthorizationServerMetadataOut AuthorizationServerMetadataOut - -// NewAuthorizationServerMetadataOut instantiates a new AuthorizationServerMetadataOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewAuthorizationServerMetadataOut(agentAuth AgentAuthMetadataOut, authorizationEndpoint string, authorizationResponseIssParameterSupported bool, codeChallengeMethodsSupported []string, grantTypesSupported []string, issuer string, jwksUri string, registrationEndpoint string, responseModesSupported []string, responseTypesSupported []string, revocationEndpoint string, revocationEndpointAuthMethodsSupported []string, scopesSupported []string, tokenEndpoint string, tokenEndpointAuthMethodsSupported []string) *AuthorizationServerMetadataOut { - this := AuthorizationServerMetadataOut{} - this.AgentAuth = agentAuth - this.AuthorizationEndpoint = authorizationEndpoint - this.AuthorizationResponseIssParameterSupported = authorizationResponseIssParameterSupported - this.CodeChallengeMethodsSupported = codeChallengeMethodsSupported - this.GrantTypesSupported = grantTypesSupported - this.Issuer = issuer - this.JwksUri = jwksUri - this.RegistrationEndpoint = registrationEndpoint - this.ResponseModesSupported = responseModesSupported - this.ResponseTypesSupported = responseTypesSupported - this.RevocationEndpoint = revocationEndpoint - this.RevocationEndpointAuthMethodsSupported = revocationEndpointAuthMethodsSupported - this.ScopesSupported = scopesSupported - this.TokenEndpoint = tokenEndpoint - this.TokenEndpointAuthMethodsSupported = tokenEndpointAuthMethodsSupported - return &this -} - -// NewAuthorizationServerMetadataOutWithDefaults instantiates a new AuthorizationServerMetadataOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewAuthorizationServerMetadataOutWithDefaults() *AuthorizationServerMetadataOut { - this := AuthorizationServerMetadataOut{} - return &this -} - -// GetAgentAuth returns the AgentAuth field value -func (o *AuthorizationServerMetadataOut) GetAgentAuth() AgentAuthMetadataOut { - if o == nil { - var ret AgentAuthMetadataOut - return ret - } - - return o.AgentAuth -} - -// GetAgentAuthOk returns a tuple with the AgentAuth field value -// and a boolean to check if the value has been set. -func (o *AuthorizationServerMetadataOut) GetAgentAuthOk() (*AgentAuthMetadataOut, bool) { - if o == nil { - return nil, false - } - return &o.AgentAuth, true -} - -// SetAgentAuth sets field value -func (o *AuthorizationServerMetadataOut) SetAgentAuth(v AgentAuthMetadataOut) { - o.AgentAuth = v -} - -// GetAuthorizationEndpoint returns the AuthorizationEndpoint field value -func (o *AuthorizationServerMetadataOut) GetAuthorizationEndpoint() string { - if o == nil { - var ret string - return ret - } - - return o.AuthorizationEndpoint -} - -// GetAuthorizationEndpointOk returns a tuple with the AuthorizationEndpoint field value -// and a boolean to check if the value has been set. -func (o *AuthorizationServerMetadataOut) GetAuthorizationEndpointOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AuthorizationEndpoint, true -} - -// SetAuthorizationEndpoint sets field value -func (o *AuthorizationServerMetadataOut) SetAuthorizationEndpoint(v string) { - o.AuthorizationEndpoint = v -} - -// GetAuthorizationResponseIssParameterSupported returns the AuthorizationResponseIssParameterSupported field value -func (o *AuthorizationServerMetadataOut) GetAuthorizationResponseIssParameterSupported() bool { - if o == nil { - var ret bool - return ret - } - - return o.AuthorizationResponseIssParameterSupported -} - -// GetAuthorizationResponseIssParameterSupportedOk returns a tuple with the AuthorizationResponseIssParameterSupported field value -// and a boolean to check if the value has been set. -func (o *AuthorizationServerMetadataOut) GetAuthorizationResponseIssParameterSupportedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.AuthorizationResponseIssParameterSupported, true -} - -// SetAuthorizationResponseIssParameterSupported sets field value -func (o *AuthorizationServerMetadataOut) SetAuthorizationResponseIssParameterSupported(v bool) { - o.AuthorizationResponseIssParameterSupported = v -} - -// GetCodeChallengeMethodsSupported returns the CodeChallengeMethodsSupported field value -func (o *AuthorizationServerMetadataOut) GetCodeChallengeMethodsSupported() []string { - if o == nil { - var ret []string - return ret - } - - return o.CodeChallengeMethodsSupported -} - -// GetCodeChallengeMethodsSupportedOk returns a tuple with the CodeChallengeMethodsSupported field value -// and a boolean to check if the value has been set. -func (o *AuthorizationServerMetadataOut) GetCodeChallengeMethodsSupportedOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.CodeChallengeMethodsSupported, true -} - -// SetCodeChallengeMethodsSupported sets field value -func (o *AuthorizationServerMetadataOut) SetCodeChallengeMethodsSupported(v []string) { - o.CodeChallengeMethodsSupported = v -} - -// GetGrantTypesSupported returns the GrantTypesSupported field value -func (o *AuthorizationServerMetadataOut) GetGrantTypesSupported() []string { - if o == nil { - var ret []string - return ret - } - - return o.GrantTypesSupported -} - -// GetGrantTypesSupportedOk returns a tuple with the GrantTypesSupported field value -// and a boolean to check if the value has been set. -func (o *AuthorizationServerMetadataOut) GetGrantTypesSupportedOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.GrantTypesSupported, true -} - -// SetGrantTypesSupported sets field value -func (o *AuthorizationServerMetadataOut) SetGrantTypesSupported(v []string) { - o.GrantTypesSupported = v -} - -// GetIssuer returns the Issuer field value -func (o *AuthorizationServerMetadataOut) GetIssuer() string { - if o == nil { - var ret string - return ret - } - - return o.Issuer -} - -// GetIssuerOk returns a tuple with the Issuer field value -// and a boolean to check if the value has been set. -func (o *AuthorizationServerMetadataOut) GetIssuerOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Issuer, true -} - -// SetIssuer sets field value -func (o *AuthorizationServerMetadataOut) SetIssuer(v string) { - o.Issuer = v -} - -// GetJwksUri returns the JwksUri field value -func (o *AuthorizationServerMetadataOut) GetJwksUri() string { - if o == nil { - var ret string - return ret - } - - return o.JwksUri -} - -// GetJwksUriOk returns a tuple with the JwksUri field value -// and a boolean to check if the value has been set. -func (o *AuthorizationServerMetadataOut) GetJwksUriOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.JwksUri, true -} - -// SetJwksUri sets field value -func (o *AuthorizationServerMetadataOut) SetJwksUri(v string) { - o.JwksUri = v -} - -// GetRegistrationEndpoint returns the RegistrationEndpoint field value -func (o *AuthorizationServerMetadataOut) GetRegistrationEndpoint() string { - if o == nil { - var ret string - return ret - } - - return o.RegistrationEndpoint -} - -// GetRegistrationEndpointOk returns a tuple with the RegistrationEndpoint field value -// and a boolean to check if the value has been set. -func (o *AuthorizationServerMetadataOut) GetRegistrationEndpointOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.RegistrationEndpoint, true -} - -// SetRegistrationEndpoint sets field value -func (o *AuthorizationServerMetadataOut) SetRegistrationEndpoint(v string) { - o.RegistrationEndpoint = v -} - -// GetResponseModesSupported returns the ResponseModesSupported field value -func (o *AuthorizationServerMetadataOut) GetResponseModesSupported() []string { - if o == nil { - var ret []string - return ret - } - - return o.ResponseModesSupported -} - -// GetResponseModesSupportedOk returns a tuple with the ResponseModesSupported field value -// and a boolean to check if the value has been set. -func (o *AuthorizationServerMetadataOut) GetResponseModesSupportedOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.ResponseModesSupported, true -} - -// SetResponseModesSupported sets field value -func (o *AuthorizationServerMetadataOut) SetResponseModesSupported(v []string) { - o.ResponseModesSupported = v -} - -// GetResponseTypesSupported returns the ResponseTypesSupported field value -func (o *AuthorizationServerMetadataOut) GetResponseTypesSupported() []string { - if o == nil { - var ret []string - return ret - } - - return o.ResponseTypesSupported -} - -// GetResponseTypesSupportedOk returns a tuple with the ResponseTypesSupported field value -// and a boolean to check if the value has been set. -func (o *AuthorizationServerMetadataOut) GetResponseTypesSupportedOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.ResponseTypesSupported, true -} - -// SetResponseTypesSupported sets field value -func (o *AuthorizationServerMetadataOut) SetResponseTypesSupported(v []string) { - o.ResponseTypesSupported = v -} - -// GetRevocationEndpoint returns the RevocationEndpoint field value -func (o *AuthorizationServerMetadataOut) GetRevocationEndpoint() string { - if o == nil { - var ret string - return ret - } - - return o.RevocationEndpoint -} - -// GetRevocationEndpointOk returns a tuple with the RevocationEndpoint field value -// and a boolean to check if the value has been set. -func (o *AuthorizationServerMetadataOut) GetRevocationEndpointOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.RevocationEndpoint, true -} - -// SetRevocationEndpoint sets field value -func (o *AuthorizationServerMetadataOut) SetRevocationEndpoint(v string) { - o.RevocationEndpoint = v -} - -// GetRevocationEndpointAuthMethodsSupported returns the RevocationEndpointAuthMethodsSupported field value -func (o *AuthorizationServerMetadataOut) GetRevocationEndpointAuthMethodsSupported() []string { - if o == nil { - var ret []string - return ret - } - - return o.RevocationEndpointAuthMethodsSupported -} - -// GetRevocationEndpointAuthMethodsSupportedOk returns a tuple with the RevocationEndpointAuthMethodsSupported field value -// and a boolean to check if the value has been set. -func (o *AuthorizationServerMetadataOut) GetRevocationEndpointAuthMethodsSupportedOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.RevocationEndpointAuthMethodsSupported, true -} - -// SetRevocationEndpointAuthMethodsSupported sets field value -func (o *AuthorizationServerMetadataOut) SetRevocationEndpointAuthMethodsSupported(v []string) { - o.RevocationEndpointAuthMethodsSupported = v -} - -// GetScopesSupported returns the ScopesSupported field value -func (o *AuthorizationServerMetadataOut) GetScopesSupported() []string { - if o == nil { - var ret []string - return ret - } - - return o.ScopesSupported -} - -// GetScopesSupportedOk returns a tuple with the ScopesSupported field value -// and a boolean to check if the value has been set. -func (o *AuthorizationServerMetadataOut) GetScopesSupportedOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.ScopesSupported, true -} - -// SetScopesSupported sets field value -func (o *AuthorizationServerMetadataOut) SetScopesSupported(v []string) { - o.ScopesSupported = v -} - -// GetTokenEndpoint returns the TokenEndpoint field value -func (o *AuthorizationServerMetadataOut) GetTokenEndpoint() string { - if o == nil { - var ret string - return ret - } - - return o.TokenEndpoint -} - -// GetTokenEndpointOk returns a tuple with the TokenEndpoint field value -// and a boolean to check if the value has been set. -func (o *AuthorizationServerMetadataOut) GetTokenEndpointOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TokenEndpoint, true -} - -// SetTokenEndpoint sets field value -func (o *AuthorizationServerMetadataOut) SetTokenEndpoint(v string) { - o.TokenEndpoint = v -} - -// GetTokenEndpointAuthMethodsSupported returns the TokenEndpointAuthMethodsSupported field value -func (o *AuthorizationServerMetadataOut) GetTokenEndpointAuthMethodsSupported() []string { - if o == nil { - var ret []string - return ret - } - - return o.TokenEndpointAuthMethodsSupported -} - -// GetTokenEndpointAuthMethodsSupportedOk returns a tuple with the TokenEndpointAuthMethodsSupported field value -// and a boolean to check if the value has been set. -func (o *AuthorizationServerMetadataOut) GetTokenEndpointAuthMethodsSupportedOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.TokenEndpointAuthMethodsSupported, true -} - -// SetTokenEndpointAuthMethodsSupported sets field value -func (o *AuthorizationServerMetadataOut) SetTokenEndpointAuthMethodsSupported(v []string) { - o.TokenEndpointAuthMethodsSupported = v -} - -func (o AuthorizationServerMetadataOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o AuthorizationServerMetadataOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["agent_auth"] = o.AgentAuth - toSerialize["authorization_endpoint"] = o.AuthorizationEndpoint - toSerialize["authorization_response_iss_parameter_supported"] = o.AuthorizationResponseIssParameterSupported - toSerialize["code_challenge_methods_supported"] = o.CodeChallengeMethodsSupported - toSerialize["grant_types_supported"] = o.GrantTypesSupported - toSerialize["issuer"] = o.Issuer - toSerialize["jwks_uri"] = o.JwksUri - toSerialize["registration_endpoint"] = o.RegistrationEndpoint - toSerialize["response_modes_supported"] = o.ResponseModesSupported - toSerialize["response_types_supported"] = o.ResponseTypesSupported - toSerialize["revocation_endpoint"] = o.RevocationEndpoint - toSerialize["revocation_endpoint_auth_methods_supported"] = o.RevocationEndpointAuthMethodsSupported - toSerialize["scopes_supported"] = o.ScopesSupported - toSerialize["token_endpoint"] = o.TokenEndpoint - toSerialize["token_endpoint_auth_methods_supported"] = o.TokenEndpointAuthMethodsSupported - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *AuthorizationServerMetadataOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "agent_auth", - "authorization_endpoint", - "authorization_response_iss_parameter_supported", - "code_challenge_methods_supported", - "grant_types_supported", - "issuer", - "jwks_uri", - "registration_endpoint", - "response_modes_supported", - "response_types_supported", - "revocation_endpoint", - "revocation_endpoint_auth_methods_supported", - "scopes_supported", - "token_endpoint", - "token_endpoint_auth_methods_supported", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varAuthorizationServerMetadataOut := _AuthorizationServerMetadataOut{} - - err = json.Unmarshal(data, &varAuthorizationServerMetadataOut) - - if err != nil { - return err - } - - *o = AuthorizationServerMetadataOut(varAuthorizationServerMetadataOut) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "agent_auth") - delete(additionalProperties, "authorization_endpoint") - delete(additionalProperties, "authorization_response_iss_parameter_supported") - delete(additionalProperties, "code_challenge_methods_supported") - delete(additionalProperties, "grant_types_supported") - delete(additionalProperties, "issuer") - delete(additionalProperties, "jwks_uri") - delete(additionalProperties, "registration_endpoint") - delete(additionalProperties, "response_modes_supported") - delete(additionalProperties, "response_types_supported") - delete(additionalProperties, "revocation_endpoint") - delete(additionalProperties, "revocation_endpoint_auth_methods_supported") - delete(additionalProperties, "scopes_supported") - delete(additionalProperties, "token_endpoint") - delete(additionalProperties, "token_endpoint_auth_methods_supported") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableAuthorizationServerMetadataOut struct { - value *AuthorizationServerMetadataOut - isSet bool -} - -func (v NullableAuthorizationServerMetadataOut) Get() *AuthorizationServerMetadataOut { - return v.value -} - -func (v *NullableAuthorizationServerMetadataOut) Set(val *AuthorizationServerMetadataOut) { - v.value = val - v.isSet = true -} - -func (v NullableAuthorizationServerMetadataOut) IsSet() bool { - return v.isSet -} - -func (v *NullableAuthorizationServerMetadataOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAuthorizationServerMetadataOut(val *AuthorizationServerMetadataOut) *NullableAuthorizationServerMetadataOut { - return &NullableAuthorizationServerMetadataOut{value: val, isSet: true} -} - -func (v NullableAuthorizationServerMetadataOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAuthorizationServerMetadataOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_authorize_decision_oauth2_authorize_post_403_response.go b/sdk/go/model_authorize_decision_oauth2_authorize_post_403_response.go deleted file mode 100644 index 669156f..0000000 --- a/sdk/go/model_authorize_decision_oauth2_authorize_post_403_response.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "fmt" - "gopkg.in/validator.v2" -) - -// AuthorizeDecisionOauth2AuthorizePost403Response - struct for AuthorizeDecisionOauth2AuthorizePost403Response -type AuthorizeDecisionOauth2AuthorizePost403Response struct { - ErrorResponse *ErrorResponse - OAuthProtocolErrorOut *OAuthProtocolErrorOut -} - -// ErrorResponseAsAuthorizeDecisionOauth2AuthorizePost403Response is a convenience function that returns ErrorResponse wrapped in AuthorizeDecisionOauth2AuthorizePost403Response -func ErrorResponseAsAuthorizeDecisionOauth2AuthorizePost403Response(v *ErrorResponse) AuthorizeDecisionOauth2AuthorizePost403Response { - return AuthorizeDecisionOauth2AuthorizePost403Response{ - ErrorResponse: v, - } -} - -// OAuthProtocolErrorOutAsAuthorizeDecisionOauth2AuthorizePost403Response is a convenience function that returns OAuthProtocolErrorOut wrapped in AuthorizeDecisionOauth2AuthorizePost403Response -func OAuthProtocolErrorOutAsAuthorizeDecisionOauth2AuthorizePost403Response(v *OAuthProtocolErrorOut) AuthorizeDecisionOauth2AuthorizePost403Response { - return AuthorizeDecisionOauth2AuthorizePost403Response{ - OAuthProtocolErrorOut: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *AuthorizeDecisionOauth2AuthorizePost403Response) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into ErrorResponse - err = newStrictDecoder(data).Decode(&dst.ErrorResponse) - if err == nil { - jsonErrorResponse, _ := json.Marshal(dst.ErrorResponse) - if string(jsonErrorResponse) == "{}" { // empty struct - dst.ErrorResponse = nil - } else { - if err = validator.Validate(dst.ErrorResponse); err != nil { - dst.ErrorResponse = nil - } else { - match++ - } - } - } else { - dst.ErrorResponse = nil - } - - // try to unmarshal data into OAuthProtocolErrorOut - err = newStrictDecoder(data).Decode(&dst.OAuthProtocolErrorOut) - if err == nil { - jsonOAuthProtocolErrorOut, _ := json.Marshal(dst.OAuthProtocolErrorOut) - if string(jsonOAuthProtocolErrorOut) == "{}" { // empty struct - dst.OAuthProtocolErrorOut = nil - } else { - if err = validator.Validate(dst.OAuthProtocolErrorOut); err != nil { - dst.OAuthProtocolErrorOut = nil - } else { - match++ - } - } - } else { - dst.OAuthProtocolErrorOut = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.ErrorResponse = nil - dst.OAuthProtocolErrorOut = nil - - return fmt.Errorf("data matches more than one schema in oneOf(AuthorizeDecisionOauth2AuthorizePost403Response)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - if err != nil { - return fmt.Errorf("data failed to match schemas in oneOf(AuthorizeDecisionOauth2AuthorizePost403Response): %v", err) - } else { - return fmt.Errorf("data failed to match schemas in oneOf(AuthorizeDecisionOauth2AuthorizePost403Response)") - } - if err != nil { - return fmt.Errorf("data failed to match schemas in oneOf(AuthorizeDecisionOauth2AuthorizePost403Response): %v", err) - } else { - return fmt.Errorf("data failed to match schemas in oneOf(AuthorizeDecisionOauth2AuthorizePost403Response)") - } - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src AuthorizeDecisionOauth2AuthorizePost403Response) MarshalJSON() ([]byte, error) { - if src.ErrorResponse != nil { - return json.Marshal(&src.ErrorResponse) - } - - if src.OAuthProtocolErrorOut != nil { - return json.Marshal(&src.OAuthProtocolErrorOut) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *AuthorizeDecisionOauth2AuthorizePost403Response) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.ErrorResponse != nil { - return obj.ErrorResponse - } - - if obj.OAuthProtocolErrorOut != nil { - return obj.OAuthProtocolErrorOut - } - - // all schemas are nil - return nil -} - -// Get the actual instance value -func (obj AuthorizeDecisionOauth2AuthorizePost403Response) GetActualInstanceValue() (interface{}) { - if obj.ErrorResponse != nil { - return *obj.ErrorResponse - } - - if obj.OAuthProtocolErrorOut != nil { - return *obj.OAuthProtocolErrorOut - } - - // all schemas are nil - return nil -} - -type NullableAuthorizeDecisionOauth2AuthorizePost403Response struct { - value *AuthorizeDecisionOauth2AuthorizePost403Response - isSet bool -} - -func (v NullableAuthorizeDecisionOauth2AuthorizePost403Response) Get() *AuthorizeDecisionOauth2AuthorizePost403Response { - return v.value -} - -func (v *NullableAuthorizeDecisionOauth2AuthorizePost403Response) Set(val *AuthorizeDecisionOauth2AuthorizePost403Response) { - v.value = val - v.isSet = true -} - -func (v NullableAuthorizeDecisionOauth2AuthorizePost403Response) IsSet() bool { - return v.isSet -} - -func (v *NullableAuthorizeDecisionOauth2AuthorizePost403Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableAuthorizeDecisionOauth2AuthorizePost403Response(val *AuthorizeDecisionOauth2AuthorizePost403Response) *NullableAuthorizeDecisionOauth2AuthorizePost403Response { - return &NullableAuthorizeDecisionOauth2AuthorizePost403Response{value: val, isSet: true} -} - -func (v NullableAuthorizeDecisionOauth2AuthorizePost403Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableAuthorizeDecisionOauth2AuthorizePost403Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_change_actor_out.go b/sdk/go/model_change_actor_out.go new file mode 100644 index 0000000..f5304e8 --- /dev/null +++ b/sdk/go/model_change_actor_out.go @@ -0,0 +1,186 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ChangeActorOut type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ChangeActorOut{} + +// ChangeActorOut struct for ChangeActorOut +type ChangeActorOut struct { + Id NullableString `json:"id"` + Type string `json:"type"` +} + +type _ChangeActorOut ChangeActorOut + +// NewChangeActorOut instantiates a new ChangeActorOut object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewChangeActorOut(id NullableString, type_ string) *ChangeActorOut { + this := ChangeActorOut{} + this.Id = id + this.Type = type_ + return &this +} + +// NewChangeActorOutWithDefaults instantiates a new ChangeActorOut object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewChangeActorOutWithDefaults() *ChangeActorOut { + this := ChangeActorOut{} + return &this +} + +// GetId returns the Id field value +// If the value is explicit nil, the zero value for string will be returned +func (o *ChangeActorOut) GetId() string { + if o == nil || o.Id.Get() == nil { + var ret string + return ret + } + + return *o.Id.Get() +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ChangeActorOut) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Id.Get(), o.Id.IsSet() +} + +// SetId sets field value +func (o *ChangeActorOut) SetId(v string) { + o.Id.Set(&v) +} + +// GetType returns the Type field value +func (o *ChangeActorOut) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *ChangeActorOut) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ChangeActorOut) SetType(v string) { + o.Type = v +} + +func (o ChangeActorOut) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ChangeActorOut) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id.Get() + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *ChangeActorOut) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varChangeActorOut := _ChangeActorOut{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varChangeActorOut) + + if err != nil { + return err + } + + *o = ChangeActorOut(varChangeActorOut) + + return err +} + +type NullableChangeActorOut struct { + value *ChangeActorOut + isSet bool +} + +func (v NullableChangeActorOut) Get() *ChangeActorOut { + return v.value +} + +func (v *NullableChangeActorOut) Set(val *ChangeActorOut) { + v.value = val + v.isSet = true +} + +func (v NullableChangeActorOut) IsSet() bool { + return v.isSet +} + +func (v *NullableChangeActorOut) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableChangeActorOut(val *ChangeActorOut) *NullableChangeActorOut { + return &NullableChangeActorOut{value: val, isSet: true} +} + +func (v NullableChangeActorOut) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableChangeActorOut) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/sdk/go/model_change_out.go b/sdk/go/model_change_out.go new file mode 100644 index 0000000..bad84db --- /dev/null +++ b/sdk/go/model_change_out.go @@ -0,0 +1,413 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the ChangeOut type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ChangeOut{} + +// ChangeOut struct for ChangeOut +type ChangeOut struct { + Actor ChangeActorOut `json:"actor"` + ChangeSetId string `json:"change_set_id"` + Data map[string]interface{} `json:"data"` + DriveId string `json:"drive_id" validate:"regexp=^drv_[a-f0-9]{16}$"` + Id string `json:"id" validate:"regexp=^chg_[a-f0-9]{16}$"` + OccurredAt time.Time `json:"occurred_at"` + PreviousRevision NullableString `json:"previous_revision"` + Resource ChangeResourceOut `json:"resource"` + Revision NullableString `json:"revision"` + Type string `json:"type"` +} + +type _ChangeOut ChangeOut + +// NewChangeOut instantiates a new ChangeOut object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewChangeOut(actor ChangeActorOut, changeSetId string, data map[string]interface{}, driveId string, id string, occurredAt time.Time, previousRevision NullableString, resource ChangeResourceOut, revision NullableString, type_ string) *ChangeOut { + this := ChangeOut{} + this.Actor = actor + this.ChangeSetId = changeSetId + this.Data = data + this.DriveId = driveId + this.Id = id + this.OccurredAt = occurredAt + this.PreviousRevision = previousRevision + this.Resource = resource + this.Revision = revision + this.Type = type_ + return &this +} + +// NewChangeOutWithDefaults instantiates a new ChangeOut object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewChangeOutWithDefaults() *ChangeOut { + this := ChangeOut{} + return &this +} + +// GetActor returns the Actor field value +func (o *ChangeOut) GetActor() ChangeActorOut { + if o == nil { + var ret ChangeActorOut + return ret + } + + return o.Actor +} + +// GetActorOk returns a tuple with the Actor field value +// and a boolean to check if the value has been set. +func (o *ChangeOut) GetActorOk() (*ChangeActorOut, bool) { + if o == nil { + return nil, false + } + return &o.Actor, true +} + +// SetActor sets field value +func (o *ChangeOut) SetActor(v ChangeActorOut) { + o.Actor = v +} + +// GetChangeSetId returns the ChangeSetId field value +func (o *ChangeOut) GetChangeSetId() string { + if o == nil { + var ret string + return ret + } + + return o.ChangeSetId +} + +// GetChangeSetIdOk returns a tuple with the ChangeSetId field value +// and a boolean to check if the value has been set. +func (o *ChangeOut) GetChangeSetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ChangeSetId, true +} + +// SetChangeSetId sets field value +func (o *ChangeOut) SetChangeSetId(v string) { + o.ChangeSetId = v +} + +// GetData returns the Data field value +func (o *ChangeOut) GetData() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ChangeOut) GetDataOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Data, true +} + +// SetData sets field value +func (o *ChangeOut) SetData(v map[string]interface{}) { + o.Data = v +} + +// GetDriveId returns the DriveId field value +func (o *ChangeOut) GetDriveId() string { + if o == nil { + var ret string + return ret + } + + return o.DriveId +} + +// GetDriveIdOk returns a tuple with the DriveId field value +// and a boolean to check if the value has been set. +func (o *ChangeOut) GetDriveIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DriveId, true +} + +// SetDriveId sets field value +func (o *ChangeOut) SetDriveId(v string) { + o.DriveId = v +} + +// GetId returns the Id field value +func (o *ChangeOut) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ChangeOut) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ChangeOut) SetId(v string) { + o.Id = v +} + +// GetOccurredAt returns the OccurredAt field value +func (o *ChangeOut) GetOccurredAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.OccurredAt +} + +// GetOccurredAtOk returns a tuple with the OccurredAt field value +// and a boolean to check if the value has been set. +func (o *ChangeOut) GetOccurredAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.OccurredAt, true +} + +// SetOccurredAt sets field value +func (o *ChangeOut) SetOccurredAt(v time.Time) { + o.OccurredAt = v +} + +// GetPreviousRevision returns the PreviousRevision field value +// If the value is explicit nil, the zero value for string will be returned +func (o *ChangeOut) GetPreviousRevision() string { + if o == nil || o.PreviousRevision.Get() == nil { + var ret string + return ret + } + + return *o.PreviousRevision.Get() +} + +// GetPreviousRevisionOk returns a tuple with the PreviousRevision field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ChangeOut) GetPreviousRevisionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PreviousRevision.Get(), o.PreviousRevision.IsSet() +} + +// SetPreviousRevision sets field value +func (o *ChangeOut) SetPreviousRevision(v string) { + o.PreviousRevision.Set(&v) +} + +// GetResource returns the Resource field value +func (o *ChangeOut) GetResource() ChangeResourceOut { + if o == nil { + var ret ChangeResourceOut + return ret + } + + return o.Resource +} + +// GetResourceOk returns a tuple with the Resource field value +// and a boolean to check if the value has been set. +func (o *ChangeOut) GetResourceOk() (*ChangeResourceOut, bool) { + if o == nil { + return nil, false + } + return &o.Resource, true +} + +// SetResource sets field value +func (o *ChangeOut) SetResource(v ChangeResourceOut) { + o.Resource = v +} + +// GetRevision returns the Revision field value +// If the value is explicit nil, the zero value for string will be returned +func (o *ChangeOut) GetRevision() string { + if o == nil || o.Revision.Get() == nil { + var ret string + return ret + } + + return *o.Revision.Get() +} + +// GetRevisionOk returns a tuple with the Revision field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ChangeOut) GetRevisionOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Revision.Get(), o.Revision.IsSet() +} + +// SetRevision sets field value +func (o *ChangeOut) SetRevision(v string) { + o.Revision.Set(&v) +} + +// GetType returns the Type field value +func (o *ChangeOut) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *ChangeOut) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ChangeOut) SetType(v string) { + o.Type = v +} + +func (o ChangeOut) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ChangeOut) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["actor"] = o.Actor + toSerialize["change_set_id"] = o.ChangeSetId + toSerialize["data"] = o.Data + toSerialize["drive_id"] = o.DriveId + toSerialize["id"] = o.Id + toSerialize["occurred_at"] = o.OccurredAt + toSerialize["previous_revision"] = o.PreviousRevision.Get() + toSerialize["resource"] = o.Resource + toSerialize["revision"] = o.Revision.Get() + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *ChangeOut) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "actor", + "change_set_id", + "data", + "drive_id", + "id", + "occurred_at", + "previous_revision", + "resource", + "revision", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varChangeOut := _ChangeOut{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varChangeOut) + + if err != nil { + return err + } + + *o = ChangeOut(varChangeOut) + + return err +} + +type NullableChangeOut struct { + value *ChangeOut + isSet bool +} + +func (v NullableChangeOut) Get() *ChangeOut { + return v.value +} + +func (v *NullableChangeOut) Set(val *ChangeOut) { + v.value = val + v.isSet = true +} + +func (v NullableChangeOut) IsSet() bool { + return v.isSet +} + +func (v *NullableChangeOut) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableChangeOut(val *ChangeOut) *NullableChangeOut { + return &NullableChangeOut{value: val, isSet: true} +} + +func (v NullableChangeOut) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableChangeOut) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/sdk/go/model_change_page_out.go b/sdk/go/model_change_page_out.go new file mode 100644 index 0000000..4544c93 --- /dev/null +++ b/sdk/go/model_change_page_out.go @@ -0,0 +1,212 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ChangePageOut type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ChangePageOut{} + +// ChangePageOut struct for ChangePageOut +type ChangePageOut struct { + HasMore bool `json:"has_more"` + Items []ChangeOut `json:"items"` + NextCursor string `json:"next_cursor"` +} + +type _ChangePageOut ChangePageOut + +// NewChangePageOut instantiates a new ChangePageOut object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewChangePageOut(hasMore bool, items []ChangeOut, nextCursor string) *ChangePageOut { + this := ChangePageOut{} + this.HasMore = hasMore + this.Items = items + this.NextCursor = nextCursor + return &this +} + +// NewChangePageOutWithDefaults instantiates a new ChangePageOut object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewChangePageOutWithDefaults() *ChangePageOut { + this := ChangePageOut{} + return &this +} + +// GetHasMore returns the HasMore field value +func (o *ChangePageOut) GetHasMore() bool { + if o == nil { + var ret bool + return ret + } + + return o.HasMore +} + +// GetHasMoreOk returns a tuple with the HasMore field value +// and a boolean to check if the value has been set. +func (o *ChangePageOut) GetHasMoreOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.HasMore, true +} + +// SetHasMore sets field value +func (o *ChangePageOut) SetHasMore(v bool) { + o.HasMore = v +} + +// GetItems returns the Items field value +func (o *ChangePageOut) GetItems() []ChangeOut { + if o == nil { + var ret []ChangeOut + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *ChangePageOut) GetItemsOk() ([]ChangeOut, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *ChangePageOut) SetItems(v []ChangeOut) { + o.Items = v +} + +// GetNextCursor returns the NextCursor field value +func (o *ChangePageOut) GetNextCursor() string { + if o == nil { + var ret string + return ret + } + + return o.NextCursor +} + +// GetNextCursorOk returns a tuple with the NextCursor field value +// and a boolean to check if the value has been set. +func (o *ChangePageOut) GetNextCursorOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.NextCursor, true +} + +// SetNextCursor sets field value +func (o *ChangePageOut) SetNextCursor(v string) { + o.NextCursor = v +} + +func (o ChangePageOut) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ChangePageOut) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["has_more"] = o.HasMore + toSerialize["items"] = o.Items + toSerialize["next_cursor"] = o.NextCursor + return toSerialize, nil +} + +func (o *ChangePageOut) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "has_more", + "items", + "next_cursor", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varChangePageOut := _ChangePageOut{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varChangePageOut) + + if err != nil { + return err + } + + *o = ChangePageOut(varChangePageOut) + + return err +} + +type NullableChangePageOut struct { + value *ChangePageOut + isSet bool +} + +func (v NullableChangePageOut) Get() *ChangePageOut { + return v.value +} + +func (v *NullableChangePageOut) Set(val *ChangePageOut) { + v.value = val + v.isSet = true +} + +func (v NullableChangePageOut) IsSet() bool { + return v.isSet +} + +func (v *NullableChangePageOut) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableChangePageOut(val *ChangePageOut) *NullableChangePageOut { + return &NullableChangePageOut{value: val, isSet: true} +} + +func (v NullableChangePageOut) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableChangePageOut) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/sdk/go/model_change_resource_out.go b/sdk/go/model_change_resource_out.go new file mode 100644 index 0000000..d7c14a9 --- /dev/null +++ b/sdk/go/model_change_resource_out.go @@ -0,0 +1,184 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ChangeResourceOut type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ChangeResourceOut{} + +// ChangeResourceOut struct for ChangeResourceOut +type ChangeResourceOut struct { + Id string `json:"id"` + Type string `json:"type"` +} + +type _ChangeResourceOut ChangeResourceOut + +// NewChangeResourceOut instantiates a new ChangeResourceOut object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewChangeResourceOut(id string, type_ string) *ChangeResourceOut { + this := ChangeResourceOut{} + this.Id = id + this.Type = type_ + return &this +} + +// NewChangeResourceOutWithDefaults instantiates a new ChangeResourceOut object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewChangeResourceOutWithDefaults() *ChangeResourceOut { + this := ChangeResourceOut{} + return &this +} + +// GetId returns the Id field value +func (o *ChangeResourceOut) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ChangeResourceOut) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ChangeResourceOut) SetId(v string) { + o.Id = v +} + +// GetType returns the Type field value +func (o *ChangeResourceOut) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *ChangeResourceOut) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *ChangeResourceOut) SetType(v string) { + o.Type = v +} + +func (o ChangeResourceOut) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ChangeResourceOut) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["type"] = o.Type + return toSerialize, nil +} + +func (o *ChangeResourceOut) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varChangeResourceOut := _ChangeResourceOut{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varChangeResourceOut) + + if err != nil { + return err + } + + *o = ChangeResourceOut(varChangeResourceOut) + + return err +} + +type NullableChangeResourceOut struct { + value *ChangeResourceOut + isSet bool +} + +func (v NullableChangeResourceOut) Get() *ChangeResourceOut { + return v.value +} + +func (v *NullableChangeResourceOut) Set(val *ChangeResourceOut) { + v.value = val + v.isSet = true +} + +func (v NullableChangeResourceOut) IsSet() bool { + return v.isSet +} + +func (v *NullableChangeResourceOut) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableChangeResourceOut(val *ChangeResourceOut) *NullableChangeResourceOut { + return &NullableChangeResourceOut{value: val, isSet: true} +} + +func (v NullableChangeResourceOut) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableChangeResourceOut) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/sdk/go/model_claim_init_request.go b/sdk/go/model_claim_init_request.go deleted file mode 100644 index c537b2c..0000000 --- a/sdk/go/model_claim_init_request.go +++ /dev/null @@ -1,204 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the ClaimInitRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ClaimInitRequest{} - -// ClaimInitRequest `POST /agent/identity/claim` body. -type ClaimInitRequest struct { - // The per-identity claim_token returned by POST /agent/identity. - ClaimToken string `json:"claim_token"` - // Optional hint to display on the /claim page so the human knows which account the agent expected. Not enforced (design §14 question #3). - Email NullableString `json:"email,omitempty"` -} - -type _ClaimInitRequest ClaimInitRequest - -// NewClaimInitRequest instantiates a new ClaimInitRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewClaimInitRequest(claimToken string) *ClaimInitRequest { - this := ClaimInitRequest{} - this.ClaimToken = claimToken - return &this -} - -// NewClaimInitRequestWithDefaults instantiates a new ClaimInitRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewClaimInitRequestWithDefaults() *ClaimInitRequest { - this := ClaimInitRequest{} - return &this -} - -// GetClaimToken returns the ClaimToken field value -func (o *ClaimInitRequest) GetClaimToken() string { - if o == nil { - var ret string - return ret - } - - return o.ClaimToken -} - -// GetClaimTokenOk returns a tuple with the ClaimToken field value -// and a boolean to check if the value has been set. -func (o *ClaimInitRequest) GetClaimTokenOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ClaimToken, true -} - -// SetClaimToken sets field value -func (o *ClaimInitRequest) SetClaimToken(v string) { - o.ClaimToken = v -} - -// GetEmail returns the Email field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ClaimInitRequest) GetEmail() string { - if o == nil || IsNil(o.Email.Get()) { - var ret string - return ret - } - return *o.Email.Get() -} - -// GetEmailOk returns a tuple with the Email field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ClaimInitRequest) GetEmailOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Email.Get(), o.Email.IsSet() -} - -// HasEmail returns a boolean if a field has been set. -func (o *ClaimInitRequest) HasEmail() bool { - if o != nil && o.Email.IsSet() { - return true - } - - return false -} - -// SetEmail gets a reference to the given NullableString and assigns it to the Email field. -func (o *ClaimInitRequest) SetEmail(v string) { - o.Email.Set(&v) -} -// SetEmailNil sets the value for Email to be an explicit nil -func (o *ClaimInitRequest) SetEmailNil() { - o.Email.Set(nil) -} - -// UnsetEmail ensures that no value is present for Email, not even an explicit nil -func (o *ClaimInitRequest) UnsetEmail() { - o.Email.Unset() -} - -func (o ClaimInitRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ClaimInitRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["claim_token"] = o.ClaimToken - if o.Email.IsSet() { - toSerialize["email"] = o.Email.Get() - } - return toSerialize, nil -} - -func (o *ClaimInitRequest) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "claim_token", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varClaimInitRequest := _ClaimInitRequest{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varClaimInitRequest) - - if err != nil { - return err - } - - *o = ClaimInitRequest(varClaimInitRequest) - - return err -} - -type NullableClaimInitRequest struct { - value *ClaimInitRequest - isSet bool -} - -func (v NullableClaimInitRequest) Get() *ClaimInitRequest { - return v.value -} - -func (v *NullableClaimInitRequest) Set(val *ClaimInitRequest) { - v.value = val - v.isSet = true -} - -func (v NullableClaimInitRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableClaimInitRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableClaimInitRequest(val *ClaimInitRequest) *NullableClaimInitRequest { - return &NullableClaimInitRequest{value: val, isSet: true} -} - -func (v NullableClaimInitRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableClaimInitRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_claim_init_response.go b/sdk/go/model_claim_init_response.go deleted file mode 100644 index 0d5ab58..0000000 --- a/sdk/go/model_claim_init_response.go +++ /dev/null @@ -1,273 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "time" - "bytes" - "fmt" -) - -// checks if the ClaimInitResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ClaimInitResponse{} - -// ClaimInitResponse struct for ClaimInitResponse -type ClaimInitResponse struct { - // Per-attempt opaque token; the agent does not need to present it. - ClaimAttemptToken string `json:"claim_attempt_token"` - ExpiresAt time.Time `json:"expires_at"` - // Human-readable code the user types/sees on /claim. - UserCode string `json:"user_code"` - // URL to direct the human to. - VerificationUri string `json:"verification_uri"` - // Convenience: same as `verification_uri` but with the user_code pre-baked so the human doesn't have to type it. RFC 8628 idiom. - VerificationUriComplete string `json:"verification_uri_complete"` -} - -type _ClaimInitResponse ClaimInitResponse - -// NewClaimInitResponse instantiates a new ClaimInitResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewClaimInitResponse(claimAttemptToken string, expiresAt time.Time, userCode string, verificationUri string, verificationUriComplete string) *ClaimInitResponse { - this := ClaimInitResponse{} - this.ClaimAttemptToken = claimAttemptToken - this.ExpiresAt = expiresAt - this.UserCode = userCode - this.VerificationUri = verificationUri - this.VerificationUriComplete = verificationUriComplete - return &this -} - -// NewClaimInitResponseWithDefaults instantiates a new ClaimInitResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewClaimInitResponseWithDefaults() *ClaimInitResponse { - this := ClaimInitResponse{} - return &this -} - -// GetClaimAttemptToken returns the ClaimAttemptToken field value -func (o *ClaimInitResponse) GetClaimAttemptToken() string { - if o == nil { - var ret string - return ret - } - - return o.ClaimAttemptToken -} - -// GetClaimAttemptTokenOk returns a tuple with the ClaimAttemptToken field value -// and a boolean to check if the value has been set. -func (o *ClaimInitResponse) GetClaimAttemptTokenOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ClaimAttemptToken, true -} - -// SetClaimAttemptToken sets field value -func (o *ClaimInitResponse) SetClaimAttemptToken(v string) { - o.ClaimAttemptToken = v -} - -// GetExpiresAt returns the ExpiresAt field value -func (o *ClaimInitResponse) GetExpiresAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.ExpiresAt -} - -// GetExpiresAtOk returns a tuple with the ExpiresAt field value -// and a boolean to check if the value has been set. -func (o *ClaimInitResponse) GetExpiresAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.ExpiresAt, true -} - -// SetExpiresAt sets field value -func (o *ClaimInitResponse) SetExpiresAt(v time.Time) { - o.ExpiresAt = v -} - -// GetUserCode returns the UserCode field value -func (o *ClaimInitResponse) GetUserCode() string { - if o == nil { - var ret string - return ret - } - - return o.UserCode -} - -// GetUserCodeOk returns a tuple with the UserCode field value -// and a boolean to check if the value has been set. -func (o *ClaimInitResponse) GetUserCodeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.UserCode, true -} - -// SetUserCode sets field value -func (o *ClaimInitResponse) SetUserCode(v string) { - o.UserCode = v -} - -// GetVerificationUri returns the VerificationUri field value -func (o *ClaimInitResponse) GetVerificationUri() string { - if o == nil { - var ret string - return ret - } - - return o.VerificationUri -} - -// GetVerificationUriOk returns a tuple with the VerificationUri field value -// and a boolean to check if the value has been set. -func (o *ClaimInitResponse) GetVerificationUriOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.VerificationUri, true -} - -// SetVerificationUri sets field value -func (o *ClaimInitResponse) SetVerificationUri(v string) { - o.VerificationUri = v -} - -// GetVerificationUriComplete returns the VerificationUriComplete field value -func (o *ClaimInitResponse) GetVerificationUriComplete() string { - if o == nil { - var ret string - return ret - } - - return o.VerificationUriComplete -} - -// GetVerificationUriCompleteOk returns a tuple with the VerificationUriComplete field value -// and a boolean to check if the value has been set. -func (o *ClaimInitResponse) GetVerificationUriCompleteOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.VerificationUriComplete, true -} - -// SetVerificationUriComplete sets field value -func (o *ClaimInitResponse) SetVerificationUriComplete(v string) { - o.VerificationUriComplete = v -} - -func (o ClaimInitResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ClaimInitResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["claim_attempt_token"] = o.ClaimAttemptToken - toSerialize["expires_at"] = o.ExpiresAt - toSerialize["user_code"] = o.UserCode - toSerialize["verification_uri"] = o.VerificationUri - toSerialize["verification_uri_complete"] = o.VerificationUriComplete - return toSerialize, nil -} - -func (o *ClaimInitResponse) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "claim_attempt_token", - "expires_at", - "user_code", - "verification_uri", - "verification_uri_complete", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varClaimInitResponse := _ClaimInitResponse{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varClaimInitResponse) - - if err != nil { - return err - } - - *o = ClaimInitResponse(varClaimInitResponse) - - return err -} - -type NullableClaimInitResponse struct { - value *ClaimInitResponse - isSet bool -} - -func (v NullableClaimInitResponse) Get() *ClaimInitResponse { - return v.value -} - -func (v *NullableClaimInitResponse) Set(val *ClaimInitResponse) { - v.value = val - v.isSet = true -} - -func (v NullableClaimInitResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableClaimInitResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableClaimInitResponse(val *ClaimInitResponse) *NullableClaimInitResponse { - return &NullableClaimInitResponse{value: val, isSet: true} -} - -func (v NullableClaimInitResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableClaimInitResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_claim_metadata.go b/sdk/go/model_claim_metadata.go deleted file mode 100644 index 9a3d5b8..0000000 --- a/sdk/go/model_claim_metadata.go +++ /dev/null @@ -1,196 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the ClaimMetadata type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ClaimMetadata{} - -// ClaimMetadata Hints the agent's UI/CLI can use when initiating the claim ceremony. Decoupled from the `claim_token` itself so future additions don't change the token's shape. -type ClaimMetadata struct { - ClaimEndpoint string `json:"claim_endpoint"` - SupportedEmailHints *bool `json:"supported_email_hints,omitempty"` -} - -type _ClaimMetadata ClaimMetadata - -// NewClaimMetadata instantiates a new ClaimMetadata object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewClaimMetadata(claimEndpoint string) *ClaimMetadata { - this := ClaimMetadata{} - this.ClaimEndpoint = claimEndpoint - var supportedEmailHints bool = true - this.SupportedEmailHints = &supportedEmailHints - return &this -} - -// NewClaimMetadataWithDefaults instantiates a new ClaimMetadata object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewClaimMetadataWithDefaults() *ClaimMetadata { - this := ClaimMetadata{} - var supportedEmailHints bool = true - this.SupportedEmailHints = &supportedEmailHints - return &this -} - -// GetClaimEndpoint returns the ClaimEndpoint field value -func (o *ClaimMetadata) GetClaimEndpoint() string { - if o == nil { - var ret string - return ret - } - - return o.ClaimEndpoint -} - -// GetClaimEndpointOk returns a tuple with the ClaimEndpoint field value -// and a boolean to check if the value has been set. -func (o *ClaimMetadata) GetClaimEndpointOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ClaimEndpoint, true -} - -// SetClaimEndpoint sets field value -func (o *ClaimMetadata) SetClaimEndpoint(v string) { - o.ClaimEndpoint = v -} - -// GetSupportedEmailHints returns the SupportedEmailHints field value if set, zero value otherwise. -func (o *ClaimMetadata) GetSupportedEmailHints() bool { - if o == nil || IsNil(o.SupportedEmailHints) { - var ret bool - return ret - } - return *o.SupportedEmailHints -} - -// GetSupportedEmailHintsOk returns a tuple with the SupportedEmailHints field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ClaimMetadata) GetSupportedEmailHintsOk() (*bool, bool) { - if o == nil || IsNil(o.SupportedEmailHints) { - return nil, false - } - return o.SupportedEmailHints, true -} - -// HasSupportedEmailHints returns a boolean if a field has been set. -func (o *ClaimMetadata) HasSupportedEmailHints() bool { - if o != nil && !IsNil(o.SupportedEmailHints) { - return true - } - - return false -} - -// SetSupportedEmailHints gets a reference to the given bool and assigns it to the SupportedEmailHints field. -func (o *ClaimMetadata) SetSupportedEmailHints(v bool) { - o.SupportedEmailHints = &v -} - -func (o ClaimMetadata) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ClaimMetadata) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["claim_endpoint"] = o.ClaimEndpoint - if !IsNil(o.SupportedEmailHints) { - toSerialize["supported_email_hints"] = o.SupportedEmailHints - } - return toSerialize, nil -} - -func (o *ClaimMetadata) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "claim_endpoint", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varClaimMetadata := _ClaimMetadata{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varClaimMetadata) - - if err != nil { - return err - } - - *o = ClaimMetadata(varClaimMetadata) - - return err -} - -type NullableClaimMetadata struct { - value *ClaimMetadata - isSet bool -} - -func (v NullableClaimMetadata) Get() *ClaimMetadata { - return v.value -} - -func (v *NullableClaimMetadata) Set(val *ClaimMetadata) { - v.value = val - v.isSet = true -} - -func (v NullableClaimMetadata) IsSet() bool { - return v.isSet -} - -func (v *NullableClaimMetadata) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableClaimMetadata(val *ClaimMetadata) *NullableClaimMetadata { - return &NullableClaimMetadata{value: val, isSet: true} -} - -func (v NullableClaimMetadata) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableClaimMetadata) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_client_registration_out.go b/sdk/go/model_client_registration_out.go deleted file mode 100644 index 811b99c..0000000 --- a/sdk/go/model_client_registration_out.go +++ /dev/null @@ -1,369 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "fmt" -) - -// checks if the ClientRegistrationOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ClientRegistrationOut{} - -// ClientRegistrationOut struct for ClientRegistrationOut -type ClientRegistrationOut struct { - ClientId string `json:"client_id"` - ClientIdIssuedAt int32 `json:"client_id_issued_at"` - ClientName string `json:"client_name"` - GrantTypes []string `json:"grant_types"` - RedirectUris []string `json:"redirect_uris"` - ResponseTypes []string `json:"response_types"` - Scope string `json:"scope"` - TokenEndpointAuthMethod string `json:"token_endpoint_auth_method"` - AdditionalProperties map[string]interface{} -} - -type _ClientRegistrationOut ClientRegistrationOut - -// NewClientRegistrationOut instantiates a new ClientRegistrationOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewClientRegistrationOut(clientId string, clientIdIssuedAt int32, clientName string, grantTypes []string, redirectUris []string, responseTypes []string, scope string, tokenEndpointAuthMethod string) *ClientRegistrationOut { - this := ClientRegistrationOut{} - this.ClientId = clientId - this.ClientIdIssuedAt = clientIdIssuedAt - this.ClientName = clientName - this.GrantTypes = grantTypes - this.RedirectUris = redirectUris - this.ResponseTypes = responseTypes - this.Scope = scope - this.TokenEndpointAuthMethod = tokenEndpointAuthMethod - return &this -} - -// NewClientRegistrationOutWithDefaults instantiates a new ClientRegistrationOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewClientRegistrationOutWithDefaults() *ClientRegistrationOut { - this := ClientRegistrationOut{} - return &this -} - -// GetClientId returns the ClientId field value -func (o *ClientRegistrationOut) GetClientId() string { - if o == nil { - var ret string - return ret - } - - return o.ClientId -} - -// GetClientIdOk returns a tuple with the ClientId field value -// and a boolean to check if the value has been set. -func (o *ClientRegistrationOut) GetClientIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ClientId, true -} - -// SetClientId sets field value -func (o *ClientRegistrationOut) SetClientId(v string) { - o.ClientId = v -} - -// GetClientIdIssuedAt returns the ClientIdIssuedAt field value -func (o *ClientRegistrationOut) GetClientIdIssuedAt() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.ClientIdIssuedAt -} - -// GetClientIdIssuedAtOk returns a tuple with the ClientIdIssuedAt field value -// and a boolean to check if the value has been set. -func (o *ClientRegistrationOut) GetClientIdIssuedAtOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.ClientIdIssuedAt, true -} - -// SetClientIdIssuedAt sets field value -func (o *ClientRegistrationOut) SetClientIdIssuedAt(v int32) { - o.ClientIdIssuedAt = v -} - -// GetClientName returns the ClientName field value -func (o *ClientRegistrationOut) GetClientName() string { - if o == nil { - var ret string - return ret - } - - return o.ClientName -} - -// GetClientNameOk returns a tuple with the ClientName field value -// and a boolean to check if the value has been set. -func (o *ClientRegistrationOut) GetClientNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ClientName, true -} - -// SetClientName sets field value -func (o *ClientRegistrationOut) SetClientName(v string) { - o.ClientName = v -} - -// GetGrantTypes returns the GrantTypes field value -func (o *ClientRegistrationOut) GetGrantTypes() []string { - if o == nil { - var ret []string - return ret - } - - return o.GrantTypes -} - -// GetGrantTypesOk returns a tuple with the GrantTypes field value -// and a boolean to check if the value has been set. -func (o *ClientRegistrationOut) GetGrantTypesOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.GrantTypes, true -} - -// SetGrantTypes sets field value -func (o *ClientRegistrationOut) SetGrantTypes(v []string) { - o.GrantTypes = v -} - -// GetRedirectUris returns the RedirectUris field value -func (o *ClientRegistrationOut) GetRedirectUris() []string { - if o == nil { - var ret []string - return ret - } - - return o.RedirectUris -} - -// GetRedirectUrisOk returns a tuple with the RedirectUris field value -// and a boolean to check if the value has been set. -func (o *ClientRegistrationOut) GetRedirectUrisOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.RedirectUris, true -} - -// SetRedirectUris sets field value -func (o *ClientRegistrationOut) SetRedirectUris(v []string) { - o.RedirectUris = v -} - -// GetResponseTypes returns the ResponseTypes field value -func (o *ClientRegistrationOut) GetResponseTypes() []string { - if o == nil { - var ret []string - return ret - } - - return o.ResponseTypes -} - -// GetResponseTypesOk returns a tuple with the ResponseTypes field value -// and a boolean to check if the value has been set. -func (o *ClientRegistrationOut) GetResponseTypesOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.ResponseTypes, true -} - -// SetResponseTypes sets field value -func (o *ClientRegistrationOut) SetResponseTypes(v []string) { - o.ResponseTypes = v -} - -// GetScope returns the Scope field value -func (o *ClientRegistrationOut) GetScope() string { - if o == nil { - var ret string - return ret - } - - return o.Scope -} - -// GetScopeOk returns a tuple with the Scope field value -// and a boolean to check if the value has been set. -func (o *ClientRegistrationOut) GetScopeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Scope, true -} - -// SetScope sets field value -func (o *ClientRegistrationOut) SetScope(v string) { - o.Scope = v -} - -// GetTokenEndpointAuthMethod returns the TokenEndpointAuthMethod field value -func (o *ClientRegistrationOut) GetTokenEndpointAuthMethod() string { - if o == nil { - var ret string - return ret - } - - return o.TokenEndpointAuthMethod -} - -// GetTokenEndpointAuthMethodOk returns a tuple with the TokenEndpointAuthMethod field value -// and a boolean to check if the value has been set. -func (o *ClientRegistrationOut) GetTokenEndpointAuthMethodOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TokenEndpointAuthMethod, true -} - -// SetTokenEndpointAuthMethod sets field value -func (o *ClientRegistrationOut) SetTokenEndpointAuthMethod(v string) { - o.TokenEndpointAuthMethod = v -} - -func (o ClientRegistrationOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ClientRegistrationOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["client_id"] = o.ClientId - toSerialize["client_id_issued_at"] = o.ClientIdIssuedAt - toSerialize["client_name"] = o.ClientName - toSerialize["grant_types"] = o.GrantTypes - toSerialize["redirect_uris"] = o.RedirectUris - toSerialize["response_types"] = o.ResponseTypes - toSerialize["scope"] = o.Scope - toSerialize["token_endpoint_auth_method"] = o.TokenEndpointAuthMethod - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *ClientRegistrationOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "client_id", - "client_id_issued_at", - "client_name", - "grant_types", - "redirect_uris", - "response_types", - "scope", - "token_endpoint_auth_method", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varClientRegistrationOut := _ClientRegistrationOut{} - - err = json.Unmarshal(data, &varClientRegistrationOut) - - if err != nil { - return err - } - - *o = ClientRegistrationOut(varClientRegistrationOut) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "client_id") - delete(additionalProperties, "client_id_issued_at") - delete(additionalProperties, "client_name") - delete(additionalProperties, "grant_types") - delete(additionalProperties, "redirect_uris") - delete(additionalProperties, "response_types") - delete(additionalProperties, "scope") - delete(additionalProperties, "token_endpoint_auth_method") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableClientRegistrationOut struct { - value *ClientRegistrationOut - isSet bool -} - -func (v NullableClientRegistrationOut) Get() *ClientRegistrationOut { - return v.value -} - -func (v *NullableClientRegistrationOut) Set(val *ClientRegistrationOut) { - v.value = val - v.isSet = true -} - -func (v NullableClientRegistrationOut) IsSet() bool { - return v.isSet -} - -func (v *NullableClientRegistrationOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableClientRegistrationOut(val *ClientRegistrationOut) *NullableClientRegistrationOut { - return &NullableClientRegistrationOut{value: val, isSet: true} -} - -func (v NullableClientRegistrationOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableClientRegistrationOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_compile_diagnostic_out.go b/sdk/go/model_compile_diagnostic_out.go deleted file mode 100644 index b3fe974..0000000 --- a/sdk/go/model_compile_diagnostic_out.go +++ /dev/null @@ -1,383 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "fmt" -) - -// checks if the CompileDiagnosticOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CompileDiagnosticOut{} - -// CompileDiagnosticOut struct for CompileDiagnosticOut -type CompileDiagnosticOut struct { - Category NullableString `json:"category,omitempty"` - File NullableString `json:"file,omitempty"` - Line NullableInt32 `json:"line,omitempty"` - Message string `json:"message"` - Severity string `json:"severity"` - Suggestion NullableString `json:"suggestion,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _CompileDiagnosticOut CompileDiagnosticOut - -// NewCompileDiagnosticOut instantiates a new CompileDiagnosticOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCompileDiagnosticOut(message string, severity string) *CompileDiagnosticOut { - this := CompileDiagnosticOut{} - this.Message = message - this.Severity = severity - return &this -} - -// NewCompileDiagnosticOutWithDefaults instantiates a new CompileDiagnosticOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCompileDiagnosticOutWithDefaults() *CompileDiagnosticOut { - this := CompileDiagnosticOut{} - return &this -} - -// GetCategory returns the Category field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *CompileDiagnosticOut) GetCategory() string { - if o == nil || IsNil(o.Category.Get()) { - var ret string - return ret - } - return *o.Category.Get() -} - -// GetCategoryOk returns a tuple with the Category field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *CompileDiagnosticOut) GetCategoryOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Category.Get(), o.Category.IsSet() -} - -// HasCategory returns a boolean if a field has been set. -func (o *CompileDiagnosticOut) HasCategory() bool { - if o != nil && o.Category.IsSet() { - return true - } - - return false -} - -// SetCategory gets a reference to the given NullableString and assigns it to the Category field. -func (o *CompileDiagnosticOut) SetCategory(v string) { - o.Category.Set(&v) -} -// SetCategoryNil sets the value for Category to be an explicit nil -func (o *CompileDiagnosticOut) SetCategoryNil() { - o.Category.Set(nil) -} - -// UnsetCategory ensures that no value is present for Category, not even an explicit nil -func (o *CompileDiagnosticOut) UnsetCategory() { - o.Category.Unset() -} - -// GetFile returns the File field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *CompileDiagnosticOut) GetFile() string { - if o == nil || IsNil(o.File.Get()) { - var ret string - return ret - } - return *o.File.Get() -} - -// GetFileOk returns a tuple with the File field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *CompileDiagnosticOut) GetFileOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.File.Get(), o.File.IsSet() -} - -// HasFile returns a boolean if a field has been set. -func (o *CompileDiagnosticOut) HasFile() bool { - if o != nil && o.File.IsSet() { - return true - } - - return false -} - -// SetFile gets a reference to the given NullableString and assigns it to the File field. -func (o *CompileDiagnosticOut) SetFile(v string) { - o.File.Set(&v) -} -// SetFileNil sets the value for File to be an explicit nil -func (o *CompileDiagnosticOut) SetFileNil() { - o.File.Set(nil) -} - -// UnsetFile ensures that no value is present for File, not even an explicit nil -func (o *CompileDiagnosticOut) UnsetFile() { - o.File.Unset() -} - -// GetLine returns the Line field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *CompileDiagnosticOut) GetLine() int32 { - if o == nil || IsNil(o.Line.Get()) { - var ret int32 - return ret - } - return *o.Line.Get() -} - -// GetLineOk returns a tuple with the Line field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *CompileDiagnosticOut) GetLineOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.Line.Get(), o.Line.IsSet() -} - -// HasLine returns a boolean if a field has been set. -func (o *CompileDiagnosticOut) HasLine() bool { - if o != nil && o.Line.IsSet() { - return true - } - - return false -} - -// SetLine gets a reference to the given NullableInt32 and assigns it to the Line field. -func (o *CompileDiagnosticOut) SetLine(v int32) { - o.Line.Set(&v) -} -// SetLineNil sets the value for Line to be an explicit nil -func (o *CompileDiagnosticOut) SetLineNil() { - o.Line.Set(nil) -} - -// UnsetLine ensures that no value is present for Line, not even an explicit nil -func (o *CompileDiagnosticOut) UnsetLine() { - o.Line.Unset() -} - -// GetMessage returns the Message field value -func (o *CompileDiagnosticOut) GetMessage() string { - if o == nil { - var ret string - return ret - } - - return o.Message -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -func (o *CompileDiagnosticOut) GetMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Message, true -} - -// SetMessage sets field value -func (o *CompileDiagnosticOut) SetMessage(v string) { - o.Message = v -} - -// GetSeverity returns the Severity field value -func (o *CompileDiagnosticOut) GetSeverity() string { - if o == nil { - var ret string - return ret - } - - return o.Severity -} - -// GetSeverityOk returns a tuple with the Severity field value -// and a boolean to check if the value has been set. -func (o *CompileDiagnosticOut) GetSeverityOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Severity, true -} - -// SetSeverity sets field value -func (o *CompileDiagnosticOut) SetSeverity(v string) { - o.Severity = v -} - -// GetSuggestion returns the Suggestion field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *CompileDiagnosticOut) GetSuggestion() string { - if o == nil || IsNil(o.Suggestion.Get()) { - var ret string - return ret - } - return *o.Suggestion.Get() -} - -// GetSuggestionOk returns a tuple with the Suggestion field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *CompileDiagnosticOut) GetSuggestionOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Suggestion.Get(), o.Suggestion.IsSet() -} - -// HasSuggestion returns a boolean if a field has been set. -func (o *CompileDiagnosticOut) HasSuggestion() bool { - if o != nil && o.Suggestion.IsSet() { - return true - } - - return false -} - -// SetSuggestion gets a reference to the given NullableString and assigns it to the Suggestion field. -func (o *CompileDiagnosticOut) SetSuggestion(v string) { - o.Suggestion.Set(&v) -} -// SetSuggestionNil sets the value for Suggestion to be an explicit nil -func (o *CompileDiagnosticOut) SetSuggestionNil() { - o.Suggestion.Set(nil) -} - -// UnsetSuggestion ensures that no value is present for Suggestion, not even an explicit nil -func (o *CompileDiagnosticOut) UnsetSuggestion() { - o.Suggestion.Unset() -} - -func (o CompileDiagnosticOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CompileDiagnosticOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Category.IsSet() { - toSerialize["category"] = o.Category.Get() - } - if o.File.IsSet() { - toSerialize["file"] = o.File.Get() - } - if o.Line.IsSet() { - toSerialize["line"] = o.Line.Get() - } - toSerialize["message"] = o.Message - toSerialize["severity"] = o.Severity - if o.Suggestion.IsSet() { - toSerialize["suggestion"] = o.Suggestion.Get() - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *CompileDiagnosticOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "message", - "severity", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varCompileDiagnosticOut := _CompileDiagnosticOut{} - - err = json.Unmarshal(data, &varCompileDiagnosticOut) - - if err != nil { - return err - } - - *o = CompileDiagnosticOut(varCompileDiagnosticOut) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "category") - delete(additionalProperties, "file") - delete(additionalProperties, "line") - delete(additionalProperties, "message") - delete(additionalProperties, "severity") - delete(additionalProperties, "suggestion") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableCompileDiagnosticOut struct { - value *CompileDiagnosticOut - isSet bool -} - -func (v NullableCompileDiagnosticOut) Get() *CompileDiagnosticOut { - return v.value -} - -func (v *NullableCompileDiagnosticOut) Set(val *CompileDiagnosticOut) { - v.value = val - v.isSet = true -} - -func (v NullableCompileDiagnosticOut) IsSet() bool { - return v.isSet -} - -func (v *NullableCompileDiagnosticOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCompileDiagnosticOut(val *CompileDiagnosticOut) *NullableCompileDiagnosticOut { - return &NullableCompileDiagnosticOut{value: val, isSet: true} -} - -func (v NullableCompileDiagnosticOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCompileDiagnosticOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_compile_job_in.go b/sdk/go/model_compile_job_in.go deleted file mode 100644 index 7b211d5..0000000 --- a/sdk/go/model_compile_job_in.go +++ /dev/null @@ -1,164 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" -) - -// checks if the CompileJobIn type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CompileJobIn{} - -// CompileJobIn struct for CompileJobIn -type CompileJobIn struct { - Options *CompileOptions `json:"options,omitempty"` - Task *string `json:"task,omitempty"` -} - -// NewCompileJobIn instantiates a new CompileJobIn object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCompileJobIn() *CompileJobIn { - this := CompileJobIn{} - var task string = "latex.compile" - this.Task = &task - return &this -} - -// NewCompileJobInWithDefaults instantiates a new CompileJobIn object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCompileJobInWithDefaults() *CompileJobIn { - this := CompileJobIn{} - var task string = "latex.compile" - this.Task = &task - return &this -} - -// GetOptions returns the Options field value if set, zero value otherwise. -func (o *CompileJobIn) GetOptions() CompileOptions { - if o == nil || IsNil(o.Options) { - var ret CompileOptions - return ret - } - return *o.Options -} - -// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CompileJobIn) GetOptionsOk() (*CompileOptions, bool) { - if o == nil || IsNil(o.Options) { - return nil, false - } - return o.Options, true -} - -// HasOptions returns a boolean if a field has been set. -func (o *CompileJobIn) HasOptions() bool { - if o != nil && !IsNil(o.Options) { - return true - } - - return false -} - -// SetOptions gets a reference to the given CompileOptions and assigns it to the Options field. -func (o *CompileJobIn) SetOptions(v CompileOptions) { - o.Options = &v -} - -// GetTask returns the Task field value if set, zero value otherwise. -func (o *CompileJobIn) GetTask() string { - if o == nil || IsNil(o.Task) { - var ret string - return ret - } - return *o.Task -} - -// GetTaskOk returns a tuple with the Task field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CompileJobIn) GetTaskOk() (*string, bool) { - if o == nil || IsNil(o.Task) { - return nil, false - } - return o.Task, true -} - -// HasTask returns a boolean if a field has been set. -func (o *CompileJobIn) HasTask() bool { - if o != nil && !IsNil(o.Task) { - return true - } - - return false -} - -// SetTask gets a reference to the given string and assigns it to the Task field. -func (o *CompileJobIn) SetTask(v string) { - o.Task = &v -} - -func (o CompileJobIn) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CompileJobIn) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.Options) { - toSerialize["options"] = o.Options - } - if !IsNil(o.Task) { - toSerialize["task"] = o.Task - } - return toSerialize, nil -} - -type NullableCompileJobIn struct { - value *CompileJobIn - isSet bool -} - -func (v NullableCompileJobIn) Get() *CompileJobIn { - return v.value -} - -func (v *NullableCompileJobIn) Set(val *CompileJobIn) { - v.value = val - v.isSet = true -} - -func (v NullableCompileJobIn) IsSet() bool { - return v.isSet -} - -func (v *NullableCompileJobIn) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCompileJobIn(val *CompileJobIn) *NullableCompileJobIn { - return &NullableCompileJobIn{value: val, isSet: true} -} - -func (v NullableCompileJobIn) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCompileJobIn) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_compile_job_list_out.go b/sdk/go/model_compile_job_list_out.go deleted file mode 100644 index 9575b91..0000000 --- a/sdk/go/model_compile_job_list_out.go +++ /dev/null @@ -1,236 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the CompileJobListOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CompileJobListOut{} - -// CompileJobListOut struct for CompileJobListOut -type CompileJobListOut struct { - Items []CompileJobOut `json:"items"` - // Deprecated same-value alias for `items`; retained for compatibility. - // Deprecated - Jobs []CompileJobOut `json:"jobs"` - // Opaque continuation token, or null when the listing is complete. - NextCursor NullableString `json:"next_cursor,omitempty"` -} - -type _CompileJobListOut CompileJobListOut - -// NewCompileJobListOut instantiates a new CompileJobListOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCompileJobListOut(items []CompileJobOut, jobs []CompileJobOut) *CompileJobListOut { - this := CompileJobListOut{} - this.Items = items - this.Jobs = jobs - return &this -} - -// NewCompileJobListOutWithDefaults instantiates a new CompileJobListOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCompileJobListOutWithDefaults() *CompileJobListOut { - this := CompileJobListOut{} - return &this -} - -// GetItems returns the Items field value -func (o *CompileJobListOut) GetItems() []CompileJobOut { - if o == nil { - var ret []CompileJobOut - return ret - } - - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value -// and a boolean to check if the value has been set. -func (o *CompileJobListOut) GetItemsOk() ([]CompileJobOut, bool) { - if o == nil { - return nil, false - } - return o.Items, true -} - -// SetItems sets field value -func (o *CompileJobListOut) SetItems(v []CompileJobOut) { - o.Items = v -} - -// GetJobs returns the Jobs field value -// Deprecated -func (o *CompileJobListOut) GetJobs() []CompileJobOut { - if o == nil { - var ret []CompileJobOut - return ret - } - - return o.Jobs -} - -// GetJobsOk returns a tuple with the Jobs field value -// and a boolean to check if the value has been set. -// Deprecated -func (o *CompileJobListOut) GetJobsOk() ([]CompileJobOut, bool) { - if o == nil { - return nil, false - } - return o.Jobs, true -} - -// SetJobs sets field value -// Deprecated -func (o *CompileJobListOut) SetJobs(v []CompileJobOut) { - o.Jobs = v -} - -// GetNextCursor returns the NextCursor field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *CompileJobListOut) GetNextCursor() string { - if o == nil || IsNil(o.NextCursor.Get()) { - var ret string - return ret - } - return *o.NextCursor.Get() -} - -// GetNextCursorOk returns a tuple with the NextCursor field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *CompileJobListOut) GetNextCursorOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.NextCursor.Get(), o.NextCursor.IsSet() -} - -// HasNextCursor returns a boolean if a field has been set. -func (o *CompileJobListOut) HasNextCursor() bool { - if o != nil && o.NextCursor.IsSet() { - return true - } - - return false -} - -// SetNextCursor gets a reference to the given NullableString and assigns it to the NextCursor field. -func (o *CompileJobListOut) SetNextCursor(v string) { - o.NextCursor.Set(&v) -} -// SetNextCursorNil sets the value for NextCursor to be an explicit nil -func (o *CompileJobListOut) SetNextCursorNil() { - o.NextCursor.Set(nil) -} - -// UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil -func (o *CompileJobListOut) UnsetNextCursor() { - o.NextCursor.Unset() -} - -func (o CompileJobListOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CompileJobListOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["items"] = o.Items - toSerialize["jobs"] = o.Jobs - if o.NextCursor.IsSet() { - toSerialize["next_cursor"] = o.NextCursor.Get() - } - return toSerialize, nil -} - -func (o *CompileJobListOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "items", - "jobs", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varCompileJobListOut := _CompileJobListOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCompileJobListOut) - - if err != nil { - return err - } - - *o = CompileJobListOut(varCompileJobListOut) - - return err -} - -type NullableCompileJobListOut struct { - value *CompileJobListOut - isSet bool -} - -func (v NullableCompileJobListOut) Get() *CompileJobListOut { - return v.value -} - -func (v *NullableCompileJobListOut) Set(val *CompileJobListOut) { - v.value = val - v.isSet = true -} - -func (v NullableCompileJobListOut) IsSet() bool { - return v.isSet -} - -func (v *NullableCompileJobListOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCompileJobListOut(val *CompileJobListOut) *NullableCompileJobListOut { - return &NullableCompileJobListOut{value: val, isSet: true} -} - -func (v NullableCompileJobListOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCompileJobListOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_compile_job_out.go b/sdk/go/model_compile_job_out.go deleted file mode 100644 index 0cca7af..0000000 --- a/sdk/go/model_compile_job_out.go +++ /dev/null @@ -1,451 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "fmt" -) - -// checks if the CompileJobOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CompileJobOut{} - -// CompileJobOut struct for CompileJobOut -type CompileJobOut struct { - CacheHit bool `json:"cache_hit"` - Diagnostics []CompileDiagnosticOut `json:"diagnostics,omitempty"` - DurationMs NullableInt32 `json:"duration_ms,omitempty"` - Engine string `json:"engine"` - JobId string `json:"job_id"` - LogsUrl NullableString `json:"logs_url,omitempty"` - Output map[string]interface{} `json:"output,omitempty"` - Status string `json:"status"` - Task string `json:"task"` - AdditionalProperties map[string]interface{} -} - -type _CompileJobOut CompileJobOut - -// NewCompileJobOut instantiates a new CompileJobOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCompileJobOut(cacheHit bool, engine string, jobId string, status string, task string) *CompileJobOut { - this := CompileJobOut{} - this.CacheHit = cacheHit - this.Engine = engine - this.JobId = jobId - this.Status = status - this.Task = task - return &this -} - -// NewCompileJobOutWithDefaults instantiates a new CompileJobOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCompileJobOutWithDefaults() *CompileJobOut { - this := CompileJobOut{} - return &this -} - -// GetCacheHit returns the CacheHit field value -func (o *CompileJobOut) GetCacheHit() bool { - if o == nil { - var ret bool - return ret - } - - return o.CacheHit -} - -// GetCacheHitOk returns a tuple with the CacheHit field value -// and a boolean to check if the value has been set. -func (o *CompileJobOut) GetCacheHitOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.CacheHit, true -} - -// SetCacheHit sets field value -func (o *CompileJobOut) SetCacheHit(v bool) { - o.CacheHit = v -} - -// GetDiagnostics returns the Diagnostics field value if set, zero value otherwise. -func (o *CompileJobOut) GetDiagnostics() []CompileDiagnosticOut { - if o == nil || IsNil(o.Diagnostics) { - var ret []CompileDiagnosticOut - return ret - } - return o.Diagnostics -} - -// GetDiagnosticsOk returns a tuple with the Diagnostics field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CompileJobOut) GetDiagnosticsOk() ([]CompileDiagnosticOut, bool) { - if o == nil || IsNil(o.Diagnostics) { - return nil, false - } - return o.Diagnostics, true -} - -// HasDiagnostics returns a boolean if a field has been set. -func (o *CompileJobOut) HasDiagnostics() bool { - if o != nil && !IsNil(o.Diagnostics) { - return true - } - - return false -} - -// SetDiagnostics gets a reference to the given []CompileDiagnosticOut and assigns it to the Diagnostics field. -func (o *CompileJobOut) SetDiagnostics(v []CompileDiagnosticOut) { - o.Diagnostics = v -} - -// GetDurationMs returns the DurationMs field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *CompileJobOut) GetDurationMs() int32 { - if o == nil || IsNil(o.DurationMs.Get()) { - var ret int32 - return ret - } - return *o.DurationMs.Get() -} - -// GetDurationMsOk returns a tuple with the DurationMs field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *CompileJobOut) GetDurationMsOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.DurationMs.Get(), o.DurationMs.IsSet() -} - -// HasDurationMs returns a boolean if a field has been set. -func (o *CompileJobOut) HasDurationMs() bool { - if o != nil && o.DurationMs.IsSet() { - return true - } - - return false -} - -// SetDurationMs gets a reference to the given NullableInt32 and assigns it to the DurationMs field. -func (o *CompileJobOut) SetDurationMs(v int32) { - o.DurationMs.Set(&v) -} -// SetDurationMsNil sets the value for DurationMs to be an explicit nil -func (o *CompileJobOut) SetDurationMsNil() { - o.DurationMs.Set(nil) -} - -// UnsetDurationMs ensures that no value is present for DurationMs, not even an explicit nil -func (o *CompileJobOut) UnsetDurationMs() { - o.DurationMs.Unset() -} - -// GetEngine returns the Engine field value -func (o *CompileJobOut) GetEngine() string { - if o == nil { - var ret string - return ret - } - - return o.Engine -} - -// GetEngineOk returns a tuple with the Engine field value -// and a boolean to check if the value has been set. -func (o *CompileJobOut) GetEngineOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Engine, true -} - -// SetEngine sets field value -func (o *CompileJobOut) SetEngine(v string) { - o.Engine = v -} - -// GetJobId returns the JobId field value -func (o *CompileJobOut) GetJobId() string { - if o == nil { - var ret string - return ret - } - - return o.JobId -} - -// GetJobIdOk returns a tuple with the JobId field value -// and a boolean to check if the value has been set. -func (o *CompileJobOut) GetJobIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.JobId, true -} - -// SetJobId sets field value -func (o *CompileJobOut) SetJobId(v string) { - o.JobId = v -} - -// GetLogsUrl returns the LogsUrl field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *CompileJobOut) GetLogsUrl() string { - if o == nil || IsNil(o.LogsUrl.Get()) { - var ret string - return ret - } - return *o.LogsUrl.Get() -} - -// GetLogsUrlOk returns a tuple with the LogsUrl field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *CompileJobOut) GetLogsUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.LogsUrl.Get(), o.LogsUrl.IsSet() -} - -// HasLogsUrl returns a boolean if a field has been set. -func (o *CompileJobOut) HasLogsUrl() bool { - if o != nil && o.LogsUrl.IsSet() { - return true - } - - return false -} - -// SetLogsUrl gets a reference to the given NullableString and assigns it to the LogsUrl field. -func (o *CompileJobOut) SetLogsUrl(v string) { - o.LogsUrl.Set(&v) -} -// SetLogsUrlNil sets the value for LogsUrl to be an explicit nil -func (o *CompileJobOut) SetLogsUrlNil() { - o.LogsUrl.Set(nil) -} - -// UnsetLogsUrl ensures that no value is present for LogsUrl, not even an explicit nil -func (o *CompileJobOut) UnsetLogsUrl() { - o.LogsUrl.Unset() -} - -// GetOutput returns the Output field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *CompileJobOut) GetOutput() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - return o.Output -} - -// GetOutputOk returns a tuple with the Output field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *CompileJobOut) GetOutputOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Output) { - return map[string]interface{}{}, false - } - return o.Output, true -} - -// HasOutput returns a boolean if a field has been set. -func (o *CompileJobOut) HasOutput() bool { - if o != nil && !IsNil(o.Output) { - return true - } - - return false -} - -// SetOutput gets a reference to the given map[string]interface{} and assigns it to the Output field. -func (o *CompileJobOut) SetOutput(v map[string]interface{}) { - o.Output = v -} - -// GetStatus returns the Status field value -func (o *CompileJobOut) GetStatus() string { - if o == nil { - var ret string - return ret - } - - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -func (o *CompileJobOut) GetStatusOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Status, true -} - -// SetStatus sets field value -func (o *CompileJobOut) SetStatus(v string) { - o.Status = v -} - -// GetTask returns the Task field value -func (o *CompileJobOut) GetTask() string { - if o == nil { - var ret string - return ret - } - - return o.Task -} - -// GetTaskOk returns a tuple with the Task field value -// and a boolean to check if the value has been set. -func (o *CompileJobOut) GetTaskOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Task, true -} - -// SetTask sets field value -func (o *CompileJobOut) SetTask(v string) { - o.Task = v -} - -func (o CompileJobOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CompileJobOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["cache_hit"] = o.CacheHit - if !IsNil(o.Diagnostics) { - toSerialize["diagnostics"] = o.Diagnostics - } - if o.DurationMs.IsSet() { - toSerialize["duration_ms"] = o.DurationMs.Get() - } - toSerialize["engine"] = o.Engine - toSerialize["job_id"] = o.JobId - if o.LogsUrl.IsSet() { - toSerialize["logs_url"] = o.LogsUrl.Get() - } - if o.Output != nil { - toSerialize["output"] = o.Output - } - toSerialize["status"] = o.Status - toSerialize["task"] = o.Task - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *CompileJobOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "cache_hit", - "engine", - "job_id", - "status", - "task", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varCompileJobOut := _CompileJobOut{} - - err = json.Unmarshal(data, &varCompileJobOut) - - if err != nil { - return err - } - - *o = CompileJobOut(varCompileJobOut) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "cache_hit") - delete(additionalProperties, "diagnostics") - delete(additionalProperties, "duration_ms") - delete(additionalProperties, "engine") - delete(additionalProperties, "job_id") - delete(additionalProperties, "logs_url") - delete(additionalProperties, "output") - delete(additionalProperties, "status") - delete(additionalProperties, "task") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableCompileJobOut struct { - value *CompileJobOut - isSet bool -} - -func (v NullableCompileJobOut) Get() *CompileJobOut { - return v.value -} - -func (v *NullableCompileJobOut) Set(val *CompileJobOut) { - v.value = val - v.isSet = true -} - -func (v NullableCompileJobOut) IsSet() bool { - return v.isSet -} - -func (v *NullableCompileJobOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCompileJobOut(val *CompileJobOut) *NullableCompileJobOut { - return &NullableCompileJobOut{value: val, isSet: true} -} - -func (v NullableCompileJobOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCompileJobOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_compile_options.go b/sdk/go/model_compile_options.go deleted file mode 100644 index 75c6612..0000000 --- a/sdk/go/model_compile_options.go +++ /dev/null @@ -1,220 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" -) - -// checks if the CompileOptions type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CompileOptions{} - -// CompileOptions struct for CompileOptions -type CompileOptions struct { - Engine NullableString `json:"engine,omitempty"` - Entrypoint NullableString `json:"entrypoint,omitempty"` - Wait *bool `json:"wait,omitempty"` -} - -// NewCompileOptions instantiates a new CompileOptions object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCompileOptions() *CompileOptions { - this := CompileOptions{} - var wait bool = false - this.Wait = &wait - return &this -} - -// NewCompileOptionsWithDefaults instantiates a new CompileOptions object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCompileOptionsWithDefaults() *CompileOptions { - this := CompileOptions{} - var wait bool = false - this.Wait = &wait - return &this -} - -// GetEngine returns the Engine field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *CompileOptions) GetEngine() string { - if o == nil || IsNil(o.Engine.Get()) { - var ret string - return ret - } - return *o.Engine.Get() -} - -// GetEngineOk returns a tuple with the Engine field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *CompileOptions) GetEngineOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Engine.Get(), o.Engine.IsSet() -} - -// HasEngine returns a boolean if a field has been set. -func (o *CompileOptions) HasEngine() bool { - if o != nil && o.Engine.IsSet() { - return true - } - - return false -} - -// SetEngine gets a reference to the given NullableString and assigns it to the Engine field. -func (o *CompileOptions) SetEngine(v string) { - o.Engine.Set(&v) -} -// SetEngineNil sets the value for Engine to be an explicit nil -func (o *CompileOptions) SetEngineNil() { - o.Engine.Set(nil) -} - -// UnsetEngine ensures that no value is present for Engine, not even an explicit nil -func (o *CompileOptions) UnsetEngine() { - o.Engine.Unset() -} - -// GetEntrypoint returns the Entrypoint field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *CompileOptions) GetEntrypoint() string { - if o == nil || IsNil(o.Entrypoint.Get()) { - var ret string - return ret - } - return *o.Entrypoint.Get() -} - -// GetEntrypointOk returns a tuple with the Entrypoint field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *CompileOptions) GetEntrypointOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Entrypoint.Get(), o.Entrypoint.IsSet() -} - -// HasEntrypoint returns a boolean if a field has been set. -func (o *CompileOptions) HasEntrypoint() bool { - if o != nil && o.Entrypoint.IsSet() { - return true - } - - return false -} - -// SetEntrypoint gets a reference to the given NullableString and assigns it to the Entrypoint field. -func (o *CompileOptions) SetEntrypoint(v string) { - o.Entrypoint.Set(&v) -} -// SetEntrypointNil sets the value for Entrypoint to be an explicit nil -func (o *CompileOptions) SetEntrypointNil() { - o.Entrypoint.Set(nil) -} - -// UnsetEntrypoint ensures that no value is present for Entrypoint, not even an explicit nil -func (o *CompileOptions) UnsetEntrypoint() { - o.Entrypoint.Unset() -} - -// GetWait returns the Wait field value if set, zero value otherwise. -func (o *CompileOptions) GetWait() bool { - if o == nil || IsNil(o.Wait) { - var ret bool - return ret - } - return *o.Wait -} - -// GetWaitOk returns a tuple with the Wait field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CompileOptions) GetWaitOk() (*bool, bool) { - if o == nil || IsNil(o.Wait) { - return nil, false - } - return o.Wait, true -} - -// HasWait returns a boolean if a field has been set. -func (o *CompileOptions) HasWait() bool { - if o != nil && !IsNil(o.Wait) { - return true - } - - return false -} - -// SetWait gets a reference to the given bool and assigns it to the Wait field. -func (o *CompileOptions) SetWait(v bool) { - o.Wait = &v -} - -func (o CompileOptions) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CompileOptions) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Engine.IsSet() { - toSerialize["engine"] = o.Engine.Get() - } - if o.Entrypoint.IsSet() { - toSerialize["entrypoint"] = o.Entrypoint.Get() - } - if !IsNil(o.Wait) { - toSerialize["wait"] = o.Wait - } - return toSerialize, nil -} - -type NullableCompileOptions struct { - value *CompileOptions - isSet bool -} - -func (v NullableCompileOptions) Get() *CompileOptions { - return v.value -} - -func (v *NullableCompileOptions) Set(val *CompileOptions) { - v.value = val - v.isSet = true -} - -func (v NullableCompileOptions) IsSet() bool { - return v.isSet -} - -func (v *NullableCompileOptions) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCompileOptions(val *CompileOptions) *NullableCompileOptions { - return &NullableCompileOptions{value: val, isSet: true} -} - -func (v NullableCompileOptions) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCompileOptions) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_compile_project_out.go b/sdk/go/model_compile_project_out.go deleted file mode 100644 index d0bbb3f..0000000 --- a/sdk/go/model_compile_project_out.go +++ /dev/null @@ -1,240 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the CompileProjectOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CompileProjectOut{} - -// CompileProjectOut struct for CompileProjectOut -type CompileProjectOut struct { - AutoCompile bool `json:"auto_compile"` - Engine string `json:"engine"` - Entrypoint string `json:"entrypoint"` - FldId string `json:"fld_id"` -} - -type _CompileProjectOut CompileProjectOut - -// NewCompileProjectOut instantiates a new CompileProjectOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCompileProjectOut(autoCompile bool, engine string, entrypoint string, fldId string) *CompileProjectOut { - this := CompileProjectOut{} - this.AutoCompile = autoCompile - this.Engine = engine - this.Entrypoint = entrypoint - this.FldId = fldId - return &this -} - -// NewCompileProjectOutWithDefaults instantiates a new CompileProjectOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCompileProjectOutWithDefaults() *CompileProjectOut { - this := CompileProjectOut{} - return &this -} - -// GetAutoCompile returns the AutoCompile field value -func (o *CompileProjectOut) GetAutoCompile() bool { - if o == nil { - var ret bool - return ret - } - - return o.AutoCompile -} - -// GetAutoCompileOk returns a tuple with the AutoCompile field value -// and a boolean to check if the value has been set. -func (o *CompileProjectOut) GetAutoCompileOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.AutoCompile, true -} - -// SetAutoCompile sets field value -func (o *CompileProjectOut) SetAutoCompile(v bool) { - o.AutoCompile = v -} - -// GetEngine returns the Engine field value -func (o *CompileProjectOut) GetEngine() string { - if o == nil { - var ret string - return ret - } - - return o.Engine -} - -// GetEngineOk returns a tuple with the Engine field value -// and a boolean to check if the value has been set. -func (o *CompileProjectOut) GetEngineOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Engine, true -} - -// SetEngine sets field value -func (o *CompileProjectOut) SetEngine(v string) { - o.Engine = v -} - -// GetEntrypoint returns the Entrypoint field value -func (o *CompileProjectOut) GetEntrypoint() string { - if o == nil { - var ret string - return ret - } - - return o.Entrypoint -} - -// GetEntrypointOk returns a tuple with the Entrypoint field value -// and a boolean to check if the value has been set. -func (o *CompileProjectOut) GetEntrypointOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Entrypoint, true -} - -// SetEntrypoint sets field value -func (o *CompileProjectOut) SetEntrypoint(v string) { - o.Entrypoint = v -} - -// GetFldId returns the FldId field value -func (o *CompileProjectOut) GetFldId() string { - if o == nil { - var ret string - return ret - } - - return o.FldId -} - -// GetFldIdOk returns a tuple with the FldId field value -// and a boolean to check if the value has been set. -func (o *CompileProjectOut) GetFldIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.FldId, true -} - -// SetFldId sets field value -func (o *CompileProjectOut) SetFldId(v string) { - o.FldId = v -} - -func (o CompileProjectOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CompileProjectOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["auto_compile"] = o.AutoCompile - toSerialize["engine"] = o.Engine - toSerialize["entrypoint"] = o.Entrypoint - toSerialize["fld_id"] = o.FldId - return toSerialize, nil -} - -func (o *CompileProjectOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "auto_compile", - "engine", - "entrypoint", - "fld_id", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varCompileProjectOut := _CompileProjectOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCompileProjectOut) - - if err != nil { - return err - } - - *o = CompileProjectOut(varCompileProjectOut) - - return err -} - -type NullableCompileProjectOut struct { - value *CompileProjectOut - isSet bool -} - -func (v NullableCompileProjectOut) Get() *CompileProjectOut { - return v.value -} - -func (v *NullableCompileProjectOut) Set(val *CompileProjectOut) { - v.value = val - v.isSet = true -} - -func (v NullableCompileProjectOut) IsSet() bool { - return v.isSet -} - -func (v *NullableCompileProjectOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCompileProjectOut(val *CompileProjectOut) *NullableCompileProjectOut { - return &NullableCompileProjectOut{value: val, isSet: true} -} - -func (v NullableCompileProjectOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCompileProjectOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_copy_in.go b/sdk/go/model_copy_in.go deleted file mode 100644 index e928652..0000000 --- a/sdk/go/model_copy_in.go +++ /dev/null @@ -1,248 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the CopyIn type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &CopyIn{} - -// CopyIn POST /v0/artifacts/{art_id}/copy body — duplicate to new path. -type CopyIn struct { - FromGeneration NullableInt32 `json:"from_generation,omitempty"` - Path string `json:"path"` - Source NullableArtifactSource `json:"source,omitempty"` -} - -type _CopyIn CopyIn - -// NewCopyIn instantiates a new CopyIn object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewCopyIn(path string) *CopyIn { - this := CopyIn{} - this.Path = path - return &this -} - -// NewCopyInWithDefaults instantiates a new CopyIn object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewCopyInWithDefaults() *CopyIn { - this := CopyIn{} - return &this -} - -// GetFromGeneration returns the FromGeneration field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *CopyIn) GetFromGeneration() int32 { - if o == nil || IsNil(o.FromGeneration.Get()) { - var ret int32 - return ret - } - return *o.FromGeneration.Get() -} - -// GetFromGenerationOk returns a tuple with the FromGeneration field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *CopyIn) GetFromGenerationOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.FromGeneration.Get(), o.FromGeneration.IsSet() -} - -// HasFromGeneration returns a boolean if a field has been set. -func (o *CopyIn) HasFromGeneration() bool { - if o != nil && o.FromGeneration.IsSet() { - return true - } - - return false -} - -// SetFromGeneration gets a reference to the given NullableInt32 and assigns it to the FromGeneration field. -func (o *CopyIn) SetFromGeneration(v int32) { - o.FromGeneration.Set(&v) -} -// SetFromGenerationNil sets the value for FromGeneration to be an explicit nil -func (o *CopyIn) SetFromGenerationNil() { - o.FromGeneration.Set(nil) -} - -// UnsetFromGeneration ensures that no value is present for FromGeneration, not even an explicit nil -func (o *CopyIn) UnsetFromGeneration() { - o.FromGeneration.Unset() -} - -// GetPath returns the Path field value -func (o *CopyIn) GetPath() string { - if o == nil { - var ret string - return ret - } - - return o.Path -} - -// GetPathOk returns a tuple with the Path field value -// and a boolean to check if the value has been set. -func (o *CopyIn) GetPathOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Path, true -} - -// SetPath sets field value -func (o *CopyIn) SetPath(v string) { - o.Path = v -} - -// GetSource returns the Source field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *CopyIn) GetSource() ArtifactSource { - if o == nil || IsNil(o.Source.Get()) { - var ret ArtifactSource - return ret - } - return *o.Source.Get() -} - -// GetSourceOk returns a tuple with the Source field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *CopyIn) GetSourceOk() (*ArtifactSource, bool) { - if o == nil { - return nil, false - } - return o.Source.Get(), o.Source.IsSet() -} - -// HasSource returns a boolean if a field has been set. -func (o *CopyIn) HasSource() bool { - if o != nil && o.Source.IsSet() { - return true - } - - return false -} - -// SetSource gets a reference to the given NullableArtifactSource and assigns it to the Source field. -func (o *CopyIn) SetSource(v ArtifactSource) { - o.Source.Set(&v) -} -// SetSourceNil sets the value for Source to be an explicit nil -func (o *CopyIn) SetSourceNil() { - o.Source.Set(nil) -} - -// UnsetSource ensures that no value is present for Source, not even an explicit nil -func (o *CopyIn) UnsetSource() { - o.Source.Unset() -} - -func (o CopyIn) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o CopyIn) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.FromGeneration.IsSet() { - toSerialize["from_generation"] = o.FromGeneration.Get() - } - toSerialize["path"] = o.Path - if o.Source.IsSet() { - toSerialize["source"] = o.Source.Get() - } - return toSerialize, nil -} - -func (o *CopyIn) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "path", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varCopyIn := _CopyIn{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varCopyIn) - - if err != nil { - return err - } - - *o = CopyIn(varCopyIn) - - return err -} - -type NullableCopyIn struct { - value *CopyIn - isSet bool -} - -func (v NullableCopyIn) Get() *CopyIn { - return v.value -} - -func (v *NullableCopyIn) Set(val *CopyIn) { - v.value = val - v.isSet = true -} - -func (v NullableCopyIn) IsSet() bool { - return v.isSet -} - -func (v *NullableCopyIn) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableCopyIn(val *CopyIn) *NullableCopyIn { - return &NullableCopyIn{value: val, isSet: true} -} - -func (v NullableCopyIn) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableCopyIn) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_dataset_description_out.go b/sdk/go/model_dataset_description_out.go deleted file mode 100644 index ca49b14..0000000 --- a/sdk/go/model_dataset_description_out.go +++ /dev/null @@ -1,184 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the DatasetDescriptionOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DatasetDescriptionOut{} - -// DatasetDescriptionOut struct for DatasetDescriptionOut -type DatasetDescriptionOut struct { - Columns []QueryColumnOut `json:"columns"` - Dataset string `json:"dataset"` -} - -type _DatasetDescriptionOut DatasetDescriptionOut - -// NewDatasetDescriptionOut instantiates a new DatasetDescriptionOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDatasetDescriptionOut(columns []QueryColumnOut, dataset string) *DatasetDescriptionOut { - this := DatasetDescriptionOut{} - this.Columns = columns - this.Dataset = dataset - return &this -} - -// NewDatasetDescriptionOutWithDefaults instantiates a new DatasetDescriptionOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDatasetDescriptionOutWithDefaults() *DatasetDescriptionOut { - this := DatasetDescriptionOut{} - return &this -} - -// GetColumns returns the Columns field value -func (o *DatasetDescriptionOut) GetColumns() []QueryColumnOut { - if o == nil { - var ret []QueryColumnOut - return ret - } - - return o.Columns -} - -// GetColumnsOk returns a tuple with the Columns field value -// and a boolean to check if the value has been set. -func (o *DatasetDescriptionOut) GetColumnsOk() ([]QueryColumnOut, bool) { - if o == nil { - return nil, false - } - return o.Columns, true -} - -// SetColumns sets field value -func (o *DatasetDescriptionOut) SetColumns(v []QueryColumnOut) { - o.Columns = v -} - -// GetDataset returns the Dataset field value -func (o *DatasetDescriptionOut) GetDataset() string { - if o == nil { - var ret string - return ret - } - - return o.Dataset -} - -// GetDatasetOk returns a tuple with the Dataset field value -// and a boolean to check if the value has been set. -func (o *DatasetDescriptionOut) GetDatasetOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Dataset, true -} - -// SetDataset sets field value -func (o *DatasetDescriptionOut) SetDataset(v string) { - o.Dataset = v -} - -func (o DatasetDescriptionOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DatasetDescriptionOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["columns"] = o.Columns - toSerialize["dataset"] = o.Dataset - return toSerialize, nil -} - -func (o *DatasetDescriptionOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "columns", - "dataset", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varDatasetDescriptionOut := _DatasetDescriptionOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDatasetDescriptionOut) - - if err != nil { - return err - } - - *o = DatasetDescriptionOut(varDatasetDescriptionOut) - - return err -} - -type NullableDatasetDescriptionOut struct { - value *DatasetDescriptionOut - isSet bool -} - -func (v NullableDatasetDescriptionOut) Get() *DatasetDescriptionOut { - return v.value -} - -func (v *NullableDatasetDescriptionOut) Set(val *DatasetDescriptionOut) { - v.value = val - v.isSet = true -} - -func (v NullableDatasetDescriptionOut) IsSet() bool { - return v.isSet -} - -func (v *NullableDatasetDescriptionOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDatasetDescriptionOut(val *DatasetDescriptionOut) *NullableDatasetDescriptionOut { - return &NullableDatasetDescriptionOut{value: val, isSet: true} -} - -func (v NullableDatasetDescriptionOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDatasetDescriptionOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_describe_in.go b/sdk/go/model_describe_in.go deleted file mode 100644 index 2add68c..0000000 --- a/sdk/go/model_describe_in.go +++ /dev/null @@ -1,156 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the DescribeIn type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DescribeIn{} - -// DescribeIn struct for DescribeIn -type DescribeIn struct { - Dataset string `json:"dataset"` -} - -type _DescribeIn DescribeIn - -// NewDescribeIn instantiates a new DescribeIn object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDescribeIn(dataset string) *DescribeIn { - this := DescribeIn{} - this.Dataset = dataset - return &this -} - -// NewDescribeInWithDefaults instantiates a new DescribeIn object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDescribeInWithDefaults() *DescribeIn { - this := DescribeIn{} - return &this -} - -// GetDataset returns the Dataset field value -func (o *DescribeIn) GetDataset() string { - if o == nil { - var ret string - return ret - } - - return o.Dataset -} - -// GetDatasetOk returns a tuple with the Dataset field value -// and a boolean to check if the value has been set. -func (o *DescribeIn) GetDatasetOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Dataset, true -} - -// SetDataset sets field value -func (o *DescribeIn) SetDataset(v string) { - o.Dataset = v -} - -func (o DescribeIn) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DescribeIn) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["dataset"] = o.Dataset - return toSerialize, nil -} - -func (o *DescribeIn) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "dataset", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varDescribeIn := _DescribeIn{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDescribeIn) - - if err != nil { - return err - } - - *o = DescribeIn(varDescribeIn) - - return err -} - -type NullableDescribeIn struct { - value *DescribeIn - isSet bool -} - -func (v NullableDescribeIn) Get() *DescribeIn { - return v.value -} - -func (v *NullableDescribeIn) Set(val *DescribeIn) { - v.value = val - v.isSet = true -} - -func (v NullableDescribeIn) IsSet() bool { - return v.isSet -} - -func (v *NullableDescribeIn) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDescribeIn(val *DescribeIn) *NullableDescribeIn { - return &NullableDescribeIn{value: val, isSet: true} -} - -func (v NullableDescribeIn) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDescribeIn) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_download_url_out.go b/sdk/go/model_download_url_out.go deleted file mode 100644 index e2fb17e..0000000 --- a/sdk/go/model_download_url_out.go +++ /dev/null @@ -1,315 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "time" - "bytes" - "fmt" -) - -// checks if the DownloadUrlOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DownloadUrlOut{} - -// DownloadUrlOut A URL the caller can GET to fetch the artifact's bytes. `direct=True` ⇒ a short-lived signed GCS URL on `storage.googleapis.com` (client downloads straight from GCS; `expires_at` is set). `direct=False` ⇒ the proxy `/download` endpoint on the API host (no expiry) — returned for sub-threshold artifacts or when signing is unavailable. The URL is opaque: callers should not parse it. See large-download-design.md §5.1. -type DownloadUrlOut struct { - ContentType string `json:"content_type"` - Direct bool `json:"direct"` - DownloadUrl string `json:"download_url"` - ExpiresAt NullableTime `json:"expires_at,omitempty"` - Filename string `json:"filename"` - SizeBytes int32 `json:"size_bytes"` -} - -type _DownloadUrlOut DownloadUrlOut - -// NewDownloadUrlOut instantiates a new DownloadUrlOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDownloadUrlOut(contentType string, direct bool, downloadUrl string, filename string, sizeBytes int32) *DownloadUrlOut { - this := DownloadUrlOut{} - this.ContentType = contentType - this.Direct = direct - this.DownloadUrl = downloadUrl - this.Filename = filename - this.SizeBytes = sizeBytes - return &this -} - -// NewDownloadUrlOutWithDefaults instantiates a new DownloadUrlOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDownloadUrlOutWithDefaults() *DownloadUrlOut { - this := DownloadUrlOut{} - return &this -} - -// GetContentType returns the ContentType field value -func (o *DownloadUrlOut) GetContentType() string { - if o == nil { - var ret string - return ret - } - - return o.ContentType -} - -// GetContentTypeOk returns a tuple with the ContentType field value -// and a boolean to check if the value has been set. -func (o *DownloadUrlOut) GetContentTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ContentType, true -} - -// SetContentType sets field value -func (o *DownloadUrlOut) SetContentType(v string) { - o.ContentType = v -} - -// GetDirect returns the Direct field value -func (o *DownloadUrlOut) GetDirect() bool { - if o == nil { - var ret bool - return ret - } - - return o.Direct -} - -// GetDirectOk returns a tuple with the Direct field value -// and a boolean to check if the value has been set. -func (o *DownloadUrlOut) GetDirectOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Direct, true -} - -// SetDirect sets field value -func (o *DownloadUrlOut) SetDirect(v bool) { - o.Direct = v -} - -// GetDownloadUrl returns the DownloadUrl field value -func (o *DownloadUrlOut) GetDownloadUrl() string { - if o == nil { - var ret string - return ret - } - - return o.DownloadUrl -} - -// GetDownloadUrlOk returns a tuple with the DownloadUrl field value -// and a boolean to check if the value has been set. -func (o *DownloadUrlOut) GetDownloadUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.DownloadUrl, true -} - -// SetDownloadUrl sets field value -func (o *DownloadUrlOut) SetDownloadUrl(v string) { - o.DownloadUrl = v -} - -// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *DownloadUrlOut) GetExpiresAt() time.Time { - if o == nil || IsNil(o.ExpiresAt.Get()) { - var ret time.Time - return ret - } - return *o.ExpiresAt.Get() -} - -// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DownloadUrlOut) GetExpiresAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.ExpiresAt.Get(), o.ExpiresAt.IsSet() -} - -// HasExpiresAt returns a boolean if a field has been set. -func (o *DownloadUrlOut) HasExpiresAt() bool { - if o != nil && o.ExpiresAt.IsSet() { - return true - } - - return false -} - -// SetExpiresAt gets a reference to the given NullableTime and assigns it to the ExpiresAt field. -func (o *DownloadUrlOut) SetExpiresAt(v time.Time) { - o.ExpiresAt.Set(&v) -} -// SetExpiresAtNil sets the value for ExpiresAt to be an explicit nil -func (o *DownloadUrlOut) SetExpiresAtNil() { - o.ExpiresAt.Set(nil) -} - -// UnsetExpiresAt ensures that no value is present for ExpiresAt, not even an explicit nil -func (o *DownloadUrlOut) UnsetExpiresAt() { - o.ExpiresAt.Unset() -} - -// GetFilename returns the Filename field value -func (o *DownloadUrlOut) GetFilename() string { - if o == nil { - var ret string - return ret - } - - return o.Filename -} - -// GetFilenameOk returns a tuple with the Filename field value -// and a boolean to check if the value has been set. -func (o *DownloadUrlOut) GetFilenameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Filename, true -} - -// SetFilename sets field value -func (o *DownloadUrlOut) SetFilename(v string) { - o.Filename = v -} - -// GetSizeBytes returns the SizeBytes field value -func (o *DownloadUrlOut) GetSizeBytes() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.SizeBytes -} - -// GetSizeBytesOk returns a tuple with the SizeBytes field value -// and a boolean to check if the value has been set. -func (o *DownloadUrlOut) GetSizeBytesOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.SizeBytes, true -} - -// SetSizeBytes sets field value -func (o *DownloadUrlOut) SetSizeBytes(v int32) { - o.SizeBytes = v -} - -func (o DownloadUrlOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DownloadUrlOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["content_type"] = o.ContentType - toSerialize["direct"] = o.Direct - toSerialize["download_url"] = o.DownloadUrl - if o.ExpiresAt.IsSet() { - toSerialize["expires_at"] = o.ExpiresAt.Get() - } - toSerialize["filename"] = o.Filename - toSerialize["size_bytes"] = o.SizeBytes - return toSerialize, nil -} - -func (o *DownloadUrlOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "content_type", - "direct", - "download_url", - "filename", - "size_bytes", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varDownloadUrlOut := _DownloadUrlOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDownloadUrlOut) - - if err != nil { - return err - } - - *o = DownloadUrlOut(varDownloadUrlOut) - - return err -} - -type NullableDownloadUrlOut struct { - value *DownloadUrlOut - isSet bool -} - -func (v NullableDownloadUrlOut) Get() *DownloadUrlOut { - return v.value -} - -func (v *NullableDownloadUrlOut) Set(val *DownloadUrlOut) { - v.value = val - v.isSet = true -} - -func (v NullableDownloadUrlOut) IsSet() bool { - return v.isSet -} - -func (v *NullableDownloadUrlOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDownloadUrlOut(val *DownloadUrlOut) *NullableDownloadUrlOut { - return &NullableDownloadUrlOut{value: val, isSet: true} -} - -func (v NullableDownloadUrlOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDownloadUrlOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_drive_api_key_create_in.go b/sdk/go/model_drive_api_key_create_in.go deleted file mode 100644 index 24f4648..0000000 --- a/sdk/go/model_drive_api_key_create_in.go +++ /dev/null @@ -1,156 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the DriveApiKeyCreateIn type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DriveApiKeyCreateIn{} - -// DriveApiKeyCreateIn `POST /v0/drives/{id}/keys` body — a required human label (a name for the key, e.g. the agent/integration it's for). -type DriveApiKeyCreateIn struct { - Label string `json:"label"` -} - -type _DriveApiKeyCreateIn DriveApiKeyCreateIn - -// NewDriveApiKeyCreateIn instantiates a new DriveApiKeyCreateIn object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDriveApiKeyCreateIn(label string) *DriveApiKeyCreateIn { - this := DriveApiKeyCreateIn{} - this.Label = label - return &this -} - -// NewDriveApiKeyCreateInWithDefaults instantiates a new DriveApiKeyCreateIn object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDriveApiKeyCreateInWithDefaults() *DriveApiKeyCreateIn { - this := DriveApiKeyCreateIn{} - return &this -} - -// GetLabel returns the Label field value -func (o *DriveApiKeyCreateIn) GetLabel() string { - if o == nil { - var ret string - return ret - } - - return o.Label -} - -// GetLabelOk returns a tuple with the Label field value -// and a boolean to check if the value has been set. -func (o *DriveApiKeyCreateIn) GetLabelOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Label, true -} - -// SetLabel sets field value -func (o *DriveApiKeyCreateIn) SetLabel(v string) { - o.Label = v -} - -func (o DriveApiKeyCreateIn) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DriveApiKeyCreateIn) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["label"] = o.Label - return toSerialize, nil -} - -func (o *DriveApiKeyCreateIn) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "label", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varDriveApiKeyCreateIn := _DriveApiKeyCreateIn{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDriveApiKeyCreateIn) - - if err != nil { - return err - } - - *o = DriveApiKeyCreateIn(varDriveApiKeyCreateIn) - - return err -} - -type NullableDriveApiKeyCreateIn struct { - value *DriveApiKeyCreateIn - isSet bool -} - -func (v NullableDriveApiKeyCreateIn) Get() *DriveApiKeyCreateIn { - return v.value -} - -func (v *NullableDriveApiKeyCreateIn) Set(val *DriveApiKeyCreateIn) { - v.value = val - v.isSet = true -} - -func (v NullableDriveApiKeyCreateIn) IsSet() bool { - return v.isSet -} - -func (v *NullableDriveApiKeyCreateIn) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDriveApiKeyCreateIn(val *DriveApiKeyCreateIn) *NullableDriveApiKeyCreateIn { - return &NullableDriveApiKeyCreateIn{value: val, isSet: true} -} - -func (v NullableDriveApiKeyCreateIn) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDriveApiKeyCreateIn) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_drive_api_key_create_out.go b/sdk/go/model_drive_api_key_create_out.go deleted file mode 100644 index 7e11165..0000000 --- a/sdk/go/model_drive_api_key_create_out.go +++ /dev/null @@ -1,287 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "time" - "bytes" - "fmt" -) - -// checks if the DriveApiKeyCreateOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DriveApiKeyCreateOut{} - -// DriveApiKeyCreateOut `POST /v0/drives/{id}/keys` response — the new key's metadata PLUS the raw `ad_live_` value, returned **once**. Store `api_key` now; only its hash is persisted. -type DriveApiKeyCreateOut struct { - ApiKey string `json:"api_key"` - CreatedAt time.Time `json:"created_at"` - Id string `json:"id"` - Label NullableString `json:"label,omitempty"` - Prefix string `json:"prefix"` -} - -type _DriveApiKeyCreateOut DriveApiKeyCreateOut - -// NewDriveApiKeyCreateOut instantiates a new DriveApiKeyCreateOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDriveApiKeyCreateOut(apiKey string, createdAt time.Time, id string, prefix string) *DriveApiKeyCreateOut { - this := DriveApiKeyCreateOut{} - this.ApiKey = apiKey - this.CreatedAt = createdAt - this.Id = id - this.Prefix = prefix - return &this -} - -// NewDriveApiKeyCreateOutWithDefaults instantiates a new DriveApiKeyCreateOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDriveApiKeyCreateOutWithDefaults() *DriveApiKeyCreateOut { - this := DriveApiKeyCreateOut{} - return &this -} - -// GetApiKey returns the ApiKey field value -func (o *DriveApiKeyCreateOut) GetApiKey() string { - if o == nil { - var ret string - return ret - } - - return o.ApiKey -} - -// GetApiKeyOk returns a tuple with the ApiKey field value -// and a boolean to check if the value has been set. -func (o *DriveApiKeyCreateOut) GetApiKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ApiKey, true -} - -// SetApiKey sets field value -func (o *DriveApiKeyCreateOut) SetApiKey(v string) { - o.ApiKey = v -} - -// GetCreatedAt returns the CreatedAt field value -func (o *DriveApiKeyCreateOut) GetCreatedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value -// and a boolean to check if the value has been set. -func (o *DriveApiKeyCreateOut) GetCreatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.CreatedAt, true -} - -// SetCreatedAt sets field value -func (o *DriveApiKeyCreateOut) SetCreatedAt(v time.Time) { - o.CreatedAt = v -} - -// GetId returns the Id field value -func (o *DriveApiKeyCreateOut) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *DriveApiKeyCreateOut) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *DriveApiKeyCreateOut) SetId(v string) { - o.Id = v -} - -// GetLabel returns the Label field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *DriveApiKeyCreateOut) GetLabel() string { - if o == nil || IsNil(o.Label.Get()) { - var ret string - return ret - } - return *o.Label.Get() -} - -// GetLabelOk returns a tuple with the Label field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DriveApiKeyCreateOut) GetLabelOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Label.Get(), o.Label.IsSet() -} - -// HasLabel returns a boolean if a field has been set. -func (o *DriveApiKeyCreateOut) HasLabel() bool { - if o != nil && o.Label.IsSet() { - return true - } - - return false -} - -// SetLabel gets a reference to the given NullableString and assigns it to the Label field. -func (o *DriveApiKeyCreateOut) SetLabel(v string) { - o.Label.Set(&v) -} -// SetLabelNil sets the value for Label to be an explicit nil -func (o *DriveApiKeyCreateOut) SetLabelNil() { - o.Label.Set(nil) -} - -// UnsetLabel ensures that no value is present for Label, not even an explicit nil -func (o *DriveApiKeyCreateOut) UnsetLabel() { - o.Label.Unset() -} - -// GetPrefix returns the Prefix field value -func (o *DriveApiKeyCreateOut) GetPrefix() string { - if o == nil { - var ret string - return ret - } - - return o.Prefix -} - -// GetPrefixOk returns a tuple with the Prefix field value -// and a boolean to check if the value has been set. -func (o *DriveApiKeyCreateOut) GetPrefixOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Prefix, true -} - -// SetPrefix sets field value -func (o *DriveApiKeyCreateOut) SetPrefix(v string) { - o.Prefix = v -} - -func (o DriveApiKeyCreateOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DriveApiKeyCreateOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["api_key"] = o.ApiKey - toSerialize["created_at"] = o.CreatedAt - toSerialize["id"] = o.Id - if o.Label.IsSet() { - toSerialize["label"] = o.Label.Get() - } - toSerialize["prefix"] = o.Prefix - return toSerialize, nil -} - -func (o *DriveApiKeyCreateOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "api_key", - "created_at", - "id", - "prefix", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varDriveApiKeyCreateOut := _DriveApiKeyCreateOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDriveApiKeyCreateOut) - - if err != nil { - return err - } - - *o = DriveApiKeyCreateOut(varDriveApiKeyCreateOut) - - return err -} - -type NullableDriveApiKeyCreateOut struct { - value *DriveApiKeyCreateOut - isSet bool -} - -func (v NullableDriveApiKeyCreateOut) Get() *DriveApiKeyCreateOut { - return v.value -} - -func (v *NullableDriveApiKeyCreateOut) Set(val *DriveApiKeyCreateOut) { - v.value = val - v.isSet = true -} - -func (v NullableDriveApiKeyCreateOut) IsSet() bool { - return v.isSet -} - -func (v *NullableDriveApiKeyCreateOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDriveApiKeyCreateOut(val *DriveApiKeyCreateOut) *NullableDriveApiKeyCreateOut { - return &NullableDriveApiKeyCreateOut{value: val, isSet: true} -} - -func (v NullableDriveApiKeyCreateOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDriveApiKeyCreateOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_drive_api_key_list_out.go b/sdk/go/model_drive_api_key_list_out.go deleted file mode 100644 index fa702e7..0000000 --- a/sdk/go/model_drive_api_key_list_out.go +++ /dev/null @@ -1,230 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the DriveApiKeyListOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DriveApiKeyListOut{} - -// DriveApiKeyListOut `GET /v0/drives/{id}/keys` response — the drive's keys, oldest first (keyset order, design §3), including recently-revoked rows (filter on `revoked_at` for live only). `items` is the canonical list field (B-3: one envelope key everywhere); `keys` is a deprecated same-value alias kept for one release — the REST twin of the grep `matches` / compile `jobs` aliases. -type DriveApiKeyListOut struct { - Items []DriveApiKeyOut `json:"items"` - Keys []DriveApiKeyOut `json:"keys"` - NextCursor NullableString `json:"next_cursor,omitempty"` -} - -type _DriveApiKeyListOut DriveApiKeyListOut - -// NewDriveApiKeyListOut instantiates a new DriveApiKeyListOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDriveApiKeyListOut(items []DriveApiKeyOut, keys []DriveApiKeyOut) *DriveApiKeyListOut { - this := DriveApiKeyListOut{} - this.Items = items - this.Keys = keys - return &this -} - -// NewDriveApiKeyListOutWithDefaults instantiates a new DriveApiKeyListOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDriveApiKeyListOutWithDefaults() *DriveApiKeyListOut { - this := DriveApiKeyListOut{} - return &this -} - -// GetItems returns the Items field value -func (o *DriveApiKeyListOut) GetItems() []DriveApiKeyOut { - if o == nil { - var ret []DriveApiKeyOut - return ret - } - - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value -// and a boolean to check if the value has been set. -func (o *DriveApiKeyListOut) GetItemsOk() ([]DriveApiKeyOut, bool) { - if o == nil { - return nil, false - } - return o.Items, true -} - -// SetItems sets field value -func (o *DriveApiKeyListOut) SetItems(v []DriveApiKeyOut) { - o.Items = v -} - -// GetKeys returns the Keys field value -func (o *DriveApiKeyListOut) GetKeys() []DriveApiKeyOut { - if o == nil { - var ret []DriveApiKeyOut - return ret - } - - return o.Keys -} - -// GetKeysOk returns a tuple with the Keys field value -// and a boolean to check if the value has been set. -func (o *DriveApiKeyListOut) GetKeysOk() ([]DriveApiKeyOut, bool) { - if o == nil { - return nil, false - } - return o.Keys, true -} - -// SetKeys sets field value -func (o *DriveApiKeyListOut) SetKeys(v []DriveApiKeyOut) { - o.Keys = v -} - -// GetNextCursor returns the NextCursor field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *DriveApiKeyListOut) GetNextCursor() string { - if o == nil || IsNil(o.NextCursor.Get()) { - var ret string - return ret - } - return *o.NextCursor.Get() -} - -// GetNextCursorOk returns a tuple with the NextCursor field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DriveApiKeyListOut) GetNextCursorOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.NextCursor.Get(), o.NextCursor.IsSet() -} - -// HasNextCursor returns a boolean if a field has been set. -func (o *DriveApiKeyListOut) HasNextCursor() bool { - if o != nil && o.NextCursor.IsSet() { - return true - } - - return false -} - -// SetNextCursor gets a reference to the given NullableString and assigns it to the NextCursor field. -func (o *DriveApiKeyListOut) SetNextCursor(v string) { - o.NextCursor.Set(&v) -} -// SetNextCursorNil sets the value for NextCursor to be an explicit nil -func (o *DriveApiKeyListOut) SetNextCursorNil() { - o.NextCursor.Set(nil) -} - -// UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil -func (o *DriveApiKeyListOut) UnsetNextCursor() { - o.NextCursor.Unset() -} - -func (o DriveApiKeyListOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DriveApiKeyListOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["items"] = o.Items - toSerialize["keys"] = o.Keys - if o.NextCursor.IsSet() { - toSerialize["next_cursor"] = o.NextCursor.Get() - } - return toSerialize, nil -} - -func (o *DriveApiKeyListOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "items", - "keys", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varDriveApiKeyListOut := _DriveApiKeyListOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDriveApiKeyListOut) - - if err != nil { - return err - } - - *o = DriveApiKeyListOut(varDriveApiKeyListOut) - - return err -} - -type NullableDriveApiKeyListOut struct { - value *DriveApiKeyListOut - isSet bool -} - -func (v NullableDriveApiKeyListOut) Get() *DriveApiKeyListOut { - return v.value -} - -func (v *NullableDriveApiKeyListOut) Set(val *DriveApiKeyListOut) { - v.value = val - v.isSet = true -} - -func (v NullableDriveApiKeyListOut) IsSet() bool { - return v.isSet -} - -func (v *NullableDriveApiKeyListOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDriveApiKeyListOut(val *DriveApiKeyListOut) *NullableDriveApiKeyListOut { - return &NullableDriveApiKeyListOut{value: val, isSet: true} -} - -func (v NullableDriveApiKeyListOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDriveApiKeyListOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_drive_api_key_out.go b/sdk/go/model_drive_api_key_out.go deleted file mode 100644 index c6f2a43..0000000 --- a/sdk/go/model_drive_api_key_out.go +++ /dev/null @@ -1,351 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "time" - "bytes" - "fmt" -) - -// checks if the DriveApiKeyOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DriveApiKeyOut{} - -// DriveApiKeyOut One per-drive `ad_live_` key — metadata only (never the raw key or hash). Item shape for `GET /v0/drives/{id}/keys`. -type DriveApiKeyOut struct { - CreatedAt time.Time `json:"created_at"` - Id string `json:"id"` - Label NullableString `json:"label,omitempty"` - LastUsedAt NullableTime `json:"last_used_at,omitempty"` - Prefix string `json:"prefix"` - RevokedAt NullableTime `json:"revoked_at,omitempty"` -} - -type _DriveApiKeyOut DriveApiKeyOut - -// NewDriveApiKeyOut instantiates a new DriveApiKeyOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDriveApiKeyOut(createdAt time.Time, id string, prefix string) *DriveApiKeyOut { - this := DriveApiKeyOut{} - this.CreatedAt = createdAt - this.Id = id - this.Prefix = prefix - return &this -} - -// NewDriveApiKeyOutWithDefaults instantiates a new DriveApiKeyOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDriveApiKeyOutWithDefaults() *DriveApiKeyOut { - this := DriveApiKeyOut{} - return &this -} - -// GetCreatedAt returns the CreatedAt field value -func (o *DriveApiKeyOut) GetCreatedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value -// and a boolean to check if the value has been set. -func (o *DriveApiKeyOut) GetCreatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.CreatedAt, true -} - -// SetCreatedAt sets field value -func (o *DriveApiKeyOut) SetCreatedAt(v time.Time) { - o.CreatedAt = v -} - -// GetId returns the Id field value -func (o *DriveApiKeyOut) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *DriveApiKeyOut) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *DriveApiKeyOut) SetId(v string) { - o.Id = v -} - -// GetLabel returns the Label field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *DriveApiKeyOut) GetLabel() string { - if o == nil || IsNil(o.Label.Get()) { - var ret string - return ret - } - return *o.Label.Get() -} - -// GetLabelOk returns a tuple with the Label field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DriveApiKeyOut) GetLabelOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Label.Get(), o.Label.IsSet() -} - -// HasLabel returns a boolean if a field has been set. -func (o *DriveApiKeyOut) HasLabel() bool { - if o != nil && o.Label.IsSet() { - return true - } - - return false -} - -// SetLabel gets a reference to the given NullableString and assigns it to the Label field. -func (o *DriveApiKeyOut) SetLabel(v string) { - o.Label.Set(&v) -} -// SetLabelNil sets the value for Label to be an explicit nil -func (o *DriveApiKeyOut) SetLabelNil() { - o.Label.Set(nil) -} - -// UnsetLabel ensures that no value is present for Label, not even an explicit nil -func (o *DriveApiKeyOut) UnsetLabel() { - o.Label.Unset() -} - -// GetLastUsedAt returns the LastUsedAt field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *DriveApiKeyOut) GetLastUsedAt() time.Time { - if o == nil || IsNil(o.LastUsedAt.Get()) { - var ret time.Time - return ret - } - return *o.LastUsedAt.Get() -} - -// GetLastUsedAtOk returns a tuple with the LastUsedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DriveApiKeyOut) GetLastUsedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.LastUsedAt.Get(), o.LastUsedAt.IsSet() -} - -// HasLastUsedAt returns a boolean if a field has been set. -func (o *DriveApiKeyOut) HasLastUsedAt() bool { - if o != nil && o.LastUsedAt.IsSet() { - return true - } - - return false -} - -// SetLastUsedAt gets a reference to the given NullableTime and assigns it to the LastUsedAt field. -func (o *DriveApiKeyOut) SetLastUsedAt(v time.Time) { - o.LastUsedAt.Set(&v) -} -// SetLastUsedAtNil sets the value for LastUsedAt to be an explicit nil -func (o *DriveApiKeyOut) SetLastUsedAtNil() { - o.LastUsedAt.Set(nil) -} - -// UnsetLastUsedAt ensures that no value is present for LastUsedAt, not even an explicit nil -func (o *DriveApiKeyOut) UnsetLastUsedAt() { - o.LastUsedAt.Unset() -} - -// GetPrefix returns the Prefix field value -func (o *DriveApiKeyOut) GetPrefix() string { - if o == nil { - var ret string - return ret - } - - return o.Prefix -} - -// GetPrefixOk returns a tuple with the Prefix field value -// and a boolean to check if the value has been set. -func (o *DriveApiKeyOut) GetPrefixOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Prefix, true -} - -// SetPrefix sets field value -func (o *DriveApiKeyOut) SetPrefix(v string) { - o.Prefix = v -} - -// GetRevokedAt returns the RevokedAt field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *DriveApiKeyOut) GetRevokedAt() time.Time { - if o == nil || IsNil(o.RevokedAt.Get()) { - var ret time.Time - return ret - } - return *o.RevokedAt.Get() -} - -// GetRevokedAtOk returns a tuple with the RevokedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DriveApiKeyOut) GetRevokedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.RevokedAt.Get(), o.RevokedAt.IsSet() -} - -// HasRevokedAt returns a boolean if a field has been set. -func (o *DriveApiKeyOut) HasRevokedAt() bool { - if o != nil && o.RevokedAt.IsSet() { - return true - } - - return false -} - -// SetRevokedAt gets a reference to the given NullableTime and assigns it to the RevokedAt field. -func (o *DriveApiKeyOut) SetRevokedAt(v time.Time) { - o.RevokedAt.Set(&v) -} -// SetRevokedAtNil sets the value for RevokedAt to be an explicit nil -func (o *DriveApiKeyOut) SetRevokedAtNil() { - o.RevokedAt.Set(nil) -} - -// UnsetRevokedAt ensures that no value is present for RevokedAt, not even an explicit nil -func (o *DriveApiKeyOut) UnsetRevokedAt() { - o.RevokedAt.Unset() -} - -func (o DriveApiKeyOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DriveApiKeyOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["created_at"] = o.CreatedAt - toSerialize["id"] = o.Id - if o.Label.IsSet() { - toSerialize["label"] = o.Label.Get() - } - if o.LastUsedAt.IsSet() { - toSerialize["last_used_at"] = o.LastUsedAt.Get() - } - toSerialize["prefix"] = o.Prefix - if o.RevokedAt.IsSet() { - toSerialize["revoked_at"] = o.RevokedAt.Get() - } - return toSerialize, nil -} - -func (o *DriveApiKeyOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "created_at", - "id", - "prefix", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varDriveApiKeyOut := _DriveApiKeyOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDriveApiKeyOut) - - if err != nil { - return err - } - - *o = DriveApiKeyOut(varDriveApiKeyOut) - - return err -} - -type NullableDriveApiKeyOut struct { - value *DriveApiKeyOut - isSet bool -} - -func (v NullableDriveApiKeyOut) Get() *DriveApiKeyOut { - return v.value -} - -func (v *NullableDriveApiKeyOut) Set(val *DriveApiKeyOut) { - v.value = val - v.isSet = true -} - -func (v NullableDriveApiKeyOut) IsSet() bool { - return v.isSet -} - -func (v *NullableDriveApiKeyOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDriveApiKeyOut(val *DriveApiKeyOut) *NullableDriveApiKeyOut { - return &NullableDriveApiKeyOut{value: val, isSet: true} -} - -func (v NullableDriveApiKeyOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDriveApiKeyOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_drive_create_in.go b/sdk/go/model_drive_create_in.go index ee13d8e..35b1950 100644 --- a/sdk/go/model_drive_create_in.go +++ b/sdk/go/model_drive_create_in.go @@ -1,7 +1,7 @@ /* AgentDrive -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. API version: */ @@ -12,16 +12,17 @@ package agentdrive import ( "encoding/json" - "bytes" "fmt" ) // checks if the DriveCreateIn type satisfies the MappedNullable interface at compile time var _ MappedNullable = &DriveCreateIn{} -// DriveCreateIn POST /v0/drives body. `name` is the user-facing drive label; the creator becomes the owner. +// DriveCreateIn POST /v0/drives body. type DriveCreateIn struct { + Metadata map[string]interface{} `json:"metadata,omitempty"` Name string `json:"name"` + AdditionalProperties map[string]interface{} } type _DriveCreateIn DriveCreateIn @@ -44,6 +45,38 @@ func NewDriveCreateInWithDefaults() *DriveCreateIn { return &this } +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *DriveCreateIn) GetMetadata() map[string]interface{} { + if o == nil || IsNil(o.Metadata) { + var ret map[string]interface{} + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DriveCreateIn) GetMetadataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Metadata) { + return map[string]interface{}{}, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *DriveCreateIn) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. +func (o *DriveCreateIn) SetMetadata(v map[string]interface{}) { + o.Metadata = v +} + // GetName returns the Name field value func (o *DriveCreateIn) GetName() string { if o == nil { @@ -78,7 +111,15 @@ func (o DriveCreateIn) MarshalJSON() ([]byte, error) { func (o DriveCreateIn) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } toSerialize["name"] = o.Name + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return toSerialize, nil } @@ -106,9 +147,7 @@ func (o *DriveCreateIn) UnmarshalJSON(data []byte) (err error) { varDriveCreateIn := _DriveCreateIn{} - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDriveCreateIn) + err = json.Unmarshal(data, &varDriveCreateIn) if err != nil { return err @@ -116,6 +155,14 @@ func (o *DriveCreateIn) UnmarshalJSON(data []byte) (err error) { *o = DriveCreateIn(varDriveCreateIn) + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "metadata") + delete(additionalProperties, "name") + o.AdditionalProperties = additionalProperties + } + return err } diff --git a/sdk/go/model_drive_create_out.go b/sdk/go/model_drive_create_out.go deleted file mode 100644 index 6d1e73f..0000000 --- a/sdk/go/model_drive_create_out.go +++ /dev/null @@ -1,389 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "time" - "bytes" - "fmt" -) - -// checks if the DriveCreateOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DriveCreateOut{} - -// DriveCreateOut The create response — the ONLY place (besides key-rotate) a raw `ad_live_` key is returned, reveal-once. -type DriveCreateOut struct { - ApiKey string `json:"api_key"` - CreatedAt time.Time `json:"created_at"` - Id string `json:"id"` - Name string `json:"name"` - OrganizationId string `json:"organization_id"` - OwnerEmail NullableString `json:"owner_email,omitempty"` - OwnerUserId NullableString `json:"owner_user_id,omitempty"` - StorageBytes int32 `json:"storage_bytes"` -} - -type _DriveCreateOut DriveCreateOut - -// NewDriveCreateOut instantiates a new DriveCreateOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDriveCreateOut(apiKey string, createdAt time.Time, id string, name string, organizationId string, storageBytes int32) *DriveCreateOut { - this := DriveCreateOut{} - this.ApiKey = apiKey - this.CreatedAt = createdAt - this.Id = id - this.Name = name - this.OrganizationId = organizationId - this.StorageBytes = storageBytes - return &this -} - -// NewDriveCreateOutWithDefaults instantiates a new DriveCreateOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDriveCreateOutWithDefaults() *DriveCreateOut { - this := DriveCreateOut{} - return &this -} - -// GetApiKey returns the ApiKey field value -func (o *DriveCreateOut) GetApiKey() string { - if o == nil { - var ret string - return ret - } - - return o.ApiKey -} - -// GetApiKeyOk returns a tuple with the ApiKey field value -// and a boolean to check if the value has been set. -func (o *DriveCreateOut) GetApiKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ApiKey, true -} - -// SetApiKey sets field value -func (o *DriveCreateOut) SetApiKey(v string) { - o.ApiKey = v -} - -// GetCreatedAt returns the CreatedAt field value -func (o *DriveCreateOut) GetCreatedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value -// and a boolean to check if the value has been set. -func (o *DriveCreateOut) GetCreatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.CreatedAt, true -} - -// SetCreatedAt sets field value -func (o *DriveCreateOut) SetCreatedAt(v time.Time) { - o.CreatedAt = v -} - -// GetId returns the Id field value -func (o *DriveCreateOut) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *DriveCreateOut) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *DriveCreateOut) SetId(v string) { - o.Id = v -} - -// GetName returns the Name field value -func (o *DriveCreateOut) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *DriveCreateOut) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *DriveCreateOut) SetName(v string) { - o.Name = v -} - -// GetOrganizationId returns the OrganizationId field value -func (o *DriveCreateOut) GetOrganizationId() string { - if o == nil { - var ret string - return ret - } - - return o.OrganizationId -} - -// GetOrganizationIdOk returns a tuple with the OrganizationId field value -// and a boolean to check if the value has been set. -func (o *DriveCreateOut) GetOrganizationIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.OrganizationId, true -} - -// SetOrganizationId sets field value -func (o *DriveCreateOut) SetOrganizationId(v string) { - o.OrganizationId = v -} - -// GetOwnerEmail returns the OwnerEmail field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *DriveCreateOut) GetOwnerEmail() string { - if o == nil || IsNil(o.OwnerEmail.Get()) { - var ret string - return ret - } - return *o.OwnerEmail.Get() -} - -// GetOwnerEmailOk returns a tuple with the OwnerEmail field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DriveCreateOut) GetOwnerEmailOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.OwnerEmail.Get(), o.OwnerEmail.IsSet() -} - -// HasOwnerEmail returns a boolean if a field has been set. -func (o *DriveCreateOut) HasOwnerEmail() bool { - if o != nil && o.OwnerEmail.IsSet() { - return true - } - - return false -} - -// SetOwnerEmail gets a reference to the given NullableString and assigns it to the OwnerEmail field. -func (o *DriveCreateOut) SetOwnerEmail(v string) { - o.OwnerEmail.Set(&v) -} -// SetOwnerEmailNil sets the value for OwnerEmail to be an explicit nil -func (o *DriveCreateOut) SetOwnerEmailNil() { - o.OwnerEmail.Set(nil) -} - -// UnsetOwnerEmail ensures that no value is present for OwnerEmail, not even an explicit nil -func (o *DriveCreateOut) UnsetOwnerEmail() { - o.OwnerEmail.Unset() -} - -// GetOwnerUserId returns the OwnerUserId field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *DriveCreateOut) GetOwnerUserId() string { - if o == nil || IsNil(o.OwnerUserId.Get()) { - var ret string - return ret - } - return *o.OwnerUserId.Get() -} - -// GetOwnerUserIdOk returns a tuple with the OwnerUserId field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DriveCreateOut) GetOwnerUserIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.OwnerUserId.Get(), o.OwnerUserId.IsSet() -} - -// HasOwnerUserId returns a boolean if a field has been set. -func (o *DriveCreateOut) HasOwnerUserId() bool { - if o != nil && o.OwnerUserId.IsSet() { - return true - } - - return false -} - -// SetOwnerUserId gets a reference to the given NullableString and assigns it to the OwnerUserId field. -func (o *DriveCreateOut) SetOwnerUserId(v string) { - o.OwnerUserId.Set(&v) -} -// SetOwnerUserIdNil sets the value for OwnerUserId to be an explicit nil -func (o *DriveCreateOut) SetOwnerUserIdNil() { - o.OwnerUserId.Set(nil) -} - -// UnsetOwnerUserId ensures that no value is present for OwnerUserId, not even an explicit nil -func (o *DriveCreateOut) UnsetOwnerUserId() { - o.OwnerUserId.Unset() -} - -// GetStorageBytes returns the StorageBytes field value -func (o *DriveCreateOut) GetStorageBytes() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.StorageBytes -} - -// GetStorageBytesOk returns a tuple with the StorageBytes field value -// and a boolean to check if the value has been set. -func (o *DriveCreateOut) GetStorageBytesOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.StorageBytes, true -} - -// SetStorageBytes sets field value -func (o *DriveCreateOut) SetStorageBytes(v int32) { - o.StorageBytes = v -} - -func (o DriveCreateOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DriveCreateOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["api_key"] = o.ApiKey - toSerialize["created_at"] = o.CreatedAt - toSerialize["id"] = o.Id - toSerialize["name"] = o.Name - toSerialize["organization_id"] = o.OrganizationId - if o.OwnerEmail.IsSet() { - toSerialize["owner_email"] = o.OwnerEmail.Get() - } - if o.OwnerUserId.IsSet() { - toSerialize["owner_user_id"] = o.OwnerUserId.Get() - } - toSerialize["storage_bytes"] = o.StorageBytes - return toSerialize, nil -} - -func (o *DriveCreateOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "api_key", - "created_at", - "id", - "name", - "organization_id", - "storage_bytes", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varDriveCreateOut := _DriveCreateOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDriveCreateOut) - - if err != nil { - return err - } - - *o = DriveCreateOut(varDriveCreateOut) - - return err -} - -type NullableDriveCreateOut struct { - value *DriveCreateOut - isSet bool -} - -func (v NullableDriveCreateOut) Get() *DriveCreateOut { - return v.value -} - -func (v *NullableDriveCreateOut) Set(val *DriveCreateOut) { - v.value = val - v.isSet = true -} - -func (v NullableDriveCreateOut) IsSet() bool { - return v.isSet -} - -func (v *NullableDriveCreateOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDriveCreateOut(val *DriveCreateOut) *NullableDriveCreateOut { - return &NullableDriveCreateOut{value: val, isSet: true} -} - -func (v NullableDriveCreateOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDriveCreateOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_drive_delete_out.go b/sdk/go/model_drive_delete_out.go deleted file mode 100644 index 9269f54..0000000 --- a/sdk/go/model_drive_delete_out.go +++ /dev/null @@ -1,299 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "time" - "bytes" - "fmt" -) - -// checks if the DriveDeleteOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DriveDeleteOut{} - -// DriveDeleteOut DELETE /v0/drives/{drive_id} response — the drive soft-delete receipt. Reversible until the GC cron hard-deletes at `purge_at`; `restore_url` points at the drive restore endpoint (deletion-design.md §5.2). -type DriveDeleteOut struct { - DeletedAt time.Time `json:"deleted_at"` - Id string `json:"id"` - Ok *bool `json:"ok,omitempty"` - PurgeAt time.Time `json:"purge_at"` - RestoreUrl NullableString `json:"restore_url,omitempty"` -} - -type _DriveDeleteOut DriveDeleteOut - -// NewDriveDeleteOut instantiates a new DriveDeleteOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDriveDeleteOut(deletedAt time.Time, id string, purgeAt time.Time) *DriveDeleteOut { - this := DriveDeleteOut{} - this.DeletedAt = deletedAt - this.Id = id - var ok bool = true - this.Ok = &ok - this.PurgeAt = purgeAt - return &this -} - -// NewDriveDeleteOutWithDefaults instantiates a new DriveDeleteOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDriveDeleteOutWithDefaults() *DriveDeleteOut { - this := DriveDeleteOut{} - var ok bool = true - this.Ok = &ok - return &this -} - -// GetDeletedAt returns the DeletedAt field value -func (o *DriveDeleteOut) GetDeletedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.DeletedAt -} - -// GetDeletedAtOk returns a tuple with the DeletedAt field value -// and a boolean to check if the value has been set. -func (o *DriveDeleteOut) GetDeletedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.DeletedAt, true -} - -// SetDeletedAt sets field value -func (o *DriveDeleteOut) SetDeletedAt(v time.Time) { - o.DeletedAt = v -} - -// GetId returns the Id field value -func (o *DriveDeleteOut) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *DriveDeleteOut) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *DriveDeleteOut) SetId(v string) { - o.Id = v -} - -// GetOk returns the Ok field value if set, zero value otherwise. -func (o *DriveDeleteOut) GetOk() bool { - if o == nil || IsNil(o.Ok) { - var ret bool - return ret - } - return *o.Ok -} - -// GetOkOk returns a tuple with the Ok field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *DriveDeleteOut) GetOkOk() (*bool, bool) { - if o == nil || IsNil(o.Ok) { - return nil, false - } - return o.Ok, true -} - -// HasOk returns a boolean if a field has been set. -func (o *DriveDeleteOut) HasOk() bool { - if o != nil && !IsNil(o.Ok) { - return true - } - - return false -} - -// SetOk gets a reference to the given bool and assigns it to the Ok field. -func (o *DriveDeleteOut) SetOk(v bool) { - o.Ok = &v -} - -// GetPurgeAt returns the PurgeAt field value -func (o *DriveDeleteOut) GetPurgeAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.PurgeAt -} - -// GetPurgeAtOk returns a tuple with the PurgeAt field value -// and a boolean to check if the value has been set. -func (o *DriveDeleteOut) GetPurgeAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.PurgeAt, true -} - -// SetPurgeAt sets field value -func (o *DriveDeleteOut) SetPurgeAt(v time.Time) { - o.PurgeAt = v -} - -// GetRestoreUrl returns the RestoreUrl field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *DriveDeleteOut) GetRestoreUrl() string { - if o == nil || IsNil(o.RestoreUrl.Get()) { - var ret string - return ret - } - return *o.RestoreUrl.Get() -} - -// GetRestoreUrlOk returns a tuple with the RestoreUrl field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DriveDeleteOut) GetRestoreUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.RestoreUrl.Get(), o.RestoreUrl.IsSet() -} - -// HasRestoreUrl returns a boolean if a field has been set. -func (o *DriveDeleteOut) HasRestoreUrl() bool { - if o != nil && o.RestoreUrl.IsSet() { - return true - } - - return false -} - -// SetRestoreUrl gets a reference to the given NullableString and assigns it to the RestoreUrl field. -func (o *DriveDeleteOut) SetRestoreUrl(v string) { - o.RestoreUrl.Set(&v) -} -// SetRestoreUrlNil sets the value for RestoreUrl to be an explicit nil -func (o *DriveDeleteOut) SetRestoreUrlNil() { - o.RestoreUrl.Set(nil) -} - -// UnsetRestoreUrl ensures that no value is present for RestoreUrl, not even an explicit nil -func (o *DriveDeleteOut) UnsetRestoreUrl() { - o.RestoreUrl.Unset() -} - -func (o DriveDeleteOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DriveDeleteOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["deleted_at"] = o.DeletedAt - toSerialize["id"] = o.Id - if !IsNil(o.Ok) { - toSerialize["ok"] = o.Ok - } - toSerialize["purge_at"] = o.PurgeAt - if o.RestoreUrl.IsSet() { - toSerialize["restore_url"] = o.RestoreUrl.Get() - } - return toSerialize, nil -} - -func (o *DriveDeleteOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "deleted_at", - "id", - "purge_at", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varDriveDeleteOut := _DriveDeleteOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDriveDeleteOut) - - if err != nil { - return err - } - - *o = DriveDeleteOut(varDriveDeleteOut) - - return err -} - -type NullableDriveDeleteOut struct { - value *DriveDeleteOut - isSet bool -} - -func (v NullableDriveDeleteOut) Get() *DriveDeleteOut { - return v.value -} - -func (v *NullableDriveDeleteOut) Set(val *DriveDeleteOut) { - v.value = val - v.isSet = true -} - -func (v NullableDriveDeleteOut) IsSet() bool { - return v.isSet -} - -func (v *NullableDriveDeleteOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDriveDeleteOut(val *DriveDeleteOut) *NullableDriveDeleteOut { - return &NullableDriveDeleteOut{value: val, isSet: true} -} - -func (v NullableDriveDeleteOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDriveDeleteOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_drive_list.go b/sdk/go/model_drive_list.go deleted file mode 100644 index 4f4f877..0000000 --- a/sdk/go/model_drive_list.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the DriveList type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DriveList{} - -// DriveList struct for DriveList -type DriveList struct { - Items []DriveOut `json:"items"` - NextCursor NullableString `json:"next_cursor,omitempty"` -} - -type _DriveList DriveList - -// NewDriveList instantiates a new DriveList object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDriveList(items []DriveOut) *DriveList { - this := DriveList{} - this.Items = items - return &this -} - -// NewDriveListWithDefaults instantiates a new DriveList object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDriveListWithDefaults() *DriveList { - this := DriveList{} - return &this -} - -// GetItems returns the Items field value -func (o *DriveList) GetItems() []DriveOut { - if o == nil { - var ret []DriveOut - return ret - } - - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value -// and a boolean to check if the value has been set. -func (o *DriveList) GetItemsOk() ([]DriveOut, bool) { - if o == nil { - return nil, false - } - return o.Items, true -} - -// SetItems sets field value -func (o *DriveList) SetItems(v []DriveOut) { - o.Items = v -} - -// GetNextCursor returns the NextCursor field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *DriveList) GetNextCursor() string { - if o == nil || IsNil(o.NextCursor.Get()) { - var ret string - return ret - } - return *o.NextCursor.Get() -} - -// GetNextCursorOk returns a tuple with the NextCursor field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DriveList) GetNextCursorOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.NextCursor.Get(), o.NextCursor.IsSet() -} - -// HasNextCursor returns a boolean if a field has been set. -func (o *DriveList) HasNextCursor() bool { - if o != nil && o.NextCursor.IsSet() { - return true - } - - return false -} - -// SetNextCursor gets a reference to the given NullableString and assigns it to the NextCursor field. -func (o *DriveList) SetNextCursor(v string) { - o.NextCursor.Set(&v) -} -// SetNextCursorNil sets the value for NextCursor to be an explicit nil -func (o *DriveList) SetNextCursorNil() { - o.NextCursor.Set(nil) -} - -// UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil -func (o *DriveList) UnsetNextCursor() { - o.NextCursor.Unset() -} - -func (o DriveList) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DriveList) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["items"] = o.Items - if o.NextCursor.IsSet() { - toSerialize["next_cursor"] = o.NextCursor.Get() - } - return toSerialize, nil -} - -func (o *DriveList) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "items", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varDriveList := _DriveList{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDriveList) - - if err != nil { - return err - } - - *o = DriveList(varDriveList) - - return err -} - -type NullableDriveList struct { - value *DriveList - isSet bool -} - -func (v NullableDriveList) Get() *DriveList { - return v.value -} - -func (v *NullableDriveList) Set(val *DriveList) { - v.value = val - v.isSet = true -} - -func (v NullableDriveList) IsSet() bool { - return v.isSet -} - -func (v *NullableDriveList) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDriveList(val *DriveList) *NullableDriveList { - return &NullableDriveList{value: val, isSet: true} -} - -func (v NullableDriveList) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDriveList) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_drive_list_out.go b/sdk/go/model_drive_list_out.go new file mode 100644 index 0000000..210288c --- /dev/null +++ b/sdk/go/model_drive_list_out.go @@ -0,0 +1,186 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the DriveListOut type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DriveListOut{} + +// DriveListOut struct for DriveListOut +type DriveListOut struct { + Items []DriveOut `json:"items"` + NextCursor NullableString `json:"next_cursor"` +} + +type _DriveListOut DriveListOut + +// NewDriveListOut instantiates a new DriveListOut object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDriveListOut(items []DriveOut, nextCursor NullableString) *DriveListOut { + this := DriveListOut{} + this.Items = items + this.NextCursor = nextCursor + return &this +} + +// NewDriveListOutWithDefaults instantiates a new DriveListOut object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDriveListOutWithDefaults() *DriveListOut { + this := DriveListOut{} + return &this +} + +// GetItems returns the Items field value +func (o *DriveListOut) GetItems() []DriveOut { + if o == nil { + var ret []DriveOut + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *DriveListOut) GetItemsOk() ([]DriveOut, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *DriveListOut) SetItems(v []DriveOut) { + o.Items = v +} + +// GetNextCursor returns the NextCursor field value +// If the value is explicit nil, the zero value for string will be returned +func (o *DriveListOut) GetNextCursor() string { + if o == nil || o.NextCursor.Get() == nil { + var ret string + return ret + } + + return *o.NextCursor.Get() +} + +// GetNextCursorOk returns a tuple with the NextCursor field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DriveListOut) GetNextCursorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.NextCursor.Get(), o.NextCursor.IsSet() +} + +// SetNextCursor sets field value +func (o *DriveListOut) SetNextCursor(v string) { + o.NextCursor.Set(&v) +} + +func (o DriveListOut) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DriveListOut) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + toSerialize["next_cursor"] = o.NextCursor.Get() + return toSerialize, nil +} + +func (o *DriveListOut) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "items", + "next_cursor", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDriveListOut := _DriveListOut{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDriveListOut) + + if err != nil { + return err + } + + *o = DriveListOut(varDriveListOut) + + return err +} + +type NullableDriveListOut struct { + value *DriveListOut + isSet bool +} + +func (v NullableDriveListOut) Get() *DriveListOut { + return v.value +} + +func (v *NullableDriveListOut) Set(val *DriveListOut) { + v.value = val + v.isSet = true +} + +func (v NullableDriveListOut) IsSet() bool { + return v.isSet +} + +func (v *NullableDriveListOut) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDriveListOut(val *DriveListOut) *NullableDriveListOut { + return &NullableDriveListOut{value: val, isSet: true} +} + +func (v NullableDriveListOut) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDriveListOut) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/sdk/go/model_drive_out.go b/sdk/go/model_drive_out.go index 5ce837f..41f4c66 100644 --- a/sdk/go/model_drive_out.go +++ b/sdk/go/model_drive_out.go @@ -1,7 +1,7 @@ /* AgentDrive -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. API version: */ @@ -20,15 +20,21 @@ import ( // checks if the DriveOut type satisfies the MappedNullable interface at compile time var _ MappedNullable = &DriveOut{} -// DriveOut One drive in a listing — metadata only (workspaces-design §4.2). Carries NO capability and NEVER a raw key. An admin's inventory and a member's owned list both serialize to this shape; `owner_email` is the only owner-identifying field surfaced. +// DriveOut struct for DriveOut type DriveOut struct { CreatedAt time.Time `json:"created_at"` - Id string `json:"id"` + CreatedBy NullableString `json:"created_by"` + DeletedAt NullableTime `json:"deleted_at"` + Id string `json:"id" validate:"regexp=^drv_[a-f0-9]{16}$"` + Metadata map[string]interface{} `json:"metadata"` Name string `json:"name"` - OrganizationId string `json:"organization_id"` - OwnerEmail NullableString `json:"owner_email,omitempty"` - OwnerUserId NullableString `json:"owner_user_id,omitempty"` + RetrievalBytes int32 `json:"retrieval_bytes"` + Revision string `json:"revision" validate:"regexp=^rev_[a-f0-9]{16}$"` + RootFolderId string `json:"root_folder_id"` + State string `json:"state"` StorageBytes int32 `json:"storage_bytes"` + UpdatedAt time.Time `json:"updated_at"` + WorkspaceId string `json:"workspace_id"` } type _DriveOut DriveOut @@ -37,13 +43,21 @@ type _DriveOut DriveOut // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewDriveOut(createdAt time.Time, id string, name string, organizationId string, storageBytes int32) *DriveOut { +func NewDriveOut(createdAt time.Time, createdBy NullableString, deletedAt NullableTime, id string, metadata map[string]interface{}, name string, retrievalBytes int32, revision string, rootFolderId string, state string, storageBytes int32, updatedAt time.Time, workspaceId string) *DriveOut { this := DriveOut{} this.CreatedAt = createdAt + this.CreatedBy = createdBy + this.DeletedAt = deletedAt this.Id = id + this.Metadata = metadata this.Name = name - this.OrganizationId = organizationId + this.RetrievalBytes = retrievalBytes + this.Revision = revision + this.RootFolderId = rootFolderId + this.State = state this.StorageBytes = storageBytes + this.UpdatedAt = updatedAt + this.WorkspaceId = workspaceId return &this } @@ -79,6 +93,58 @@ func (o *DriveOut) SetCreatedAt(v time.Time) { o.CreatedAt = v } +// GetCreatedBy returns the CreatedBy field value +// If the value is explicit nil, the zero value for string will be returned +func (o *DriveOut) GetCreatedBy() string { + if o == nil || o.CreatedBy.Get() == nil { + var ret string + return ret + } + + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DriveOut) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// SetCreatedBy sets field value +func (o *DriveOut) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// GetDeletedAt returns the DeletedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *DriveOut) GetDeletedAt() time.Time { + if o == nil || o.DeletedAt.Get() == nil { + var ret time.Time + return ret + } + + return *o.DeletedAt.Get() +} + +// GetDeletedAtOk returns a tuple with the DeletedAt field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DriveOut) GetDeletedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.DeletedAt.Get(), o.DeletedAt.IsSet() +} + +// SetDeletedAt sets field value +func (o *DriveOut) SetDeletedAt(v time.Time) { + o.DeletedAt.Set(&v) +} + // GetId returns the Id field value func (o *DriveOut) GetId() string { if o == nil { @@ -103,6 +169,30 @@ func (o *DriveOut) SetId(v string) { o.Id = v } +// GetMetadata returns the Metadata field value +func (o *DriveOut) GetMetadata() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value +// and a boolean to check if the value has been set. +func (o *DriveOut) GetMetadataOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false + } + return o.Metadata, true +} + +// SetMetadata sets field value +func (o *DriveOut) SetMetadata(v map[string]interface{}) { + o.Metadata = v +} + // GetName returns the Name field value func (o *DriveOut) GetName() string { if o == nil { @@ -127,112 +217,100 @@ func (o *DriveOut) SetName(v string) { o.Name = v } -// GetOrganizationId returns the OrganizationId field value -func (o *DriveOut) GetOrganizationId() string { +// GetRetrievalBytes returns the RetrievalBytes field value +func (o *DriveOut) GetRetrievalBytes() int32 { if o == nil { - var ret string + var ret int32 return ret } - return o.OrganizationId + return o.RetrievalBytes } -// GetOrganizationIdOk returns a tuple with the OrganizationId field value +// GetRetrievalBytesOk returns a tuple with the RetrievalBytes field value // and a boolean to check if the value has been set. -func (o *DriveOut) GetOrganizationIdOk() (*string, bool) { +func (o *DriveOut) GetRetrievalBytesOk() (*int32, bool) { if o == nil { return nil, false } - return &o.OrganizationId, true + return &o.RetrievalBytes, true } -// SetOrganizationId sets field value -func (o *DriveOut) SetOrganizationId(v string) { - o.OrganizationId = v +// SetRetrievalBytes sets field value +func (o *DriveOut) SetRetrievalBytes(v int32) { + o.RetrievalBytes = v } -// GetOwnerEmail returns the OwnerEmail field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *DriveOut) GetOwnerEmail() string { - if o == nil || IsNil(o.OwnerEmail.Get()) { +// GetRevision returns the Revision field value +func (o *DriveOut) GetRevision() string { + if o == nil { var ret string return ret } - return *o.OwnerEmail.Get() + + return o.Revision } -// GetOwnerEmailOk returns a tuple with the OwnerEmail field value if set, nil otherwise +// GetRevisionOk returns a tuple with the Revision field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DriveOut) GetOwnerEmailOk() (*string, bool) { +func (o *DriveOut) GetRevisionOk() (*string, bool) { if o == nil { return nil, false } - return o.OwnerEmail.Get(), o.OwnerEmail.IsSet() -} - -// HasOwnerEmail returns a boolean if a field has been set. -func (o *DriveOut) HasOwnerEmail() bool { - if o != nil && o.OwnerEmail.IsSet() { - return true - } - - return false + return &o.Revision, true } -// SetOwnerEmail gets a reference to the given NullableString and assigns it to the OwnerEmail field. -func (o *DriveOut) SetOwnerEmail(v string) { - o.OwnerEmail.Set(&v) -} -// SetOwnerEmailNil sets the value for OwnerEmail to be an explicit nil -func (o *DriveOut) SetOwnerEmailNil() { - o.OwnerEmail.Set(nil) +// SetRevision sets field value +func (o *DriveOut) SetRevision(v string) { + o.Revision = v } -// UnsetOwnerEmail ensures that no value is present for OwnerEmail, not even an explicit nil -func (o *DriveOut) UnsetOwnerEmail() { - o.OwnerEmail.Unset() -} - -// GetOwnerUserId returns the OwnerUserId field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *DriveOut) GetOwnerUserId() string { - if o == nil || IsNil(o.OwnerUserId.Get()) { +// GetRootFolderId returns the RootFolderId field value +func (o *DriveOut) GetRootFolderId() string { + if o == nil { var ret string return ret } - return *o.OwnerUserId.Get() + + return o.RootFolderId } -// GetOwnerUserIdOk returns a tuple with the OwnerUserId field value if set, nil otherwise +// GetRootFolderIdOk returns a tuple with the RootFolderId field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DriveOut) GetOwnerUserIdOk() (*string, bool) { +func (o *DriveOut) GetRootFolderIdOk() (*string, bool) { if o == nil { return nil, false } - return o.OwnerUserId.Get(), o.OwnerUserId.IsSet() + return &o.RootFolderId, true +} + +// SetRootFolderId sets field value +func (o *DriveOut) SetRootFolderId(v string) { + o.RootFolderId = v } -// HasOwnerUserId returns a boolean if a field has been set. -func (o *DriveOut) HasOwnerUserId() bool { - if o != nil && o.OwnerUserId.IsSet() { - return true +// GetState returns the State field value +func (o *DriveOut) GetState() string { + if o == nil { + var ret string + return ret } - return false + return o.State } -// SetOwnerUserId gets a reference to the given NullableString and assigns it to the OwnerUserId field. -func (o *DriveOut) SetOwnerUserId(v string) { - o.OwnerUserId.Set(&v) -} -// SetOwnerUserIdNil sets the value for OwnerUserId to be an explicit nil -func (o *DriveOut) SetOwnerUserIdNil() { - o.OwnerUserId.Set(nil) +// GetStateOk returns a tuple with the State field value +// and a boolean to check if the value has been set. +func (o *DriveOut) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.State, true } -// UnsetOwnerUserId ensures that no value is present for OwnerUserId, not even an explicit nil -func (o *DriveOut) UnsetOwnerUserId() { - o.OwnerUserId.Unset() +// SetState sets field value +func (o *DriveOut) SetState(v string) { + o.State = v } // GetStorageBytes returns the StorageBytes field value @@ -259,6 +337,54 @@ func (o *DriveOut) SetStorageBytes(v int32) { o.StorageBytes = v } +// GetUpdatedAt returns the UpdatedAt field value +func (o *DriveOut) GetUpdatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *DriveOut) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *DriveOut) SetUpdatedAt(v time.Time) { + o.UpdatedAt = v +} + +// GetWorkspaceId returns the WorkspaceId field value +func (o *DriveOut) GetWorkspaceId() string { + if o == nil { + var ret string + return ret + } + + return o.WorkspaceId +} + +// GetWorkspaceIdOk returns a tuple with the WorkspaceId field value +// and a boolean to check if the value has been set. +func (o *DriveOut) GetWorkspaceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.WorkspaceId, true +} + +// SetWorkspaceId sets field value +func (o *DriveOut) SetWorkspaceId(v string) { + o.WorkspaceId = v +} + func (o DriveOut) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { @@ -270,16 +396,18 @@ func (o DriveOut) MarshalJSON() ([]byte, error) { func (o DriveOut) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["created_at"] = o.CreatedAt + toSerialize["created_by"] = o.CreatedBy.Get() + toSerialize["deleted_at"] = o.DeletedAt.Get() toSerialize["id"] = o.Id + toSerialize["metadata"] = o.Metadata toSerialize["name"] = o.Name - toSerialize["organization_id"] = o.OrganizationId - if o.OwnerEmail.IsSet() { - toSerialize["owner_email"] = o.OwnerEmail.Get() - } - if o.OwnerUserId.IsSet() { - toSerialize["owner_user_id"] = o.OwnerUserId.Get() - } + toSerialize["retrieval_bytes"] = o.RetrievalBytes + toSerialize["revision"] = o.Revision + toSerialize["root_folder_id"] = o.RootFolderId + toSerialize["state"] = o.State toSerialize["storage_bytes"] = o.StorageBytes + toSerialize["updated_at"] = o.UpdatedAt + toSerialize["workspace_id"] = o.WorkspaceId return toSerialize, nil } @@ -289,10 +417,18 @@ func (o *DriveOut) UnmarshalJSON(data []byte) (err error) { // that every required field exists as a key in the generic map. requiredProperties := []string{ "created_at", + "created_by", + "deleted_at", "id", + "metadata", "name", - "organization_id", + "retrieval_bytes", + "revision", + "root_folder_id", + "state", "storage_bytes", + "updated_at", + "workspace_id", } allProperties := make(map[string]interface{}) diff --git a/sdk/go/model_drive_read_out.go b/sdk/go/model_drive_read_out.go deleted file mode 100644 index 3c3f399..0000000 --- a/sdk/go/model_drive_read_out.go +++ /dev/null @@ -1,371 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "time" - "bytes" - "fmt" -) - -// checks if the DriveReadOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DriveReadOut{} - -// DriveReadOut Drive singleton shape returned by both data-plane read routes. -type DriveReadOut struct { - CreatedAt time.Time `json:"created_at"` - Email NullableString `json:"email,omitempty"` - Etag string `json:"etag"` - Id string `json:"id"` - Metageneration int32 `json:"metageneration"` - OrganizationId string `json:"organization_id"` - StorageBytes int32 `json:"storage_bytes"` - StorageLimit int32 `json:"storage_limit"` -} - -type _DriveReadOut DriveReadOut - -// NewDriveReadOut instantiates a new DriveReadOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDriveReadOut(createdAt time.Time, etag string, id string, metageneration int32, organizationId string, storageBytes int32, storageLimit int32) *DriveReadOut { - this := DriveReadOut{} - this.CreatedAt = createdAt - this.Etag = etag - this.Id = id - this.Metageneration = metageneration - this.OrganizationId = organizationId - this.StorageBytes = storageBytes - this.StorageLimit = storageLimit - return &this -} - -// NewDriveReadOutWithDefaults instantiates a new DriveReadOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDriveReadOutWithDefaults() *DriveReadOut { - this := DriveReadOut{} - return &this -} - -// GetCreatedAt returns the CreatedAt field value -func (o *DriveReadOut) GetCreatedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value -// and a boolean to check if the value has been set. -func (o *DriveReadOut) GetCreatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.CreatedAt, true -} - -// SetCreatedAt sets field value -func (o *DriveReadOut) SetCreatedAt(v time.Time) { - o.CreatedAt = v -} - -// GetEmail returns the Email field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *DriveReadOut) GetEmail() string { - if o == nil || IsNil(o.Email.Get()) { - var ret string - return ret - } - return *o.Email.Get() -} - -// GetEmailOk returns a tuple with the Email field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DriveReadOut) GetEmailOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Email.Get(), o.Email.IsSet() -} - -// HasEmail returns a boolean if a field has been set. -func (o *DriveReadOut) HasEmail() bool { - if o != nil && o.Email.IsSet() { - return true - } - - return false -} - -// SetEmail gets a reference to the given NullableString and assigns it to the Email field. -func (o *DriveReadOut) SetEmail(v string) { - o.Email.Set(&v) -} -// SetEmailNil sets the value for Email to be an explicit nil -func (o *DriveReadOut) SetEmailNil() { - o.Email.Set(nil) -} - -// UnsetEmail ensures that no value is present for Email, not even an explicit nil -func (o *DriveReadOut) UnsetEmail() { - o.Email.Unset() -} - -// GetEtag returns the Etag field value -func (o *DriveReadOut) GetEtag() string { - if o == nil { - var ret string - return ret - } - - return o.Etag -} - -// GetEtagOk returns a tuple with the Etag field value -// and a boolean to check if the value has been set. -func (o *DriveReadOut) GetEtagOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Etag, true -} - -// SetEtag sets field value -func (o *DriveReadOut) SetEtag(v string) { - o.Etag = v -} - -// GetId returns the Id field value -func (o *DriveReadOut) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *DriveReadOut) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *DriveReadOut) SetId(v string) { - o.Id = v -} - -// GetMetageneration returns the Metageneration field value -func (o *DriveReadOut) GetMetageneration() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Metageneration -} - -// GetMetagenerationOk returns a tuple with the Metageneration field value -// and a boolean to check if the value has been set. -func (o *DriveReadOut) GetMetagenerationOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Metageneration, true -} - -// SetMetageneration sets field value -func (o *DriveReadOut) SetMetageneration(v int32) { - o.Metageneration = v -} - -// GetOrganizationId returns the OrganizationId field value -func (o *DriveReadOut) GetOrganizationId() string { - if o == nil { - var ret string - return ret - } - - return o.OrganizationId -} - -// GetOrganizationIdOk returns a tuple with the OrganizationId field value -// and a boolean to check if the value has been set. -func (o *DriveReadOut) GetOrganizationIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.OrganizationId, true -} - -// SetOrganizationId sets field value -func (o *DriveReadOut) SetOrganizationId(v string) { - o.OrganizationId = v -} - -// GetStorageBytes returns the StorageBytes field value -func (o *DriveReadOut) GetStorageBytes() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.StorageBytes -} - -// GetStorageBytesOk returns a tuple with the StorageBytes field value -// and a boolean to check if the value has been set. -func (o *DriveReadOut) GetStorageBytesOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.StorageBytes, true -} - -// SetStorageBytes sets field value -func (o *DriveReadOut) SetStorageBytes(v int32) { - o.StorageBytes = v -} - -// GetStorageLimit returns the StorageLimit field value -func (o *DriveReadOut) GetStorageLimit() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.StorageLimit -} - -// GetStorageLimitOk returns a tuple with the StorageLimit field value -// and a boolean to check if the value has been set. -func (o *DriveReadOut) GetStorageLimitOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.StorageLimit, true -} - -// SetStorageLimit sets field value -func (o *DriveReadOut) SetStorageLimit(v int32) { - o.StorageLimit = v -} - -func (o DriveReadOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DriveReadOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["created_at"] = o.CreatedAt - if o.Email.IsSet() { - toSerialize["email"] = o.Email.Get() - } - toSerialize["etag"] = o.Etag - toSerialize["id"] = o.Id - toSerialize["metageneration"] = o.Metageneration - toSerialize["organization_id"] = o.OrganizationId - toSerialize["storage_bytes"] = o.StorageBytes - toSerialize["storage_limit"] = o.StorageLimit - return toSerialize, nil -} - -func (o *DriveReadOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "created_at", - "etag", - "id", - "metageneration", - "organization_id", - "storage_bytes", - "storage_limit", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varDriveReadOut := _DriveReadOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDriveReadOut) - - if err != nil { - return err - } - - *o = DriveReadOut(varDriveReadOut) - - return err -} - -type NullableDriveReadOut struct { - value *DriveReadOut - isSet bool -} - -func (v NullableDriveReadOut) Get() *DriveReadOut { - return v.value -} - -func (v *NullableDriveReadOut) Set(val *DriveReadOut) { - v.value = val - v.isSet = true -} - -func (v NullableDriveReadOut) IsSet() bool { - return v.isSet -} - -func (v *NullableDriveReadOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDriveReadOut(val *DriveReadOut) *NullableDriveReadOut { - return &NullableDriveReadOut{value: val, isSet: true} -} - -func (v NullableDriveReadOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDriveReadOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_drive_rename_in.go b/sdk/go/model_drive_rename_in.go deleted file mode 100644 index fb6a926..0000000 --- a/sdk/go/model_drive_rename_in.go +++ /dev/null @@ -1,156 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the DriveRenameIn type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DriveRenameIn{} - -// DriveRenameIn PATCH /v0/drives/{id} body — rename a drive the caller owns. -type DriveRenameIn struct { - Name string `json:"name"` -} - -type _DriveRenameIn DriveRenameIn - -// NewDriveRenameIn instantiates a new DriveRenameIn object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDriveRenameIn(name string) *DriveRenameIn { - this := DriveRenameIn{} - this.Name = name - return &this -} - -// NewDriveRenameInWithDefaults instantiates a new DriveRenameIn object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDriveRenameInWithDefaults() *DriveRenameIn { - this := DriveRenameIn{} - return &this -} - -// GetName returns the Name field value -func (o *DriveRenameIn) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *DriveRenameIn) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *DriveRenameIn) SetName(v string) { - o.Name = v -} - -func (o DriveRenameIn) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DriveRenameIn) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["name"] = o.Name - return toSerialize, nil -} - -func (o *DriveRenameIn) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "name", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varDriveRenameIn := _DriveRenameIn{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDriveRenameIn) - - if err != nil { - return err - } - - *o = DriveRenameIn(varDriveRenameIn) - - return err -} - -type NullableDriveRenameIn struct { - value *DriveRenameIn - isSet bool -} - -func (v NullableDriveRenameIn) Get() *DriveRenameIn { - return v.value -} - -func (v *NullableDriveRenameIn) Set(val *DriveRenameIn) { - v.value = val - v.isSet = true -} - -func (v NullableDriveRenameIn) IsSet() bool { - return v.isSet -} - -func (v *NullableDriveRenameIn) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDriveRenameIn(val *DriveRenameIn) *NullableDriveRenameIn { - return &NullableDriveRenameIn{value: val, isSet: true} -} - -func (v NullableDriveRenameIn) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDriveRenameIn) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_drive_restore_out.go b/sdk/go/model_drive_restore_out.go deleted file mode 100644 index 43344aa..0000000 --- a/sdk/go/model_drive_restore_out.go +++ /dev/null @@ -1,213 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "time" - "bytes" - "fmt" -) - -// checks if the DriveRestoreOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &DriveRestoreOut{} - -// DriveRestoreOut struct for DriveRestoreOut -type DriveRestoreOut struct { - Id string `json:"id"` - RebasedArtifactCount int32 `json:"rebased_artifact_count"` - RestoredAt time.Time `json:"restored_at"` -} - -type _DriveRestoreOut DriveRestoreOut - -// NewDriveRestoreOut instantiates a new DriveRestoreOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewDriveRestoreOut(id string, rebasedArtifactCount int32, restoredAt time.Time) *DriveRestoreOut { - this := DriveRestoreOut{} - this.Id = id - this.RebasedArtifactCount = rebasedArtifactCount - this.RestoredAt = restoredAt - return &this -} - -// NewDriveRestoreOutWithDefaults instantiates a new DriveRestoreOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewDriveRestoreOutWithDefaults() *DriveRestoreOut { - this := DriveRestoreOut{} - return &this -} - -// GetId returns the Id field value -func (o *DriveRestoreOut) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *DriveRestoreOut) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *DriveRestoreOut) SetId(v string) { - o.Id = v -} - -// GetRebasedArtifactCount returns the RebasedArtifactCount field value -func (o *DriveRestoreOut) GetRebasedArtifactCount() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.RebasedArtifactCount -} - -// GetRebasedArtifactCountOk returns a tuple with the RebasedArtifactCount field value -// and a boolean to check if the value has been set. -func (o *DriveRestoreOut) GetRebasedArtifactCountOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.RebasedArtifactCount, true -} - -// SetRebasedArtifactCount sets field value -func (o *DriveRestoreOut) SetRebasedArtifactCount(v int32) { - o.RebasedArtifactCount = v -} - -// GetRestoredAt returns the RestoredAt field value -func (o *DriveRestoreOut) GetRestoredAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.RestoredAt -} - -// GetRestoredAtOk returns a tuple with the RestoredAt field value -// and a boolean to check if the value has been set. -func (o *DriveRestoreOut) GetRestoredAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.RestoredAt, true -} - -// SetRestoredAt sets field value -func (o *DriveRestoreOut) SetRestoredAt(v time.Time) { - o.RestoredAt = v -} - -func (o DriveRestoreOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o DriveRestoreOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["id"] = o.Id - toSerialize["rebased_artifact_count"] = o.RebasedArtifactCount - toSerialize["restored_at"] = o.RestoredAt - return toSerialize, nil -} - -func (o *DriveRestoreOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "id", - "rebased_artifact_count", - "restored_at", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varDriveRestoreOut := _DriveRestoreOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varDriveRestoreOut) - - if err != nil { - return err - } - - *o = DriveRestoreOut(varDriveRestoreOut) - - return err -} - -type NullableDriveRestoreOut struct { - value *DriveRestoreOut - isSet bool -} - -func (v NullableDriveRestoreOut) Get() *DriveRestoreOut { - return v.value -} - -func (v *NullableDriveRestoreOut) Set(val *DriveRestoreOut) { - v.value = val - v.isSet = true -} - -func (v NullableDriveRestoreOut) IsSet() bool { - return v.isSet -} - -func (v *NullableDriveRestoreOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableDriveRestoreOut(val *DriveRestoreOut) *NullableDriveRestoreOut { - return &NullableDriveRestoreOut{value: val, isSet: true} -} - -func (v NullableDriveRestoreOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableDriveRestoreOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_drive_update_in.go b/sdk/go/model_drive_update_in.go new file mode 100644 index 0000000..5501805 --- /dev/null +++ b/sdk/go/model_drive_update_in.go @@ -0,0 +1,201 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "encoding/json" +) + +// checks if the DriveUpdateIn type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DriveUpdateIn{} + +// DriveUpdateIn PATCH /v0/drives/{id} body — at least one field is required. +type DriveUpdateIn struct { + Metadata map[string]interface{} `json:"metadata,omitempty"` + Name NullableString `json:"name,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _DriveUpdateIn DriveUpdateIn + +// NewDriveUpdateIn instantiates a new DriveUpdateIn object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDriveUpdateIn() *DriveUpdateIn { + this := DriveUpdateIn{} + return &this +} + +// NewDriveUpdateInWithDefaults instantiates a new DriveUpdateIn object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDriveUpdateInWithDefaults() *DriveUpdateIn { + this := DriveUpdateIn{} + return &this +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DriveUpdateIn) GetMetadata() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DriveUpdateIn) GetMetadataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Metadata) { + return map[string]interface{}{}, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *DriveUpdateIn) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. +func (o *DriveUpdateIn) SetMetadata(v map[string]interface{}) { + o.Metadata = v +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *DriveUpdateIn) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DriveUpdateIn) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *DriveUpdateIn) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *DriveUpdateIn) SetName(v string) { + o.Name.Set(&v) +} +// SetNameNil sets the value for Name to be an explicit nil +func (o *DriveUpdateIn) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *DriveUpdateIn) UnsetName() { + o.Name.Unset() +} + +func (o DriveUpdateIn) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DriveUpdateIn) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Metadata != nil { + toSerialize["metadata"] = o.Metadata + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DriveUpdateIn) UnmarshalJSON(data []byte) (err error) { + varDriveUpdateIn := _DriveUpdateIn{} + + err = json.Unmarshal(data, &varDriveUpdateIn) + + if err != nil { + return err + } + + *o = DriveUpdateIn(varDriveUpdateIn) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "metadata") + delete(additionalProperties, "name") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDriveUpdateIn struct { + value *DriveUpdateIn + isSet bool +} + +func (v NullableDriveUpdateIn) Get() *DriveUpdateIn { + return v.value +} + +func (v *NullableDriveUpdateIn) Set(val *DriveUpdateIn) { + v.value = val + v.isSet = true +} + +func (v NullableDriveUpdateIn) IsSet() bool { + return v.isSet +} + +func (v *NullableDriveUpdateIn) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDriveUpdateIn(val *DriveUpdateIn) *NullableDriveUpdateIn { + return &NullableDriveUpdateIn{value: val, isSet: true} +} + +func (v NullableDriveUpdateIn) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDriveUpdateIn) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/sdk/go/model_drive_usage_out.go b/sdk/go/model_drive_usage_out.go index fcda97e..a23b07a 100644 --- a/sdk/go/model_drive_usage_out.go +++ b/sdk/go/model_drive_usage_out.go @@ -1,7 +1,7 @@ /* AgentDrive -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. API version: */ @@ -21,19 +21,8 @@ var _ MappedNullable = &DriveUsageOut{} // DriveUsageOut struct for DriveUsageOut type DriveUsageOut struct { - AccountFootprint StorageFootprintOut `json:"account_footprint"` - EgressBytes UsageCounterOut `json:"egress_bytes"` - Footprint StorageFootprintOut `json:"footprint"` - IndexedBytes UsageCounterOut `json:"indexed_bytes"` - IndexingOps UsageCounterOut `json:"indexing_ops"` - OpsThisMonth OperationUsageOut `json:"ops_this_month"` - Period UsagePeriodOut `json:"period"` - RetrievalQueries UsageCounterOut `json:"retrieval_queries"` - Storage UsageCounterOut `json:"storage"` - StorageBreakdown NullableStorageBreakdownOut `json:"storage_breakdown,omitempty"` - TokensThisMonth TokenUsageOut `json:"tokens_this_month"` - VersionRetention VersionRetentionOut `json:"version_retention"` - WritesThisHour HourlyUsageCounterOut `json:"writes_this_hour"` + RetrievalBytes int32 `json:"retrieval_bytes"` + StorageBytes int32 `json:"storage_bytes"` } type _DriveUsageOut DriveUsageOut @@ -42,20 +31,10 @@ type _DriveUsageOut DriveUsageOut // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewDriveUsageOut(accountFootprint StorageFootprintOut, egressBytes UsageCounterOut, footprint StorageFootprintOut, indexedBytes UsageCounterOut, indexingOps UsageCounterOut, opsThisMonth OperationUsageOut, period UsagePeriodOut, retrievalQueries UsageCounterOut, storage UsageCounterOut, tokensThisMonth TokenUsageOut, versionRetention VersionRetentionOut, writesThisHour HourlyUsageCounterOut) *DriveUsageOut { +func NewDriveUsageOut(retrievalBytes int32, storageBytes int32) *DriveUsageOut { this := DriveUsageOut{} - this.AccountFootprint = accountFootprint - this.EgressBytes = egressBytes - this.Footprint = footprint - this.IndexedBytes = indexedBytes - this.IndexingOps = indexingOps - this.OpsThisMonth = opsThisMonth - this.Period = period - this.RetrievalQueries = retrievalQueries - this.Storage = storage - this.TokensThisMonth = tokensThisMonth - this.VersionRetention = versionRetention - this.WritesThisHour = writesThisHour + this.RetrievalBytes = retrievalBytes + this.StorageBytes = storageBytes return &this } @@ -67,334 +46,52 @@ func NewDriveUsageOutWithDefaults() *DriveUsageOut { return &this } -// GetAccountFootprint returns the AccountFootprint field value -func (o *DriveUsageOut) GetAccountFootprint() StorageFootprintOut { +// GetRetrievalBytes returns the RetrievalBytes field value +func (o *DriveUsageOut) GetRetrievalBytes() int32 { if o == nil { - var ret StorageFootprintOut + var ret int32 return ret } - return o.AccountFootprint + return o.RetrievalBytes } -// GetAccountFootprintOk returns a tuple with the AccountFootprint field value +// GetRetrievalBytesOk returns a tuple with the RetrievalBytes field value // and a boolean to check if the value has been set. -func (o *DriveUsageOut) GetAccountFootprintOk() (*StorageFootprintOut, bool) { +func (o *DriveUsageOut) GetRetrievalBytesOk() (*int32, bool) { if o == nil { return nil, false } - return &o.AccountFootprint, true + return &o.RetrievalBytes, true } -// SetAccountFootprint sets field value -func (o *DriveUsageOut) SetAccountFootprint(v StorageFootprintOut) { - o.AccountFootprint = v +// SetRetrievalBytes sets field value +func (o *DriveUsageOut) SetRetrievalBytes(v int32) { + o.RetrievalBytes = v } -// GetEgressBytes returns the EgressBytes field value -func (o *DriveUsageOut) GetEgressBytes() UsageCounterOut { +// GetStorageBytes returns the StorageBytes field value +func (o *DriveUsageOut) GetStorageBytes() int32 { if o == nil { - var ret UsageCounterOut + var ret int32 return ret } - return o.EgressBytes + return o.StorageBytes } -// GetEgressBytesOk returns a tuple with the EgressBytes field value +// GetStorageBytesOk returns a tuple with the StorageBytes field value // and a boolean to check if the value has been set. -func (o *DriveUsageOut) GetEgressBytesOk() (*UsageCounterOut, bool) { +func (o *DriveUsageOut) GetStorageBytesOk() (*int32, bool) { if o == nil { return nil, false } - return &o.EgressBytes, true + return &o.StorageBytes, true } -// SetEgressBytes sets field value -func (o *DriveUsageOut) SetEgressBytes(v UsageCounterOut) { - o.EgressBytes = v -} - -// GetFootprint returns the Footprint field value -func (o *DriveUsageOut) GetFootprint() StorageFootprintOut { - if o == nil { - var ret StorageFootprintOut - return ret - } - - return o.Footprint -} - -// GetFootprintOk returns a tuple with the Footprint field value -// and a boolean to check if the value has been set. -func (o *DriveUsageOut) GetFootprintOk() (*StorageFootprintOut, bool) { - if o == nil { - return nil, false - } - return &o.Footprint, true -} - -// SetFootprint sets field value -func (o *DriveUsageOut) SetFootprint(v StorageFootprintOut) { - o.Footprint = v -} - -// GetIndexedBytes returns the IndexedBytes field value -func (o *DriveUsageOut) GetIndexedBytes() UsageCounterOut { - if o == nil { - var ret UsageCounterOut - return ret - } - - return o.IndexedBytes -} - -// GetIndexedBytesOk returns a tuple with the IndexedBytes field value -// and a boolean to check if the value has been set. -func (o *DriveUsageOut) GetIndexedBytesOk() (*UsageCounterOut, bool) { - if o == nil { - return nil, false - } - return &o.IndexedBytes, true -} - -// SetIndexedBytes sets field value -func (o *DriveUsageOut) SetIndexedBytes(v UsageCounterOut) { - o.IndexedBytes = v -} - -// GetIndexingOps returns the IndexingOps field value -func (o *DriveUsageOut) GetIndexingOps() UsageCounterOut { - if o == nil { - var ret UsageCounterOut - return ret - } - - return o.IndexingOps -} - -// GetIndexingOpsOk returns a tuple with the IndexingOps field value -// and a boolean to check if the value has been set. -func (o *DriveUsageOut) GetIndexingOpsOk() (*UsageCounterOut, bool) { - if o == nil { - return nil, false - } - return &o.IndexingOps, true -} - -// SetIndexingOps sets field value -func (o *DriveUsageOut) SetIndexingOps(v UsageCounterOut) { - o.IndexingOps = v -} - -// GetOpsThisMonth returns the OpsThisMonth field value -func (o *DriveUsageOut) GetOpsThisMonth() OperationUsageOut { - if o == nil { - var ret OperationUsageOut - return ret - } - - return o.OpsThisMonth -} - -// GetOpsThisMonthOk returns a tuple with the OpsThisMonth field value -// and a boolean to check if the value has been set. -func (o *DriveUsageOut) GetOpsThisMonthOk() (*OperationUsageOut, bool) { - if o == nil { - return nil, false - } - return &o.OpsThisMonth, true -} - -// SetOpsThisMonth sets field value -func (o *DriveUsageOut) SetOpsThisMonth(v OperationUsageOut) { - o.OpsThisMonth = v -} - -// GetPeriod returns the Period field value -func (o *DriveUsageOut) GetPeriod() UsagePeriodOut { - if o == nil { - var ret UsagePeriodOut - return ret - } - - return o.Period -} - -// GetPeriodOk returns a tuple with the Period field value -// and a boolean to check if the value has been set. -func (o *DriveUsageOut) GetPeriodOk() (*UsagePeriodOut, bool) { - if o == nil { - return nil, false - } - return &o.Period, true -} - -// SetPeriod sets field value -func (o *DriveUsageOut) SetPeriod(v UsagePeriodOut) { - o.Period = v -} - -// GetRetrievalQueries returns the RetrievalQueries field value -func (o *DriveUsageOut) GetRetrievalQueries() UsageCounterOut { - if o == nil { - var ret UsageCounterOut - return ret - } - - return o.RetrievalQueries -} - -// GetRetrievalQueriesOk returns a tuple with the RetrievalQueries field value -// and a boolean to check if the value has been set. -func (o *DriveUsageOut) GetRetrievalQueriesOk() (*UsageCounterOut, bool) { - if o == nil { - return nil, false - } - return &o.RetrievalQueries, true -} - -// SetRetrievalQueries sets field value -func (o *DriveUsageOut) SetRetrievalQueries(v UsageCounterOut) { - o.RetrievalQueries = v -} - -// GetStorage returns the Storage field value -func (o *DriveUsageOut) GetStorage() UsageCounterOut { - if o == nil { - var ret UsageCounterOut - return ret - } - - return o.Storage -} - -// GetStorageOk returns a tuple with the Storage field value -// and a boolean to check if the value has been set. -func (o *DriveUsageOut) GetStorageOk() (*UsageCounterOut, bool) { - if o == nil { - return nil, false - } - return &o.Storage, true -} - -// SetStorage sets field value -func (o *DriveUsageOut) SetStorage(v UsageCounterOut) { - o.Storage = v -} - -// GetStorageBreakdown returns the StorageBreakdown field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *DriveUsageOut) GetStorageBreakdown() StorageBreakdownOut { - if o == nil || IsNil(o.StorageBreakdown.Get()) { - var ret StorageBreakdownOut - return ret - } - return *o.StorageBreakdown.Get() -} - -// GetStorageBreakdownOk returns a tuple with the StorageBreakdown field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *DriveUsageOut) GetStorageBreakdownOk() (*StorageBreakdownOut, bool) { - if o == nil { - return nil, false - } - return o.StorageBreakdown.Get(), o.StorageBreakdown.IsSet() -} - -// HasStorageBreakdown returns a boolean if a field has been set. -func (o *DriveUsageOut) HasStorageBreakdown() bool { - if o != nil && o.StorageBreakdown.IsSet() { - return true - } - - return false -} - -// SetStorageBreakdown gets a reference to the given NullableStorageBreakdownOut and assigns it to the StorageBreakdown field. -func (o *DriveUsageOut) SetStorageBreakdown(v StorageBreakdownOut) { - o.StorageBreakdown.Set(&v) -} -// SetStorageBreakdownNil sets the value for StorageBreakdown to be an explicit nil -func (o *DriveUsageOut) SetStorageBreakdownNil() { - o.StorageBreakdown.Set(nil) -} - -// UnsetStorageBreakdown ensures that no value is present for StorageBreakdown, not even an explicit nil -func (o *DriveUsageOut) UnsetStorageBreakdown() { - o.StorageBreakdown.Unset() -} - -// GetTokensThisMonth returns the TokensThisMonth field value -func (o *DriveUsageOut) GetTokensThisMonth() TokenUsageOut { - if o == nil { - var ret TokenUsageOut - return ret - } - - return o.TokensThisMonth -} - -// GetTokensThisMonthOk returns a tuple with the TokensThisMonth field value -// and a boolean to check if the value has been set. -func (o *DriveUsageOut) GetTokensThisMonthOk() (*TokenUsageOut, bool) { - if o == nil { - return nil, false - } - return &o.TokensThisMonth, true -} - -// SetTokensThisMonth sets field value -func (o *DriveUsageOut) SetTokensThisMonth(v TokenUsageOut) { - o.TokensThisMonth = v -} - -// GetVersionRetention returns the VersionRetention field value -func (o *DriveUsageOut) GetVersionRetention() VersionRetentionOut { - if o == nil { - var ret VersionRetentionOut - return ret - } - - return o.VersionRetention -} - -// GetVersionRetentionOk returns a tuple with the VersionRetention field value -// and a boolean to check if the value has been set. -func (o *DriveUsageOut) GetVersionRetentionOk() (*VersionRetentionOut, bool) { - if o == nil { - return nil, false - } - return &o.VersionRetention, true -} - -// SetVersionRetention sets field value -func (o *DriveUsageOut) SetVersionRetention(v VersionRetentionOut) { - o.VersionRetention = v -} - -// GetWritesThisHour returns the WritesThisHour field value -func (o *DriveUsageOut) GetWritesThisHour() HourlyUsageCounterOut { - if o == nil { - var ret HourlyUsageCounterOut - return ret - } - - return o.WritesThisHour -} - -// GetWritesThisHourOk returns a tuple with the WritesThisHour field value -// and a boolean to check if the value has been set. -func (o *DriveUsageOut) GetWritesThisHourOk() (*HourlyUsageCounterOut, bool) { - if o == nil { - return nil, false - } - return &o.WritesThisHour, true -} - -// SetWritesThisHour sets field value -func (o *DriveUsageOut) SetWritesThisHour(v HourlyUsageCounterOut) { - o.WritesThisHour = v +// SetStorageBytes sets field value +func (o *DriveUsageOut) SetStorageBytes(v int32) { + o.StorageBytes = v } func (o DriveUsageOut) MarshalJSON() ([]byte, error) { @@ -407,21 +104,8 @@ func (o DriveUsageOut) MarshalJSON() ([]byte, error) { func (o DriveUsageOut) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["account_footprint"] = o.AccountFootprint - toSerialize["egress_bytes"] = o.EgressBytes - toSerialize["footprint"] = o.Footprint - toSerialize["indexed_bytes"] = o.IndexedBytes - toSerialize["indexing_ops"] = o.IndexingOps - toSerialize["ops_this_month"] = o.OpsThisMonth - toSerialize["period"] = o.Period - toSerialize["retrieval_queries"] = o.RetrievalQueries - toSerialize["storage"] = o.Storage - if o.StorageBreakdown.IsSet() { - toSerialize["storage_breakdown"] = o.StorageBreakdown.Get() - } - toSerialize["tokens_this_month"] = o.TokensThisMonth - toSerialize["version_retention"] = o.VersionRetention - toSerialize["writes_this_hour"] = o.WritesThisHour + toSerialize["retrieval_bytes"] = o.RetrievalBytes + toSerialize["storage_bytes"] = o.StorageBytes return toSerialize, nil } @@ -430,18 +114,8 @@ func (o *DriveUsageOut) UnmarshalJSON(data []byte) (err error) { // by unmarshalling the object into a generic map with string keys and checking // that every required field exists as a key in the generic map. requiredProperties := []string{ - "account_footprint", - "egress_bytes", - "footprint", - "indexed_bytes", - "indexing_ops", - "ops_this_month", - "period", - "retrieval_queries", - "storage", - "tokens_this_month", - "version_retention", - "writes_this_hour", + "retrieval_bytes", + "storage_bytes", } allProperties := make(map[string]interface{}) diff --git a/sdk/go/model_drives_create_400_response.go b/sdk/go/model_drives_create_400_response.go new file mode 100644 index 0000000..843b1e9 --- /dev/null +++ b/sdk/go/model_drives_create_400_response.go @@ -0,0 +1,156 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the DrivesCreate400Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DrivesCreate400Response{} + +// DrivesCreate400Response struct for DrivesCreate400Response +type DrivesCreate400Response struct { + Error DrivesCreate400ResponseError `json:"error"` +} + +type _DrivesCreate400Response DrivesCreate400Response + +// NewDrivesCreate400Response instantiates a new DrivesCreate400Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDrivesCreate400Response(error_ DrivesCreate400ResponseError) *DrivesCreate400Response { + this := DrivesCreate400Response{} + this.Error = error_ + return &this +} + +// NewDrivesCreate400ResponseWithDefaults instantiates a new DrivesCreate400Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDrivesCreate400ResponseWithDefaults() *DrivesCreate400Response { + this := DrivesCreate400Response{} + return &this +} + +// GetError returns the Error field value +func (o *DrivesCreate400Response) GetError() DrivesCreate400ResponseError { + if o == nil { + var ret DrivesCreate400ResponseError + return ret + } + + return o.Error +} + +// GetErrorOk returns a tuple with the Error field value +// and a boolean to check if the value has been set. +func (o *DrivesCreate400Response) GetErrorOk() (*DrivesCreate400ResponseError, bool) { + if o == nil { + return nil, false + } + return &o.Error, true +} + +// SetError sets field value +func (o *DrivesCreate400Response) SetError(v DrivesCreate400ResponseError) { + o.Error = v +} + +func (o DrivesCreate400Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DrivesCreate400Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["error"] = o.Error + return toSerialize, nil +} + +func (o *DrivesCreate400Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "error", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDrivesCreate400Response := _DrivesCreate400Response{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDrivesCreate400Response) + + if err != nil { + return err + } + + *o = DrivesCreate400Response(varDrivesCreate400Response) + + return err +} + +type NullableDrivesCreate400Response struct { + value *DrivesCreate400Response + isSet bool +} + +func (v NullableDrivesCreate400Response) Get() *DrivesCreate400Response { + return v.value +} + +func (v *NullableDrivesCreate400Response) Set(val *DrivesCreate400Response) { + v.value = val + v.isSet = true +} + +func (v NullableDrivesCreate400Response) IsSet() bool { + return v.isSet +} + +func (v *NullableDrivesCreate400Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDrivesCreate400Response(val *DrivesCreate400Response) *NullableDrivesCreate400Response { + return &NullableDrivesCreate400Response{value: val, isSet: true} +} + +func (v NullableDrivesCreate400Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDrivesCreate400Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/sdk/go/model_drives_create_400_response_error.go b/sdk/go/model_drives_create_400_response_error.go new file mode 100644 index 0000000..b13065d --- /dev/null +++ b/sdk/go/model_drives_create_400_response_error.go @@ -0,0 +1,234 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "encoding/json" + "fmt" +) + +// checks if the DrivesCreate400ResponseError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DrivesCreate400ResponseError{} + +// DrivesCreate400ResponseError struct for DrivesCreate400ResponseError +type DrivesCreate400ResponseError struct { + // Stable machine-readable error code (see the error-catalog). + Code string `json:"code"` + // Error-code-specific context (optional). + Details map[string]interface{} `json:"details,omitempty"` + Message string `json:"message"` + AdditionalProperties map[string]interface{} +} + +type _DrivesCreate400ResponseError DrivesCreate400ResponseError + +// NewDrivesCreate400ResponseError instantiates a new DrivesCreate400ResponseError object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDrivesCreate400ResponseError(code string, message string) *DrivesCreate400ResponseError { + this := DrivesCreate400ResponseError{} + this.Code = code + this.Message = message + return &this +} + +// NewDrivesCreate400ResponseErrorWithDefaults instantiates a new DrivesCreate400ResponseError object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDrivesCreate400ResponseErrorWithDefaults() *DrivesCreate400ResponseError { + this := DrivesCreate400ResponseError{} + return &this +} + +// GetCode returns the Code field value +func (o *DrivesCreate400ResponseError) GetCode() string { + if o == nil { + var ret string + return ret + } + + return o.Code +} + +// GetCodeOk returns a tuple with the Code field value +// and a boolean to check if the value has been set. +func (o *DrivesCreate400ResponseError) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Code, true +} + +// SetCode sets field value +func (o *DrivesCreate400ResponseError) SetCode(v string) { + o.Code = v +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *DrivesCreate400ResponseError) GetDetails() map[string]interface{} { + if o == nil || IsNil(o.Details) { + var ret map[string]interface{} + return ret + } + return o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DrivesCreate400ResponseError) GetDetailsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Details) { + return map[string]interface{}{}, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *DrivesCreate400ResponseError) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given map[string]interface{} and assigns it to the Details field. +func (o *DrivesCreate400ResponseError) SetDetails(v map[string]interface{}) { + o.Details = v +} + +// GetMessage returns the Message field value +func (o *DrivesCreate400ResponseError) GetMessage() string { + if o == nil { + var ret string + return ret + } + + return o.Message +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +func (o *DrivesCreate400ResponseError) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Message, true +} + +// SetMessage sets field value +func (o *DrivesCreate400ResponseError) SetMessage(v string) { + o.Message = v +} + +func (o DrivesCreate400ResponseError) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DrivesCreate400ResponseError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["code"] = o.Code + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + toSerialize["message"] = o.Message + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DrivesCreate400ResponseError) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "code", + "message", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDrivesCreate400ResponseError := _DrivesCreate400ResponseError{} + + err = json.Unmarshal(data, &varDrivesCreate400ResponseError) + + if err != nil { + return err + } + + *o = DrivesCreate400ResponseError(varDrivesCreate400ResponseError) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "code") + delete(additionalProperties, "details") + delete(additionalProperties, "message") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDrivesCreate400ResponseError struct { + value *DrivesCreate400ResponseError + isSet bool +} + +func (v NullableDrivesCreate400ResponseError) Get() *DrivesCreate400ResponseError { + return v.value +} + +func (v *NullableDrivesCreate400ResponseError) Set(val *DrivesCreate400ResponseError) { + v.value = val + v.isSet = true +} + +func (v NullableDrivesCreate400ResponseError) IsSet() bool { + return v.isSet +} + +func (v *NullableDrivesCreate400ResponseError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDrivesCreate400ResponseError(val *DrivesCreate400ResponseError) *NullableDrivesCreate400ResponseError { + return &NullableDrivesCreate400ResponseError{value: val, isSet: true} +} + +func (v NullableDrivesCreate400ResponseError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDrivesCreate400ResponseError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/sdk/go/model_drives_list_400_response.go b/sdk/go/model_drives_list_400_response.go new file mode 100644 index 0000000..c69b183 --- /dev/null +++ b/sdk/go/model_drives_list_400_response.go @@ -0,0 +1,156 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the DrivesList400Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DrivesList400Response{} + +// DrivesList400Response struct for DrivesList400Response +type DrivesList400Response struct { + Error DrivesList400ResponseError `json:"error"` +} + +type _DrivesList400Response DrivesList400Response + +// NewDrivesList400Response instantiates a new DrivesList400Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDrivesList400Response(error_ DrivesList400ResponseError) *DrivesList400Response { + this := DrivesList400Response{} + this.Error = error_ + return &this +} + +// NewDrivesList400ResponseWithDefaults instantiates a new DrivesList400Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDrivesList400ResponseWithDefaults() *DrivesList400Response { + this := DrivesList400Response{} + return &this +} + +// GetError returns the Error field value +func (o *DrivesList400Response) GetError() DrivesList400ResponseError { + if o == nil { + var ret DrivesList400ResponseError + return ret + } + + return o.Error +} + +// GetErrorOk returns a tuple with the Error field value +// and a boolean to check if the value has been set. +func (o *DrivesList400Response) GetErrorOk() (*DrivesList400ResponseError, bool) { + if o == nil { + return nil, false + } + return &o.Error, true +} + +// SetError sets field value +func (o *DrivesList400Response) SetError(v DrivesList400ResponseError) { + o.Error = v +} + +func (o DrivesList400Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DrivesList400Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["error"] = o.Error + return toSerialize, nil +} + +func (o *DrivesList400Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "error", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDrivesList400Response := _DrivesList400Response{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varDrivesList400Response) + + if err != nil { + return err + } + + *o = DrivesList400Response(varDrivesList400Response) + + return err +} + +type NullableDrivesList400Response struct { + value *DrivesList400Response + isSet bool +} + +func (v NullableDrivesList400Response) Get() *DrivesList400Response { + return v.value +} + +func (v *NullableDrivesList400Response) Set(val *DrivesList400Response) { + v.value = val + v.isSet = true +} + +func (v NullableDrivesList400Response) IsSet() bool { + return v.isSet +} + +func (v *NullableDrivesList400Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDrivesList400Response(val *DrivesList400Response) *NullableDrivesList400Response { + return &NullableDrivesList400Response{value: val, isSet: true} +} + +func (v NullableDrivesList400Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDrivesList400Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/sdk/go/model_drives_list_400_response_error.go b/sdk/go/model_drives_list_400_response_error.go new file mode 100644 index 0000000..89297cb --- /dev/null +++ b/sdk/go/model_drives_list_400_response_error.go @@ -0,0 +1,236 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "encoding/json" + "fmt" +) + +// checks if the DrivesList400ResponseError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &DrivesList400ResponseError{} + +// DrivesList400ResponseError struct for DrivesList400ResponseError +type DrivesList400ResponseError struct { + // Stable machine-readable error code (see the error-catalog). + Code string `json:"code"` + // Error-code-specific context (optional). + Details map[string]interface{} `json:"details,omitempty"` + Message NullableString `json:"message"` + AdditionalProperties map[string]interface{} +} + +type _DrivesList400ResponseError DrivesList400ResponseError + +// NewDrivesList400ResponseError instantiates a new DrivesList400ResponseError object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewDrivesList400ResponseError(code string, message NullableString) *DrivesList400ResponseError { + this := DrivesList400ResponseError{} + this.Code = code + this.Message = message + return &this +} + +// NewDrivesList400ResponseErrorWithDefaults instantiates a new DrivesList400ResponseError object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewDrivesList400ResponseErrorWithDefaults() *DrivesList400ResponseError { + this := DrivesList400ResponseError{} + return &this +} + +// GetCode returns the Code field value +func (o *DrivesList400ResponseError) GetCode() string { + if o == nil { + var ret string + return ret + } + + return o.Code +} + +// GetCodeOk returns a tuple with the Code field value +// and a boolean to check if the value has been set. +func (o *DrivesList400ResponseError) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Code, true +} + +// SetCode sets field value +func (o *DrivesList400ResponseError) SetCode(v string) { + o.Code = v +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *DrivesList400ResponseError) GetDetails() map[string]interface{} { + if o == nil || IsNil(o.Details) { + var ret map[string]interface{} + return ret + } + return o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *DrivesList400ResponseError) GetDetailsOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Details) { + return map[string]interface{}{}, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *DrivesList400ResponseError) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given map[string]interface{} and assigns it to the Details field. +func (o *DrivesList400ResponseError) SetDetails(v map[string]interface{}) { + o.Details = v +} + +// GetMessage returns the Message field value +// If the value is explicit nil, the zero value for string will be returned +func (o *DrivesList400ResponseError) GetMessage() string { + if o == nil || o.Message.Get() == nil { + var ret string + return ret + } + + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *DrivesList400ResponseError) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// SetMessage sets field value +func (o *DrivesList400ResponseError) SetMessage(v string) { + o.Message.Set(&v) +} + +func (o DrivesList400ResponseError) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o DrivesList400ResponseError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["code"] = o.Code + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + toSerialize["message"] = o.Message.Get() + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *DrivesList400ResponseError) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "code", + "message", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varDrivesList400ResponseError := _DrivesList400ResponseError{} + + err = json.Unmarshal(data, &varDrivesList400ResponseError) + + if err != nil { + return err + } + + *o = DrivesList400ResponseError(varDrivesList400ResponseError) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "code") + delete(additionalProperties, "details") + delete(additionalProperties, "message") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableDrivesList400ResponseError struct { + value *DrivesList400ResponseError + isSet bool +} + +func (v NullableDrivesList400ResponseError) Get() *DrivesList400ResponseError { + return v.value +} + +func (v *NullableDrivesList400ResponseError) Set(val *DrivesList400ResponseError) { + v.value = val + v.isSet = true +} + +func (v NullableDrivesList400ResponseError) IsSet() bool { + return v.isSet +} + +func (v *NullableDrivesList400ResponseError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableDrivesList400ResponseError(val *DrivesList400ResponseError) *NullableDrivesList400ResponseError { + return &NullableDrivesList400ResponseError{value: val, isSet: true} +} + +func (v NullableDrivesList400ResponseError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableDrivesList400ResponseError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/sdk/go/model_error_body.go b/sdk/go/model_error_body.go deleted file mode 100644 index ac16856..0000000 --- a/sdk/go/model_error_body.go +++ /dev/null @@ -1,195 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "fmt" -) - -// checks if the ErrorBody type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ErrorBody{} - -// ErrorBody Machine-readable API error. Error-code-specific context (for example `limit`, `current_etag`, or `retry_after_s`) is intentionally additive. -type ErrorBody struct { - Code string `json:"code"` - Message string `json:"message"` - AdditionalProperties map[string]interface{} -} - -type _ErrorBody ErrorBody - -// NewErrorBody instantiates a new ErrorBody object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewErrorBody(code string, message string) *ErrorBody { - this := ErrorBody{} - this.Code = code - this.Message = message - return &this -} - -// NewErrorBodyWithDefaults instantiates a new ErrorBody object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewErrorBodyWithDefaults() *ErrorBody { - this := ErrorBody{} - return &this -} - -// GetCode returns the Code field value -func (o *ErrorBody) GetCode() string { - if o == nil { - var ret string - return ret - } - - return o.Code -} - -// GetCodeOk returns a tuple with the Code field value -// and a boolean to check if the value has been set. -func (o *ErrorBody) GetCodeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Code, true -} - -// SetCode sets field value -func (o *ErrorBody) SetCode(v string) { - o.Code = v -} - -// GetMessage returns the Message field value -func (o *ErrorBody) GetMessage() string { - if o == nil { - var ret string - return ret - } - - return o.Message -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -func (o *ErrorBody) GetMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Message, true -} - -// SetMessage sets field value -func (o *ErrorBody) SetMessage(v string) { - o.Message = v -} - -func (o ErrorBody) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ErrorBody) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["code"] = o.Code - toSerialize["message"] = o.Message - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *ErrorBody) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "code", - "message", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varErrorBody := _ErrorBody{} - - err = json.Unmarshal(data, &varErrorBody) - - if err != nil { - return err - } - - *o = ErrorBody(varErrorBody) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "code") - delete(additionalProperties, "message") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableErrorBody struct { - value *ErrorBody - isSet bool -} - -func (v NullableErrorBody) Get() *ErrorBody { - return v.value -} - -func (v *NullableErrorBody) Set(val *ErrorBody) { - v.value = val - v.isSet = true -} - -func (v NullableErrorBody) IsSet() bool { - return v.isSet -} - -func (v *NullableErrorBody) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableErrorBody(val *ErrorBody) *NullableErrorBody { - return &NullableErrorBody{value: val, isSet: true} -} - -func (v NullableErrorBody) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableErrorBody) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_error_detail.go b/sdk/go/model_error_detail.go deleted file mode 100644 index 06fa0cb..0000000 --- a/sdk/go/model_error_detail.go +++ /dev/null @@ -1,166 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "fmt" -) - -// checks if the ErrorDetail type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ErrorDetail{} - -// ErrorDetail struct for ErrorDetail -type ErrorDetail struct { - Error ErrorBody `json:"error"` - AdditionalProperties map[string]interface{} -} - -type _ErrorDetail ErrorDetail - -// NewErrorDetail instantiates a new ErrorDetail object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewErrorDetail(error_ ErrorBody) *ErrorDetail { - this := ErrorDetail{} - this.Error = error_ - return &this -} - -// NewErrorDetailWithDefaults instantiates a new ErrorDetail object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewErrorDetailWithDefaults() *ErrorDetail { - this := ErrorDetail{} - return &this -} - -// GetError returns the Error field value -func (o *ErrorDetail) GetError() ErrorBody { - if o == nil { - var ret ErrorBody - return ret - } - - return o.Error -} - -// GetErrorOk returns a tuple with the Error field value -// and a boolean to check if the value has been set. -func (o *ErrorDetail) GetErrorOk() (*ErrorBody, bool) { - if o == nil { - return nil, false - } - return &o.Error, true -} - -// SetError sets field value -func (o *ErrorDetail) SetError(v ErrorBody) { - o.Error = v -} - -func (o ErrorDetail) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ErrorDetail) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["error"] = o.Error - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *ErrorDetail) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "error", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varErrorDetail := _ErrorDetail{} - - err = json.Unmarshal(data, &varErrorDetail) - - if err != nil { - return err - } - - *o = ErrorDetail(varErrorDetail) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "error") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableErrorDetail struct { - value *ErrorDetail - isSet bool -} - -func (v NullableErrorDetail) Get() *ErrorDetail { - return v.value -} - -func (v *NullableErrorDetail) Set(val *ErrorDetail) { - v.value = val - v.isSet = true -} - -func (v NullableErrorDetail) IsSet() bool { - return v.isSet -} - -func (v *NullableErrorDetail) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableErrorDetail(val *ErrorDetail) *NullableErrorDetail { - return &NullableErrorDetail{value: val, isSet: true} -} - -func (v NullableErrorDetail) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableErrorDetail) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_error_response.go b/sdk/go/model_error_response.go index 9d25b17..ac6cbdc 100644 --- a/sdk/go/model_error_response.go +++ b/sdk/go/model_error_response.go @@ -1,7 +1,7 @@ /* AgentDrive -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. API version: */ @@ -12,16 +12,16 @@ package agentdrive import ( "encoding/json" + "bytes" "fmt" ) // checks if the ErrorResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ErrorResponse{} -// ErrorResponse Canonical non-validation error envelope emitted by AgentDrive. +// ErrorResponse struct for ErrorResponse type ErrorResponse struct { - Detail ErrorDetail `json:"detail"` - AdditionalProperties map[string]interface{} + Error DrivesCreate400ResponseError `json:"error"` } type _ErrorResponse ErrorResponse @@ -30,9 +30,9 @@ type _ErrorResponse ErrorResponse // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewErrorResponse(detail ErrorDetail) *ErrorResponse { +func NewErrorResponse(error_ DrivesCreate400ResponseError) *ErrorResponse { this := ErrorResponse{} - this.Detail = detail + this.Error = error_ return &this } @@ -44,28 +44,28 @@ func NewErrorResponseWithDefaults() *ErrorResponse { return &this } -// GetDetail returns the Detail field value -func (o *ErrorResponse) GetDetail() ErrorDetail { +// GetError returns the Error field value +func (o *ErrorResponse) GetError() DrivesCreate400ResponseError { if o == nil { - var ret ErrorDetail + var ret DrivesCreate400ResponseError return ret } - return o.Detail + return o.Error } -// GetDetailOk returns a tuple with the Detail field value +// GetErrorOk returns a tuple with the Error field value // and a boolean to check if the value has been set. -func (o *ErrorResponse) GetDetailOk() (*ErrorDetail, bool) { +func (o *ErrorResponse) GetErrorOk() (*DrivesCreate400ResponseError, bool) { if o == nil { return nil, false } - return &o.Detail, true + return &o.Error, true } -// SetDetail sets field value -func (o *ErrorResponse) SetDetail(v ErrorDetail) { - o.Detail = v +// SetError sets field value +func (o *ErrorResponse) SetError(v DrivesCreate400ResponseError) { + o.Error = v } func (o ErrorResponse) MarshalJSON() ([]byte, error) { @@ -78,12 +78,7 @@ func (o ErrorResponse) MarshalJSON() ([]byte, error) { func (o ErrorResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["detail"] = o.Detail - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - + toSerialize["error"] = o.Error return toSerialize, nil } @@ -92,7 +87,7 @@ func (o *ErrorResponse) UnmarshalJSON(data []byte) (err error) { // by unmarshalling the object into a generic map with string keys and checking // that every required field exists as a key in the generic map. requiredProperties := []string{ - "detail", + "error", } allProperties := make(map[string]interface{}) @@ -111,7 +106,9 @@ func (o *ErrorResponse) UnmarshalJSON(data []byte) (err error) { varErrorResponse := _ErrorResponse{} - err = json.Unmarshal(data, &varErrorResponse) + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varErrorResponse) if err != nil { return err @@ -119,13 +116,6 @@ func (o *ErrorResponse) UnmarshalJSON(data []byte) (err error) { *o = ErrorResponse(varErrorResponse) - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "detail") - o.AdditionalProperties = additionalProperties - } - return err } diff --git a/sdk/go/model_event_out.go b/sdk/go/model_event_out.go deleted file mode 100644 index b195c0d..0000000 --- a/sdk/go/model_event_out.go +++ /dev/null @@ -1,369 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "time" - "bytes" - "fmt" -) - -// checks if the EventOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &EventOut{} - -// EventOut struct for EventOut -type EventOut struct { - Action string `json:"action"` - ActorName NullableString `json:"actor_name,omitempty"` - ArtId NullableString `json:"art_id,omitempty"` - CreatedAt time.Time `json:"created_at"` - DriveId string `json:"drive_id"` - Id string `json:"id"` - Metadata map[string]interface{} `json:"metadata,omitempty"` -} - -type _EventOut EventOut - -// NewEventOut instantiates a new EventOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewEventOut(action string, createdAt time.Time, driveId string, id string) *EventOut { - this := EventOut{} - this.Action = action - this.CreatedAt = createdAt - this.DriveId = driveId - this.Id = id - return &this -} - -// NewEventOutWithDefaults instantiates a new EventOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewEventOutWithDefaults() *EventOut { - this := EventOut{} - return &this -} - -// GetAction returns the Action field value -func (o *EventOut) GetAction() string { - if o == nil { - var ret string - return ret - } - - return o.Action -} - -// GetActionOk returns a tuple with the Action field value -// and a boolean to check if the value has been set. -func (o *EventOut) GetActionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Action, true -} - -// SetAction sets field value -func (o *EventOut) SetAction(v string) { - o.Action = v -} - -// GetActorName returns the ActorName field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *EventOut) GetActorName() string { - if o == nil || IsNil(o.ActorName.Get()) { - var ret string - return ret - } - return *o.ActorName.Get() -} - -// GetActorNameOk returns a tuple with the ActorName field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *EventOut) GetActorNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ActorName.Get(), o.ActorName.IsSet() -} - -// HasActorName returns a boolean if a field has been set. -func (o *EventOut) HasActorName() bool { - if o != nil && o.ActorName.IsSet() { - return true - } - - return false -} - -// SetActorName gets a reference to the given NullableString and assigns it to the ActorName field. -func (o *EventOut) SetActorName(v string) { - o.ActorName.Set(&v) -} -// SetActorNameNil sets the value for ActorName to be an explicit nil -func (o *EventOut) SetActorNameNil() { - o.ActorName.Set(nil) -} - -// UnsetActorName ensures that no value is present for ActorName, not even an explicit nil -func (o *EventOut) UnsetActorName() { - o.ActorName.Unset() -} - -// GetArtId returns the ArtId field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *EventOut) GetArtId() string { - if o == nil || IsNil(o.ArtId.Get()) { - var ret string - return ret - } - return *o.ArtId.Get() -} - -// GetArtIdOk returns a tuple with the ArtId field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *EventOut) GetArtIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ArtId.Get(), o.ArtId.IsSet() -} - -// HasArtId returns a boolean if a field has been set. -func (o *EventOut) HasArtId() bool { - if o != nil && o.ArtId.IsSet() { - return true - } - - return false -} - -// SetArtId gets a reference to the given NullableString and assigns it to the ArtId field. -func (o *EventOut) SetArtId(v string) { - o.ArtId.Set(&v) -} -// SetArtIdNil sets the value for ArtId to be an explicit nil -func (o *EventOut) SetArtIdNil() { - o.ArtId.Set(nil) -} - -// UnsetArtId ensures that no value is present for ArtId, not even an explicit nil -func (o *EventOut) UnsetArtId() { - o.ArtId.Unset() -} - -// GetCreatedAt returns the CreatedAt field value -func (o *EventOut) GetCreatedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value -// and a boolean to check if the value has been set. -func (o *EventOut) GetCreatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.CreatedAt, true -} - -// SetCreatedAt sets field value -func (o *EventOut) SetCreatedAt(v time.Time) { - o.CreatedAt = v -} - -// GetDriveId returns the DriveId field value -func (o *EventOut) GetDriveId() string { - if o == nil { - var ret string - return ret - } - - return o.DriveId -} - -// GetDriveIdOk returns a tuple with the DriveId field value -// and a boolean to check if the value has been set. -func (o *EventOut) GetDriveIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.DriveId, true -} - -// SetDriveId sets field value -func (o *EventOut) SetDriveId(v string) { - o.DriveId = v -} - -// GetId returns the Id field value -func (o *EventOut) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *EventOut) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *EventOut) SetId(v string) { - o.Id = v -} - -// GetMetadata returns the Metadata field value if set, zero value otherwise. -func (o *EventOut) GetMetadata() map[string]interface{} { - if o == nil || IsNil(o.Metadata) { - var ret map[string]interface{} - return ret - } - return o.Metadata -} - -// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *EventOut) GetMetadataOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Metadata) { - return map[string]interface{}{}, false - } - return o.Metadata, true -} - -// HasMetadata returns a boolean if a field has been set. -func (o *EventOut) HasMetadata() bool { - if o != nil && !IsNil(o.Metadata) { - return true - } - - return false -} - -// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. -func (o *EventOut) SetMetadata(v map[string]interface{}) { - o.Metadata = v -} - -func (o EventOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o EventOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["action"] = o.Action - if o.ActorName.IsSet() { - toSerialize["actor_name"] = o.ActorName.Get() - } - if o.ArtId.IsSet() { - toSerialize["art_id"] = o.ArtId.Get() - } - toSerialize["created_at"] = o.CreatedAt - toSerialize["drive_id"] = o.DriveId - toSerialize["id"] = o.Id - if !IsNil(o.Metadata) { - toSerialize["metadata"] = o.Metadata - } - return toSerialize, nil -} - -func (o *EventOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "action", - "created_at", - "drive_id", - "id", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varEventOut := _EventOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varEventOut) - - if err != nil { - return err - } - - *o = EventOut(varEventOut) - - return err -} - -type NullableEventOut struct { - value *EventOut - isSet bool -} - -func (v NullableEventOut) Get() *EventOut { - return v.value -} - -func (v *NullableEventOut) Set(val *EventOut) { - v.value = val - v.isSet = true -} - -func (v NullableEventOut) IsSet() bool { - return v.isSet -} - -func (v *NullableEventOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableEventOut(val *EventOut) *NullableEventOut { - return &NullableEventOut{value: val, isSet: true} -} - -func (v NullableEventOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableEventOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_event_page.go b/sdk/go/model_event_page.go deleted file mode 100644 index 9ab78ea..0000000 --- a/sdk/go/model_event_page.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the EventPage type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &EventPage{} - -// EventPage struct for EventPage -type EventPage struct { - Items []EventOut `json:"items"` - NextCursor NullableString `json:"next_cursor,omitempty"` -} - -type _EventPage EventPage - -// NewEventPage instantiates a new EventPage object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewEventPage(items []EventOut) *EventPage { - this := EventPage{} - this.Items = items - return &this -} - -// NewEventPageWithDefaults instantiates a new EventPage object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewEventPageWithDefaults() *EventPage { - this := EventPage{} - return &this -} - -// GetItems returns the Items field value -func (o *EventPage) GetItems() []EventOut { - if o == nil { - var ret []EventOut - return ret - } - - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value -// and a boolean to check if the value has been set. -func (o *EventPage) GetItemsOk() ([]EventOut, bool) { - if o == nil { - return nil, false - } - return o.Items, true -} - -// SetItems sets field value -func (o *EventPage) SetItems(v []EventOut) { - o.Items = v -} - -// GetNextCursor returns the NextCursor field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *EventPage) GetNextCursor() string { - if o == nil || IsNil(o.NextCursor.Get()) { - var ret string - return ret - } - return *o.NextCursor.Get() -} - -// GetNextCursorOk returns a tuple with the NextCursor field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *EventPage) GetNextCursorOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.NextCursor.Get(), o.NextCursor.IsSet() -} - -// HasNextCursor returns a boolean if a field has been set. -func (o *EventPage) HasNextCursor() bool { - if o != nil && o.NextCursor.IsSet() { - return true - } - - return false -} - -// SetNextCursor gets a reference to the given NullableString and assigns it to the NextCursor field. -func (o *EventPage) SetNextCursor(v string) { - o.NextCursor.Set(&v) -} -// SetNextCursorNil sets the value for NextCursor to be an explicit nil -func (o *EventPage) SetNextCursorNil() { - o.NextCursor.Set(nil) -} - -// UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil -func (o *EventPage) UnsetNextCursor() { - o.NextCursor.Unset() -} - -func (o EventPage) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o EventPage) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["items"] = o.Items - if o.NextCursor.IsSet() { - toSerialize["next_cursor"] = o.NextCursor.Get() - } - return toSerialize, nil -} - -func (o *EventPage) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "items", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varEventPage := _EventPage{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varEventPage) - - if err != nil { - return err - } - - *o = EventPage(varEventPage) - - return err -} - -type NullableEventPage struct { - value *EventPage - isSet bool -} - -func (v NullableEventPage) Get() *EventPage { - return v.value -} - -func (v *NullableEventPage) Set(val *EventPage) { - v.value = val - v.isSet = true -} - -func (v NullableEventPage) IsSet() bool { - return v.isSet -} - -func (v *NullableEventPage) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableEventPage(val *EventPage) *NullableEventPage { - return &NullableEventPage{value: val, isSet: true} -} - -func (v NullableEventPage) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableEventPage) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_extension_exchange_request.go b/sdk/go/model_extension_exchange_request.go deleted file mode 100644 index 676a2a9..0000000 --- a/sdk/go/model_extension_exchange_request.go +++ /dev/null @@ -1,186 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the ExtensionExchangeRequest type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ExtensionExchangeRequest{} - -// ExtensionExchangeRequest Single-use ticket → JWT pair. Called by `auth-complete.html` inside the SnipIt extension. No `Authorization` header — the ticket itself is the credential. -type ExtensionExchangeRequest struct { - // The extension's ID (Chrome Web Store ID or unpacked dev ID). - ExtId string `json:"ext_id"` - // The opaque ticket from the /auth/callback handoff. - Ticket string `json:"ticket"` -} - -type _ExtensionExchangeRequest ExtensionExchangeRequest - -// NewExtensionExchangeRequest instantiates a new ExtensionExchangeRequest object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewExtensionExchangeRequest(extId string, ticket string) *ExtensionExchangeRequest { - this := ExtensionExchangeRequest{} - this.ExtId = extId - this.Ticket = ticket - return &this -} - -// NewExtensionExchangeRequestWithDefaults instantiates a new ExtensionExchangeRequest object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewExtensionExchangeRequestWithDefaults() *ExtensionExchangeRequest { - this := ExtensionExchangeRequest{} - return &this -} - -// GetExtId returns the ExtId field value -func (o *ExtensionExchangeRequest) GetExtId() string { - if o == nil { - var ret string - return ret - } - - return o.ExtId -} - -// GetExtIdOk returns a tuple with the ExtId field value -// and a boolean to check if the value has been set. -func (o *ExtensionExchangeRequest) GetExtIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ExtId, true -} - -// SetExtId sets field value -func (o *ExtensionExchangeRequest) SetExtId(v string) { - o.ExtId = v -} - -// GetTicket returns the Ticket field value -func (o *ExtensionExchangeRequest) GetTicket() string { - if o == nil { - var ret string - return ret - } - - return o.Ticket -} - -// GetTicketOk returns a tuple with the Ticket field value -// and a boolean to check if the value has been set. -func (o *ExtensionExchangeRequest) GetTicketOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Ticket, true -} - -// SetTicket sets field value -func (o *ExtensionExchangeRequest) SetTicket(v string) { - o.Ticket = v -} - -func (o ExtensionExchangeRequest) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ExtensionExchangeRequest) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["ext_id"] = o.ExtId - toSerialize["ticket"] = o.Ticket - return toSerialize, nil -} - -func (o *ExtensionExchangeRequest) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "ext_id", - "ticket", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varExtensionExchangeRequest := _ExtensionExchangeRequest{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varExtensionExchangeRequest) - - if err != nil { - return err - } - - *o = ExtensionExchangeRequest(varExtensionExchangeRequest) - - return err -} - -type NullableExtensionExchangeRequest struct { - value *ExtensionExchangeRequest - isSet bool -} - -func (v NullableExtensionExchangeRequest) Get() *ExtensionExchangeRequest { - return v.value -} - -func (v *NullableExtensionExchangeRequest) Set(val *ExtensionExchangeRequest) { - v.value = val - v.isSet = true -} - -func (v NullableExtensionExchangeRequest) IsSet() bool { - return v.isSet -} - -func (v *NullableExtensionExchangeRequest) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableExtensionExchangeRequest(val *ExtensionExchangeRequest) *NullableExtensionExchangeRequest { - return &NullableExtensionExchangeRequest{value: val, isSet: true} -} - -func (v NullableExtensionExchangeRequest) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableExtensionExchangeRequest) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_extension_exchange_response.go b/sdk/go/model_extension_exchange_response.go deleted file mode 100644 index cdf468b..0000000 --- a/sdk/go/model_extension_exchange_response.go +++ /dev/null @@ -1,324 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the ExtensionExchangeResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ExtensionExchangeResponse{} - -// ExtensionExchangeResponse struct for ExtensionExchangeResponse -type ExtensionExchangeResponse struct { - // 15-minute access_token (scope=extension). - AccessToken string `json:"access_token"` - // The drive these credentials are scoped to. - DriveId string `json:"drive_id"` - // Seconds until access_token expiry. - ExpiresIn int32 `json:"expires_in"` - // 90-day identity_assertion. Refresh via POST /oauth2/token. - IdentityAssertion string `json:"identity_assertion"` - Scope *string `json:"scope,omitempty"` - TokenType *string `json:"token_type,omitempty"` -} - -type _ExtensionExchangeResponse ExtensionExchangeResponse - -// NewExtensionExchangeResponse instantiates a new ExtensionExchangeResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewExtensionExchangeResponse(accessToken string, driveId string, expiresIn int32, identityAssertion string) *ExtensionExchangeResponse { - this := ExtensionExchangeResponse{} - this.AccessToken = accessToken - this.DriveId = driveId - this.ExpiresIn = expiresIn - this.IdentityAssertion = identityAssertion - var scope string = "extension" - this.Scope = &scope - var tokenType string = "Bearer" - this.TokenType = &tokenType - return &this -} - -// NewExtensionExchangeResponseWithDefaults instantiates a new ExtensionExchangeResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewExtensionExchangeResponseWithDefaults() *ExtensionExchangeResponse { - this := ExtensionExchangeResponse{} - var scope string = "extension" - this.Scope = &scope - var tokenType string = "Bearer" - this.TokenType = &tokenType - return &this -} - -// GetAccessToken returns the AccessToken field value -func (o *ExtensionExchangeResponse) GetAccessToken() string { - if o == nil { - var ret string - return ret - } - - return o.AccessToken -} - -// GetAccessTokenOk returns a tuple with the AccessToken field value -// and a boolean to check if the value has been set. -func (o *ExtensionExchangeResponse) GetAccessTokenOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AccessToken, true -} - -// SetAccessToken sets field value -func (o *ExtensionExchangeResponse) SetAccessToken(v string) { - o.AccessToken = v -} - -// GetDriveId returns the DriveId field value -func (o *ExtensionExchangeResponse) GetDriveId() string { - if o == nil { - var ret string - return ret - } - - return o.DriveId -} - -// GetDriveIdOk returns a tuple with the DriveId field value -// and a boolean to check if the value has been set. -func (o *ExtensionExchangeResponse) GetDriveIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.DriveId, true -} - -// SetDriveId sets field value -func (o *ExtensionExchangeResponse) SetDriveId(v string) { - o.DriveId = v -} - -// GetExpiresIn returns the ExpiresIn field value -func (o *ExtensionExchangeResponse) GetExpiresIn() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.ExpiresIn -} - -// GetExpiresInOk returns a tuple with the ExpiresIn field value -// and a boolean to check if the value has been set. -func (o *ExtensionExchangeResponse) GetExpiresInOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.ExpiresIn, true -} - -// SetExpiresIn sets field value -func (o *ExtensionExchangeResponse) SetExpiresIn(v int32) { - o.ExpiresIn = v -} - -// GetIdentityAssertion returns the IdentityAssertion field value -func (o *ExtensionExchangeResponse) GetIdentityAssertion() string { - if o == nil { - var ret string - return ret - } - - return o.IdentityAssertion -} - -// GetIdentityAssertionOk returns a tuple with the IdentityAssertion field value -// and a boolean to check if the value has been set. -func (o *ExtensionExchangeResponse) GetIdentityAssertionOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.IdentityAssertion, true -} - -// SetIdentityAssertion sets field value -func (o *ExtensionExchangeResponse) SetIdentityAssertion(v string) { - o.IdentityAssertion = v -} - -// GetScope returns the Scope field value if set, zero value otherwise. -func (o *ExtensionExchangeResponse) GetScope() string { - if o == nil || IsNil(o.Scope) { - var ret string - return ret - } - return *o.Scope -} - -// GetScopeOk returns a tuple with the Scope field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ExtensionExchangeResponse) GetScopeOk() (*string, bool) { - if o == nil || IsNil(o.Scope) { - return nil, false - } - return o.Scope, true -} - -// HasScope returns a boolean if a field has been set. -func (o *ExtensionExchangeResponse) HasScope() bool { - if o != nil && !IsNil(o.Scope) { - return true - } - - return false -} - -// SetScope gets a reference to the given string and assigns it to the Scope field. -func (o *ExtensionExchangeResponse) SetScope(v string) { - o.Scope = &v -} - -// GetTokenType returns the TokenType field value if set, zero value otherwise. -func (o *ExtensionExchangeResponse) GetTokenType() string { - if o == nil || IsNil(o.TokenType) { - var ret string - return ret - } - return *o.TokenType -} - -// GetTokenTypeOk returns a tuple with the TokenType field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ExtensionExchangeResponse) GetTokenTypeOk() (*string, bool) { - if o == nil || IsNil(o.TokenType) { - return nil, false - } - return o.TokenType, true -} - -// HasTokenType returns a boolean if a field has been set. -func (o *ExtensionExchangeResponse) HasTokenType() bool { - if o != nil && !IsNil(o.TokenType) { - return true - } - - return false -} - -// SetTokenType gets a reference to the given string and assigns it to the TokenType field. -func (o *ExtensionExchangeResponse) SetTokenType(v string) { - o.TokenType = &v -} - -func (o ExtensionExchangeResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ExtensionExchangeResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["access_token"] = o.AccessToken - toSerialize["drive_id"] = o.DriveId - toSerialize["expires_in"] = o.ExpiresIn - toSerialize["identity_assertion"] = o.IdentityAssertion - if !IsNil(o.Scope) { - toSerialize["scope"] = o.Scope - } - if !IsNil(o.TokenType) { - toSerialize["token_type"] = o.TokenType - } - return toSerialize, nil -} - -func (o *ExtensionExchangeResponse) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "access_token", - "drive_id", - "expires_in", - "identity_assertion", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varExtensionExchangeResponse := _ExtensionExchangeResponse{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varExtensionExchangeResponse) - - if err != nil { - return err - } - - *o = ExtensionExchangeResponse(varExtensionExchangeResponse) - - return err -} - -type NullableExtensionExchangeResponse struct { - value *ExtensionExchangeResponse - isSet bool -} - -func (v NullableExtensionExchangeResponse) Get() *ExtensionExchangeResponse { - return v.value -} - -func (v *NullableExtensionExchangeResponse) Set(val *ExtensionExchangeResponse) { - v.value = val - v.isSet = true -} - -func (v NullableExtensionExchangeResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableExtensionExchangeResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableExtensionExchangeResponse(val *ExtensionExchangeResponse) *NullableExtensionExchangeResponse { - return &NullableExtensionExchangeResponse{value: val, isSet: true} -} - -func (v NullableExtensionExchangeResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableExtensionExchangeResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_feedback_create_out.go b/sdk/go/model_feedback_create_out.go deleted file mode 100644 index 955bfda..0000000 --- a/sdk/go/model_feedback_create_out.go +++ /dev/null @@ -1,258 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the FeedbackCreateOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &FeedbackCreateOut{} - -// FeedbackCreateOut struct for FeedbackCreateOut -type FeedbackCreateOut struct { - Contact bool `json:"contact"` - Id string `json:"id"` - Note NullableString `json:"note,omitempty"` - Status string `json:"status"` -} - -type _FeedbackCreateOut FeedbackCreateOut - -// NewFeedbackCreateOut instantiates a new FeedbackCreateOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewFeedbackCreateOut(contact bool, id string, status string) *FeedbackCreateOut { - this := FeedbackCreateOut{} - this.Contact = contact - this.Id = id - this.Status = status - return &this -} - -// NewFeedbackCreateOutWithDefaults instantiates a new FeedbackCreateOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewFeedbackCreateOutWithDefaults() *FeedbackCreateOut { - this := FeedbackCreateOut{} - return &this -} - -// GetContact returns the Contact field value -func (o *FeedbackCreateOut) GetContact() bool { - if o == nil { - var ret bool - return ret - } - - return o.Contact -} - -// GetContactOk returns a tuple with the Contact field value -// and a boolean to check if the value has been set. -func (o *FeedbackCreateOut) GetContactOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Contact, true -} - -// SetContact sets field value -func (o *FeedbackCreateOut) SetContact(v bool) { - o.Contact = v -} - -// GetId returns the Id field value -func (o *FeedbackCreateOut) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *FeedbackCreateOut) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *FeedbackCreateOut) SetId(v string) { - o.Id = v -} - -// GetNote returns the Note field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *FeedbackCreateOut) GetNote() string { - if o == nil || IsNil(o.Note.Get()) { - var ret string - return ret - } - return *o.Note.Get() -} - -// GetNoteOk returns a tuple with the Note field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FeedbackCreateOut) GetNoteOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Note.Get(), o.Note.IsSet() -} - -// HasNote returns a boolean if a field has been set. -func (o *FeedbackCreateOut) HasNote() bool { - if o != nil && o.Note.IsSet() { - return true - } - - return false -} - -// SetNote gets a reference to the given NullableString and assigns it to the Note field. -func (o *FeedbackCreateOut) SetNote(v string) { - o.Note.Set(&v) -} -// SetNoteNil sets the value for Note to be an explicit nil -func (o *FeedbackCreateOut) SetNoteNil() { - o.Note.Set(nil) -} - -// UnsetNote ensures that no value is present for Note, not even an explicit nil -func (o *FeedbackCreateOut) UnsetNote() { - o.Note.Unset() -} - -// GetStatus returns the Status field value -func (o *FeedbackCreateOut) GetStatus() string { - if o == nil { - var ret string - return ret - } - - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -func (o *FeedbackCreateOut) GetStatusOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Status, true -} - -// SetStatus sets field value -func (o *FeedbackCreateOut) SetStatus(v string) { - o.Status = v -} - -func (o FeedbackCreateOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o FeedbackCreateOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["contact"] = o.Contact - toSerialize["id"] = o.Id - if o.Note.IsSet() { - toSerialize["note"] = o.Note.Get() - } - toSerialize["status"] = o.Status - return toSerialize, nil -} - -func (o *FeedbackCreateOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "contact", - "id", - "status", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varFeedbackCreateOut := _FeedbackCreateOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varFeedbackCreateOut) - - if err != nil { - return err - } - - *o = FeedbackCreateOut(varFeedbackCreateOut) - - return err -} - -type NullableFeedbackCreateOut struct { - value *FeedbackCreateOut - isSet bool -} - -func (v NullableFeedbackCreateOut) Get() *FeedbackCreateOut { - return v.value -} - -func (v *NullableFeedbackCreateOut) Set(val *FeedbackCreateOut) { - v.value = val - v.isSet = true -} - -func (v NullableFeedbackCreateOut) IsSet() bool { - return v.isSet -} - -func (v *NullableFeedbackCreateOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFeedbackCreateOut(val *FeedbackCreateOut) *NullableFeedbackCreateOut { - return &NullableFeedbackCreateOut{value: val, isSet: true} -} - -func (v NullableFeedbackCreateOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFeedbackCreateOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_feedback_status_out.go b/sdk/go/model_feedback_status_out.go deleted file mode 100644 index 5b68724..0000000 --- a/sdk/go/model_feedback_status_out.go +++ /dev/null @@ -1,371 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "time" - "bytes" - "fmt" -) - -// checks if the FeedbackStatusOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &FeedbackStatusOut{} - -// FeedbackStatusOut GET /v0/feedback/{fbk_id} response — lifecycle status of feedback THIS drive filed. -type FeedbackStatusOut struct { - Contact bool `json:"contact"` - CreatedAt time.Time `json:"created_at"` - DuplicateOf NullableString `json:"duplicate_of,omitempty"` - Id string `json:"id"` - Kind string `json:"kind"` - Status string `json:"status"` - StatusChangedAt time.Time `json:"status_changed_at"` - Title string `json:"title"` -} - -type _FeedbackStatusOut FeedbackStatusOut - -// NewFeedbackStatusOut instantiates a new FeedbackStatusOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewFeedbackStatusOut(contact bool, createdAt time.Time, id string, kind string, status string, statusChangedAt time.Time, title string) *FeedbackStatusOut { - this := FeedbackStatusOut{} - this.Contact = contact - this.CreatedAt = createdAt - this.Id = id - this.Kind = kind - this.Status = status - this.StatusChangedAt = statusChangedAt - this.Title = title - return &this -} - -// NewFeedbackStatusOutWithDefaults instantiates a new FeedbackStatusOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewFeedbackStatusOutWithDefaults() *FeedbackStatusOut { - this := FeedbackStatusOut{} - return &this -} - -// GetContact returns the Contact field value -func (o *FeedbackStatusOut) GetContact() bool { - if o == nil { - var ret bool - return ret - } - - return o.Contact -} - -// GetContactOk returns a tuple with the Contact field value -// and a boolean to check if the value has been set. -func (o *FeedbackStatusOut) GetContactOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Contact, true -} - -// SetContact sets field value -func (o *FeedbackStatusOut) SetContact(v bool) { - o.Contact = v -} - -// GetCreatedAt returns the CreatedAt field value -func (o *FeedbackStatusOut) GetCreatedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value -// and a boolean to check if the value has been set. -func (o *FeedbackStatusOut) GetCreatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.CreatedAt, true -} - -// SetCreatedAt sets field value -func (o *FeedbackStatusOut) SetCreatedAt(v time.Time) { - o.CreatedAt = v -} - -// GetDuplicateOf returns the DuplicateOf field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *FeedbackStatusOut) GetDuplicateOf() string { - if o == nil || IsNil(o.DuplicateOf.Get()) { - var ret string - return ret - } - return *o.DuplicateOf.Get() -} - -// GetDuplicateOfOk returns a tuple with the DuplicateOf field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FeedbackStatusOut) GetDuplicateOfOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.DuplicateOf.Get(), o.DuplicateOf.IsSet() -} - -// HasDuplicateOf returns a boolean if a field has been set. -func (o *FeedbackStatusOut) HasDuplicateOf() bool { - if o != nil && o.DuplicateOf.IsSet() { - return true - } - - return false -} - -// SetDuplicateOf gets a reference to the given NullableString and assigns it to the DuplicateOf field. -func (o *FeedbackStatusOut) SetDuplicateOf(v string) { - o.DuplicateOf.Set(&v) -} -// SetDuplicateOfNil sets the value for DuplicateOf to be an explicit nil -func (o *FeedbackStatusOut) SetDuplicateOfNil() { - o.DuplicateOf.Set(nil) -} - -// UnsetDuplicateOf ensures that no value is present for DuplicateOf, not even an explicit nil -func (o *FeedbackStatusOut) UnsetDuplicateOf() { - o.DuplicateOf.Unset() -} - -// GetId returns the Id field value -func (o *FeedbackStatusOut) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *FeedbackStatusOut) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *FeedbackStatusOut) SetId(v string) { - o.Id = v -} - -// GetKind returns the Kind field value -func (o *FeedbackStatusOut) GetKind() string { - if o == nil { - var ret string - return ret - } - - return o.Kind -} - -// GetKindOk returns a tuple with the Kind field value -// and a boolean to check if the value has been set. -func (o *FeedbackStatusOut) GetKindOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Kind, true -} - -// SetKind sets field value -func (o *FeedbackStatusOut) SetKind(v string) { - o.Kind = v -} - -// GetStatus returns the Status field value -func (o *FeedbackStatusOut) GetStatus() string { - if o == nil { - var ret string - return ret - } - - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -func (o *FeedbackStatusOut) GetStatusOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Status, true -} - -// SetStatus sets field value -func (o *FeedbackStatusOut) SetStatus(v string) { - o.Status = v -} - -// GetStatusChangedAt returns the StatusChangedAt field value -func (o *FeedbackStatusOut) GetStatusChangedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.StatusChangedAt -} - -// GetStatusChangedAtOk returns a tuple with the StatusChangedAt field value -// and a boolean to check if the value has been set. -func (o *FeedbackStatusOut) GetStatusChangedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.StatusChangedAt, true -} - -// SetStatusChangedAt sets field value -func (o *FeedbackStatusOut) SetStatusChangedAt(v time.Time) { - o.StatusChangedAt = v -} - -// GetTitle returns the Title field value -func (o *FeedbackStatusOut) GetTitle() string { - if o == nil { - var ret string - return ret - } - - return o.Title -} - -// GetTitleOk returns a tuple with the Title field value -// and a boolean to check if the value has been set. -func (o *FeedbackStatusOut) GetTitleOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Title, true -} - -// SetTitle sets field value -func (o *FeedbackStatusOut) SetTitle(v string) { - o.Title = v -} - -func (o FeedbackStatusOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o FeedbackStatusOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["contact"] = o.Contact - toSerialize["created_at"] = o.CreatedAt - if o.DuplicateOf.IsSet() { - toSerialize["duplicate_of"] = o.DuplicateOf.Get() - } - toSerialize["id"] = o.Id - toSerialize["kind"] = o.Kind - toSerialize["status"] = o.Status - toSerialize["status_changed_at"] = o.StatusChangedAt - toSerialize["title"] = o.Title - return toSerialize, nil -} - -func (o *FeedbackStatusOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "contact", - "created_at", - "id", - "kind", - "status", - "status_changed_at", - "title", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varFeedbackStatusOut := _FeedbackStatusOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varFeedbackStatusOut) - - if err != nil { - return err - } - - *o = FeedbackStatusOut(varFeedbackStatusOut) - - return err -} - -type NullableFeedbackStatusOut struct { - value *FeedbackStatusOut - isSet bool -} - -func (v NullableFeedbackStatusOut) Get() *FeedbackStatusOut { - return v.value -} - -func (v *NullableFeedbackStatusOut) Set(val *FeedbackStatusOut) { - v.value = val - v.isSet = true -} - -func (v NullableFeedbackStatusOut) IsSet() bool { - return v.isSet -} - -func (v *NullableFeedbackStatusOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFeedbackStatusOut(val *FeedbackStatusOut) *NullableFeedbackStatusOut { - return &NullableFeedbackStatusOut{value: val, isSet: true} -} - -func (v NullableFeedbackStatusOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFeedbackStatusOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_find_hit_out.go b/sdk/go/model_find_hit_out.go deleted file mode 100644 index 734f6eb..0000000 --- a/sdk/go/model_find_hit_out.go +++ /dev/null @@ -1,897 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "time" - "bytes" - "fmt" -) - -// checks if the FindHitOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &FindHitOut{} - -// FindHitOut One passage-level hit from `/v0/find` (hybrid chunk RAG over `embed_chunks`). The unit is a passage, not a file — consecutive `ord` values from the same `art_id` are normal because chunks overlap by ~400 tokens. Span fields are modality-aware: only the pair matching `modality` is populated, the others stay None. -type FindHitOut struct { - ArtId string `json:"art_id"` - CharEnd NullableInt32 `json:"char_end,omitempty"` - CharStart NullableInt32 `json:"char_start,omitempty"` - ContentType string `json:"content_type"` - DriveId string `json:"drive_id"` - FileType string `json:"file_type"` - Labels []string `json:"labels,omitempty"` - Modality string `json:"modality"` - Ord int32 `json:"ord"` - PageEnd NullableInt32 `json:"page_end,omitempty"` - PageStart NullableInt32 `json:"page_start,omitempty"` - Path string `json:"path"` - RankLexical NullableInt32 `json:"rank_lexical,omitempty"` - RankSemantic NullableInt32 `json:"rank_semantic,omitempty"` - Score float32 `json:"score"` - Snippet string `json:"snippet"` - Text string `json:"text"` - TimeEndMs NullableInt32 `json:"time_end_ms,omitempty"` - TimeStartMs NullableInt32 `json:"time_start_ms,omitempty"` - UpdatedAt time.Time `json:"updated_at"` - Url string `json:"url"` - VersionNumber int32 `json:"version_number"` -} - -type _FindHitOut FindHitOut - -// NewFindHitOut instantiates a new FindHitOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewFindHitOut(artId string, contentType string, driveId string, fileType string, modality string, ord int32, path string, score float32, snippet string, text string, updatedAt time.Time, url string, versionNumber int32) *FindHitOut { - this := FindHitOut{} - this.ArtId = artId - this.ContentType = contentType - this.DriveId = driveId - this.FileType = fileType - this.Modality = modality - this.Ord = ord - this.Path = path - this.Score = score - this.Snippet = snippet - this.Text = text - this.UpdatedAt = updatedAt - this.Url = url - this.VersionNumber = versionNumber - return &this -} - -// NewFindHitOutWithDefaults instantiates a new FindHitOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewFindHitOutWithDefaults() *FindHitOut { - this := FindHitOut{} - return &this -} - -// GetArtId returns the ArtId field value -func (o *FindHitOut) GetArtId() string { - if o == nil { - var ret string - return ret - } - - return o.ArtId -} - -// GetArtIdOk returns a tuple with the ArtId field value -// and a boolean to check if the value has been set. -func (o *FindHitOut) GetArtIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ArtId, true -} - -// SetArtId sets field value -func (o *FindHitOut) SetArtId(v string) { - o.ArtId = v -} - -// GetCharEnd returns the CharEnd field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *FindHitOut) GetCharEnd() int32 { - if o == nil || IsNil(o.CharEnd.Get()) { - var ret int32 - return ret - } - return *o.CharEnd.Get() -} - -// GetCharEndOk returns a tuple with the CharEnd field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FindHitOut) GetCharEndOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.CharEnd.Get(), o.CharEnd.IsSet() -} - -// HasCharEnd returns a boolean if a field has been set. -func (o *FindHitOut) HasCharEnd() bool { - if o != nil && o.CharEnd.IsSet() { - return true - } - - return false -} - -// SetCharEnd gets a reference to the given NullableInt32 and assigns it to the CharEnd field. -func (o *FindHitOut) SetCharEnd(v int32) { - o.CharEnd.Set(&v) -} -// SetCharEndNil sets the value for CharEnd to be an explicit nil -func (o *FindHitOut) SetCharEndNil() { - o.CharEnd.Set(nil) -} - -// UnsetCharEnd ensures that no value is present for CharEnd, not even an explicit nil -func (o *FindHitOut) UnsetCharEnd() { - o.CharEnd.Unset() -} - -// GetCharStart returns the CharStart field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *FindHitOut) GetCharStart() int32 { - if o == nil || IsNil(o.CharStart.Get()) { - var ret int32 - return ret - } - return *o.CharStart.Get() -} - -// GetCharStartOk returns a tuple with the CharStart field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FindHitOut) GetCharStartOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.CharStart.Get(), o.CharStart.IsSet() -} - -// HasCharStart returns a boolean if a field has been set. -func (o *FindHitOut) HasCharStart() bool { - if o != nil && o.CharStart.IsSet() { - return true - } - - return false -} - -// SetCharStart gets a reference to the given NullableInt32 and assigns it to the CharStart field. -func (o *FindHitOut) SetCharStart(v int32) { - o.CharStart.Set(&v) -} -// SetCharStartNil sets the value for CharStart to be an explicit nil -func (o *FindHitOut) SetCharStartNil() { - o.CharStart.Set(nil) -} - -// UnsetCharStart ensures that no value is present for CharStart, not even an explicit nil -func (o *FindHitOut) UnsetCharStart() { - o.CharStart.Unset() -} - -// GetContentType returns the ContentType field value -func (o *FindHitOut) GetContentType() string { - if o == nil { - var ret string - return ret - } - - return o.ContentType -} - -// GetContentTypeOk returns a tuple with the ContentType field value -// and a boolean to check if the value has been set. -func (o *FindHitOut) GetContentTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ContentType, true -} - -// SetContentType sets field value -func (o *FindHitOut) SetContentType(v string) { - o.ContentType = v -} - -// GetDriveId returns the DriveId field value -func (o *FindHitOut) GetDriveId() string { - if o == nil { - var ret string - return ret - } - - return o.DriveId -} - -// GetDriveIdOk returns a tuple with the DriveId field value -// and a boolean to check if the value has been set. -func (o *FindHitOut) GetDriveIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.DriveId, true -} - -// SetDriveId sets field value -func (o *FindHitOut) SetDriveId(v string) { - o.DriveId = v -} - -// GetFileType returns the FileType field value -func (o *FindHitOut) GetFileType() string { - if o == nil { - var ret string - return ret - } - - return o.FileType -} - -// GetFileTypeOk returns a tuple with the FileType field value -// and a boolean to check if the value has been set. -func (o *FindHitOut) GetFileTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.FileType, true -} - -// SetFileType sets field value -func (o *FindHitOut) SetFileType(v string) { - o.FileType = v -} - -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *FindHitOut) GetLabels() []string { - if o == nil || IsNil(o.Labels) { - var ret []string - return ret - } - return o.Labels -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FindHitOut) GetLabelsOk() ([]string, bool) { - if o == nil || IsNil(o.Labels) { - return nil, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *FindHitOut) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given []string and assigns it to the Labels field. -func (o *FindHitOut) SetLabels(v []string) { - o.Labels = v -} - -// GetModality returns the Modality field value -func (o *FindHitOut) GetModality() string { - if o == nil { - var ret string - return ret - } - - return o.Modality -} - -// GetModalityOk returns a tuple with the Modality field value -// and a boolean to check if the value has been set. -func (o *FindHitOut) GetModalityOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Modality, true -} - -// SetModality sets field value -func (o *FindHitOut) SetModality(v string) { - o.Modality = v -} - -// GetOrd returns the Ord field value -func (o *FindHitOut) GetOrd() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Ord -} - -// GetOrdOk returns a tuple with the Ord field value -// and a boolean to check if the value has been set. -func (o *FindHitOut) GetOrdOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Ord, true -} - -// SetOrd sets field value -func (o *FindHitOut) SetOrd(v int32) { - o.Ord = v -} - -// GetPageEnd returns the PageEnd field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *FindHitOut) GetPageEnd() int32 { - if o == nil || IsNil(o.PageEnd.Get()) { - var ret int32 - return ret - } - return *o.PageEnd.Get() -} - -// GetPageEndOk returns a tuple with the PageEnd field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FindHitOut) GetPageEndOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.PageEnd.Get(), o.PageEnd.IsSet() -} - -// HasPageEnd returns a boolean if a field has been set. -func (o *FindHitOut) HasPageEnd() bool { - if o != nil && o.PageEnd.IsSet() { - return true - } - - return false -} - -// SetPageEnd gets a reference to the given NullableInt32 and assigns it to the PageEnd field. -func (o *FindHitOut) SetPageEnd(v int32) { - o.PageEnd.Set(&v) -} -// SetPageEndNil sets the value for PageEnd to be an explicit nil -func (o *FindHitOut) SetPageEndNil() { - o.PageEnd.Set(nil) -} - -// UnsetPageEnd ensures that no value is present for PageEnd, not even an explicit nil -func (o *FindHitOut) UnsetPageEnd() { - o.PageEnd.Unset() -} - -// GetPageStart returns the PageStart field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *FindHitOut) GetPageStart() int32 { - if o == nil || IsNil(o.PageStart.Get()) { - var ret int32 - return ret - } - return *o.PageStart.Get() -} - -// GetPageStartOk returns a tuple with the PageStart field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FindHitOut) GetPageStartOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.PageStart.Get(), o.PageStart.IsSet() -} - -// HasPageStart returns a boolean if a field has been set. -func (o *FindHitOut) HasPageStart() bool { - if o != nil && o.PageStart.IsSet() { - return true - } - - return false -} - -// SetPageStart gets a reference to the given NullableInt32 and assigns it to the PageStart field. -func (o *FindHitOut) SetPageStart(v int32) { - o.PageStart.Set(&v) -} -// SetPageStartNil sets the value for PageStart to be an explicit nil -func (o *FindHitOut) SetPageStartNil() { - o.PageStart.Set(nil) -} - -// UnsetPageStart ensures that no value is present for PageStart, not even an explicit nil -func (o *FindHitOut) UnsetPageStart() { - o.PageStart.Unset() -} - -// GetPath returns the Path field value -func (o *FindHitOut) GetPath() string { - if o == nil { - var ret string - return ret - } - - return o.Path -} - -// GetPathOk returns a tuple with the Path field value -// and a boolean to check if the value has been set. -func (o *FindHitOut) GetPathOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Path, true -} - -// SetPath sets field value -func (o *FindHitOut) SetPath(v string) { - o.Path = v -} - -// GetRankLexical returns the RankLexical field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *FindHitOut) GetRankLexical() int32 { - if o == nil || IsNil(o.RankLexical.Get()) { - var ret int32 - return ret - } - return *o.RankLexical.Get() -} - -// GetRankLexicalOk returns a tuple with the RankLexical field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FindHitOut) GetRankLexicalOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.RankLexical.Get(), o.RankLexical.IsSet() -} - -// HasRankLexical returns a boolean if a field has been set. -func (o *FindHitOut) HasRankLexical() bool { - if o != nil && o.RankLexical.IsSet() { - return true - } - - return false -} - -// SetRankLexical gets a reference to the given NullableInt32 and assigns it to the RankLexical field. -func (o *FindHitOut) SetRankLexical(v int32) { - o.RankLexical.Set(&v) -} -// SetRankLexicalNil sets the value for RankLexical to be an explicit nil -func (o *FindHitOut) SetRankLexicalNil() { - o.RankLexical.Set(nil) -} - -// UnsetRankLexical ensures that no value is present for RankLexical, not even an explicit nil -func (o *FindHitOut) UnsetRankLexical() { - o.RankLexical.Unset() -} - -// GetRankSemantic returns the RankSemantic field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *FindHitOut) GetRankSemantic() int32 { - if o == nil || IsNil(o.RankSemantic.Get()) { - var ret int32 - return ret - } - return *o.RankSemantic.Get() -} - -// GetRankSemanticOk returns a tuple with the RankSemantic field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FindHitOut) GetRankSemanticOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.RankSemantic.Get(), o.RankSemantic.IsSet() -} - -// HasRankSemantic returns a boolean if a field has been set. -func (o *FindHitOut) HasRankSemantic() bool { - if o != nil && o.RankSemantic.IsSet() { - return true - } - - return false -} - -// SetRankSemantic gets a reference to the given NullableInt32 and assigns it to the RankSemantic field. -func (o *FindHitOut) SetRankSemantic(v int32) { - o.RankSemantic.Set(&v) -} -// SetRankSemanticNil sets the value for RankSemantic to be an explicit nil -func (o *FindHitOut) SetRankSemanticNil() { - o.RankSemantic.Set(nil) -} - -// UnsetRankSemantic ensures that no value is present for RankSemantic, not even an explicit nil -func (o *FindHitOut) UnsetRankSemantic() { - o.RankSemantic.Unset() -} - -// GetScore returns the Score field value -func (o *FindHitOut) GetScore() float32 { - if o == nil { - var ret float32 - return ret - } - - return o.Score -} - -// GetScoreOk returns a tuple with the Score field value -// and a boolean to check if the value has been set. -func (o *FindHitOut) GetScoreOk() (*float32, bool) { - if o == nil { - return nil, false - } - return &o.Score, true -} - -// SetScore sets field value -func (o *FindHitOut) SetScore(v float32) { - o.Score = v -} - -// GetSnippet returns the Snippet field value -func (o *FindHitOut) GetSnippet() string { - if o == nil { - var ret string - return ret - } - - return o.Snippet -} - -// GetSnippetOk returns a tuple with the Snippet field value -// and a boolean to check if the value has been set. -func (o *FindHitOut) GetSnippetOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Snippet, true -} - -// SetSnippet sets field value -func (o *FindHitOut) SetSnippet(v string) { - o.Snippet = v -} - -// GetText returns the Text field value -func (o *FindHitOut) GetText() string { - if o == nil { - var ret string - return ret - } - - return o.Text -} - -// GetTextOk returns a tuple with the Text field value -// and a boolean to check if the value has been set. -func (o *FindHitOut) GetTextOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Text, true -} - -// SetText sets field value -func (o *FindHitOut) SetText(v string) { - o.Text = v -} - -// GetTimeEndMs returns the TimeEndMs field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *FindHitOut) GetTimeEndMs() int32 { - if o == nil || IsNil(o.TimeEndMs.Get()) { - var ret int32 - return ret - } - return *o.TimeEndMs.Get() -} - -// GetTimeEndMsOk returns a tuple with the TimeEndMs field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FindHitOut) GetTimeEndMsOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.TimeEndMs.Get(), o.TimeEndMs.IsSet() -} - -// HasTimeEndMs returns a boolean if a field has been set. -func (o *FindHitOut) HasTimeEndMs() bool { - if o != nil && o.TimeEndMs.IsSet() { - return true - } - - return false -} - -// SetTimeEndMs gets a reference to the given NullableInt32 and assigns it to the TimeEndMs field. -func (o *FindHitOut) SetTimeEndMs(v int32) { - o.TimeEndMs.Set(&v) -} -// SetTimeEndMsNil sets the value for TimeEndMs to be an explicit nil -func (o *FindHitOut) SetTimeEndMsNil() { - o.TimeEndMs.Set(nil) -} - -// UnsetTimeEndMs ensures that no value is present for TimeEndMs, not even an explicit nil -func (o *FindHitOut) UnsetTimeEndMs() { - o.TimeEndMs.Unset() -} - -// GetTimeStartMs returns the TimeStartMs field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *FindHitOut) GetTimeStartMs() int32 { - if o == nil || IsNil(o.TimeStartMs.Get()) { - var ret int32 - return ret - } - return *o.TimeStartMs.Get() -} - -// GetTimeStartMsOk returns a tuple with the TimeStartMs field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FindHitOut) GetTimeStartMsOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.TimeStartMs.Get(), o.TimeStartMs.IsSet() -} - -// HasTimeStartMs returns a boolean if a field has been set. -func (o *FindHitOut) HasTimeStartMs() bool { - if o != nil && o.TimeStartMs.IsSet() { - return true - } - - return false -} - -// SetTimeStartMs gets a reference to the given NullableInt32 and assigns it to the TimeStartMs field. -func (o *FindHitOut) SetTimeStartMs(v int32) { - o.TimeStartMs.Set(&v) -} -// SetTimeStartMsNil sets the value for TimeStartMs to be an explicit nil -func (o *FindHitOut) SetTimeStartMsNil() { - o.TimeStartMs.Set(nil) -} - -// UnsetTimeStartMs ensures that no value is present for TimeStartMs, not even an explicit nil -func (o *FindHitOut) UnsetTimeStartMs() { - o.TimeStartMs.Unset() -} - -// GetUpdatedAt returns the UpdatedAt field value -func (o *FindHitOut) GetUpdatedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.UpdatedAt -} - -// GetUpdatedAtOk returns a tuple with the UpdatedAt field value -// and a boolean to check if the value has been set. -func (o *FindHitOut) GetUpdatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.UpdatedAt, true -} - -// SetUpdatedAt sets field value -func (o *FindHitOut) SetUpdatedAt(v time.Time) { - o.UpdatedAt = v -} - -// GetUrl returns the Url field value -func (o *FindHitOut) GetUrl() string { - if o == nil { - var ret string - return ret - } - - return o.Url -} - -// GetUrlOk returns a tuple with the Url field value -// and a boolean to check if the value has been set. -func (o *FindHitOut) GetUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Url, true -} - -// SetUrl sets field value -func (o *FindHitOut) SetUrl(v string) { - o.Url = v -} - -// GetVersionNumber returns the VersionNumber field value -func (o *FindHitOut) GetVersionNumber() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.VersionNumber -} - -// GetVersionNumberOk returns a tuple with the VersionNumber field value -// and a boolean to check if the value has been set. -func (o *FindHitOut) GetVersionNumberOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.VersionNumber, true -} - -// SetVersionNumber sets field value -func (o *FindHitOut) SetVersionNumber(v int32) { - o.VersionNumber = v -} - -func (o FindHitOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o FindHitOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["art_id"] = o.ArtId - if o.CharEnd.IsSet() { - toSerialize["char_end"] = o.CharEnd.Get() - } - if o.CharStart.IsSet() { - toSerialize["char_start"] = o.CharStart.Get() - } - toSerialize["content_type"] = o.ContentType - toSerialize["drive_id"] = o.DriveId - toSerialize["file_type"] = o.FileType - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - toSerialize["modality"] = o.Modality - toSerialize["ord"] = o.Ord - if o.PageEnd.IsSet() { - toSerialize["page_end"] = o.PageEnd.Get() - } - if o.PageStart.IsSet() { - toSerialize["page_start"] = o.PageStart.Get() - } - toSerialize["path"] = o.Path - if o.RankLexical.IsSet() { - toSerialize["rank_lexical"] = o.RankLexical.Get() - } - if o.RankSemantic.IsSet() { - toSerialize["rank_semantic"] = o.RankSemantic.Get() - } - toSerialize["score"] = o.Score - toSerialize["snippet"] = o.Snippet - toSerialize["text"] = o.Text - if o.TimeEndMs.IsSet() { - toSerialize["time_end_ms"] = o.TimeEndMs.Get() - } - if o.TimeStartMs.IsSet() { - toSerialize["time_start_ms"] = o.TimeStartMs.Get() - } - toSerialize["updated_at"] = o.UpdatedAt - toSerialize["url"] = o.Url - toSerialize["version_number"] = o.VersionNumber - return toSerialize, nil -} - -func (o *FindHitOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "art_id", - "content_type", - "drive_id", - "file_type", - "modality", - "ord", - "path", - "score", - "snippet", - "text", - "updated_at", - "url", - "version_number", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varFindHitOut := _FindHitOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varFindHitOut) - - if err != nil { - return err - } - - *o = FindHitOut(varFindHitOut) - - return err -} - -type NullableFindHitOut struct { - value *FindHitOut - isSet bool -} - -func (v NullableFindHitOut) Get() *FindHitOut { - return v.value -} - -func (v *NullableFindHitOut) Set(val *FindHitOut) { - v.value = val - v.isSet = true -} - -func (v NullableFindHitOut) IsSet() bool { - return v.isSet -} - -func (v *NullableFindHitOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFindHitOut(val *FindHitOut) *NullableFindHitOut { - return &NullableFindHitOut{value: val, isSet: true} -} - -func (v NullableFindHitOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFindHitOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_find_page.go b/sdk/go/model_find_page.go deleted file mode 100644 index 1782366..0000000 --- a/sdk/go/model_find_page.go +++ /dev/null @@ -1,156 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the FindPage type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &FindPage{} - -// FindPage `/v0/find` response — single-shot top-N, deliberately unpaginated (same contract + rationale as `SearchPage`). -type FindPage struct { - Items []FindHitOut `json:"items"` -} - -type _FindPage FindPage - -// NewFindPage instantiates a new FindPage object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewFindPage(items []FindHitOut) *FindPage { - this := FindPage{} - this.Items = items - return &this -} - -// NewFindPageWithDefaults instantiates a new FindPage object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewFindPageWithDefaults() *FindPage { - this := FindPage{} - return &this -} - -// GetItems returns the Items field value -func (o *FindPage) GetItems() []FindHitOut { - if o == nil { - var ret []FindHitOut - return ret - } - - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value -// and a boolean to check if the value has been set. -func (o *FindPage) GetItemsOk() ([]FindHitOut, bool) { - if o == nil { - return nil, false - } - return o.Items, true -} - -// SetItems sets field value -func (o *FindPage) SetItems(v []FindHitOut) { - o.Items = v -} - -func (o FindPage) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o FindPage) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["items"] = o.Items - return toSerialize, nil -} - -func (o *FindPage) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "items", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varFindPage := _FindPage{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varFindPage) - - if err != nil { - return err - } - - *o = FindPage(varFindPage) - - return err -} - -type NullableFindPage struct { - value *FindPage - isSet bool -} - -func (v NullableFindPage) Get() *FindPage { - return v.value -} - -func (v *NullableFindPage) Set(val *FindPage) { - v.value = val - v.isSet = true -} - -func (v NullableFindPage) IsSet() bool { - return v.isSet -} - -func (v *NullableFindPage) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFindPage(val *FindPage) *NullableFindPage { - return &NullableFindPage{value: val, isSet: true} -} - -func (v NullableFindPage) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFindPage) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_folder_cascade_out.go b/sdk/go/model_folder_cascade_out.go new file mode 100644 index 0000000..a556aa8 --- /dev/null +++ b/sdk/go/model_folder_cascade_out.go @@ -0,0 +1,184 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the FolderCascadeOut type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FolderCascadeOut{} + +// FolderCascadeOut struct for FolderCascadeOut +type FolderCascadeOut struct { + Cascade map[string]int32 `json:"cascade"` + Folder FolderOut `json:"folder"` +} + +type _FolderCascadeOut FolderCascadeOut + +// NewFolderCascadeOut instantiates a new FolderCascadeOut object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFolderCascadeOut(cascade map[string]int32, folder FolderOut) *FolderCascadeOut { + this := FolderCascadeOut{} + this.Cascade = cascade + this.Folder = folder + return &this +} + +// NewFolderCascadeOutWithDefaults instantiates a new FolderCascadeOut object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFolderCascadeOutWithDefaults() *FolderCascadeOut { + this := FolderCascadeOut{} + return &this +} + +// GetCascade returns the Cascade field value +func (o *FolderCascadeOut) GetCascade() map[string]int32 { + if o == nil { + var ret map[string]int32 + return ret + } + + return o.Cascade +} + +// GetCascadeOk returns a tuple with the Cascade field value +// and a boolean to check if the value has been set. +func (o *FolderCascadeOut) GetCascadeOk() (map[string]int32, bool) { + if o == nil { + return map[string]int32{}, false + } + return o.Cascade, true +} + +// SetCascade sets field value +func (o *FolderCascadeOut) SetCascade(v map[string]int32) { + o.Cascade = v +} + +// GetFolder returns the Folder field value +func (o *FolderCascadeOut) GetFolder() FolderOut { + if o == nil { + var ret FolderOut + return ret + } + + return o.Folder +} + +// GetFolderOk returns a tuple with the Folder field value +// and a boolean to check if the value has been set. +func (o *FolderCascadeOut) GetFolderOk() (*FolderOut, bool) { + if o == nil { + return nil, false + } + return &o.Folder, true +} + +// SetFolder sets field value +func (o *FolderCascadeOut) SetFolder(v FolderOut) { + o.Folder = v +} + +func (o FolderCascadeOut) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FolderCascadeOut) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["cascade"] = o.Cascade + toSerialize["folder"] = o.Folder + return toSerialize, nil +} + +func (o *FolderCascadeOut) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "cascade", + "folder", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFolderCascadeOut := _FolderCascadeOut{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFolderCascadeOut) + + if err != nil { + return err + } + + *o = FolderCascadeOut(varFolderCascadeOut) + + return err +} + +type NullableFolderCascadeOut struct { + value *FolderCascadeOut + isSet bool +} + +func (v NullableFolderCascadeOut) Get() *FolderCascadeOut { + return v.value +} + +func (v *NullableFolderCascadeOut) Set(val *FolderCascadeOut) { + v.value = val + v.isSet = true +} + +func (v NullableFolderCascadeOut) IsSet() bool { + return v.isSet +} + +func (v *NullableFolderCascadeOut) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFolderCascadeOut(val *FolderCascadeOut) *NullableFolderCascadeOut { + return &NullableFolderCascadeOut{value: val, isSet: true} +} + +func (v NullableFolderCascadeOut) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFolderCascadeOut) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/sdk/go/model_folder_copy_in.go b/sdk/go/model_folder_copy_in.go index e8ca76d..a1fa002 100644 --- a/sdk/go/model_folder_copy_in.go +++ b/sdk/go/model_folder_copy_in.go @@ -1,7 +1,7 @@ /* AgentDrive -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. API version: */ @@ -19,10 +19,11 @@ import ( // checks if the FolderCopyIn type satisfies the MappedNullable interface at compile time var _ MappedNullable = &FolderCopyIn{} -// FolderCopyIn POST /v0/folders/{fld_id}/copy body — duplicate the subtree to a new path. `path` is the target folder path (canonical, trailing slash). Its own schema (vs. reusing `FolderMoveIn`) keeps the copy surface self-documenting in the OpenAPI spec. +// FolderCopyIn POST /v0/drives/{id}/folders/{folder_id}/copy body. ``destination_drive_id`` must equal the source drive (or be absent) — cross-drive copy is out of v0 scope and rejected. type FolderCopyIn struct { - FromMetageneration NullableInt32 `json:"from_metageneration,omitempty"` - Path string `json:"path"` + DestinationDriveId NullableString `json:"destination_drive_id,omitempty" validate:"regexp=^drv_[a-f0-9]{16}$"` + DestinationName string `json:"destination_name"` + DestinationParentId string `json:"destination_parent_id" validate:"regexp=^fld_[a-f0-9]{16}$"` } type _FolderCopyIn FolderCopyIn @@ -31,9 +32,10 @@ type _FolderCopyIn FolderCopyIn // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewFolderCopyIn(path string) *FolderCopyIn { +func NewFolderCopyIn(destinationName string, destinationParentId string) *FolderCopyIn { this := FolderCopyIn{} - this.Path = path + this.DestinationName = destinationName + this.DestinationParentId = destinationParentId return &this } @@ -45,70 +47,94 @@ func NewFolderCopyInWithDefaults() *FolderCopyIn { return &this } -// GetFromMetageneration returns the FromMetageneration field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *FolderCopyIn) GetFromMetageneration() int32 { - if o == nil || IsNil(o.FromMetageneration.Get()) { - var ret int32 +// GetDestinationDriveId returns the DestinationDriveId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FolderCopyIn) GetDestinationDriveId() string { + if o == nil || IsNil(o.DestinationDriveId.Get()) { + var ret string return ret } - return *o.FromMetageneration.Get() + return *o.DestinationDriveId.Get() } -// GetFromMetagenerationOk returns a tuple with the FromMetageneration field value if set, nil otherwise +// GetDestinationDriveIdOk returns a tuple with the DestinationDriveId field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FolderCopyIn) GetFromMetagenerationOk() (*int32, bool) { +func (o *FolderCopyIn) GetDestinationDriveIdOk() (*string, bool) { if o == nil { return nil, false } - return o.FromMetageneration.Get(), o.FromMetageneration.IsSet() + return o.DestinationDriveId.Get(), o.DestinationDriveId.IsSet() } -// HasFromMetageneration returns a boolean if a field has been set. -func (o *FolderCopyIn) HasFromMetageneration() bool { - if o != nil && o.FromMetageneration.IsSet() { +// HasDestinationDriveId returns a boolean if a field has been set. +func (o *FolderCopyIn) HasDestinationDriveId() bool { + if o != nil && o.DestinationDriveId.IsSet() { return true } return false } -// SetFromMetageneration gets a reference to the given NullableInt32 and assigns it to the FromMetageneration field. -func (o *FolderCopyIn) SetFromMetageneration(v int32) { - o.FromMetageneration.Set(&v) +// SetDestinationDriveId gets a reference to the given NullableString and assigns it to the DestinationDriveId field. +func (o *FolderCopyIn) SetDestinationDriveId(v string) { + o.DestinationDriveId.Set(&v) +} +// SetDestinationDriveIdNil sets the value for DestinationDriveId to be an explicit nil +func (o *FolderCopyIn) SetDestinationDriveIdNil() { + o.DestinationDriveId.Set(nil) +} + +// UnsetDestinationDriveId ensures that no value is present for DestinationDriveId, not even an explicit nil +func (o *FolderCopyIn) UnsetDestinationDriveId() { + o.DestinationDriveId.Unset() +} + +// GetDestinationName returns the DestinationName field value +func (o *FolderCopyIn) GetDestinationName() string { + if o == nil { + var ret string + return ret + } + + return o.DestinationName } -// SetFromMetagenerationNil sets the value for FromMetageneration to be an explicit nil -func (o *FolderCopyIn) SetFromMetagenerationNil() { - o.FromMetageneration.Set(nil) + +// GetDestinationNameOk returns a tuple with the DestinationName field value +// and a boolean to check if the value has been set. +func (o *FolderCopyIn) GetDestinationNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DestinationName, true } -// UnsetFromMetageneration ensures that no value is present for FromMetageneration, not even an explicit nil -func (o *FolderCopyIn) UnsetFromMetageneration() { - o.FromMetageneration.Unset() +// SetDestinationName sets field value +func (o *FolderCopyIn) SetDestinationName(v string) { + o.DestinationName = v } -// GetPath returns the Path field value -func (o *FolderCopyIn) GetPath() string { +// GetDestinationParentId returns the DestinationParentId field value +func (o *FolderCopyIn) GetDestinationParentId() string { if o == nil { var ret string return ret } - return o.Path + return o.DestinationParentId } -// GetPathOk returns a tuple with the Path field value +// GetDestinationParentIdOk returns a tuple with the DestinationParentId field value // and a boolean to check if the value has been set. -func (o *FolderCopyIn) GetPathOk() (*string, bool) { +func (o *FolderCopyIn) GetDestinationParentIdOk() (*string, bool) { if o == nil { return nil, false } - return &o.Path, true + return &o.DestinationParentId, true } -// SetPath sets field value -func (o *FolderCopyIn) SetPath(v string) { - o.Path = v +// SetDestinationParentId sets field value +func (o *FolderCopyIn) SetDestinationParentId(v string) { + o.DestinationParentId = v } func (o FolderCopyIn) MarshalJSON() ([]byte, error) { @@ -121,10 +147,11 @@ func (o FolderCopyIn) MarshalJSON() ([]byte, error) { func (o FolderCopyIn) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.FromMetageneration.IsSet() { - toSerialize["from_metageneration"] = o.FromMetageneration.Get() + if o.DestinationDriveId.IsSet() { + toSerialize["destination_drive_id"] = o.DestinationDriveId.Get() } - toSerialize["path"] = o.Path + toSerialize["destination_name"] = o.DestinationName + toSerialize["destination_parent_id"] = o.DestinationParentId return toSerialize, nil } @@ -133,7 +160,8 @@ func (o *FolderCopyIn) UnmarshalJSON(data []byte) (err error) { // by unmarshalling the object into a generic map with string keys and checking // that every required field exists as a key in the generic map. requiredProperties := []string{ - "path", + "destination_name", + "destination_parent_id", } allProperties := make(map[string]interface{}) diff --git a/sdk/go/model_folder_copy_out.go b/sdk/go/model_folder_copy_out.go deleted file mode 100644 index 3ee3ad8..0000000 --- a/sdk/go/model_folder_copy_out.go +++ /dev/null @@ -1,571 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "time" - "bytes" - "fmt" -) - -// checks if the FolderCopyOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &FolderCopyOut{} - -// FolderCopyOut POST /v0/folders/{fld_id}/copy response — the newly-created folder resource (same shape as `FolderOut`) plus copy-provenance fields: `from_fld_id` is the source folder and `n_artifacts_copied` is the number of descendant artifacts cloned into the new subtree. Mirrors the MCP `copy` folder route's conceptual shape. -type FolderCopyOut struct { - CreatedAt time.Time `json:"created_at"` - DeletedAt NullableTime `json:"deleted_at,omitempty"` - Description NullableString `json:"description,omitempty"` - DriveId string `json:"drive_id"` - Etag string `json:"etag"` - FromFldId string `json:"from_fld_id"` - Id string `json:"id"` - InheritGrants *bool `json:"inherit_grants,omitempty"` - Metageneration *int32 `json:"metageneration,omitempty"` - NArtifactsCopied int32 `json:"n_artifacts_copied"` - Path string `json:"path"` - PurgeAt NullableTime `json:"purge_at,omitempty"` - UpdatedAt time.Time `json:"updated_at"` -} - -type _FolderCopyOut FolderCopyOut - -// NewFolderCopyOut instantiates a new FolderCopyOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewFolderCopyOut(createdAt time.Time, driveId string, etag string, fromFldId string, id string, nArtifactsCopied int32, path string, updatedAt time.Time) *FolderCopyOut { - this := FolderCopyOut{} - this.CreatedAt = createdAt - this.DriveId = driveId - this.Etag = etag - this.FromFldId = fromFldId - this.Id = id - var inheritGrants bool = true - this.InheritGrants = &inheritGrants - var metageneration int32 = 1 - this.Metageneration = &metageneration - this.NArtifactsCopied = nArtifactsCopied - this.Path = path - this.UpdatedAt = updatedAt - return &this -} - -// NewFolderCopyOutWithDefaults instantiates a new FolderCopyOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewFolderCopyOutWithDefaults() *FolderCopyOut { - this := FolderCopyOut{} - var inheritGrants bool = true - this.InheritGrants = &inheritGrants - var metageneration int32 = 1 - this.Metageneration = &metageneration - return &this -} - -// GetCreatedAt returns the CreatedAt field value -func (o *FolderCopyOut) GetCreatedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value -// and a boolean to check if the value has been set. -func (o *FolderCopyOut) GetCreatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.CreatedAt, true -} - -// SetCreatedAt sets field value -func (o *FolderCopyOut) SetCreatedAt(v time.Time) { - o.CreatedAt = v -} - -// GetDeletedAt returns the DeletedAt field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *FolderCopyOut) GetDeletedAt() time.Time { - if o == nil || IsNil(o.DeletedAt.Get()) { - var ret time.Time - return ret - } - return *o.DeletedAt.Get() -} - -// GetDeletedAtOk returns a tuple with the DeletedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FolderCopyOut) GetDeletedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.DeletedAt.Get(), o.DeletedAt.IsSet() -} - -// HasDeletedAt returns a boolean if a field has been set. -func (o *FolderCopyOut) HasDeletedAt() bool { - if o != nil && o.DeletedAt.IsSet() { - return true - } - - return false -} - -// SetDeletedAt gets a reference to the given NullableTime and assigns it to the DeletedAt field. -func (o *FolderCopyOut) SetDeletedAt(v time.Time) { - o.DeletedAt.Set(&v) -} -// SetDeletedAtNil sets the value for DeletedAt to be an explicit nil -func (o *FolderCopyOut) SetDeletedAtNil() { - o.DeletedAt.Set(nil) -} - -// UnsetDeletedAt ensures that no value is present for DeletedAt, not even an explicit nil -func (o *FolderCopyOut) UnsetDeletedAt() { - o.DeletedAt.Unset() -} - -// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *FolderCopyOut) GetDescription() string { - if o == nil || IsNil(o.Description.Get()) { - var ret string - return ret - } - return *o.Description.Get() -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FolderCopyOut) GetDescriptionOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Description.Get(), o.Description.IsSet() -} - -// HasDescription returns a boolean if a field has been set. -func (o *FolderCopyOut) HasDescription() bool { - if o != nil && o.Description.IsSet() { - return true - } - - return false -} - -// SetDescription gets a reference to the given NullableString and assigns it to the Description field. -func (o *FolderCopyOut) SetDescription(v string) { - o.Description.Set(&v) -} -// SetDescriptionNil sets the value for Description to be an explicit nil -func (o *FolderCopyOut) SetDescriptionNil() { - o.Description.Set(nil) -} - -// UnsetDescription ensures that no value is present for Description, not even an explicit nil -func (o *FolderCopyOut) UnsetDescription() { - o.Description.Unset() -} - -// GetDriveId returns the DriveId field value -func (o *FolderCopyOut) GetDriveId() string { - if o == nil { - var ret string - return ret - } - - return o.DriveId -} - -// GetDriveIdOk returns a tuple with the DriveId field value -// and a boolean to check if the value has been set. -func (o *FolderCopyOut) GetDriveIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.DriveId, true -} - -// SetDriveId sets field value -func (o *FolderCopyOut) SetDriveId(v string) { - o.DriveId = v -} - -// GetEtag returns the Etag field value -func (o *FolderCopyOut) GetEtag() string { - if o == nil { - var ret string - return ret - } - - return o.Etag -} - -// GetEtagOk returns a tuple with the Etag field value -// and a boolean to check if the value has been set. -func (o *FolderCopyOut) GetEtagOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Etag, true -} - -// SetEtag sets field value -func (o *FolderCopyOut) SetEtag(v string) { - o.Etag = v -} - -// GetFromFldId returns the FromFldId field value -func (o *FolderCopyOut) GetFromFldId() string { - if o == nil { - var ret string - return ret - } - - return o.FromFldId -} - -// GetFromFldIdOk returns a tuple with the FromFldId field value -// and a boolean to check if the value has been set. -func (o *FolderCopyOut) GetFromFldIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.FromFldId, true -} - -// SetFromFldId sets field value -func (o *FolderCopyOut) SetFromFldId(v string) { - o.FromFldId = v -} - -// GetId returns the Id field value -func (o *FolderCopyOut) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *FolderCopyOut) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *FolderCopyOut) SetId(v string) { - o.Id = v -} - -// GetInheritGrants returns the InheritGrants field value if set, zero value otherwise. -func (o *FolderCopyOut) GetInheritGrants() bool { - if o == nil || IsNil(o.InheritGrants) { - var ret bool - return ret - } - return *o.InheritGrants -} - -// GetInheritGrantsOk returns a tuple with the InheritGrants field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FolderCopyOut) GetInheritGrantsOk() (*bool, bool) { - if o == nil || IsNil(o.InheritGrants) { - return nil, false - } - return o.InheritGrants, true -} - -// HasInheritGrants returns a boolean if a field has been set. -func (o *FolderCopyOut) HasInheritGrants() bool { - if o != nil && !IsNil(o.InheritGrants) { - return true - } - - return false -} - -// SetInheritGrants gets a reference to the given bool and assigns it to the InheritGrants field. -func (o *FolderCopyOut) SetInheritGrants(v bool) { - o.InheritGrants = &v -} - -// GetMetageneration returns the Metageneration field value if set, zero value otherwise. -func (o *FolderCopyOut) GetMetageneration() int32 { - if o == nil || IsNil(o.Metageneration) { - var ret int32 - return ret - } - return *o.Metageneration -} - -// GetMetagenerationOk returns a tuple with the Metageneration field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FolderCopyOut) GetMetagenerationOk() (*int32, bool) { - if o == nil || IsNil(o.Metageneration) { - return nil, false - } - return o.Metageneration, true -} - -// HasMetageneration returns a boolean if a field has been set. -func (o *FolderCopyOut) HasMetageneration() bool { - if o != nil && !IsNil(o.Metageneration) { - return true - } - - return false -} - -// SetMetageneration gets a reference to the given int32 and assigns it to the Metageneration field. -func (o *FolderCopyOut) SetMetageneration(v int32) { - o.Metageneration = &v -} - -// GetNArtifactsCopied returns the NArtifactsCopied field value -func (o *FolderCopyOut) GetNArtifactsCopied() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.NArtifactsCopied -} - -// GetNArtifactsCopiedOk returns a tuple with the NArtifactsCopied field value -// and a boolean to check if the value has been set. -func (o *FolderCopyOut) GetNArtifactsCopiedOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.NArtifactsCopied, true -} - -// SetNArtifactsCopied sets field value -func (o *FolderCopyOut) SetNArtifactsCopied(v int32) { - o.NArtifactsCopied = v -} - -// GetPath returns the Path field value -func (o *FolderCopyOut) GetPath() string { - if o == nil { - var ret string - return ret - } - - return o.Path -} - -// GetPathOk returns a tuple with the Path field value -// and a boolean to check if the value has been set. -func (o *FolderCopyOut) GetPathOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Path, true -} - -// SetPath sets field value -func (o *FolderCopyOut) SetPath(v string) { - o.Path = v -} - -// GetPurgeAt returns the PurgeAt field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *FolderCopyOut) GetPurgeAt() time.Time { - if o == nil || IsNil(o.PurgeAt.Get()) { - var ret time.Time - return ret - } - return *o.PurgeAt.Get() -} - -// GetPurgeAtOk returns a tuple with the PurgeAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FolderCopyOut) GetPurgeAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.PurgeAt.Get(), o.PurgeAt.IsSet() -} - -// HasPurgeAt returns a boolean if a field has been set. -func (o *FolderCopyOut) HasPurgeAt() bool { - if o != nil && o.PurgeAt.IsSet() { - return true - } - - return false -} - -// SetPurgeAt gets a reference to the given NullableTime and assigns it to the PurgeAt field. -func (o *FolderCopyOut) SetPurgeAt(v time.Time) { - o.PurgeAt.Set(&v) -} -// SetPurgeAtNil sets the value for PurgeAt to be an explicit nil -func (o *FolderCopyOut) SetPurgeAtNil() { - o.PurgeAt.Set(nil) -} - -// UnsetPurgeAt ensures that no value is present for PurgeAt, not even an explicit nil -func (o *FolderCopyOut) UnsetPurgeAt() { - o.PurgeAt.Unset() -} - -// GetUpdatedAt returns the UpdatedAt field value -func (o *FolderCopyOut) GetUpdatedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.UpdatedAt -} - -// GetUpdatedAtOk returns a tuple with the UpdatedAt field value -// and a boolean to check if the value has been set. -func (o *FolderCopyOut) GetUpdatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.UpdatedAt, true -} - -// SetUpdatedAt sets field value -func (o *FolderCopyOut) SetUpdatedAt(v time.Time) { - o.UpdatedAt = v -} - -func (o FolderCopyOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o FolderCopyOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["created_at"] = o.CreatedAt - if o.DeletedAt.IsSet() { - toSerialize["deleted_at"] = o.DeletedAt.Get() - } - if o.Description.IsSet() { - toSerialize["description"] = o.Description.Get() - } - toSerialize["drive_id"] = o.DriveId - toSerialize["etag"] = o.Etag - toSerialize["from_fld_id"] = o.FromFldId - toSerialize["id"] = o.Id - if !IsNil(o.InheritGrants) { - toSerialize["inherit_grants"] = o.InheritGrants - } - if !IsNil(o.Metageneration) { - toSerialize["metageneration"] = o.Metageneration - } - toSerialize["n_artifacts_copied"] = o.NArtifactsCopied - toSerialize["path"] = o.Path - if o.PurgeAt.IsSet() { - toSerialize["purge_at"] = o.PurgeAt.Get() - } - toSerialize["updated_at"] = o.UpdatedAt - return toSerialize, nil -} - -func (o *FolderCopyOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "created_at", - "drive_id", - "etag", - "from_fld_id", - "id", - "n_artifacts_copied", - "path", - "updated_at", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varFolderCopyOut := _FolderCopyOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varFolderCopyOut) - - if err != nil { - return err - } - - *o = FolderCopyOut(varFolderCopyOut) - - return err -} - -type NullableFolderCopyOut struct { - value *FolderCopyOut - isSet bool -} - -func (v NullableFolderCopyOut) Get() *FolderCopyOut { - return v.value -} - -func (v *NullableFolderCopyOut) Set(val *FolderCopyOut) { - v.value = val - v.isSet = true -} - -func (v NullableFolderCopyOut) IsSet() bool { - return v.isSet -} - -func (v *NullableFolderCopyOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFolderCopyOut(val *FolderCopyOut) *NullableFolderCopyOut { - return &NullableFolderCopyOut{value: val, isSet: true} -} - -func (v NullableFolderCopyOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFolderCopyOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_folder_create_in.go b/sdk/go/model_folder_create_in.go index ddd9157..e29ef23 100644 --- a/sdk/go/model_folder_create_in.go +++ b/sdk/go/model_folder_create_in.go @@ -1,7 +1,7 @@ /* AgentDrive -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. API version: */ @@ -12,22 +12,33 @@ package agentdrive import ( "encoding/json" + "fmt" ) // checks if the FolderCreateIn type satisfies the MappedNullable interface at compile time var _ MappedNullable = &FolderCreateIn{} -// FolderCreateIn PUT /v0/folders/{path} body for the optional metadata params. Empty body is fine — `mkdir` with no description just creates the folder row. +// FolderCreateIn POST /v0/drives/{id}/folders body. type FolderCreateIn struct { - Description NullableString `json:"description,omitempty"` + GrantInheritance *string `json:"grant_inheritance,omitempty"` + Metadata map[string]interface{} `json:"metadata,omitempty"` + Name string `json:"name"` + ParentId string `json:"parent_id" validate:"regexp=^fld_[a-f0-9]{16}$"` + AdditionalProperties map[string]interface{} } +type _FolderCreateIn FolderCreateIn + // NewFolderCreateIn instantiates a new FolderCreateIn object // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewFolderCreateIn() *FolderCreateIn { +func NewFolderCreateIn(name string, parentId string) *FolderCreateIn { this := FolderCreateIn{} + var grantInheritance string = "inherit" + this.GrantInheritance = &grantInheritance + this.Name = name + this.ParentId = parentId return &this } @@ -36,49 +47,121 @@ func NewFolderCreateIn() *FolderCreateIn { // but it doesn't guarantee that properties required by API are set func NewFolderCreateInWithDefaults() *FolderCreateIn { this := FolderCreateIn{} + var grantInheritance string = "inherit" + this.GrantInheritance = &grantInheritance return &this } -// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *FolderCreateIn) GetDescription() string { - if o == nil || IsNil(o.Description.Get()) { +// GetGrantInheritance returns the GrantInheritance field value if set, zero value otherwise. +func (o *FolderCreateIn) GetGrantInheritance() string { + if o == nil || IsNil(o.GrantInheritance) { var ret string return ret } - return *o.Description.Get() + return *o.GrantInheritance } -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise +// GetGrantInheritanceOk returns a tuple with the GrantInheritance field value if set, nil otherwise // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FolderCreateIn) GetDescriptionOk() (*string, bool) { - if o == nil { +func (o *FolderCreateIn) GetGrantInheritanceOk() (*string, bool) { + if o == nil || IsNil(o.GrantInheritance) { return nil, false } - return o.Description.Get(), o.Description.IsSet() + return o.GrantInheritance, true } -// HasDescription returns a boolean if a field has been set. -func (o *FolderCreateIn) HasDescription() bool { - if o != nil && o.Description.IsSet() { +// HasGrantInheritance returns a boolean if a field has been set. +func (o *FolderCreateIn) HasGrantInheritance() bool { + if o != nil && !IsNil(o.GrantInheritance) { return true } return false } -// SetDescription gets a reference to the given NullableString and assigns it to the Description field. -func (o *FolderCreateIn) SetDescription(v string) { - o.Description.Set(&v) +// SetGrantInheritance gets a reference to the given string and assigns it to the GrantInheritance field. +func (o *FolderCreateIn) SetGrantInheritance(v string) { + o.GrantInheritance = &v +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise. +func (o *FolderCreateIn) GetMetadata() map[string]interface{} { + if o == nil || IsNil(o.Metadata) { + var ret map[string]interface{} + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *FolderCreateIn) GetMetadataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Metadata) { + return map[string]interface{}{}, false + } + return o.Metadata, true } -// SetDescriptionNil sets the value for Description to be an explicit nil -func (o *FolderCreateIn) SetDescriptionNil() { - o.Description.Set(nil) + +// HasMetadata returns a boolean if a field has been set. +func (o *FolderCreateIn) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false } -// UnsetDescription ensures that no value is present for Description, not even an explicit nil -func (o *FolderCreateIn) UnsetDescription() { - o.Description.Unset() +// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. +func (o *FolderCreateIn) SetMetadata(v map[string]interface{}) { + o.Metadata = v +} + +// GetName returns the Name field value +func (o *FolderCreateIn) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *FolderCreateIn) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *FolderCreateIn) SetName(v string) { + o.Name = v +} + +// GetParentId returns the ParentId field value +func (o *FolderCreateIn) GetParentId() string { + if o == nil { + var ret string + return ret + } + + return o.ParentId +} + +// GetParentIdOk returns a tuple with the ParentId field value +// and a boolean to check if the value has been set. +func (o *FolderCreateIn) GetParentIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ParentId, true +} + +// SetParentId sets field value +func (o *FolderCreateIn) SetParentId(v string) { + o.ParentId = v } func (o FolderCreateIn) MarshalJSON() ([]byte, error) { @@ -91,12 +174,68 @@ func (o FolderCreateIn) MarshalJSON() ([]byte, error) { func (o FolderCreateIn) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.Description.IsSet() { - toSerialize["description"] = o.Description.Get() + if !IsNil(o.GrantInheritance) { + toSerialize["grant_inheritance"] = o.GrantInheritance + } + if !IsNil(o.Metadata) { + toSerialize["metadata"] = o.Metadata + } + toSerialize["name"] = o.Name + toSerialize["parent_id"] = o.ParentId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value } + return toSerialize, nil } +func (o *FolderCreateIn) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "parent_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFolderCreateIn := _FolderCreateIn{} + + err = json.Unmarshal(data, &varFolderCreateIn) + + if err != nil { + return err + } + + *o = FolderCreateIn(varFolderCreateIn) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "grant_inheritance") + delete(additionalProperties, "metadata") + delete(additionalProperties, "name") + delete(additionalProperties, "parent_id") + o.AdditionalProperties = additionalProperties + } + + return err +} + type NullableFolderCreateIn struct { value *FolderCreateIn isSet bool diff --git a/sdk/go/model_folder_delete_out.go b/sdk/go/model_folder_delete_out.go deleted file mode 100644 index 48dc235..0000000 --- a/sdk/go/model_folder_delete_out.go +++ /dev/null @@ -1,365 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "time" - "bytes" - "fmt" -) - -// checks if the FolderDeleteOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &FolderDeleteOut{} - -// FolderDeleteOut DELETE response — surfaces cascade counts so the caller can confirm scope of an rmdir before the client retries with `?recursive=true`. -type FolderDeleteOut struct { - DeletedAt time.Time `json:"deleted_at"` - Id string `json:"id"` - NArtifactsDeleted int32 `json:"n_artifacts_deleted"` - NSubfoldersDeleted int32 `json:"n_subfolders_deleted"` - Ok *bool `json:"ok,omitempty"` - Path string `json:"path"` - PurgeAt time.Time `json:"purge_at"` - RetentionDays int32 `json:"retention_days"` -} - -type _FolderDeleteOut FolderDeleteOut - -// NewFolderDeleteOut instantiates a new FolderDeleteOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewFolderDeleteOut(deletedAt time.Time, id string, nArtifactsDeleted int32, nSubfoldersDeleted int32, path string, purgeAt time.Time, retentionDays int32) *FolderDeleteOut { - this := FolderDeleteOut{} - this.DeletedAt = deletedAt - this.Id = id - this.NArtifactsDeleted = nArtifactsDeleted - this.NSubfoldersDeleted = nSubfoldersDeleted - var ok bool = true - this.Ok = &ok - this.Path = path - this.PurgeAt = purgeAt - this.RetentionDays = retentionDays - return &this -} - -// NewFolderDeleteOutWithDefaults instantiates a new FolderDeleteOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewFolderDeleteOutWithDefaults() *FolderDeleteOut { - this := FolderDeleteOut{} - var ok bool = true - this.Ok = &ok - return &this -} - -// GetDeletedAt returns the DeletedAt field value -func (o *FolderDeleteOut) GetDeletedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.DeletedAt -} - -// GetDeletedAtOk returns a tuple with the DeletedAt field value -// and a boolean to check if the value has been set. -func (o *FolderDeleteOut) GetDeletedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.DeletedAt, true -} - -// SetDeletedAt sets field value -func (o *FolderDeleteOut) SetDeletedAt(v time.Time) { - o.DeletedAt = v -} - -// GetId returns the Id field value -func (o *FolderDeleteOut) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *FolderDeleteOut) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *FolderDeleteOut) SetId(v string) { - o.Id = v -} - -// GetNArtifactsDeleted returns the NArtifactsDeleted field value -func (o *FolderDeleteOut) GetNArtifactsDeleted() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.NArtifactsDeleted -} - -// GetNArtifactsDeletedOk returns a tuple with the NArtifactsDeleted field value -// and a boolean to check if the value has been set. -func (o *FolderDeleteOut) GetNArtifactsDeletedOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.NArtifactsDeleted, true -} - -// SetNArtifactsDeleted sets field value -func (o *FolderDeleteOut) SetNArtifactsDeleted(v int32) { - o.NArtifactsDeleted = v -} - -// GetNSubfoldersDeleted returns the NSubfoldersDeleted field value -func (o *FolderDeleteOut) GetNSubfoldersDeleted() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.NSubfoldersDeleted -} - -// GetNSubfoldersDeletedOk returns a tuple with the NSubfoldersDeleted field value -// and a boolean to check if the value has been set. -func (o *FolderDeleteOut) GetNSubfoldersDeletedOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.NSubfoldersDeleted, true -} - -// SetNSubfoldersDeleted sets field value -func (o *FolderDeleteOut) SetNSubfoldersDeleted(v int32) { - o.NSubfoldersDeleted = v -} - -// GetOk returns the Ok field value if set, zero value otherwise. -func (o *FolderDeleteOut) GetOk() bool { - if o == nil || IsNil(o.Ok) { - var ret bool - return ret - } - return *o.Ok -} - -// GetOkOk returns a tuple with the Ok field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FolderDeleteOut) GetOkOk() (*bool, bool) { - if o == nil || IsNil(o.Ok) { - return nil, false - } - return o.Ok, true -} - -// HasOk returns a boolean if a field has been set. -func (o *FolderDeleteOut) HasOk() bool { - if o != nil && !IsNil(o.Ok) { - return true - } - - return false -} - -// SetOk gets a reference to the given bool and assigns it to the Ok field. -func (o *FolderDeleteOut) SetOk(v bool) { - o.Ok = &v -} - -// GetPath returns the Path field value -func (o *FolderDeleteOut) GetPath() string { - if o == nil { - var ret string - return ret - } - - return o.Path -} - -// GetPathOk returns a tuple with the Path field value -// and a boolean to check if the value has been set. -func (o *FolderDeleteOut) GetPathOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Path, true -} - -// SetPath sets field value -func (o *FolderDeleteOut) SetPath(v string) { - o.Path = v -} - -// GetPurgeAt returns the PurgeAt field value -func (o *FolderDeleteOut) GetPurgeAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.PurgeAt -} - -// GetPurgeAtOk returns a tuple with the PurgeAt field value -// and a boolean to check if the value has been set. -func (o *FolderDeleteOut) GetPurgeAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.PurgeAt, true -} - -// SetPurgeAt sets field value -func (o *FolderDeleteOut) SetPurgeAt(v time.Time) { - o.PurgeAt = v -} - -// GetRetentionDays returns the RetentionDays field value -func (o *FolderDeleteOut) GetRetentionDays() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.RetentionDays -} - -// GetRetentionDaysOk returns a tuple with the RetentionDays field value -// and a boolean to check if the value has been set. -func (o *FolderDeleteOut) GetRetentionDaysOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.RetentionDays, true -} - -// SetRetentionDays sets field value -func (o *FolderDeleteOut) SetRetentionDays(v int32) { - o.RetentionDays = v -} - -func (o FolderDeleteOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o FolderDeleteOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["deleted_at"] = o.DeletedAt - toSerialize["id"] = o.Id - toSerialize["n_artifacts_deleted"] = o.NArtifactsDeleted - toSerialize["n_subfolders_deleted"] = o.NSubfoldersDeleted - if !IsNil(o.Ok) { - toSerialize["ok"] = o.Ok - } - toSerialize["path"] = o.Path - toSerialize["purge_at"] = o.PurgeAt - toSerialize["retention_days"] = o.RetentionDays - return toSerialize, nil -} - -func (o *FolderDeleteOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "deleted_at", - "id", - "n_artifacts_deleted", - "n_subfolders_deleted", - "path", - "purge_at", - "retention_days", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varFolderDeleteOut := _FolderDeleteOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varFolderDeleteOut) - - if err != nil { - return err - } - - *o = FolderDeleteOut(varFolderDeleteOut) - - return err -} - -type NullableFolderDeleteOut struct { - value *FolderDeleteOut - isSet bool -} - -func (v NullableFolderDeleteOut) Get() *FolderDeleteOut { - return v.value -} - -func (v *NullableFolderDeleteOut) Set(val *FolderDeleteOut) { - v.value = val - v.isSet = true -} - -func (v NullableFolderDeleteOut) IsSet() bool { - return v.isSet -} - -func (v *NullableFolderDeleteOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFolderDeleteOut(val *FolderDeleteOut) *NullableFolderDeleteOut { - return &NullableFolderDeleteOut{value: val, isSet: true} -} - -func (v NullableFolderDeleteOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFolderDeleteOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_folder_list_out.go b/sdk/go/model_folder_list_out.go new file mode 100644 index 0000000..af983fa --- /dev/null +++ b/sdk/go/model_folder_list_out.go @@ -0,0 +1,186 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the FolderListOut type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FolderListOut{} + +// FolderListOut struct for FolderListOut +type FolderListOut struct { + Items []FolderOut `json:"items"` + NextCursor NullableString `json:"next_cursor"` +} + +type _FolderListOut FolderListOut + +// NewFolderListOut instantiates a new FolderListOut object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFolderListOut(items []FolderOut, nextCursor NullableString) *FolderListOut { + this := FolderListOut{} + this.Items = items + this.NextCursor = nextCursor + return &this +} + +// NewFolderListOutWithDefaults instantiates a new FolderListOut object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFolderListOutWithDefaults() *FolderListOut { + this := FolderListOut{} + return &this +} + +// GetItems returns the Items field value +func (o *FolderListOut) GetItems() []FolderOut { + if o == nil { + var ret []FolderOut + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *FolderListOut) GetItemsOk() ([]FolderOut, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *FolderListOut) SetItems(v []FolderOut) { + o.Items = v +} + +// GetNextCursor returns the NextCursor field value +// If the value is explicit nil, the zero value for string will be returned +func (o *FolderListOut) GetNextCursor() string { + if o == nil || o.NextCursor.Get() == nil { + var ret string + return ret + } + + return *o.NextCursor.Get() +} + +// GetNextCursorOk returns a tuple with the NextCursor field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FolderListOut) GetNextCursorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.NextCursor.Get(), o.NextCursor.IsSet() +} + +// SetNextCursor sets field value +func (o *FolderListOut) SetNextCursor(v string) { + o.NextCursor.Set(&v) +} + +func (o FolderListOut) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FolderListOut) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + toSerialize["next_cursor"] = o.NextCursor.Get() + return toSerialize, nil +} + +func (o *FolderListOut) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "items", + "next_cursor", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varFolderListOut := _FolderListOut{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varFolderListOut) + + if err != nil { + return err + } + + *o = FolderListOut(varFolderListOut) + + return err +} + +type NullableFolderListOut struct { + value *FolderListOut + isSet bool +} + +func (v NullableFolderListOut) Get() *FolderListOut { + return v.value +} + +func (v *NullableFolderListOut) Set(val *FolderListOut) { + v.value = val + v.isSet = true +} + +func (v NullableFolderListOut) IsSet() bool { + return v.isSet +} + +func (v *NullableFolderListOut) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFolderListOut(val *FolderListOut) *NullableFolderListOut { + return &NullableFolderListOut{value: val, isSet: true} +} + +func (v NullableFolderListOut) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFolderListOut) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/sdk/go/model_folder_move_in.go b/sdk/go/model_folder_move_in.go deleted file mode 100644 index d00b8d8..0000000 --- a/sdk/go/model_folder_move_in.go +++ /dev/null @@ -1,156 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the FolderMoveIn type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &FolderMoveIn{} - -// FolderMoveIn POST /v0/folders/{fld_id}/move body — rename / move. -type FolderMoveIn struct { - Path string `json:"path"` -} - -type _FolderMoveIn FolderMoveIn - -// NewFolderMoveIn instantiates a new FolderMoveIn object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewFolderMoveIn(path string) *FolderMoveIn { - this := FolderMoveIn{} - this.Path = path - return &this -} - -// NewFolderMoveInWithDefaults instantiates a new FolderMoveIn object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewFolderMoveInWithDefaults() *FolderMoveIn { - this := FolderMoveIn{} - return &this -} - -// GetPath returns the Path field value -func (o *FolderMoveIn) GetPath() string { - if o == nil { - var ret string - return ret - } - - return o.Path -} - -// GetPathOk returns a tuple with the Path field value -// and a boolean to check if the value has been set. -func (o *FolderMoveIn) GetPathOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Path, true -} - -// SetPath sets field value -func (o *FolderMoveIn) SetPath(v string) { - o.Path = v -} - -func (o FolderMoveIn) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o FolderMoveIn) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["path"] = o.Path - return toSerialize, nil -} - -func (o *FolderMoveIn) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "path", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varFolderMoveIn := _FolderMoveIn{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varFolderMoveIn) - - if err != nil { - return err - } - - *o = FolderMoveIn(varFolderMoveIn) - - return err -} - -type NullableFolderMoveIn struct { - value *FolderMoveIn - isSet bool -} - -func (v NullableFolderMoveIn) Get() *FolderMoveIn { - return v.value -} - -func (v *NullableFolderMoveIn) Set(val *FolderMoveIn) { - v.value = val - v.isSet = true -} - -func (v NullableFolderMoveIn) IsSet() bool { - return v.isSet -} - -func (v *NullableFolderMoveIn) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFolderMoveIn(val *FolderMoveIn) *NullableFolderMoveIn { - return &NullableFolderMoveIn{value: val, isSet: true} -} - -func (v NullableFolderMoveIn) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFolderMoveIn) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_folder_out.go b/sdk/go/model_folder_out.go index 4b42e03..650bab3 100644 --- a/sdk/go/model_folder_out.go +++ b/sdk/go/model_folder_out.go @@ -1,7 +1,7 @@ /* AgentDrive -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. API version: */ @@ -20,18 +20,18 @@ import ( // checks if the FolderOut type satisfies the MappedNullable interface at compile time var _ MappedNullable = &FolderOut{} -// FolderOut Folder resource (folders+permalinks design §13). `path` is the canonical leading+trailing-slash form. Access is expressed through grants (permission-sharing-design §4.4), not a folder-level flag. +// FolderOut struct for FolderOut type FolderOut struct { CreatedAt time.Time `json:"created_at"` - DeletedAt NullableTime `json:"deleted_at,omitempty"` - Description NullableString `json:"description,omitempty"` - DriveId string `json:"drive_id"` - Etag string `json:"etag"` - Id string `json:"id"` - InheritGrants *bool `json:"inherit_grants,omitempty"` - Metageneration *int32 `json:"metageneration,omitempty"` - Path string `json:"path"` - PurgeAt NullableTime `json:"purge_at,omitempty"` + DeletedAt NullableTime `json:"deleted_at"` + DriveId string `json:"drive_id" validate:"regexp=^drv_[a-f0-9]{16}$"` + GrantInheritance string `json:"grant_inheritance"` + Id string `json:"id" validate:"regexp=^fld_[a-f0-9]{16}$"` + Metadata map[string]interface{} `json:"metadata"` + Name NullableString `json:"name"` + ParentId NullableString `json:"parent_id"` + Revision string `json:"revision" validate:"regexp=^rev_[a-f0-9]{16}$"` + State string `json:"state"` UpdatedAt time.Time `json:"updated_at"` } @@ -41,17 +41,18 @@ type _FolderOut FolderOut // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewFolderOut(createdAt time.Time, driveId string, etag string, id string, path string, updatedAt time.Time) *FolderOut { +func NewFolderOut(createdAt time.Time, deletedAt NullableTime, driveId string, grantInheritance string, id string, metadata map[string]interface{}, name NullableString, parentId NullableString, revision string, state string, updatedAt time.Time) *FolderOut { this := FolderOut{} this.CreatedAt = createdAt + this.DeletedAt = deletedAt this.DriveId = driveId - this.Etag = etag + this.GrantInheritance = grantInheritance this.Id = id - var inheritGrants bool = true - this.InheritGrants = &inheritGrants - var metageneration int32 = 1 - this.Metageneration = &metageneration - this.Path = path + this.Metadata = metadata + this.Name = name + this.ParentId = parentId + this.Revision = revision + this.State = state this.UpdatedAt = updatedAt return &this } @@ -61,10 +62,6 @@ func NewFolderOut(createdAt time.Time, driveId string, etag string, id string, p // but it doesn't guarantee that properties required by API are set func NewFolderOutWithDefaults() *FolderOut { this := FolderOut{} - var inheritGrants bool = true - this.InheritGrants = &inheritGrants - var metageneration int32 = 1 - this.Metageneration = &metageneration return &this } @@ -92,16 +89,18 @@ func (o *FolderOut) SetCreatedAt(v time.Time) { o.CreatedAt = v } -// GetDeletedAt returns the DeletedAt field value if set, zero value otherwise (both if not set or set to explicit null). +// GetDeletedAt returns the DeletedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *FolderOut) GetDeletedAt() time.Time { - if o == nil || IsNil(o.DeletedAt.Get()) { + if o == nil || o.DeletedAt.Get() == nil { var ret time.Time return ret } + return *o.DeletedAt.Get() } -// GetDeletedAtOk returns a tuple with the DeletedAt field value if set, nil otherwise +// GetDeletedAtOk returns a tuple with the DeletedAt field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *FolderOut) GetDeletedAtOk() (*time.Time, bool) { @@ -111,70 +110,10 @@ func (o *FolderOut) GetDeletedAtOk() (*time.Time, bool) { return o.DeletedAt.Get(), o.DeletedAt.IsSet() } -// HasDeletedAt returns a boolean if a field has been set. -func (o *FolderOut) HasDeletedAt() bool { - if o != nil && o.DeletedAt.IsSet() { - return true - } - - return false -} - -// SetDeletedAt gets a reference to the given NullableTime and assigns it to the DeletedAt field. +// SetDeletedAt sets field value func (o *FolderOut) SetDeletedAt(v time.Time) { o.DeletedAt.Set(&v) } -// SetDeletedAtNil sets the value for DeletedAt to be an explicit nil -func (o *FolderOut) SetDeletedAtNil() { - o.DeletedAt.Set(nil) -} - -// UnsetDeletedAt ensures that no value is present for DeletedAt, not even an explicit nil -func (o *FolderOut) UnsetDeletedAt() { - o.DeletedAt.Unset() -} - -// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *FolderOut) GetDescription() string { - if o == nil || IsNil(o.Description.Get()) { - var ret string - return ret - } - return *o.Description.Get() -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FolderOut) GetDescriptionOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Description.Get(), o.Description.IsSet() -} - -// HasDescription returns a boolean if a field has been set. -func (o *FolderOut) HasDescription() bool { - if o != nil && o.Description.IsSet() { - return true - } - - return false -} - -// SetDescription gets a reference to the given NullableString and assigns it to the Description field. -func (o *FolderOut) SetDescription(v string) { - o.Description.Set(&v) -} -// SetDescriptionNil sets the value for Description to be an explicit nil -func (o *FolderOut) SetDescriptionNil() { - o.Description.Set(nil) -} - -// UnsetDescription ensures that no value is present for Description, not even an explicit nil -func (o *FolderOut) UnsetDescription() { - o.Description.Unset() -} // GetDriveId returns the DriveId field value func (o *FolderOut) GetDriveId() string { @@ -200,28 +139,28 @@ func (o *FolderOut) SetDriveId(v string) { o.DriveId = v } -// GetEtag returns the Etag field value -func (o *FolderOut) GetEtag() string { +// GetGrantInheritance returns the GrantInheritance field value +func (o *FolderOut) GetGrantInheritance() string { if o == nil { var ret string return ret } - return o.Etag + return o.GrantInheritance } -// GetEtagOk returns a tuple with the Etag field value +// GetGrantInheritanceOk returns a tuple with the GrantInheritance field value // and a boolean to check if the value has been set. -func (o *FolderOut) GetEtagOk() (*string, bool) { +func (o *FolderOut) GetGrantInheritanceOk() (*string, bool) { if o == nil { return nil, false } - return &o.Etag, true + return &o.GrantInheritance, true } -// SetEtag sets field value -func (o *FolderOut) SetEtag(v string) { - o.Etag = v +// SetGrantInheritance sets field value +func (o *FolderOut) SetGrantInheritance(v string) { + o.GrantInheritance = v } // GetId returns the Id field value @@ -248,134 +187,128 @@ func (o *FolderOut) SetId(v string) { o.Id = v } -// GetInheritGrants returns the InheritGrants field value if set, zero value otherwise. -func (o *FolderOut) GetInheritGrants() bool { - if o == nil || IsNil(o.InheritGrants) { - var ret bool +// GetMetadata returns the Metadata field value +func (o *FolderOut) GetMetadata() map[string]interface{} { + if o == nil { + var ret map[string]interface{} return ret } - return *o.InheritGrants -} -// GetInheritGrantsOk returns a tuple with the InheritGrants field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FolderOut) GetInheritGrantsOk() (*bool, bool) { - if o == nil || IsNil(o.InheritGrants) { - return nil, false - } - return o.InheritGrants, true + return o.Metadata } -// HasInheritGrants returns a boolean if a field has been set. -func (o *FolderOut) HasInheritGrants() bool { - if o != nil && !IsNil(o.InheritGrants) { - return true +// GetMetadataOk returns a tuple with the Metadata field value +// and a boolean to check if the value has been set. +func (o *FolderOut) GetMetadataOk() (map[string]interface{}, bool) { + if o == nil { + return map[string]interface{}{}, false } - - return false + return o.Metadata, true } -// SetInheritGrants gets a reference to the given bool and assigns it to the InheritGrants field. -func (o *FolderOut) SetInheritGrants(v bool) { - o.InheritGrants = &v +// SetMetadata sets field value +func (o *FolderOut) SetMetadata(v map[string]interface{}) { + o.Metadata = v } -// GetMetageneration returns the Metageneration field value if set, zero value otherwise. -func (o *FolderOut) GetMetageneration() int32 { - if o == nil || IsNil(o.Metageneration) { - var ret int32 +// GetName returns the Name field value +// If the value is explicit nil, the zero value for string will be returned +func (o *FolderOut) GetName() string { + if o == nil || o.Name.Get() == nil { + var ret string return ret } - return *o.Metageneration + + return *o.Name.Get() } -// GetMetagenerationOk returns a tuple with the Metageneration field value if set, nil otherwise +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. -func (o *FolderOut) GetMetagenerationOk() (*int32, bool) { - if o == nil || IsNil(o.Metageneration) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FolderOut) GetNameOk() (*string, bool) { + if o == nil { return nil, false } - return o.Metageneration, true + return o.Name.Get(), o.Name.IsSet() } -// HasMetageneration returns a boolean if a field has been set. -func (o *FolderOut) HasMetageneration() bool { - if o != nil && !IsNil(o.Metageneration) { - return true - } - - return false +// SetName sets field value +func (o *FolderOut) SetName(v string) { + o.Name.Set(&v) } -// SetMetageneration gets a reference to the given int32 and assigns it to the Metageneration field. -func (o *FolderOut) SetMetageneration(v int32) { - o.Metageneration = &v -} - -// GetPath returns the Path field value -func (o *FolderOut) GetPath() string { - if o == nil { +// GetParentId returns the ParentId field value +// If the value is explicit nil, the zero value for string will be returned +func (o *FolderOut) GetParentId() string { + if o == nil || o.ParentId.Get() == nil { var ret string return ret } - return o.Path + return *o.ParentId.Get() } -// GetPathOk returns a tuple with the Path field value +// GetParentIdOk returns a tuple with the ParentId field value // and a boolean to check if the value has been set. -func (o *FolderOut) GetPathOk() (*string, bool) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FolderOut) GetParentIdOk() (*string, bool) { if o == nil { return nil, false } - return &o.Path, true + return o.ParentId.Get(), o.ParentId.IsSet() } -// SetPath sets field value -func (o *FolderOut) SetPath(v string) { - o.Path = v +// SetParentId sets field value +func (o *FolderOut) SetParentId(v string) { + o.ParentId.Set(&v) } -// GetPurgeAt returns the PurgeAt field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *FolderOut) GetPurgeAt() time.Time { - if o == nil || IsNil(o.PurgeAt.Get()) { - var ret time.Time +// GetRevision returns the Revision field value +func (o *FolderOut) GetRevision() string { + if o == nil { + var ret string return ret } - return *o.PurgeAt.Get() + + return o.Revision } -// GetPurgeAtOk returns a tuple with the PurgeAt field value if set, nil otherwise +// GetRevisionOk returns a tuple with the Revision field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FolderOut) GetPurgeAtOk() (*time.Time, bool) { +func (o *FolderOut) GetRevisionOk() (*string, bool) { if o == nil { return nil, false } - return o.PurgeAt.Get(), o.PurgeAt.IsSet() + return &o.Revision, true +} + +// SetRevision sets field value +func (o *FolderOut) SetRevision(v string) { + o.Revision = v } -// HasPurgeAt returns a boolean if a field has been set. -func (o *FolderOut) HasPurgeAt() bool { - if o != nil && o.PurgeAt.IsSet() { - return true +// GetState returns the State field value +func (o *FolderOut) GetState() string { + if o == nil { + var ret string + return ret } - return false + return o.State } -// SetPurgeAt gets a reference to the given NullableTime and assigns it to the PurgeAt field. -func (o *FolderOut) SetPurgeAt(v time.Time) { - o.PurgeAt.Set(&v) -} -// SetPurgeAtNil sets the value for PurgeAt to be an explicit nil -func (o *FolderOut) SetPurgeAtNil() { - o.PurgeAt.Set(nil) +// GetStateOk returns a tuple with the State field value +// and a boolean to check if the value has been set. +func (o *FolderOut) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.State, true } -// UnsetPurgeAt ensures that no value is present for PurgeAt, not even an explicit nil -func (o *FolderOut) UnsetPurgeAt() { - o.PurgeAt.Unset() +// SetState sets field value +func (o *FolderOut) SetState(v string) { + o.State = v } // GetUpdatedAt returns the UpdatedAt field value @@ -413,25 +346,15 @@ func (o FolderOut) MarshalJSON() ([]byte, error) { func (o FolderOut) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} toSerialize["created_at"] = o.CreatedAt - if o.DeletedAt.IsSet() { - toSerialize["deleted_at"] = o.DeletedAt.Get() - } - if o.Description.IsSet() { - toSerialize["description"] = o.Description.Get() - } + toSerialize["deleted_at"] = o.DeletedAt.Get() toSerialize["drive_id"] = o.DriveId - toSerialize["etag"] = o.Etag + toSerialize["grant_inheritance"] = o.GrantInheritance toSerialize["id"] = o.Id - if !IsNil(o.InheritGrants) { - toSerialize["inherit_grants"] = o.InheritGrants - } - if !IsNil(o.Metageneration) { - toSerialize["metageneration"] = o.Metageneration - } - toSerialize["path"] = o.Path - if o.PurgeAt.IsSet() { - toSerialize["purge_at"] = o.PurgeAt.Get() - } + toSerialize["metadata"] = o.Metadata + toSerialize["name"] = o.Name.Get() + toSerialize["parent_id"] = o.ParentId.Get() + toSerialize["revision"] = o.Revision + toSerialize["state"] = o.State toSerialize["updated_at"] = o.UpdatedAt return toSerialize, nil } @@ -442,10 +365,15 @@ func (o *FolderOut) UnmarshalJSON(data []byte) (err error) { // that every required field exists as a key in the generic map. requiredProperties := []string{ "created_at", + "deleted_at", "drive_id", - "etag", + "grant_inheritance", "id", - "path", + "metadata", + "name", + "parent_id", + "revision", + "state", "updated_at", } diff --git a/sdk/go/model_folder_patch_in.go b/sdk/go/model_folder_patch_in.go deleted file mode 100644 index 5bf5a8e..0000000 --- a/sdk/go/model_folder_patch_in.go +++ /dev/null @@ -1,180 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" -) - -// checks if the FolderPatchIn type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &FolderPatchIn{} - -// FolderPatchIn PATCH /v0/folders/{fld_id} body — partial update. Field absence = unchanged. `description`: explicit null = clear. `inherit_grants`: non-nullable — null/absent = unchanged (it cannot be cleared, only flipped true/false). -type FolderPatchIn struct { - Description NullableString `json:"description,omitempty"` - InheritGrants NullableBool `json:"inherit_grants,omitempty"` -} - -// NewFolderPatchIn instantiates a new FolderPatchIn object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewFolderPatchIn() *FolderPatchIn { - this := FolderPatchIn{} - return &this -} - -// NewFolderPatchInWithDefaults instantiates a new FolderPatchIn object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewFolderPatchInWithDefaults() *FolderPatchIn { - this := FolderPatchIn{} - return &this -} - -// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *FolderPatchIn) GetDescription() string { - if o == nil || IsNil(o.Description.Get()) { - var ret string - return ret - } - return *o.Description.Get() -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FolderPatchIn) GetDescriptionOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Description.Get(), o.Description.IsSet() -} - -// HasDescription returns a boolean if a field has been set. -func (o *FolderPatchIn) HasDescription() bool { - if o != nil && o.Description.IsSet() { - return true - } - - return false -} - -// SetDescription gets a reference to the given NullableString and assigns it to the Description field. -func (o *FolderPatchIn) SetDescription(v string) { - o.Description.Set(&v) -} -// SetDescriptionNil sets the value for Description to be an explicit nil -func (o *FolderPatchIn) SetDescriptionNil() { - o.Description.Set(nil) -} - -// UnsetDescription ensures that no value is present for Description, not even an explicit nil -func (o *FolderPatchIn) UnsetDescription() { - o.Description.Unset() -} - -// GetInheritGrants returns the InheritGrants field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *FolderPatchIn) GetInheritGrants() bool { - if o == nil || IsNil(o.InheritGrants.Get()) { - var ret bool - return ret - } - return *o.InheritGrants.Get() -} - -// GetInheritGrantsOk returns a tuple with the InheritGrants field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FolderPatchIn) GetInheritGrantsOk() (*bool, bool) { - if o == nil { - return nil, false - } - return o.InheritGrants.Get(), o.InheritGrants.IsSet() -} - -// HasInheritGrants returns a boolean if a field has been set. -func (o *FolderPatchIn) HasInheritGrants() bool { - if o != nil && o.InheritGrants.IsSet() { - return true - } - - return false -} - -// SetInheritGrants gets a reference to the given NullableBool and assigns it to the InheritGrants field. -func (o *FolderPatchIn) SetInheritGrants(v bool) { - o.InheritGrants.Set(&v) -} -// SetInheritGrantsNil sets the value for InheritGrants to be an explicit nil -func (o *FolderPatchIn) SetInheritGrantsNil() { - o.InheritGrants.Set(nil) -} - -// UnsetInheritGrants ensures that no value is present for InheritGrants, not even an explicit nil -func (o *FolderPatchIn) UnsetInheritGrants() { - o.InheritGrants.Unset() -} - -func (o FolderPatchIn) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o FolderPatchIn) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Description.IsSet() { - toSerialize["description"] = o.Description.Get() - } - if o.InheritGrants.IsSet() { - toSerialize["inherit_grants"] = o.InheritGrants.Get() - } - return toSerialize, nil -} - -type NullableFolderPatchIn struct { - value *FolderPatchIn - isSet bool -} - -func (v NullableFolderPatchIn) Get() *FolderPatchIn { - return v.value -} - -func (v *NullableFolderPatchIn) Set(val *FolderPatchIn) { - v.value = val - v.isSet = true -} - -func (v NullableFolderPatchIn) IsSet() bool { - return v.isSet -} - -func (v *NullableFolderPatchIn) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFolderPatchIn(val *FolderPatchIn) *NullableFolderPatchIn { - return &NullableFolderPatchIn{value: val, isSet: true} -} - -func (v NullableFolderPatchIn) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFolderPatchIn) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_folder_restore_out.go b/sdk/go/model_folder_restore_out.go deleted file mode 100644 index 9171a4b..0000000 --- a/sdk/go/model_folder_restore_out.go +++ /dev/null @@ -1,571 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "time" - "bytes" - "fmt" -) - -// checks if the FolderRestoreOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &FolderRestoreOut{} - -// FolderRestoreOut POST /v0/folders/{fld_id}/restore response — the restored (live) folder resource (same shape as `FolderOut`) plus the cascade counts from `core.folders.restore_cascade` (dashboard-file-operations-design §4.5), so the caller can confirm the scope of what came back with the root. -type FolderRestoreOut struct { - CreatedAt time.Time `json:"created_at"` - DeletedAt NullableTime `json:"deleted_at,omitempty"` - Description NullableString `json:"description,omitempty"` - DriveId string `json:"drive_id"` - Etag string `json:"etag"` - Id string `json:"id"` - InheritGrants *bool `json:"inherit_grants,omitempty"` - Metageneration *int32 `json:"metageneration,omitempty"` - NArtifactsRestored int32 `json:"n_artifacts_restored"` - NSubfoldersRestored int32 `json:"n_subfolders_restored"` - Path string `json:"path"` - PurgeAt NullableTime `json:"purge_at,omitempty"` - UpdatedAt time.Time `json:"updated_at"` -} - -type _FolderRestoreOut FolderRestoreOut - -// NewFolderRestoreOut instantiates a new FolderRestoreOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewFolderRestoreOut(createdAt time.Time, driveId string, etag string, id string, nArtifactsRestored int32, nSubfoldersRestored int32, path string, updatedAt time.Time) *FolderRestoreOut { - this := FolderRestoreOut{} - this.CreatedAt = createdAt - this.DriveId = driveId - this.Etag = etag - this.Id = id - var inheritGrants bool = true - this.InheritGrants = &inheritGrants - var metageneration int32 = 1 - this.Metageneration = &metageneration - this.NArtifactsRestored = nArtifactsRestored - this.NSubfoldersRestored = nSubfoldersRestored - this.Path = path - this.UpdatedAt = updatedAt - return &this -} - -// NewFolderRestoreOutWithDefaults instantiates a new FolderRestoreOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewFolderRestoreOutWithDefaults() *FolderRestoreOut { - this := FolderRestoreOut{} - var inheritGrants bool = true - this.InheritGrants = &inheritGrants - var metageneration int32 = 1 - this.Metageneration = &metageneration - return &this -} - -// GetCreatedAt returns the CreatedAt field value -func (o *FolderRestoreOut) GetCreatedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value -// and a boolean to check if the value has been set. -func (o *FolderRestoreOut) GetCreatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.CreatedAt, true -} - -// SetCreatedAt sets field value -func (o *FolderRestoreOut) SetCreatedAt(v time.Time) { - o.CreatedAt = v -} - -// GetDeletedAt returns the DeletedAt field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *FolderRestoreOut) GetDeletedAt() time.Time { - if o == nil || IsNil(o.DeletedAt.Get()) { - var ret time.Time - return ret - } - return *o.DeletedAt.Get() -} - -// GetDeletedAtOk returns a tuple with the DeletedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FolderRestoreOut) GetDeletedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.DeletedAt.Get(), o.DeletedAt.IsSet() -} - -// HasDeletedAt returns a boolean if a field has been set. -func (o *FolderRestoreOut) HasDeletedAt() bool { - if o != nil && o.DeletedAt.IsSet() { - return true - } - - return false -} - -// SetDeletedAt gets a reference to the given NullableTime and assigns it to the DeletedAt field. -func (o *FolderRestoreOut) SetDeletedAt(v time.Time) { - o.DeletedAt.Set(&v) -} -// SetDeletedAtNil sets the value for DeletedAt to be an explicit nil -func (o *FolderRestoreOut) SetDeletedAtNil() { - o.DeletedAt.Set(nil) -} - -// UnsetDeletedAt ensures that no value is present for DeletedAt, not even an explicit nil -func (o *FolderRestoreOut) UnsetDeletedAt() { - o.DeletedAt.Unset() -} - -// GetDescription returns the Description field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *FolderRestoreOut) GetDescription() string { - if o == nil || IsNil(o.Description.Get()) { - var ret string - return ret - } - return *o.Description.Get() -} - -// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FolderRestoreOut) GetDescriptionOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Description.Get(), o.Description.IsSet() -} - -// HasDescription returns a boolean if a field has been set. -func (o *FolderRestoreOut) HasDescription() bool { - if o != nil && o.Description.IsSet() { - return true - } - - return false -} - -// SetDescription gets a reference to the given NullableString and assigns it to the Description field. -func (o *FolderRestoreOut) SetDescription(v string) { - o.Description.Set(&v) -} -// SetDescriptionNil sets the value for Description to be an explicit nil -func (o *FolderRestoreOut) SetDescriptionNil() { - o.Description.Set(nil) -} - -// UnsetDescription ensures that no value is present for Description, not even an explicit nil -func (o *FolderRestoreOut) UnsetDescription() { - o.Description.Unset() -} - -// GetDriveId returns the DriveId field value -func (o *FolderRestoreOut) GetDriveId() string { - if o == nil { - var ret string - return ret - } - - return o.DriveId -} - -// GetDriveIdOk returns a tuple with the DriveId field value -// and a boolean to check if the value has been set. -func (o *FolderRestoreOut) GetDriveIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.DriveId, true -} - -// SetDriveId sets field value -func (o *FolderRestoreOut) SetDriveId(v string) { - o.DriveId = v -} - -// GetEtag returns the Etag field value -func (o *FolderRestoreOut) GetEtag() string { - if o == nil { - var ret string - return ret - } - - return o.Etag -} - -// GetEtagOk returns a tuple with the Etag field value -// and a boolean to check if the value has been set. -func (o *FolderRestoreOut) GetEtagOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Etag, true -} - -// SetEtag sets field value -func (o *FolderRestoreOut) SetEtag(v string) { - o.Etag = v -} - -// GetId returns the Id field value -func (o *FolderRestoreOut) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *FolderRestoreOut) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *FolderRestoreOut) SetId(v string) { - o.Id = v -} - -// GetInheritGrants returns the InheritGrants field value if set, zero value otherwise. -func (o *FolderRestoreOut) GetInheritGrants() bool { - if o == nil || IsNil(o.InheritGrants) { - var ret bool - return ret - } - return *o.InheritGrants -} - -// GetInheritGrantsOk returns a tuple with the InheritGrants field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FolderRestoreOut) GetInheritGrantsOk() (*bool, bool) { - if o == nil || IsNil(o.InheritGrants) { - return nil, false - } - return o.InheritGrants, true -} - -// HasInheritGrants returns a boolean if a field has been set. -func (o *FolderRestoreOut) HasInheritGrants() bool { - if o != nil && !IsNil(o.InheritGrants) { - return true - } - - return false -} - -// SetInheritGrants gets a reference to the given bool and assigns it to the InheritGrants field. -func (o *FolderRestoreOut) SetInheritGrants(v bool) { - o.InheritGrants = &v -} - -// GetMetageneration returns the Metageneration field value if set, zero value otherwise. -func (o *FolderRestoreOut) GetMetageneration() int32 { - if o == nil || IsNil(o.Metageneration) { - var ret int32 - return ret - } - return *o.Metageneration -} - -// GetMetagenerationOk returns a tuple with the Metageneration field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *FolderRestoreOut) GetMetagenerationOk() (*int32, bool) { - if o == nil || IsNil(o.Metageneration) { - return nil, false - } - return o.Metageneration, true -} - -// HasMetageneration returns a boolean if a field has been set. -func (o *FolderRestoreOut) HasMetageneration() bool { - if o != nil && !IsNil(o.Metageneration) { - return true - } - - return false -} - -// SetMetageneration gets a reference to the given int32 and assigns it to the Metageneration field. -func (o *FolderRestoreOut) SetMetageneration(v int32) { - o.Metageneration = &v -} - -// GetNArtifactsRestored returns the NArtifactsRestored field value -func (o *FolderRestoreOut) GetNArtifactsRestored() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.NArtifactsRestored -} - -// GetNArtifactsRestoredOk returns a tuple with the NArtifactsRestored field value -// and a boolean to check if the value has been set. -func (o *FolderRestoreOut) GetNArtifactsRestoredOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.NArtifactsRestored, true -} - -// SetNArtifactsRestored sets field value -func (o *FolderRestoreOut) SetNArtifactsRestored(v int32) { - o.NArtifactsRestored = v -} - -// GetNSubfoldersRestored returns the NSubfoldersRestored field value -func (o *FolderRestoreOut) GetNSubfoldersRestored() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.NSubfoldersRestored -} - -// GetNSubfoldersRestoredOk returns a tuple with the NSubfoldersRestored field value -// and a boolean to check if the value has been set. -func (o *FolderRestoreOut) GetNSubfoldersRestoredOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.NSubfoldersRestored, true -} - -// SetNSubfoldersRestored sets field value -func (o *FolderRestoreOut) SetNSubfoldersRestored(v int32) { - o.NSubfoldersRestored = v -} - -// GetPath returns the Path field value -func (o *FolderRestoreOut) GetPath() string { - if o == nil { - var ret string - return ret - } - - return o.Path -} - -// GetPathOk returns a tuple with the Path field value -// and a boolean to check if the value has been set. -func (o *FolderRestoreOut) GetPathOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Path, true -} - -// SetPath sets field value -func (o *FolderRestoreOut) SetPath(v string) { - o.Path = v -} - -// GetPurgeAt returns the PurgeAt field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *FolderRestoreOut) GetPurgeAt() time.Time { - if o == nil || IsNil(o.PurgeAt.Get()) { - var ret time.Time - return ret - } - return *o.PurgeAt.Get() -} - -// GetPurgeAtOk returns a tuple with the PurgeAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *FolderRestoreOut) GetPurgeAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.PurgeAt.Get(), o.PurgeAt.IsSet() -} - -// HasPurgeAt returns a boolean if a field has been set. -func (o *FolderRestoreOut) HasPurgeAt() bool { - if o != nil && o.PurgeAt.IsSet() { - return true - } - - return false -} - -// SetPurgeAt gets a reference to the given NullableTime and assigns it to the PurgeAt field. -func (o *FolderRestoreOut) SetPurgeAt(v time.Time) { - o.PurgeAt.Set(&v) -} -// SetPurgeAtNil sets the value for PurgeAt to be an explicit nil -func (o *FolderRestoreOut) SetPurgeAtNil() { - o.PurgeAt.Set(nil) -} - -// UnsetPurgeAt ensures that no value is present for PurgeAt, not even an explicit nil -func (o *FolderRestoreOut) UnsetPurgeAt() { - o.PurgeAt.Unset() -} - -// GetUpdatedAt returns the UpdatedAt field value -func (o *FolderRestoreOut) GetUpdatedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.UpdatedAt -} - -// GetUpdatedAtOk returns a tuple with the UpdatedAt field value -// and a boolean to check if the value has been set. -func (o *FolderRestoreOut) GetUpdatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.UpdatedAt, true -} - -// SetUpdatedAt sets field value -func (o *FolderRestoreOut) SetUpdatedAt(v time.Time) { - o.UpdatedAt = v -} - -func (o FolderRestoreOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o FolderRestoreOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["created_at"] = o.CreatedAt - if o.DeletedAt.IsSet() { - toSerialize["deleted_at"] = o.DeletedAt.Get() - } - if o.Description.IsSet() { - toSerialize["description"] = o.Description.Get() - } - toSerialize["drive_id"] = o.DriveId - toSerialize["etag"] = o.Etag - toSerialize["id"] = o.Id - if !IsNil(o.InheritGrants) { - toSerialize["inherit_grants"] = o.InheritGrants - } - if !IsNil(o.Metageneration) { - toSerialize["metageneration"] = o.Metageneration - } - toSerialize["n_artifacts_restored"] = o.NArtifactsRestored - toSerialize["n_subfolders_restored"] = o.NSubfoldersRestored - toSerialize["path"] = o.Path - if o.PurgeAt.IsSet() { - toSerialize["purge_at"] = o.PurgeAt.Get() - } - toSerialize["updated_at"] = o.UpdatedAt - return toSerialize, nil -} - -func (o *FolderRestoreOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "created_at", - "drive_id", - "etag", - "id", - "n_artifacts_restored", - "n_subfolders_restored", - "path", - "updated_at", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varFolderRestoreOut := _FolderRestoreOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varFolderRestoreOut) - - if err != nil { - return err - } - - *o = FolderRestoreOut(varFolderRestoreOut) - - return err -} - -type NullableFolderRestoreOut struct { - value *FolderRestoreOut - isSet bool -} - -func (v NullableFolderRestoreOut) Get() *FolderRestoreOut { - return v.value -} - -func (v *NullableFolderRestoreOut) Set(val *FolderRestoreOut) { - v.value = val - v.isSet = true -} - -func (v NullableFolderRestoreOut) IsSet() bool { - return v.isSet -} - -func (v *NullableFolderRestoreOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableFolderRestoreOut(val *FolderRestoreOut) *NullableFolderRestoreOut { - return &NullableFolderRestoreOut{value: val, isSet: true} -} - -func (v NullableFolderRestoreOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableFolderRestoreOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_folder_update_in.go b/sdk/go/model_folder_update_in.go new file mode 100644 index 0000000..c995757 --- /dev/null +++ b/sdk/go/model_folder_update_in.go @@ -0,0 +1,295 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "encoding/json" +) + +// checks if the FolderUpdateIn type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &FolderUpdateIn{} + +// FolderUpdateIn PATCH /v0/drives/{id}/folders/{folder_id} body — at least one field is required. +type FolderUpdateIn struct { + GrantInheritance NullableString `json:"grant_inheritance,omitempty"` + Metadata map[string]interface{} `json:"metadata,omitempty"` + Name NullableString `json:"name,omitempty"` + ParentId NullableString `json:"parent_id,omitempty" validate:"regexp=^fld_[a-f0-9]{16}$"` + AdditionalProperties map[string]interface{} +} + +type _FolderUpdateIn FolderUpdateIn + +// NewFolderUpdateIn instantiates a new FolderUpdateIn object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewFolderUpdateIn() *FolderUpdateIn { + this := FolderUpdateIn{} + return &this +} + +// NewFolderUpdateInWithDefaults instantiates a new FolderUpdateIn object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewFolderUpdateInWithDefaults() *FolderUpdateIn { + this := FolderUpdateIn{} + return &this +} + +// GetGrantInheritance returns the GrantInheritance field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FolderUpdateIn) GetGrantInheritance() string { + if o == nil || IsNil(o.GrantInheritance.Get()) { + var ret string + return ret + } + return *o.GrantInheritance.Get() +} + +// GetGrantInheritanceOk returns a tuple with the GrantInheritance field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FolderUpdateIn) GetGrantInheritanceOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.GrantInheritance.Get(), o.GrantInheritance.IsSet() +} + +// HasGrantInheritance returns a boolean if a field has been set. +func (o *FolderUpdateIn) HasGrantInheritance() bool { + if o != nil && o.GrantInheritance.IsSet() { + return true + } + + return false +} + +// SetGrantInheritance gets a reference to the given NullableString and assigns it to the GrantInheritance field. +func (o *FolderUpdateIn) SetGrantInheritance(v string) { + o.GrantInheritance.Set(&v) +} +// SetGrantInheritanceNil sets the value for GrantInheritance to be an explicit nil +func (o *FolderUpdateIn) SetGrantInheritanceNil() { + o.GrantInheritance.Set(nil) +} + +// UnsetGrantInheritance ensures that no value is present for GrantInheritance, not even an explicit nil +func (o *FolderUpdateIn) UnsetGrantInheritance() { + o.GrantInheritance.Unset() +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FolderUpdateIn) GetMetadata() map[string]interface{} { + if o == nil { + var ret map[string]interface{} + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FolderUpdateIn) GetMetadataOk() (map[string]interface{}, bool) { + if o == nil || IsNil(o.Metadata) { + return map[string]interface{}{}, false + } + return o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *FolderUpdateIn) HasMetadata() bool { + if o != nil && !IsNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. +func (o *FolderUpdateIn) SetMetadata(v map[string]interface{}) { + o.Metadata = v +} + +// GetName returns the Name field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FolderUpdateIn) GetName() string { + if o == nil || IsNil(o.Name.Get()) { + var ret string + return ret + } + return *o.Name.Get() +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FolderUpdateIn) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Name.Get(), o.Name.IsSet() +} + +// HasName returns a boolean if a field has been set. +func (o *FolderUpdateIn) HasName() bool { + if o != nil && o.Name.IsSet() { + return true + } + + return false +} + +// SetName gets a reference to the given NullableString and assigns it to the Name field. +func (o *FolderUpdateIn) SetName(v string) { + o.Name.Set(&v) +} +// SetNameNil sets the value for Name to be an explicit nil +func (o *FolderUpdateIn) SetNameNil() { + o.Name.Set(nil) +} + +// UnsetName ensures that no value is present for Name, not even an explicit nil +func (o *FolderUpdateIn) UnsetName() { + o.Name.Unset() +} + +// GetParentId returns the ParentId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *FolderUpdateIn) GetParentId() string { + if o == nil || IsNil(o.ParentId.Get()) { + var ret string + return ret + } + return *o.ParentId.Get() +} + +// GetParentIdOk returns a tuple with the ParentId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *FolderUpdateIn) GetParentIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ParentId.Get(), o.ParentId.IsSet() +} + +// HasParentId returns a boolean if a field has been set. +func (o *FolderUpdateIn) HasParentId() bool { + if o != nil && o.ParentId.IsSet() { + return true + } + + return false +} + +// SetParentId gets a reference to the given NullableString and assigns it to the ParentId field. +func (o *FolderUpdateIn) SetParentId(v string) { + o.ParentId.Set(&v) +} +// SetParentIdNil sets the value for ParentId to be an explicit nil +func (o *FolderUpdateIn) SetParentIdNil() { + o.ParentId.Set(nil) +} + +// UnsetParentId ensures that no value is present for ParentId, not even an explicit nil +func (o *FolderUpdateIn) UnsetParentId() { + o.ParentId.Unset() +} + +func (o FolderUpdateIn) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o FolderUpdateIn) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.GrantInheritance.IsSet() { + toSerialize["grant_inheritance"] = o.GrantInheritance.Get() + } + if o.Metadata != nil { + toSerialize["metadata"] = o.Metadata + } + if o.Name.IsSet() { + toSerialize["name"] = o.Name.Get() + } + if o.ParentId.IsSet() { + toSerialize["parent_id"] = o.ParentId.Get() + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *FolderUpdateIn) UnmarshalJSON(data []byte) (err error) { + varFolderUpdateIn := _FolderUpdateIn{} + + err = json.Unmarshal(data, &varFolderUpdateIn) + + if err != nil { + return err + } + + *o = FolderUpdateIn(varFolderUpdateIn) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "grant_inheritance") + delete(additionalProperties, "metadata") + delete(additionalProperties, "name") + delete(additionalProperties, "parent_id") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableFolderUpdateIn struct { + value *FolderUpdateIn + isSet bool +} + +func (v NullableFolderUpdateIn) Get() *FolderUpdateIn { + return v.value +} + +func (v *NullableFolderUpdateIn) Set(val *FolderUpdateIn) { + v.value = val + v.isSet = true +} + +func (v NullableFolderUpdateIn) IsSet() bool { + return v.isSet +} + +func (v *NullableFolderUpdateIn) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableFolderUpdateIn(val *FolderUpdateIn) *NullableFolderUpdateIn { + return &NullableFolderUpdateIn{value: val, isSet: true} +} + +func (v NullableFolderUpdateIn) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableFolderUpdateIn) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/sdk/go/model_grant_create_in.go b/sdk/go/model_grant_create_in.go index 08bf54b..6b6cf78 100644 --- a/sdk/go/model_grant_create_in.go +++ b/sdk/go/model_grant_create_in.go @@ -1,7 +1,7 @@ /* AgentDrive -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. API version: */ @@ -12,6 +12,7 @@ package agentdrive import ( "encoding/json" + "time" "bytes" "fmt" ) @@ -19,11 +20,13 @@ import ( // checks if the GrantCreateIn type satisfies the MappedNullable interface at compile time var _ MappedNullable = &GrantCreateIn{} -// GrantCreateIn POST /v0/grants body. `resource` is an `art_*`/`fld_*` id or a path (resolved within the caller's drive). `expires_in` is seconds from now (omit for a permanent grant). +// GrantCreateIn POST /v0/drives/{id}/grants body. type GrantCreateIn struct { - ExpiresIn NullableInt32 `json:"expires_in,omitempty"` - Principal GrantPrincipalIn `json:"principal"` - Resource string `json:"resource"` + ExpiresAt NullableTime `json:"expires_at,omitempty"` + PrincipalId NullableString `json:"principal_id,omitempty"` + PrincipalType string `json:"principal_type"` + ResourceId string `json:"resource_id"` + ResourceType string `json:"resource_type"` Role string `json:"role"` } @@ -33,10 +36,11 @@ type _GrantCreateIn GrantCreateIn // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewGrantCreateIn(principal GrantPrincipalIn, resource string, role string) *GrantCreateIn { +func NewGrantCreateIn(principalType string, resourceId string, resourceType string, role string) *GrantCreateIn { this := GrantCreateIn{} - this.Principal = principal - this.Resource = resource + this.PrincipalType = principalType + this.ResourceId = resourceId + this.ResourceType = resourceType this.Role = role return &this } @@ -49,94 +53,160 @@ func NewGrantCreateInWithDefaults() *GrantCreateIn { return &this } -// GetExpiresIn returns the ExpiresIn field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GrantCreateIn) GetExpiresIn() int32 { - if o == nil || IsNil(o.ExpiresIn.Get()) { - var ret int32 +// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GrantCreateIn) GetExpiresAt() time.Time { + if o == nil || IsNil(o.ExpiresAt.Get()) { + var ret time.Time return ret } - return *o.ExpiresIn.Get() + return *o.ExpiresAt.Get() } -// GetExpiresInOk returns a tuple with the ExpiresIn field value if set, nil otherwise +// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GrantCreateIn) GetExpiresInOk() (*int32, bool) { +func (o *GrantCreateIn) GetExpiresAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return o.ExpiresIn.Get(), o.ExpiresIn.IsSet() + return o.ExpiresAt.Get(), o.ExpiresAt.IsSet() } -// HasExpiresIn returns a boolean if a field has been set. -func (o *GrantCreateIn) HasExpiresIn() bool { - if o != nil && o.ExpiresIn.IsSet() { +// HasExpiresAt returns a boolean if a field has been set. +func (o *GrantCreateIn) HasExpiresAt() bool { + if o != nil && o.ExpiresAt.IsSet() { return true } return false } -// SetExpiresIn gets a reference to the given NullableInt32 and assigns it to the ExpiresIn field. -func (o *GrantCreateIn) SetExpiresIn(v int32) { - o.ExpiresIn.Set(&v) +// SetExpiresAt gets a reference to the given NullableTime and assigns it to the ExpiresAt field. +func (o *GrantCreateIn) SetExpiresAt(v time.Time) { + o.ExpiresAt.Set(&v) } -// SetExpiresInNil sets the value for ExpiresIn to be an explicit nil -func (o *GrantCreateIn) SetExpiresInNil() { - o.ExpiresIn.Set(nil) +// SetExpiresAtNil sets the value for ExpiresAt to be an explicit nil +func (o *GrantCreateIn) SetExpiresAtNil() { + o.ExpiresAt.Set(nil) } -// UnsetExpiresIn ensures that no value is present for ExpiresIn, not even an explicit nil -func (o *GrantCreateIn) UnsetExpiresIn() { - o.ExpiresIn.Unset() +// UnsetExpiresAt ensures that no value is present for ExpiresAt, not even an explicit nil +func (o *GrantCreateIn) UnsetExpiresAt() { + o.ExpiresAt.Unset() } -// GetPrincipal returns the Principal field value -func (o *GrantCreateIn) GetPrincipal() GrantPrincipalIn { +// GetPrincipalId returns the PrincipalId field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GrantCreateIn) GetPrincipalId() string { + if o == nil || IsNil(o.PrincipalId.Get()) { + var ret string + return ret + } + return *o.PrincipalId.Get() +} + +// GetPrincipalIdOk returns a tuple with the PrincipalId field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GrantCreateIn) GetPrincipalIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.PrincipalId.Get(), o.PrincipalId.IsSet() +} + +// HasPrincipalId returns a boolean if a field has been set. +func (o *GrantCreateIn) HasPrincipalId() bool { + if o != nil && o.PrincipalId.IsSet() { + return true + } + + return false +} + +// SetPrincipalId gets a reference to the given NullableString and assigns it to the PrincipalId field. +func (o *GrantCreateIn) SetPrincipalId(v string) { + o.PrincipalId.Set(&v) +} +// SetPrincipalIdNil sets the value for PrincipalId to be an explicit nil +func (o *GrantCreateIn) SetPrincipalIdNil() { + o.PrincipalId.Set(nil) +} + +// UnsetPrincipalId ensures that no value is present for PrincipalId, not even an explicit nil +func (o *GrantCreateIn) UnsetPrincipalId() { + o.PrincipalId.Unset() +} + +// GetPrincipalType returns the PrincipalType field value +func (o *GrantCreateIn) GetPrincipalType() string { + if o == nil { + var ret string + return ret + } + + return o.PrincipalType +} + +// GetPrincipalTypeOk returns a tuple with the PrincipalType field value +// and a boolean to check if the value has been set. +func (o *GrantCreateIn) GetPrincipalTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PrincipalType, true +} + +// SetPrincipalType sets field value +func (o *GrantCreateIn) SetPrincipalType(v string) { + o.PrincipalType = v +} + +// GetResourceId returns the ResourceId field value +func (o *GrantCreateIn) GetResourceId() string { if o == nil { - var ret GrantPrincipalIn + var ret string return ret } - return o.Principal + return o.ResourceId } -// GetPrincipalOk returns a tuple with the Principal field value +// GetResourceIdOk returns a tuple with the ResourceId field value // and a boolean to check if the value has been set. -func (o *GrantCreateIn) GetPrincipalOk() (*GrantPrincipalIn, bool) { +func (o *GrantCreateIn) GetResourceIdOk() (*string, bool) { if o == nil { return nil, false } - return &o.Principal, true + return &o.ResourceId, true } -// SetPrincipal sets field value -func (o *GrantCreateIn) SetPrincipal(v GrantPrincipalIn) { - o.Principal = v +// SetResourceId sets field value +func (o *GrantCreateIn) SetResourceId(v string) { + o.ResourceId = v } -// GetResource returns the Resource field value -func (o *GrantCreateIn) GetResource() string { +// GetResourceType returns the ResourceType field value +func (o *GrantCreateIn) GetResourceType() string { if o == nil { var ret string return ret } - return o.Resource + return o.ResourceType } -// GetResourceOk returns a tuple with the Resource field value +// GetResourceTypeOk returns a tuple with the ResourceType field value // and a boolean to check if the value has been set. -func (o *GrantCreateIn) GetResourceOk() (*string, bool) { +func (o *GrantCreateIn) GetResourceTypeOk() (*string, bool) { if o == nil { return nil, false } - return &o.Resource, true + return &o.ResourceType, true } -// SetResource sets field value -func (o *GrantCreateIn) SetResource(v string) { - o.Resource = v +// SetResourceType sets field value +func (o *GrantCreateIn) SetResourceType(v string) { + o.ResourceType = v } // GetRole returns the Role field value @@ -173,11 +243,15 @@ func (o GrantCreateIn) MarshalJSON() ([]byte, error) { func (o GrantCreateIn) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.ExpiresIn.IsSet() { - toSerialize["expires_in"] = o.ExpiresIn.Get() + if o.ExpiresAt.IsSet() { + toSerialize["expires_at"] = o.ExpiresAt.Get() + } + if o.PrincipalId.IsSet() { + toSerialize["principal_id"] = o.PrincipalId.Get() } - toSerialize["principal"] = o.Principal - toSerialize["resource"] = o.Resource + toSerialize["principal_type"] = o.PrincipalType + toSerialize["resource_id"] = o.ResourceId + toSerialize["resource_type"] = o.ResourceType toSerialize["role"] = o.Role return toSerialize, nil } @@ -187,8 +261,9 @@ func (o *GrantCreateIn) UnmarshalJSON(data []byte) (err error) { // by unmarshalling the object into a generic map with string keys and checking // that every required field exists as a key in the generic map. requiredProperties := []string{ - "principal", - "resource", + "principal_type", + "resource_id", + "resource_type", "role", } diff --git a/sdk/go/model_grant_list.go b/sdk/go/model_grant_list.go deleted file mode 100644 index 78b47e8..0000000 --- a/sdk/go/model_grant_list.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the GrantList type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GrantList{} - -// GrantList struct for GrantList -type GrantList struct { - Items []GrantOut `json:"items"` - NextCursor NullableString `json:"next_cursor,omitempty"` -} - -type _GrantList GrantList - -// NewGrantList instantiates a new GrantList object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGrantList(items []GrantOut) *GrantList { - this := GrantList{} - this.Items = items - return &this -} - -// NewGrantListWithDefaults instantiates a new GrantList object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGrantListWithDefaults() *GrantList { - this := GrantList{} - return &this -} - -// GetItems returns the Items field value -func (o *GrantList) GetItems() []GrantOut { - if o == nil { - var ret []GrantOut - return ret - } - - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value -// and a boolean to check if the value has been set. -func (o *GrantList) GetItemsOk() ([]GrantOut, bool) { - if o == nil { - return nil, false - } - return o.Items, true -} - -// SetItems sets field value -func (o *GrantList) SetItems(v []GrantOut) { - o.Items = v -} - -// GetNextCursor returns the NextCursor field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GrantList) GetNextCursor() string { - if o == nil || IsNil(o.NextCursor.Get()) { - var ret string - return ret - } - return *o.NextCursor.Get() -} - -// GetNextCursorOk returns a tuple with the NextCursor field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GrantList) GetNextCursorOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.NextCursor.Get(), o.NextCursor.IsSet() -} - -// HasNextCursor returns a boolean if a field has been set. -func (o *GrantList) HasNextCursor() bool { - if o != nil && o.NextCursor.IsSet() { - return true - } - - return false -} - -// SetNextCursor gets a reference to the given NullableString and assigns it to the NextCursor field. -func (o *GrantList) SetNextCursor(v string) { - o.NextCursor.Set(&v) -} -// SetNextCursorNil sets the value for NextCursor to be an explicit nil -func (o *GrantList) SetNextCursorNil() { - o.NextCursor.Set(nil) -} - -// UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil -func (o *GrantList) UnsetNextCursor() { - o.NextCursor.Unset() -} - -func (o GrantList) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GrantList) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["items"] = o.Items - if o.NextCursor.IsSet() { - toSerialize["next_cursor"] = o.NextCursor.Get() - } - return toSerialize, nil -} - -func (o *GrantList) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "items", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varGrantList := _GrantList{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGrantList) - - if err != nil { - return err - } - - *o = GrantList(varGrantList) - - return err -} - -type NullableGrantList struct { - value *GrantList - isSet bool -} - -func (v NullableGrantList) Get() *GrantList { - return v.value -} - -func (v *NullableGrantList) Set(val *GrantList) { - v.value = val - v.isSet = true -} - -func (v NullableGrantList) IsSet() bool { - return v.isSet -} - -func (v *NullableGrantList) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGrantList(val *GrantList) *NullableGrantList { - return &NullableGrantList{value: val, isSet: true} -} - -func (v NullableGrantList) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGrantList) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_grant_list_out.go b/sdk/go/model_grant_list_out.go new file mode 100644 index 0000000..ee9e12b --- /dev/null +++ b/sdk/go/model_grant_list_out.go @@ -0,0 +1,186 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the GrantListOut type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GrantListOut{} + +// GrantListOut struct for GrantListOut +type GrantListOut struct { + Items []GrantOut `json:"items"` + NextCursor NullableString `json:"next_cursor"` +} + +type _GrantListOut GrantListOut + +// NewGrantListOut instantiates a new GrantListOut object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGrantListOut(items []GrantOut, nextCursor NullableString) *GrantListOut { + this := GrantListOut{} + this.Items = items + this.NextCursor = nextCursor + return &this +} + +// NewGrantListOutWithDefaults instantiates a new GrantListOut object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGrantListOutWithDefaults() *GrantListOut { + this := GrantListOut{} + return &this +} + +// GetItems returns the Items field value +func (o *GrantListOut) GetItems() []GrantOut { + if o == nil { + var ret []GrantOut + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *GrantListOut) GetItemsOk() ([]GrantOut, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *GrantListOut) SetItems(v []GrantOut) { + o.Items = v +} + +// GetNextCursor returns the NextCursor field value +// If the value is explicit nil, the zero value for string will be returned +func (o *GrantListOut) GetNextCursor() string { + if o == nil || o.NextCursor.Get() == nil { + var ret string + return ret + } + + return *o.NextCursor.Get() +} + +// GetNextCursorOk returns a tuple with the NextCursor field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GrantListOut) GetNextCursorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.NextCursor.Get(), o.NextCursor.IsSet() +} + +// SetNextCursor sets field value +func (o *GrantListOut) SetNextCursor(v string) { + o.NextCursor.Set(&v) +} + +func (o GrantListOut) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GrantListOut) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + toSerialize["next_cursor"] = o.NextCursor.Get() + return toSerialize, nil +} + +func (o *GrantListOut) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "items", + "next_cursor", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varGrantListOut := _GrantListOut{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varGrantListOut) + + if err != nil { + return err + } + + *o = GrantListOut(varGrantListOut) + + return err +} + +type NullableGrantListOut struct { + value *GrantListOut + isSet bool +} + +func (v NullableGrantListOut) Get() *GrantListOut { + return v.value +} + +func (v *NullableGrantListOut) Set(val *GrantListOut) { + v.value = val + v.isSet = true +} + +func (v NullableGrantListOut) IsSet() bool { + return v.isSet +} + +func (v *NullableGrantListOut) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGrantListOut(val *GrantListOut) *NullableGrantListOut { + return &NullableGrantListOut{value: val, isSet: true} +} + +func (v NullableGrantListOut) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGrantListOut) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/sdk/go/model_grant_out.go b/sdk/go/model_grant_out.go index c11a21d..652b4ec 100644 --- a/sdk/go/model_grant_out.go +++ b/sdk/go/model_grant_out.go @@ -1,7 +1,7 @@ /* AgentDrive -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. API version: */ @@ -20,21 +20,20 @@ import ( // checks if the GrantOut type satisfies the MappedNullable interface at compile time var _ MappedNullable = &GrantOut{} -// GrantOut A live grant. Audit fields (`granted_by_*`, `on_behalf_of`) are surfaced so a manager can see who shared what. +// GrantOut struct for GrantOut type GrantOut struct { - ArtifactsAffected NullableInt32 `json:"artifacts_affected,omitempty"` CreatedAt time.Time `json:"created_at"` - ExpiresAt NullableTime `json:"expires_at,omitempty"` - GrantedById string `json:"granted_by_id"` - GrantedByType string `json:"granted_by_type"` - Id string `json:"id"` - OnBehalfOf NullableString `json:"on_behalf_of,omitempty"` - PrincipalEmail NullableString `json:"principal_email,omitempty"` - PrincipalId NullableString `json:"principal_id,omitempty"` + DriveId string `json:"drive_id" validate:"regexp=^drv_[a-f0-9]{16}$"` + ExpiresAt NullableTime `json:"expires_at"` + Id string `json:"id" validate:"regexp=^grn_[a-f0-9]{16}$"` + PrincipalId NullableString `json:"principal_id"` PrincipalType string `json:"principal_type"` ResourceId string `json:"resource_id"` ResourceType string `json:"resource_type"` + Revision string `json:"revision" validate:"regexp=^rev_[a-f0-9]{16}$"` + RevokedAt NullableTime `json:"revoked_at"` Role string `json:"role"` + State string `json:"state"` } type _GrantOut GrantOut @@ -43,16 +42,20 @@ type _GrantOut GrantOut // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewGrantOut(createdAt time.Time, grantedById string, grantedByType string, id string, principalType string, resourceId string, resourceType string, role string) *GrantOut { +func NewGrantOut(createdAt time.Time, driveId string, expiresAt NullableTime, id string, principalId NullableString, principalType string, resourceId string, resourceType string, revision string, revokedAt NullableTime, role string, state string) *GrantOut { this := GrantOut{} this.CreatedAt = createdAt - this.GrantedById = grantedById - this.GrantedByType = grantedByType + this.DriveId = driveId + this.ExpiresAt = expiresAt this.Id = id + this.PrincipalId = principalId this.PrincipalType = principalType this.ResourceId = resourceId this.ResourceType = resourceType + this.Revision = revision + this.RevokedAt = revokedAt this.Role = role + this.State = state return &this } @@ -64,48 +67,6 @@ func NewGrantOutWithDefaults() *GrantOut { return &this } -// GetArtifactsAffected returns the ArtifactsAffected field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GrantOut) GetArtifactsAffected() int32 { - if o == nil || IsNil(o.ArtifactsAffected.Get()) { - var ret int32 - return ret - } - return *o.ArtifactsAffected.Get() -} - -// GetArtifactsAffectedOk returns a tuple with the ArtifactsAffected field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GrantOut) GetArtifactsAffectedOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.ArtifactsAffected.Get(), o.ArtifactsAffected.IsSet() -} - -// HasArtifactsAffected returns a boolean if a field has been set. -func (o *GrantOut) HasArtifactsAffected() bool { - if o != nil && o.ArtifactsAffected.IsSet() { - return true - } - - return false -} - -// SetArtifactsAffected gets a reference to the given NullableInt32 and assigns it to the ArtifactsAffected field. -func (o *GrantOut) SetArtifactsAffected(v int32) { - o.ArtifactsAffected.Set(&v) -} -// SetArtifactsAffectedNil sets the value for ArtifactsAffected to be an explicit nil -func (o *GrantOut) SetArtifactsAffectedNil() { - o.ArtifactsAffected.Set(nil) -} - -// UnsetArtifactsAffected ensures that no value is present for ArtifactsAffected, not even an explicit nil -func (o *GrantOut) UnsetArtifactsAffected() { - o.ArtifactsAffected.Unset() -} - // GetCreatedAt returns the CreatedAt field value func (o *GrantOut) GetCreatedAt() time.Time { if o == nil { @@ -130,94 +91,54 @@ func (o *GrantOut) SetCreatedAt(v time.Time) { o.CreatedAt = v } -// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GrantOut) GetExpiresAt() time.Time { - if o == nil || IsNil(o.ExpiresAt.Get()) { - var ret time.Time - return ret - } - return *o.ExpiresAt.Get() -} - -// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GrantOut) GetExpiresAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.ExpiresAt.Get(), o.ExpiresAt.IsSet() -} - -// HasExpiresAt returns a boolean if a field has been set. -func (o *GrantOut) HasExpiresAt() bool { - if o != nil && o.ExpiresAt.IsSet() { - return true - } - - return false -} - -// SetExpiresAt gets a reference to the given NullableTime and assigns it to the ExpiresAt field. -func (o *GrantOut) SetExpiresAt(v time.Time) { - o.ExpiresAt.Set(&v) -} -// SetExpiresAtNil sets the value for ExpiresAt to be an explicit nil -func (o *GrantOut) SetExpiresAtNil() { - o.ExpiresAt.Set(nil) -} - -// UnsetExpiresAt ensures that no value is present for ExpiresAt, not even an explicit nil -func (o *GrantOut) UnsetExpiresAt() { - o.ExpiresAt.Unset() -} - -// GetGrantedById returns the GrantedById field value -func (o *GrantOut) GetGrantedById() string { +// GetDriveId returns the DriveId field value +func (o *GrantOut) GetDriveId() string { if o == nil { var ret string return ret } - return o.GrantedById + return o.DriveId } -// GetGrantedByIdOk returns a tuple with the GrantedById field value +// GetDriveIdOk returns a tuple with the DriveId field value // and a boolean to check if the value has been set. -func (o *GrantOut) GetGrantedByIdOk() (*string, bool) { +func (o *GrantOut) GetDriveIdOk() (*string, bool) { if o == nil { return nil, false } - return &o.GrantedById, true + return &o.DriveId, true } -// SetGrantedById sets field value -func (o *GrantOut) SetGrantedById(v string) { - o.GrantedById = v +// SetDriveId sets field value +func (o *GrantOut) SetDriveId(v string) { + o.DriveId = v } -// GetGrantedByType returns the GrantedByType field value -func (o *GrantOut) GetGrantedByType() string { - if o == nil { - var ret string +// GetExpiresAt returns the ExpiresAt field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *GrantOut) GetExpiresAt() time.Time { + if o == nil || o.ExpiresAt.Get() == nil { + var ret time.Time return ret } - return o.GrantedByType + return *o.ExpiresAt.Get() } -// GetGrantedByTypeOk returns a tuple with the GrantedByType field value +// GetExpiresAtOk returns a tuple with the ExpiresAt field value // and a boolean to check if the value has been set. -func (o *GrantOut) GetGrantedByTypeOk() (*string, bool) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GrantOut) GetExpiresAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.GrantedByType, true + return o.ExpiresAt.Get(), o.ExpiresAt.IsSet() } -// SetGrantedByType sets field value -func (o *GrantOut) SetGrantedByType(v string) { - o.GrantedByType = v +// SetExpiresAt sets field value +func (o *GrantOut) SetExpiresAt(v time.Time) { + o.ExpiresAt.Set(&v) } // GetId returns the Id field value @@ -244,100 +165,18 @@ func (o *GrantOut) SetId(v string) { o.Id = v } -// GetOnBehalfOf returns the OnBehalfOf field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GrantOut) GetOnBehalfOf() string { - if o == nil || IsNil(o.OnBehalfOf.Get()) { - var ret string - return ret - } - return *o.OnBehalfOf.Get() -} - -// GetOnBehalfOfOk returns a tuple with the OnBehalfOf field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GrantOut) GetOnBehalfOfOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.OnBehalfOf.Get(), o.OnBehalfOf.IsSet() -} - -// HasOnBehalfOf returns a boolean if a field has been set. -func (o *GrantOut) HasOnBehalfOf() bool { - if o != nil && o.OnBehalfOf.IsSet() { - return true - } - - return false -} - -// SetOnBehalfOf gets a reference to the given NullableString and assigns it to the OnBehalfOf field. -func (o *GrantOut) SetOnBehalfOf(v string) { - o.OnBehalfOf.Set(&v) -} -// SetOnBehalfOfNil sets the value for OnBehalfOf to be an explicit nil -func (o *GrantOut) SetOnBehalfOfNil() { - o.OnBehalfOf.Set(nil) -} - -// UnsetOnBehalfOf ensures that no value is present for OnBehalfOf, not even an explicit nil -func (o *GrantOut) UnsetOnBehalfOf() { - o.OnBehalfOf.Unset() -} - -// GetPrincipalEmail returns the PrincipalEmail field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GrantOut) GetPrincipalEmail() string { - if o == nil || IsNil(o.PrincipalEmail.Get()) { - var ret string - return ret - } - return *o.PrincipalEmail.Get() -} - -// GetPrincipalEmailOk returns a tuple with the PrincipalEmail field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GrantOut) GetPrincipalEmailOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.PrincipalEmail.Get(), o.PrincipalEmail.IsSet() -} - -// HasPrincipalEmail returns a boolean if a field has been set. -func (o *GrantOut) HasPrincipalEmail() bool { - if o != nil && o.PrincipalEmail.IsSet() { - return true - } - - return false -} - -// SetPrincipalEmail gets a reference to the given NullableString and assigns it to the PrincipalEmail field. -func (o *GrantOut) SetPrincipalEmail(v string) { - o.PrincipalEmail.Set(&v) -} -// SetPrincipalEmailNil sets the value for PrincipalEmail to be an explicit nil -func (o *GrantOut) SetPrincipalEmailNil() { - o.PrincipalEmail.Set(nil) -} - -// UnsetPrincipalEmail ensures that no value is present for PrincipalEmail, not even an explicit nil -func (o *GrantOut) UnsetPrincipalEmail() { - o.PrincipalEmail.Unset() -} - -// GetPrincipalId returns the PrincipalId field value if set, zero value otherwise (both if not set or set to explicit null). +// GetPrincipalId returns the PrincipalId field value +// If the value is explicit nil, the zero value for string will be returned func (o *GrantOut) GetPrincipalId() string { - if o == nil || IsNil(o.PrincipalId.Get()) { + if o == nil || o.PrincipalId.Get() == nil { var ret string return ret } + return *o.PrincipalId.Get() } -// GetPrincipalIdOk returns a tuple with the PrincipalId field value if set, nil otherwise +// GetPrincipalIdOk returns a tuple with the PrincipalId field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *GrantOut) GetPrincipalIdOk() (*string, bool) { @@ -347,28 +186,10 @@ func (o *GrantOut) GetPrincipalIdOk() (*string, bool) { return o.PrincipalId.Get(), o.PrincipalId.IsSet() } -// HasPrincipalId returns a boolean if a field has been set. -func (o *GrantOut) HasPrincipalId() bool { - if o != nil && o.PrincipalId.IsSet() { - return true - } - - return false -} - -// SetPrincipalId gets a reference to the given NullableString and assigns it to the PrincipalId field. +// SetPrincipalId sets field value func (o *GrantOut) SetPrincipalId(v string) { o.PrincipalId.Set(&v) } -// SetPrincipalIdNil sets the value for PrincipalId to be an explicit nil -func (o *GrantOut) SetPrincipalIdNil() { - o.PrincipalId.Set(nil) -} - -// UnsetPrincipalId ensures that no value is present for PrincipalId, not even an explicit nil -func (o *GrantOut) UnsetPrincipalId() { - o.PrincipalId.Unset() -} // GetPrincipalType returns the PrincipalType field value func (o *GrantOut) GetPrincipalType() string { @@ -442,6 +263,56 @@ func (o *GrantOut) SetResourceType(v string) { o.ResourceType = v } +// GetRevision returns the Revision field value +func (o *GrantOut) GetRevision() string { + if o == nil { + var ret string + return ret + } + + return o.Revision +} + +// GetRevisionOk returns a tuple with the Revision field value +// and a boolean to check if the value has been set. +func (o *GrantOut) GetRevisionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Revision, true +} + +// SetRevision sets field value +func (o *GrantOut) SetRevision(v string) { + o.Revision = v +} + +// GetRevokedAt returns the RevokedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *GrantOut) GetRevokedAt() time.Time { + if o == nil || o.RevokedAt.Get() == nil { + var ret time.Time + return ret + } + + return *o.RevokedAt.Get() +} + +// GetRevokedAtOk returns a tuple with the RevokedAt field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GrantOut) GetRevokedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.RevokedAt.Get(), o.RevokedAt.IsSet() +} + +// SetRevokedAt sets field value +func (o *GrantOut) SetRevokedAt(v time.Time) { + o.RevokedAt.Set(&v) +} + // GetRole returns the Role field value func (o *GrantOut) GetRole() string { if o == nil { @@ -466,6 +337,30 @@ func (o *GrantOut) SetRole(v string) { o.Role = v } +// GetState returns the State field value +func (o *GrantOut) GetState() string { + if o == nil { + var ret string + return ret + } + + return o.State +} + +// GetStateOk returns a tuple with the State field value +// and a boolean to check if the value has been set. +func (o *GrantOut) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.State, true +} + +// SetState sets field value +func (o *GrantOut) SetState(v string) { + o.State = v +} + func (o GrantOut) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { @@ -476,29 +371,18 @@ func (o GrantOut) MarshalJSON() ([]byte, error) { func (o GrantOut) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.ArtifactsAffected.IsSet() { - toSerialize["artifacts_affected"] = o.ArtifactsAffected.Get() - } toSerialize["created_at"] = o.CreatedAt - if o.ExpiresAt.IsSet() { - toSerialize["expires_at"] = o.ExpiresAt.Get() - } - toSerialize["granted_by_id"] = o.GrantedById - toSerialize["granted_by_type"] = o.GrantedByType + toSerialize["drive_id"] = o.DriveId + toSerialize["expires_at"] = o.ExpiresAt.Get() toSerialize["id"] = o.Id - if o.OnBehalfOf.IsSet() { - toSerialize["on_behalf_of"] = o.OnBehalfOf.Get() - } - if o.PrincipalEmail.IsSet() { - toSerialize["principal_email"] = o.PrincipalEmail.Get() - } - if o.PrincipalId.IsSet() { - toSerialize["principal_id"] = o.PrincipalId.Get() - } + toSerialize["principal_id"] = o.PrincipalId.Get() toSerialize["principal_type"] = o.PrincipalType toSerialize["resource_id"] = o.ResourceId toSerialize["resource_type"] = o.ResourceType + toSerialize["revision"] = o.Revision + toSerialize["revoked_at"] = o.RevokedAt.Get() toSerialize["role"] = o.Role + toSerialize["state"] = o.State return toSerialize, nil } @@ -508,13 +392,17 @@ func (o *GrantOut) UnmarshalJSON(data []byte) (err error) { // that every required field exists as a key in the generic map. requiredProperties := []string{ "created_at", - "granted_by_id", - "granted_by_type", + "drive_id", + "expires_at", "id", + "principal_id", "principal_type", "resource_id", "resource_type", + "revision", + "revoked_at", "role", + "state", } allProperties := make(map[string]interface{}) diff --git a/sdk/go/model_grant_patch_in.go b/sdk/go/model_grant_patch_in.go deleted file mode 100644 index 3a8e798..0000000 --- a/sdk/go/model_grant_patch_in.go +++ /dev/null @@ -1,180 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" -) - -// checks if the GrantPatchIn type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GrantPatchIn{} - -// GrantPatchIn PATCH /v0/grants/{grn_id} body. Field absence = unchanged; explicit `expires_in: null` clears the expiry (makes the grant permanent). -type GrantPatchIn struct { - ExpiresIn NullableInt32 `json:"expires_in,omitempty"` - Role NullableString `json:"role,omitempty"` -} - -// NewGrantPatchIn instantiates a new GrantPatchIn object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGrantPatchIn() *GrantPatchIn { - this := GrantPatchIn{} - return &this -} - -// NewGrantPatchInWithDefaults instantiates a new GrantPatchIn object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGrantPatchInWithDefaults() *GrantPatchIn { - this := GrantPatchIn{} - return &this -} - -// GetExpiresIn returns the ExpiresIn field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GrantPatchIn) GetExpiresIn() int32 { - if o == nil || IsNil(o.ExpiresIn.Get()) { - var ret int32 - return ret - } - return *o.ExpiresIn.Get() -} - -// GetExpiresInOk returns a tuple with the ExpiresIn field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GrantPatchIn) GetExpiresInOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.ExpiresIn.Get(), o.ExpiresIn.IsSet() -} - -// HasExpiresIn returns a boolean if a field has been set. -func (o *GrantPatchIn) HasExpiresIn() bool { - if o != nil && o.ExpiresIn.IsSet() { - return true - } - - return false -} - -// SetExpiresIn gets a reference to the given NullableInt32 and assigns it to the ExpiresIn field. -func (o *GrantPatchIn) SetExpiresIn(v int32) { - o.ExpiresIn.Set(&v) -} -// SetExpiresInNil sets the value for ExpiresIn to be an explicit nil -func (o *GrantPatchIn) SetExpiresInNil() { - o.ExpiresIn.Set(nil) -} - -// UnsetExpiresIn ensures that no value is present for ExpiresIn, not even an explicit nil -func (o *GrantPatchIn) UnsetExpiresIn() { - o.ExpiresIn.Unset() -} - -// GetRole returns the Role field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GrantPatchIn) GetRole() string { - if o == nil || IsNil(o.Role.Get()) { - var ret string - return ret - } - return *o.Role.Get() -} - -// GetRoleOk returns a tuple with the Role field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GrantPatchIn) GetRoleOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Role.Get(), o.Role.IsSet() -} - -// HasRole returns a boolean if a field has been set. -func (o *GrantPatchIn) HasRole() bool { - if o != nil && o.Role.IsSet() { - return true - } - - return false -} - -// SetRole gets a reference to the given NullableString and assigns it to the Role field. -func (o *GrantPatchIn) SetRole(v string) { - o.Role.Set(&v) -} -// SetRoleNil sets the value for Role to be an explicit nil -func (o *GrantPatchIn) SetRoleNil() { - o.Role.Set(nil) -} - -// UnsetRole ensures that no value is present for Role, not even an explicit nil -func (o *GrantPatchIn) UnsetRole() { - o.Role.Unset() -} - -func (o GrantPatchIn) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GrantPatchIn) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.ExpiresIn.IsSet() { - toSerialize["expires_in"] = o.ExpiresIn.Get() - } - if o.Role.IsSet() { - toSerialize["role"] = o.Role.Get() - } - return toSerialize, nil -} - -type NullableGrantPatchIn struct { - value *GrantPatchIn - isSet bool -} - -func (v NullableGrantPatchIn) Get() *GrantPatchIn { - return v.value -} - -func (v *NullableGrantPatchIn) Set(val *GrantPatchIn) { - v.value = val - v.isSet = true -} - -func (v NullableGrantPatchIn) IsSet() bool { - return v.isSet -} - -func (v *NullableGrantPatchIn) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGrantPatchIn(val *GrantPatchIn) *NullableGrantPatchIn { - return &NullableGrantPatchIn{value: val, isSet: true} -} - -func (v NullableGrantPatchIn) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGrantPatchIn) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_grant_principal_in.go b/sdk/go/model_grant_principal_in.go deleted file mode 100644 index 6ad878b..0000000 --- a/sdk/go/model_grant_principal_in.go +++ /dev/null @@ -1,248 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the GrantPrincipalIn type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &GrantPrincipalIn{} - -// GrantPrincipalIn Who a grant is for. `anyone` carries no id/email; `org`/`agent` require `id`; `user` requires exactly one of `id` / `email` (an email with no account becomes a pending-email invite resolved on sign-in). -type GrantPrincipalIn struct { - Email NullableString `json:"email,omitempty"` - Id NullableString `json:"id,omitempty"` - Type string `json:"type"` -} - -type _GrantPrincipalIn GrantPrincipalIn - -// NewGrantPrincipalIn instantiates a new GrantPrincipalIn object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewGrantPrincipalIn(type_ string) *GrantPrincipalIn { - this := GrantPrincipalIn{} - this.Type = type_ - return &this -} - -// NewGrantPrincipalInWithDefaults instantiates a new GrantPrincipalIn object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewGrantPrincipalInWithDefaults() *GrantPrincipalIn { - this := GrantPrincipalIn{} - return &this -} - -// GetEmail returns the Email field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GrantPrincipalIn) GetEmail() string { - if o == nil || IsNil(o.Email.Get()) { - var ret string - return ret - } - return *o.Email.Get() -} - -// GetEmailOk returns a tuple with the Email field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GrantPrincipalIn) GetEmailOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Email.Get(), o.Email.IsSet() -} - -// HasEmail returns a boolean if a field has been set. -func (o *GrantPrincipalIn) HasEmail() bool { - if o != nil && o.Email.IsSet() { - return true - } - - return false -} - -// SetEmail gets a reference to the given NullableString and assigns it to the Email field. -func (o *GrantPrincipalIn) SetEmail(v string) { - o.Email.Set(&v) -} -// SetEmailNil sets the value for Email to be an explicit nil -func (o *GrantPrincipalIn) SetEmailNil() { - o.Email.Set(nil) -} - -// UnsetEmail ensures that no value is present for Email, not even an explicit nil -func (o *GrantPrincipalIn) UnsetEmail() { - o.Email.Unset() -} - -// GetId returns the Id field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *GrantPrincipalIn) GetId() string { - if o == nil || IsNil(o.Id.Get()) { - var ret string - return ret - } - return *o.Id.Get() -} - -// GetIdOk returns a tuple with the Id field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *GrantPrincipalIn) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Id.Get(), o.Id.IsSet() -} - -// HasId returns a boolean if a field has been set. -func (o *GrantPrincipalIn) HasId() bool { - if o != nil && o.Id.IsSet() { - return true - } - - return false -} - -// SetId gets a reference to the given NullableString and assigns it to the Id field. -func (o *GrantPrincipalIn) SetId(v string) { - o.Id.Set(&v) -} -// SetIdNil sets the value for Id to be an explicit nil -func (o *GrantPrincipalIn) SetIdNil() { - o.Id.Set(nil) -} - -// UnsetId ensures that no value is present for Id, not even an explicit nil -func (o *GrantPrincipalIn) UnsetId() { - o.Id.Unset() -} - -// GetType returns the Type field value -func (o *GrantPrincipalIn) GetType() string { - if o == nil { - var ret string - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *GrantPrincipalIn) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *GrantPrincipalIn) SetType(v string) { - o.Type = v -} - -func (o GrantPrincipalIn) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o GrantPrincipalIn) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Email.IsSet() { - toSerialize["email"] = o.Email.Get() - } - if o.Id.IsSet() { - toSerialize["id"] = o.Id.Get() - } - toSerialize["type"] = o.Type - return toSerialize, nil -} - -func (o *GrantPrincipalIn) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "type", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varGrantPrincipalIn := _GrantPrincipalIn{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varGrantPrincipalIn) - - if err != nil { - return err - } - - *o = GrantPrincipalIn(varGrantPrincipalIn) - - return err -} - -type NullableGrantPrincipalIn struct { - value *GrantPrincipalIn - isSet bool -} - -func (v NullableGrantPrincipalIn) Get() *GrantPrincipalIn { - return v.value -} - -func (v *NullableGrantPrincipalIn) Set(val *GrantPrincipalIn) { - v.value = val - v.isSet = true -} - -func (v NullableGrantPrincipalIn) IsSet() bool { - return v.isSet -} - -func (v *NullableGrantPrincipalIn) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableGrantPrincipalIn(val *GrantPrincipalIn) *NullableGrantPrincipalIn { - return &NullableGrantPrincipalIn{value: val, isSet: true} -} - -func (v NullableGrantPrincipalIn) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableGrantPrincipalIn) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_grant_update_in.go b/sdk/go/model_grant_update_in.go new file mode 100644 index 0000000..74ea5cf --- /dev/null +++ b/sdk/go/model_grant_update_in.go @@ -0,0 +1,181 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "encoding/json" + "time" +) + +// checks if the GrantUpdateIn type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &GrantUpdateIn{} + +// GrantUpdateIn PATCH /v0/drives/{id}/grants/{grant_id} body — at least one field is required. An explicit ``expires_at: null`` clears the expiry; omitting it leaves it unchanged. +type GrantUpdateIn struct { + ExpiresAt NullableTime `json:"expires_at,omitempty"` + Role NullableString `json:"role,omitempty"` +} + +// NewGrantUpdateIn instantiates a new GrantUpdateIn object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewGrantUpdateIn() *GrantUpdateIn { + this := GrantUpdateIn{} + return &this +} + +// NewGrantUpdateInWithDefaults instantiates a new GrantUpdateIn object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewGrantUpdateInWithDefaults() *GrantUpdateIn { + this := GrantUpdateIn{} + return &this +} + +// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GrantUpdateIn) GetExpiresAt() time.Time { + if o == nil || IsNil(o.ExpiresAt.Get()) { + var ret time.Time + return ret + } + return *o.ExpiresAt.Get() +} + +// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GrantUpdateIn) GetExpiresAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.ExpiresAt.Get(), o.ExpiresAt.IsSet() +} + +// HasExpiresAt returns a boolean if a field has been set. +func (o *GrantUpdateIn) HasExpiresAt() bool { + if o != nil && o.ExpiresAt.IsSet() { + return true + } + + return false +} + +// SetExpiresAt gets a reference to the given NullableTime and assigns it to the ExpiresAt field. +func (o *GrantUpdateIn) SetExpiresAt(v time.Time) { + o.ExpiresAt.Set(&v) +} +// SetExpiresAtNil sets the value for ExpiresAt to be an explicit nil +func (o *GrantUpdateIn) SetExpiresAtNil() { + o.ExpiresAt.Set(nil) +} + +// UnsetExpiresAt ensures that no value is present for ExpiresAt, not even an explicit nil +func (o *GrantUpdateIn) UnsetExpiresAt() { + o.ExpiresAt.Unset() +} + +// GetRole returns the Role field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *GrantUpdateIn) GetRole() string { + if o == nil || IsNil(o.Role.Get()) { + var ret string + return ret + } + return *o.Role.Get() +} + +// GetRoleOk returns a tuple with the Role field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *GrantUpdateIn) GetRoleOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Role.Get(), o.Role.IsSet() +} + +// HasRole returns a boolean if a field has been set. +func (o *GrantUpdateIn) HasRole() bool { + if o != nil && o.Role.IsSet() { + return true + } + + return false +} + +// SetRole gets a reference to the given NullableString and assigns it to the Role field. +func (o *GrantUpdateIn) SetRole(v string) { + o.Role.Set(&v) +} +// SetRoleNil sets the value for Role to be an explicit nil +func (o *GrantUpdateIn) SetRoleNil() { + o.Role.Set(nil) +} + +// UnsetRole ensures that no value is present for Role, not even an explicit nil +func (o *GrantUpdateIn) UnsetRole() { + o.Role.Unset() +} + +func (o GrantUpdateIn) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o GrantUpdateIn) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.ExpiresAt.IsSet() { + toSerialize["expires_at"] = o.ExpiresAt.Get() + } + if o.Role.IsSet() { + toSerialize["role"] = o.Role.Get() + } + return toSerialize, nil +} + +type NullableGrantUpdateIn struct { + value *GrantUpdateIn + isSet bool +} + +func (v NullableGrantUpdateIn) Get() *GrantUpdateIn { + return v.value +} + +func (v *NullableGrantUpdateIn) Set(val *GrantUpdateIn) { + v.value = val + v.isSet = true +} + +func (v NullableGrantUpdateIn) IsSet() bool { + return v.isSet +} + +func (v *NullableGrantUpdateIn) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableGrantUpdateIn(val *GrantUpdateIn) *NullableGrantUpdateIn { + return &NullableGrantUpdateIn{value: val, isSet: true} +} + +func (v NullableGrantUpdateIn) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableGrantUpdateIn) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/sdk/go/model_health_degraded_detail.go b/sdk/go/model_health_degraded_detail.go index 130e68b..5d4f25d 100644 --- a/sdk/go/model_health_degraded_detail.go +++ b/sdk/go/model_health_degraded_detail.go @@ -1,7 +1,7 @@ /* AgentDrive -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. API version: */ diff --git a/sdk/go/model_health_degraded_response.go b/sdk/go/model_health_degraded_response.go index 47d89c2..37d1150 100644 --- a/sdk/go/model_health_degraded_response.go +++ b/sdk/go/model_health_degraded_response.go @@ -1,7 +1,7 @@ /* AgentDrive -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. API version: */ diff --git a/sdk/go/model_health_out.go b/sdk/go/model_health_out.go index f2ed7e9..af9ae92 100644 --- a/sdk/go/model_health_out.go +++ b/sdk/go/model_health_out.go @@ -1,7 +1,7 @@ /* AgentDrive -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. API version: */ diff --git a/sdk/go/model_hourly_usage_counter_out.go b/sdk/go/model_hourly_usage_counter_out.go deleted file mode 100644 index 9bf3a42..0000000 --- a/sdk/go/model_hourly_usage_counter_out.go +++ /dev/null @@ -1,213 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "time" - "bytes" - "fmt" -) - -// checks if the HourlyUsageCounterOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &HourlyUsageCounterOut{} - -// HourlyUsageCounterOut struct for HourlyUsageCounterOut -type HourlyUsageCounterOut struct { - Limit int32 `json:"limit"` - ResetAt time.Time `json:"reset_at"` - Used int32 `json:"used"` -} - -type _HourlyUsageCounterOut HourlyUsageCounterOut - -// NewHourlyUsageCounterOut instantiates a new HourlyUsageCounterOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewHourlyUsageCounterOut(limit int32, resetAt time.Time, used int32) *HourlyUsageCounterOut { - this := HourlyUsageCounterOut{} - this.Limit = limit - this.ResetAt = resetAt - this.Used = used - return &this -} - -// NewHourlyUsageCounterOutWithDefaults instantiates a new HourlyUsageCounterOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewHourlyUsageCounterOutWithDefaults() *HourlyUsageCounterOut { - this := HourlyUsageCounterOut{} - return &this -} - -// GetLimit returns the Limit field value -func (o *HourlyUsageCounterOut) GetLimit() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Limit -} - -// GetLimitOk returns a tuple with the Limit field value -// and a boolean to check if the value has been set. -func (o *HourlyUsageCounterOut) GetLimitOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Limit, true -} - -// SetLimit sets field value -func (o *HourlyUsageCounterOut) SetLimit(v int32) { - o.Limit = v -} - -// GetResetAt returns the ResetAt field value -func (o *HourlyUsageCounterOut) GetResetAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.ResetAt -} - -// GetResetAtOk returns a tuple with the ResetAt field value -// and a boolean to check if the value has been set. -func (o *HourlyUsageCounterOut) GetResetAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.ResetAt, true -} - -// SetResetAt sets field value -func (o *HourlyUsageCounterOut) SetResetAt(v time.Time) { - o.ResetAt = v -} - -// GetUsed returns the Used field value -func (o *HourlyUsageCounterOut) GetUsed() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Used -} - -// GetUsedOk returns a tuple with the Used field value -// and a boolean to check if the value has been set. -func (o *HourlyUsageCounterOut) GetUsedOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Used, true -} - -// SetUsed sets field value -func (o *HourlyUsageCounterOut) SetUsed(v int32) { - o.Used = v -} - -func (o HourlyUsageCounterOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o HourlyUsageCounterOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["limit"] = o.Limit - toSerialize["reset_at"] = o.ResetAt - toSerialize["used"] = o.Used - return toSerialize, nil -} - -func (o *HourlyUsageCounterOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "limit", - "reset_at", - "used", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varHourlyUsageCounterOut := _HourlyUsageCounterOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varHourlyUsageCounterOut) - - if err != nil { - return err - } - - *o = HourlyUsageCounterOut(varHourlyUsageCounterOut) - - return err -} - -type NullableHourlyUsageCounterOut struct { - value *HourlyUsageCounterOut - isSet bool -} - -func (v NullableHourlyUsageCounterOut) Get() *HourlyUsageCounterOut { - return v.value -} - -func (v *NullableHourlyUsageCounterOut) Set(val *HourlyUsageCounterOut) { - v.value = val - v.isSet = true -} - -func (v NullableHourlyUsageCounterOut) IsSet() bool { - return v.isSet -} - -func (v *NullableHourlyUsageCounterOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableHourlyUsageCounterOut(val *HourlyUsageCounterOut) *NullableHourlyUsageCounterOut { - return &NullableHourlyUsageCounterOut{value: val, isSet: true} -} - -func (v NullableHourlyUsageCounterOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableHourlyUsageCounterOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_identity_assertion_metadata_out.go b/sdk/go/model_identity_assertion_metadata_out.go deleted file mode 100644 index a24305f..0000000 --- a/sdk/go/model_identity_assertion_metadata_out.go +++ /dev/null @@ -1,224 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "fmt" -) - -// checks if the IdentityAssertionMetadataOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &IdentityAssertionMetadataOut{} - -// IdentityAssertionMetadataOut struct for IdentityAssertionMetadataOut -type IdentityAssertionMetadataOut struct { - Alg string `json:"alg"` - Iss string `json:"iss"` - Version int32 `json:"version"` - AdditionalProperties map[string]interface{} -} - -type _IdentityAssertionMetadataOut IdentityAssertionMetadataOut - -// NewIdentityAssertionMetadataOut instantiates a new IdentityAssertionMetadataOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewIdentityAssertionMetadataOut(alg string, iss string, version int32) *IdentityAssertionMetadataOut { - this := IdentityAssertionMetadataOut{} - this.Alg = alg - this.Iss = iss - this.Version = version - return &this -} - -// NewIdentityAssertionMetadataOutWithDefaults instantiates a new IdentityAssertionMetadataOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewIdentityAssertionMetadataOutWithDefaults() *IdentityAssertionMetadataOut { - this := IdentityAssertionMetadataOut{} - return &this -} - -// GetAlg returns the Alg field value -func (o *IdentityAssertionMetadataOut) GetAlg() string { - if o == nil { - var ret string - return ret - } - - return o.Alg -} - -// GetAlgOk returns a tuple with the Alg field value -// and a boolean to check if the value has been set. -func (o *IdentityAssertionMetadataOut) GetAlgOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Alg, true -} - -// SetAlg sets field value -func (o *IdentityAssertionMetadataOut) SetAlg(v string) { - o.Alg = v -} - -// GetIss returns the Iss field value -func (o *IdentityAssertionMetadataOut) GetIss() string { - if o == nil { - var ret string - return ret - } - - return o.Iss -} - -// GetIssOk returns a tuple with the Iss field value -// and a boolean to check if the value has been set. -func (o *IdentityAssertionMetadataOut) GetIssOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Iss, true -} - -// SetIss sets field value -func (o *IdentityAssertionMetadataOut) SetIss(v string) { - o.Iss = v -} - -// GetVersion returns the Version field value -func (o *IdentityAssertionMetadataOut) GetVersion() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Version -} - -// GetVersionOk returns a tuple with the Version field value -// and a boolean to check if the value has been set. -func (o *IdentityAssertionMetadataOut) GetVersionOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Version, true -} - -// SetVersion sets field value -func (o *IdentityAssertionMetadataOut) SetVersion(v int32) { - o.Version = v -} - -func (o IdentityAssertionMetadataOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o IdentityAssertionMetadataOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["alg"] = o.Alg - toSerialize["iss"] = o.Iss - toSerialize["version"] = o.Version - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *IdentityAssertionMetadataOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "alg", - "iss", - "version", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varIdentityAssertionMetadataOut := _IdentityAssertionMetadataOut{} - - err = json.Unmarshal(data, &varIdentityAssertionMetadataOut) - - if err != nil { - return err - } - - *o = IdentityAssertionMetadataOut(varIdentityAssertionMetadataOut) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "alg") - delete(additionalProperties, "iss") - delete(additionalProperties, "version") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableIdentityAssertionMetadataOut struct { - value *IdentityAssertionMetadataOut - isSet bool -} - -func (v NullableIdentityAssertionMetadataOut) Get() *IdentityAssertionMetadataOut { - return v.value -} - -func (v *NullableIdentityAssertionMetadataOut) Set(val *IdentityAssertionMetadataOut) { - v.value = val - v.isSet = true -} - -func (v NullableIdentityAssertionMetadataOut) IsSet() bool { - return v.isSet -} - -func (v *NullableIdentityAssertionMetadataOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableIdentityAssertionMetadataOut(val *IdentityAssertionMetadataOut) *NullableIdentityAssertionMetadataOut { - return &NullableIdentityAssertionMetadataOut{value: val, isSet: true} -} - -func (v NullableIdentityAssertionMetadataOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableIdentityAssertionMetadataOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_invitation_list.go b/sdk/go/model_invitation_list.go deleted file mode 100644 index bde4067..0000000 --- a/sdk/go/model_invitation_list.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the InvitationList type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InvitationList{} - -// InvitationList struct for InvitationList -type InvitationList struct { - Items []InvitationOut `json:"items"` - NextCursor NullableString `json:"next_cursor,omitempty"` -} - -type _InvitationList InvitationList - -// NewInvitationList instantiates a new InvitationList object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInvitationList(items []InvitationOut) *InvitationList { - this := InvitationList{} - this.Items = items - return &this -} - -// NewInvitationListWithDefaults instantiates a new InvitationList object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInvitationListWithDefaults() *InvitationList { - this := InvitationList{} - return &this -} - -// GetItems returns the Items field value -func (o *InvitationList) GetItems() []InvitationOut { - if o == nil { - var ret []InvitationOut - return ret - } - - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value -// and a boolean to check if the value has been set. -func (o *InvitationList) GetItemsOk() ([]InvitationOut, bool) { - if o == nil { - return nil, false - } - return o.Items, true -} - -// SetItems sets field value -func (o *InvitationList) SetItems(v []InvitationOut) { - o.Items = v -} - -// GetNextCursor returns the NextCursor field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *InvitationList) GetNextCursor() string { - if o == nil || IsNil(o.NextCursor.Get()) { - var ret string - return ret - } - return *o.NextCursor.Get() -} - -// GetNextCursorOk returns a tuple with the NextCursor field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *InvitationList) GetNextCursorOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.NextCursor.Get(), o.NextCursor.IsSet() -} - -// HasNextCursor returns a boolean if a field has been set. -func (o *InvitationList) HasNextCursor() bool { - if o != nil && o.NextCursor.IsSet() { - return true - } - - return false -} - -// SetNextCursor gets a reference to the given NullableString and assigns it to the NextCursor field. -func (o *InvitationList) SetNextCursor(v string) { - o.NextCursor.Set(&v) -} -// SetNextCursorNil sets the value for NextCursor to be an explicit nil -func (o *InvitationList) SetNextCursorNil() { - o.NextCursor.Set(nil) -} - -// UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil -func (o *InvitationList) UnsetNextCursor() { - o.NextCursor.Unset() -} - -func (o InvitationList) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o InvitationList) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["items"] = o.Items - if o.NextCursor.IsSet() { - toSerialize["next_cursor"] = o.NextCursor.Get() - } - return toSerialize, nil -} - -func (o *InvitationList) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "items", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varInvitationList := _InvitationList{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varInvitationList) - - if err != nil { - return err - } - - *o = InvitationList(varInvitationList) - - return err -} - -type NullableInvitationList struct { - value *InvitationList - isSet bool -} - -func (v NullableInvitationList) Get() *InvitationList { - return v.value -} - -func (v *NullableInvitationList) Set(val *InvitationList) { - v.value = val - v.isSet = true -} - -func (v NullableInvitationList) IsSet() bool { - return v.isSet -} - -func (v *NullableInvitationList) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInvitationList(val *InvitationList) *NullableInvitationList { - return &NullableInvitationList{value: val, isSet: true} -} - -func (v NullableInvitationList) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInvitationList) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_invitation_out.go b/sdk/go/model_invitation_out.go deleted file mode 100644 index 180c31f..0000000 --- a/sdk/go/model_invitation_out.go +++ /dev/null @@ -1,371 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "time" - "bytes" - "fmt" -) - -// checks if the InvitationOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InvitationOut{} - -// InvitationOut One workspace invitation — metadata only; the raw token is never surfaced over the API (it lives only in the invite email). -type InvitationOut struct { - CreatedAt time.Time `json:"created_at"` - Email string `json:"email"` - ExpiresAt time.Time `json:"expires_at"` - Id string `json:"id"` - InvitedBy NullableString `json:"invited_by,omitempty"` - OrganizationId string `json:"organization_id"` - Role string `json:"role"` - Status string `json:"status"` -} - -type _InvitationOut InvitationOut - -// NewInvitationOut instantiates a new InvitationOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInvitationOut(createdAt time.Time, email string, expiresAt time.Time, id string, organizationId string, role string, status string) *InvitationOut { - this := InvitationOut{} - this.CreatedAt = createdAt - this.Email = email - this.ExpiresAt = expiresAt - this.Id = id - this.OrganizationId = organizationId - this.Role = role - this.Status = status - return &this -} - -// NewInvitationOutWithDefaults instantiates a new InvitationOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInvitationOutWithDefaults() *InvitationOut { - this := InvitationOut{} - return &this -} - -// GetCreatedAt returns the CreatedAt field value -func (o *InvitationOut) GetCreatedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value -// and a boolean to check if the value has been set. -func (o *InvitationOut) GetCreatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.CreatedAt, true -} - -// SetCreatedAt sets field value -func (o *InvitationOut) SetCreatedAt(v time.Time) { - o.CreatedAt = v -} - -// GetEmail returns the Email field value -func (o *InvitationOut) GetEmail() string { - if o == nil { - var ret string - return ret - } - - return o.Email -} - -// GetEmailOk returns a tuple with the Email field value -// and a boolean to check if the value has been set. -func (o *InvitationOut) GetEmailOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Email, true -} - -// SetEmail sets field value -func (o *InvitationOut) SetEmail(v string) { - o.Email = v -} - -// GetExpiresAt returns the ExpiresAt field value -func (o *InvitationOut) GetExpiresAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.ExpiresAt -} - -// GetExpiresAtOk returns a tuple with the ExpiresAt field value -// and a boolean to check if the value has been set. -func (o *InvitationOut) GetExpiresAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.ExpiresAt, true -} - -// SetExpiresAt sets field value -func (o *InvitationOut) SetExpiresAt(v time.Time) { - o.ExpiresAt = v -} - -// GetId returns the Id field value -func (o *InvitationOut) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *InvitationOut) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *InvitationOut) SetId(v string) { - o.Id = v -} - -// GetInvitedBy returns the InvitedBy field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *InvitationOut) GetInvitedBy() string { - if o == nil || IsNil(o.InvitedBy.Get()) { - var ret string - return ret - } - return *o.InvitedBy.Get() -} - -// GetInvitedByOk returns a tuple with the InvitedBy field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *InvitationOut) GetInvitedByOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.InvitedBy.Get(), o.InvitedBy.IsSet() -} - -// HasInvitedBy returns a boolean if a field has been set. -func (o *InvitationOut) HasInvitedBy() bool { - if o != nil && o.InvitedBy.IsSet() { - return true - } - - return false -} - -// SetInvitedBy gets a reference to the given NullableString and assigns it to the InvitedBy field. -func (o *InvitationOut) SetInvitedBy(v string) { - o.InvitedBy.Set(&v) -} -// SetInvitedByNil sets the value for InvitedBy to be an explicit nil -func (o *InvitationOut) SetInvitedByNil() { - o.InvitedBy.Set(nil) -} - -// UnsetInvitedBy ensures that no value is present for InvitedBy, not even an explicit nil -func (o *InvitationOut) UnsetInvitedBy() { - o.InvitedBy.Unset() -} - -// GetOrganizationId returns the OrganizationId field value -func (o *InvitationOut) GetOrganizationId() string { - if o == nil { - var ret string - return ret - } - - return o.OrganizationId -} - -// GetOrganizationIdOk returns a tuple with the OrganizationId field value -// and a boolean to check if the value has been set. -func (o *InvitationOut) GetOrganizationIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.OrganizationId, true -} - -// SetOrganizationId sets field value -func (o *InvitationOut) SetOrganizationId(v string) { - o.OrganizationId = v -} - -// GetRole returns the Role field value -func (o *InvitationOut) GetRole() string { - if o == nil { - var ret string - return ret - } - - return o.Role -} - -// GetRoleOk returns a tuple with the Role field value -// and a boolean to check if the value has been set. -func (o *InvitationOut) GetRoleOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Role, true -} - -// SetRole sets field value -func (o *InvitationOut) SetRole(v string) { - o.Role = v -} - -// GetStatus returns the Status field value -func (o *InvitationOut) GetStatus() string { - if o == nil { - var ret string - return ret - } - - return o.Status -} - -// GetStatusOk returns a tuple with the Status field value -// and a boolean to check if the value has been set. -func (o *InvitationOut) GetStatusOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Status, true -} - -// SetStatus sets field value -func (o *InvitationOut) SetStatus(v string) { - o.Status = v -} - -func (o InvitationOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o InvitationOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["created_at"] = o.CreatedAt - toSerialize["email"] = o.Email - toSerialize["expires_at"] = o.ExpiresAt - toSerialize["id"] = o.Id - if o.InvitedBy.IsSet() { - toSerialize["invited_by"] = o.InvitedBy.Get() - } - toSerialize["organization_id"] = o.OrganizationId - toSerialize["role"] = o.Role - toSerialize["status"] = o.Status - return toSerialize, nil -} - -func (o *InvitationOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "created_at", - "email", - "expires_at", - "id", - "organization_id", - "role", - "status", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varInvitationOut := _InvitationOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varInvitationOut) - - if err != nil { - return err - } - - *o = InvitationOut(varInvitationOut) - - return err -} - -type NullableInvitationOut struct { - value *InvitationOut - isSet bool -} - -func (v NullableInvitationOut) Get() *InvitationOut { - return v.value -} - -func (v *NullableInvitationOut) Set(val *InvitationOut) { - v.value = val - v.isSet = true -} - -func (v NullableInvitationOut) IsSet() bool { - return v.isSet -} - -func (v *NullableInvitationOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInvitationOut(val *InvitationOut) *NullableInvitationOut { - return &NullableInvitationOut{value: val, isSet: true} -} - -func (v NullableInvitationOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInvitationOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_invite_create_out.go b/sdk/go/model_invite_create_out.go deleted file mode 100644 index 5b30177..0000000 --- a/sdk/go/model_invite_create_out.go +++ /dev/null @@ -1,214 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" -) - -// checks if the InviteCreateOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &InviteCreateOut{} - -// InviteCreateOut POST /v0/members/invite response. `already_member` is True when the email was already a live member (no invite created — a no-op success). `email_delivered` is False when the invite row was created but the notification email failed to send — the invite is still valid and can be resent, but the invitee has not yet received a link. -type InviteCreateOut struct { - AlreadyMember *bool `json:"already_member,omitempty"` - EmailDelivered *bool `json:"email_delivered,omitempty"` - Invitation NullableInvitationOut `json:"invitation,omitempty"` -} - -// NewInviteCreateOut instantiates a new InviteCreateOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewInviteCreateOut() *InviteCreateOut { - this := InviteCreateOut{} - var alreadyMember bool = false - this.AlreadyMember = &alreadyMember - var emailDelivered bool = true - this.EmailDelivered = &emailDelivered - return &this -} - -// NewInviteCreateOutWithDefaults instantiates a new InviteCreateOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewInviteCreateOutWithDefaults() *InviteCreateOut { - this := InviteCreateOut{} - var alreadyMember bool = false - this.AlreadyMember = &alreadyMember - var emailDelivered bool = true - this.EmailDelivered = &emailDelivered - return &this -} - -// GetAlreadyMember returns the AlreadyMember field value if set, zero value otherwise. -func (o *InviteCreateOut) GetAlreadyMember() bool { - if o == nil || IsNil(o.AlreadyMember) { - var ret bool - return ret - } - return *o.AlreadyMember -} - -// GetAlreadyMemberOk returns a tuple with the AlreadyMember field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InviteCreateOut) GetAlreadyMemberOk() (*bool, bool) { - if o == nil || IsNil(o.AlreadyMember) { - return nil, false - } - return o.AlreadyMember, true -} - -// HasAlreadyMember returns a boolean if a field has been set. -func (o *InviteCreateOut) HasAlreadyMember() bool { - if o != nil && !IsNil(o.AlreadyMember) { - return true - } - - return false -} - -// SetAlreadyMember gets a reference to the given bool and assigns it to the AlreadyMember field. -func (o *InviteCreateOut) SetAlreadyMember(v bool) { - o.AlreadyMember = &v -} - -// GetEmailDelivered returns the EmailDelivered field value if set, zero value otherwise. -func (o *InviteCreateOut) GetEmailDelivered() bool { - if o == nil || IsNil(o.EmailDelivered) { - var ret bool - return ret - } - return *o.EmailDelivered -} - -// GetEmailDeliveredOk returns a tuple with the EmailDelivered field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *InviteCreateOut) GetEmailDeliveredOk() (*bool, bool) { - if o == nil || IsNil(o.EmailDelivered) { - return nil, false - } - return o.EmailDelivered, true -} - -// HasEmailDelivered returns a boolean if a field has been set. -func (o *InviteCreateOut) HasEmailDelivered() bool { - if o != nil && !IsNil(o.EmailDelivered) { - return true - } - - return false -} - -// SetEmailDelivered gets a reference to the given bool and assigns it to the EmailDelivered field. -func (o *InviteCreateOut) SetEmailDelivered(v bool) { - o.EmailDelivered = &v -} - -// GetInvitation returns the Invitation field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *InviteCreateOut) GetInvitation() InvitationOut { - if o == nil || IsNil(o.Invitation.Get()) { - var ret InvitationOut - return ret - } - return *o.Invitation.Get() -} - -// GetInvitationOk returns a tuple with the Invitation field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *InviteCreateOut) GetInvitationOk() (*InvitationOut, bool) { - if o == nil { - return nil, false - } - return o.Invitation.Get(), o.Invitation.IsSet() -} - -// HasInvitation returns a boolean if a field has been set. -func (o *InviteCreateOut) HasInvitation() bool { - if o != nil && o.Invitation.IsSet() { - return true - } - - return false -} - -// SetInvitation gets a reference to the given NullableInvitationOut and assigns it to the Invitation field. -func (o *InviteCreateOut) SetInvitation(v InvitationOut) { - o.Invitation.Set(&v) -} -// SetInvitationNil sets the value for Invitation to be an explicit nil -func (o *InviteCreateOut) SetInvitationNil() { - o.Invitation.Set(nil) -} - -// UnsetInvitation ensures that no value is present for Invitation, not even an explicit nil -func (o *InviteCreateOut) UnsetInvitation() { - o.Invitation.Unset() -} - -func (o InviteCreateOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o InviteCreateOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.AlreadyMember) { - toSerialize["already_member"] = o.AlreadyMember - } - if !IsNil(o.EmailDelivered) { - toSerialize["email_delivered"] = o.EmailDelivered - } - if o.Invitation.IsSet() { - toSerialize["invitation"] = o.Invitation.Get() - } - return toSerialize, nil -} - -type NullableInviteCreateOut struct { - value *InviteCreateOut - isSet bool -} - -func (v NullableInviteCreateOut) Get() *InviteCreateOut { - return v.value -} - -func (v *NullableInviteCreateOut) Set(val *InviteCreateOut) { - v.value = val - v.isSet = true -} - -func (v NullableInviteCreateOut) IsSet() bool { - return v.isSet -} - -func (v *NullableInviteCreateOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableInviteCreateOut(val *InviteCreateOut) *NullableInviteCreateOut { - return &NullableInviteCreateOut{value: val, isSet: true} -} - -func (v NullableInviteCreateOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableInviteCreateOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_jwk_out.go b/sdk/go/model_jwk_out.go deleted file mode 100644 index afbb301..0000000 --- a/sdk/go/model_jwk_out.go +++ /dev/null @@ -1,311 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "fmt" -) - -// checks if the JwkOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &JwkOut{} - -// JwkOut struct for JwkOut -type JwkOut struct { - Alg string `json:"alg"` - E string `json:"e"` - Kid string `json:"kid"` - Kty string `json:"kty"` - N string `json:"n"` - Use string `json:"use"` - AdditionalProperties map[string]interface{} -} - -type _JwkOut JwkOut - -// NewJwkOut instantiates a new JwkOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewJwkOut(alg string, e string, kid string, kty string, n string, use string) *JwkOut { - this := JwkOut{} - this.Alg = alg - this.E = e - this.Kid = kid - this.Kty = kty - this.N = n - this.Use = use - return &this -} - -// NewJwkOutWithDefaults instantiates a new JwkOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewJwkOutWithDefaults() *JwkOut { - this := JwkOut{} - return &this -} - -// GetAlg returns the Alg field value -func (o *JwkOut) GetAlg() string { - if o == nil { - var ret string - return ret - } - - return o.Alg -} - -// GetAlgOk returns a tuple with the Alg field value -// and a boolean to check if the value has been set. -func (o *JwkOut) GetAlgOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Alg, true -} - -// SetAlg sets field value -func (o *JwkOut) SetAlg(v string) { - o.Alg = v -} - -// GetE returns the E field value -func (o *JwkOut) GetE() string { - if o == nil { - var ret string - return ret - } - - return o.E -} - -// GetEOk returns a tuple with the E field value -// and a boolean to check if the value has been set. -func (o *JwkOut) GetEOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.E, true -} - -// SetE sets field value -func (o *JwkOut) SetE(v string) { - o.E = v -} - -// GetKid returns the Kid field value -func (o *JwkOut) GetKid() string { - if o == nil { - var ret string - return ret - } - - return o.Kid -} - -// GetKidOk returns a tuple with the Kid field value -// and a boolean to check if the value has been set. -func (o *JwkOut) GetKidOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Kid, true -} - -// SetKid sets field value -func (o *JwkOut) SetKid(v string) { - o.Kid = v -} - -// GetKty returns the Kty field value -func (o *JwkOut) GetKty() string { - if o == nil { - var ret string - return ret - } - - return o.Kty -} - -// GetKtyOk returns a tuple with the Kty field value -// and a boolean to check if the value has been set. -func (o *JwkOut) GetKtyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Kty, true -} - -// SetKty sets field value -func (o *JwkOut) SetKty(v string) { - o.Kty = v -} - -// GetN returns the N field value -func (o *JwkOut) GetN() string { - if o == nil { - var ret string - return ret - } - - return o.N -} - -// GetNOk returns a tuple with the N field value -// and a boolean to check if the value has been set. -func (o *JwkOut) GetNOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.N, true -} - -// SetN sets field value -func (o *JwkOut) SetN(v string) { - o.N = v -} - -// GetUse returns the Use field value -func (o *JwkOut) GetUse() string { - if o == nil { - var ret string - return ret - } - - return o.Use -} - -// GetUseOk returns a tuple with the Use field value -// and a boolean to check if the value has been set. -func (o *JwkOut) GetUseOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Use, true -} - -// SetUse sets field value -func (o *JwkOut) SetUse(v string) { - o.Use = v -} - -func (o JwkOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o JwkOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["alg"] = o.Alg - toSerialize["e"] = o.E - toSerialize["kid"] = o.Kid - toSerialize["kty"] = o.Kty - toSerialize["n"] = o.N - toSerialize["use"] = o.Use - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *JwkOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "alg", - "e", - "kid", - "kty", - "n", - "use", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varJwkOut := _JwkOut{} - - err = json.Unmarshal(data, &varJwkOut) - - if err != nil { - return err - } - - *o = JwkOut(varJwkOut) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "alg") - delete(additionalProperties, "e") - delete(additionalProperties, "kid") - delete(additionalProperties, "kty") - delete(additionalProperties, "n") - delete(additionalProperties, "use") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableJwkOut struct { - value *JwkOut - isSet bool -} - -func (v NullableJwkOut) Get() *JwkOut { - return v.value -} - -func (v *NullableJwkOut) Set(val *JwkOut) { - v.value = val - v.isSet = true -} - -func (v NullableJwkOut) IsSet() bool { - return v.isSet -} - -func (v *NullableJwkOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableJwkOut(val *JwkOut) *NullableJwkOut { - return &NullableJwkOut{value: val, isSet: true} -} - -func (v NullableJwkOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableJwkOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_jwks_out.go b/sdk/go/model_jwks_out.go deleted file mode 100644 index c5cea5c..0000000 --- a/sdk/go/model_jwks_out.go +++ /dev/null @@ -1,166 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "fmt" -) - -// checks if the JwksOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &JwksOut{} - -// JwksOut struct for JwksOut -type JwksOut struct { - Keys []JwkOut `json:"keys"` - AdditionalProperties map[string]interface{} -} - -type _JwksOut JwksOut - -// NewJwksOut instantiates a new JwksOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewJwksOut(keys []JwkOut) *JwksOut { - this := JwksOut{} - this.Keys = keys - return &this -} - -// NewJwksOutWithDefaults instantiates a new JwksOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewJwksOutWithDefaults() *JwksOut { - this := JwksOut{} - return &this -} - -// GetKeys returns the Keys field value -func (o *JwksOut) GetKeys() []JwkOut { - if o == nil { - var ret []JwkOut - return ret - } - - return o.Keys -} - -// GetKeysOk returns a tuple with the Keys field value -// and a boolean to check if the value has been set. -func (o *JwksOut) GetKeysOk() ([]JwkOut, bool) { - if o == nil { - return nil, false - } - return o.Keys, true -} - -// SetKeys sets field value -func (o *JwksOut) SetKeys(v []JwkOut) { - o.Keys = v -} - -func (o JwksOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o JwksOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["keys"] = o.Keys - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *JwksOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "keys", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varJwksOut := _JwksOut{} - - err = json.Unmarshal(data, &varJwksOut) - - if err != nil { - return err - } - - *o = JwksOut(varJwksOut) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "keys") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableJwksOut struct { - value *JwksOut - isSet bool -} - -func (v NullableJwksOut) Get() *JwksOut { - return v.value -} - -func (v *NullableJwksOut) Set(val *JwksOut) { - v.value = val - v.isSet = true -} - -func (v NullableJwksOut) IsSet() bool { - return v.isSet -} - -func (v *NullableJwksOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableJwksOut(val *JwksOut) *NullableJwksOut { - return &NullableJwksOut{value: val, isSet: true} -} - -func (v NullableJwksOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableJwksOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_lookup_values_in.go b/sdk/go/model_lookup_values_in.go deleted file mode 100644 index af9c8ba..0000000 --- a/sdk/go/model_lookup_values_in.go +++ /dev/null @@ -1,224 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the LookupValuesIn type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LookupValuesIn{} - -// LookupValuesIn struct for LookupValuesIn -type LookupValuesIn struct { - Column string `json:"column"` - Dataset string `json:"dataset"` - Limit *int32 `json:"limit,omitempty"` -} - -type _LookupValuesIn LookupValuesIn - -// NewLookupValuesIn instantiates a new LookupValuesIn object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewLookupValuesIn(column string, dataset string) *LookupValuesIn { - this := LookupValuesIn{} - this.Column = column - this.Dataset = dataset - var limit int32 = 50 - this.Limit = &limit - return &this -} - -// NewLookupValuesInWithDefaults instantiates a new LookupValuesIn object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewLookupValuesInWithDefaults() *LookupValuesIn { - this := LookupValuesIn{} - var limit int32 = 50 - this.Limit = &limit - return &this -} - -// GetColumn returns the Column field value -func (o *LookupValuesIn) GetColumn() string { - if o == nil { - var ret string - return ret - } - - return o.Column -} - -// GetColumnOk returns a tuple with the Column field value -// and a boolean to check if the value has been set. -func (o *LookupValuesIn) GetColumnOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Column, true -} - -// SetColumn sets field value -func (o *LookupValuesIn) SetColumn(v string) { - o.Column = v -} - -// GetDataset returns the Dataset field value -func (o *LookupValuesIn) GetDataset() string { - if o == nil { - var ret string - return ret - } - - return o.Dataset -} - -// GetDatasetOk returns a tuple with the Dataset field value -// and a boolean to check if the value has been set. -func (o *LookupValuesIn) GetDatasetOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Dataset, true -} - -// SetDataset sets field value -func (o *LookupValuesIn) SetDataset(v string) { - o.Dataset = v -} - -// GetLimit returns the Limit field value if set, zero value otherwise. -func (o *LookupValuesIn) GetLimit() int32 { - if o == nil || IsNil(o.Limit) { - var ret int32 - return ret - } - return *o.Limit -} - -// GetLimitOk returns a tuple with the Limit field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *LookupValuesIn) GetLimitOk() (*int32, bool) { - if o == nil || IsNil(o.Limit) { - return nil, false - } - return o.Limit, true -} - -// HasLimit returns a boolean if a field has been set. -func (o *LookupValuesIn) HasLimit() bool { - if o != nil && !IsNil(o.Limit) { - return true - } - - return false -} - -// SetLimit gets a reference to the given int32 and assigns it to the Limit field. -func (o *LookupValuesIn) SetLimit(v int32) { - o.Limit = &v -} - -func (o LookupValuesIn) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o LookupValuesIn) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["column"] = o.Column - toSerialize["dataset"] = o.Dataset - if !IsNil(o.Limit) { - toSerialize["limit"] = o.Limit - } - return toSerialize, nil -} - -func (o *LookupValuesIn) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "column", - "dataset", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varLookupValuesIn := _LookupValuesIn{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varLookupValuesIn) - - if err != nil { - return err - } - - *o = LookupValuesIn(varLookupValuesIn) - - return err -} - -type NullableLookupValuesIn struct { - value *LookupValuesIn - isSet bool -} - -func (v NullableLookupValuesIn) Get() *LookupValuesIn { - return v.value -} - -func (v *NullableLookupValuesIn) Set(val *LookupValuesIn) { - v.value = val - v.isSet = true -} - -func (v NullableLookupValuesIn) IsSet() bool { - return v.isSet -} - -func (v *NullableLookupValuesIn) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableLookupValuesIn(val *LookupValuesIn) *NullableLookupValuesIn { - return &NullableLookupValuesIn{value: val, isSet: true} -} - -func (v NullableLookupValuesIn) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableLookupValuesIn) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_lookup_values_out.go b/sdk/go/model_lookup_values_out.go deleted file mode 100644 index 0376f7c..0000000 --- a/sdk/go/model_lookup_values_out.go +++ /dev/null @@ -1,212 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the LookupValuesOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &LookupValuesOut{} - -// LookupValuesOut struct for LookupValuesOut -type LookupValuesOut struct { - Column string `json:"column"` - Dataset string `json:"dataset"` - Values []interface{} `json:"values"` -} - -type _LookupValuesOut LookupValuesOut - -// NewLookupValuesOut instantiates a new LookupValuesOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewLookupValuesOut(column string, dataset string, values []interface{}) *LookupValuesOut { - this := LookupValuesOut{} - this.Column = column - this.Dataset = dataset - this.Values = values - return &this -} - -// NewLookupValuesOutWithDefaults instantiates a new LookupValuesOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewLookupValuesOutWithDefaults() *LookupValuesOut { - this := LookupValuesOut{} - return &this -} - -// GetColumn returns the Column field value -func (o *LookupValuesOut) GetColumn() string { - if o == nil { - var ret string - return ret - } - - return o.Column -} - -// GetColumnOk returns a tuple with the Column field value -// and a boolean to check if the value has been set. -func (o *LookupValuesOut) GetColumnOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Column, true -} - -// SetColumn sets field value -func (o *LookupValuesOut) SetColumn(v string) { - o.Column = v -} - -// GetDataset returns the Dataset field value -func (o *LookupValuesOut) GetDataset() string { - if o == nil { - var ret string - return ret - } - - return o.Dataset -} - -// GetDatasetOk returns a tuple with the Dataset field value -// and a boolean to check if the value has been set. -func (o *LookupValuesOut) GetDatasetOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Dataset, true -} - -// SetDataset sets field value -func (o *LookupValuesOut) SetDataset(v string) { - o.Dataset = v -} - -// GetValues returns the Values field value -func (o *LookupValuesOut) GetValues() []interface{} { - if o == nil { - var ret []interface{} - return ret - } - - return o.Values -} - -// GetValuesOk returns a tuple with the Values field value -// and a boolean to check if the value has been set. -func (o *LookupValuesOut) GetValuesOk() ([]interface{}, bool) { - if o == nil { - return nil, false - } - return o.Values, true -} - -// SetValues sets field value -func (o *LookupValuesOut) SetValues(v []interface{}) { - o.Values = v -} - -func (o LookupValuesOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o LookupValuesOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["column"] = o.Column - toSerialize["dataset"] = o.Dataset - toSerialize["values"] = o.Values - return toSerialize, nil -} - -func (o *LookupValuesOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "column", - "dataset", - "values", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varLookupValuesOut := _LookupValuesOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varLookupValuesOut) - - if err != nil { - return err - } - - *o = LookupValuesOut(varLookupValuesOut) - - return err -} - -type NullableLookupValuesOut struct { - value *LookupValuesOut - isSet bool -} - -func (v NullableLookupValuesOut) Get() *LookupValuesOut { - return v.value -} - -func (v *NullableLookupValuesOut) Set(val *LookupValuesOut) { - v.value = val - v.isSet = true -} - -func (v NullableLookupValuesOut) IsSet() bool { - return v.isSet -} - -func (v *NullableLookupValuesOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableLookupValuesOut(val *LookupValuesOut) *NullableLookupValuesOut { - return &NullableLookupValuesOut{value: val, isSet: true} -} - -func (v NullableLookupValuesOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableLookupValuesOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_member_invite_in.go b/sdk/go/model_member_invite_in.go deleted file mode 100644 index 16687cf..0000000 --- a/sdk/go/model_member_invite_in.go +++ /dev/null @@ -1,196 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the MemberInviteIn type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &MemberInviteIn{} - -// MemberInviteIn POST /v0/members/invite body — invite a person by email. -type MemberInviteIn struct { - Email string `json:"email"` - Role *string `json:"role,omitempty"` -} - -type _MemberInviteIn MemberInviteIn - -// NewMemberInviteIn instantiates a new MemberInviteIn object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewMemberInviteIn(email string) *MemberInviteIn { - this := MemberInviteIn{} - this.Email = email - var role string = "member" - this.Role = &role - return &this -} - -// NewMemberInviteInWithDefaults instantiates a new MemberInviteIn object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewMemberInviteInWithDefaults() *MemberInviteIn { - this := MemberInviteIn{} - var role string = "member" - this.Role = &role - return &this -} - -// GetEmail returns the Email field value -func (o *MemberInviteIn) GetEmail() string { - if o == nil { - var ret string - return ret - } - - return o.Email -} - -// GetEmailOk returns a tuple with the Email field value -// and a boolean to check if the value has been set. -func (o *MemberInviteIn) GetEmailOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Email, true -} - -// SetEmail sets field value -func (o *MemberInviteIn) SetEmail(v string) { - o.Email = v -} - -// GetRole returns the Role field value if set, zero value otherwise. -func (o *MemberInviteIn) GetRole() string { - if o == nil || IsNil(o.Role) { - var ret string - return ret - } - return *o.Role -} - -// GetRoleOk returns a tuple with the Role field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *MemberInviteIn) GetRoleOk() (*string, bool) { - if o == nil || IsNil(o.Role) { - return nil, false - } - return o.Role, true -} - -// HasRole returns a boolean if a field has been set. -func (o *MemberInviteIn) HasRole() bool { - if o != nil && !IsNil(o.Role) { - return true - } - - return false -} - -// SetRole gets a reference to the given string and assigns it to the Role field. -func (o *MemberInviteIn) SetRole(v string) { - o.Role = &v -} - -func (o MemberInviteIn) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o MemberInviteIn) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["email"] = o.Email - if !IsNil(o.Role) { - toSerialize["role"] = o.Role - } - return toSerialize, nil -} - -func (o *MemberInviteIn) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "email", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varMemberInviteIn := _MemberInviteIn{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varMemberInviteIn) - - if err != nil { - return err - } - - *o = MemberInviteIn(varMemberInviteIn) - - return err -} - -type NullableMemberInviteIn struct { - value *MemberInviteIn - isSet bool -} - -func (v NullableMemberInviteIn) Get() *MemberInviteIn { - return v.value -} - -func (v *NullableMemberInviteIn) Set(val *MemberInviteIn) { - v.value = val - v.isSet = true -} - -func (v NullableMemberInviteIn) IsSet() bool { - return v.isSet -} - -func (v *NullableMemberInviteIn) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableMemberInviteIn(val *MemberInviteIn) *NullableMemberInviteIn { - return &NullableMemberInviteIn{value: val, isSet: true} -} - -func (v NullableMemberInviteIn) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableMemberInviteIn) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_member_list.go b/sdk/go/model_member_list.go deleted file mode 100644 index 55ba08d..0000000 --- a/sdk/go/model_member_list.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the MemberList type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &MemberList{} - -// MemberList struct for MemberList -type MemberList struct { - Items []MemberOut `json:"items"` - NextCursor NullableString `json:"next_cursor,omitempty"` -} - -type _MemberList MemberList - -// NewMemberList instantiates a new MemberList object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewMemberList(items []MemberOut) *MemberList { - this := MemberList{} - this.Items = items - return &this -} - -// NewMemberListWithDefaults instantiates a new MemberList object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewMemberListWithDefaults() *MemberList { - this := MemberList{} - return &this -} - -// GetItems returns the Items field value -func (o *MemberList) GetItems() []MemberOut { - if o == nil { - var ret []MemberOut - return ret - } - - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value -// and a boolean to check if the value has been set. -func (o *MemberList) GetItemsOk() ([]MemberOut, bool) { - if o == nil { - return nil, false - } - return o.Items, true -} - -// SetItems sets field value -func (o *MemberList) SetItems(v []MemberOut) { - o.Items = v -} - -// GetNextCursor returns the NextCursor field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *MemberList) GetNextCursor() string { - if o == nil || IsNil(o.NextCursor.Get()) { - var ret string - return ret - } - return *o.NextCursor.Get() -} - -// GetNextCursorOk returns a tuple with the NextCursor field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *MemberList) GetNextCursorOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.NextCursor.Get(), o.NextCursor.IsSet() -} - -// HasNextCursor returns a boolean if a field has been set. -func (o *MemberList) HasNextCursor() bool { - if o != nil && o.NextCursor.IsSet() { - return true - } - - return false -} - -// SetNextCursor gets a reference to the given NullableString and assigns it to the NextCursor field. -func (o *MemberList) SetNextCursor(v string) { - o.NextCursor.Set(&v) -} -// SetNextCursorNil sets the value for NextCursor to be an explicit nil -func (o *MemberList) SetNextCursorNil() { - o.NextCursor.Set(nil) -} - -// UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil -func (o *MemberList) UnsetNextCursor() { - o.NextCursor.Unset() -} - -func (o MemberList) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o MemberList) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["items"] = o.Items - if o.NextCursor.IsSet() { - toSerialize["next_cursor"] = o.NextCursor.Get() - } - return toSerialize, nil -} - -func (o *MemberList) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "items", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varMemberList := _MemberList{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varMemberList) - - if err != nil { - return err - } - - *o = MemberList(varMemberList) - - return err -} - -type NullableMemberList struct { - value *MemberList - isSet bool -} - -func (v NullableMemberList) Get() *MemberList { - return v.value -} - -func (v *NullableMemberList) Set(val *MemberList) { - v.value = val - v.isSet = true -} - -func (v NullableMemberList) IsSet() bool { - return v.isSet -} - -func (v *NullableMemberList) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableMemberList(val *MemberList) *NullableMemberList { - return &NullableMemberList{value: val, isSet: true} -} - -func (v NullableMemberList) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableMemberList) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_member_out.go b/sdk/go/model_member_out.go deleted file mode 100644 index 6f4fb84..0000000 --- a/sdk/go/model_member_out.go +++ /dev/null @@ -1,333 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "time" - "bytes" - "fmt" -) - -// checks if the MemberOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &MemberOut{} - -// MemberOut One live member of a workspace — metadata for the members page / `GET /v0/members`. -type MemberOut struct { - CreatedAt time.Time `json:"created_at"` - Email string `json:"email"` - FirstName NullableString `json:"first_name,omitempty"` - LastName NullableString `json:"last_name,omitempty"` - Role string `json:"role"` - UserId string `json:"user_id"` -} - -type _MemberOut MemberOut - -// NewMemberOut instantiates a new MemberOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewMemberOut(createdAt time.Time, email string, role string, userId string) *MemberOut { - this := MemberOut{} - this.CreatedAt = createdAt - this.Email = email - this.Role = role - this.UserId = userId - return &this -} - -// NewMemberOutWithDefaults instantiates a new MemberOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewMemberOutWithDefaults() *MemberOut { - this := MemberOut{} - return &this -} - -// GetCreatedAt returns the CreatedAt field value -func (o *MemberOut) GetCreatedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value -// and a boolean to check if the value has been set. -func (o *MemberOut) GetCreatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.CreatedAt, true -} - -// SetCreatedAt sets field value -func (o *MemberOut) SetCreatedAt(v time.Time) { - o.CreatedAt = v -} - -// GetEmail returns the Email field value -func (o *MemberOut) GetEmail() string { - if o == nil { - var ret string - return ret - } - - return o.Email -} - -// GetEmailOk returns a tuple with the Email field value -// and a boolean to check if the value has been set. -func (o *MemberOut) GetEmailOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Email, true -} - -// SetEmail sets field value -func (o *MemberOut) SetEmail(v string) { - o.Email = v -} - -// GetFirstName returns the FirstName field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *MemberOut) GetFirstName() string { - if o == nil || IsNil(o.FirstName.Get()) { - var ret string - return ret - } - return *o.FirstName.Get() -} - -// GetFirstNameOk returns a tuple with the FirstName field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *MemberOut) GetFirstNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.FirstName.Get(), o.FirstName.IsSet() -} - -// HasFirstName returns a boolean if a field has been set. -func (o *MemberOut) HasFirstName() bool { - if o != nil && o.FirstName.IsSet() { - return true - } - - return false -} - -// SetFirstName gets a reference to the given NullableString and assigns it to the FirstName field. -func (o *MemberOut) SetFirstName(v string) { - o.FirstName.Set(&v) -} -// SetFirstNameNil sets the value for FirstName to be an explicit nil -func (o *MemberOut) SetFirstNameNil() { - o.FirstName.Set(nil) -} - -// UnsetFirstName ensures that no value is present for FirstName, not even an explicit nil -func (o *MemberOut) UnsetFirstName() { - o.FirstName.Unset() -} - -// GetLastName returns the LastName field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *MemberOut) GetLastName() string { - if o == nil || IsNil(o.LastName.Get()) { - var ret string - return ret - } - return *o.LastName.Get() -} - -// GetLastNameOk returns a tuple with the LastName field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *MemberOut) GetLastNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.LastName.Get(), o.LastName.IsSet() -} - -// HasLastName returns a boolean if a field has been set. -func (o *MemberOut) HasLastName() bool { - if o != nil && o.LastName.IsSet() { - return true - } - - return false -} - -// SetLastName gets a reference to the given NullableString and assigns it to the LastName field. -func (o *MemberOut) SetLastName(v string) { - o.LastName.Set(&v) -} -// SetLastNameNil sets the value for LastName to be an explicit nil -func (o *MemberOut) SetLastNameNil() { - o.LastName.Set(nil) -} - -// UnsetLastName ensures that no value is present for LastName, not even an explicit nil -func (o *MemberOut) UnsetLastName() { - o.LastName.Unset() -} - -// GetRole returns the Role field value -func (o *MemberOut) GetRole() string { - if o == nil { - var ret string - return ret - } - - return o.Role -} - -// GetRoleOk returns a tuple with the Role field value -// and a boolean to check if the value has been set. -func (o *MemberOut) GetRoleOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Role, true -} - -// SetRole sets field value -func (o *MemberOut) SetRole(v string) { - o.Role = v -} - -// GetUserId returns the UserId field value -func (o *MemberOut) GetUserId() string { - if o == nil { - var ret string - return ret - } - - return o.UserId -} - -// GetUserIdOk returns a tuple with the UserId field value -// and a boolean to check if the value has been set. -func (o *MemberOut) GetUserIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.UserId, true -} - -// SetUserId sets field value -func (o *MemberOut) SetUserId(v string) { - o.UserId = v -} - -func (o MemberOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o MemberOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["created_at"] = o.CreatedAt - toSerialize["email"] = o.Email - if o.FirstName.IsSet() { - toSerialize["first_name"] = o.FirstName.Get() - } - if o.LastName.IsSet() { - toSerialize["last_name"] = o.LastName.Get() - } - toSerialize["role"] = o.Role - toSerialize["user_id"] = o.UserId - return toSerialize, nil -} - -func (o *MemberOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "created_at", - "email", - "role", - "user_id", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varMemberOut := _MemberOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varMemberOut) - - if err != nil { - return err - } - - *o = MemberOut(varMemberOut) - - return err -} - -type NullableMemberOut struct { - value *MemberOut - isSet bool -} - -func (v NullableMemberOut) Get() *MemberOut { - return v.value -} - -func (v *NullableMemberOut) Set(val *MemberOut) { - v.value = val - v.isSet = true -} - -func (v NullableMemberOut) IsSet() bool { - return v.isSet -} - -func (v *NullableMemberOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableMemberOut(val *MemberOut) *NullableMemberOut { - return &NullableMemberOut{value: val, isSet: true} -} - -func (v NullableMemberOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableMemberOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_member_remove_out.go b/sdk/go/model_member_remove_out.go deleted file mode 100644 index 95f192b..0000000 --- a/sdk/go/model_member_remove_out.go +++ /dev/null @@ -1,224 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the MemberRemoveOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &MemberRemoveOut{} - -// MemberRemoveOut DELETE /v0/members/{user_id} response — the member-removal receipt. `id` is the removed user's id (replaces the ad-hoc `removed` key). -type MemberRemoveOut struct { - Id string `json:"id"` - Ok *bool `json:"ok,omitempty"` - OrganizationId string `json:"organization_id"` -} - -type _MemberRemoveOut MemberRemoveOut - -// NewMemberRemoveOut instantiates a new MemberRemoveOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewMemberRemoveOut(id string, organizationId string) *MemberRemoveOut { - this := MemberRemoveOut{} - this.Id = id - var ok bool = true - this.Ok = &ok - this.OrganizationId = organizationId - return &this -} - -// NewMemberRemoveOutWithDefaults instantiates a new MemberRemoveOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewMemberRemoveOutWithDefaults() *MemberRemoveOut { - this := MemberRemoveOut{} - var ok bool = true - this.Ok = &ok - return &this -} - -// GetId returns the Id field value -func (o *MemberRemoveOut) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *MemberRemoveOut) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *MemberRemoveOut) SetId(v string) { - o.Id = v -} - -// GetOk returns the Ok field value if set, zero value otherwise. -func (o *MemberRemoveOut) GetOk() bool { - if o == nil || IsNil(o.Ok) { - var ret bool - return ret - } - return *o.Ok -} - -// GetOkOk returns a tuple with the Ok field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *MemberRemoveOut) GetOkOk() (*bool, bool) { - if o == nil || IsNil(o.Ok) { - return nil, false - } - return o.Ok, true -} - -// HasOk returns a boolean if a field has been set. -func (o *MemberRemoveOut) HasOk() bool { - if o != nil && !IsNil(o.Ok) { - return true - } - - return false -} - -// SetOk gets a reference to the given bool and assigns it to the Ok field. -func (o *MemberRemoveOut) SetOk(v bool) { - o.Ok = &v -} - -// GetOrganizationId returns the OrganizationId field value -func (o *MemberRemoveOut) GetOrganizationId() string { - if o == nil { - var ret string - return ret - } - - return o.OrganizationId -} - -// GetOrganizationIdOk returns a tuple with the OrganizationId field value -// and a boolean to check if the value has been set. -func (o *MemberRemoveOut) GetOrganizationIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.OrganizationId, true -} - -// SetOrganizationId sets field value -func (o *MemberRemoveOut) SetOrganizationId(v string) { - o.OrganizationId = v -} - -func (o MemberRemoveOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o MemberRemoveOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["id"] = o.Id - if !IsNil(o.Ok) { - toSerialize["ok"] = o.Ok - } - toSerialize["organization_id"] = o.OrganizationId - return toSerialize, nil -} - -func (o *MemberRemoveOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "id", - "organization_id", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varMemberRemoveOut := _MemberRemoveOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varMemberRemoveOut) - - if err != nil { - return err - } - - *o = MemberRemoveOut(varMemberRemoveOut) - - return err -} - -type NullableMemberRemoveOut struct { - value *MemberRemoveOut - isSet bool -} - -func (v NullableMemberRemoveOut) Get() *MemberRemoveOut { - return v.value -} - -func (v *NullableMemberRemoveOut) Set(val *MemberRemoveOut) { - v.value = val - v.isSet = true -} - -func (v NullableMemberRemoveOut) IsSet() bool { - return v.isSet -} - -func (v *NullableMemberRemoveOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableMemberRemoveOut(val *MemberRemoveOut) *NullableMemberRemoveOut { - return &NullableMemberRemoveOut{value: val, isSet: true} -} - -func (v NullableMemberRemoveOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableMemberRemoveOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_member_role_in.go b/sdk/go/model_member_role_in.go deleted file mode 100644 index e42418c..0000000 --- a/sdk/go/model_member_role_in.go +++ /dev/null @@ -1,156 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the MemberRoleIn type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &MemberRoleIn{} - -// MemberRoleIn PATCH /v0/members/{user} body — promote/demote a member. -type MemberRoleIn struct { - Role string `json:"role"` -} - -type _MemberRoleIn MemberRoleIn - -// NewMemberRoleIn instantiates a new MemberRoleIn object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewMemberRoleIn(role string) *MemberRoleIn { - this := MemberRoleIn{} - this.Role = role - return &this -} - -// NewMemberRoleInWithDefaults instantiates a new MemberRoleIn object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewMemberRoleInWithDefaults() *MemberRoleIn { - this := MemberRoleIn{} - return &this -} - -// GetRole returns the Role field value -func (o *MemberRoleIn) GetRole() string { - if o == nil { - var ret string - return ret - } - - return o.Role -} - -// GetRoleOk returns a tuple with the Role field value -// and a boolean to check if the value has been set. -func (o *MemberRoleIn) GetRoleOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Role, true -} - -// SetRole sets field value -func (o *MemberRoleIn) SetRole(v string) { - o.Role = v -} - -func (o MemberRoleIn) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o MemberRoleIn) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["role"] = o.Role - return toSerialize, nil -} - -func (o *MemberRoleIn) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "role", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varMemberRoleIn := _MemberRoleIn{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varMemberRoleIn) - - if err != nil { - return err - } - - *o = MemberRoleIn(varMemberRoleIn) - - return err -} - -type NullableMemberRoleIn struct { - value *MemberRoleIn - isSet bool -} - -func (v NullableMemberRoleIn) Get() *MemberRoleIn { - return v.value -} - -func (v *NullableMemberRoleIn) Set(val *MemberRoleIn) { - v.value = val - v.isSet = true -} - -func (v NullableMemberRoleIn) IsSet() bool { - return v.isSet -} - -func (v *NullableMemberRoleIn) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableMemberRoleIn(val *MemberRoleIn) *NullableMemberRoleIn { - return &NullableMemberRoleIn{value: val, isSet: true} -} - -func (v NullableMemberRoleIn) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableMemberRoleIn) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_o_auth_protocol_error_out.go b/sdk/go/model_o_auth_protocol_error_out.go deleted file mode 100644 index 88a32a6..0000000 --- a/sdk/go/model_o_auth_protocol_error_out.go +++ /dev/null @@ -1,213 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "fmt" -) - -// checks if the OAuthProtocolErrorOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &OAuthProtocolErrorOut{} - -// OAuthProtocolErrorOut RFC OAuth error shape used by public protocol endpoints. -type OAuthProtocolErrorOut struct { - Error string `json:"error"` - ErrorDescription NullableString `json:"error_description,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _OAuthProtocolErrorOut OAuthProtocolErrorOut - -// NewOAuthProtocolErrorOut instantiates a new OAuthProtocolErrorOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewOAuthProtocolErrorOut(error_ string) *OAuthProtocolErrorOut { - this := OAuthProtocolErrorOut{} - this.Error = error_ - return &this -} - -// NewOAuthProtocolErrorOutWithDefaults instantiates a new OAuthProtocolErrorOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewOAuthProtocolErrorOutWithDefaults() *OAuthProtocolErrorOut { - this := OAuthProtocolErrorOut{} - return &this -} - -// GetError returns the Error field value -func (o *OAuthProtocolErrorOut) GetError() string { - if o == nil { - var ret string - return ret - } - - return o.Error -} - -// GetErrorOk returns a tuple with the Error field value -// and a boolean to check if the value has been set. -func (o *OAuthProtocolErrorOut) GetErrorOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Error, true -} - -// SetError sets field value -func (o *OAuthProtocolErrorOut) SetError(v string) { - o.Error = v -} - -// GetErrorDescription returns the ErrorDescription field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *OAuthProtocolErrorOut) GetErrorDescription() string { - if o == nil || IsNil(o.ErrorDescription.Get()) { - var ret string - return ret - } - return *o.ErrorDescription.Get() -} - -// GetErrorDescriptionOk returns a tuple with the ErrorDescription field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *OAuthProtocolErrorOut) GetErrorDescriptionOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ErrorDescription.Get(), o.ErrorDescription.IsSet() -} - -// HasErrorDescription returns a boolean if a field has been set. -func (o *OAuthProtocolErrorOut) HasErrorDescription() bool { - if o != nil && o.ErrorDescription.IsSet() { - return true - } - - return false -} - -// SetErrorDescription gets a reference to the given NullableString and assigns it to the ErrorDescription field. -func (o *OAuthProtocolErrorOut) SetErrorDescription(v string) { - o.ErrorDescription.Set(&v) -} -// SetErrorDescriptionNil sets the value for ErrorDescription to be an explicit nil -func (o *OAuthProtocolErrorOut) SetErrorDescriptionNil() { - o.ErrorDescription.Set(nil) -} - -// UnsetErrorDescription ensures that no value is present for ErrorDescription, not even an explicit nil -func (o *OAuthProtocolErrorOut) UnsetErrorDescription() { - o.ErrorDescription.Unset() -} - -func (o OAuthProtocolErrorOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o OAuthProtocolErrorOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["error"] = o.Error - if o.ErrorDescription.IsSet() { - toSerialize["error_description"] = o.ErrorDescription.Get() - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *OAuthProtocolErrorOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "error", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varOAuthProtocolErrorOut := _OAuthProtocolErrorOut{} - - err = json.Unmarshal(data, &varOAuthProtocolErrorOut) - - if err != nil { - return err - } - - *o = OAuthProtocolErrorOut(varOAuthProtocolErrorOut) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "error") - delete(additionalProperties, "error_description") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableOAuthProtocolErrorOut struct { - value *OAuthProtocolErrorOut - isSet bool -} - -func (v NullableOAuthProtocolErrorOut) Get() *OAuthProtocolErrorOut { - return v.value -} - -func (v *NullableOAuthProtocolErrorOut) Set(val *OAuthProtocolErrorOut) { - v.value = val - v.isSet = true -} - -func (v NullableOAuthProtocolErrorOut) IsSet() bool { - return v.isSet -} - -func (v *NullableOAuthProtocolErrorOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableOAuthProtocolErrorOut(val *OAuthProtocolErrorOut) *NullableOAuthProtocolErrorOut { - return &NullableOAuthProtocolErrorOut{value: val, isSet: true} -} - -func (v NullableOAuthProtocolErrorOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableOAuthProtocolErrorOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_operation_usage_out.go b/sdk/go/model_operation_usage_out.go deleted file mode 100644 index a01c620..0000000 --- a/sdk/go/model_operation_usage_out.go +++ /dev/null @@ -1,184 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the OperationUsageOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &OperationUsageOut{} - -// OperationUsageOut struct for OperationUsageOut -type OperationUsageOut struct { - Reads int32 `json:"reads"` - Writes int32 `json:"writes"` -} - -type _OperationUsageOut OperationUsageOut - -// NewOperationUsageOut instantiates a new OperationUsageOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewOperationUsageOut(reads int32, writes int32) *OperationUsageOut { - this := OperationUsageOut{} - this.Reads = reads - this.Writes = writes - return &this -} - -// NewOperationUsageOutWithDefaults instantiates a new OperationUsageOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewOperationUsageOutWithDefaults() *OperationUsageOut { - this := OperationUsageOut{} - return &this -} - -// GetReads returns the Reads field value -func (o *OperationUsageOut) GetReads() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Reads -} - -// GetReadsOk returns a tuple with the Reads field value -// and a boolean to check if the value has been set. -func (o *OperationUsageOut) GetReadsOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Reads, true -} - -// SetReads sets field value -func (o *OperationUsageOut) SetReads(v int32) { - o.Reads = v -} - -// GetWrites returns the Writes field value -func (o *OperationUsageOut) GetWrites() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Writes -} - -// GetWritesOk returns a tuple with the Writes field value -// and a boolean to check if the value has been set. -func (o *OperationUsageOut) GetWritesOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Writes, true -} - -// SetWrites sets field value -func (o *OperationUsageOut) SetWrites(v int32) { - o.Writes = v -} - -func (o OperationUsageOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o OperationUsageOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["reads"] = o.Reads - toSerialize["writes"] = o.Writes - return toSerialize, nil -} - -func (o *OperationUsageOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "reads", - "writes", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varOperationUsageOut := _OperationUsageOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varOperationUsageOut) - - if err != nil { - return err - } - - *o = OperationUsageOut(varOperationUsageOut) - - return err -} - -type NullableOperationUsageOut struct { - value *OperationUsageOut - isSet bool -} - -func (v NullableOperationUsageOut) Get() *OperationUsageOut { - return v.value -} - -func (v *NullableOperationUsageOut) Set(val *OperationUsageOut) { - v.value = val - v.isSet = true -} - -func (v NullableOperationUsageOut) IsSet() bool { - return v.isSet -} - -func (v *NullableOperationUsageOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableOperationUsageOut(val *OperationUsageOut) *NullableOperationUsageOut { - return &NullableOperationUsageOut{value: val, isSet: true} -} - -func (v NullableOperationUsageOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableOperationUsageOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_page.go b/sdk/go/model_page.go deleted file mode 100644 index 19dab3a..0000000 --- a/sdk/go/model_page.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the Page type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &Page{} - -// Page struct for Page -type Page struct { - Items []ArtifactOut `json:"items"` - NextCursor NullableString `json:"next_cursor,omitempty"` -} - -type _Page Page - -// NewPage instantiates a new Page object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPage(items []ArtifactOut) *Page { - this := Page{} - this.Items = items - return &this -} - -// NewPageWithDefaults instantiates a new Page object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPageWithDefaults() *Page { - this := Page{} - return &this -} - -// GetItems returns the Items field value -func (o *Page) GetItems() []ArtifactOut { - if o == nil { - var ret []ArtifactOut - return ret - } - - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value -// and a boolean to check if the value has been set. -func (o *Page) GetItemsOk() ([]ArtifactOut, bool) { - if o == nil { - return nil, false - } - return o.Items, true -} - -// SetItems sets field value -func (o *Page) SetItems(v []ArtifactOut) { - o.Items = v -} - -// GetNextCursor returns the NextCursor field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *Page) GetNextCursor() string { - if o == nil || IsNil(o.NextCursor.Get()) { - var ret string - return ret - } - return *o.NextCursor.Get() -} - -// GetNextCursorOk returns a tuple with the NextCursor field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *Page) GetNextCursorOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.NextCursor.Get(), o.NextCursor.IsSet() -} - -// HasNextCursor returns a boolean if a field has been set. -func (o *Page) HasNextCursor() bool { - if o != nil && o.NextCursor.IsSet() { - return true - } - - return false -} - -// SetNextCursor gets a reference to the given NullableString and assigns it to the NextCursor field. -func (o *Page) SetNextCursor(v string) { - o.NextCursor.Set(&v) -} -// SetNextCursorNil sets the value for NextCursor to be an explicit nil -func (o *Page) SetNextCursorNil() { - o.NextCursor.Set(nil) -} - -// UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil -func (o *Page) UnsetNextCursor() { - o.NextCursor.Unset() -} - -func (o Page) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o Page) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["items"] = o.Items - if o.NextCursor.IsSet() { - toSerialize["next_cursor"] = o.NextCursor.Get() - } - return toSerialize, nil -} - -func (o *Page) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "items", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varPage := _Page{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varPage) - - if err != nil { - return err - } - - *o = Page(varPage) - - return err -} - -type NullablePage struct { - value *Page - isSet bool -} - -func (v NullablePage) Get() *Page { - return v.value -} - -func (v *NullablePage) Set(val *Page) { - v.value = val - v.isSet = true -} - -func (v NullablePage) IsSet() bool { - return v.isSet -} - -func (v *NullablePage) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePage(val *Page) *NullablePage { - return &NullablePage{value: val, isSet: true} -} - -func (v NullablePage) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePage) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_project_config_in.go b/sdk/go/model_project_config_in.go deleted file mode 100644 index c386f1c..0000000 --- a/sdk/go/model_project_config_in.go +++ /dev/null @@ -1,242 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the ProjectConfigIn type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ProjectConfigIn{} - -// ProjectConfigIn struct for ProjectConfigIn -type ProjectConfigIn struct { - AutoCompile *bool `json:"auto_compile,omitempty"` - Engine NullableString `json:"engine,omitempty"` - Entrypoint string `json:"entrypoint"` -} - -type _ProjectConfigIn ProjectConfigIn - -// NewProjectConfigIn instantiates a new ProjectConfigIn object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewProjectConfigIn(entrypoint string) *ProjectConfigIn { - this := ProjectConfigIn{} - var autoCompile bool = false - this.AutoCompile = &autoCompile - this.Entrypoint = entrypoint - return &this -} - -// NewProjectConfigInWithDefaults instantiates a new ProjectConfigIn object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewProjectConfigInWithDefaults() *ProjectConfigIn { - this := ProjectConfigIn{} - var autoCompile bool = false - this.AutoCompile = &autoCompile - return &this -} - -// GetAutoCompile returns the AutoCompile field value if set, zero value otherwise. -func (o *ProjectConfigIn) GetAutoCompile() bool { - if o == nil || IsNil(o.AutoCompile) { - var ret bool - return ret - } - return *o.AutoCompile -} - -// GetAutoCompileOk returns a tuple with the AutoCompile field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ProjectConfigIn) GetAutoCompileOk() (*bool, bool) { - if o == nil || IsNil(o.AutoCompile) { - return nil, false - } - return o.AutoCompile, true -} - -// HasAutoCompile returns a boolean if a field has been set. -func (o *ProjectConfigIn) HasAutoCompile() bool { - if o != nil && !IsNil(o.AutoCompile) { - return true - } - - return false -} - -// SetAutoCompile gets a reference to the given bool and assigns it to the AutoCompile field. -func (o *ProjectConfigIn) SetAutoCompile(v bool) { - o.AutoCompile = &v -} - -// GetEngine returns the Engine field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ProjectConfigIn) GetEngine() string { - if o == nil || IsNil(o.Engine.Get()) { - var ret string - return ret - } - return *o.Engine.Get() -} - -// GetEngineOk returns a tuple with the Engine field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ProjectConfigIn) GetEngineOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Engine.Get(), o.Engine.IsSet() -} - -// HasEngine returns a boolean if a field has been set. -func (o *ProjectConfigIn) HasEngine() bool { - if o != nil && o.Engine.IsSet() { - return true - } - - return false -} - -// SetEngine gets a reference to the given NullableString and assigns it to the Engine field. -func (o *ProjectConfigIn) SetEngine(v string) { - o.Engine.Set(&v) -} -// SetEngineNil sets the value for Engine to be an explicit nil -func (o *ProjectConfigIn) SetEngineNil() { - o.Engine.Set(nil) -} - -// UnsetEngine ensures that no value is present for Engine, not even an explicit nil -func (o *ProjectConfigIn) UnsetEngine() { - o.Engine.Unset() -} - -// GetEntrypoint returns the Entrypoint field value -func (o *ProjectConfigIn) GetEntrypoint() string { - if o == nil { - var ret string - return ret - } - - return o.Entrypoint -} - -// GetEntrypointOk returns a tuple with the Entrypoint field value -// and a boolean to check if the value has been set. -func (o *ProjectConfigIn) GetEntrypointOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Entrypoint, true -} - -// SetEntrypoint sets field value -func (o *ProjectConfigIn) SetEntrypoint(v string) { - o.Entrypoint = v -} - -func (o ProjectConfigIn) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ProjectConfigIn) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.AutoCompile) { - toSerialize["auto_compile"] = o.AutoCompile - } - if o.Engine.IsSet() { - toSerialize["engine"] = o.Engine.Get() - } - toSerialize["entrypoint"] = o.Entrypoint - return toSerialize, nil -} - -func (o *ProjectConfigIn) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "entrypoint", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varProjectConfigIn := _ProjectConfigIn{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varProjectConfigIn) - - if err != nil { - return err - } - - *o = ProjectConfigIn(varProjectConfigIn) - - return err -} - -type NullableProjectConfigIn struct { - value *ProjectConfigIn - isSet bool -} - -func (v NullableProjectConfigIn) Get() *ProjectConfigIn { - return v.value -} - -func (v *NullableProjectConfigIn) Set(val *ProjectConfigIn) { - v.value = val - v.isSet = true -} - -func (v NullableProjectConfigIn) IsSet() bool { - return v.isSet -} - -func (v *NullableProjectConfigIn) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableProjectConfigIn(val *ProjectConfigIn) *NullableProjectConfigIn { - return &NullableProjectConfigIn{value: val, isSet: true} -} - -func (v NullableProjectConfigIn) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableProjectConfigIn) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_protected_resource_metadata_out.go b/sdk/go/model_protected_resource_metadata_out.go deleted file mode 100644 index 60d6be7..0000000 --- a/sdk/go/model_protected_resource_metadata_out.go +++ /dev/null @@ -1,253 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "fmt" -) - -// checks if the ProtectedResourceMetadataOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ProtectedResourceMetadataOut{} - -// ProtectedResourceMetadataOut struct for ProtectedResourceMetadataOut -type ProtectedResourceMetadataOut struct { - AuthorizationServers []string `json:"authorization_servers"` - BearerMethodsSupported []string `json:"bearer_methods_supported"` - Resource string `json:"resource"` - ScopesSupported []string `json:"scopes_supported"` - AdditionalProperties map[string]interface{} -} - -type _ProtectedResourceMetadataOut ProtectedResourceMetadataOut - -// NewProtectedResourceMetadataOut instantiates a new ProtectedResourceMetadataOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewProtectedResourceMetadataOut(authorizationServers []string, bearerMethodsSupported []string, resource string, scopesSupported []string) *ProtectedResourceMetadataOut { - this := ProtectedResourceMetadataOut{} - this.AuthorizationServers = authorizationServers - this.BearerMethodsSupported = bearerMethodsSupported - this.Resource = resource - this.ScopesSupported = scopesSupported - return &this -} - -// NewProtectedResourceMetadataOutWithDefaults instantiates a new ProtectedResourceMetadataOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewProtectedResourceMetadataOutWithDefaults() *ProtectedResourceMetadataOut { - this := ProtectedResourceMetadataOut{} - return &this -} - -// GetAuthorizationServers returns the AuthorizationServers field value -func (o *ProtectedResourceMetadataOut) GetAuthorizationServers() []string { - if o == nil { - var ret []string - return ret - } - - return o.AuthorizationServers -} - -// GetAuthorizationServersOk returns a tuple with the AuthorizationServers field value -// and a boolean to check if the value has been set. -func (o *ProtectedResourceMetadataOut) GetAuthorizationServersOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.AuthorizationServers, true -} - -// SetAuthorizationServers sets field value -func (o *ProtectedResourceMetadataOut) SetAuthorizationServers(v []string) { - o.AuthorizationServers = v -} - -// GetBearerMethodsSupported returns the BearerMethodsSupported field value -func (o *ProtectedResourceMetadataOut) GetBearerMethodsSupported() []string { - if o == nil { - var ret []string - return ret - } - - return o.BearerMethodsSupported -} - -// GetBearerMethodsSupportedOk returns a tuple with the BearerMethodsSupported field value -// and a boolean to check if the value has been set. -func (o *ProtectedResourceMetadataOut) GetBearerMethodsSupportedOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.BearerMethodsSupported, true -} - -// SetBearerMethodsSupported sets field value -func (o *ProtectedResourceMetadataOut) SetBearerMethodsSupported(v []string) { - o.BearerMethodsSupported = v -} - -// GetResource returns the Resource field value -func (o *ProtectedResourceMetadataOut) GetResource() string { - if o == nil { - var ret string - return ret - } - - return o.Resource -} - -// GetResourceOk returns a tuple with the Resource field value -// and a boolean to check if the value has been set. -func (o *ProtectedResourceMetadataOut) GetResourceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Resource, true -} - -// SetResource sets field value -func (o *ProtectedResourceMetadataOut) SetResource(v string) { - o.Resource = v -} - -// GetScopesSupported returns the ScopesSupported field value -func (o *ProtectedResourceMetadataOut) GetScopesSupported() []string { - if o == nil { - var ret []string - return ret - } - - return o.ScopesSupported -} - -// GetScopesSupportedOk returns a tuple with the ScopesSupported field value -// and a boolean to check if the value has been set. -func (o *ProtectedResourceMetadataOut) GetScopesSupportedOk() ([]string, bool) { - if o == nil { - return nil, false - } - return o.ScopesSupported, true -} - -// SetScopesSupported sets field value -func (o *ProtectedResourceMetadataOut) SetScopesSupported(v []string) { - o.ScopesSupported = v -} - -func (o ProtectedResourceMetadataOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ProtectedResourceMetadataOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["authorization_servers"] = o.AuthorizationServers - toSerialize["bearer_methods_supported"] = o.BearerMethodsSupported - toSerialize["resource"] = o.Resource - toSerialize["scopes_supported"] = o.ScopesSupported - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *ProtectedResourceMetadataOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "authorization_servers", - "bearer_methods_supported", - "resource", - "scopes_supported", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varProtectedResourceMetadataOut := _ProtectedResourceMetadataOut{} - - err = json.Unmarshal(data, &varProtectedResourceMetadataOut) - - if err != nil { - return err - } - - *o = ProtectedResourceMetadataOut(varProtectedResourceMetadataOut) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "authorization_servers") - delete(additionalProperties, "bearer_methods_supported") - delete(additionalProperties, "resource") - delete(additionalProperties, "scopes_supported") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableProtectedResourceMetadataOut struct { - value *ProtectedResourceMetadataOut - isSet bool -} - -func (v NullableProtectedResourceMetadataOut) Get() *ProtectedResourceMetadataOut { - return v.value -} - -func (v *NullableProtectedResourceMetadataOut) Set(val *ProtectedResourceMetadataOut) { - v.value = val - v.isSet = true -} - -func (v NullableProtectedResourceMetadataOut) IsSet() bool { - return v.isSet -} - -func (v *NullableProtectedResourceMetadataOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableProtectedResourceMetadataOut(val *ProtectedResourceMetadataOut) *NullableProtectedResourceMetadataOut { - return &NullableProtectedResourceMetadataOut{value: val, isSet: true} -} - -func (v NullableProtectedResourceMetadataOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableProtectedResourceMetadataOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_query_column_out.go b/sdk/go/model_query_column_out.go deleted file mode 100644 index bd80c85..0000000 --- a/sdk/go/model_query_column_out.go +++ /dev/null @@ -1,213 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "fmt" -) - -// checks if the QueryColumnOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &QueryColumnOut{} - -// QueryColumnOut struct for QueryColumnOut -type QueryColumnOut struct { - Name string `json:"name"` - Type NullableString `json:"type,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _QueryColumnOut QueryColumnOut - -// NewQueryColumnOut instantiates a new QueryColumnOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewQueryColumnOut(name string) *QueryColumnOut { - this := QueryColumnOut{} - this.Name = name - return &this -} - -// NewQueryColumnOutWithDefaults instantiates a new QueryColumnOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewQueryColumnOutWithDefaults() *QueryColumnOut { - this := QueryColumnOut{} - return &this -} - -// GetName returns the Name field value -func (o *QueryColumnOut) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *QueryColumnOut) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *QueryColumnOut) SetName(v string) { - o.Name = v -} - -// GetType returns the Type field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *QueryColumnOut) GetType() string { - if o == nil || IsNil(o.Type.Get()) { - var ret string - return ret - } - return *o.Type.Get() -} - -// GetTypeOk returns a tuple with the Type field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *QueryColumnOut) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Type.Get(), o.Type.IsSet() -} - -// HasType returns a boolean if a field has been set. -func (o *QueryColumnOut) HasType() bool { - if o != nil && o.Type.IsSet() { - return true - } - - return false -} - -// SetType gets a reference to the given NullableString and assigns it to the Type field. -func (o *QueryColumnOut) SetType(v string) { - o.Type.Set(&v) -} -// SetTypeNil sets the value for Type to be an explicit nil -func (o *QueryColumnOut) SetTypeNil() { - o.Type.Set(nil) -} - -// UnsetType ensures that no value is present for Type, not even an explicit nil -func (o *QueryColumnOut) UnsetType() { - o.Type.Unset() -} - -func (o QueryColumnOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o QueryColumnOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["name"] = o.Name - if o.Type.IsSet() { - toSerialize["type"] = o.Type.Get() - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *QueryColumnOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "name", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varQueryColumnOut := _QueryColumnOut{} - - err = json.Unmarshal(data, &varQueryColumnOut) - - if err != nil { - return err - } - - *o = QueryColumnOut(varQueryColumnOut) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "name") - delete(additionalProperties, "type") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableQueryColumnOut struct { - value *QueryColumnOut - isSet bool -} - -func (v NullableQueryColumnOut) Get() *QueryColumnOut { - return v.value -} - -func (v *NullableQueryColumnOut) Set(val *QueryColumnOut) { - v.value = val - v.isSet = true -} - -func (v NullableQueryColumnOut) IsSet() bool { - return v.isSet -} - -func (v *NullableQueryColumnOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableQueryColumnOut(val *QueryColumnOut) *NullableQueryColumnOut { - return &NullableQueryColumnOut{value: val, isSet: true} -} - -func (v NullableQueryColumnOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableQueryColumnOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_query_dry_run_out.go b/sdk/go/model_query_dry_run_out.go deleted file mode 100644 index 0544e6d..0000000 --- a/sdk/go/model_query_dry_run_out.go +++ /dev/null @@ -1,282 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "fmt" -) - -// checks if the QueryDryRunOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &QueryDryRunOut{} - -// QueryDryRunOut struct for QueryDryRunOut -type QueryDryRunOut struct { - DryRun bool `json:"dry_run"` - Engine string `json:"engine"` - EstimatedBytesProcessed int32 `json:"estimated_bytes_processed"` - ResultSchema []QueryColumnOut `json:"result_schema"` - Valid bool `json:"valid"` - AdditionalProperties map[string]interface{} -} - -type _QueryDryRunOut QueryDryRunOut - -// NewQueryDryRunOut instantiates a new QueryDryRunOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewQueryDryRunOut(dryRun bool, engine string, estimatedBytesProcessed int32, resultSchema []QueryColumnOut, valid bool) *QueryDryRunOut { - this := QueryDryRunOut{} - this.DryRun = dryRun - this.Engine = engine - this.EstimatedBytesProcessed = estimatedBytesProcessed - this.ResultSchema = resultSchema - this.Valid = valid - return &this -} - -// NewQueryDryRunOutWithDefaults instantiates a new QueryDryRunOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewQueryDryRunOutWithDefaults() *QueryDryRunOut { - this := QueryDryRunOut{} - return &this -} - -// GetDryRun returns the DryRun field value -func (o *QueryDryRunOut) GetDryRun() bool { - if o == nil { - var ret bool - return ret - } - - return o.DryRun -} - -// GetDryRunOk returns a tuple with the DryRun field value -// and a boolean to check if the value has been set. -func (o *QueryDryRunOut) GetDryRunOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.DryRun, true -} - -// SetDryRun sets field value -func (o *QueryDryRunOut) SetDryRun(v bool) { - o.DryRun = v -} - -// GetEngine returns the Engine field value -func (o *QueryDryRunOut) GetEngine() string { - if o == nil { - var ret string - return ret - } - - return o.Engine -} - -// GetEngineOk returns a tuple with the Engine field value -// and a boolean to check if the value has been set. -func (o *QueryDryRunOut) GetEngineOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Engine, true -} - -// SetEngine sets field value -func (o *QueryDryRunOut) SetEngine(v string) { - o.Engine = v -} - -// GetEstimatedBytesProcessed returns the EstimatedBytesProcessed field value -func (o *QueryDryRunOut) GetEstimatedBytesProcessed() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.EstimatedBytesProcessed -} - -// GetEstimatedBytesProcessedOk returns a tuple with the EstimatedBytesProcessed field value -// and a boolean to check if the value has been set. -func (o *QueryDryRunOut) GetEstimatedBytesProcessedOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.EstimatedBytesProcessed, true -} - -// SetEstimatedBytesProcessed sets field value -func (o *QueryDryRunOut) SetEstimatedBytesProcessed(v int32) { - o.EstimatedBytesProcessed = v -} - -// GetResultSchema returns the ResultSchema field value -func (o *QueryDryRunOut) GetResultSchema() []QueryColumnOut { - if o == nil { - var ret []QueryColumnOut - return ret - } - - return o.ResultSchema -} - -// GetResultSchemaOk returns a tuple with the ResultSchema field value -// and a boolean to check if the value has been set. -func (o *QueryDryRunOut) GetResultSchemaOk() ([]QueryColumnOut, bool) { - if o == nil { - return nil, false - } - return o.ResultSchema, true -} - -// SetResultSchema sets field value -func (o *QueryDryRunOut) SetResultSchema(v []QueryColumnOut) { - o.ResultSchema = v -} - -// GetValid returns the Valid field value -func (o *QueryDryRunOut) GetValid() bool { - if o == nil { - var ret bool - return ret - } - - return o.Valid -} - -// GetValidOk returns a tuple with the Valid field value -// and a boolean to check if the value has been set. -func (o *QueryDryRunOut) GetValidOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Valid, true -} - -// SetValid sets field value -func (o *QueryDryRunOut) SetValid(v bool) { - o.Valid = v -} - -func (o QueryDryRunOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o QueryDryRunOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["dry_run"] = o.DryRun - toSerialize["engine"] = o.Engine - toSerialize["estimated_bytes_processed"] = o.EstimatedBytesProcessed - toSerialize["result_schema"] = o.ResultSchema - toSerialize["valid"] = o.Valid - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *QueryDryRunOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "dry_run", - "engine", - "estimated_bytes_processed", - "result_schema", - "valid", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varQueryDryRunOut := _QueryDryRunOut{} - - err = json.Unmarshal(data, &varQueryDryRunOut) - - if err != nil { - return err - } - - *o = QueryDryRunOut(varQueryDryRunOut) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "dry_run") - delete(additionalProperties, "engine") - delete(additionalProperties, "estimated_bytes_processed") - delete(additionalProperties, "result_schema") - delete(additionalProperties, "valid") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableQueryDryRunOut struct { - value *QueryDryRunOut - isSet bool -} - -func (v NullableQueryDryRunOut) Get() *QueryDryRunOut { - return v.value -} - -func (v *NullableQueryDryRunOut) Set(val *QueryDryRunOut) { - v.value = val - v.isSet = true -} - -func (v NullableQueryDryRunOut) IsSet() bool { - return v.isSet -} - -func (v *NullableQueryDryRunOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableQueryDryRunOut(val *QueryDryRunOut) *NullableQueryDryRunOut { - return &NullableQueryDryRunOut{value: val, isSet: true} -} - -func (v NullableQueryDryRunOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableQueryDryRunOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_query_in.go b/sdk/go/model_query_in.go deleted file mode 100644 index 1d22cf1..0000000 --- a/sdk/go/model_query_in.go +++ /dev/null @@ -1,232 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the QueryIn type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &QueryIn{} - -// QueryIn struct for QueryIn -type QueryIn struct { - DryRun *bool `json:"dry_run,omitempty"` - Inputs map[string]string `json:"inputs,omitempty"` - Sql string `json:"sql"` -} - -type _QueryIn QueryIn - -// NewQueryIn instantiates a new QueryIn object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewQueryIn(sql string) *QueryIn { - this := QueryIn{} - var dryRun bool = false - this.DryRun = &dryRun - this.Sql = sql - return &this -} - -// NewQueryInWithDefaults instantiates a new QueryIn object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewQueryInWithDefaults() *QueryIn { - this := QueryIn{} - var dryRun bool = false - this.DryRun = &dryRun - return &this -} - -// GetDryRun returns the DryRun field value if set, zero value otherwise. -func (o *QueryIn) GetDryRun() bool { - if o == nil || IsNil(o.DryRun) { - var ret bool - return ret - } - return *o.DryRun -} - -// GetDryRunOk returns a tuple with the DryRun field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *QueryIn) GetDryRunOk() (*bool, bool) { - if o == nil || IsNil(o.DryRun) { - return nil, false - } - return o.DryRun, true -} - -// HasDryRun returns a boolean if a field has been set. -func (o *QueryIn) HasDryRun() bool { - if o != nil && !IsNil(o.DryRun) { - return true - } - - return false -} - -// SetDryRun gets a reference to the given bool and assigns it to the DryRun field. -func (o *QueryIn) SetDryRun(v bool) { - o.DryRun = &v -} - -// GetInputs returns the Inputs field value if set, zero value otherwise. -func (o *QueryIn) GetInputs() map[string]string { - if o == nil || IsNil(o.Inputs) { - var ret map[string]string - return ret - } - return o.Inputs -} - -// GetInputsOk returns a tuple with the Inputs field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *QueryIn) GetInputsOk() (map[string]string, bool) { - if o == nil || IsNil(o.Inputs) { - return map[string]string{}, false - } - return o.Inputs, true -} - -// HasInputs returns a boolean if a field has been set. -func (o *QueryIn) HasInputs() bool { - if o != nil && !IsNil(o.Inputs) { - return true - } - - return false -} - -// SetInputs gets a reference to the given map[string]string and assigns it to the Inputs field. -func (o *QueryIn) SetInputs(v map[string]string) { - o.Inputs = v -} - -// GetSql returns the Sql field value -func (o *QueryIn) GetSql() string { - if o == nil { - var ret string - return ret - } - - return o.Sql -} - -// GetSqlOk returns a tuple with the Sql field value -// and a boolean to check if the value has been set. -func (o *QueryIn) GetSqlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Sql, true -} - -// SetSql sets field value -func (o *QueryIn) SetSql(v string) { - o.Sql = v -} - -func (o QueryIn) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o QueryIn) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.DryRun) { - toSerialize["dry_run"] = o.DryRun - } - if !IsNil(o.Inputs) { - toSerialize["inputs"] = o.Inputs - } - toSerialize["sql"] = o.Sql - return toSerialize, nil -} - -func (o *QueryIn) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "sql", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varQueryIn := _QueryIn{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varQueryIn) - - if err != nil { - return err - } - - *o = QueryIn(varQueryIn) - - return err -} - -type NullableQueryIn struct { - value *QueryIn - isSet bool -} - -func (v NullableQueryIn) Get() *QueryIn { - return v.value -} - -func (v *NullableQueryIn) Set(val *QueryIn) { - v.value = val - v.isSet = true -} - -func (v NullableQueryIn) IsSet() bool { - return v.isSet -} - -func (v *NullableQueryIn) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableQueryIn(val *QueryIn) *NullableQueryIn { - return &NullableQueryIn{value: val, isSet: true} -} - -func (v NullableQueryIn) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableQueryIn) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_query_result_out.go b/sdk/go/model_query_result_out.go deleted file mode 100644 index c2403b5..0000000 --- a/sdk/go/model_query_result_out.go +++ /dev/null @@ -1,340 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "fmt" -) - -// checks if the QueryResultOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &QueryResultOut{} - -// QueryResultOut struct for QueryResultOut -type QueryResultOut struct { - BytesProcessed int32 `json:"bytes_processed"` - CacheHit bool `json:"cache_hit"` - Engine string `json:"engine"` - Preview []*map[string]interface{} `json:"preview"` - ResultArtId string `json:"result_art_id"` - ResultSchema []QueryColumnOut `json:"result_schema"` - RowCount int32 `json:"row_count"` - AdditionalProperties map[string]interface{} -} - -type _QueryResultOut QueryResultOut - -// NewQueryResultOut instantiates a new QueryResultOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewQueryResultOut(bytesProcessed int32, cacheHit bool, engine string, preview []*map[string]interface{}, resultArtId string, resultSchema []QueryColumnOut, rowCount int32) *QueryResultOut { - this := QueryResultOut{} - this.BytesProcessed = bytesProcessed - this.CacheHit = cacheHit - this.Engine = engine - this.Preview = preview - this.ResultArtId = resultArtId - this.ResultSchema = resultSchema - this.RowCount = rowCount - return &this -} - -// NewQueryResultOutWithDefaults instantiates a new QueryResultOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewQueryResultOutWithDefaults() *QueryResultOut { - this := QueryResultOut{} - return &this -} - -// GetBytesProcessed returns the BytesProcessed field value -func (o *QueryResultOut) GetBytesProcessed() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.BytesProcessed -} - -// GetBytesProcessedOk returns a tuple with the BytesProcessed field value -// and a boolean to check if the value has been set. -func (o *QueryResultOut) GetBytesProcessedOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.BytesProcessed, true -} - -// SetBytesProcessed sets field value -func (o *QueryResultOut) SetBytesProcessed(v int32) { - o.BytesProcessed = v -} - -// GetCacheHit returns the CacheHit field value -func (o *QueryResultOut) GetCacheHit() bool { - if o == nil { - var ret bool - return ret - } - - return o.CacheHit -} - -// GetCacheHitOk returns a tuple with the CacheHit field value -// and a boolean to check if the value has been set. -func (o *QueryResultOut) GetCacheHitOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.CacheHit, true -} - -// SetCacheHit sets field value -func (o *QueryResultOut) SetCacheHit(v bool) { - o.CacheHit = v -} - -// GetEngine returns the Engine field value -func (o *QueryResultOut) GetEngine() string { - if o == nil { - var ret string - return ret - } - - return o.Engine -} - -// GetEngineOk returns a tuple with the Engine field value -// and a boolean to check if the value has been set. -func (o *QueryResultOut) GetEngineOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Engine, true -} - -// SetEngine sets field value -func (o *QueryResultOut) SetEngine(v string) { - o.Engine = v -} - -// GetPreview returns the Preview field value -func (o *QueryResultOut) GetPreview() []*map[string]interface{} { - if o == nil { - var ret []*map[string]interface{} - return ret - } - - return o.Preview -} - -// GetPreviewOk returns a tuple with the Preview field value -// and a boolean to check if the value has been set. -func (o *QueryResultOut) GetPreviewOk() ([]*map[string]interface{}, bool) { - if o == nil { - return nil, false - } - return o.Preview, true -} - -// SetPreview sets field value -func (o *QueryResultOut) SetPreview(v []*map[string]interface{}) { - o.Preview = v -} - -// GetResultArtId returns the ResultArtId field value -func (o *QueryResultOut) GetResultArtId() string { - if o == nil { - var ret string - return ret - } - - return o.ResultArtId -} - -// GetResultArtIdOk returns a tuple with the ResultArtId field value -// and a boolean to check if the value has been set. -func (o *QueryResultOut) GetResultArtIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ResultArtId, true -} - -// SetResultArtId sets field value -func (o *QueryResultOut) SetResultArtId(v string) { - o.ResultArtId = v -} - -// GetResultSchema returns the ResultSchema field value -func (o *QueryResultOut) GetResultSchema() []QueryColumnOut { - if o == nil { - var ret []QueryColumnOut - return ret - } - - return o.ResultSchema -} - -// GetResultSchemaOk returns a tuple with the ResultSchema field value -// and a boolean to check if the value has been set. -func (o *QueryResultOut) GetResultSchemaOk() ([]QueryColumnOut, bool) { - if o == nil { - return nil, false - } - return o.ResultSchema, true -} - -// SetResultSchema sets field value -func (o *QueryResultOut) SetResultSchema(v []QueryColumnOut) { - o.ResultSchema = v -} - -// GetRowCount returns the RowCount field value -func (o *QueryResultOut) GetRowCount() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.RowCount -} - -// GetRowCountOk returns a tuple with the RowCount field value -// and a boolean to check if the value has been set. -func (o *QueryResultOut) GetRowCountOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.RowCount, true -} - -// SetRowCount sets field value -func (o *QueryResultOut) SetRowCount(v int32) { - o.RowCount = v -} - -func (o QueryResultOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o QueryResultOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["bytes_processed"] = o.BytesProcessed - toSerialize["cache_hit"] = o.CacheHit - toSerialize["engine"] = o.Engine - toSerialize["preview"] = o.Preview - toSerialize["result_art_id"] = o.ResultArtId - toSerialize["result_schema"] = o.ResultSchema - toSerialize["row_count"] = o.RowCount - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *QueryResultOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "bytes_processed", - "cache_hit", - "engine", - "preview", - "result_art_id", - "result_schema", - "row_count", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varQueryResultOut := _QueryResultOut{} - - err = json.Unmarshal(data, &varQueryResultOut) - - if err != nil { - return err - } - - *o = QueryResultOut(varQueryResultOut) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "bytes_processed") - delete(additionalProperties, "cache_hit") - delete(additionalProperties, "engine") - delete(additionalProperties, "preview") - delete(additionalProperties, "result_art_id") - delete(additionalProperties, "result_schema") - delete(additionalProperties, "row_count") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableQueryResultOut struct { - value *QueryResultOut - isSet bool -} - -func (v NullableQueryResultOut) Get() *QueryResultOut { - return v.value -} - -func (v *NullableQueryResultOut) Set(val *QueryResultOut) { - v.value = val - v.isSet = true -} - -func (v NullableQueryResultOut) IsSet() bool { - return v.isSet -} - -func (v *NullableQueryResultOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableQueryResultOut(val *QueryResultOut) *NullableQueryResultOut { - return &NullableQueryResultOut{value: val, isSet: true} -} - -func (v NullableQueryResultOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableQueryResultOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_register_agent_identity_agent_identity_post_422_response.go b/sdk/go/model_register_agent_identity_agent_identity_post_422_response.go deleted file mode 100644 index e9a1755..0000000 --- a/sdk/go/model_register_agent_identity_agent_identity_post_422_response.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "fmt" - "gopkg.in/validator.v2" -) - -// RegisterAgentIdentityAgentIdentityPost422Response - struct for RegisterAgentIdentityAgentIdentityPost422Response -type RegisterAgentIdentityAgentIdentityPost422Response struct { - ErrorResponse *ErrorResponse - ValidationErrorResponse *ValidationErrorResponse -} - -// ErrorResponseAsRegisterAgentIdentityAgentIdentityPost422Response is a convenience function that returns ErrorResponse wrapped in RegisterAgentIdentityAgentIdentityPost422Response -func ErrorResponseAsRegisterAgentIdentityAgentIdentityPost422Response(v *ErrorResponse) RegisterAgentIdentityAgentIdentityPost422Response { - return RegisterAgentIdentityAgentIdentityPost422Response{ - ErrorResponse: v, - } -} - -// ValidationErrorResponseAsRegisterAgentIdentityAgentIdentityPost422Response is a convenience function that returns ValidationErrorResponse wrapped in RegisterAgentIdentityAgentIdentityPost422Response -func ValidationErrorResponseAsRegisterAgentIdentityAgentIdentityPost422Response(v *ValidationErrorResponse) RegisterAgentIdentityAgentIdentityPost422Response { - return RegisterAgentIdentityAgentIdentityPost422Response{ - ValidationErrorResponse: v, - } -} - - -// Unmarshal JSON data into one of the pointers in the struct -func (dst *RegisterAgentIdentityAgentIdentityPost422Response) UnmarshalJSON(data []byte) error { - var err error - match := 0 - // try to unmarshal data into ErrorResponse - err = newStrictDecoder(data).Decode(&dst.ErrorResponse) - if err == nil { - jsonErrorResponse, _ := json.Marshal(dst.ErrorResponse) - if string(jsonErrorResponse) == "{}" { // empty struct - dst.ErrorResponse = nil - } else { - if err = validator.Validate(dst.ErrorResponse); err != nil { - dst.ErrorResponse = nil - } else { - match++ - } - } - } else { - dst.ErrorResponse = nil - } - - // try to unmarshal data into ValidationErrorResponse - err = newStrictDecoder(data).Decode(&dst.ValidationErrorResponse) - if err == nil { - jsonValidationErrorResponse, _ := json.Marshal(dst.ValidationErrorResponse) - if string(jsonValidationErrorResponse) == "{}" { // empty struct - dst.ValidationErrorResponse = nil - } else { - if err = validator.Validate(dst.ValidationErrorResponse); err != nil { - dst.ValidationErrorResponse = nil - } else { - match++ - } - } - } else { - dst.ValidationErrorResponse = nil - } - - if match > 1 { // more than 1 match - // reset to nil - dst.ErrorResponse = nil - dst.ValidationErrorResponse = nil - - return fmt.Errorf("data matches more than one schema in oneOf(RegisterAgentIdentityAgentIdentityPost422Response)") - } else if match == 1 { - return nil // exactly one match - } else { // no match - if err != nil { - return fmt.Errorf("data failed to match schemas in oneOf(RegisterAgentIdentityAgentIdentityPost422Response): %v", err) - } else { - return fmt.Errorf("data failed to match schemas in oneOf(RegisterAgentIdentityAgentIdentityPost422Response)") - } - if err != nil { - return fmt.Errorf("data failed to match schemas in oneOf(RegisterAgentIdentityAgentIdentityPost422Response): %v", err) - } else { - return fmt.Errorf("data failed to match schemas in oneOf(RegisterAgentIdentityAgentIdentityPost422Response)") - } - } -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src RegisterAgentIdentityAgentIdentityPost422Response) MarshalJSON() ([]byte, error) { - if src.ErrorResponse != nil { - return json.Marshal(&src.ErrorResponse) - } - - if src.ValidationErrorResponse != nil { - return json.Marshal(&src.ValidationErrorResponse) - } - - return nil, nil // no data in oneOf schemas -} - -// Get the actual instance -func (obj *RegisterAgentIdentityAgentIdentityPost422Response) GetActualInstance() (interface{}) { - if obj == nil { - return nil - } - if obj.ErrorResponse != nil { - return obj.ErrorResponse - } - - if obj.ValidationErrorResponse != nil { - return obj.ValidationErrorResponse - } - - // all schemas are nil - return nil -} - -// Get the actual instance value -func (obj RegisterAgentIdentityAgentIdentityPost422Response) GetActualInstanceValue() (interface{}) { - if obj.ErrorResponse != nil { - return *obj.ErrorResponse - } - - if obj.ValidationErrorResponse != nil { - return *obj.ValidationErrorResponse - } - - // all schemas are nil - return nil -} - -type NullableRegisterAgentIdentityAgentIdentityPost422Response struct { - value *RegisterAgentIdentityAgentIdentityPost422Response - isSet bool -} - -func (v NullableRegisterAgentIdentityAgentIdentityPost422Response) Get() *RegisterAgentIdentityAgentIdentityPost422Response { - return v.value -} - -func (v *NullableRegisterAgentIdentityAgentIdentityPost422Response) Set(val *RegisterAgentIdentityAgentIdentityPost422Response) { - v.value = val - v.isSet = true -} - -func (v NullableRegisterAgentIdentityAgentIdentityPost422Response) IsSet() bool { - return v.isSet -} - -func (v *NullableRegisterAgentIdentityAgentIdentityPost422Response) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRegisterAgentIdentityAgentIdentityPost422Response(val *RegisterAgentIdentityAgentIdentityPost422Response) *NullableRegisterAgentIdentityAgentIdentityPost422Response { - return &NullableRegisterAgentIdentityAgentIdentityPost422Response{value: val, isSet: true} -} - -func (v NullableRegisterAgentIdentityAgentIdentityPost422Response) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRegisterAgentIdentityAgentIdentityPost422Response) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_response_post_query_v0_query_post.go b/sdk/go/model_response_post_query_v0_query_post.go deleted file mode 100644 index 5474f67..0000000 --- a/sdk/go/model_response_post_query_v0_query_post.go +++ /dev/null @@ -1,105 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "fmt" -) - - -// ResponsePostQueryV0QueryPost struct for ResponsePostQueryV0QueryPost -type ResponsePostQueryV0QueryPost struct { - QueryDryRunOut *QueryDryRunOut - QueryResultOut *QueryResultOut -} - -// Unmarshal JSON data into any of the pointers in the struct -func (dst *ResponsePostQueryV0QueryPost) UnmarshalJSON(data []byte) error { - var err error - // try to unmarshal JSON data into QueryDryRunOut - err = json.Unmarshal(data, &dst.QueryDryRunOut); - if err == nil { - jsonQueryDryRunOut, _ := json.Marshal(dst.QueryDryRunOut) - if string(jsonQueryDryRunOut) == "{}" { // empty struct - dst.QueryDryRunOut = nil - } else { - return nil // data stored in dst.QueryDryRunOut, return on the first match - } - } else { - dst.QueryDryRunOut = nil - } - - // try to unmarshal JSON data into QueryResultOut - err = json.Unmarshal(data, &dst.QueryResultOut); - if err == nil { - jsonQueryResultOut, _ := json.Marshal(dst.QueryResultOut) - if string(jsonQueryResultOut) == "{}" { // empty struct - dst.QueryResultOut = nil - } else { - return nil // data stored in dst.QueryResultOut, return on the first match - } - } else { - dst.QueryResultOut = nil - } - - return fmt.Errorf("data failed to match schemas in anyOf(ResponsePostQueryV0QueryPost)") -} - -// Marshal data from the first non-nil pointers in the struct to JSON -func (src ResponsePostQueryV0QueryPost) MarshalJSON() ([]byte, error) { - if src.QueryDryRunOut != nil { - return json.Marshal(&src.QueryDryRunOut) - } - - if src.QueryResultOut != nil { - return json.Marshal(&src.QueryResultOut) - } - - return nil, nil // no data in anyOf schemas -} - - -type NullableResponsePostQueryV0QueryPost struct { - value *ResponsePostQueryV0QueryPost - isSet bool -} - -func (v NullableResponsePostQueryV0QueryPost) Get() *ResponsePostQueryV0QueryPost { - return v.value -} - -func (v *NullableResponsePostQueryV0QueryPost) Set(val *ResponsePostQueryV0QueryPost) { - v.value = val - v.isSet = true -} - -func (v NullableResponsePostQueryV0QueryPost) IsSet() bool { - return v.isSet -} - -func (v *NullableResponsePostQueryV0QueryPost) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableResponsePostQueryV0QueryPost(val *ResponsePostQueryV0QueryPost) *NullableResponsePostQueryV0QueryPost { - return &NullableResponsePostQueryV0QueryPost{value: val, isSet: true} -} - -func (v NullableResponsePostQueryV0QueryPost) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableResponsePostQueryV0QueryPost) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_revoke_out.go b/sdk/go/model_revoke_out.go deleted file mode 100644 index 4b0a6ea..0000000 --- a/sdk/go/model_revoke_out.go +++ /dev/null @@ -1,224 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the RevokeOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &RevokeOut{} - -// RevokeOut DELETE /v0/grants/{grn_id}, DELETE /v0/shares/{shr_id}, DELETE /v0/invitations/{invitation_id} response — the unified revoke receipt. `revoked` is a COUNT: 1 when a live row was revoked, 0 when it was already gone (DELETE is idempotent). -type RevokeOut struct { - Id string `json:"id"` - Ok *bool `json:"ok,omitempty"` - Revoked int32 `json:"revoked"` -} - -type _RevokeOut RevokeOut - -// NewRevokeOut instantiates a new RevokeOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewRevokeOut(id string, revoked int32) *RevokeOut { - this := RevokeOut{} - this.Id = id - var ok bool = true - this.Ok = &ok - this.Revoked = revoked - return &this -} - -// NewRevokeOutWithDefaults instantiates a new RevokeOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewRevokeOutWithDefaults() *RevokeOut { - this := RevokeOut{} - var ok bool = true - this.Ok = &ok - return &this -} - -// GetId returns the Id field value -func (o *RevokeOut) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *RevokeOut) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *RevokeOut) SetId(v string) { - o.Id = v -} - -// GetOk returns the Ok field value if set, zero value otherwise. -func (o *RevokeOut) GetOk() bool { - if o == nil || IsNil(o.Ok) { - var ret bool - return ret - } - return *o.Ok -} - -// GetOkOk returns a tuple with the Ok field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *RevokeOut) GetOkOk() (*bool, bool) { - if o == nil || IsNil(o.Ok) { - return nil, false - } - return o.Ok, true -} - -// HasOk returns a boolean if a field has been set. -func (o *RevokeOut) HasOk() bool { - if o != nil && !IsNil(o.Ok) { - return true - } - - return false -} - -// SetOk gets a reference to the given bool and assigns it to the Ok field. -func (o *RevokeOut) SetOk(v bool) { - o.Ok = &v -} - -// GetRevoked returns the Revoked field value -func (o *RevokeOut) GetRevoked() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Revoked -} - -// GetRevokedOk returns a tuple with the Revoked field value -// and a boolean to check if the value has been set. -func (o *RevokeOut) GetRevokedOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Revoked, true -} - -// SetRevoked sets field value -func (o *RevokeOut) SetRevoked(v int32) { - o.Revoked = v -} - -func (o RevokeOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o RevokeOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["id"] = o.Id - if !IsNil(o.Ok) { - toSerialize["ok"] = o.Ok - } - toSerialize["revoked"] = o.Revoked - return toSerialize, nil -} - -func (o *RevokeOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "id", - "revoked", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varRevokeOut := _RevokeOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varRevokeOut) - - if err != nil { - return err - } - - *o = RevokeOut(varRevokeOut) - - return err -} - -type NullableRevokeOut struct { - value *RevokeOut - isSet bool -} - -func (v NullableRevokeOut) Get() *RevokeOut { - return v.value -} - -func (v *NullableRevokeOut) Set(val *RevokeOut) { - v.value = val - v.isSet = true -} - -func (v NullableRevokeOut) IsSet() bool { - return v.isSet -} - -func (v *NullableRevokeOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableRevokeOut(val *RevokeOut) *NullableRevokeOut { - return &NullableRevokeOut{value: val, isSet: true} -} - -func (v NullableRevokeOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableRevokeOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_search_hit_out.go b/sdk/go/model_search_hit_out.go index 8e39d1c..8a18628 100644 --- a/sdk/go/model_search_hit_out.go +++ b/sdk/go/model_search_hit_out.go @@ -1,7 +1,7 @@ /* AgentDrive -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. API version: */ @@ -22,17 +22,16 @@ var _ MappedNullable = &SearchHitOut{} // SearchHitOut struct for SearchHitOut type SearchHitOut struct { - ArtId string `json:"art_id"` - ContentType string `json:"content_type"` - DriveId string `json:"drive_id"` - FileType string `json:"file_type"` - Labels []string `json:"labels,omitempty"` - Path string `json:"path"` - Score float32 `json:"score"` + ContentType NullableString `json:"content_type"` + DriveId string `json:"drive_id" validate:"regexp=^drv_[a-f0-9]{16}$"` + Id string `json:"id" validate:"regexp=^art_[a-f0-9]{16}$"` + Name string `json:"name"` + ParentId NullableString `json:"parent_id"` + Rank float32 `json:"rank"` + // HTML-safe highlighted excerpt. The ONLY markup it may contain is the server's own ... highlight pair; artifact content is entity-escaped, so this may be rendered as HTML. Snippet string `json:"snippet"` UpdatedAt time.Time `json:"updated_at"` - Url string `json:"url"` - VersionNumber int32 `json:"version_number"` + VersionId NullableString `json:"version_id"` } type _SearchHitOut SearchHitOut @@ -41,18 +40,17 @@ type _SearchHitOut SearchHitOut // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewSearchHitOut(artId string, contentType string, driveId string, fileType string, path string, score float32, snippet string, updatedAt time.Time, url string, versionNumber int32) *SearchHitOut { +func NewSearchHitOut(contentType NullableString, driveId string, id string, name string, parentId NullableString, rank float32, snippet string, updatedAt time.Time, versionId NullableString) *SearchHitOut { this := SearchHitOut{} - this.ArtId = artId this.ContentType = contentType this.DriveId = driveId - this.FileType = fileType - this.Path = path - this.Score = score + this.Id = id + this.Name = name + this.ParentId = parentId + this.Rank = rank this.Snippet = snippet this.UpdatedAt = updatedAt - this.Url = url - this.VersionNumber = versionNumber + this.VersionId = versionId return &this } @@ -64,52 +62,30 @@ func NewSearchHitOutWithDefaults() *SearchHitOut { return &this } -// GetArtId returns the ArtId field value -func (o *SearchHitOut) GetArtId() string { - if o == nil { - var ret string - return ret - } - - return o.ArtId -} - -// GetArtIdOk returns a tuple with the ArtId field value -// and a boolean to check if the value has been set. -func (o *SearchHitOut) GetArtIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ArtId, true -} - -// SetArtId sets field value -func (o *SearchHitOut) SetArtId(v string) { - o.ArtId = v -} - // GetContentType returns the ContentType field value +// If the value is explicit nil, the zero value for string will be returned func (o *SearchHitOut) GetContentType() string { - if o == nil { + if o == nil || o.ContentType.Get() == nil { var ret string return ret } - return o.ContentType + return *o.ContentType.Get() } // GetContentTypeOk returns a tuple with the ContentType field value // and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *SearchHitOut) GetContentTypeOk() (*string, bool) { if o == nil { return nil, false } - return &o.ContentType, true + return o.ContentType.Get(), o.ContentType.IsSet() } // SetContentType sets field value func (o *SearchHitOut) SetContentType(v string) { - o.ContentType = v + o.ContentType.Set(&v) } // GetDriveId returns the DriveId field value @@ -136,108 +112,102 @@ func (o *SearchHitOut) SetDriveId(v string) { o.DriveId = v } -// GetFileType returns the FileType field value -func (o *SearchHitOut) GetFileType() string { +// GetId returns the Id field value +func (o *SearchHitOut) GetId() string { if o == nil { var ret string return ret } - return o.FileType + return o.Id } -// GetFileTypeOk returns a tuple with the FileType field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. -func (o *SearchHitOut) GetFileTypeOk() (*string, bool) { +func (o *SearchHitOut) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return &o.FileType, true + return &o.Id, true } -// SetFileType sets field value -func (o *SearchHitOut) SetFileType(v string) { - o.FileType = v +// SetId sets field value +func (o *SearchHitOut) SetId(v string) { + o.Id = v } -// GetLabels returns the Labels field value if set, zero value otherwise. -func (o *SearchHitOut) GetLabels() []string { - if o == nil || IsNil(o.Labels) { - var ret []string +// GetName returns the Name field value +func (o *SearchHitOut) GetName() string { + if o == nil { + var ret string return ret } - return o.Labels + + return o.Name } -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// GetNameOk returns a tuple with the Name field value // and a boolean to check if the value has been set. -func (o *SearchHitOut) GetLabelsOk() ([]string, bool) { - if o == nil || IsNil(o.Labels) { +func (o *SearchHitOut) GetNameOk() (*string, bool) { + if o == nil { return nil, false } - return o.Labels, true + return &o.Name, true } -// HasLabels returns a boolean if a field has been set. -func (o *SearchHitOut) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given []string and assigns it to the Labels field. -func (o *SearchHitOut) SetLabels(v []string) { - o.Labels = v +// SetName sets field value +func (o *SearchHitOut) SetName(v string) { + o.Name = v } -// GetPath returns the Path field value -func (o *SearchHitOut) GetPath() string { - if o == nil { +// GetParentId returns the ParentId field value +// If the value is explicit nil, the zero value for string will be returned +func (o *SearchHitOut) GetParentId() string { + if o == nil || o.ParentId.Get() == nil { var ret string return ret } - return o.Path + return *o.ParentId.Get() } -// GetPathOk returns a tuple with the Path field value +// GetParentIdOk returns a tuple with the ParentId field value // and a boolean to check if the value has been set. -func (o *SearchHitOut) GetPathOk() (*string, bool) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SearchHitOut) GetParentIdOk() (*string, bool) { if o == nil { return nil, false } - return &o.Path, true + return o.ParentId.Get(), o.ParentId.IsSet() } -// SetPath sets field value -func (o *SearchHitOut) SetPath(v string) { - o.Path = v +// SetParentId sets field value +func (o *SearchHitOut) SetParentId(v string) { + o.ParentId.Set(&v) } -// GetScore returns the Score field value -func (o *SearchHitOut) GetScore() float32 { +// GetRank returns the Rank field value +func (o *SearchHitOut) GetRank() float32 { if o == nil { var ret float32 return ret } - return o.Score + return o.Rank } -// GetScoreOk returns a tuple with the Score field value +// GetRankOk returns a tuple with the Rank field value // and a boolean to check if the value has been set. -func (o *SearchHitOut) GetScoreOk() (*float32, bool) { +func (o *SearchHitOut) GetRankOk() (*float32, bool) { if o == nil { return nil, false } - return &o.Score, true + return &o.Rank, true } -// SetScore sets field value -func (o *SearchHitOut) SetScore(v float32) { - o.Score = v +// SetRank sets field value +func (o *SearchHitOut) SetRank(v float32) { + o.Rank = v } // GetSnippet returns the Snippet field value @@ -288,52 +258,30 @@ func (o *SearchHitOut) SetUpdatedAt(v time.Time) { o.UpdatedAt = v } -// GetUrl returns the Url field value -func (o *SearchHitOut) GetUrl() string { - if o == nil { +// GetVersionId returns the VersionId field value +// If the value is explicit nil, the zero value for string will be returned +func (o *SearchHitOut) GetVersionId() string { + if o == nil || o.VersionId.Get() == nil { var ret string return ret } - return o.Url -} - -// GetUrlOk returns a tuple with the Url field value -// and a boolean to check if the value has been set. -func (o *SearchHitOut) GetUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Url, true -} - -// SetUrl sets field value -func (o *SearchHitOut) SetUrl(v string) { - o.Url = v -} - -// GetVersionNumber returns the VersionNumber field value -func (o *SearchHitOut) GetVersionNumber() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.VersionNumber + return *o.VersionId.Get() } -// GetVersionNumberOk returns a tuple with the VersionNumber field value +// GetVersionIdOk returns a tuple with the VersionId field value // and a boolean to check if the value has been set. -func (o *SearchHitOut) GetVersionNumberOk() (*int32, bool) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SearchHitOut) GetVersionIdOk() (*string, bool) { if o == nil { return nil, false } - return &o.VersionNumber, true + return o.VersionId.Get(), o.VersionId.IsSet() } -// SetVersionNumber sets field value -func (o *SearchHitOut) SetVersionNumber(v int32) { - o.VersionNumber = v +// SetVersionId sets field value +func (o *SearchHitOut) SetVersionId(v string) { + o.VersionId.Set(&v) } func (o SearchHitOut) MarshalJSON() ([]byte, error) { @@ -346,19 +294,15 @@ func (o SearchHitOut) MarshalJSON() ([]byte, error) { func (o SearchHitOut) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["art_id"] = o.ArtId - toSerialize["content_type"] = o.ContentType + toSerialize["content_type"] = o.ContentType.Get() toSerialize["drive_id"] = o.DriveId - toSerialize["file_type"] = o.FileType - if !IsNil(o.Labels) { - toSerialize["labels"] = o.Labels - } - toSerialize["path"] = o.Path - toSerialize["score"] = o.Score + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["parent_id"] = o.ParentId.Get() + toSerialize["rank"] = o.Rank toSerialize["snippet"] = o.Snippet toSerialize["updated_at"] = o.UpdatedAt - toSerialize["url"] = o.Url - toSerialize["version_number"] = o.VersionNumber + toSerialize["version_id"] = o.VersionId.Get() return toSerialize, nil } @@ -367,16 +311,15 @@ func (o *SearchHitOut) UnmarshalJSON(data []byte) (err error) { // by unmarshalling the object into a generic map with string keys and checking // that every required field exists as a key in the generic map. requiredProperties := []string{ - "art_id", "content_type", "drive_id", - "file_type", - "path", - "score", + "id", + "name", + "parent_id", + "rank", "snippet", "updated_at", - "url", - "version_number", + "version_id", } allProperties := make(map[string]interface{}) diff --git a/sdk/go/model_search_page.go b/sdk/go/model_search_page.go deleted file mode 100644 index 1c87434..0000000 --- a/sdk/go/model_search_page.go +++ /dev/null @@ -1,156 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the SearchPage type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SearchPage{} - -// SearchPage `/v0/search` response — single-shot top-N, deliberately unpaginated. Ranked retrieval doesn't paginate meaningfully (the industry norm: vector/RAG APIs are pure top-K; Algolia/GitHub cap ranked results outright) — the correct \"next page\" of a relevance-ranked list is a narrower query. Raise `limit` (≤100) for more hits. A `next_cursor` field advertised here in the past was structurally always null and was dropped; if deep retrieval is ever needed, an ES-`search_after` style `(score, id)` keyset can be re-added additively. -type SearchPage struct { - Items []SearchHitOut `json:"items"` -} - -type _SearchPage SearchPage - -// NewSearchPage instantiates a new SearchPage object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSearchPage(items []SearchHitOut) *SearchPage { - this := SearchPage{} - this.Items = items - return &this -} - -// NewSearchPageWithDefaults instantiates a new SearchPage object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSearchPageWithDefaults() *SearchPage { - this := SearchPage{} - return &this -} - -// GetItems returns the Items field value -func (o *SearchPage) GetItems() []SearchHitOut { - if o == nil { - var ret []SearchHitOut - return ret - } - - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value -// and a boolean to check if the value has been set. -func (o *SearchPage) GetItemsOk() ([]SearchHitOut, bool) { - if o == nil { - return nil, false - } - return o.Items, true -} - -// SetItems sets field value -func (o *SearchPage) SetItems(v []SearchHitOut) { - o.Items = v -} - -func (o SearchPage) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SearchPage) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["items"] = o.Items - return toSerialize, nil -} - -func (o *SearchPage) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "items", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varSearchPage := _SearchPage{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varSearchPage) - - if err != nil { - return err - } - - *o = SearchPage(varSearchPage) - - return err -} - -type NullableSearchPage struct { - value *SearchPage - isSet bool -} - -func (v NullableSearchPage) Get() *SearchPage { - return v.value -} - -func (v *NullableSearchPage) Set(val *SearchPage) { - v.value = val - v.isSet = true -} - -func (v NullableSearchPage) IsSet() bool { - return v.isSet -} - -func (v *NullableSearchPage) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSearchPage(val *SearchPage) *NullableSearchPage { - return &NullableSearchPage{value: val, isSet: true} -} - -func (v NullableSearchPage) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSearchPage) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_search_page_out.go b/sdk/go/model_search_page_out.go new file mode 100644 index 0000000..61437f5 --- /dev/null +++ b/sdk/go/model_search_page_out.go @@ -0,0 +1,186 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the SearchPageOut type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &SearchPageOut{} + +// SearchPageOut struct for SearchPageOut +type SearchPageOut struct { + Items []SearchHitOut `json:"items"` + NextCursor NullableString `json:"next_cursor"` +} + +type _SearchPageOut SearchPageOut + +// NewSearchPageOut instantiates a new SearchPageOut object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewSearchPageOut(items []SearchHitOut, nextCursor NullableString) *SearchPageOut { + this := SearchPageOut{} + this.Items = items + this.NextCursor = nextCursor + return &this +} + +// NewSearchPageOutWithDefaults instantiates a new SearchPageOut object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewSearchPageOutWithDefaults() *SearchPageOut { + this := SearchPageOut{} + return &this +} + +// GetItems returns the Items field value +func (o *SearchPageOut) GetItems() []SearchHitOut { + if o == nil { + var ret []SearchHitOut + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *SearchPageOut) GetItemsOk() ([]SearchHitOut, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *SearchPageOut) SetItems(v []SearchHitOut) { + o.Items = v +} + +// GetNextCursor returns the NextCursor field value +// If the value is explicit nil, the zero value for string will be returned +func (o *SearchPageOut) GetNextCursor() string { + if o == nil || o.NextCursor.Get() == nil { + var ret string + return ret + } + + return *o.NextCursor.Get() +} + +// GetNextCursorOk returns a tuple with the NextCursor field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *SearchPageOut) GetNextCursorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.NextCursor.Get(), o.NextCursor.IsSet() +} + +// SetNextCursor sets field value +func (o *SearchPageOut) SetNextCursor(v string) { + o.NextCursor.Set(&v) +} + +func (o SearchPageOut) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o SearchPageOut) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + toSerialize["next_cursor"] = o.NextCursor.Get() + return toSerialize, nil +} + +func (o *SearchPageOut) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "items", + "next_cursor", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varSearchPageOut := _SearchPageOut{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varSearchPageOut) + + if err != nil { + return err + } + + *o = SearchPageOut(varSearchPageOut) + + return err +} + +type NullableSearchPageOut struct { + value *SearchPageOut + isSet bool +} + +func (v NullableSearchPageOut) Get() *SearchPageOut { + return v.value +} + +func (v *NullableSearchPageOut) Set(val *SearchPageOut) { + v.value = val + v.isSet = true +} + +func (v NullableSearchPageOut) IsSet() bool { + return v.isSet +} + +func (v *NullableSearchPageOut) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableSearchPageOut(val *SearchPageOut) *NullableSearchPageOut { + return &NullableSearchPageOut{value: val, isSet: true} +} + +func (v NullableSearchPageOut) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableSearchPageOut) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/sdk/go/model_share_create_in.go b/sdk/go/model_share_create_in.go index 15db98e..b3c4f92 100644 --- a/sdk/go/model_share_create_in.go +++ b/sdk/go/model_share_create_in.go @@ -1,7 +1,7 @@ /* AgentDrive -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. API version: */ @@ -12,6 +12,7 @@ package agentdrive import ( "encoding/json" + "time" "bytes" "fmt" ) @@ -19,12 +20,11 @@ import ( // checks if the ShareCreateIn type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ShareCreateIn{} -// ShareCreateIn POST /v0/shares body. `resource` is an `art_*`/`fld_*` id or a path. `expires_in` is seconds from now (omit for the default: none for a human creator, a short TTL for an agent). `password` (optional) gates redemption. +// ShareCreateIn POST /v0/drives/{id}/shares body. type ShareCreateIn struct { - ExpiresIn NullableInt32 `json:"expires_in,omitempty"` - Password NullableString `json:"password,omitempty"` - Resource string `json:"resource"` - Role *string `json:"role,omitempty"` + ExpiresAt NullableTime `json:"expires_at,omitempty"` + ResourceId string `json:"resource_id"` + ResourceType string `json:"resource_type"` } type _ShareCreateIn ShareCreateIn @@ -33,11 +33,10 @@ type _ShareCreateIn ShareCreateIn // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewShareCreateIn(resource string) *ShareCreateIn { +func NewShareCreateIn(resourceId string, resourceType string) *ShareCreateIn { this := ShareCreateIn{} - this.Resource = resource - var role string = "viewer" - this.Role = &role + this.ResourceId = resourceId + this.ResourceType = resourceType return &this } @@ -46,149 +45,97 @@ func NewShareCreateIn(resource string) *ShareCreateIn { // but it doesn't guarantee that properties required by API are set func NewShareCreateInWithDefaults() *ShareCreateIn { this := ShareCreateIn{} - var role string = "viewer" - this.Role = &role return &this } -// GetExpiresIn returns the ExpiresIn field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ShareCreateIn) GetExpiresIn() int32 { - if o == nil || IsNil(o.ExpiresIn.Get()) { - var ret int32 +// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ShareCreateIn) GetExpiresAt() time.Time { + if o == nil || IsNil(o.ExpiresAt.Get()) { + var ret time.Time return ret } - return *o.ExpiresIn.Get() + return *o.ExpiresAt.Get() } -// GetExpiresInOk returns a tuple with the ExpiresIn field value if set, nil otherwise +// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ShareCreateIn) GetExpiresInOk() (*int32, bool) { +func (o *ShareCreateIn) GetExpiresAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return o.ExpiresIn.Get(), o.ExpiresIn.IsSet() + return o.ExpiresAt.Get(), o.ExpiresAt.IsSet() } -// HasExpiresIn returns a boolean if a field has been set. -func (o *ShareCreateIn) HasExpiresIn() bool { - if o != nil && o.ExpiresIn.IsSet() { +// HasExpiresAt returns a boolean if a field has been set. +func (o *ShareCreateIn) HasExpiresAt() bool { + if o != nil && o.ExpiresAt.IsSet() { return true } return false } -// SetExpiresIn gets a reference to the given NullableInt32 and assigns it to the ExpiresIn field. -func (o *ShareCreateIn) SetExpiresIn(v int32) { - o.ExpiresIn.Set(&v) +// SetExpiresAt gets a reference to the given NullableTime and assigns it to the ExpiresAt field. +func (o *ShareCreateIn) SetExpiresAt(v time.Time) { + o.ExpiresAt.Set(&v) } -// SetExpiresInNil sets the value for ExpiresIn to be an explicit nil -func (o *ShareCreateIn) SetExpiresInNil() { - o.ExpiresIn.Set(nil) +// SetExpiresAtNil sets the value for ExpiresAt to be an explicit nil +func (o *ShareCreateIn) SetExpiresAtNil() { + o.ExpiresAt.Set(nil) } -// UnsetExpiresIn ensures that no value is present for ExpiresIn, not even an explicit nil -func (o *ShareCreateIn) UnsetExpiresIn() { - o.ExpiresIn.Unset() +// UnsetExpiresAt ensures that no value is present for ExpiresAt, not even an explicit nil +func (o *ShareCreateIn) UnsetExpiresAt() { + o.ExpiresAt.Unset() } -// GetPassword returns the Password field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ShareCreateIn) GetPassword() string { - if o == nil || IsNil(o.Password.Get()) { +// GetResourceId returns the ResourceId field value +func (o *ShareCreateIn) GetResourceId() string { + if o == nil { var ret string return ret } - return *o.Password.Get() + + return o.ResourceId } -// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// GetResourceIdOk returns a tuple with the ResourceId field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ShareCreateIn) GetPasswordOk() (*string, bool) { +func (o *ShareCreateIn) GetResourceIdOk() (*string, bool) { if o == nil { return nil, false } - return o.Password.Get(), o.Password.IsSet() -} - -// HasPassword returns a boolean if a field has been set. -func (o *ShareCreateIn) HasPassword() bool { - if o != nil && o.Password.IsSet() { - return true - } - - return false -} - -// SetPassword gets a reference to the given NullableString and assigns it to the Password field. -func (o *ShareCreateIn) SetPassword(v string) { - o.Password.Set(&v) -} -// SetPasswordNil sets the value for Password to be an explicit nil -func (o *ShareCreateIn) SetPasswordNil() { - o.Password.Set(nil) + return &o.ResourceId, true } -// UnsetPassword ensures that no value is present for Password, not even an explicit nil -func (o *ShareCreateIn) UnsetPassword() { - o.Password.Unset() +// SetResourceId sets field value +func (o *ShareCreateIn) SetResourceId(v string) { + o.ResourceId = v } -// GetResource returns the Resource field value -func (o *ShareCreateIn) GetResource() string { +// GetResourceType returns the ResourceType field value +func (o *ShareCreateIn) GetResourceType() string { if o == nil { var ret string return ret } - return o.Resource + return o.ResourceType } -// GetResourceOk returns a tuple with the Resource field value +// GetResourceTypeOk returns a tuple with the ResourceType field value // and a boolean to check if the value has been set. -func (o *ShareCreateIn) GetResourceOk() (*string, bool) { +func (o *ShareCreateIn) GetResourceTypeOk() (*string, bool) { if o == nil { return nil, false } - return &o.Resource, true -} - -// SetResource sets field value -func (o *ShareCreateIn) SetResource(v string) { - o.Resource = v -} - -// GetRole returns the Role field value if set, zero value otherwise. -func (o *ShareCreateIn) GetRole() string { - if o == nil || IsNil(o.Role) { - var ret string - return ret - } - return *o.Role -} - -// GetRoleOk returns a tuple with the Role field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ShareCreateIn) GetRoleOk() (*string, bool) { - if o == nil || IsNil(o.Role) { - return nil, false - } - return o.Role, true + return &o.ResourceType, true } -// HasRole returns a boolean if a field has been set. -func (o *ShareCreateIn) HasRole() bool { - if o != nil && !IsNil(o.Role) { - return true - } - - return false -} - -// SetRole gets a reference to the given string and assigns it to the Role field. -func (o *ShareCreateIn) SetRole(v string) { - o.Role = &v +// SetResourceType sets field value +func (o *ShareCreateIn) SetResourceType(v string) { + o.ResourceType = v } func (o ShareCreateIn) MarshalJSON() ([]byte, error) { @@ -201,16 +148,11 @@ func (o ShareCreateIn) MarshalJSON() ([]byte, error) { func (o ShareCreateIn) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.ExpiresIn.IsSet() { - toSerialize["expires_in"] = o.ExpiresIn.Get() - } - if o.Password.IsSet() { - toSerialize["password"] = o.Password.Get() - } - toSerialize["resource"] = o.Resource - if !IsNil(o.Role) { - toSerialize["role"] = o.Role + if o.ExpiresAt.IsSet() { + toSerialize["expires_at"] = o.ExpiresAt.Get() } + toSerialize["resource_id"] = o.ResourceId + toSerialize["resource_type"] = o.ResourceType return toSerialize, nil } @@ -219,7 +161,8 @@ func (o *ShareCreateIn) UnmarshalJSON(data []byte) (err error) { // by unmarshalling the object into a generic map with string keys and checking // that every required field exists as a key in the generic map. requiredProperties := []string{ - "resource", + "resource_id", + "resource_type", } allProperties := make(map[string]interface{}) diff --git a/sdk/go/model_share_create_out.go b/sdk/go/model_share_create_out.go new file mode 100644 index 0000000..d10bd90 --- /dev/null +++ b/sdk/go/model_share_create_out.go @@ -0,0 +1,492 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the ShareCreateOut type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ShareCreateOut{} + +// ShareCreateOut The create/rotate response — the ONLY response carrying the plaintext secret. +type ShareCreateOut struct { + CreatedAt time.Time `json:"created_at"` + CreatedBy NullableString `json:"created_by"` + DriveId string `json:"drive_id" validate:"regexp=^drv_[a-f0-9]{16}$"` + ExpiresAt NullableTime `json:"expires_at"` + Id string `json:"id" validate:"regexp=^shr_[a-f0-9]{16}$"` + ResourceId string `json:"resource_id"` + ResourceType string `json:"resource_type"` + Revision string `json:"revision" validate:"regexp=^rev_[a-f0-9]{16}$"` + RevokedAt NullableTime `json:"revoked_at"` + RotatedAt NullableTime `json:"rotated_at"` + // Plaintext share secret. Present only on first execution of a create or rotate; null on idempotent replay — rotate to obtain a new secret. + Secret NullableString `json:"secret,omitempty"` + State string `json:"state"` +} + +type _ShareCreateOut ShareCreateOut + +// NewShareCreateOut instantiates a new ShareCreateOut object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewShareCreateOut(createdAt time.Time, createdBy NullableString, driveId string, expiresAt NullableTime, id string, resourceId string, resourceType string, revision string, revokedAt NullableTime, rotatedAt NullableTime, state string) *ShareCreateOut { + this := ShareCreateOut{} + this.CreatedAt = createdAt + this.CreatedBy = createdBy + this.DriveId = driveId + this.ExpiresAt = expiresAt + this.Id = id + this.ResourceId = resourceId + this.ResourceType = resourceType + this.Revision = revision + this.RevokedAt = revokedAt + this.RotatedAt = rotatedAt + this.State = state + return &this +} + +// NewShareCreateOutWithDefaults instantiates a new ShareCreateOut object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewShareCreateOutWithDefaults() *ShareCreateOut { + this := ShareCreateOut{} + return &this +} + +// GetCreatedAt returns the CreatedAt field value +func (o *ShareCreateOut) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *ShareCreateOut) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *ShareCreateOut) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetCreatedBy returns the CreatedBy field value +// If the value is explicit nil, the zero value for string will be returned +func (o *ShareCreateOut) GetCreatedBy() string { + if o == nil || o.CreatedBy.Get() == nil { + var ret string + return ret + } + + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ShareCreateOut) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// SetCreatedBy sets field value +func (o *ShareCreateOut) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// GetDriveId returns the DriveId field value +func (o *ShareCreateOut) GetDriveId() string { + if o == nil { + var ret string + return ret + } + + return o.DriveId +} + +// GetDriveIdOk returns a tuple with the DriveId field value +// and a boolean to check if the value has been set. +func (o *ShareCreateOut) GetDriveIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.DriveId, true +} + +// SetDriveId sets field value +func (o *ShareCreateOut) SetDriveId(v string) { + o.DriveId = v +} + +// GetExpiresAt returns the ExpiresAt field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *ShareCreateOut) GetExpiresAt() time.Time { + if o == nil || o.ExpiresAt.Get() == nil { + var ret time.Time + return ret + } + + return *o.ExpiresAt.Get() +} + +// GetExpiresAtOk returns a tuple with the ExpiresAt field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ShareCreateOut) GetExpiresAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.ExpiresAt.Get(), o.ExpiresAt.IsSet() +} + +// SetExpiresAt sets field value +func (o *ShareCreateOut) SetExpiresAt(v time.Time) { + o.ExpiresAt.Set(&v) +} + +// GetId returns the Id field value +func (o *ShareCreateOut) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ShareCreateOut) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ShareCreateOut) SetId(v string) { + o.Id = v +} + +// GetResourceId returns the ResourceId field value +func (o *ShareCreateOut) GetResourceId() string { + if o == nil { + var ret string + return ret + } + + return o.ResourceId +} + +// GetResourceIdOk returns a tuple with the ResourceId field value +// and a boolean to check if the value has been set. +func (o *ShareCreateOut) GetResourceIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ResourceId, true +} + +// SetResourceId sets field value +func (o *ShareCreateOut) SetResourceId(v string) { + o.ResourceId = v +} + +// GetResourceType returns the ResourceType field value +func (o *ShareCreateOut) GetResourceType() string { + if o == nil { + var ret string + return ret + } + + return o.ResourceType +} + +// GetResourceTypeOk returns a tuple with the ResourceType field value +// and a boolean to check if the value has been set. +func (o *ShareCreateOut) GetResourceTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ResourceType, true +} + +// SetResourceType sets field value +func (o *ShareCreateOut) SetResourceType(v string) { + o.ResourceType = v +} + +// GetRevision returns the Revision field value +func (o *ShareCreateOut) GetRevision() string { + if o == nil { + var ret string + return ret + } + + return o.Revision +} + +// GetRevisionOk returns a tuple with the Revision field value +// and a boolean to check if the value has been set. +func (o *ShareCreateOut) GetRevisionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Revision, true +} + +// SetRevision sets field value +func (o *ShareCreateOut) SetRevision(v string) { + o.Revision = v +} + +// GetRevokedAt returns the RevokedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *ShareCreateOut) GetRevokedAt() time.Time { + if o == nil || o.RevokedAt.Get() == nil { + var ret time.Time + return ret + } + + return *o.RevokedAt.Get() +} + +// GetRevokedAtOk returns a tuple with the RevokedAt field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ShareCreateOut) GetRevokedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.RevokedAt.Get(), o.RevokedAt.IsSet() +} + +// SetRevokedAt sets field value +func (o *ShareCreateOut) SetRevokedAt(v time.Time) { + o.RevokedAt.Set(&v) +} + +// GetRotatedAt returns the RotatedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *ShareCreateOut) GetRotatedAt() time.Time { + if o == nil || o.RotatedAt.Get() == nil { + var ret time.Time + return ret + } + + return *o.RotatedAt.Get() +} + +// GetRotatedAtOk returns a tuple with the RotatedAt field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ShareCreateOut) GetRotatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return o.RotatedAt.Get(), o.RotatedAt.IsSet() +} + +// SetRotatedAt sets field value +func (o *ShareCreateOut) SetRotatedAt(v time.Time) { + o.RotatedAt.Set(&v) +} + +// GetSecret returns the Secret field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *ShareCreateOut) GetSecret() string { + if o == nil || IsNil(o.Secret.Get()) { + var ret string + return ret + } + return *o.Secret.Get() +} + +// GetSecretOk returns a tuple with the Secret field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ShareCreateOut) GetSecretOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Secret.Get(), o.Secret.IsSet() +} + +// HasSecret returns a boolean if a field has been set. +func (o *ShareCreateOut) HasSecret() bool { + if o != nil && o.Secret.IsSet() { + return true + } + + return false +} + +// SetSecret gets a reference to the given NullableString and assigns it to the Secret field. +func (o *ShareCreateOut) SetSecret(v string) { + o.Secret.Set(&v) +} +// SetSecretNil sets the value for Secret to be an explicit nil +func (o *ShareCreateOut) SetSecretNil() { + o.Secret.Set(nil) +} + +// UnsetSecret ensures that no value is present for Secret, not even an explicit nil +func (o *ShareCreateOut) UnsetSecret() { + o.Secret.Unset() +} + +// GetState returns the State field value +func (o *ShareCreateOut) GetState() string { + if o == nil { + var ret string + return ret + } + + return o.State +} + +// GetStateOk returns a tuple with the State field value +// and a boolean to check if the value has been set. +func (o *ShareCreateOut) GetStateOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.State, true +} + +// SetState sets field value +func (o *ShareCreateOut) SetState(v string) { + o.State = v +} + +func (o ShareCreateOut) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ShareCreateOut) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["created_at"] = o.CreatedAt + toSerialize["created_by"] = o.CreatedBy.Get() + toSerialize["drive_id"] = o.DriveId + toSerialize["expires_at"] = o.ExpiresAt.Get() + toSerialize["id"] = o.Id + toSerialize["resource_id"] = o.ResourceId + toSerialize["resource_type"] = o.ResourceType + toSerialize["revision"] = o.Revision + toSerialize["revoked_at"] = o.RevokedAt.Get() + toSerialize["rotated_at"] = o.RotatedAt.Get() + if o.Secret.IsSet() { + toSerialize["secret"] = o.Secret.Get() + } + toSerialize["state"] = o.State + return toSerialize, nil +} + +func (o *ShareCreateOut) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "created_at", + "created_by", + "drive_id", + "expires_at", + "id", + "resource_id", + "resource_type", + "revision", + "revoked_at", + "rotated_at", + "state", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varShareCreateOut := _ShareCreateOut{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varShareCreateOut) + + if err != nil { + return err + } + + *o = ShareCreateOut(varShareCreateOut) + + return err +} + +type NullableShareCreateOut struct { + value *ShareCreateOut + isSet bool +} + +func (v NullableShareCreateOut) Get() *ShareCreateOut { + return v.value +} + +func (v *NullableShareCreateOut) Set(val *ShareCreateOut) { + v.value = val + v.isSet = true +} + +func (v NullableShareCreateOut) IsSet() bool { + return v.isSet +} + +func (v *NullableShareCreateOut) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableShareCreateOut(val *ShareCreateOut) *NullableShareCreateOut { + return &NullableShareCreateOut{value: val, isSet: true} +} + +func (v NullableShareCreateOut) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableShareCreateOut) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/sdk/go/model_share_error_out.go b/sdk/go/model_share_error_out.go deleted file mode 100644 index aa77c97..0000000 --- a/sdk/go/model_share_error_out.go +++ /dev/null @@ -1,156 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the ShareErrorOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ShareErrorOut{} - -// ShareErrorOut Negotiated JSON error shape for the public share protocol. -type ShareErrorOut struct { - Error ErrorBody `json:"error"` -} - -type _ShareErrorOut ShareErrorOut - -// NewShareErrorOut instantiates a new ShareErrorOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewShareErrorOut(error_ ErrorBody) *ShareErrorOut { - this := ShareErrorOut{} - this.Error = error_ - return &this -} - -// NewShareErrorOutWithDefaults instantiates a new ShareErrorOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewShareErrorOutWithDefaults() *ShareErrorOut { - this := ShareErrorOut{} - return &this -} - -// GetError returns the Error field value -func (o *ShareErrorOut) GetError() ErrorBody { - if o == nil { - var ret ErrorBody - return ret - } - - return o.Error -} - -// GetErrorOk returns a tuple with the Error field value -// and a boolean to check if the value has been set. -func (o *ShareErrorOut) GetErrorOk() (*ErrorBody, bool) { - if o == nil { - return nil, false - } - return &o.Error, true -} - -// SetError sets field value -func (o *ShareErrorOut) SetError(v ErrorBody) { - o.Error = v -} - -func (o ShareErrorOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ShareErrorOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["error"] = o.Error - return toSerialize, nil -} - -func (o *ShareErrorOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "error", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varShareErrorOut := _ShareErrorOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varShareErrorOut) - - if err != nil { - return err - } - - *o = ShareErrorOut(varShareErrorOut) - - return err -} - -type NullableShareErrorOut struct { - value *ShareErrorOut - isSet bool -} - -func (v NullableShareErrorOut) Get() *ShareErrorOut { - return v.value -} - -func (v *NullableShareErrorOut) Set(val *ShareErrorOut) { - v.value = val - v.isSet = true -} - -func (v NullableShareErrorOut) IsSet() bool { - return v.isSet -} - -func (v *NullableShareErrorOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableShareErrorOut(val *ShareErrorOut) *NullableShareErrorOut { - return &NullableShareErrorOut{value: val, isSet: true} -} - -func (v NullableShareErrorOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableShareErrorOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_share_list.go b/sdk/go/model_share_list.go deleted file mode 100644 index c43a061..0000000 --- a/sdk/go/model_share_list.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the ShareList type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ShareList{} - -// ShareList struct for ShareList -type ShareList struct { - Items []ShareOut `json:"items"` - NextCursor NullableString `json:"next_cursor,omitempty"` -} - -type _ShareList ShareList - -// NewShareList instantiates a new ShareList object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewShareList(items []ShareOut) *ShareList { - this := ShareList{} - this.Items = items - return &this -} - -// NewShareListWithDefaults instantiates a new ShareList object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewShareListWithDefaults() *ShareList { - this := ShareList{} - return &this -} - -// GetItems returns the Items field value -func (o *ShareList) GetItems() []ShareOut { - if o == nil { - var ret []ShareOut - return ret - } - - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value -// and a boolean to check if the value has been set. -func (o *ShareList) GetItemsOk() ([]ShareOut, bool) { - if o == nil { - return nil, false - } - return o.Items, true -} - -// SetItems sets field value -func (o *ShareList) SetItems(v []ShareOut) { - o.Items = v -} - -// GetNextCursor returns the NextCursor field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ShareList) GetNextCursor() string { - if o == nil || IsNil(o.NextCursor.Get()) { - var ret string - return ret - } - return *o.NextCursor.Get() -} - -// GetNextCursorOk returns a tuple with the NextCursor field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ShareList) GetNextCursorOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.NextCursor.Get(), o.NextCursor.IsSet() -} - -// HasNextCursor returns a boolean if a field has been set. -func (o *ShareList) HasNextCursor() bool { - if o != nil && o.NextCursor.IsSet() { - return true - } - - return false -} - -// SetNextCursor gets a reference to the given NullableString and assigns it to the NextCursor field. -func (o *ShareList) SetNextCursor(v string) { - o.NextCursor.Set(&v) -} -// SetNextCursorNil sets the value for NextCursor to be an explicit nil -func (o *ShareList) SetNextCursorNil() { - o.NextCursor.Set(nil) -} - -// UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil -func (o *ShareList) UnsetNextCursor() { - o.NextCursor.Unset() -} - -func (o ShareList) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ShareList) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["items"] = o.Items - if o.NextCursor.IsSet() { - toSerialize["next_cursor"] = o.NextCursor.Get() - } - return toSerialize, nil -} - -func (o *ShareList) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "items", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varShareList := _ShareList{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varShareList) - - if err != nil { - return err - } - - *o = ShareList(varShareList) - - return err -} - -type NullableShareList struct { - value *ShareList - isSet bool -} - -func (v NullableShareList) Get() *ShareList { - return v.value -} - -func (v *NullableShareList) Set(val *ShareList) { - v.value = val - v.isSet = true -} - -func (v NullableShareList) IsSet() bool { - return v.isSet -} - -func (v *NullableShareList) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableShareList(val *ShareList) *NullableShareList { - return &NullableShareList{value: val, isSet: true} -} - -func (v NullableShareList) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableShareList) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_share_list_out.go b/sdk/go/model_share_list_out.go new file mode 100644 index 0000000..2f3db3b --- /dev/null +++ b/sdk/go/model_share_list_out.go @@ -0,0 +1,186 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the ShareListOut type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ShareListOut{} + +// ShareListOut struct for ShareListOut +type ShareListOut struct { + Items []ShareOut `json:"items"` + NextCursor NullableString `json:"next_cursor"` +} + +type _ShareListOut ShareListOut + +// NewShareListOut instantiates a new ShareListOut object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewShareListOut(items []ShareOut, nextCursor NullableString) *ShareListOut { + this := ShareListOut{} + this.Items = items + this.NextCursor = nextCursor + return &this +} + +// NewShareListOutWithDefaults instantiates a new ShareListOut object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewShareListOutWithDefaults() *ShareListOut { + this := ShareListOut{} + return &this +} + +// GetItems returns the Items field value +func (o *ShareListOut) GetItems() []ShareOut { + if o == nil { + var ret []ShareOut + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *ShareListOut) GetItemsOk() ([]ShareOut, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *ShareListOut) SetItems(v []ShareOut) { + o.Items = v +} + +// GetNextCursor returns the NextCursor field value +// If the value is explicit nil, the zero value for string will be returned +func (o *ShareListOut) GetNextCursor() string { + if o == nil || o.NextCursor.Get() == nil { + var ret string + return ret + } + + return *o.NextCursor.Get() +} + +// GetNextCursorOk returns a tuple with the NextCursor field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ShareListOut) GetNextCursorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.NextCursor.Get(), o.NextCursor.IsSet() +} + +// SetNextCursor sets field value +func (o *ShareListOut) SetNextCursor(v string) { + o.NextCursor.Set(&v) +} + +func (o ShareListOut) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ShareListOut) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + toSerialize["next_cursor"] = o.NextCursor.Get() + return toSerialize, nil +} + +func (o *ShareListOut) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "items", + "next_cursor", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varShareListOut := _ShareListOut{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varShareListOut) + + if err != nil { + return err + } + + *o = ShareListOut(varShareListOut) + + return err +} + +type NullableShareListOut struct { + value *ShareListOut + isSet bool +} + +func (v NullableShareListOut) Get() *ShareListOut { + return v.value +} + +func (v *NullableShareListOut) Set(val *ShareListOut) { + v.value = val + v.isSet = true +} + +func (v NullableShareListOut) IsSet() bool { + return v.isSet +} + +func (v *NullableShareListOut) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableShareListOut(val *ShareListOut) *NullableShareListOut { + return &NullableShareListOut{value: val, isSet: true} +} + +func (v NullableShareListOut) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableShareListOut) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/sdk/go/model_share_mint_out.go b/sdk/go/model_share_mint_out.go deleted file mode 100644 index e662551..0000000 --- a/sdk/go/model_share_mint_out.go +++ /dev/null @@ -1,513 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "time" - "bytes" - "fmt" -) - -// checks if the ShareMintOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ShareMintOut{} - -// ShareMintOut The create/rotate response — the ONLY place the `share_key` and its redemption `url` are exposed. -type ShareMintOut struct { - AccessCount *int32 `json:"access_count,omitempty"` - Audience string `json:"audience"` - CreatedAt time.Time `json:"created_at"` - ExpiresAt NullableTime `json:"expires_at,omitempty"` - HasPassword bool `json:"has_password"` - Id string `json:"id"` - LastAccessedAt NullableTime `json:"last_accessed_at,omitempty"` - ResourceId string `json:"resource_id"` - ResourceType string `json:"resource_type"` - Role string `json:"role"` - ShareKey string `json:"share_key"` - Url string `json:"url"` -} - -type _ShareMintOut ShareMintOut - -// NewShareMintOut instantiates a new ShareMintOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewShareMintOut(audience string, createdAt time.Time, hasPassword bool, id string, resourceId string, resourceType string, role string, shareKey string, url string) *ShareMintOut { - this := ShareMintOut{} - var accessCount int32 = 0 - this.AccessCount = &accessCount - this.Audience = audience - this.CreatedAt = createdAt - this.HasPassword = hasPassword - this.Id = id - this.ResourceId = resourceId - this.ResourceType = resourceType - this.Role = role - this.ShareKey = shareKey - this.Url = url - return &this -} - -// NewShareMintOutWithDefaults instantiates a new ShareMintOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewShareMintOutWithDefaults() *ShareMintOut { - this := ShareMintOut{} - var accessCount int32 = 0 - this.AccessCount = &accessCount - return &this -} - -// GetAccessCount returns the AccessCount field value if set, zero value otherwise. -func (o *ShareMintOut) GetAccessCount() int32 { - if o == nil || IsNil(o.AccessCount) { - var ret int32 - return ret - } - return *o.AccessCount -} - -// GetAccessCountOk returns a tuple with the AccessCount field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *ShareMintOut) GetAccessCountOk() (*int32, bool) { - if o == nil || IsNil(o.AccessCount) { - return nil, false - } - return o.AccessCount, true -} - -// HasAccessCount returns a boolean if a field has been set. -func (o *ShareMintOut) HasAccessCount() bool { - if o != nil && !IsNil(o.AccessCount) { - return true - } - - return false -} - -// SetAccessCount gets a reference to the given int32 and assigns it to the AccessCount field. -func (o *ShareMintOut) SetAccessCount(v int32) { - o.AccessCount = &v -} - -// GetAudience returns the Audience field value -func (o *ShareMintOut) GetAudience() string { - if o == nil { - var ret string - return ret - } - - return o.Audience -} - -// GetAudienceOk returns a tuple with the Audience field value -// and a boolean to check if the value has been set. -func (o *ShareMintOut) GetAudienceOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Audience, true -} - -// SetAudience sets field value -func (o *ShareMintOut) SetAudience(v string) { - o.Audience = v -} - -// GetCreatedAt returns the CreatedAt field value -func (o *ShareMintOut) GetCreatedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value -// and a boolean to check if the value has been set. -func (o *ShareMintOut) GetCreatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.CreatedAt, true -} - -// SetCreatedAt sets field value -func (o *ShareMintOut) SetCreatedAt(v time.Time) { - o.CreatedAt = v -} - -// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ShareMintOut) GetExpiresAt() time.Time { - if o == nil || IsNil(o.ExpiresAt.Get()) { - var ret time.Time - return ret - } - return *o.ExpiresAt.Get() -} - -// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ShareMintOut) GetExpiresAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.ExpiresAt.Get(), o.ExpiresAt.IsSet() -} - -// HasExpiresAt returns a boolean if a field has been set. -func (o *ShareMintOut) HasExpiresAt() bool { - if o != nil && o.ExpiresAt.IsSet() { - return true - } - - return false -} - -// SetExpiresAt gets a reference to the given NullableTime and assigns it to the ExpiresAt field. -func (o *ShareMintOut) SetExpiresAt(v time.Time) { - o.ExpiresAt.Set(&v) -} -// SetExpiresAtNil sets the value for ExpiresAt to be an explicit nil -func (o *ShareMintOut) SetExpiresAtNil() { - o.ExpiresAt.Set(nil) -} - -// UnsetExpiresAt ensures that no value is present for ExpiresAt, not even an explicit nil -func (o *ShareMintOut) UnsetExpiresAt() { - o.ExpiresAt.Unset() -} - -// GetHasPassword returns the HasPassword field value -func (o *ShareMintOut) GetHasPassword() bool { - if o == nil { - var ret bool - return ret - } - - return o.HasPassword -} - -// GetHasPasswordOk returns a tuple with the HasPassword field value -// and a boolean to check if the value has been set. -func (o *ShareMintOut) GetHasPasswordOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.HasPassword, true -} - -// SetHasPassword sets field value -func (o *ShareMintOut) SetHasPassword(v bool) { - o.HasPassword = v -} - -// GetId returns the Id field value -func (o *ShareMintOut) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *ShareMintOut) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *ShareMintOut) SetId(v string) { - o.Id = v -} - -// GetLastAccessedAt returns the LastAccessedAt field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ShareMintOut) GetLastAccessedAt() time.Time { - if o == nil || IsNil(o.LastAccessedAt.Get()) { - var ret time.Time - return ret - } - return *o.LastAccessedAt.Get() -} - -// GetLastAccessedAtOk returns a tuple with the LastAccessedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ShareMintOut) GetLastAccessedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.LastAccessedAt.Get(), o.LastAccessedAt.IsSet() -} - -// HasLastAccessedAt returns a boolean if a field has been set. -func (o *ShareMintOut) HasLastAccessedAt() bool { - if o != nil && o.LastAccessedAt.IsSet() { - return true - } - - return false -} - -// SetLastAccessedAt gets a reference to the given NullableTime and assigns it to the LastAccessedAt field. -func (o *ShareMintOut) SetLastAccessedAt(v time.Time) { - o.LastAccessedAt.Set(&v) -} -// SetLastAccessedAtNil sets the value for LastAccessedAt to be an explicit nil -func (o *ShareMintOut) SetLastAccessedAtNil() { - o.LastAccessedAt.Set(nil) -} - -// UnsetLastAccessedAt ensures that no value is present for LastAccessedAt, not even an explicit nil -func (o *ShareMintOut) UnsetLastAccessedAt() { - o.LastAccessedAt.Unset() -} - -// GetResourceId returns the ResourceId field value -func (o *ShareMintOut) GetResourceId() string { - if o == nil { - var ret string - return ret - } - - return o.ResourceId -} - -// GetResourceIdOk returns a tuple with the ResourceId field value -// and a boolean to check if the value has been set. -func (o *ShareMintOut) GetResourceIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ResourceId, true -} - -// SetResourceId sets field value -func (o *ShareMintOut) SetResourceId(v string) { - o.ResourceId = v -} - -// GetResourceType returns the ResourceType field value -func (o *ShareMintOut) GetResourceType() string { - if o == nil { - var ret string - return ret - } - - return o.ResourceType -} - -// GetResourceTypeOk returns a tuple with the ResourceType field value -// and a boolean to check if the value has been set. -func (o *ShareMintOut) GetResourceTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ResourceType, true -} - -// SetResourceType sets field value -func (o *ShareMintOut) SetResourceType(v string) { - o.ResourceType = v -} - -// GetRole returns the Role field value -func (o *ShareMintOut) GetRole() string { - if o == nil { - var ret string - return ret - } - - return o.Role -} - -// GetRoleOk returns a tuple with the Role field value -// and a boolean to check if the value has been set. -func (o *ShareMintOut) GetRoleOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Role, true -} - -// SetRole sets field value -func (o *ShareMintOut) SetRole(v string) { - o.Role = v -} - -// GetShareKey returns the ShareKey field value -func (o *ShareMintOut) GetShareKey() string { - if o == nil { - var ret string - return ret - } - - return o.ShareKey -} - -// GetShareKeyOk returns a tuple with the ShareKey field value -// and a boolean to check if the value has been set. -func (o *ShareMintOut) GetShareKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ShareKey, true -} - -// SetShareKey sets field value -func (o *ShareMintOut) SetShareKey(v string) { - o.ShareKey = v -} - -// GetUrl returns the Url field value -func (o *ShareMintOut) GetUrl() string { - if o == nil { - var ret string - return ret - } - - return o.Url -} - -// GetUrlOk returns a tuple with the Url field value -// and a boolean to check if the value has been set. -func (o *ShareMintOut) GetUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Url, true -} - -// SetUrl sets field value -func (o *ShareMintOut) SetUrl(v string) { - o.Url = v -} - -func (o ShareMintOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ShareMintOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.AccessCount) { - toSerialize["access_count"] = o.AccessCount - } - toSerialize["audience"] = o.Audience - toSerialize["created_at"] = o.CreatedAt - if o.ExpiresAt.IsSet() { - toSerialize["expires_at"] = o.ExpiresAt.Get() - } - toSerialize["has_password"] = o.HasPassword - toSerialize["id"] = o.Id - if o.LastAccessedAt.IsSet() { - toSerialize["last_accessed_at"] = o.LastAccessedAt.Get() - } - toSerialize["resource_id"] = o.ResourceId - toSerialize["resource_type"] = o.ResourceType - toSerialize["role"] = o.Role - toSerialize["share_key"] = o.ShareKey - toSerialize["url"] = o.Url - return toSerialize, nil -} - -func (o *ShareMintOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "audience", - "created_at", - "has_password", - "id", - "resource_id", - "resource_type", - "role", - "share_key", - "url", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varShareMintOut := _ShareMintOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varShareMintOut) - - if err != nil { - return err - } - - *o = ShareMintOut(varShareMintOut) - - return err -} - -type NullableShareMintOut struct { - value *ShareMintOut - isSet bool -} - -func (v NullableShareMintOut) Get() *ShareMintOut { - return v.value -} - -func (v *NullableShareMintOut) Set(val *ShareMintOut) { - v.value = val - v.isSet = true -} - -func (v NullableShareMintOut) IsSet() bool { - return v.isSet -} - -func (v *NullableShareMintOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableShareMintOut(val *ShareMintOut) *NullableShareMintOut { - return &NullableShareMintOut{value: val, isSet: true} -} - -func (v NullableShareMintOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableShareMintOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_share_out.go b/sdk/go/model_share_out.go index c00f637..081455d 100644 --- a/sdk/go/model_share_out.go +++ b/sdk/go/model_share_out.go @@ -1,7 +1,7 @@ /* AgentDrive -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. API version: */ @@ -20,18 +20,19 @@ import ( // checks if the ShareOut type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ShareOut{} -// ShareOut A live share link as seen on list/management — NEVER carries the `share_key` (that is the credential, returned only at mint/rotate). +// ShareOut struct for ShareOut type ShareOut struct { - AccessCount *int32 `json:"access_count,omitempty"` - Audience string `json:"audience"` CreatedAt time.Time `json:"created_at"` - ExpiresAt NullableTime `json:"expires_at,omitempty"` - HasPassword bool `json:"has_password"` - Id string `json:"id"` - LastAccessedAt NullableTime `json:"last_accessed_at,omitempty"` + CreatedBy NullableString `json:"created_by"` + DriveId string `json:"drive_id" validate:"regexp=^drv_[a-f0-9]{16}$"` + ExpiresAt NullableTime `json:"expires_at"` + Id string `json:"id" validate:"regexp=^shr_[a-f0-9]{16}$"` ResourceId string `json:"resource_id"` ResourceType string `json:"resource_type"` - Role string `json:"role"` + Revision string `json:"revision" validate:"regexp=^rev_[a-f0-9]{16}$"` + RevokedAt NullableTime `json:"revoked_at"` + RotatedAt NullableTime `json:"rotated_at"` + State string `json:"state"` } type _ShareOut ShareOut @@ -40,17 +41,19 @@ type _ShareOut ShareOut // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewShareOut(audience string, createdAt time.Time, hasPassword bool, id string, resourceId string, resourceType string, role string) *ShareOut { +func NewShareOut(createdAt time.Time, createdBy NullableString, driveId string, expiresAt NullableTime, id string, resourceId string, resourceType string, revision string, revokedAt NullableTime, rotatedAt NullableTime, state string) *ShareOut { this := ShareOut{} - var accessCount int32 = 0 - this.AccessCount = &accessCount - this.Audience = audience this.CreatedAt = createdAt - this.HasPassword = hasPassword + this.CreatedBy = createdBy + this.DriveId = driveId + this.ExpiresAt = expiresAt this.Id = id this.ResourceId = resourceId this.ResourceType = resourceType - this.Role = role + this.Revision = revision + this.RevokedAt = revokedAt + this.RotatedAt = rotatedAt + this.State = state return &this } @@ -59,101 +62,95 @@ func NewShareOut(audience string, createdAt time.Time, hasPassword bool, id stri // but it doesn't guarantee that properties required by API are set func NewShareOutWithDefaults() *ShareOut { this := ShareOut{} - var accessCount int32 = 0 - this.AccessCount = &accessCount return &this } -// GetAccessCount returns the AccessCount field value if set, zero value otherwise. -func (o *ShareOut) GetAccessCount() int32 { - if o == nil || IsNil(o.AccessCount) { - var ret int32 +// GetCreatedAt returns the CreatedAt field value +func (o *ShareOut) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time return ret } - return *o.AccessCount + + return o.CreatedAt } -// GetAccessCountOk returns a tuple with the AccessCount field value if set, nil otherwise +// GetCreatedAtOk returns a tuple with the CreatedAt field value // and a boolean to check if the value has been set. -func (o *ShareOut) GetAccessCountOk() (*int32, bool) { - if o == nil || IsNil(o.AccessCount) { +func (o *ShareOut) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { return nil, false } - return o.AccessCount, true -} - -// HasAccessCount returns a boolean if a field has been set. -func (o *ShareOut) HasAccessCount() bool { - if o != nil && !IsNil(o.AccessCount) { - return true - } - - return false + return &o.CreatedAt, true } -// SetAccessCount gets a reference to the given int32 and assigns it to the AccessCount field. -func (o *ShareOut) SetAccessCount(v int32) { - o.AccessCount = &v +// SetCreatedAt sets field value +func (o *ShareOut) SetCreatedAt(v time.Time) { + o.CreatedAt = v } -// GetAudience returns the Audience field value -func (o *ShareOut) GetAudience() string { - if o == nil { +// GetCreatedBy returns the CreatedBy field value +// If the value is explicit nil, the zero value for string will be returned +func (o *ShareOut) GetCreatedBy() string { + if o == nil || o.CreatedBy.Get() == nil { var ret string return ret } - return o.Audience + return *o.CreatedBy.Get() } -// GetAudienceOk returns a tuple with the Audience field value +// GetCreatedByOk returns a tuple with the CreatedBy field value // and a boolean to check if the value has been set. -func (o *ShareOut) GetAudienceOk() (*string, bool) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ShareOut) GetCreatedByOk() (*string, bool) { if o == nil { return nil, false } - return &o.Audience, true + return o.CreatedBy.Get(), o.CreatedBy.IsSet() } -// SetAudience sets field value -func (o *ShareOut) SetAudience(v string) { - o.Audience = v +// SetCreatedBy sets field value +func (o *ShareOut) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) } -// GetCreatedAt returns the CreatedAt field value -func (o *ShareOut) GetCreatedAt() time.Time { +// GetDriveId returns the DriveId field value +func (o *ShareOut) GetDriveId() string { if o == nil { - var ret time.Time + var ret string return ret } - return o.CreatedAt + return o.DriveId } -// GetCreatedAtOk returns a tuple with the CreatedAt field value +// GetDriveIdOk returns a tuple with the DriveId field value // and a boolean to check if the value has been set. -func (o *ShareOut) GetCreatedAtOk() (*time.Time, bool) { +func (o *ShareOut) GetDriveIdOk() (*string, bool) { if o == nil { return nil, false } - return &o.CreatedAt, true + return &o.DriveId, true } -// SetCreatedAt sets field value -func (o *ShareOut) SetCreatedAt(v time.Time) { - o.CreatedAt = v +// SetDriveId sets field value +func (o *ShareOut) SetDriveId(v string) { + o.DriveId = v } -// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise (both if not set or set to explicit null). +// GetExpiresAt returns the ExpiresAt field value +// If the value is explicit nil, the zero value for time.Time will be returned func (o *ShareOut) GetExpiresAt() time.Time { - if o == nil || IsNil(o.ExpiresAt.Get()) { + if o == nil || o.ExpiresAt.Get() == nil { var ret time.Time return ret } + return *o.ExpiresAt.Get() } -// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise +// GetExpiresAtOk returns a tuple with the ExpiresAt field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *ShareOut) GetExpiresAtOk() (*time.Time, bool) { @@ -163,189 +160,181 @@ func (o *ShareOut) GetExpiresAtOk() (*time.Time, bool) { return o.ExpiresAt.Get(), o.ExpiresAt.IsSet() } -// HasExpiresAt returns a boolean if a field has been set. -func (o *ShareOut) HasExpiresAt() bool { - if o != nil && o.ExpiresAt.IsSet() { - return true - } - - return false -} - -// SetExpiresAt gets a reference to the given NullableTime and assigns it to the ExpiresAt field. +// SetExpiresAt sets field value func (o *ShareOut) SetExpiresAt(v time.Time) { o.ExpiresAt.Set(&v) } -// SetExpiresAtNil sets the value for ExpiresAt to be an explicit nil -func (o *ShareOut) SetExpiresAtNil() { - o.ExpiresAt.Set(nil) -} - -// UnsetExpiresAt ensures that no value is present for ExpiresAt, not even an explicit nil -func (o *ShareOut) UnsetExpiresAt() { - o.ExpiresAt.Unset() -} -// GetHasPassword returns the HasPassword field value -func (o *ShareOut) GetHasPassword() bool { +// GetId returns the Id field value +func (o *ShareOut) GetId() string { if o == nil { - var ret bool + var ret string return ret } - return o.HasPassword + return o.Id } -// GetHasPasswordOk returns a tuple with the HasPassword field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. -func (o *ShareOut) GetHasPasswordOk() (*bool, bool) { +func (o *ShareOut) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return &o.HasPassword, true + return &o.Id, true } -// SetHasPassword sets field value -func (o *ShareOut) SetHasPassword(v bool) { - o.HasPassword = v +// SetId sets field value +func (o *ShareOut) SetId(v string) { + o.Id = v } -// GetId returns the Id field value -func (o *ShareOut) GetId() string { +// GetResourceId returns the ResourceId field value +func (o *ShareOut) GetResourceId() string { if o == nil { var ret string return ret } - return o.Id + return o.ResourceId } -// GetIdOk returns a tuple with the Id field value +// GetResourceIdOk returns a tuple with the ResourceId field value // and a boolean to check if the value has been set. -func (o *ShareOut) GetIdOk() (*string, bool) { +func (o *ShareOut) GetResourceIdOk() (*string, bool) { if o == nil { return nil, false } - return &o.Id, true + return &o.ResourceId, true } -// SetId sets field value -func (o *ShareOut) SetId(v string) { - o.Id = v +// SetResourceId sets field value +func (o *ShareOut) SetResourceId(v string) { + o.ResourceId = v } -// GetLastAccessedAt returns the LastAccessedAt field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ShareOut) GetLastAccessedAt() time.Time { - if o == nil || IsNil(o.LastAccessedAt.Get()) { - var ret time.Time +// GetResourceType returns the ResourceType field value +func (o *ShareOut) GetResourceType() string { + if o == nil { + var ret string return ret } - return *o.LastAccessedAt.Get() + + return o.ResourceType } -// GetLastAccessedAtOk returns a tuple with the LastAccessedAt field value if set, nil otherwise +// GetResourceTypeOk returns a tuple with the ResourceType field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ShareOut) GetLastAccessedAtOk() (*time.Time, bool) { +func (o *ShareOut) GetResourceTypeOk() (*string, bool) { if o == nil { return nil, false } - return o.LastAccessedAt.Get(), o.LastAccessedAt.IsSet() + return &o.ResourceType, true +} + +// SetResourceType sets field value +func (o *ShareOut) SetResourceType(v string) { + o.ResourceType = v } -// HasLastAccessedAt returns a boolean if a field has been set. -func (o *ShareOut) HasLastAccessedAt() bool { - if o != nil && o.LastAccessedAt.IsSet() { - return true +// GetRevision returns the Revision field value +func (o *ShareOut) GetRevision() string { + if o == nil { + var ret string + return ret } - return false + return o.Revision } -// SetLastAccessedAt gets a reference to the given NullableTime and assigns it to the LastAccessedAt field. -func (o *ShareOut) SetLastAccessedAt(v time.Time) { - o.LastAccessedAt.Set(&v) -} -// SetLastAccessedAtNil sets the value for LastAccessedAt to be an explicit nil -func (o *ShareOut) SetLastAccessedAtNil() { - o.LastAccessedAt.Set(nil) +// GetRevisionOk returns a tuple with the Revision field value +// and a boolean to check if the value has been set. +func (o *ShareOut) GetRevisionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Revision, true } -// UnsetLastAccessedAt ensures that no value is present for LastAccessedAt, not even an explicit nil -func (o *ShareOut) UnsetLastAccessedAt() { - o.LastAccessedAt.Unset() +// SetRevision sets field value +func (o *ShareOut) SetRevision(v string) { + o.Revision = v } -// GetResourceId returns the ResourceId field value -func (o *ShareOut) GetResourceId() string { - if o == nil { - var ret string +// GetRevokedAt returns the RevokedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *ShareOut) GetRevokedAt() time.Time { + if o == nil || o.RevokedAt.Get() == nil { + var ret time.Time return ret } - return o.ResourceId + return *o.RevokedAt.Get() } -// GetResourceIdOk returns a tuple with the ResourceId field value +// GetRevokedAtOk returns a tuple with the RevokedAt field value // and a boolean to check if the value has been set. -func (o *ShareOut) GetResourceIdOk() (*string, bool) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ShareOut) GetRevokedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ResourceId, true + return o.RevokedAt.Get(), o.RevokedAt.IsSet() } -// SetResourceId sets field value -func (o *ShareOut) SetResourceId(v string) { - o.ResourceId = v +// SetRevokedAt sets field value +func (o *ShareOut) SetRevokedAt(v time.Time) { + o.RevokedAt.Set(&v) } -// GetResourceType returns the ResourceType field value -func (o *ShareOut) GetResourceType() string { - if o == nil { - var ret string +// GetRotatedAt returns the RotatedAt field value +// If the value is explicit nil, the zero value for time.Time will be returned +func (o *ShareOut) GetRotatedAt() time.Time { + if o == nil || o.RotatedAt.Get() == nil { + var ret time.Time return ret } - return o.ResourceType + return *o.RotatedAt.Get() } -// GetResourceTypeOk returns a tuple with the ResourceType field value +// GetRotatedAtOk returns a tuple with the RotatedAt field value // and a boolean to check if the value has been set. -func (o *ShareOut) GetResourceTypeOk() (*string, bool) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ShareOut) GetRotatedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ResourceType, true + return o.RotatedAt.Get(), o.RotatedAt.IsSet() } -// SetResourceType sets field value -func (o *ShareOut) SetResourceType(v string) { - o.ResourceType = v +// SetRotatedAt sets field value +func (o *ShareOut) SetRotatedAt(v time.Time) { + o.RotatedAt.Set(&v) } -// GetRole returns the Role field value -func (o *ShareOut) GetRole() string { +// GetState returns the State field value +func (o *ShareOut) GetState() string { if o == nil { var ret string return ret } - return o.Role + return o.State } -// GetRoleOk returns a tuple with the Role field value +// GetStateOk returns a tuple with the State field value // and a boolean to check if the value has been set. -func (o *ShareOut) GetRoleOk() (*string, bool) { +func (o *ShareOut) GetStateOk() (*string, bool) { if o == nil { return nil, false } - return &o.Role, true + return &o.State, true } -// SetRole sets field value -func (o *ShareOut) SetRole(v string) { - o.Role = v +// SetState sets field value +func (o *ShareOut) SetState(v string) { + o.State = v } func (o ShareOut) MarshalJSON() ([]byte, error) { @@ -358,22 +347,17 @@ func (o ShareOut) MarshalJSON() ([]byte, error) { func (o ShareOut) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.AccessCount) { - toSerialize["access_count"] = o.AccessCount - } - toSerialize["audience"] = o.Audience toSerialize["created_at"] = o.CreatedAt - if o.ExpiresAt.IsSet() { - toSerialize["expires_at"] = o.ExpiresAt.Get() - } - toSerialize["has_password"] = o.HasPassword + toSerialize["created_by"] = o.CreatedBy.Get() + toSerialize["drive_id"] = o.DriveId + toSerialize["expires_at"] = o.ExpiresAt.Get() toSerialize["id"] = o.Id - if o.LastAccessedAt.IsSet() { - toSerialize["last_accessed_at"] = o.LastAccessedAt.Get() - } toSerialize["resource_id"] = o.ResourceId toSerialize["resource_type"] = o.ResourceType - toSerialize["role"] = o.Role + toSerialize["revision"] = o.Revision + toSerialize["revoked_at"] = o.RevokedAt.Get() + toSerialize["rotated_at"] = o.RotatedAt.Get() + toSerialize["state"] = o.State return toSerialize, nil } @@ -382,13 +366,17 @@ func (o *ShareOut) UnmarshalJSON(data []byte) (err error) { // by unmarshalling the object into a generic map with string keys and checking // that every required field exists as a key in the generic map. requiredProperties := []string{ - "audience", "created_at", - "has_password", + "created_by", + "drive_id", + "expires_at", "id", "resource_id", "resource_type", - "role", + "revision", + "revoked_at", + "rotated_at", + "state", } allProperties := make(map[string]interface{}) diff --git a/sdk/go/model_share_redeem_out.go b/sdk/go/model_share_redeem_out.go deleted file mode 100644 index 8f6e0d7..0000000 --- a/sdk/go/model_share_redeem_out.go +++ /dev/null @@ -1,241 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "time" - "bytes" - "fmt" -) - -// checks if the ShareRedeemOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ShareRedeemOut{} - -// ShareRedeemOut struct for ShareRedeemOut -type ShareRedeemOut struct { - ExpiresAt time.Time `json:"expires_at"` - Role string `json:"role"` - Token string `json:"token"` - Url string `json:"url"` -} - -type _ShareRedeemOut ShareRedeemOut - -// NewShareRedeemOut instantiates a new ShareRedeemOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewShareRedeemOut(expiresAt time.Time, role string, token string, url string) *ShareRedeemOut { - this := ShareRedeemOut{} - this.ExpiresAt = expiresAt - this.Role = role - this.Token = token - this.Url = url - return &this -} - -// NewShareRedeemOutWithDefaults instantiates a new ShareRedeemOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewShareRedeemOutWithDefaults() *ShareRedeemOut { - this := ShareRedeemOut{} - return &this -} - -// GetExpiresAt returns the ExpiresAt field value -func (o *ShareRedeemOut) GetExpiresAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.ExpiresAt -} - -// GetExpiresAtOk returns a tuple with the ExpiresAt field value -// and a boolean to check if the value has been set. -func (o *ShareRedeemOut) GetExpiresAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.ExpiresAt, true -} - -// SetExpiresAt sets field value -func (o *ShareRedeemOut) SetExpiresAt(v time.Time) { - o.ExpiresAt = v -} - -// GetRole returns the Role field value -func (o *ShareRedeemOut) GetRole() string { - if o == nil { - var ret string - return ret - } - - return o.Role -} - -// GetRoleOk returns a tuple with the Role field value -// and a boolean to check if the value has been set. -func (o *ShareRedeemOut) GetRoleOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Role, true -} - -// SetRole sets field value -func (o *ShareRedeemOut) SetRole(v string) { - o.Role = v -} - -// GetToken returns the Token field value -func (o *ShareRedeemOut) GetToken() string { - if o == nil { - var ret string - return ret - } - - return o.Token -} - -// GetTokenOk returns a tuple with the Token field value -// and a boolean to check if the value has been set. -func (o *ShareRedeemOut) GetTokenOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Token, true -} - -// SetToken sets field value -func (o *ShareRedeemOut) SetToken(v string) { - o.Token = v -} - -// GetUrl returns the Url field value -func (o *ShareRedeemOut) GetUrl() string { - if o == nil { - var ret string - return ret - } - - return o.Url -} - -// GetUrlOk returns a tuple with the Url field value -// and a boolean to check if the value has been set. -func (o *ShareRedeemOut) GetUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Url, true -} - -// SetUrl sets field value -func (o *ShareRedeemOut) SetUrl(v string) { - o.Url = v -} - -func (o ShareRedeemOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ShareRedeemOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["expires_at"] = o.ExpiresAt - toSerialize["role"] = o.Role - toSerialize["token"] = o.Token - toSerialize["url"] = o.Url - return toSerialize, nil -} - -func (o *ShareRedeemOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "expires_at", - "role", - "token", - "url", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varShareRedeemOut := _ShareRedeemOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varShareRedeemOut) - - if err != nil { - return err - } - - *o = ShareRedeemOut(varShareRedeemOut) - - return err -} - -type NullableShareRedeemOut struct { - value *ShareRedeemOut - isSet bool -} - -func (v NullableShareRedeemOut) Get() *ShareRedeemOut { - return v.value -} - -func (v *NullableShareRedeemOut) Set(val *ShareRedeemOut) { - v.value = val - v.isSet = true -} - -func (v NullableShareRedeemOut) IsSet() bool { - return v.isSet -} - -func (v *NullableShareRedeemOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableShareRedeemOut(val *ShareRedeemOut) *NullableShareRedeemOut { - return &NullableShareRedeemOut{value: val, isSet: true} -} - -func (v NullableShareRedeemOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableShareRedeemOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_source_ref.go b/sdk/go/model_source_ref.go deleted file mode 100644 index 25fca9c..0000000 --- a/sdk/go/model_source_ref.go +++ /dev/null @@ -1,221 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the SourceRef type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SourceRef{} - -// SourceRef One typed provenance ref. `type` is open-vocabulary (server validates only length, not the value), so callers can declare new types as their integrations evolve. `id` is the type-specific identifier — for `type='artifact'` this is an `art_…` ID. -type SourceRef struct { - Id string `json:"id"` - Metadata map[string]interface{} `json:"metadata,omitempty"` - Type string `json:"type"` -} - -type _SourceRef SourceRef - -// NewSourceRef instantiates a new SourceRef object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSourceRef(id string, type_ string) *SourceRef { - this := SourceRef{} - this.Id = id - this.Type = type_ - return &this -} - -// NewSourceRefWithDefaults instantiates a new SourceRef object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSourceRefWithDefaults() *SourceRef { - this := SourceRef{} - return &this -} - -// GetId returns the Id field value -func (o *SourceRef) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *SourceRef) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *SourceRef) SetId(v string) { - o.Id = v -} - -// GetMetadata returns the Metadata field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *SourceRef) GetMetadata() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - return o.Metadata -} - -// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *SourceRef) GetMetadataOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Metadata) { - return map[string]interface{}{}, false - } - return o.Metadata, true -} - -// HasMetadata returns a boolean if a field has been set. -func (o *SourceRef) HasMetadata() bool { - if o != nil && !IsNil(o.Metadata) { - return true - } - - return false -} - -// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. -func (o *SourceRef) SetMetadata(v map[string]interface{}) { - o.Metadata = v -} - -// GetType returns the Type field value -func (o *SourceRef) GetType() string { - if o == nil { - var ret string - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *SourceRef) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *SourceRef) SetType(v string) { - o.Type = v -} - -func (o SourceRef) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SourceRef) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["id"] = o.Id - if o.Metadata != nil { - toSerialize["metadata"] = o.Metadata - } - toSerialize["type"] = o.Type - return toSerialize, nil -} - -func (o *SourceRef) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "id", - "type", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varSourceRef := _SourceRef{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varSourceRef) - - if err != nil { - return err - } - - *o = SourceRef(varSourceRef) - - return err -} - -type NullableSourceRef struct { - value *SourceRef - isSet bool -} - -func (v NullableSourceRef) Get() *SourceRef { - return v.value -} - -func (v *NullableSourceRef) Set(val *SourceRef) { - v.value = val - v.isSet = true -} - -func (v NullableSourceRef) IsSet() bool { - return v.isSet -} - -func (v *NullableSourceRef) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSourceRef(val *SourceRef) *NullableSourceRef { - return &NullableSourceRef{value: val, isSet: true} -} - -func (v NullableSourceRef) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSourceRef) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_storage_breakdown_out.go b/sdk/go/model_storage_breakdown_out.go deleted file mode 100644 index ad67a28..0000000 --- a/sdk/go/model_storage_breakdown_out.go +++ /dev/null @@ -1,240 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the StorageBreakdownOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &StorageBreakdownOut{} - -// StorageBreakdownOut struct for StorageBreakdownOut -type StorageBreakdownOut struct { - AsOf string `json:"as_of"` - LiveBytes int32 `json:"live_bytes"` - TrashBytes int32 `json:"trash_bytes"` - VersionBytes int32 `json:"version_bytes"` -} - -type _StorageBreakdownOut StorageBreakdownOut - -// NewStorageBreakdownOut instantiates a new StorageBreakdownOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewStorageBreakdownOut(asOf string, liveBytes int32, trashBytes int32, versionBytes int32) *StorageBreakdownOut { - this := StorageBreakdownOut{} - this.AsOf = asOf - this.LiveBytes = liveBytes - this.TrashBytes = trashBytes - this.VersionBytes = versionBytes - return &this -} - -// NewStorageBreakdownOutWithDefaults instantiates a new StorageBreakdownOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewStorageBreakdownOutWithDefaults() *StorageBreakdownOut { - this := StorageBreakdownOut{} - return &this -} - -// GetAsOf returns the AsOf field value -func (o *StorageBreakdownOut) GetAsOf() string { - if o == nil { - var ret string - return ret - } - - return o.AsOf -} - -// GetAsOfOk returns a tuple with the AsOf field value -// and a boolean to check if the value has been set. -func (o *StorageBreakdownOut) GetAsOfOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AsOf, true -} - -// SetAsOf sets field value -func (o *StorageBreakdownOut) SetAsOf(v string) { - o.AsOf = v -} - -// GetLiveBytes returns the LiveBytes field value -func (o *StorageBreakdownOut) GetLiveBytes() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.LiveBytes -} - -// GetLiveBytesOk returns a tuple with the LiveBytes field value -// and a boolean to check if the value has been set. -func (o *StorageBreakdownOut) GetLiveBytesOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.LiveBytes, true -} - -// SetLiveBytes sets field value -func (o *StorageBreakdownOut) SetLiveBytes(v int32) { - o.LiveBytes = v -} - -// GetTrashBytes returns the TrashBytes field value -func (o *StorageBreakdownOut) GetTrashBytes() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.TrashBytes -} - -// GetTrashBytesOk returns a tuple with the TrashBytes field value -// and a boolean to check if the value has been set. -func (o *StorageBreakdownOut) GetTrashBytesOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.TrashBytes, true -} - -// SetTrashBytes sets field value -func (o *StorageBreakdownOut) SetTrashBytes(v int32) { - o.TrashBytes = v -} - -// GetVersionBytes returns the VersionBytes field value -func (o *StorageBreakdownOut) GetVersionBytes() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.VersionBytes -} - -// GetVersionBytesOk returns a tuple with the VersionBytes field value -// and a boolean to check if the value has been set. -func (o *StorageBreakdownOut) GetVersionBytesOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.VersionBytes, true -} - -// SetVersionBytes sets field value -func (o *StorageBreakdownOut) SetVersionBytes(v int32) { - o.VersionBytes = v -} - -func (o StorageBreakdownOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o StorageBreakdownOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["as_of"] = o.AsOf - toSerialize["live_bytes"] = o.LiveBytes - toSerialize["trash_bytes"] = o.TrashBytes - toSerialize["version_bytes"] = o.VersionBytes - return toSerialize, nil -} - -func (o *StorageBreakdownOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "as_of", - "live_bytes", - "trash_bytes", - "version_bytes", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varStorageBreakdownOut := _StorageBreakdownOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varStorageBreakdownOut) - - if err != nil { - return err - } - - *o = StorageBreakdownOut(varStorageBreakdownOut) - - return err -} - -type NullableStorageBreakdownOut struct { - value *StorageBreakdownOut - isSet bool -} - -func (v NullableStorageBreakdownOut) Get() *StorageBreakdownOut { - return v.value -} - -func (v *NullableStorageBreakdownOut) Set(val *StorageBreakdownOut) { - v.value = val - v.isSet = true -} - -func (v NullableStorageBreakdownOut) IsSet() bool { - return v.isSet -} - -func (v *NullableStorageBreakdownOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableStorageBreakdownOut(val *StorageBreakdownOut) *NullableStorageBreakdownOut { - return &NullableStorageBreakdownOut{value: val, isSet: true} -} - -func (v NullableStorageBreakdownOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableStorageBreakdownOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_storage_footprint_out.go b/sdk/go/model_storage_footprint_out.go deleted file mode 100644 index c31fdde..0000000 --- a/sdk/go/model_storage_footprint_out.go +++ /dev/null @@ -1,286 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the StorageFootprintOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &StorageFootprintOut{} - -// StorageFootprintOut struct for StorageFootprintOut -type StorageFootprintOut struct { - AsOf NullableString `json:"as_of,omitempty"` - LiveBytes int32 `json:"live_bytes"` - TotalBytes int32 `json:"total_bytes"` - TrashBytes int32 `json:"trash_bytes"` - VersionBytes int32 `json:"version_bytes"` -} - -type _StorageFootprintOut StorageFootprintOut - -// NewStorageFootprintOut instantiates a new StorageFootprintOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewStorageFootprintOut(liveBytes int32, totalBytes int32, trashBytes int32, versionBytes int32) *StorageFootprintOut { - this := StorageFootprintOut{} - this.LiveBytes = liveBytes - this.TotalBytes = totalBytes - this.TrashBytes = trashBytes - this.VersionBytes = versionBytes - return &this -} - -// NewStorageFootprintOutWithDefaults instantiates a new StorageFootprintOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewStorageFootprintOutWithDefaults() *StorageFootprintOut { - this := StorageFootprintOut{} - return &this -} - -// GetAsOf returns the AsOf field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *StorageFootprintOut) GetAsOf() string { - if o == nil || IsNil(o.AsOf.Get()) { - var ret string - return ret - } - return *o.AsOf.Get() -} - -// GetAsOfOk returns a tuple with the AsOf field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *StorageFootprintOut) GetAsOfOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.AsOf.Get(), o.AsOf.IsSet() -} - -// HasAsOf returns a boolean if a field has been set. -func (o *StorageFootprintOut) HasAsOf() bool { - if o != nil && o.AsOf.IsSet() { - return true - } - - return false -} - -// SetAsOf gets a reference to the given NullableString and assigns it to the AsOf field. -func (o *StorageFootprintOut) SetAsOf(v string) { - o.AsOf.Set(&v) -} -// SetAsOfNil sets the value for AsOf to be an explicit nil -func (o *StorageFootprintOut) SetAsOfNil() { - o.AsOf.Set(nil) -} - -// UnsetAsOf ensures that no value is present for AsOf, not even an explicit nil -func (o *StorageFootprintOut) UnsetAsOf() { - o.AsOf.Unset() -} - -// GetLiveBytes returns the LiveBytes field value -func (o *StorageFootprintOut) GetLiveBytes() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.LiveBytes -} - -// GetLiveBytesOk returns a tuple with the LiveBytes field value -// and a boolean to check if the value has been set. -func (o *StorageFootprintOut) GetLiveBytesOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.LiveBytes, true -} - -// SetLiveBytes sets field value -func (o *StorageFootprintOut) SetLiveBytes(v int32) { - o.LiveBytes = v -} - -// GetTotalBytes returns the TotalBytes field value -func (o *StorageFootprintOut) GetTotalBytes() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.TotalBytes -} - -// GetTotalBytesOk returns a tuple with the TotalBytes field value -// and a boolean to check if the value has been set. -func (o *StorageFootprintOut) GetTotalBytesOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.TotalBytes, true -} - -// SetTotalBytes sets field value -func (o *StorageFootprintOut) SetTotalBytes(v int32) { - o.TotalBytes = v -} - -// GetTrashBytes returns the TrashBytes field value -func (o *StorageFootprintOut) GetTrashBytes() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.TrashBytes -} - -// GetTrashBytesOk returns a tuple with the TrashBytes field value -// and a boolean to check if the value has been set. -func (o *StorageFootprintOut) GetTrashBytesOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.TrashBytes, true -} - -// SetTrashBytes sets field value -func (o *StorageFootprintOut) SetTrashBytes(v int32) { - o.TrashBytes = v -} - -// GetVersionBytes returns the VersionBytes field value -func (o *StorageFootprintOut) GetVersionBytes() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.VersionBytes -} - -// GetVersionBytesOk returns a tuple with the VersionBytes field value -// and a boolean to check if the value has been set. -func (o *StorageFootprintOut) GetVersionBytesOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.VersionBytes, true -} - -// SetVersionBytes sets field value -func (o *StorageFootprintOut) SetVersionBytes(v int32) { - o.VersionBytes = v -} - -func (o StorageFootprintOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o StorageFootprintOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.AsOf.IsSet() { - toSerialize["as_of"] = o.AsOf.Get() - } - toSerialize["live_bytes"] = o.LiveBytes - toSerialize["total_bytes"] = o.TotalBytes - toSerialize["trash_bytes"] = o.TrashBytes - toSerialize["version_bytes"] = o.VersionBytes - return toSerialize, nil -} - -func (o *StorageFootprintOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "live_bytes", - "total_bytes", - "trash_bytes", - "version_bytes", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varStorageFootprintOut := _StorageFootprintOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varStorageFootprintOut) - - if err != nil { - return err - } - - *o = StorageFootprintOut(varStorageFootprintOut) - - return err -} - -type NullableStorageFootprintOut struct { - value *StorageFootprintOut - isSet bool -} - -func (v NullableStorageFootprintOut) Get() *StorageFootprintOut { - return v.value -} - -func (v *NullableStorageFootprintOut) Set(val *StorageFootprintOut) { - v.value = val - v.isSet = true -} - -func (v NullableStorageFootprintOut) IsSet() bool { - return v.isSet -} - -func (v *NullableStorageFootprintOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableStorageFootprintOut(val *StorageFootprintOut) *NullableStorageFootprintOut { - return &NullableStorageFootprintOut{value: val, isSet: true} -} - -func (v NullableStorageFootprintOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableStorageFootprintOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_token_response.go b/sdk/go/model_token_response.go deleted file mode 100644 index 2cf9fea..0000000 --- a/sdk/go/model_token_response.go +++ /dev/null @@ -1,299 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the TokenResponse type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TokenResponse{} - -// TokenResponse `POST /oauth2/token` success response. Mirrors RFC 6749 with an optional `identity_assertion` field for the claim grant path (where a fresh post-claim assertion supersedes the pre-claim one). -type TokenResponse struct { - AccessToken string `json:"access_token"` - // Seconds until access_token expiry. - ExpiresIn int32 `json:"expires_in"` - IdentityAssertion NullableString `json:"identity_assertion,omitempty"` - Scope string `json:"scope"` - TokenType *string `json:"token_type,omitempty"` -} - -type _TokenResponse TokenResponse - -// NewTokenResponse instantiates a new TokenResponse object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTokenResponse(accessToken string, expiresIn int32, scope string) *TokenResponse { - this := TokenResponse{} - this.AccessToken = accessToken - this.ExpiresIn = expiresIn - this.Scope = scope - var tokenType string = "Bearer" - this.TokenType = &tokenType - return &this -} - -// NewTokenResponseWithDefaults instantiates a new TokenResponse object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTokenResponseWithDefaults() *TokenResponse { - this := TokenResponse{} - var tokenType string = "Bearer" - this.TokenType = &tokenType - return &this -} - -// GetAccessToken returns the AccessToken field value -func (o *TokenResponse) GetAccessToken() string { - if o == nil { - var ret string - return ret - } - - return o.AccessToken -} - -// GetAccessTokenOk returns a tuple with the AccessToken field value -// and a boolean to check if the value has been set. -func (o *TokenResponse) GetAccessTokenOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.AccessToken, true -} - -// SetAccessToken sets field value -func (o *TokenResponse) SetAccessToken(v string) { - o.AccessToken = v -} - -// GetExpiresIn returns the ExpiresIn field value -func (o *TokenResponse) GetExpiresIn() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.ExpiresIn -} - -// GetExpiresInOk returns a tuple with the ExpiresIn field value -// and a boolean to check if the value has been set. -func (o *TokenResponse) GetExpiresInOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.ExpiresIn, true -} - -// SetExpiresIn sets field value -func (o *TokenResponse) SetExpiresIn(v int32) { - o.ExpiresIn = v -} - -// GetIdentityAssertion returns the IdentityAssertion field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *TokenResponse) GetIdentityAssertion() string { - if o == nil || IsNil(o.IdentityAssertion.Get()) { - var ret string - return ret - } - return *o.IdentityAssertion.Get() -} - -// GetIdentityAssertionOk returns a tuple with the IdentityAssertion field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *TokenResponse) GetIdentityAssertionOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.IdentityAssertion.Get(), o.IdentityAssertion.IsSet() -} - -// HasIdentityAssertion returns a boolean if a field has been set. -func (o *TokenResponse) HasIdentityAssertion() bool { - if o != nil && o.IdentityAssertion.IsSet() { - return true - } - - return false -} - -// SetIdentityAssertion gets a reference to the given NullableString and assigns it to the IdentityAssertion field. -func (o *TokenResponse) SetIdentityAssertion(v string) { - o.IdentityAssertion.Set(&v) -} -// SetIdentityAssertionNil sets the value for IdentityAssertion to be an explicit nil -func (o *TokenResponse) SetIdentityAssertionNil() { - o.IdentityAssertion.Set(nil) -} - -// UnsetIdentityAssertion ensures that no value is present for IdentityAssertion, not even an explicit nil -func (o *TokenResponse) UnsetIdentityAssertion() { - o.IdentityAssertion.Unset() -} - -// GetScope returns the Scope field value -func (o *TokenResponse) GetScope() string { - if o == nil { - var ret string - return ret - } - - return o.Scope -} - -// GetScopeOk returns a tuple with the Scope field value -// and a boolean to check if the value has been set. -func (o *TokenResponse) GetScopeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Scope, true -} - -// SetScope sets field value -func (o *TokenResponse) SetScope(v string) { - o.Scope = v -} - -// GetTokenType returns the TokenType field value if set, zero value otherwise. -func (o *TokenResponse) GetTokenType() string { - if o == nil || IsNil(o.TokenType) { - var ret string - return ret - } - return *o.TokenType -} - -// GetTokenTypeOk returns a tuple with the TokenType field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *TokenResponse) GetTokenTypeOk() (*string, bool) { - if o == nil || IsNil(o.TokenType) { - return nil, false - } - return o.TokenType, true -} - -// HasTokenType returns a boolean if a field has been set. -func (o *TokenResponse) HasTokenType() bool { - if o != nil && !IsNil(o.TokenType) { - return true - } - - return false -} - -// SetTokenType gets a reference to the given string and assigns it to the TokenType field. -func (o *TokenResponse) SetTokenType(v string) { - o.TokenType = &v -} - -func (o TokenResponse) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TokenResponse) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["access_token"] = o.AccessToken - toSerialize["expires_in"] = o.ExpiresIn - if o.IdentityAssertion.IsSet() { - toSerialize["identity_assertion"] = o.IdentityAssertion.Get() - } - toSerialize["scope"] = o.Scope - if !IsNil(o.TokenType) { - toSerialize["token_type"] = o.TokenType - } - return toSerialize, nil -} - -func (o *TokenResponse) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "access_token", - "expires_in", - "scope", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varTokenResponse := _TokenResponse{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varTokenResponse) - - if err != nil { - return err - } - - *o = TokenResponse(varTokenResponse) - - return err -} - -type NullableTokenResponse struct { - value *TokenResponse - isSet bool -} - -func (v NullableTokenResponse) Get() *TokenResponse { - return v.value -} - -func (v *NullableTokenResponse) Set(val *TokenResponse) { - v.value = val - v.isSet = true -} - -func (v NullableTokenResponse) IsSet() bool { - return v.isSet -} - -func (v *NullableTokenResponse) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTokenResponse(val *TokenResponse) *NullableTokenResponse { - return &NullableTokenResponse{value: val, isSet: true} -} - -func (v NullableTokenResponse) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTokenResponse) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_token_usage_out.go b/sdk/go/model_token_usage_out.go deleted file mode 100644 index 1f77211..0000000 --- a/sdk/go/model_token_usage_out.go +++ /dev/null @@ -1,240 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the TokenUsageOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TokenUsageOut{} - -// TokenUsageOut struct for TokenUsageOut -type TokenUsageOut struct { - Embed int32 `json:"embed"` - LlmCached int32 `json:"llm_cached"` - LlmInput int32 `json:"llm_input"` - LlmOutput int32 `json:"llm_output"` -} - -type _TokenUsageOut TokenUsageOut - -// NewTokenUsageOut instantiates a new TokenUsageOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTokenUsageOut(embed int32, llmCached int32, llmInput int32, llmOutput int32) *TokenUsageOut { - this := TokenUsageOut{} - this.Embed = embed - this.LlmCached = llmCached - this.LlmInput = llmInput - this.LlmOutput = llmOutput - return &this -} - -// NewTokenUsageOutWithDefaults instantiates a new TokenUsageOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTokenUsageOutWithDefaults() *TokenUsageOut { - this := TokenUsageOut{} - return &this -} - -// GetEmbed returns the Embed field value -func (o *TokenUsageOut) GetEmbed() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Embed -} - -// GetEmbedOk returns a tuple with the Embed field value -// and a boolean to check if the value has been set. -func (o *TokenUsageOut) GetEmbedOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Embed, true -} - -// SetEmbed sets field value -func (o *TokenUsageOut) SetEmbed(v int32) { - o.Embed = v -} - -// GetLlmCached returns the LlmCached field value -func (o *TokenUsageOut) GetLlmCached() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.LlmCached -} - -// GetLlmCachedOk returns a tuple with the LlmCached field value -// and a boolean to check if the value has been set. -func (o *TokenUsageOut) GetLlmCachedOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.LlmCached, true -} - -// SetLlmCached sets field value -func (o *TokenUsageOut) SetLlmCached(v int32) { - o.LlmCached = v -} - -// GetLlmInput returns the LlmInput field value -func (o *TokenUsageOut) GetLlmInput() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.LlmInput -} - -// GetLlmInputOk returns a tuple with the LlmInput field value -// and a boolean to check if the value has been set. -func (o *TokenUsageOut) GetLlmInputOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.LlmInput, true -} - -// SetLlmInput sets field value -func (o *TokenUsageOut) SetLlmInput(v int32) { - o.LlmInput = v -} - -// GetLlmOutput returns the LlmOutput field value -func (o *TokenUsageOut) GetLlmOutput() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.LlmOutput -} - -// GetLlmOutputOk returns a tuple with the LlmOutput field value -// and a boolean to check if the value has been set. -func (o *TokenUsageOut) GetLlmOutputOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.LlmOutput, true -} - -// SetLlmOutput sets field value -func (o *TokenUsageOut) SetLlmOutput(v int32) { - o.LlmOutput = v -} - -func (o TokenUsageOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TokenUsageOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["embed"] = o.Embed - toSerialize["llm_cached"] = o.LlmCached - toSerialize["llm_input"] = o.LlmInput - toSerialize["llm_output"] = o.LlmOutput - return toSerialize, nil -} - -func (o *TokenUsageOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "embed", - "llm_cached", - "llm_input", - "llm_output", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varTokenUsageOut := _TokenUsageOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varTokenUsageOut) - - if err != nil { - return err - } - - *o = TokenUsageOut(varTokenUsageOut) - - return err -} - -type NullableTokenUsageOut struct { - value *TokenUsageOut - isSet bool -} - -func (v NullableTokenUsageOut) Get() *TokenUsageOut { - return v.value -} - -func (v *NullableTokenUsageOut) Set(val *TokenUsageOut) { - v.value = val - v.isSet = true -} - -func (v NullableTokenUsageOut) IsSet() bool { - return v.isSet -} - -func (v *NullableTokenUsageOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTokenUsageOut(val *TokenUsageOut) *NullableTokenUsageOut { - return &NullableTokenUsageOut{value: val, isSet: true} -} - -func (v NullableTokenUsageOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTokenUsageOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_trash_artifact_out.go b/sdk/go/model_trash_artifact_out.go deleted file mode 100644 index b099880..0000000 --- a/sdk/go/model_trash_artifact_out.go +++ /dev/null @@ -1,333 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "time" - "bytes" - "fmt" -) - -// checks if the TrashArtifactOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TrashArtifactOut{} - -// TrashArtifactOut struct for TrashArtifactOut -type TrashArtifactOut struct { - DeletedAt NullableTime `json:"deleted_at,omitempty"` - Id string `json:"id"` - Path string `json:"path"` - PurgeAt NullableTime `json:"purge_at,omitempty"` - RestoreUrl string `json:"restore_url"` - SizeBytes int32 `json:"size_bytes"` -} - -type _TrashArtifactOut TrashArtifactOut - -// NewTrashArtifactOut instantiates a new TrashArtifactOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTrashArtifactOut(id string, path string, restoreUrl string, sizeBytes int32) *TrashArtifactOut { - this := TrashArtifactOut{} - this.Id = id - this.Path = path - this.RestoreUrl = restoreUrl - this.SizeBytes = sizeBytes - return &this -} - -// NewTrashArtifactOutWithDefaults instantiates a new TrashArtifactOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTrashArtifactOutWithDefaults() *TrashArtifactOut { - this := TrashArtifactOut{} - return &this -} - -// GetDeletedAt returns the DeletedAt field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *TrashArtifactOut) GetDeletedAt() time.Time { - if o == nil || IsNil(o.DeletedAt.Get()) { - var ret time.Time - return ret - } - return *o.DeletedAt.Get() -} - -// GetDeletedAtOk returns a tuple with the DeletedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *TrashArtifactOut) GetDeletedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.DeletedAt.Get(), o.DeletedAt.IsSet() -} - -// HasDeletedAt returns a boolean if a field has been set. -func (o *TrashArtifactOut) HasDeletedAt() bool { - if o != nil && o.DeletedAt.IsSet() { - return true - } - - return false -} - -// SetDeletedAt gets a reference to the given NullableTime and assigns it to the DeletedAt field. -func (o *TrashArtifactOut) SetDeletedAt(v time.Time) { - o.DeletedAt.Set(&v) -} -// SetDeletedAtNil sets the value for DeletedAt to be an explicit nil -func (o *TrashArtifactOut) SetDeletedAtNil() { - o.DeletedAt.Set(nil) -} - -// UnsetDeletedAt ensures that no value is present for DeletedAt, not even an explicit nil -func (o *TrashArtifactOut) UnsetDeletedAt() { - o.DeletedAt.Unset() -} - -// GetId returns the Id field value -func (o *TrashArtifactOut) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *TrashArtifactOut) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *TrashArtifactOut) SetId(v string) { - o.Id = v -} - -// GetPath returns the Path field value -func (o *TrashArtifactOut) GetPath() string { - if o == nil { - var ret string - return ret - } - - return o.Path -} - -// GetPathOk returns a tuple with the Path field value -// and a boolean to check if the value has been set. -func (o *TrashArtifactOut) GetPathOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Path, true -} - -// SetPath sets field value -func (o *TrashArtifactOut) SetPath(v string) { - o.Path = v -} - -// GetPurgeAt returns the PurgeAt field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *TrashArtifactOut) GetPurgeAt() time.Time { - if o == nil || IsNil(o.PurgeAt.Get()) { - var ret time.Time - return ret - } - return *o.PurgeAt.Get() -} - -// GetPurgeAtOk returns a tuple with the PurgeAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *TrashArtifactOut) GetPurgeAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.PurgeAt.Get(), o.PurgeAt.IsSet() -} - -// HasPurgeAt returns a boolean if a field has been set. -func (o *TrashArtifactOut) HasPurgeAt() bool { - if o != nil && o.PurgeAt.IsSet() { - return true - } - - return false -} - -// SetPurgeAt gets a reference to the given NullableTime and assigns it to the PurgeAt field. -func (o *TrashArtifactOut) SetPurgeAt(v time.Time) { - o.PurgeAt.Set(&v) -} -// SetPurgeAtNil sets the value for PurgeAt to be an explicit nil -func (o *TrashArtifactOut) SetPurgeAtNil() { - o.PurgeAt.Set(nil) -} - -// UnsetPurgeAt ensures that no value is present for PurgeAt, not even an explicit nil -func (o *TrashArtifactOut) UnsetPurgeAt() { - o.PurgeAt.Unset() -} - -// GetRestoreUrl returns the RestoreUrl field value -func (o *TrashArtifactOut) GetRestoreUrl() string { - if o == nil { - var ret string - return ret - } - - return o.RestoreUrl -} - -// GetRestoreUrlOk returns a tuple with the RestoreUrl field value -// and a boolean to check if the value has been set. -func (o *TrashArtifactOut) GetRestoreUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.RestoreUrl, true -} - -// SetRestoreUrl sets field value -func (o *TrashArtifactOut) SetRestoreUrl(v string) { - o.RestoreUrl = v -} - -// GetSizeBytes returns the SizeBytes field value -func (o *TrashArtifactOut) GetSizeBytes() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.SizeBytes -} - -// GetSizeBytesOk returns a tuple with the SizeBytes field value -// and a boolean to check if the value has been set. -func (o *TrashArtifactOut) GetSizeBytesOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.SizeBytes, true -} - -// SetSizeBytes sets field value -func (o *TrashArtifactOut) SetSizeBytes(v int32) { - o.SizeBytes = v -} - -func (o TrashArtifactOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TrashArtifactOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.DeletedAt.IsSet() { - toSerialize["deleted_at"] = o.DeletedAt.Get() - } - toSerialize["id"] = o.Id - toSerialize["path"] = o.Path - if o.PurgeAt.IsSet() { - toSerialize["purge_at"] = o.PurgeAt.Get() - } - toSerialize["restore_url"] = o.RestoreUrl - toSerialize["size_bytes"] = o.SizeBytes - return toSerialize, nil -} - -func (o *TrashArtifactOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "id", - "path", - "restore_url", - "size_bytes", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varTrashArtifactOut := _TrashArtifactOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varTrashArtifactOut) - - if err != nil { - return err - } - - *o = TrashArtifactOut(varTrashArtifactOut) - - return err -} - -type NullableTrashArtifactOut struct { - value *TrashArtifactOut - isSet bool -} - -func (v NullableTrashArtifactOut) Get() *TrashArtifactOut { - return v.value -} - -func (v *NullableTrashArtifactOut) Set(val *TrashArtifactOut) { - v.value = val - v.isSet = true -} - -func (v NullableTrashArtifactOut) IsSet() bool { - return v.isSet -} - -func (v *NullableTrashArtifactOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTrashArtifactOut(val *TrashArtifactOut) *NullableTrashArtifactOut { - return &NullableTrashArtifactOut{value: val, isSet: true} -} - -func (v NullableTrashArtifactOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTrashArtifactOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_trash_drive_out.go b/sdk/go/model_trash_drive_out.go deleted file mode 100644 index fecd9cc..0000000 --- a/sdk/go/model_trash_drive_out.go +++ /dev/null @@ -1,203 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "time" - "bytes" - "fmt" -) - -// checks if the TrashDriveOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TrashDriveOut{} - -// TrashDriveOut struct for TrashDriveOut -type TrashDriveOut struct { - DeletedAt NullableTime `json:"deleted_at,omitempty"` - Id string `json:"id"` -} - -type _TrashDriveOut TrashDriveOut - -// NewTrashDriveOut instantiates a new TrashDriveOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTrashDriveOut(id string) *TrashDriveOut { - this := TrashDriveOut{} - this.Id = id - return &this -} - -// NewTrashDriveOutWithDefaults instantiates a new TrashDriveOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTrashDriveOutWithDefaults() *TrashDriveOut { - this := TrashDriveOut{} - return &this -} - -// GetDeletedAt returns the DeletedAt field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *TrashDriveOut) GetDeletedAt() time.Time { - if o == nil || IsNil(o.DeletedAt.Get()) { - var ret time.Time - return ret - } - return *o.DeletedAt.Get() -} - -// GetDeletedAtOk returns a tuple with the DeletedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *TrashDriveOut) GetDeletedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.DeletedAt.Get(), o.DeletedAt.IsSet() -} - -// HasDeletedAt returns a boolean if a field has been set. -func (o *TrashDriveOut) HasDeletedAt() bool { - if o != nil && o.DeletedAt.IsSet() { - return true - } - - return false -} - -// SetDeletedAt gets a reference to the given NullableTime and assigns it to the DeletedAt field. -func (o *TrashDriveOut) SetDeletedAt(v time.Time) { - o.DeletedAt.Set(&v) -} -// SetDeletedAtNil sets the value for DeletedAt to be an explicit nil -func (o *TrashDriveOut) SetDeletedAtNil() { - o.DeletedAt.Set(nil) -} - -// UnsetDeletedAt ensures that no value is present for DeletedAt, not even an explicit nil -func (o *TrashDriveOut) UnsetDeletedAt() { - o.DeletedAt.Unset() -} - -// GetId returns the Id field value -func (o *TrashDriveOut) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *TrashDriveOut) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *TrashDriveOut) SetId(v string) { - o.Id = v -} - -func (o TrashDriveOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TrashDriveOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.DeletedAt.IsSet() { - toSerialize["deleted_at"] = o.DeletedAt.Get() - } - toSerialize["id"] = o.Id - return toSerialize, nil -} - -func (o *TrashDriveOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "id", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varTrashDriveOut := _TrashDriveOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varTrashDriveOut) - - if err != nil { - return err - } - - *o = TrashDriveOut(varTrashDriveOut) - - return err -} - -type NullableTrashDriveOut struct { - value *TrashDriveOut - isSet bool -} - -func (v NullableTrashDriveOut) Get() *TrashDriveOut { - return v.value -} - -func (v *NullableTrashDriveOut) Set(val *TrashDriveOut) { - v.value = val - v.isSet = true -} - -func (v NullableTrashDriveOut) IsSet() bool { - return v.isSet -} - -func (v *NullableTrashDriveOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTrashDriveOut(val *TrashDriveOut) *NullableTrashDriveOut { - return &NullableTrashDriveOut{value: val, isSet: true} -} - -func (v NullableTrashDriveOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTrashDriveOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_trash_out.go b/sdk/go/model_trash_out.go deleted file mode 100644 index b040a28..0000000 --- a/sdk/go/model_trash_out.go +++ /dev/null @@ -1,263 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the TrashOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &TrashOut{} - -// TrashOut Trash collection with a compatibility-preserving pagination opt-in. -type TrashOut struct { - // Deprecated alias of items. - // Deprecated - Artifacts []TrashArtifactOut `json:"artifacts"` - Drive TrashDriveOut `json:"drive"` - Items []TrashArtifactOut `json:"items"` - NextCursor NullableString `json:"next_cursor,omitempty"` -} - -type _TrashOut TrashOut - -// NewTrashOut instantiates a new TrashOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewTrashOut(artifacts []TrashArtifactOut, drive TrashDriveOut, items []TrashArtifactOut) *TrashOut { - this := TrashOut{} - this.Artifacts = artifacts - this.Drive = drive - this.Items = items - return &this -} - -// NewTrashOutWithDefaults instantiates a new TrashOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewTrashOutWithDefaults() *TrashOut { - this := TrashOut{} - return &this -} - -// GetArtifacts returns the Artifacts field value -// Deprecated -func (o *TrashOut) GetArtifacts() []TrashArtifactOut { - if o == nil { - var ret []TrashArtifactOut - return ret - } - - return o.Artifacts -} - -// GetArtifactsOk returns a tuple with the Artifacts field value -// and a boolean to check if the value has been set. -// Deprecated -func (o *TrashOut) GetArtifactsOk() ([]TrashArtifactOut, bool) { - if o == nil { - return nil, false - } - return o.Artifacts, true -} - -// SetArtifacts sets field value -// Deprecated -func (o *TrashOut) SetArtifacts(v []TrashArtifactOut) { - o.Artifacts = v -} - -// GetDrive returns the Drive field value -func (o *TrashOut) GetDrive() TrashDriveOut { - if o == nil { - var ret TrashDriveOut - return ret - } - - return o.Drive -} - -// GetDriveOk returns a tuple with the Drive field value -// and a boolean to check if the value has been set. -func (o *TrashOut) GetDriveOk() (*TrashDriveOut, bool) { - if o == nil { - return nil, false - } - return &o.Drive, true -} - -// SetDrive sets field value -func (o *TrashOut) SetDrive(v TrashDriveOut) { - o.Drive = v -} - -// GetItems returns the Items field value -func (o *TrashOut) GetItems() []TrashArtifactOut { - if o == nil { - var ret []TrashArtifactOut - return ret - } - - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value -// and a boolean to check if the value has been set. -func (o *TrashOut) GetItemsOk() ([]TrashArtifactOut, bool) { - if o == nil { - return nil, false - } - return o.Items, true -} - -// SetItems sets field value -func (o *TrashOut) SetItems(v []TrashArtifactOut) { - o.Items = v -} - -// GetNextCursor returns the NextCursor field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *TrashOut) GetNextCursor() string { - if o == nil || IsNil(o.NextCursor.Get()) { - var ret string - return ret - } - return *o.NextCursor.Get() -} - -// GetNextCursorOk returns a tuple with the NextCursor field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *TrashOut) GetNextCursorOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.NextCursor.Get(), o.NextCursor.IsSet() -} - -// HasNextCursor returns a boolean if a field has been set. -func (o *TrashOut) HasNextCursor() bool { - if o != nil && o.NextCursor.IsSet() { - return true - } - - return false -} - -// SetNextCursor gets a reference to the given NullableString and assigns it to the NextCursor field. -func (o *TrashOut) SetNextCursor(v string) { - o.NextCursor.Set(&v) -} -// SetNextCursorNil sets the value for NextCursor to be an explicit nil -func (o *TrashOut) SetNextCursorNil() { - o.NextCursor.Set(nil) -} - -// UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil -func (o *TrashOut) UnsetNextCursor() { - o.NextCursor.Unset() -} - -func (o TrashOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o TrashOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["artifacts"] = o.Artifacts - toSerialize["drive"] = o.Drive - toSerialize["items"] = o.Items - if o.NextCursor.IsSet() { - toSerialize["next_cursor"] = o.NextCursor.Get() - } - return toSerialize, nil -} - -func (o *TrashOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "artifacts", - "drive", - "items", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varTrashOut := _TrashOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varTrashOut) - - if err != nil { - return err - } - - *o = TrashOut(varTrashOut) - - return err -} - -type NullableTrashOut struct { - value *TrashOut - isSet bool -} - -func (v NullableTrashOut) Get() *TrashOut { - return v.value -} - -func (v *NullableTrashOut) Set(val *TrashOut) { - v.value = val - v.isSet = true -} - -func (v NullableTrashOut) IsSet() bool { - return v.isSet -} - -func (v *NullableTrashOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableTrashOut(val *TrashOut) *NullableTrashOut { - return &NullableTrashOut{value: val, isSet: true} -} - -func (v NullableTrashOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableTrashOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_upload_abort_out.go b/sdk/go/model_upload_abort_out.go deleted file mode 100644 index 564c845..0000000 --- a/sdk/go/model_upload_abort_out.go +++ /dev/null @@ -1,224 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the UploadAbortOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UploadAbortOut{} - -// UploadAbortOut Response of `DELETE /v0/uploads/{upload_id}` — the session is released. `released_bytes` is the reservation returned to the drive's quota (the session's `size_bytes` for a live `initiated` session; `0` when the session was already aborted or already expired — the GC sweep owns an expired session's release). -type UploadAbortOut struct { - ReleasedBytes int32 `json:"released_bytes"` - State *string `json:"state,omitempty"` - UploadId string `json:"upload_id"` -} - -type _UploadAbortOut UploadAbortOut - -// NewUploadAbortOut instantiates a new UploadAbortOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUploadAbortOut(releasedBytes int32, uploadId string) *UploadAbortOut { - this := UploadAbortOut{} - this.ReleasedBytes = releasedBytes - var state string = "aborted" - this.State = &state - this.UploadId = uploadId - return &this -} - -// NewUploadAbortOutWithDefaults instantiates a new UploadAbortOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUploadAbortOutWithDefaults() *UploadAbortOut { - this := UploadAbortOut{} - var state string = "aborted" - this.State = &state - return &this -} - -// GetReleasedBytes returns the ReleasedBytes field value -func (o *UploadAbortOut) GetReleasedBytes() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.ReleasedBytes -} - -// GetReleasedBytesOk returns a tuple with the ReleasedBytes field value -// and a boolean to check if the value has been set. -func (o *UploadAbortOut) GetReleasedBytesOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.ReleasedBytes, true -} - -// SetReleasedBytes sets field value -func (o *UploadAbortOut) SetReleasedBytes(v int32) { - o.ReleasedBytes = v -} - -// GetState returns the State field value if set, zero value otherwise. -func (o *UploadAbortOut) GetState() string { - if o == nil || IsNil(o.State) { - var ret string - return ret - } - return *o.State -} - -// GetStateOk returns a tuple with the State field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UploadAbortOut) GetStateOk() (*string, bool) { - if o == nil || IsNil(o.State) { - return nil, false - } - return o.State, true -} - -// HasState returns a boolean if a field has been set. -func (o *UploadAbortOut) HasState() bool { - if o != nil && !IsNil(o.State) { - return true - } - - return false -} - -// SetState gets a reference to the given string and assigns it to the State field. -func (o *UploadAbortOut) SetState(v string) { - o.State = &v -} - -// GetUploadId returns the UploadId field value -func (o *UploadAbortOut) GetUploadId() string { - if o == nil { - var ret string - return ret - } - - return o.UploadId -} - -// GetUploadIdOk returns a tuple with the UploadId field value -// and a boolean to check if the value has been set. -func (o *UploadAbortOut) GetUploadIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.UploadId, true -} - -// SetUploadId sets field value -func (o *UploadAbortOut) SetUploadId(v string) { - o.UploadId = v -} - -func (o UploadAbortOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UploadAbortOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["released_bytes"] = o.ReleasedBytes - if !IsNil(o.State) { - toSerialize["state"] = o.State - } - toSerialize["upload_id"] = o.UploadId - return toSerialize, nil -} - -func (o *UploadAbortOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "released_bytes", - "upload_id", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varUploadAbortOut := _UploadAbortOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varUploadAbortOut) - - if err != nil { - return err - } - - *o = UploadAbortOut(varUploadAbortOut) - - return err -} - -type NullableUploadAbortOut struct { - value *UploadAbortOut - isSet bool -} - -func (v NullableUploadAbortOut) Get() *UploadAbortOut { - return v.value -} - -func (v *NullableUploadAbortOut) Set(val *UploadAbortOut) { - v.value = val - v.isSet = true -} - -func (v NullableUploadAbortOut) IsSet() bool { - return v.isSet -} - -func (v *NullableUploadAbortOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUploadAbortOut(val *UploadAbortOut) *NullableUploadAbortOut { - return &NullableUploadAbortOut{value: val, isSet: true} -} - -func (v NullableUploadAbortOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUploadAbortOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_upload_begin_in.go b/sdk/go/model_upload_begin_in.go deleted file mode 100644 index 42295a0..0000000 --- a/sdk/go/model_upload_begin_in.go +++ /dev/null @@ -1,615 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the UploadBeginIn type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UploadBeginIn{} - -// UploadBeginIn Body of `POST /v0/uploads` — the large-upload begin call (large-upload- design.md §5.1). All artifact decisions are frozen here; the subsequent GCS PUT carries only bytes, and `commit` carries only the `upload_id`. `labels`/`metadata`/`source` omitted (null) ⇒ preserve the existing artifact's value at commit; present (incl. empty) ⇒ replace. -type UploadBeginIn struct { - ActorName NullableString `json:"actor_name,omitempty"` - ChangeSummary NullableString `json:"change_summary,omitempty"` - ContentType *string `json:"content_type,omitempty"` - // Web origin (scheme://host[:port]) of the browser that will PUT the bytes, e.g. `https://app.example.com`. Set this when the `upload_url` is handed to browser code: GCS binds CORS at session initiate, so the returned session only echoes `Access-Control-Allow-Origin` (and is thus PUT-able from a browser) when opened with the caller's origin. A trusted backend relaying a browser upload forwards the browser's `Origin` here. Omit for server/desktop uploads (no CORS enforcement). - CorsOrigin NullableString `json:"cors_origin,omitempty"` - Crc32c NullableString `json:"crc32c,omitempty"` - IfMatch NullableInt32 `json:"if_match,omitempty"` - IfNoneMatch *bool `json:"if_none_match,omitempty"` - Labels []string `json:"labels,omitempty"` - Metadata map[string]interface{} `json:"metadata,omitempty"` - Path string `json:"path"` - SizeBytes int32 `json:"size_bytes"` - Source NullableArtifactSource `json:"source,omitempty"` -} - -type _UploadBeginIn UploadBeginIn - -// NewUploadBeginIn instantiates a new UploadBeginIn object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUploadBeginIn(path string, sizeBytes int32) *UploadBeginIn { - this := UploadBeginIn{} - var contentType string = "application/octet-stream" - this.ContentType = &contentType - var ifNoneMatch bool = false - this.IfNoneMatch = &ifNoneMatch - this.Path = path - this.SizeBytes = sizeBytes - return &this -} - -// NewUploadBeginInWithDefaults instantiates a new UploadBeginIn object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUploadBeginInWithDefaults() *UploadBeginIn { - this := UploadBeginIn{} - var contentType string = "application/octet-stream" - this.ContentType = &contentType - var ifNoneMatch bool = false - this.IfNoneMatch = &ifNoneMatch - return &this -} - -// GetActorName returns the ActorName field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *UploadBeginIn) GetActorName() string { - if o == nil || IsNil(o.ActorName.Get()) { - var ret string - return ret - } - return *o.ActorName.Get() -} - -// GetActorNameOk returns a tuple with the ActorName field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UploadBeginIn) GetActorNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ActorName.Get(), o.ActorName.IsSet() -} - -// HasActorName returns a boolean if a field has been set. -func (o *UploadBeginIn) HasActorName() bool { - if o != nil && o.ActorName.IsSet() { - return true - } - - return false -} - -// SetActorName gets a reference to the given NullableString and assigns it to the ActorName field. -func (o *UploadBeginIn) SetActorName(v string) { - o.ActorName.Set(&v) -} -// SetActorNameNil sets the value for ActorName to be an explicit nil -func (o *UploadBeginIn) SetActorNameNil() { - o.ActorName.Set(nil) -} - -// UnsetActorName ensures that no value is present for ActorName, not even an explicit nil -func (o *UploadBeginIn) UnsetActorName() { - o.ActorName.Unset() -} - -// GetChangeSummary returns the ChangeSummary field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *UploadBeginIn) GetChangeSummary() string { - if o == nil || IsNil(o.ChangeSummary.Get()) { - var ret string - return ret - } - return *o.ChangeSummary.Get() -} - -// GetChangeSummaryOk returns a tuple with the ChangeSummary field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UploadBeginIn) GetChangeSummaryOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.ChangeSummary.Get(), o.ChangeSummary.IsSet() -} - -// HasChangeSummary returns a boolean if a field has been set. -func (o *UploadBeginIn) HasChangeSummary() bool { - if o != nil && o.ChangeSummary.IsSet() { - return true - } - - return false -} - -// SetChangeSummary gets a reference to the given NullableString and assigns it to the ChangeSummary field. -func (o *UploadBeginIn) SetChangeSummary(v string) { - o.ChangeSummary.Set(&v) -} -// SetChangeSummaryNil sets the value for ChangeSummary to be an explicit nil -func (o *UploadBeginIn) SetChangeSummaryNil() { - o.ChangeSummary.Set(nil) -} - -// UnsetChangeSummary ensures that no value is present for ChangeSummary, not even an explicit nil -func (o *UploadBeginIn) UnsetChangeSummary() { - o.ChangeSummary.Unset() -} - -// GetContentType returns the ContentType field value if set, zero value otherwise. -func (o *UploadBeginIn) GetContentType() string { - if o == nil || IsNil(o.ContentType) { - var ret string - return ret - } - return *o.ContentType -} - -// GetContentTypeOk returns a tuple with the ContentType field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UploadBeginIn) GetContentTypeOk() (*string, bool) { - if o == nil || IsNil(o.ContentType) { - return nil, false - } - return o.ContentType, true -} - -// HasContentType returns a boolean if a field has been set. -func (o *UploadBeginIn) HasContentType() bool { - if o != nil && !IsNil(o.ContentType) { - return true - } - - return false -} - -// SetContentType gets a reference to the given string and assigns it to the ContentType field. -func (o *UploadBeginIn) SetContentType(v string) { - o.ContentType = &v -} - -// GetCorsOrigin returns the CorsOrigin field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *UploadBeginIn) GetCorsOrigin() string { - if o == nil || IsNil(o.CorsOrigin.Get()) { - var ret string - return ret - } - return *o.CorsOrigin.Get() -} - -// GetCorsOriginOk returns a tuple with the CorsOrigin field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UploadBeginIn) GetCorsOriginOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.CorsOrigin.Get(), o.CorsOrigin.IsSet() -} - -// HasCorsOrigin returns a boolean if a field has been set. -func (o *UploadBeginIn) HasCorsOrigin() bool { - if o != nil && o.CorsOrigin.IsSet() { - return true - } - - return false -} - -// SetCorsOrigin gets a reference to the given NullableString and assigns it to the CorsOrigin field. -func (o *UploadBeginIn) SetCorsOrigin(v string) { - o.CorsOrigin.Set(&v) -} -// SetCorsOriginNil sets the value for CorsOrigin to be an explicit nil -func (o *UploadBeginIn) SetCorsOriginNil() { - o.CorsOrigin.Set(nil) -} - -// UnsetCorsOrigin ensures that no value is present for CorsOrigin, not even an explicit nil -func (o *UploadBeginIn) UnsetCorsOrigin() { - o.CorsOrigin.Unset() -} - -// GetCrc32c returns the Crc32c field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *UploadBeginIn) GetCrc32c() string { - if o == nil || IsNil(o.Crc32c.Get()) { - var ret string - return ret - } - return *o.Crc32c.Get() -} - -// GetCrc32cOk returns a tuple with the Crc32c field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UploadBeginIn) GetCrc32cOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Crc32c.Get(), o.Crc32c.IsSet() -} - -// HasCrc32c returns a boolean if a field has been set. -func (o *UploadBeginIn) HasCrc32c() bool { - if o != nil && o.Crc32c.IsSet() { - return true - } - - return false -} - -// SetCrc32c gets a reference to the given NullableString and assigns it to the Crc32c field. -func (o *UploadBeginIn) SetCrc32c(v string) { - o.Crc32c.Set(&v) -} -// SetCrc32cNil sets the value for Crc32c to be an explicit nil -func (o *UploadBeginIn) SetCrc32cNil() { - o.Crc32c.Set(nil) -} - -// UnsetCrc32c ensures that no value is present for Crc32c, not even an explicit nil -func (o *UploadBeginIn) UnsetCrc32c() { - o.Crc32c.Unset() -} - -// GetIfMatch returns the IfMatch field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *UploadBeginIn) GetIfMatch() int32 { - if o == nil || IsNil(o.IfMatch.Get()) { - var ret int32 - return ret - } - return *o.IfMatch.Get() -} - -// GetIfMatchOk returns a tuple with the IfMatch field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UploadBeginIn) GetIfMatchOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.IfMatch.Get(), o.IfMatch.IsSet() -} - -// HasIfMatch returns a boolean if a field has been set. -func (o *UploadBeginIn) HasIfMatch() bool { - if o != nil && o.IfMatch.IsSet() { - return true - } - - return false -} - -// SetIfMatch gets a reference to the given NullableInt32 and assigns it to the IfMatch field. -func (o *UploadBeginIn) SetIfMatch(v int32) { - o.IfMatch.Set(&v) -} -// SetIfMatchNil sets the value for IfMatch to be an explicit nil -func (o *UploadBeginIn) SetIfMatchNil() { - o.IfMatch.Set(nil) -} - -// UnsetIfMatch ensures that no value is present for IfMatch, not even an explicit nil -func (o *UploadBeginIn) UnsetIfMatch() { - o.IfMatch.Unset() -} - -// GetIfNoneMatch returns the IfNoneMatch field value if set, zero value otherwise. -func (o *UploadBeginIn) GetIfNoneMatch() bool { - if o == nil || IsNil(o.IfNoneMatch) { - var ret bool - return ret - } - return *o.IfNoneMatch -} - -// GetIfNoneMatchOk returns a tuple with the IfNoneMatch field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UploadBeginIn) GetIfNoneMatchOk() (*bool, bool) { - if o == nil || IsNil(o.IfNoneMatch) { - return nil, false - } - return o.IfNoneMatch, true -} - -// HasIfNoneMatch returns a boolean if a field has been set. -func (o *UploadBeginIn) HasIfNoneMatch() bool { - if o != nil && !IsNil(o.IfNoneMatch) { - return true - } - - return false -} - -// SetIfNoneMatch gets a reference to the given bool and assigns it to the IfNoneMatch field. -func (o *UploadBeginIn) SetIfNoneMatch(v bool) { - o.IfNoneMatch = &v -} - -// GetLabels returns the Labels field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *UploadBeginIn) GetLabels() []string { - if o == nil { - var ret []string - return ret - } - return o.Labels -} - -// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UploadBeginIn) GetLabelsOk() ([]string, bool) { - if o == nil || IsNil(o.Labels) { - return nil, false - } - return o.Labels, true -} - -// HasLabels returns a boolean if a field has been set. -func (o *UploadBeginIn) HasLabels() bool { - if o != nil && !IsNil(o.Labels) { - return true - } - - return false -} - -// SetLabels gets a reference to the given []string and assigns it to the Labels field. -func (o *UploadBeginIn) SetLabels(v []string) { - o.Labels = v -} - -// GetMetadata returns the Metadata field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *UploadBeginIn) GetMetadata() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - return o.Metadata -} - -// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UploadBeginIn) GetMetadataOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Metadata) { - return map[string]interface{}{}, false - } - return o.Metadata, true -} - -// HasMetadata returns a boolean if a field has been set. -func (o *UploadBeginIn) HasMetadata() bool { - if o != nil && !IsNil(o.Metadata) { - return true - } - - return false -} - -// SetMetadata gets a reference to the given map[string]interface{} and assigns it to the Metadata field. -func (o *UploadBeginIn) SetMetadata(v map[string]interface{}) { - o.Metadata = v -} - -// GetPath returns the Path field value -func (o *UploadBeginIn) GetPath() string { - if o == nil { - var ret string - return ret - } - - return o.Path -} - -// GetPathOk returns a tuple with the Path field value -// and a boolean to check if the value has been set. -func (o *UploadBeginIn) GetPathOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Path, true -} - -// SetPath sets field value -func (o *UploadBeginIn) SetPath(v string) { - o.Path = v -} - -// GetSizeBytes returns the SizeBytes field value -func (o *UploadBeginIn) GetSizeBytes() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.SizeBytes -} - -// GetSizeBytesOk returns a tuple with the SizeBytes field value -// and a boolean to check if the value has been set. -func (o *UploadBeginIn) GetSizeBytesOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.SizeBytes, true -} - -// SetSizeBytes sets field value -func (o *UploadBeginIn) SetSizeBytes(v int32) { - o.SizeBytes = v -} - -// GetSource returns the Source field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *UploadBeginIn) GetSource() ArtifactSource { - if o == nil || IsNil(o.Source.Get()) { - var ret ArtifactSource - return ret - } - return *o.Source.Get() -} - -// GetSourceOk returns a tuple with the Source field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UploadBeginIn) GetSourceOk() (*ArtifactSource, bool) { - if o == nil { - return nil, false - } - return o.Source.Get(), o.Source.IsSet() -} - -// HasSource returns a boolean if a field has been set. -func (o *UploadBeginIn) HasSource() bool { - if o != nil && o.Source.IsSet() { - return true - } - - return false -} - -// SetSource gets a reference to the given NullableArtifactSource and assigns it to the Source field. -func (o *UploadBeginIn) SetSource(v ArtifactSource) { - o.Source.Set(&v) -} -// SetSourceNil sets the value for Source to be an explicit nil -func (o *UploadBeginIn) SetSourceNil() { - o.Source.Set(nil) -} - -// UnsetSource ensures that no value is present for Source, not even an explicit nil -func (o *UploadBeginIn) UnsetSource() { - o.Source.Unset() -} - -func (o UploadBeginIn) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UploadBeginIn) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.ActorName.IsSet() { - toSerialize["actor_name"] = o.ActorName.Get() - } - if o.ChangeSummary.IsSet() { - toSerialize["change_summary"] = o.ChangeSummary.Get() - } - if !IsNil(o.ContentType) { - toSerialize["content_type"] = o.ContentType - } - if o.CorsOrigin.IsSet() { - toSerialize["cors_origin"] = o.CorsOrigin.Get() - } - if o.Crc32c.IsSet() { - toSerialize["crc32c"] = o.Crc32c.Get() - } - if o.IfMatch.IsSet() { - toSerialize["if_match"] = o.IfMatch.Get() - } - if !IsNil(o.IfNoneMatch) { - toSerialize["if_none_match"] = o.IfNoneMatch - } - if o.Labels != nil { - toSerialize["labels"] = o.Labels - } - if o.Metadata != nil { - toSerialize["metadata"] = o.Metadata - } - toSerialize["path"] = o.Path - toSerialize["size_bytes"] = o.SizeBytes - if o.Source.IsSet() { - toSerialize["source"] = o.Source.Get() - } - return toSerialize, nil -} - -func (o *UploadBeginIn) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "path", - "size_bytes", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varUploadBeginIn := _UploadBeginIn{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varUploadBeginIn) - - if err != nil { - return err - } - - *o = UploadBeginIn(varUploadBeginIn) - - return err -} - -type NullableUploadBeginIn struct { - value *UploadBeginIn - isSet bool -} - -func (v NullableUploadBeginIn) Get() *UploadBeginIn { - return v.value -} - -func (v *NullableUploadBeginIn) Set(val *UploadBeginIn) { - v.value = val - v.isSet = true -} - -func (v NullableUploadBeginIn) IsSet() bool { - return v.isSet -} - -func (v *NullableUploadBeginIn) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUploadBeginIn(val *UploadBeginIn) *NullableUploadBeginIn { - return &NullableUploadBeginIn{value: val, isSet: true} -} - -func (v NullableUploadBeginIn) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUploadBeginIn) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_upload_begin_out.go b/sdk/go/model_upload_begin_out.go deleted file mode 100644 index 769a5b2..0000000 --- a/sdk/go/model_upload_begin_out.go +++ /dev/null @@ -1,309 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "time" - "bytes" - "fmt" -) - -// checks if the UploadBeginOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UploadBeginOut{} - -// UploadBeginOut Response of `POST /v0/uploads`. PUT the bytes to `upload_url` (no auth header — the URL is the credential), then `POST .../commit`. -type UploadBeginOut struct { - ExpiresAt time.Time `json:"expires_at"` - Headers map[string]string `json:"headers"` - MaxBytes int32 `json:"max_bytes"` - Method *string `json:"method,omitempty"` - UploadId string `json:"upload_id"` - UploadUrl string `json:"upload_url"` -} - -type _UploadBeginOut UploadBeginOut - -// NewUploadBeginOut instantiates a new UploadBeginOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUploadBeginOut(expiresAt time.Time, headers map[string]string, maxBytes int32, uploadId string, uploadUrl string) *UploadBeginOut { - this := UploadBeginOut{} - this.ExpiresAt = expiresAt - this.Headers = headers - this.MaxBytes = maxBytes - var method string = "PUT" - this.Method = &method - this.UploadId = uploadId - this.UploadUrl = uploadUrl - return &this -} - -// NewUploadBeginOutWithDefaults instantiates a new UploadBeginOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUploadBeginOutWithDefaults() *UploadBeginOut { - this := UploadBeginOut{} - var method string = "PUT" - this.Method = &method - return &this -} - -// GetExpiresAt returns the ExpiresAt field value -func (o *UploadBeginOut) GetExpiresAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.ExpiresAt -} - -// GetExpiresAtOk returns a tuple with the ExpiresAt field value -// and a boolean to check if the value has been set. -func (o *UploadBeginOut) GetExpiresAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.ExpiresAt, true -} - -// SetExpiresAt sets field value -func (o *UploadBeginOut) SetExpiresAt(v time.Time) { - o.ExpiresAt = v -} - -// GetHeaders returns the Headers field value -func (o *UploadBeginOut) GetHeaders() map[string]string { - if o == nil { - var ret map[string]string - return ret - } - - return o.Headers -} - -// GetHeadersOk returns a tuple with the Headers field value -// and a boolean to check if the value has been set. -func (o *UploadBeginOut) GetHeadersOk() (map[string]string, bool) { - if o == nil { - return map[string]string{}, false - } - return o.Headers, true -} - -// SetHeaders sets field value -func (o *UploadBeginOut) SetHeaders(v map[string]string) { - o.Headers = v -} - -// GetMaxBytes returns the MaxBytes field value -func (o *UploadBeginOut) GetMaxBytes() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.MaxBytes -} - -// GetMaxBytesOk returns a tuple with the MaxBytes field value -// and a boolean to check if the value has been set. -func (o *UploadBeginOut) GetMaxBytesOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.MaxBytes, true -} - -// SetMaxBytes sets field value -func (o *UploadBeginOut) SetMaxBytes(v int32) { - o.MaxBytes = v -} - -// GetMethod returns the Method field value if set, zero value otherwise. -func (o *UploadBeginOut) GetMethod() string { - if o == nil || IsNil(o.Method) { - var ret string - return ret - } - return *o.Method -} - -// GetMethodOk returns a tuple with the Method field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *UploadBeginOut) GetMethodOk() (*string, bool) { - if o == nil || IsNil(o.Method) { - return nil, false - } - return o.Method, true -} - -// HasMethod returns a boolean if a field has been set. -func (o *UploadBeginOut) HasMethod() bool { - if o != nil && !IsNil(o.Method) { - return true - } - - return false -} - -// SetMethod gets a reference to the given string and assigns it to the Method field. -func (o *UploadBeginOut) SetMethod(v string) { - o.Method = &v -} - -// GetUploadId returns the UploadId field value -func (o *UploadBeginOut) GetUploadId() string { - if o == nil { - var ret string - return ret - } - - return o.UploadId -} - -// GetUploadIdOk returns a tuple with the UploadId field value -// and a boolean to check if the value has been set. -func (o *UploadBeginOut) GetUploadIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.UploadId, true -} - -// SetUploadId sets field value -func (o *UploadBeginOut) SetUploadId(v string) { - o.UploadId = v -} - -// GetUploadUrl returns the UploadUrl field value -func (o *UploadBeginOut) GetUploadUrl() string { - if o == nil { - var ret string - return ret - } - - return o.UploadUrl -} - -// GetUploadUrlOk returns a tuple with the UploadUrl field value -// and a boolean to check if the value has been set. -func (o *UploadBeginOut) GetUploadUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.UploadUrl, true -} - -// SetUploadUrl sets field value -func (o *UploadBeginOut) SetUploadUrl(v string) { - o.UploadUrl = v -} - -func (o UploadBeginOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UploadBeginOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["expires_at"] = o.ExpiresAt - toSerialize["headers"] = o.Headers - toSerialize["max_bytes"] = o.MaxBytes - if !IsNil(o.Method) { - toSerialize["method"] = o.Method - } - toSerialize["upload_id"] = o.UploadId - toSerialize["upload_url"] = o.UploadUrl - return toSerialize, nil -} - -func (o *UploadBeginOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "expires_at", - "headers", - "max_bytes", - "upload_id", - "upload_url", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varUploadBeginOut := _UploadBeginOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varUploadBeginOut) - - if err != nil { - return err - } - - *o = UploadBeginOut(varUploadBeginOut) - - return err -} - -type NullableUploadBeginOut struct { - value *UploadBeginOut - isSet bool -} - -func (v NullableUploadBeginOut) Get() *UploadBeginOut { - return v.value -} - -func (v *NullableUploadBeginOut) Set(val *UploadBeginOut) { - v.value = val - v.isSet = true -} - -func (v NullableUploadBeginOut) IsSet() bool { - return v.isSet -} - -func (v *NullableUploadBeginOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUploadBeginOut(val *UploadBeginOut) *NullableUploadBeginOut { - return &NullableUploadBeginOut{value: val, isSet: true} -} - -func (v NullableUploadBeginOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUploadBeginOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_upload_status_out.go b/sdk/go/model_upload_status_out.go deleted file mode 100644 index 46abf6a..0000000 --- a/sdk/go/model_upload_status_out.go +++ /dev/null @@ -1,399 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "time" - "bytes" - "fmt" -) - -// checks if the UploadStatusOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UploadStatusOut{} - -// UploadStatusOut Response of `GET /v0/uploads/{upload_id}` — the live state of a direct-to-GCS upload session (large-upload-design.md §5). `state` is derived, not a stored column: * `initiated` — session open; PUT the bytes to the `upload_url`, then `POST /v0/uploads/{upload_id}/commit`. * `committed` — the bytes landed and the artifact was created (`committed_at` is set). * `aborted` — released via `DELETE /v0/uploads/{upload_id}`. * `expired` — past `expires_at` without a commit; the reservation is reclaimed by the GC sweep. -type UploadStatusOut struct { - CommittedAt NullableTime `json:"committed_at,omitempty"` - ContentType string `json:"content_type"` - CreatedAt time.Time `json:"created_at"` - ExpiresAt time.Time `json:"expires_at"` - MaxBytes int32 `json:"max_bytes"` - Path string `json:"path"` - SizeBytes int32 `json:"size_bytes"` - State string `json:"state"` - UploadId string `json:"upload_id"` -} - -type _UploadStatusOut UploadStatusOut - -// NewUploadStatusOut instantiates a new UploadStatusOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUploadStatusOut(contentType string, createdAt time.Time, expiresAt time.Time, maxBytes int32, path string, sizeBytes int32, state string, uploadId string) *UploadStatusOut { - this := UploadStatusOut{} - this.ContentType = contentType - this.CreatedAt = createdAt - this.ExpiresAt = expiresAt - this.MaxBytes = maxBytes - this.Path = path - this.SizeBytes = sizeBytes - this.State = state - this.UploadId = uploadId - return &this -} - -// NewUploadStatusOutWithDefaults instantiates a new UploadStatusOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUploadStatusOutWithDefaults() *UploadStatusOut { - this := UploadStatusOut{} - return &this -} - -// GetCommittedAt returns the CommittedAt field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *UploadStatusOut) GetCommittedAt() time.Time { - if o == nil || IsNil(o.CommittedAt.Get()) { - var ret time.Time - return ret - } - return *o.CommittedAt.Get() -} - -// GetCommittedAtOk returns a tuple with the CommittedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UploadStatusOut) GetCommittedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.CommittedAt.Get(), o.CommittedAt.IsSet() -} - -// HasCommittedAt returns a boolean if a field has been set. -func (o *UploadStatusOut) HasCommittedAt() bool { - if o != nil && o.CommittedAt.IsSet() { - return true - } - - return false -} - -// SetCommittedAt gets a reference to the given NullableTime and assigns it to the CommittedAt field. -func (o *UploadStatusOut) SetCommittedAt(v time.Time) { - o.CommittedAt.Set(&v) -} -// SetCommittedAtNil sets the value for CommittedAt to be an explicit nil -func (o *UploadStatusOut) SetCommittedAtNil() { - o.CommittedAt.Set(nil) -} - -// UnsetCommittedAt ensures that no value is present for CommittedAt, not even an explicit nil -func (o *UploadStatusOut) UnsetCommittedAt() { - o.CommittedAt.Unset() -} - -// GetContentType returns the ContentType field value -func (o *UploadStatusOut) GetContentType() string { - if o == nil { - var ret string - return ret - } - - return o.ContentType -} - -// GetContentTypeOk returns a tuple with the ContentType field value -// and a boolean to check if the value has been set. -func (o *UploadStatusOut) GetContentTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.ContentType, true -} - -// SetContentType sets field value -func (o *UploadStatusOut) SetContentType(v string) { - o.ContentType = v -} - -// GetCreatedAt returns the CreatedAt field value -func (o *UploadStatusOut) GetCreatedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value -// and a boolean to check if the value has been set. -func (o *UploadStatusOut) GetCreatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.CreatedAt, true -} - -// SetCreatedAt sets field value -func (o *UploadStatusOut) SetCreatedAt(v time.Time) { - o.CreatedAt = v -} - -// GetExpiresAt returns the ExpiresAt field value -func (o *UploadStatusOut) GetExpiresAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.ExpiresAt -} - -// GetExpiresAtOk returns a tuple with the ExpiresAt field value -// and a boolean to check if the value has been set. -func (o *UploadStatusOut) GetExpiresAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.ExpiresAt, true -} - -// SetExpiresAt sets field value -func (o *UploadStatusOut) SetExpiresAt(v time.Time) { - o.ExpiresAt = v -} - -// GetMaxBytes returns the MaxBytes field value -func (o *UploadStatusOut) GetMaxBytes() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.MaxBytes -} - -// GetMaxBytesOk returns a tuple with the MaxBytes field value -// and a boolean to check if the value has been set. -func (o *UploadStatusOut) GetMaxBytesOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.MaxBytes, true -} - -// SetMaxBytes sets field value -func (o *UploadStatusOut) SetMaxBytes(v int32) { - o.MaxBytes = v -} - -// GetPath returns the Path field value -func (o *UploadStatusOut) GetPath() string { - if o == nil { - var ret string - return ret - } - - return o.Path -} - -// GetPathOk returns a tuple with the Path field value -// and a boolean to check if the value has been set. -func (o *UploadStatusOut) GetPathOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Path, true -} - -// SetPath sets field value -func (o *UploadStatusOut) SetPath(v string) { - o.Path = v -} - -// GetSizeBytes returns the SizeBytes field value -func (o *UploadStatusOut) GetSizeBytes() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.SizeBytes -} - -// GetSizeBytesOk returns a tuple with the SizeBytes field value -// and a boolean to check if the value has been set. -func (o *UploadStatusOut) GetSizeBytesOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.SizeBytes, true -} - -// SetSizeBytes sets field value -func (o *UploadStatusOut) SetSizeBytes(v int32) { - o.SizeBytes = v -} - -// GetState returns the State field value -func (o *UploadStatusOut) GetState() string { - if o == nil { - var ret string - return ret - } - - return o.State -} - -// GetStateOk returns a tuple with the State field value -// and a boolean to check if the value has been set. -func (o *UploadStatusOut) GetStateOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.State, true -} - -// SetState sets field value -func (o *UploadStatusOut) SetState(v string) { - o.State = v -} - -// GetUploadId returns the UploadId field value -func (o *UploadStatusOut) GetUploadId() string { - if o == nil { - var ret string - return ret - } - - return o.UploadId -} - -// GetUploadIdOk returns a tuple with the UploadId field value -// and a boolean to check if the value has been set. -func (o *UploadStatusOut) GetUploadIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.UploadId, true -} - -// SetUploadId sets field value -func (o *UploadStatusOut) SetUploadId(v string) { - o.UploadId = v -} - -func (o UploadStatusOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UploadStatusOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.CommittedAt.IsSet() { - toSerialize["committed_at"] = o.CommittedAt.Get() - } - toSerialize["content_type"] = o.ContentType - toSerialize["created_at"] = o.CreatedAt - toSerialize["expires_at"] = o.ExpiresAt - toSerialize["max_bytes"] = o.MaxBytes - toSerialize["path"] = o.Path - toSerialize["size_bytes"] = o.SizeBytes - toSerialize["state"] = o.State - toSerialize["upload_id"] = o.UploadId - return toSerialize, nil -} - -func (o *UploadStatusOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "content_type", - "created_at", - "expires_at", - "max_bytes", - "path", - "size_bytes", - "state", - "upload_id", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varUploadStatusOut := _UploadStatusOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varUploadStatusOut) - - if err != nil { - return err - } - - *o = UploadStatusOut(varUploadStatusOut) - - return err -} - -type NullableUploadStatusOut struct { - value *UploadStatusOut - isSet bool -} - -func (v NullableUploadStatusOut) Get() *UploadStatusOut { - return v.value -} - -func (v *NullableUploadStatusOut) Set(val *UploadStatusOut) { - v.value = val - v.isSet = true -} - -func (v NullableUploadStatusOut) IsSet() bool { - return v.isSet -} - -func (v *NullableUploadStatusOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUploadStatusOut(val *UploadStatusOut) *NullableUploadStatusOut { - return &NullableUploadStatusOut{value: val, isSet: true} -} - -func (v NullableUploadStatusOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUploadStatusOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_usage_counter_out.go b/sdk/go/model_usage_counter_out.go deleted file mode 100644 index fe8fe02..0000000 --- a/sdk/go/model_usage_counter_out.go +++ /dev/null @@ -1,184 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the UsageCounterOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UsageCounterOut{} - -// UsageCounterOut struct for UsageCounterOut -type UsageCounterOut struct { - Limit int32 `json:"limit"` - Used int32 `json:"used"` -} - -type _UsageCounterOut UsageCounterOut - -// NewUsageCounterOut instantiates a new UsageCounterOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUsageCounterOut(limit int32, used int32) *UsageCounterOut { - this := UsageCounterOut{} - this.Limit = limit - this.Used = used - return &this -} - -// NewUsageCounterOutWithDefaults instantiates a new UsageCounterOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUsageCounterOutWithDefaults() *UsageCounterOut { - this := UsageCounterOut{} - return &this -} - -// GetLimit returns the Limit field value -func (o *UsageCounterOut) GetLimit() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Limit -} - -// GetLimitOk returns a tuple with the Limit field value -// and a boolean to check if the value has been set. -func (o *UsageCounterOut) GetLimitOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Limit, true -} - -// SetLimit sets field value -func (o *UsageCounterOut) SetLimit(v int32) { - o.Limit = v -} - -// GetUsed returns the Used field value -func (o *UsageCounterOut) GetUsed() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.Used -} - -// GetUsedOk returns a tuple with the Used field value -// and a boolean to check if the value has been set. -func (o *UsageCounterOut) GetUsedOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.Used, true -} - -// SetUsed sets field value -func (o *UsageCounterOut) SetUsed(v int32) { - o.Used = v -} - -func (o UsageCounterOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UsageCounterOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["limit"] = o.Limit - toSerialize["used"] = o.Used - return toSerialize, nil -} - -func (o *UsageCounterOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "limit", - "used", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varUsageCounterOut := _UsageCounterOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varUsageCounterOut) - - if err != nil { - return err - } - - *o = UsageCounterOut(varUsageCounterOut) - - return err -} - -type NullableUsageCounterOut struct { - value *UsageCounterOut - isSet bool -} - -func (v NullableUsageCounterOut) Get() *UsageCounterOut { - return v.value -} - -func (v *NullableUsageCounterOut) Set(val *UsageCounterOut) { - v.value = val - v.isSet = true -} - -func (v NullableUsageCounterOut) IsSet() bool { - return v.isSet -} - -func (v *NullableUsageCounterOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUsageCounterOut(val *UsageCounterOut) *NullableUsageCounterOut { - return &NullableUsageCounterOut{value: val, isSet: true} -} - -func (v NullableUsageCounterOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUsageCounterOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_usage_period_out.go b/sdk/go/model_usage_period_out.go deleted file mode 100644 index 09f9f5a..0000000 --- a/sdk/go/model_usage_period_out.go +++ /dev/null @@ -1,213 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "time" - "bytes" - "fmt" -) - -// checks if the UsagePeriodOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UsagePeriodOut{} - -// UsagePeriodOut struct for UsagePeriodOut -type UsagePeriodOut struct { - Ends time.Time `json:"ends"` - Starts time.Time `json:"starts"` - YearMonth string `json:"year_month"` -} - -type _UsagePeriodOut UsagePeriodOut - -// NewUsagePeriodOut instantiates a new UsagePeriodOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUsagePeriodOut(ends time.Time, starts time.Time, yearMonth string) *UsagePeriodOut { - this := UsagePeriodOut{} - this.Ends = ends - this.Starts = starts - this.YearMonth = yearMonth - return &this -} - -// NewUsagePeriodOutWithDefaults instantiates a new UsagePeriodOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUsagePeriodOutWithDefaults() *UsagePeriodOut { - this := UsagePeriodOut{} - return &this -} - -// GetEnds returns the Ends field value -func (o *UsagePeriodOut) GetEnds() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.Ends -} - -// GetEndsOk returns a tuple with the Ends field value -// and a boolean to check if the value has been set. -func (o *UsagePeriodOut) GetEndsOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.Ends, true -} - -// SetEnds sets field value -func (o *UsagePeriodOut) SetEnds(v time.Time) { - o.Ends = v -} - -// GetStarts returns the Starts field value -func (o *UsagePeriodOut) GetStarts() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.Starts -} - -// GetStartsOk returns a tuple with the Starts field value -// and a boolean to check if the value has been set. -func (o *UsagePeriodOut) GetStartsOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.Starts, true -} - -// SetStarts sets field value -func (o *UsagePeriodOut) SetStarts(v time.Time) { - o.Starts = v -} - -// GetYearMonth returns the YearMonth field value -func (o *UsagePeriodOut) GetYearMonth() string { - if o == nil { - var ret string - return ret - } - - return o.YearMonth -} - -// GetYearMonthOk returns a tuple with the YearMonth field value -// and a boolean to check if the value has been set. -func (o *UsagePeriodOut) GetYearMonthOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.YearMonth, true -} - -// SetYearMonth sets field value -func (o *UsagePeriodOut) SetYearMonth(v string) { - o.YearMonth = v -} - -func (o UsagePeriodOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UsagePeriodOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["ends"] = o.Ends - toSerialize["starts"] = o.Starts - toSerialize["year_month"] = o.YearMonth - return toSerialize, nil -} - -func (o *UsagePeriodOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "ends", - "starts", - "year_month", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varUsagePeriodOut := _UsagePeriodOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varUsagePeriodOut) - - if err != nil { - return err - } - - *o = UsagePeriodOut(varUsagePeriodOut) - - return err -} - -type NullableUsagePeriodOut struct { - value *UsagePeriodOut - isSet bool -} - -func (v NullableUsagePeriodOut) Get() *UsagePeriodOut { - return v.value -} - -func (v *NullableUsagePeriodOut) Set(val *UsagePeriodOut) { - v.value = val - v.isSet = true -} - -func (v NullableUsagePeriodOut) IsSet() bool { - return v.isSet -} - -func (v *NullableUsagePeriodOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUsagePeriodOut(val *UsagePeriodOut) *NullableUsagePeriodOut { - return &NullableUsagePeriodOut{value: val, isSet: true} -} - -func (v NullableUsagePeriodOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUsagePeriodOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_user_token_list.go b/sdk/go/model_user_token_list.go deleted file mode 100644 index 78e906b..0000000 --- a/sdk/go/model_user_token_list.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the UserTokenList type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UserTokenList{} - -// UserTokenList struct for UserTokenList -type UserTokenList struct { - Items []UserTokenOut `json:"items"` - NextCursor NullableString `json:"next_cursor,omitempty"` -} - -type _UserTokenList UserTokenList - -// NewUserTokenList instantiates a new UserTokenList object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUserTokenList(items []UserTokenOut) *UserTokenList { - this := UserTokenList{} - this.Items = items - return &this -} - -// NewUserTokenListWithDefaults instantiates a new UserTokenList object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUserTokenListWithDefaults() *UserTokenList { - this := UserTokenList{} - return &this -} - -// GetItems returns the Items field value -func (o *UserTokenList) GetItems() []UserTokenOut { - if o == nil { - var ret []UserTokenOut - return ret - } - - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value -// and a boolean to check if the value has been set. -func (o *UserTokenList) GetItemsOk() ([]UserTokenOut, bool) { - if o == nil { - return nil, false - } - return o.Items, true -} - -// SetItems sets field value -func (o *UserTokenList) SetItems(v []UserTokenOut) { - o.Items = v -} - -// GetNextCursor returns the NextCursor field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *UserTokenList) GetNextCursor() string { - if o == nil || IsNil(o.NextCursor.Get()) { - var ret string - return ret - } - return *o.NextCursor.Get() -} - -// GetNextCursorOk returns a tuple with the NextCursor field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UserTokenList) GetNextCursorOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.NextCursor.Get(), o.NextCursor.IsSet() -} - -// HasNextCursor returns a boolean if a field has been set. -func (o *UserTokenList) HasNextCursor() bool { - if o != nil && o.NextCursor.IsSet() { - return true - } - - return false -} - -// SetNextCursor gets a reference to the given NullableString and assigns it to the NextCursor field. -func (o *UserTokenList) SetNextCursor(v string) { - o.NextCursor.Set(&v) -} -// SetNextCursorNil sets the value for NextCursor to be an explicit nil -func (o *UserTokenList) SetNextCursorNil() { - o.NextCursor.Set(nil) -} - -// UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil -func (o *UserTokenList) UnsetNextCursor() { - o.NextCursor.Unset() -} - -func (o UserTokenList) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UserTokenList) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["items"] = o.Items - if o.NextCursor.IsSet() { - toSerialize["next_cursor"] = o.NextCursor.Get() - } - return toSerialize, nil -} - -func (o *UserTokenList) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "items", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varUserTokenList := _UserTokenList{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varUserTokenList) - - if err != nil { - return err - } - - *o = UserTokenList(varUserTokenList) - - return err -} - -type NullableUserTokenList struct { - value *UserTokenList - isSet bool -} - -func (v NullableUserTokenList) Get() *UserTokenList { - return v.value -} - -func (v *NullableUserTokenList) Set(val *UserTokenList) { - v.value = val - v.isSet = true -} - -func (v NullableUserTokenList) IsSet() bool { - return v.isSet -} - -func (v *NullableUserTokenList) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUserTokenList(val *UserTokenList) *NullableUserTokenList { - return &NullableUserTokenList{value: val, isSet: true} -} - -func (v NullableUserTokenList) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUserTokenList) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_user_token_out.go b/sdk/go/model_user_token_out.go deleted file mode 100644 index 911db93..0000000 --- a/sdk/go/model_user_token_out.go +++ /dev/null @@ -1,471 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "time" - "bytes" - "fmt" -) - -// checks if the UserTokenOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &UserTokenOut{} - -// UserTokenOut One `ad_user_` token — metadata only. The raw token is NEVER exposed over the API (minting is web-only, reveal-once); this shape omits both the raw value and the stored hash by construction. -type UserTokenOut struct { - CreatedAt time.Time `json:"created_at"` - DefaultDriveId NullableString `json:"default_drive_id,omitempty"` - ExpiresAt NullableTime `json:"expires_at,omitempty"` - Id string `json:"id"` - Label NullableString `json:"label,omitempty"` - LastUsedAt NullableTime `json:"last_used_at,omitempty"` - Prefix string `json:"prefix"` - RevokedAt NullableTime `json:"revoked_at,omitempty"` - Scope string `json:"scope"` -} - -type _UserTokenOut UserTokenOut - -// NewUserTokenOut instantiates a new UserTokenOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewUserTokenOut(createdAt time.Time, id string, prefix string, scope string) *UserTokenOut { - this := UserTokenOut{} - this.CreatedAt = createdAt - this.Id = id - this.Prefix = prefix - this.Scope = scope - return &this -} - -// NewUserTokenOutWithDefaults instantiates a new UserTokenOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewUserTokenOutWithDefaults() *UserTokenOut { - this := UserTokenOut{} - return &this -} - -// GetCreatedAt returns the CreatedAt field value -func (o *UserTokenOut) GetCreatedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value -// and a boolean to check if the value has been set. -func (o *UserTokenOut) GetCreatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.CreatedAt, true -} - -// SetCreatedAt sets field value -func (o *UserTokenOut) SetCreatedAt(v time.Time) { - o.CreatedAt = v -} - -// GetDefaultDriveId returns the DefaultDriveId field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *UserTokenOut) GetDefaultDriveId() string { - if o == nil || IsNil(o.DefaultDriveId.Get()) { - var ret string - return ret - } - return *o.DefaultDriveId.Get() -} - -// GetDefaultDriveIdOk returns a tuple with the DefaultDriveId field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UserTokenOut) GetDefaultDriveIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.DefaultDriveId.Get(), o.DefaultDriveId.IsSet() -} - -// HasDefaultDriveId returns a boolean if a field has been set. -func (o *UserTokenOut) HasDefaultDriveId() bool { - if o != nil && o.DefaultDriveId.IsSet() { - return true - } - - return false -} - -// SetDefaultDriveId gets a reference to the given NullableString and assigns it to the DefaultDriveId field. -func (o *UserTokenOut) SetDefaultDriveId(v string) { - o.DefaultDriveId.Set(&v) -} -// SetDefaultDriveIdNil sets the value for DefaultDriveId to be an explicit nil -func (o *UserTokenOut) SetDefaultDriveIdNil() { - o.DefaultDriveId.Set(nil) -} - -// UnsetDefaultDriveId ensures that no value is present for DefaultDriveId, not even an explicit nil -func (o *UserTokenOut) UnsetDefaultDriveId() { - o.DefaultDriveId.Unset() -} - -// GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *UserTokenOut) GetExpiresAt() time.Time { - if o == nil || IsNil(o.ExpiresAt.Get()) { - var ret time.Time - return ret - } - return *o.ExpiresAt.Get() -} - -// GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UserTokenOut) GetExpiresAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.ExpiresAt.Get(), o.ExpiresAt.IsSet() -} - -// HasExpiresAt returns a boolean if a field has been set. -func (o *UserTokenOut) HasExpiresAt() bool { - if o != nil && o.ExpiresAt.IsSet() { - return true - } - - return false -} - -// SetExpiresAt gets a reference to the given NullableTime and assigns it to the ExpiresAt field. -func (o *UserTokenOut) SetExpiresAt(v time.Time) { - o.ExpiresAt.Set(&v) -} -// SetExpiresAtNil sets the value for ExpiresAt to be an explicit nil -func (o *UserTokenOut) SetExpiresAtNil() { - o.ExpiresAt.Set(nil) -} - -// UnsetExpiresAt ensures that no value is present for ExpiresAt, not even an explicit nil -func (o *UserTokenOut) UnsetExpiresAt() { - o.ExpiresAt.Unset() -} - -// GetId returns the Id field value -func (o *UserTokenOut) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *UserTokenOut) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *UserTokenOut) SetId(v string) { - o.Id = v -} - -// GetLabel returns the Label field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *UserTokenOut) GetLabel() string { - if o == nil || IsNil(o.Label.Get()) { - var ret string - return ret - } - return *o.Label.Get() -} - -// GetLabelOk returns a tuple with the Label field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UserTokenOut) GetLabelOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.Label.Get(), o.Label.IsSet() -} - -// HasLabel returns a boolean if a field has been set. -func (o *UserTokenOut) HasLabel() bool { - if o != nil && o.Label.IsSet() { - return true - } - - return false -} - -// SetLabel gets a reference to the given NullableString and assigns it to the Label field. -func (o *UserTokenOut) SetLabel(v string) { - o.Label.Set(&v) -} -// SetLabelNil sets the value for Label to be an explicit nil -func (o *UserTokenOut) SetLabelNil() { - o.Label.Set(nil) -} - -// UnsetLabel ensures that no value is present for Label, not even an explicit nil -func (o *UserTokenOut) UnsetLabel() { - o.Label.Unset() -} - -// GetLastUsedAt returns the LastUsedAt field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *UserTokenOut) GetLastUsedAt() time.Time { - if o == nil || IsNil(o.LastUsedAt.Get()) { - var ret time.Time - return ret - } - return *o.LastUsedAt.Get() -} - -// GetLastUsedAtOk returns a tuple with the LastUsedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UserTokenOut) GetLastUsedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.LastUsedAt.Get(), o.LastUsedAt.IsSet() -} - -// HasLastUsedAt returns a boolean if a field has been set. -func (o *UserTokenOut) HasLastUsedAt() bool { - if o != nil && o.LastUsedAt.IsSet() { - return true - } - - return false -} - -// SetLastUsedAt gets a reference to the given NullableTime and assigns it to the LastUsedAt field. -func (o *UserTokenOut) SetLastUsedAt(v time.Time) { - o.LastUsedAt.Set(&v) -} -// SetLastUsedAtNil sets the value for LastUsedAt to be an explicit nil -func (o *UserTokenOut) SetLastUsedAtNil() { - o.LastUsedAt.Set(nil) -} - -// UnsetLastUsedAt ensures that no value is present for LastUsedAt, not even an explicit nil -func (o *UserTokenOut) UnsetLastUsedAt() { - o.LastUsedAt.Unset() -} - -// GetPrefix returns the Prefix field value -func (o *UserTokenOut) GetPrefix() string { - if o == nil { - var ret string - return ret - } - - return o.Prefix -} - -// GetPrefixOk returns a tuple with the Prefix field value -// and a boolean to check if the value has been set. -func (o *UserTokenOut) GetPrefixOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Prefix, true -} - -// SetPrefix sets field value -func (o *UserTokenOut) SetPrefix(v string) { - o.Prefix = v -} - -// GetRevokedAt returns the RevokedAt field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *UserTokenOut) GetRevokedAt() time.Time { - if o == nil || IsNil(o.RevokedAt.Get()) { - var ret time.Time - return ret - } - return *o.RevokedAt.Get() -} - -// GetRevokedAtOk returns a tuple with the RevokedAt field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *UserTokenOut) GetRevokedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return o.RevokedAt.Get(), o.RevokedAt.IsSet() -} - -// HasRevokedAt returns a boolean if a field has been set. -func (o *UserTokenOut) HasRevokedAt() bool { - if o != nil && o.RevokedAt.IsSet() { - return true - } - - return false -} - -// SetRevokedAt gets a reference to the given NullableTime and assigns it to the RevokedAt field. -func (o *UserTokenOut) SetRevokedAt(v time.Time) { - o.RevokedAt.Set(&v) -} -// SetRevokedAtNil sets the value for RevokedAt to be an explicit nil -func (o *UserTokenOut) SetRevokedAtNil() { - o.RevokedAt.Set(nil) -} - -// UnsetRevokedAt ensures that no value is present for RevokedAt, not even an explicit nil -func (o *UserTokenOut) UnsetRevokedAt() { - o.RevokedAt.Unset() -} - -// GetScope returns the Scope field value -func (o *UserTokenOut) GetScope() string { - if o == nil { - var ret string - return ret - } - - return o.Scope -} - -// GetScopeOk returns a tuple with the Scope field value -// and a boolean to check if the value has been set. -func (o *UserTokenOut) GetScopeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Scope, true -} - -// SetScope sets field value -func (o *UserTokenOut) SetScope(v string) { - o.Scope = v -} - -func (o UserTokenOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o UserTokenOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["created_at"] = o.CreatedAt - if o.DefaultDriveId.IsSet() { - toSerialize["default_drive_id"] = o.DefaultDriveId.Get() - } - if o.ExpiresAt.IsSet() { - toSerialize["expires_at"] = o.ExpiresAt.Get() - } - toSerialize["id"] = o.Id - if o.Label.IsSet() { - toSerialize["label"] = o.Label.Get() - } - if o.LastUsedAt.IsSet() { - toSerialize["last_used_at"] = o.LastUsedAt.Get() - } - toSerialize["prefix"] = o.Prefix - if o.RevokedAt.IsSet() { - toSerialize["revoked_at"] = o.RevokedAt.Get() - } - toSerialize["scope"] = o.Scope - return toSerialize, nil -} - -func (o *UserTokenOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "created_at", - "id", - "prefix", - "scope", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varUserTokenOut := _UserTokenOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varUserTokenOut) - - if err != nil { - return err - } - - *o = UserTokenOut(varUserTokenOut) - - return err -} - -type NullableUserTokenOut struct { - value *UserTokenOut - isSet bool -} - -func (v NullableUserTokenOut) Get() *UserTokenOut { - return v.value -} - -func (v *NullableUserTokenOut) Set(val *UserTokenOut) { - v.value = val - v.isSet = true -} - -func (v NullableUserTokenOut) IsSet() bool { - return v.isSet -} - -func (v *NullableUserTokenOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableUserTokenOut(val *UserTokenOut) *NullableUserTokenOut { - return &NullableUserTokenOut{value: val, isSet: true} -} - -func (v NullableUserTokenOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableUserTokenOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_v0_error_envelope.go b/sdk/go/model_v0_error_envelope.go new file mode 100644 index 0000000..edeab44 --- /dev/null +++ b/sdk/go/model_v0_error_envelope.go @@ -0,0 +1,156 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the V0ErrorEnvelope type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &V0ErrorEnvelope{} + +// V0ErrorEnvelope struct for V0ErrorEnvelope +type V0ErrorEnvelope struct { + Error DrivesCreate400ResponseError `json:"error"` +} + +type _V0ErrorEnvelope V0ErrorEnvelope + +// NewV0ErrorEnvelope instantiates a new V0ErrorEnvelope object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewV0ErrorEnvelope(error_ DrivesCreate400ResponseError) *V0ErrorEnvelope { + this := V0ErrorEnvelope{} + this.Error = error_ + return &this +} + +// NewV0ErrorEnvelopeWithDefaults instantiates a new V0ErrorEnvelope object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewV0ErrorEnvelopeWithDefaults() *V0ErrorEnvelope { + this := V0ErrorEnvelope{} + return &this +} + +// GetError returns the Error field value +func (o *V0ErrorEnvelope) GetError() DrivesCreate400ResponseError { + if o == nil { + var ret DrivesCreate400ResponseError + return ret + } + + return o.Error +} + +// GetErrorOk returns a tuple with the Error field value +// and a boolean to check if the value has been set. +func (o *V0ErrorEnvelope) GetErrorOk() (*DrivesCreate400ResponseError, bool) { + if o == nil { + return nil, false + } + return &o.Error, true +} + +// SetError sets field value +func (o *V0ErrorEnvelope) SetError(v DrivesCreate400ResponseError) { + o.Error = v +} + +func (o V0ErrorEnvelope) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o V0ErrorEnvelope) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["error"] = o.Error + return toSerialize, nil +} + +func (o *V0ErrorEnvelope) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "error", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varV0ErrorEnvelope := _V0ErrorEnvelope{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varV0ErrorEnvelope) + + if err != nil { + return err + } + + *o = V0ErrorEnvelope(varV0ErrorEnvelope) + + return err +} + +type NullableV0ErrorEnvelope struct { + value *V0ErrorEnvelope + isSet bool +} + +func (v NullableV0ErrorEnvelope) Get() *V0ErrorEnvelope { + return v.value +} + +func (v *NullableV0ErrorEnvelope) Set(val *V0ErrorEnvelope) { + v.value = val + v.isSet = true +} + +func (v NullableV0ErrorEnvelope) IsSet() bool { + return v.isSet +} + +func (v *NullableV0ErrorEnvelope) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableV0ErrorEnvelope(val *V0ErrorEnvelope) *NullableV0ErrorEnvelope { + return &NullableV0ErrorEnvelope{value: val, isSet: true} +} + +func (v NullableV0ErrorEnvelope) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableV0ErrorEnvelope) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/sdk/go/model_validation_error_body.go b/sdk/go/model_validation_error_body.go deleted file mode 100644 index f7d89d0..0000000 --- a/sdk/go/model_validation_error_body.go +++ /dev/null @@ -1,224 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "fmt" -) - -// checks if the ValidationErrorBody type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ValidationErrorBody{} - -// ValidationErrorBody struct for ValidationErrorBody -type ValidationErrorBody struct { - Code string `json:"code"` - Fields []ValidationIssue `json:"fields"` - Message string `json:"message"` - AdditionalProperties map[string]interface{} -} - -type _ValidationErrorBody ValidationErrorBody - -// NewValidationErrorBody instantiates a new ValidationErrorBody object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewValidationErrorBody(code string, fields []ValidationIssue, message string) *ValidationErrorBody { - this := ValidationErrorBody{} - this.Code = code - this.Fields = fields - this.Message = message - return &this -} - -// NewValidationErrorBodyWithDefaults instantiates a new ValidationErrorBody object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewValidationErrorBodyWithDefaults() *ValidationErrorBody { - this := ValidationErrorBody{} - return &this -} - -// GetCode returns the Code field value -func (o *ValidationErrorBody) GetCode() string { - if o == nil { - var ret string - return ret - } - - return o.Code -} - -// GetCodeOk returns a tuple with the Code field value -// and a boolean to check if the value has been set. -func (o *ValidationErrorBody) GetCodeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Code, true -} - -// SetCode sets field value -func (o *ValidationErrorBody) SetCode(v string) { - o.Code = v -} - -// GetFields returns the Fields field value -func (o *ValidationErrorBody) GetFields() []ValidationIssue { - if o == nil { - var ret []ValidationIssue - return ret - } - - return o.Fields -} - -// GetFieldsOk returns a tuple with the Fields field value -// and a boolean to check if the value has been set. -func (o *ValidationErrorBody) GetFieldsOk() ([]ValidationIssue, bool) { - if o == nil { - return nil, false - } - return o.Fields, true -} - -// SetFields sets field value -func (o *ValidationErrorBody) SetFields(v []ValidationIssue) { - o.Fields = v -} - -// GetMessage returns the Message field value -func (o *ValidationErrorBody) GetMessage() string { - if o == nil { - var ret string - return ret - } - - return o.Message -} - -// GetMessageOk returns a tuple with the Message field value -// and a boolean to check if the value has been set. -func (o *ValidationErrorBody) GetMessageOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Message, true -} - -// SetMessage sets field value -func (o *ValidationErrorBody) SetMessage(v string) { - o.Message = v -} - -func (o ValidationErrorBody) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ValidationErrorBody) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["code"] = o.Code - toSerialize["fields"] = o.Fields - toSerialize["message"] = o.Message - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *ValidationErrorBody) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "code", - "fields", - "message", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varValidationErrorBody := _ValidationErrorBody{} - - err = json.Unmarshal(data, &varValidationErrorBody) - - if err != nil { - return err - } - - *o = ValidationErrorBody(varValidationErrorBody) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "code") - delete(additionalProperties, "fields") - delete(additionalProperties, "message") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableValidationErrorBody struct { - value *ValidationErrorBody - isSet bool -} - -func (v NullableValidationErrorBody) Get() *ValidationErrorBody { - return v.value -} - -func (v *NullableValidationErrorBody) Set(val *ValidationErrorBody) { - v.value = val - v.isSet = true -} - -func (v NullableValidationErrorBody) IsSet() bool { - return v.isSet -} - -func (v *NullableValidationErrorBody) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableValidationErrorBody(val *ValidationErrorBody) *NullableValidationErrorBody { - return &NullableValidationErrorBody{value: val, isSet: true} -} - -func (v NullableValidationErrorBody) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableValidationErrorBody) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_validation_error_detail.go b/sdk/go/model_validation_error_detail.go deleted file mode 100644 index c51016d..0000000 --- a/sdk/go/model_validation_error_detail.go +++ /dev/null @@ -1,166 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "fmt" -) - -// checks if the ValidationErrorDetail type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ValidationErrorDetail{} - -// ValidationErrorDetail struct for ValidationErrorDetail -type ValidationErrorDetail struct { - Error ValidationErrorBody `json:"error"` - AdditionalProperties map[string]interface{} -} - -type _ValidationErrorDetail ValidationErrorDetail - -// NewValidationErrorDetail instantiates a new ValidationErrorDetail object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewValidationErrorDetail(error_ ValidationErrorBody) *ValidationErrorDetail { - this := ValidationErrorDetail{} - this.Error = error_ - return &this -} - -// NewValidationErrorDetailWithDefaults instantiates a new ValidationErrorDetail object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewValidationErrorDetailWithDefaults() *ValidationErrorDetail { - this := ValidationErrorDetail{} - return &this -} - -// GetError returns the Error field value -func (o *ValidationErrorDetail) GetError() ValidationErrorBody { - if o == nil { - var ret ValidationErrorBody - return ret - } - - return o.Error -} - -// GetErrorOk returns a tuple with the Error field value -// and a boolean to check if the value has been set. -func (o *ValidationErrorDetail) GetErrorOk() (*ValidationErrorBody, bool) { - if o == nil { - return nil, false - } - return &o.Error, true -} - -// SetError sets field value -func (o *ValidationErrorDetail) SetError(v ValidationErrorBody) { - o.Error = v -} - -func (o ValidationErrorDetail) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ValidationErrorDetail) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["error"] = o.Error - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *ValidationErrorDetail) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "error", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varValidationErrorDetail := _ValidationErrorDetail{} - - err = json.Unmarshal(data, &varValidationErrorDetail) - - if err != nil { - return err - } - - *o = ValidationErrorDetail(varValidationErrorDetail) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "error") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableValidationErrorDetail struct { - value *ValidationErrorDetail - isSet bool -} - -func (v NullableValidationErrorDetail) Get() *ValidationErrorDetail { - return v.value -} - -func (v *NullableValidationErrorDetail) Set(val *ValidationErrorDetail) { - v.value = val - v.isSet = true -} - -func (v NullableValidationErrorDetail) IsSet() bool { - return v.isSet -} - -func (v *NullableValidationErrorDetail) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableValidationErrorDetail(val *ValidationErrorDetail) *NullableValidationErrorDetail { - return &NullableValidationErrorDetail{value: val, isSet: true} -} - -func (v NullableValidationErrorDetail) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableValidationErrorDetail) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_validation_error_response.go b/sdk/go/model_validation_error_response.go index 8b466b5..cb50447 100644 --- a/sdk/go/model_validation_error_response.go +++ b/sdk/go/model_validation_error_response.go @@ -1,7 +1,7 @@ /* AgentDrive -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. API version: */ @@ -12,16 +12,16 @@ package agentdrive import ( "encoding/json" + "bytes" "fmt" ) // checks if the ValidationErrorResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &ValidationErrorResponse{} -// ValidationErrorResponse The runtime `VALIDATION_ERROR` response for request parsing failures. +// ValidationErrorResponse struct for ValidationErrorResponse type ValidationErrorResponse struct { - Detail ValidationErrorDetail `json:"detail"` - AdditionalProperties map[string]interface{} + Error ValidationErrorResponseError `json:"error"` } type _ValidationErrorResponse ValidationErrorResponse @@ -30,9 +30,9 @@ type _ValidationErrorResponse ValidationErrorResponse // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewValidationErrorResponse(detail ValidationErrorDetail) *ValidationErrorResponse { +func NewValidationErrorResponse(error_ ValidationErrorResponseError) *ValidationErrorResponse { this := ValidationErrorResponse{} - this.Detail = detail + this.Error = error_ return &this } @@ -44,28 +44,28 @@ func NewValidationErrorResponseWithDefaults() *ValidationErrorResponse { return &this } -// GetDetail returns the Detail field value -func (o *ValidationErrorResponse) GetDetail() ValidationErrorDetail { +// GetError returns the Error field value +func (o *ValidationErrorResponse) GetError() ValidationErrorResponseError { if o == nil { - var ret ValidationErrorDetail + var ret ValidationErrorResponseError return ret } - return o.Detail + return o.Error } -// GetDetailOk returns a tuple with the Detail field value +// GetErrorOk returns a tuple with the Error field value // and a boolean to check if the value has been set. -func (o *ValidationErrorResponse) GetDetailOk() (*ValidationErrorDetail, bool) { +func (o *ValidationErrorResponse) GetErrorOk() (*ValidationErrorResponseError, bool) { if o == nil { return nil, false } - return &o.Detail, true + return &o.Error, true } -// SetDetail sets field value -func (o *ValidationErrorResponse) SetDetail(v ValidationErrorDetail) { - o.Detail = v +// SetError sets field value +func (o *ValidationErrorResponse) SetError(v ValidationErrorResponseError) { + o.Error = v } func (o ValidationErrorResponse) MarshalJSON() ([]byte, error) { @@ -78,12 +78,7 @@ func (o ValidationErrorResponse) MarshalJSON() ([]byte, error) { func (o ValidationErrorResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["detail"] = o.Detail - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - + toSerialize["error"] = o.Error return toSerialize, nil } @@ -92,7 +87,7 @@ func (o *ValidationErrorResponse) UnmarshalJSON(data []byte) (err error) { // by unmarshalling the object into a generic map with string keys and checking // that every required field exists as a key in the generic map. requiredProperties := []string{ - "detail", + "error", } allProperties := make(map[string]interface{}) @@ -111,7 +106,9 @@ func (o *ValidationErrorResponse) UnmarshalJSON(data []byte) (err error) { varValidationErrorResponse := _ValidationErrorResponse{} - err = json.Unmarshal(data, &varValidationErrorResponse) + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varValidationErrorResponse) if err != nil { return err @@ -119,13 +116,6 @@ func (o *ValidationErrorResponse) UnmarshalJSON(data []byte) (err error) { *o = ValidationErrorResponse(varValidationErrorResponse) - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "detail") - o.AdditionalProperties = additionalProperties - } - return err } diff --git a/sdk/go/model_validation_error_response_error.go b/sdk/go/model_validation_error_response_error.go new file mode 100644 index 0000000..ab05513 --- /dev/null +++ b/sdk/go/model_validation_error_response_error.go @@ -0,0 +1,236 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "encoding/json" + "fmt" +) + +// checks if the ValidationErrorResponseError type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ValidationErrorResponseError{} + +// ValidationErrorResponseError struct for ValidationErrorResponseError +type ValidationErrorResponseError struct { + Code NullableString `json:"code"` + Details *ValidationErrorResponseErrorDetails `json:"details,omitempty"` + Message NullableString `json:"message"` + AdditionalProperties map[string]interface{} +} + +type _ValidationErrorResponseError ValidationErrorResponseError + +// NewValidationErrorResponseError instantiates a new ValidationErrorResponseError object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewValidationErrorResponseError(code NullableString, message NullableString) *ValidationErrorResponseError { + this := ValidationErrorResponseError{} + this.Code = code + this.Message = message + return &this +} + +// NewValidationErrorResponseErrorWithDefaults instantiates a new ValidationErrorResponseError object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewValidationErrorResponseErrorWithDefaults() *ValidationErrorResponseError { + this := ValidationErrorResponseError{} + return &this +} + +// GetCode returns the Code field value +// If the value is explicit nil, the zero value for string will be returned +func (o *ValidationErrorResponseError) GetCode() string { + if o == nil || o.Code.Get() == nil { + var ret string + return ret + } + + return *o.Code.Get() +} + +// GetCodeOk returns a tuple with the Code field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ValidationErrorResponseError) GetCodeOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Code.Get(), o.Code.IsSet() +} + +// SetCode sets field value +func (o *ValidationErrorResponseError) SetCode(v string) { + o.Code.Set(&v) +} + +// GetDetails returns the Details field value if set, zero value otherwise. +func (o *ValidationErrorResponseError) GetDetails() ValidationErrorResponseErrorDetails { + if o == nil || IsNil(o.Details) { + var ret ValidationErrorResponseErrorDetails + return ret + } + return *o.Details +} + +// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ValidationErrorResponseError) GetDetailsOk() (*ValidationErrorResponseErrorDetails, bool) { + if o == nil || IsNil(o.Details) { + return nil, false + } + return o.Details, true +} + +// HasDetails returns a boolean if a field has been set. +func (o *ValidationErrorResponseError) HasDetails() bool { + if o != nil && !IsNil(o.Details) { + return true + } + + return false +} + +// SetDetails gets a reference to the given ValidationErrorResponseErrorDetails and assigns it to the Details field. +func (o *ValidationErrorResponseError) SetDetails(v ValidationErrorResponseErrorDetails) { + o.Details = &v +} + +// GetMessage returns the Message field value +// If the value is explicit nil, the zero value for string will be returned +func (o *ValidationErrorResponseError) GetMessage() string { + if o == nil || o.Message.Get() == nil { + var ret string + return ret + } + + return *o.Message.Get() +} + +// GetMessageOk returns a tuple with the Message field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *ValidationErrorResponseError) GetMessageOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.Message.Get(), o.Message.IsSet() +} + +// SetMessage sets field value +func (o *ValidationErrorResponseError) SetMessage(v string) { + o.Message.Set(&v) +} + +func (o ValidationErrorResponseError) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ValidationErrorResponseError) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["code"] = o.Code.Get() + if !IsNil(o.Details) { + toSerialize["details"] = o.Details + } + toSerialize["message"] = o.Message.Get() + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ValidationErrorResponseError) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "code", + "message", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varValidationErrorResponseError := _ValidationErrorResponseError{} + + err = json.Unmarshal(data, &varValidationErrorResponseError) + + if err != nil { + return err + } + + *o = ValidationErrorResponseError(varValidationErrorResponseError) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "code") + delete(additionalProperties, "details") + delete(additionalProperties, "message") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableValidationErrorResponseError struct { + value *ValidationErrorResponseError + isSet bool +} + +func (v NullableValidationErrorResponseError) Get() *ValidationErrorResponseError { + return v.value +} + +func (v *NullableValidationErrorResponseError) Set(val *ValidationErrorResponseError) { + v.value = val + v.isSet = true +} + +func (v NullableValidationErrorResponseError) IsSet() bool { + return v.isSet +} + +func (v *NullableValidationErrorResponseError) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableValidationErrorResponseError(val *ValidationErrorResponseError) *NullableValidationErrorResponseError { + return &NullableValidationErrorResponseError{value: val, isSet: true} +} + +func (v NullableValidationErrorResponseError) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableValidationErrorResponseError) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/sdk/go/model_validation_error_response_error_details.go b/sdk/go/model_validation_error_response_error_details.go new file mode 100644 index 0000000..070e38f --- /dev/null +++ b/sdk/go/model_validation_error_response_error_details.go @@ -0,0 +1,124 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "encoding/json" +) + +// checks if the ValidationErrorResponseErrorDetails type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ValidationErrorResponseErrorDetails{} + +// ValidationErrorResponseErrorDetails struct for ValidationErrorResponseErrorDetails +type ValidationErrorResponseErrorDetails struct { + Fields []ValidationErrorResponseErrorDetailsFieldsInner `json:"fields,omitempty"` +} + +// NewValidationErrorResponseErrorDetails instantiates a new ValidationErrorResponseErrorDetails object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewValidationErrorResponseErrorDetails() *ValidationErrorResponseErrorDetails { + this := ValidationErrorResponseErrorDetails{} + return &this +} + +// NewValidationErrorResponseErrorDetailsWithDefaults instantiates a new ValidationErrorResponseErrorDetails object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewValidationErrorResponseErrorDetailsWithDefaults() *ValidationErrorResponseErrorDetails { + this := ValidationErrorResponseErrorDetails{} + return &this +} + +// GetFields returns the Fields field value if set, zero value otherwise. +func (o *ValidationErrorResponseErrorDetails) GetFields() []ValidationErrorResponseErrorDetailsFieldsInner { + if o == nil || IsNil(o.Fields) { + var ret []ValidationErrorResponseErrorDetailsFieldsInner + return ret + } + return o.Fields +} + +// GetFieldsOk returns a tuple with the Fields field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ValidationErrorResponseErrorDetails) GetFieldsOk() ([]ValidationErrorResponseErrorDetailsFieldsInner, bool) { + if o == nil || IsNil(o.Fields) { + return nil, false + } + return o.Fields, true +} + +// HasFields returns a boolean if a field has been set. +func (o *ValidationErrorResponseErrorDetails) HasFields() bool { + if o != nil && !IsNil(o.Fields) { + return true + } + + return false +} + +// SetFields gets a reference to the given []ValidationErrorResponseErrorDetailsFieldsInner and assigns it to the Fields field. +func (o *ValidationErrorResponseErrorDetails) SetFields(v []ValidationErrorResponseErrorDetailsFieldsInner) { + o.Fields = v +} + +func (o ValidationErrorResponseErrorDetails) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ValidationErrorResponseErrorDetails) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Fields) { + toSerialize["fields"] = o.Fields + } + return toSerialize, nil +} + +type NullableValidationErrorResponseErrorDetails struct { + value *ValidationErrorResponseErrorDetails + isSet bool +} + +func (v NullableValidationErrorResponseErrorDetails) Get() *ValidationErrorResponseErrorDetails { + return v.value +} + +func (v *NullableValidationErrorResponseErrorDetails) Set(val *ValidationErrorResponseErrorDetails) { + v.value = val + v.isSet = true +} + +func (v NullableValidationErrorResponseErrorDetails) IsSet() bool { + return v.isSet +} + +func (v *NullableValidationErrorResponseErrorDetails) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableValidationErrorResponseErrorDetails(val *ValidationErrorResponseErrorDetails) *NullableValidationErrorResponseErrorDetails { + return &NullableValidationErrorResponseErrorDetails{value: val, isSet: true} +} + +func (v NullableValidationErrorResponseErrorDetails) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableValidationErrorResponseErrorDetails) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/sdk/go/model_validation_error_response_error_details_fields_inner.go b/sdk/go/model_validation_error_response_error_details_fields_inner.go new file mode 100644 index 0000000..e97e8c8 --- /dev/null +++ b/sdk/go/model_validation_error_response_error_details_fields_inner.go @@ -0,0 +1,160 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "encoding/json" +) + +// checks if the ValidationErrorResponseErrorDetailsFieldsInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ValidationErrorResponseErrorDetailsFieldsInner{} + +// ValidationErrorResponseErrorDetailsFieldsInner struct for ValidationErrorResponseErrorDetailsFieldsInner +type ValidationErrorResponseErrorDetailsFieldsInner struct { + Location *string `json:"location,omitempty"` + Reason *string `json:"reason,omitempty"` +} + +// NewValidationErrorResponseErrorDetailsFieldsInner instantiates a new ValidationErrorResponseErrorDetailsFieldsInner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewValidationErrorResponseErrorDetailsFieldsInner() *ValidationErrorResponseErrorDetailsFieldsInner { + this := ValidationErrorResponseErrorDetailsFieldsInner{} + return &this +} + +// NewValidationErrorResponseErrorDetailsFieldsInnerWithDefaults instantiates a new ValidationErrorResponseErrorDetailsFieldsInner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewValidationErrorResponseErrorDetailsFieldsInnerWithDefaults() *ValidationErrorResponseErrorDetailsFieldsInner { + this := ValidationErrorResponseErrorDetailsFieldsInner{} + return &this +} + +// GetLocation returns the Location field value if set, zero value otherwise. +func (o *ValidationErrorResponseErrorDetailsFieldsInner) GetLocation() string { + if o == nil || IsNil(o.Location) { + var ret string + return ret + } + return *o.Location +} + +// GetLocationOk returns a tuple with the Location field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ValidationErrorResponseErrorDetailsFieldsInner) GetLocationOk() (*string, bool) { + if o == nil || IsNil(o.Location) { + return nil, false + } + return o.Location, true +} + +// HasLocation returns a boolean if a field has been set. +func (o *ValidationErrorResponseErrorDetailsFieldsInner) HasLocation() bool { + if o != nil && !IsNil(o.Location) { + return true + } + + return false +} + +// SetLocation gets a reference to the given string and assigns it to the Location field. +func (o *ValidationErrorResponseErrorDetailsFieldsInner) SetLocation(v string) { + o.Location = &v +} + +// GetReason returns the Reason field value if set, zero value otherwise. +func (o *ValidationErrorResponseErrorDetailsFieldsInner) GetReason() string { + if o == nil || IsNil(o.Reason) { + var ret string + return ret + } + return *o.Reason +} + +// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ValidationErrorResponseErrorDetailsFieldsInner) GetReasonOk() (*string, bool) { + if o == nil || IsNil(o.Reason) { + return nil, false + } + return o.Reason, true +} + +// HasReason returns a boolean if a field has been set. +func (o *ValidationErrorResponseErrorDetailsFieldsInner) HasReason() bool { + if o != nil && !IsNil(o.Reason) { + return true + } + + return false +} + +// SetReason gets a reference to the given string and assigns it to the Reason field. +func (o *ValidationErrorResponseErrorDetailsFieldsInner) SetReason(v string) { + o.Reason = &v +} + +func (o ValidationErrorResponseErrorDetailsFieldsInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ValidationErrorResponseErrorDetailsFieldsInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Location) { + toSerialize["location"] = o.Location + } + if !IsNil(o.Reason) { + toSerialize["reason"] = o.Reason + } + return toSerialize, nil +} + +type NullableValidationErrorResponseErrorDetailsFieldsInner struct { + value *ValidationErrorResponseErrorDetailsFieldsInner + isSet bool +} + +func (v NullableValidationErrorResponseErrorDetailsFieldsInner) Get() *ValidationErrorResponseErrorDetailsFieldsInner { + return v.value +} + +func (v *NullableValidationErrorResponseErrorDetailsFieldsInner) Set(val *ValidationErrorResponseErrorDetailsFieldsInner) { + v.value = val + v.isSet = true +} + +func (v NullableValidationErrorResponseErrorDetailsFieldsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableValidationErrorResponseErrorDetailsFieldsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableValidationErrorResponseErrorDetailsFieldsInner(val *ValidationErrorResponseErrorDetailsFieldsInner) *NullableValidationErrorResponseErrorDetailsFieldsInner { + return &NullableValidationErrorResponseErrorDetailsFieldsInner{value: val, isSet: true} +} + +func (v NullableValidationErrorResponseErrorDetailsFieldsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableValidationErrorResponseErrorDetailsFieldsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/sdk/go/model_validation_issue.go b/sdk/go/model_validation_issue.go deleted file mode 100644 index 9a978c9..0000000 --- a/sdk/go/model_validation_issue.go +++ /dev/null @@ -1,300 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "fmt" -) - -// checks if the ValidationIssue type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &ValidationIssue{} - -// ValidationIssue One Pydantic/FastAPI validation issue. -type ValidationIssue struct { - Ctx map[string]interface{} `json:"ctx,omitempty"` - Input interface{} `json:"input,omitempty"` - Loc []interface{} `json:"loc"` - Msg string `json:"msg"` - Type string `json:"type"` - AdditionalProperties map[string]interface{} -} - -type _ValidationIssue ValidationIssue - -// NewValidationIssue instantiates a new ValidationIssue object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewValidationIssue(loc []interface{}, msg string, type_ string) *ValidationIssue { - this := ValidationIssue{} - this.Loc = loc - this.Msg = msg - this.Type = type_ - return &this -} - -// NewValidationIssueWithDefaults instantiates a new ValidationIssue object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewValidationIssueWithDefaults() *ValidationIssue { - this := ValidationIssue{} - return &this -} - -// GetCtx returns the Ctx field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ValidationIssue) GetCtx() map[string]interface{} { - if o == nil { - var ret map[string]interface{} - return ret - } - return o.Ctx -} - -// GetCtxOk returns a tuple with the Ctx field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ValidationIssue) GetCtxOk() (map[string]interface{}, bool) { - if o == nil || IsNil(o.Ctx) { - return map[string]interface{}{}, false - } - return o.Ctx, true -} - -// HasCtx returns a boolean if a field has been set. -func (o *ValidationIssue) HasCtx() bool { - if o != nil && !IsNil(o.Ctx) { - return true - } - - return false -} - -// SetCtx gets a reference to the given map[string]interface{} and assigns it to the Ctx field. -func (o *ValidationIssue) SetCtx(v map[string]interface{}) { - o.Ctx = v -} - -// GetInput returns the Input field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *ValidationIssue) GetInput() interface{} { - if o == nil { - var ret interface{} - return ret - } - return o.Input -} - -// GetInputOk returns a tuple with the Input field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *ValidationIssue) GetInputOk() (*interface{}, bool) { - if o == nil || IsNil(o.Input) { - return nil, false - } - return &o.Input, true -} - -// HasInput returns a boolean if a field has been set. -func (o *ValidationIssue) HasInput() bool { - if o != nil && !IsNil(o.Input) { - return true - } - - return false -} - -// SetInput gets a reference to the given interface{} and assigns it to the Input field. -func (o *ValidationIssue) SetInput(v interface{}) { - o.Input = v -} - -// GetLoc returns the Loc field value -func (o *ValidationIssue) GetLoc() []interface{} { - if o == nil { - var ret []interface{} - return ret - } - - return o.Loc -} - -// GetLocOk returns a tuple with the Loc field value -// and a boolean to check if the value has been set. -func (o *ValidationIssue) GetLocOk() ([]interface{}, bool) { - if o == nil { - return nil, false - } - return o.Loc, true -} - -// SetLoc sets field value -func (o *ValidationIssue) SetLoc(v []interface{}) { - o.Loc = v -} - -// GetMsg returns the Msg field value -func (o *ValidationIssue) GetMsg() string { - if o == nil { - var ret string - return ret - } - - return o.Msg -} - -// GetMsgOk returns a tuple with the Msg field value -// and a boolean to check if the value has been set. -func (o *ValidationIssue) GetMsgOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Msg, true -} - -// SetMsg sets field value -func (o *ValidationIssue) SetMsg(v string) { - o.Msg = v -} - -// GetType returns the Type field value -func (o *ValidationIssue) GetType() string { - if o == nil { - var ret string - return ret - } - - return o.Type -} - -// GetTypeOk returns a tuple with the Type field value -// and a boolean to check if the value has been set. -func (o *ValidationIssue) GetTypeOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Type, true -} - -// SetType sets field value -func (o *ValidationIssue) SetType(v string) { - o.Type = v -} - -func (o ValidationIssue) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o ValidationIssue) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if o.Ctx != nil { - toSerialize["ctx"] = o.Ctx - } - if o.Input != nil { - toSerialize["input"] = o.Input - } - toSerialize["loc"] = o.Loc - toSerialize["msg"] = o.Msg - toSerialize["type"] = o.Type - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *ValidationIssue) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "loc", - "msg", - "type", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varValidationIssue := _ValidationIssue{} - - err = json.Unmarshal(data, &varValidationIssue) - - if err != nil { - return err - } - - *o = ValidationIssue(varValidationIssue) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "ctx") - delete(additionalProperties, "input") - delete(additionalProperties, "loc") - delete(additionalProperties, "msg") - delete(additionalProperties, "type") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableValidationIssue struct { - value *ValidationIssue - isSet bool -} - -func (v NullableValidationIssue) Get() *ValidationIssue { - return v.value -} - -func (v *NullableValidationIssue) Set(val *ValidationIssue) { - v.value = val - v.isSet = true -} - -func (v NullableValidationIssue) IsSet() bool { - return v.isSet -} - -func (v *NullableValidationIssue) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableValidationIssue(val *ValidationIssue) *NullableValidationIssue { - return &NullableValidationIssue{value: val, isSet: true} -} - -func (v NullableValidationIssue) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableValidationIssue) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_version_created_out.go b/sdk/go/model_version_created_out.go new file mode 100644 index 0000000..5c5bffc --- /dev/null +++ b/sdk/go/model_version_created_out.go @@ -0,0 +1,414 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "encoding/json" + "time" + "bytes" + "fmt" +) + +// checks if the VersionCreatedOut type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VersionCreatedOut{} + +// VersionCreatedOut The append/restore response — a version plus the artifact's new revision, which the version-creating 201 rotates. +type VersionCreatedOut struct { + ArtifactId string `json:"artifact_id" validate:"regexp=^art_[a-f0-9]{16}$"` + // The artifact's revision after this version became head — the If-Match value for the next mutation. + ArtifactRevision string `json:"artifact_revision" validate:"regexp=^rev_[a-f0-9]{16}$"` + ContentType string `json:"content_type"` + CreatedAt time.Time `json:"created_at"` + CreatedBy NullableString `json:"created_by"` + Hash string `json:"hash"` + Id string `json:"id" validate:"regexp=^ver_[a-f0-9]{16}$"` + ParentVersionId NullableString `json:"parent_version_id"` + SizeBytes int32 `json:"size_bytes"` + VersionNumber int32 `json:"version_number"` +} + +type _VersionCreatedOut VersionCreatedOut + +// NewVersionCreatedOut instantiates a new VersionCreatedOut object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewVersionCreatedOut(artifactId string, artifactRevision string, contentType string, createdAt time.Time, createdBy NullableString, hash string, id string, parentVersionId NullableString, sizeBytes int32, versionNumber int32) *VersionCreatedOut { + this := VersionCreatedOut{} + this.ArtifactId = artifactId + this.ArtifactRevision = artifactRevision + this.ContentType = contentType + this.CreatedAt = createdAt + this.CreatedBy = createdBy + this.Hash = hash + this.Id = id + this.ParentVersionId = parentVersionId + this.SizeBytes = sizeBytes + this.VersionNumber = versionNumber + return &this +} + +// NewVersionCreatedOutWithDefaults instantiates a new VersionCreatedOut object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewVersionCreatedOutWithDefaults() *VersionCreatedOut { + this := VersionCreatedOut{} + return &this +} + +// GetArtifactId returns the ArtifactId field value +func (o *VersionCreatedOut) GetArtifactId() string { + if o == nil { + var ret string + return ret + } + + return o.ArtifactId +} + +// GetArtifactIdOk returns a tuple with the ArtifactId field value +// and a boolean to check if the value has been set. +func (o *VersionCreatedOut) GetArtifactIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ArtifactId, true +} + +// SetArtifactId sets field value +func (o *VersionCreatedOut) SetArtifactId(v string) { + o.ArtifactId = v +} + +// GetArtifactRevision returns the ArtifactRevision field value +func (o *VersionCreatedOut) GetArtifactRevision() string { + if o == nil { + var ret string + return ret + } + + return o.ArtifactRevision +} + +// GetArtifactRevisionOk returns a tuple with the ArtifactRevision field value +// and a boolean to check if the value has been set. +func (o *VersionCreatedOut) GetArtifactRevisionOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ArtifactRevision, true +} + +// SetArtifactRevision sets field value +func (o *VersionCreatedOut) SetArtifactRevision(v string) { + o.ArtifactRevision = v +} + +// GetContentType returns the ContentType field value +func (o *VersionCreatedOut) GetContentType() string { + if o == nil { + var ret string + return ret + } + + return o.ContentType +} + +// GetContentTypeOk returns a tuple with the ContentType field value +// and a boolean to check if the value has been set. +func (o *VersionCreatedOut) GetContentTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ContentType, true +} + +// SetContentType sets field value +func (o *VersionCreatedOut) SetContentType(v string) { + o.ContentType = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *VersionCreatedOut) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *VersionCreatedOut) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *VersionCreatedOut) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetCreatedBy returns the CreatedBy field value +// If the value is explicit nil, the zero value for string will be returned +func (o *VersionCreatedOut) GetCreatedBy() string { + if o == nil || o.CreatedBy.Get() == nil { + var ret string + return ret + } + + return *o.CreatedBy.Get() +} + +// GetCreatedByOk returns a tuple with the CreatedBy field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *VersionCreatedOut) GetCreatedByOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.CreatedBy.Get(), o.CreatedBy.IsSet() +} + +// SetCreatedBy sets field value +func (o *VersionCreatedOut) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) +} + +// GetHash returns the Hash field value +func (o *VersionCreatedOut) GetHash() string { + if o == nil { + var ret string + return ret + } + + return o.Hash +} + +// GetHashOk returns a tuple with the Hash field value +// and a boolean to check if the value has been set. +func (o *VersionCreatedOut) GetHashOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Hash, true +} + +// SetHash sets field value +func (o *VersionCreatedOut) SetHash(v string) { + o.Hash = v +} + +// GetId returns the Id field value +func (o *VersionCreatedOut) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *VersionCreatedOut) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *VersionCreatedOut) SetId(v string) { + o.Id = v +} + +// GetParentVersionId returns the ParentVersionId field value +// If the value is explicit nil, the zero value for string will be returned +func (o *VersionCreatedOut) GetParentVersionId() string { + if o == nil || o.ParentVersionId.Get() == nil { + var ret string + return ret + } + + return *o.ParentVersionId.Get() +} + +// GetParentVersionIdOk returns a tuple with the ParentVersionId field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *VersionCreatedOut) GetParentVersionIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.ParentVersionId.Get(), o.ParentVersionId.IsSet() +} + +// SetParentVersionId sets field value +func (o *VersionCreatedOut) SetParentVersionId(v string) { + o.ParentVersionId.Set(&v) +} + +// GetSizeBytes returns the SizeBytes field value +func (o *VersionCreatedOut) GetSizeBytes() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.SizeBytes +} + +// GetSizeBytesOk returns a tuple with the SizeBytes field value +// and a boolean to check if the value has been set. +func (o *VersionCreatedOut) GetSizeBytesOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.SizeBytes, true +} + +// SetSizeBytes sets field value +func (o *VersionCreatedOut) SetSizeBytes(v int32) { + o.SizeBytes = v +} + +// GetVersionNumber returns the VersionNumber field value +func (o *VersionCreatedOut) GetVersionNumber() int32 { + if o == nil { + var ret int32 + return ret + } + + return o.VersionNumber +} + +// GetVersionNumberOk returns a tuple with the VersionNumber field value +// and a boolean to check if the value has been set. +func (o *VersionCreatedOut) GetVersionNumberOk() (*int32, bool) { + if o == nil { + return nil, false + } + return &o.VersionNumber, true +} + +// SetVersionNumber sets field value +func (o *VersionCreatedOut) SetVersionNumber(v int32) { + o.VersionNumber = v +} + +func (o VersionCreatedOut) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VersionCreatedOut) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["artifact_id"] = o.ArtifactId + toSerialize["artifact_revision"] = o.ArtifactRevision + toSerialize["content_type"] = o.ContentType + toSerialize["created_at"] = o.CreatedAt + toSerialize["created_by"] = o.CreatedBy.Get() + toSerialize["hash"] = o.Hash + toSerialize["id"] = o.Id + toSerialize["parent_version_id"] = o.ParentVersionId.Get() + toSerialize["size_bytes"] = o.SizeBytes + toSerialize["version_number"] = o.VersionNumber + return toSerialize, nil +} + +func (o *VersionCreatedOut) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "artifact_id", + "artifact_revision", + "content_type", + "created_at", + "created_by", + "hash", + "id", + "parent_version_id", + "size_bytes", + "version_number", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varVersionCreatedOut := _VersionCreatedOut{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varVersionCreatedOut) + + if err != nil { + return err + } + + *o = VersionCreatedOut(varVersionCreatedOut) + + return err +} + +type NullableVersionCreatedOut struct { + value *VersionCreatedOut + isSet bool +} + +func (v NullableVersionCreatedOut) Get() *VersionCreatedOut { + return v.value +} + +func (v *NullableVersionCreatedOut) Set(val *VersionCreatedOut) { + v.value = val + v.isSet = true +} + +func (v NullableVersionCreatedOut) IsSet() bool { + return v.isSet +} + +func (v *NullableVersionCreatedOut) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVersionCreatedOut(val *VersionCreatedOut) *NullableVersionCreatedOut { + return &NullableVersionCreatedOut{value: val, isSet: true} +} + +func (v NullableVersionCreatedOut) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVersionCreatedOut) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/sdk/go/model_version_list_out.go b/sdk/go/model_version_list_out.go new file mode 100644 index 0000000..d0b1cf8 --- /dev/null +++ b/sdk/go/model_version_list_out.go @@ -0,0 +1,186 @@ +/* +AgentDrive + +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + +API version: +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package agentdrive + +import ( + "encoding/json" + "bytes" + "fmt" +) + +// checks if the VersionListOut type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &VersionListOut{} + +// VersionListOut struct for VersionListOut +type VersionListOut struct { + Items []VersionOut `json:"items"` + NextCursor NullableString `json:"next_cursor"` +} + +type _VersionListOut VersionListOut + +// NewVersionListOut instantiates a new VersionListOut object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewVersionListOut(items []VersionOut, nextCursor NullableString) *VersionListOut { + this := VersionListOut{} + this.Items = items + this.NextCursor = nextCursor + return &this +} + +// NewVersionListOutWithDefaults instantiates a new VersionListOut object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewVersionListOutWithDefaults() *VersionListOut { + this := VersionListOut{} + return &this +} + +// GetItems returns the Items field value +func (o *VersionListOut) GetItems() []VersionOut { + if o == nil { + var ret []VersionOut + return ret + } + + return o.Items +} + +// GetItemsOk returns a tuple with the Items field value +// and a boolean to check if the value has been set. +func (o *VersionListOut) GetItemsOk() ([]VersionOut, bool) { + if o == nil { + return nil, false + } + return o.Items, true +} + +// SetItems sets field value +func (o *VersionListOut) SetItems(v []VersionOut) { + o.Items = v +} + +// GetNextCursor returns the NextCursor field value +// If the value is explicit nil, the zero value for string will be returned +func (o *VersionListOut) GetNextCursor() string { + if o == nil || o.NextCursor.Get() == nil { + var ret string + return ret + } + + return *o.NextCursor.Get() +} + +// GetNextCursorOk returns a tuple with the NextCursor field value +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *VersionListOut) GetNextCursorOk() (*string, bool) { + if o == nil { + return nil, false + } + return o.NextCursor.Get(), o.NextCursor.IsSet() +} + +// SetNextCursor sets field value +func (o *VersionListOut) SetNextCursor(v string) { + o.NextCursor.Set(&v) +} + +func (o VersionListOut) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o VersionListOut) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["items"] = o.Items + toSerialize["next_cursor"] = o.NextCursor.Get() + return toSerialize, nil +} + +func (o *VersionListOut) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "items", + "next_cursor", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varVersionListOut := _VersionListOut{} + + decoder := json.NewDecoder(bytes.NewReader(data)) + decoder.DisallowUnknownFields() + err = decoder.Decode(&varVersionListOut) + + if err != nil { + return err + } + + *o = VersionListOut(varVersionListOut) + + return err +} + +type NullableVersionListOut struct { + value *VersionListOut + isSet bool +} + +func (v NullableVersionListOut) Get() *VersionListOut { + return v.value +} + +func (v *NullableVersionListOut) Set(val *VersionListOut) { + v.value = val + v.isSet = true +} + +func (v NullableVersionListOut) IsSet() bool { + return v.isSet +} + +func (v *NullableVersionListOut) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableVersionListOut(val *VersionListOut) *NullableVersionListOut { + return &NullableVersionListOut{value: val, isSet: true} +} + +func (v NullableVersionListOut) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableVersionListOut) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/sdk/go/model_version_out.go b/sdk/go/model_version_out.go index e0e82c3..f06ac3d 100644 --- a/sdk/go/model_version_out.go +++ b/sdk/go/model_version_out.go @@ -1,7 +1,7 @@ /* AgentDrive -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. API version: */ @@ -22,12 +22,13 @@ var _ MappedNullable = &VersionOut{} // VersionOut struct for VersionOut type VersionOut struct { - ActorName NullableString `json:"actor_name,omitempty"` - ArtId string `json:"art_id"` - ChangeSummary NullableString `json:"change_summary,omitempty"` + ArtifactId string `json:"artifact_id" validate:"regexp=^art_[a-f0-9]{16}$"` ContentType string `json:"content_type"` CreatedAt time.Time `json:"created_at"` + CreatedBy NullableString `json:"created_by"` Hash string `json:"hash"` + Id string `json:"id" validate:"regexp=^ver_[a-f0-9]{16}$"` + ParentVersionId NullableString `json:"parent_version_id"` SizeBytes int32 `json:"size_bytes"` VersionNumber int32 `json:"version_number"` } @@ -38,12 +39,15 @@ type _VersionOut VersionOut // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewVersionOut(artId string, contentType string, createdAt time.Time, hash string, sizeBytes int32, versionNumber int32) *VersionOut { +func NewVersionOut(artifactId string, contentType string, createdAt time.Time, createdBy NullableString, hash string, id string, parentVersionId NullableString, sizeBytes int32, versionNumber int32) *VersionOut { this := VersionOut{} - this.ArtId = artId + this.ArtifactId = artifactId this.ContentType = contentType this.CreatedAt = createdAt + this.CreatedBy = createdBy this.Hash = hash + this.Id = id + this.ParentVersionId = parentVersionId this.SizeBytes = sizeBytes this.VersionNumber = versionNumber return &this @@ -57,184 +61,176 @@ func NewVersionOutWithDefaults() *VersionOut { return &this } -// GetActorName returns the ActorName field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *VersionOut) GetActorName() string { - if o == nil || IsNil(o.ActorName.Get()) { +// GetArtifactId returns the ArtifactId field value +func (o *VersionOut) GetArtifactId() string { + if o == nil { var ret string return ret } - return *o.ActorName.Get() + + return o.ArtifactId } -// GetActorNameOk returns a tuple with the ActorName field value if set, nil otherwise +// GetArtifactIdOk returns a tuple with the ArtifactId field value // and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *VersionOut) GetActorNameOk() (*string, bool) { +func (o *VersionOut) GetArtifactIdOk() (*string, bool) { if o == nil { return nil, false } - return o.ActorName.Get(), o.ActorName.IsSet() + return &o.ArtifactId, true } -// HasActorName returns a boolean if a field has been set. -func (o *VersionOut) HasActorName() bool { - if o != nil && o.ActorName.IsSet() { - return true +// SetArtifactId sets field value +func (o *VersionOut) SetArtifactId(v string) { + o.ArtifactId = v +} + +// GetContentType returns the ContentType field value +func (o *VersionOut) GetContentType() string { + if o == nil { + var ret string + return ret } - return false + return o.ContentType } -// SetActorName gets a reference to the given NullableString and assigns it to the ActorName field. -func (o *VersionOut) SetActorName(v string) { - o.ActorName.Set(&v) -} -// SetActorNameNil sets the value for ActorName to be an explicit nil -func (o *VersionOut) SetActorNameNil() { - o.ActorName.Set(nil) +// GetContentTypeOk returns a tuple with the ContentType field value +// and a boolean to check if the value has been set. +func (o *VersionOut) GetContentTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ContentType, true } -// UnsetActorName ensures that no value is present for ActorName, not even an explicit nil -func (o *VersionOut) UnsetActorName() { - o.ActorName.Unset() +// SetContentType sets field value +func (o *VersionOut) SetContentType(v string) { + o.ContentType = v } -// GetArtId returns the ArtId field value -func (o *VersionOut) GetArtId() string { +// GetCreatedAt returns the CreatedAt field value +func (o *VersionOut) GetCreatedAt() time.Time { if o == nil { - var ret string + var ret time.Time return ret } - return o.ArtId + return o.CreatedAt } -// GetArtIdOk returns a tuple with the ArtId field value +// GetCreatedAtOk returns a tuple with the CreatedAt field value // and a boolean to check if the value has been set. -func (o *VersionOut) GetArtIdOk() (*string, bool) { +func (o *VersionOut) GetCreatedAtOk() (*time.Time, bool) { if o == nil { return nil, false } - return &o.ArtId, true + return &o.CreatedAt, true } -// SetArtId sets field value -func (o *VersionOut) SetArtId(v string) { - o.ArtId = v +// SetCreatedAt sets field value +func (o *VersionOut) SetCreatedAt(v time.Time) { + o.CreatedAt = v } -// GetChangeSummary returns the ChangeSummary field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *VersionOut) GetChangeSummary() string { - if o == nil || IsNil(o.ChangeSummary.Get()) { +// GetCreatedBy returns the CreatedBy field value +// If the value is explicit nil, the zero value for string will be returned +func (o *VersionOut) GetCreatedBy() string { + if o == nil || o.CreatedBy.Get() == nil { var ret string return ret } - return *o.ChangeSummary.Get() + + return *o.CreatedBy.Get() } -// GetChangeSummaryOk returns a tuple with the ChangeSummary field value if set, nil otherwise +// GetCreatedByOk returns a tuple with the CreatedBy field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *VersionOut) GetChangeSummaryOk() (*string, bool) { +func (o *VersionOut) GetCreatedByOk() (*string, bool) { if o == nil { return nil, false } - return o.ChangeSummary.Get(), o.ChangeSummary.IsSet() -} - -// HasChangeSummary returns a boolean if a field has been set. -func (o *VersionOut) HasChangeSummary() bool { - if o != nil && o.ChangeSummary.IsSet() { - return true - } - - return false + return o.CreatedBy.Get(), o.CreatedBy.IsSet() } -// SetChangeSummary gets a reference to the given NullableString and assigns it to the ChangeSummary field. -func (o *VersionOut) SetChangeSummary(v string) { - o.ChangeSummary.Set(&v) -} -// SetChangeSummaryNil sets the value for ChangeSummary to be an explicit nil -func (o *VersionOut) SetChangeSummaryNil() { - o.ChangeSummary.Set(nil) +// SetCreatedBy sets field value +func (o *VersionOut) SetCreatedBy(v string) { + o.CreatedBy.Set(&v) } -// UnsetChangeSummary ensures that no value is present for ChangeSummary, not even an explicit nil -func (o *VersionOut) UnsetChangeSummary() { - o.ChangeSummary.Unset() -} - -// GetContentType returns the ContentType field value -func (o *VersionOut) GetContentType() string { +// GetHash returns the Hash field value +func (o *VersionOut) GetHash() string { if o == nil { var ret string return ret } - return o.ContentType + return o.Hash } -// GetContentTypeOk returns a tuple with the ContentType field value +// GetHashOk returns a tuple with the Hash field value // and a boolean to check if the value has been set. -func (o *VersionOut) GetContentTypeOk() (*string, bool) { +func (o *VersionOut) GetHashOk() (*string, bool) { if o == nil { return nil, false } - return &o.ContentType, true + return &o.Hash, true } -// SetContentType sets field value -func (o *VersionOut) SetContentType(v string) { - o.ContentType = v +// SetHash sets field value +func (o *VersionOut) SetHash(v string) { + o.Hash = v } -// GetCreatedAt returns the CreatedAt field value -func (o *VersionOut) GetCreatedAt() time.Time { +// GetId returns the Id field value +func (o *VersionOut) GetId() string { if o == nil { - var ret time.Time + var ret string return ret } - return o.CreatedAt + return o.Id } -// GetCreatedAtOk returns a tuple with the CreatedAt field value +// GetIdOk returns a tuple with the Id field value // and a boolean to check if the value has been set. -func (o *VersionOut) GetCreatedAtOk() (*time.Time, bool) { +func (o *VersionOut) GetIdOk() (*string, bool) { if o == nil { return nil, false } - return &o.CreatedAt, true + return &o.Id, true } -// SetCreatedAt sets field value -func (o *VersionOut) SetCreatedAt(v time.Time) { - o.CreatedAt = v +// SetId sets field value +func (o *VersionOut) SetId(v string) { + o.Id = v } -// GetHash returns the Hash field value -func (o *VersionOut) GetHash() string { - if o == nil { +// GetParentVersionId returns the ParentVersionId field value +// If the value is explicit nil, the zero value for string will be returned +func (o *VersionOut) GetParentVersionId() string { + if o == nil || o.ParentVersionId.Get() == nil { var ret string return ret } - return o.Hash + return *o.ParentVersionId.Get() } -// GetHashOk returns a tuple with the Hash field value +// GetParentVersionIdOk returns a tuple with the ParentVersionId field value // and a boolean to check if the value has been set. -func (o *VersionOut) GetHashOk() (*string, bool) { +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *VersionOut) GetParentVersionIdOk() (*string, bool) { if o == nil { return nil, false } - return &o.Hash, true + return o.ParentVersionId.Get(), o.ParentVersionId.IsSet() } -// SetHash sets field value -func (o *VersionOut) SetHash(v string) { - o.Hash = v +// SetParentVersionId sets field value +func (o *VersionOut) SetParentVersionId(v string) { + o.ParentVersionId.Set(&v) } // GetSizeBytes returns the SizeBytes field value @@ -295,16 +291,13 @@ func (o VersionOut) MarshalJSON() ([]byte, error) { func (o VersionOut) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if o.ActorName.IsSet() { - toSerialize["actor_name"] = o.ActorName.Get() - } - toSerialize["art_id"] = o.ArtId - if o.ChangeSummary.IsSet() { - toSerialize["change_summary"] = o.ChangeSummary.Get() - } + toSerialize["artifact_id"] = o.ArtifactId toSerialize["content_type"] = o.ContentType toSerialize["created_at"] = o.CreatedAt + toSerialize["created_by"] = o.CreatedBy.Get() toSerialize["hash"] = o.Hash + toSerialize["id"] = o.Id + toSerialize["parent_version_id"] = o.ParentVersionId.Get() toSerialize["size_bytes"] = o.SizeBytes toSerialize["version_number"] = o.VersionNumber return toSerialize, nil @@ -315,10 +308,13 @@ func (o *VersionOut) UnmarshalJSON(data []byte) (err error) { // by unmarshalling the object into a generic map with string keys and checking // that every required field exists as a key in the generic map. requiredProperties := []string{ - "art_id", + "artifact_id", "content_type", "created_at", + "created_by", "hash", + "id", + "parent_version_id", "size_bytes", "version_number", } diff --git a/sdk/go/model_version_page.go b/sdk/go/model_version_page.go deleted file mode 100644 index 7817650..0000000 --- a/sdk/go/model_version_page.go +++ /dev/null @@ -1,248 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the VersionPage type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &VersionPage{} - -// VersionPage struct for VersionPage -type VersionPage struct { - Items []VersionOut `json:"items"` - NextCursor NullableString `json:"next_cursor,omitempty"` - PrunedBefore NullableInt32 `json:"pruned_before,omitempty"` -} - -type _VersionPage VersionPage - -// NewVersionPage instantiates a new VersionPage object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewVersionPage(items []VersionOut) *VersionPage { - this := VersionPage{} - this.Items = items - return &this -} - -// NewVersionPageWithDefaults instantiates a new VersionPage object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewVersionPageWithDefaults() *VersionPage { - this := VersionPage{} - return &this -} - -// GetItems returns the Items field value -func (o *VersionPage) GetItems() []VersionOut { - if o == nil { - var ret []VersionOut - return ret - } - - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value -// and a boolean to check if the value has been set. -func (o *VersionPage) GetItemsOk() ([]VersionOut, bool) { - if o == nil { - return nil, false - } - return o.Items, true -} - -// SetItems sets field value -func (o *VersionPage) SetItems(v []VersionOut) { - o.Items = v -} - -// GetNextCursor returns the NextCursor field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *VersionPage) GetNextCursor() string { - if o == nil || IsNil(o.NextCursor.Get()) { - var ret string - return ret - } - return *o.NextCursor.Get() -} - -// GetNextCursorOk returns a tuple with the NextCursor field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *VersionPage) GetNextCursorOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.NextCursor.Get(), o.NextCursor.IsSet() -} - -// HasNextCursor returns a boolean if a field has been set. -func (o *VersionPage) HasNextCursor() bool { - if o != nil && o.NextCursor.IsSet() { - return true - } - - return false -} - -// SetNextCursor gets a reference to the given NullableString and assigns it to the NextCursor field. -func (o *VersionPage) SetNextCursor(v string) { - o.NextCursor.Set(&v) -} -// SetNextCursorNil sets the value for NextCursor to be an explicit nil -func (o *VersionPage) SetNextCursorNil() { - o.NextCursor.Set(nil) -} - -// UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil -func (o *VersionPage) UnsetNextCursor() { - o.NextCursor.Unset() -} - -// GetPrunedBefore returns the PrunedBefore field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *VersionPage) GetPrunedBefore() int32 { - if o == nil || IsNil(o.PrunedBefore.Get()) { - var ret int32 - return ret - } - return *o.PrunedBefore.Get() -} - -// GetPrunedBeforeOk returns a tuple with the PrunedBefore field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *VersionPage) GetPrunedBeforeOk() (*int32, bool) { - if o == nil { - return nil, false - } - return o.PrunedBefore.Get(), o.PrunedBefore.IsSet() -} - -// HasPrunedBefore returns a boolean if a field has been set. -func (o *VersionPage) HasPrunedBefore() bool { - if o != nil && o.PrunedBefore.IsSet() { - return true - } - - return false -} - -// SetPrunedBefore gets a reference to the given NullableInt32 and assigns it to the PrunedBefore field. -func (o *VersionPage) SetPrunedBefore(v int32) { - o.PrunedBefore.Set(&v) -} -// SetPrunedBeforeNil sets the value for PrunedBefore to be an explicit nil -func (o *VersionPage) SetPrunedBeforeNil() { - o.PrunedBefore.Set(nil) -} - -// UnsetPrunedBefore ensures that no value is present for PrunedBefore, not even an explicit nil -func (o *VersionPage) UnsetPrunedBefore() { - o.PrunedBefore.Unset() -} - -func (o VersionPage) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o VersionPage) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["items"] = o.Items - if o.NextCursor.IsSet() { - toSerialize["next_cursor"] = o.NextCursor.Get() - } - if o.PrunedBefore.IsSet() { - toSerialize["pruned_before"] = o.PrunedBefore.Get() - } - return toSerialize, nil -} - -func (o *VersionPage) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "items", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varVersionPage := _VersionPage{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varVersionPage) - - if err != nil { - return err - } - - *o = VersionPage(varVersionPage) - - return err -} - -type NullableVersionPage struct { - value *VersionPage - isSet bool -} - -func (v NullableVersionPage) Get() *VersionPage { - return v.value -} - -func (v *NullableVersionPage) Set(val *VersionPage) { - v.value = val - v.isSet = true -} - -func (v NullableVersionPage) IsSet() bool { - return v.isSet -} - -func (v *NullableVersionPage) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVersionPage(val *VersionPage) *NullableVersionPage { - return &NullableVersionPage{value: val, isSet: true} -} - -func (v NullableVersionPage) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVersionPage) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_version_retention_out.go b/sdk/go/model_version_retention_out.go deleted file mode 100644 index 75b061a..0000000 --- a/sdk/go/model_version_retention_out.go +++ /dev/null @@ -1,156 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the VersionRetentionOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &VersionRetentionOut{} - -// VersionRetentionOut struct for VersionRetentionOut -type VersionRetentionOut struct { - VersionsMax int32 `json:"versions_max"` -} - -type _VersionRetentionOut VersionRetentionOut - -// NewVersionRetentionOut instantiates a new VersionRetentionOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewVersionRetentionOut(versionsMax int32) *VersionRetentionOut { - this := VersionRetentionOut{} - this.VersionsMax = versionsMax - return &this -} - -// NewVersionRetentionOutWithDefaults instantiates a new VersionRetentionOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewVersionRetentionOutWithDefaults() *VersionRetentionOut { - this := VersionRetentionOut{} - return &this -} - -// GetVersionsMax returns the VersionsMax field value -func (o *VersionRetentionOut) GetVersionsMax() int32 { - if o == nil { - var ret int32 - return ret - } - - return o.VersionsMax -} - -// GetVersionsMaxOk returns a tuple with the VersionsMax field value -// and a boolean to check if the value has been set. -func (o *VersionRetentionOut) GetVersionsMaxOk() (*int32, bool) { - if o == nil { - return nil, false - } - return &o.VersionsMax, true -} - -// SetVersionsMax sets field value -func (o *VersionRetentionOut) SetVersionsMax(v int32) { - o.VersionsMax = v -} - -func (o VersionRetentionOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o VersionRetentionOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["versions_max"] = o.VersionsMax - return toSerialize, nil -} - -func (o *VersionRetentionOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "versions_max", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varVersionRetentionOut := _VersionRetentionOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varVersionRetentionOut) - - if err != nil { - return err - } - - *o = VersionRetentionOut(varVersionRetentionOut) - - return err -} - -type NullableVersionRetentionOut struct { - value *VersionRetentionOut - isSet bool -} - -func (v NullableVersionRetentionOut) Get() *VersionRetentionOut { - return v.value -} - -func (v *NullableVersionRetentionOut) Set(val *VersionRetentionOut) { - v.value = val - v.isSet = true -} - -func (v NullableVersionRetentionOut) IsSet() bool { - return v.isSet -} - -func (v *NullableVersionRetentionOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableVersionRetentionOut(val *VersionRetentionOut) *NullableVersionRetentionOut { - return &NullableVersionRetentionOut{value: val, isSet: true} -} - -func (v NullableVersionRetentionOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableVersionRetentionOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_workspace_create_in.go b/sdk/go/model_workspace_create_in.go deleted file mode 100644 index b97b6d0..0000000 --- a/sdk/go/model_workspace_create_in.go +++ /dev/null @@ -1,156 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the WorkspaceCreateIn type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WorkspaceCreateIn{} - -// WorkspaceCreateIn POST /v0/workspaces body. `name` is the user-facing workspace label; the creator becomes its admin and gets a starter drive. -type WorkspaceCreateIn struct { - Name string `json:"name"` -} - -type _WorkspaceCreateIn WorkspaceCreateIn - -// NewWorkspaceCreateIn instantiates a new WorkspaceCreateIn object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWorkspaceCreateIn(name string) *WorkspaceCreateIn { - this := WorkspaceCreateIn{} - this.Name = name - return &this -} - -// NewWorkspaceCreateInWithDefaults instantiates a new WorkspaceCreateIn object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWorkspaceCreateInWithDefaults() *WorkspaceCreateIn { - this := WorkspaceCreateIn{} - return &this -} - -// GetName returns the Name field value -func (o *WorkspaceCreateIn) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *WorkspaceCreateIn) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *WorkspaceCreateIn) SetName(v string) { - o.Name = v -} - -func (o WorkspaceCreateIn) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WorkspaceCreateIn) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["name"] = o.Name - return toSerialize, nil -} - -func (o *WorkspaceCreateIn) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "name", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varWorkspaceCreateIn := _WorkspaceCreateIn{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWorkspaceCreateIn) - - if err != nil { - return err - } - - *o = WorkspaceCreateIn(varWorkspaceCreateIn) - - return err -} - -type NullableWorkspaceCreateIn struct { - value *WorkspaceCreateIn - isSet bool -} - -func (v NullableWorkspaceCreateIn) Get() *WorkspaceCreateIn { - return v.value -} - -func (v *NullableWorkspaceCreateIn) Set(val *WorkspaceCreateIn) { - v.value = val - v.isSet = true -} - -func (v NullableWorkspaceCreateIn) IsSet() bool { - return v.isSet -} - -func (v *NullableWorkspaceCreateIn) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWorkspaceCreateIn(val *WorkspaceCreateIn) *NullableWorkspaceCreateIn { - return &NullableWorkspaceCreateIn{value: val, isSet: true} -} - -func (v NullableWorkspaceCreateIn) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWorkspaceCreateIn) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_workspace_create_out.go b/sdk/go/model_workspace_create_out.go deleted file mode 100644 index 75777cb..0000000 --- a/sdk/go/model_workspace_create_out.go +++ /dev/null @@ -1,212 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the WorkspaceCreateOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WorkspaceCreateOut{} - -// WorkspaceCreateOut POST /v0/workspaces response. Carries the new workspace + its starter drive's `ad_live_` key **once** (`starter_drive_api_key`) — reveal-once, store it now (mint more keys via `POST /v0/drives/{id}/keys`). -type WorkspaceCreateOut struct { - StarterDriveApiKey string `json:"starter_drive_api_key"` - StarterDriveId string `json:"starter_drive_id"` - Workspace WorkspaceOut `json:"workspace"` -} - -type _WorkspaceCreateOut WorkspaceCreateOut - -// NewWorkspaceCreateOut instantiates a new WorkspaceCreateOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWorkspaceCreateOut(starterDriveApiKey string, starterDriveId string, workspace WorkspaceOut) *WorkspaceCreateOut { - this := WorkspaceCreateOut{} - this.StarterDriveApiKey = starterDriveApiKey - this.StarterDriveId = starterDriveId - this.Workspace = workspace - return &this -} - -// NewWorkspaceCreateOutWithDefaults instantiates a new WorkspaceCreateOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWorkspaceCreateOutWithDefaults() *WorkspaceCreateOut { - this := WorkspaceCreateOut{} - return &this -} - -// GetStarterDriveApiKey returns the StarterDriveApiKey field value -func (o *WorkspaceCreateOut) GetStarterDriveApiKey() string { - if o == nil { - var ret string - return ret - } - - return o.StarterDriveApiKey -} - -// GetStarterDriveApiKeyOk returns a tuple with the StarterDriveApiKey field value -// and a boolean to check if the value has been set. -func (o *WorkspaceCreateOut) GetStarterDriveApiKeyOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.StarterDriveApiKey, true -} - -// SetStarterDriveApiKey sets field value -func (o *WorkspaceCreateOut) SetStarterDriveApiKey(v string) { - o.StarterDriveApiKey = v -} - -// GetStarterDriveId returns the StarterDriveId field value -func (o *WorkspaceCreateOut) GetStarterDriveId() string { - if o == nil { - var ret string - return ret - } - - return o.StarterDriveId -} - -// GetStarterDriveIdOk returns a tuple with the StarterDriveId field value -// and a boolean to check if the value has been set. -func (o *WorkspaceCreateOut) GetStarterDriveIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.StarterDriveId, true -} - -// SetStarterDriveId sets field value -func (o *WorkspaceCreateOut) SetStarterDriveId(v string) { - o.StarterDriveId = v -} - -// GetWorkspace returns the Workspace field value -func (o *WorkspaceCreateOut) GetWorkspace() WorkspaceOut { - if o == nil { - var ret WorkspaceOut - return ret - } - - return o.Workspace -} - -// GetWorkspaceOk returns a tuple with the Workspace field value -// and a boolean to check if the value has been set. -func (o *WorkspaceCreateOut) GetWorkspaceOk() (*WorkspaceOut, bool) { - if o == nil { - return nil, false - } - return &o.Workspace, true -} - -// SetWorkspace sets field value -func (o *WorkspaceCreateOut) SetWorkspace(v WorkspaceOut) { - o.Workspace = v -} - -func (o WorkspaceCreateOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WorkspaceCreateOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["starter_drive_api_key"] = o.StarterDriveApiKey - toSerialize["starter_drive_id"] = o.StarterDriveId - toSerialize["workspace"] = o.Workspace - return toSerialize, nil -} - -func (o *WorkspaceCreateOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "starter_drive_api_key", - "starter_drive_id", - "workspace", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varWorkspaceCreateOut := _WorkspaceCreateOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWorkspaceCreateOut) - - if err != nil { - return err - } - - *o = WorkspaceCreateOut(varWorkspaceCreateOut) - - return err -} - -type NullableWorkspaceCreateOut struct { - value *WorkspaceCreateOut - isSet bool -} - -func (v NullableWorkspaceCreateOut) Get() *WorkspaceCreateOut { - return v.value -} - -func (v *NullableWorkspaceCreateOut) Set(val *WorkspaceCreateOut) { - v.value = val - v.isSet = true -} - -func (v NullableWorkspaceCreateOut) IsSet() bool { - return v.isSet -} - -func (v *NullableWorkspaceCreateOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWorkspaceCreateOut(val *WorkspaceCreateOut) *NullableWorkspaceCreateOut { - return &NullableWorkspaceCreateOut{value: val, isSet: true} -} - -func (v NullableWorkspaceCreateOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWorkspaceCreateOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_workspace_list.go b/sdk/go/model_workspace_list.go deleted file mode 100644 index 01a7a01..0000000 --- a/sdk/go/model_workspace_list.go +++ /dev/null @@ -1,202 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the WorkspaceList type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WorkspaceList{} - -// WorkspaceList struct for WorkspaceList -type WorkspaceList struct { - Items []WorkspaceOut `json:"items"` - NextCursor NullableString `json:"next_cursor,omitempty"` -} - -type _WorkspaceList WorkspaceList - -// NewWorkspaceList instantiates a new WorkspaceList object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWorkspaceList(items []WorkspaceOut) *WorkspaceList { - this := WorkspaceList{} - this.Items = items - return &this -} - -// NewWorkspaceListWithDefaults instantiates a new WorkspaceList object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWorkspaceListWithDefaults() *WorkspaceList { - this := WorkspaceList{} - return &this -} - -// GetItems returns the Items field value -func (o *WorkspaceList) GetItems() []WorkspaceOut { - if o == nil { - var ret []WorkspaceOut - return ret - } - - return o.Items -} - -// GetItemsOk returns a tuple with the Items field value -// and a boolean to check if the value has been set. -func (o *WorkspaceList) GetItemsOk() ([]WorkspaceOut, bool) { - if o == nil { - return nil, false - } - return o.Items, true -} - -// SetItems sets field value -func (o *WorkspaceList) SetItems(v []WorkspaceOut) { - o.Items = v -} - -// GetNextCursor returns the NextCursor field value if set, zero value otherwise (both if not set or set to explicit null). -func (o *WorkspaceList) GetNextCursor() string { - if o == nil || IsNil(o.NextCursor.Get()) { - var ret string - return ret - } - return *o.NextCursor.Get() -} - -// GetNextCursorOk returns a tuple with the NextCursor field value if set, nil otherwise -// and a boolean to check if the value has been set. -// NOTE: If the value is an explicit nil, `nil, true` will be returned -func (o *WorkspaceList) GetNextCursorOk() (*string, bool) { - if o == nil { - return nil, false - } - return o.NextCursor.Get(), o.NextCursor.IsSet() -} - -// HasNextCursor returns a boolean if a field has been set. -func (o *WorkspaceList) HasNextCursor() bool { - if o != nil && o.NextCursor.IsSet() { - return true - } - - return false -} - -// SetNextCursor gets a reference to the given NullableString and assigns it to the NextCursor field. -func (o *WorkspaceList) SetNextCursor(v string) { - o.NextCursor.Set(&v) -} -// SetNextCursorNil sets the value for NextCursor to be an explicit nil -func (o *WorkspaceList) SetNextCursorNil() { - o.NextCursor.Set(nil) -} - -// UnsetNextCursor ensures that no value is present for NextCursor, not even an explicit nil -func (o *WorkspaceList) UnsetNextCursor() { - o.NextCursor.Unset() -} - -func (o WorkspaceList) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WorkspaceList) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["items"] = o.Items - if o.NextCursor.IsSet() { - toSerialize["next_cursor"] = o.NextCursor.Get() - } - return toSerialize, nil -} - -func (o *WorkspaceList) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "items", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varWorkspaceList := _WorkspaceList{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWorkspaceList) - - if err != nil { - return err - } - - *o = WorkspaceList(varWorkspaceList) - - return err -} - -type NullableWorkspaceList struct { - value *WorkspaceList - isSet bool -} - -func (v NullableWorkspaceList) Get() *WorkspaceList { - return v.value -} - -func (v *NullableWorkspaceList) Set(val *WorkspaceList) { - v.value = val - v.isSet = true -} - -func (v NullableWorkspaceList) IsSet() bool { - return v.isSet -} - -func (v *NullableWorkspaceList) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWorkspaceList(val *WorkspaceList) *NullableWorkspaceList { - return &NullableWorkspaceList{value: val, isSet: true} -} - -func (v NullableWorkspaceList) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWorkspaceList) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_workspace_out.go b/sdk/go/model_workspace_out.go deleted file mode 100644 index 1b826af..0000000 --- a/sdk/go/model_workspace_out.go +++ /dev/null @@ -1,269 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "time" - "bytes" - "fmt" -) - -// checks if the WorkspaceOut type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WorkspaceOut{} - -// WorkspaceOut One workspace in a listing — metadata only. `role` is the CALLER's role in it (admin/member), so a client can render management affordances without a second round-trip. -type WorkspaceOut struct { - CreatedAt time.Time `json:"created_at"` - Id string `json:"id"` - Name string `json:"name"` - Role string `json:"role"` - TierId string `json:"tier_id"` -} - -type _WorkspaceOut WorkspaceOut - -// NewWorkspaceOut instantiates a new WorkspaceOut object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWorkspaceOut(createdAt time.Time, id string, name string, role string, tierId string) *WorkspaceOut { - this := WorkspaceOut{} - this.CreatedAt = createdAt - this.Id = id - this.Name = name - this.Role = role - this.TierId = tierId - return &this -} - -// NewWorkspaceOutWithDefaults instantiates a new WorkspaceOut object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWorkspaceOutWithDefaults() *WorkspaceOut { - this := WorkspaceOut{} - return &this -} - -// GetCreatedAt returns the CreatedAt field value -func (o *WorkspaceOut) GetCreatedAt() time.Time { - if o == nil { - var ret time.Time - return ret - } - - return o.CreatedAt -} - -// GetCreatedAtOk returns a tuple with the CreatedAt field value -// and a boolean to check if the value has been set. -func (o *WorkspaceOut) GetCreatedAtOk() (*time.Time, bool) { - if o == nil { - return nil, false - } - return &o.CreatedAt, true -} - -// SetCreatedAt sets field value -func (o *WorkspaceOut) SetCreatedAt(v time.Time) { - o.CreatedAt = v -} - -// GetId returns the Id field value -func (o *WorkspaceOut) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *WorkspaceOut) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *WorkspaceOut) SetId(v string) { - o.Id = v -} - -// GetName returns the Name field value -func (o *WorkspaceOut) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *WorkspaceOut) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *WorkspaceOut) SetName(v string) { - o.Name = v -} - -// GetRole returns the Role field value -func (o *WorkspaceOut) GetRole() string { - if o == nil { - var ret string - return ret - } - - return o.Role -} - -// GetRoleOk returns a tuple with the Role field value -// and a boolean to check if the value has been set. -func (o *WorkspaceOut) GetRoleOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Role, true -} - -// SetRole sets field value -func (o *WorkspaceOut) SetRole(v string) { - o.Role = v -} - -// GetTierId returns the TierId field value -func (o *WorkspaceOut) GetTierId() string { - if o == nil { - var ret string - return ret - } - - return o.TierId -} - -// GetTierIdOk returns a tuple with the TierId field value -// and a boolean to check if the value has been set. -func (o *WorkspaceOut) GetTierIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.TierId, true -} - -// SetTierId sets field value -func (o *WorkspaceOut) SetTierId(v string) { - o.TierId = v -} - -func (o WorkspaceOut) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WorkspaceOut) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["created_at"] = o.CreatedAt - toSerialize["id"] = o.Id - toSerialize["name"] = o.Name - toSerialize["role"] = o.Role - toSerialize["tier_id"] = o.TierId - return toSerialize, nil -} - -func (o *WorkspaceOut) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "created_at", - "id", - "name", - "role", - "tier_id", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varWorkspaceOut := _WorkspaceOut{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWorkspaceOut) - - if err != nil { - return err - } - - *o = WorkspaceOut(varWorkspaceOut) - - return err -} - -type NullableWorkspaceOut struct { - value *WorkspaceOut - isSet bool -} - -func (v NullableWorkspaceOut) Get() *WorkspaceOut { - return v.value -} - -func (v *NullableWorkspaceOut) Set(val *WorkspaceOut) { - v.value = val - v.isSet = true -} - -func (v NullableWorkspaceOut) IsSet() bool { - return v.isSet -} - -func (v *NullableWorkspaceOut) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWorkspaceOut(val *WorkspaceOut) *NullableWorkspaceOut { - return &NullableWorkspaceOut{value: val, isSet: true} -} - -func (v NullableWorkspaceOut) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWorkspaceOut) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/model_workspace_rename_in.go b/sdk/go/model_workspace_rename_in.go deleted file mode 100644 index 661b079..0000000 --- a/sdk/go/model_workspace_rename_in.go +++ /dev/null @@ -1,156 +0,0 @@ -/* -AgentDrive - -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - -API version: -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package agentdrive - -import ( - "encoding/json" - "bytes" - "fmt" -) - -// checks if the WorkspaceRenameIn type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &WorkspaceRenameIn{} - -// WorkspaceRenameIn PATCH /v0/workspaces/{org} body — rename a workspace the caller administers. -type WorkspaceRenameIn struct { - Name string `json:"name"` -} - -type _WorkspaceRenameIn WorkspaceRenameIn - -// NewWorkspaceRenameIn instantiates a new WorkspaceRenameIn object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewWorkspaceRenameIn(name string) *WorkspaceRenameIn { - this := WorkspaceRenameIn{} - this.Name = name - return &this -} - -// NewWorkspaceRenameInWithDefaults instantiates a new WorkspaceRenameIn object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewWorkspaceRenameInWithDefaults() *WorkspaceRenameIn { - this := WorkspaceRenameIn{} - return &this -} - -// GetName returns the Name field value -func (o *WorkspaceRenameIn) GetName() string { - if o == nil { - var ret string - return ret - } - - return o.Name -} - -// GetNameOk returns a tuple with the Name field value -// and a boolean to check if the value has been set. -func (o *WorkspaceRenameIn) GetNameOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Name, true -} - -// SetName sets field value -func (o *WorkspaceRenameIn) SetName(v string) { - o.Name = v -} - -func (o WorkspaceRenameIn) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o WorkspaceRenameIn) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["name"] = o.Name - return toSerialize, nil -} - -func (o *WorkspaceRenameIn) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "name", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varWorkspaceRenameIn := _WorkspaceRenameIn{} - - decoder := json.NewDecoder(bytes.NewReader(data)) - decoder.DisallowUnknownFields() - err = decoder.Decode(&varWorkspaceRenameIn) - - if err != nil { - return err - } - - *o = WorkspaceRenameIn(varWorkspaceRenameIn) - - return err -} - -type NullableWorkspaceRenameIn struct { - value *WorkspaceRenameIn - isSet bool -} - -func (v NullableWorkspaceRenameIn) Get() *WorkspaceRenameIn { - return v.value -} - -func (v *NullableWorkspaceRenameIn) Set(val *WorkspaceRenameIn) { - v.value = val - v.isSet = true -} - -func (v NullableWorkspaceRenameIn) IsSet() bool { - return v.isSet -} - -func (v *NullableWorkspaceRenameIn) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableWorkspaceRenameIn(val *WorkspaceRenameIn) *NullableWorkspaceRenameIn { - return &NullableWorkspaceRenameIn{value: val, isSet: true} -} - -func (v NullableWorkspaceRenameIn) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableWorkspaceRenameIn) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/sdk/go/response.go b/sdk/go/response.go index 59ea053..9364924 100644 --- a/sdk/go/response.go +++ b/sdk/go/response.go @@ -1,7 +1,7 @@ /* AgentDrive -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. API version: */ diff --git a/sdk/go/utils.go b/sdk/go/utils.go index 3c6bbd3..4e6ac09 100644 --- a/sdk/go/utils.go +++ b/sdk/go/utils.go @@ -1,7 +1,7 @@ /* AgentDrive -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. +AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. API version: */ diff --git a/sdk/openapi-generator-image.txt b/sdk/openapi-generator-image.txt index db685f7..643a5d6 100644 --- a/sdk/openapi-generator-image.txt +++ b/sdk/openapi-generator-image.txt @@ -1 +1 @@ -openapitools/openapi-generator-cli:v7.24.0 +openapitools/openapi-generator-cli:v7.24.0@sha256:5bf3dc75f764c584da8e3344c51b2f3f1e74703461d46a035b5ac1d31515cc88 diff --git a/sdk/openapi.compatibility-reset.json b/sdk/openapi.compatibility-reset.json new file mode 100644 index 0000000..ca5911c --- /dev/null +++ b/sdk/openapi.compatibility-reset.json @@ -0,0 +1,7 @@ +{ + "format": 1, + "from_sha256": "bf63bad6da953d072d38054ddec628b4ad48238394cb505862b1ef2d4bbc69ee", + "reason": "Reviewed Phase 1 reset: supersede the pre-Phase 1 0.0.1 client contract and remove browser/internal routes from the supported SDK surface.", + "source_commit": "31cd35c8e12aef1cbee228e965289107cb51092c", + "to_sha256": "dd8145c12035f5827e9056d40c0ae9e56f1892c98580f81d5f005007ef7a0f6a" +} diff --git a/sdk/openapi.json b/sdk/openapi.json index d59f2db..7da5b57 100644 --- a/sdk/openapi.json +++ b/sdk/openapi.json @@ -1,127 +1,63 @@ { "components": { "schemas": { - "AgentAuthMetadataOut": { - "additionalProperties": true, + "ArtifactCopyIn": { + "additionalProperties": false, + "description": "POST /v0/drives/{id}/artifacts/{artifact_id}/copy body.\n\n``destination_drive_id`` must equal the source drive (or be absent) \u2014\ncross-drive copy is out of v0 scope and rejected.", "properties": { - "claim_endpoint": { - "title": "Claim Endpoint", - "type": "string" - }, - "events_endpoint": { + "destination_drive_id": { "anyOf": [ { + "pattern": "^drv_[a-f0-9]{16}$", "type": "string" }, { "type": "null" } ], - "title": "Events Endpoint" - }, - "identity_assertion": { - "$ref": "#/components/schemas/IdentityAssertionMetadataOut" - }, - "identity_endpoint": { - "title": "Identity Endpoint", - "type": "string" - }, - "identity_types_supported": { - "items": { - "type": "string" - }, - "title": "Identity Types Supported", - "type": "array" - }, - "skill": { - "title": "Skill", - "type": "string" - }, - "spec_version": { - "title": "Spec Version", - "type": "string" - } - }, - "required": [ - "spec_version", - "skill", - "identity_endpoint", - "claim_endpoint", - "events_endpoint", - "identity_types_supported", - "identity_assertion" - ], - "title": "AgentAuthMetadataOut", - "type": "object" - }, - "AnonymousIdentityResponse": { - "description": "`POST /agent/identity` response on the anonymous path.\n\nThe agent stores `identity_assertion` as its long-lived credential\nand uses `claim_token` to initiate the claim ceremony when the\nhuman is ready.", - "properties": { - "agent_identity_id": { - "title": "Agent Identity Id", - "type": "string" - }, - "claim_metadata": { - "$ref": "#/components/schemas/ClaimMetadata" + "title": "Destination Drive Id" }, - "claim_token": { - "description": "Opaque server-issued secret. Present at POST /agent/identity/claim and at POST /oauth2/token (grant_type=claim).", - "title": "Claim Token", - "type": "string" - }, - "drive_id": { - "title": "Drive Id", + "destination_name": { + "maxLength": 255, + "minLength": 1, + "title": "Destination Name", "type": "string" }, - "expires_at": { - "format": "date-time", - "title": "Expires At", + "destination_parent_id": { + "pattern": "^fld_[a-f0-9]{16}$", + "title": "Destination Parent Id", "type": "string" }, - "identity_assertion": { - "description": "JWT signed by AgentDrive, scope=pre_claim. 30-day TTL.", - "title": "Identity Assertion", - "type": "string" + "version_id": { + "anyOf": [ + { + "pattern": "^ver_[a-f0-9]{16}$", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Version Id" } }, "required": [ - "identity_assertion", - "claim_token", - "claim_metadata", - "drive_id", - "agent_identity_id", - "expires_at" + "destination_parent_id", + "destination_name" ], - "title": "AnonymousIdentityResponse", + "title": "ArtifactCopyIn", "type": "object" }, - "ArtifactDeleteOut": { - "description": "DELETE /v0/artifacts/{art_id} response \u2014 the soft-delete receipt.\nReversible until the GC cron hard-deletes at `purge_at`; `restore_url`\npoints at the by-id restore endpoint (deletion-design.md \u00a75.3).", + "ArtifactListOut": { "properties": { - "deleted_at": { - "format": "date-time", - "title": "Deleted At", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "ok": { - "default": true, - "title": "Ok", - "type": "boolean" - }, - "path": { - "title": "Path", - "type": "string" - }, - "purge_at": { - "format": "date-time", - "title": "Purge At", - "type": "string" + "items": { + "items": { + "$ref": "#/components/schemas/ArtifactOut" + }, + "title": "Items", + "type": "array" }, - "restore_url": { + "next_cursor": { "anyOf": [ { "type": "string" @@ -130,61 +66,46 @@ "type": "null" } ], - "title": "Restore Url" - } - }, - "required": [ - "id", - "path", - "deleted_at", - "purge_at" - ], - "title": "ArtifactDeleteOut", - "type": "object" - }, - "ArtifactHeadOut": { - "properties": { - "version": { - "title": "Version", - "type": "integer" - } - }, - "required": [ - "version" - ], - "title": "ArtifactHeadOut", - "type": "object" - }, - "ArtifactMoveIn": { - "description": "POST /v0/artifacts/{art_id}/move body \u2014 rename / move to a new\npath on the same drive. Mirrors `FolderMoveIn`; its own schema (vs.\nreusing another body) keeps the move surface self-documenting in the\nOpenAPI spec.", - "properties": { - "path": { - "title": "Path", - "type": "string" + "title": "Next Cursor" } }, "required": [ - "path" + "items", + "next_cursor" ], - "title": "ArtifactMoveIn", + "title": "ArtifactListOut", "type": "object" }, "ArtifactOut": { "properties": { + "content_preview": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Content Preview" + }, "content_type": { - "title": "Content Type", - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Content Type" }, "created_at": { "format": "date-time", "title": "Created At", "type": "string" }, - "drive_id": { - "title": "Drive Id", - "type": "string" - }, - "embedded_at": { + "deleted_at": { "anyOf": [ { "format": "date-time", @@ -194,35 +115,38 @@ "type": "null" } ], - "title": "Embedded At" - }, - "etag": { - "title": "Etag", - "type": "string" - }, - "file_type": { - "title": "File Type", - "type": "string" + "title": "Deleted At" }, - "hash": { - "title": "Hash", + "drive_id": { + "pattern": "^drv_[a-f0-9]{16}$", + "title": "Drive Id", "type": "string" }, - "id": { - "title": "Id", + "effective_visibility": { + "description": "Server-computed exposure summary, resolved over the artifact's live grants, its folder ancestry (bounded by the nearest sealed folder), and the drive. 'public' when any live grant has principal_type 'public'; otherwise 'shared' when a live grant names a principal other than the drive's creator; otherwise 'private'. Describes exposure, NOT the caller's own access.", + "enum": [ + "public", + "shared", + "private" + ], + "title": "Effective Visibility", "type": "string" }, - "indexed_at": { + "head_version_id": { "anyOf": [ { - "format": "date-time", "type": "string" }, { "type": "null" } ], - "title": "Indexed At" + "title": "Head Version Id" + }, + "id": { + "pattern": "^art_[a-f0-9]{16}$", + "title": "Id", + "type": "string" }, "labels": { "items": { @@ -231,85 +155,62 @@ "title": "Labels", "type": "array" }, - "llm_index": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Llm Index" - }, "metadata": { "additionalProperties": true, "title": "Metadata", "type": "object" }, - "metageneration": { - "default": 1, - "title": "Metageneration", - "type": "integer" - }, - "path": { - "title": "Path", + "name": { + "title": "Name", "type": "string" }, - "permalink": { - "title": "Permalink", + "parent_id": { + "pattern": "^fld_[a-f0-9]{16}$", + "title": "Parent Id", "type": "string" }, - "size_bytes": { - "title": "Size Bytes", - "type": "integer" + "revision": { + "pattern": "^rev_[a-f0-9]{16}$", + "title": "Revision", + "type": "string" }, - "source": { - "anyOf": [ - { - "$ref": "#/components/schemas/ArtifactSource" - }, - { - "type": "null" - } - ] + "state": { + "enum": [ + "active", + "deleted" + ], + "title": "State", + "type": "string" }, "updated_at": { "format": "date-time", "title": "Updated At", "type": "string" - }, - "url": { - "title": "Url", - "type": "string" - }, - "version_number": { - "default": 1, - "title": "Version Number", - "type": "integer" } }, "required": [ "id", "drive_id", - "path", - "url", - "permalink", + "parent_id", + "name", "content_type", - "file_type", - "size_bytes", - "hash", - "etag", + "content_preview", + "labels", + "metadata", + "head_version_id", + "revision", + "state", "created_at", - "updated_at" + "updated_at", + "deleted_at", + "effective_visibility" ], "title": "ArtifactOut", "type": "object" }, - "ArtifactPatchIn": { + "ArtifactUpdateIn": { "additionalProperties": false, - "description": "PATCH /v0/artifacts/{art_id} body \u2014 metadata-only partial\n(JSON-merge-patch) update.\n\nEvery field is optional. Presence is what matters, not the value:\na field left out of the body (per Pydantic `model_fields_set`) is\nleft unchanged; a field that IS present is applied \u2014 with an explicit\n`null` / `[]` / `{}` meaning \"clear it\". This mirrors the MCP\n`set_metadata` tool and the core `patch_artifact_metadata` sentinel\nsemantics (omitted = preserve, present = replace/clear).\n\n * `labels` \u2014 replace the label set; `[]` or `null` clears it.\n * `metadata` \u2014 replace the free-form metadata object; `{}` or `null`\n clears it.\n * `source` \u2014 replace provenance refs; `null` (or `{\"refs\": []}`)\n clears them.\n\nPATCH is metadata-only: to move/rename an artifact, use\n`POST /v0/artifacts/{art_id}/move`. `extra=\"forbid\"` makes a stray\nfield (notably a legacy `path`) a hard 422 rather than a silent\nno-op \u2014 a clean-break signal to migrate to the move verb.", + "description": "PATCH /v0/drives/{id}/artifacts/{artifact_id} body \u2014 at least one\nfield is required.", "properties": { "labels": { "anyOf": [ @@ -337,178 +238,219 @@ ], "title": "Metadata" }, - "source": { + "name": { + "anyOf": [ + { + "maxLength": 255, + "minLength": 1, + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + }, + "parent_id": { "anyOf": [ { - "$ref": "#/components/schemas/ArtifactSource" + "pattern": "^fld_[a-f0-9]{16}$", + "type": "string" }, { "type": "null" } - ] + ], + "title": "Parent Id" } }, - "title": "ArtifactPatchIn", + "title": "ArtifactUpdateIn", "type": "object" }, - "ArtifactSource": { - "description": "Caller-supplied provenance metadata, attached to an artifact.\n\nv0.6 model: a list of typed refs. The legacy v0.5 fields\n(`agent_id`, `run_id`, `prompt_hash`) were never validated and are\nsuperseded by the `refs` shape (an agent-id ref would be\n`{\"type\": \"agent\", \"id\": \"...\"}` in v0.6 vocabulary).", + "ChangeActorOut": { "properties": { - "refs": { - "items": { - "$ref": "#/components/schemas/SourceRef" - }, - "title": "Refs", - "type": "array" + "id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Id" + }, + "type": { + "enum": [ + "agent", + "user", + "system" + ], + "title": "Type", + "type": "string" } }, - "title": "ArtifactSource", + "required": [ + "type", + "id" + ], + "title": "ChangeActorOut", "type": "object" }, - "AuthorizationServerMetadataOut": { - "additionalProperties": true, + "ChangeOut": { "properties": { - "agent_auth": { - "$ref": "#/components/schemas/AgentAuthMetadataOut" + "actor": { + "$ref": "#/components/schemas/ChangeActorOut" }, - "authorization_endpoint": { - "title": "Authorization Endpoint", + "change_set_id": { + "title": "Change Set Id", "type": "string" }, - "authorization_response_iss_parameter_supported": { - "title": "Authorization Response Iss Parameter Supported", - "type": "boolean" - }, - "code_challenge_methods_supported": { - "items": { - "type": "string" - }, - "title": "Code Challenge Methods Supported", - "type": "array" - }, - "grant_types_supported": { - "items": { - "type": "string" - }, - "title": "Grant Types Supported", - "type": "array" + "data": { + "additionalProperties": true, + "title": "Data", + "type": "object" }, - "issuer": { - "title": "Issuer", + "drive_id": { + "pattern": "^drv_[a-f0-9]{16}$", + "title": "Drive Id", "type": "string" }, - "jwks_uri": { - "title": "Jwks Uri", + "id": { + "pattern": "^chg_[a-f0-9]{16}$", + "title": "Id", "type": "string" }, - "registration_endpoint": { - "title": "Registration Endpoint", + "occurred_at": { + "format": "date-time", + "title": "Occurred At", "type": "string" }, - "response_modes_supported": { - "items": { - "type": "string" - }, - "title": "Response Modes Supported", - "type": "array" - }, - "response_types_supported": { - "items": { - "type": "string" - }, - "title": "Response Types Supported", - "type": "array" + "previous_revision": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Previous Revision" }, - "revocation_endpoint": { - "title": "Revocation Endpoint", - "type": "string" + "resource": { + "$ref": "#/components/schemas/ChangeResourceOut" }, - "revocation_endpoint_auth_methods_supported": { - "items": { - "type": "string" - }, - "title": "Revocation Endpoint Auth Methods Supported", - "type": "array" + "revision": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Revision" }, - "scopes_supported": { - "items": { - "type": "string" - }, - "title": "Scopes Supported", - "type": "array" - }, - "token_endpoint": { - "title": "Token Endpoint", + "type": { + "title": "Type", "type": "string" + } + }, + "required": [ + "id", + "change_set_id", + "type", + "drive_id", + "actor", + "resource", + "previous_revision", + "revision", + "occurred_at", + "data" + ], + "title": "ChangeOut", + "type": "object" + }, + "ChangePageOut": { + "properties": { + "has_more": { + "title": "Has More", + "type": "boolean" }, - "token_endpoint_auth_methods_supported": { + "items": { "items": { - "type": "string" + "$ref": "#/components/schemas/ChangeOut" }, - "title": "Token Endpoint Auth Methods Supported", + "title": "Items", "type": "array" + }, + "next_cursor": { + "title": "Next Cursor", + "type": "string" } }, "required": [ - "issuer", - "jwks_uri", - "token_endpoint", - "authorization_endpoint", - "registration_endpoint", - "revocation_endpoint", - "grant_types_supported", - "response_types_supported", - "response_modes_supported", - "code_challenge_methods_supported", - "scopes_supported", - "authorization_response_iss_parameter_supported", - "token_endpoint_auth_methods_supported", - "revocation_endpoint_auth_methods_supported", - "agent_auth" + "items", + "next_cursor", + "has_more" ], - "title": "AuthorizationServerMetadataOut", + "title": "ChangePageOut", "type": "object" }, - "Body_authorize_decision_oauth2_authorize_post": { + "ChangeResourceOut": { "properties": { - "csrf": { - "title": "Csrf", + "id": { + "title": "Id", + "type": "string" + }, + "type": { + "enum": [ + "drive", + "folder", + "artifact" + ], + "title": "Type", "type": "string" } }, "required": [ - "csrf" + "type", + "id" ], - "title": "Body_authorize_decision_oauth2_authorize_post", + "title": "ChangeResourceOut", "type": "object" }, - "Body_logout_auth_logout_post": { + "DriveCreateIn": { + "additionalProperties": false, + "description": "POST /v0/drives body.", "properties": { - "csrf": { - "title": "Csrf", + "metadata": { + "additionalProperties": true, + "title": "Metadata", + "type": "object" + }, + "name": { + "minLength": 1, + "title": "Name", "type": "string" } }, "required": [ - "csrf" + "name" ], - "title": "Body_logout_auth_logout_post", + "title": "DriveCreateIn", "type": "object" }, - "Body_oauth2_token_oauth2_token_post": { + "DriveListOut": { "properties": { - "assertion": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Assertion" + "items": { + "items": { + "$ref": "#/components/schemas/DriveOut" + }, + "title": "Items", + "type": "array" }, - "claim_token": { + "next_cursor": { "anyOf": [ { "type": "string" @@ -517,39 +459,24 @@ "type": "null" } ], - "title": "Claim Token" - }, - "grant_type": { - "title": "Grant Type", - "type": "string" + "title": "Next Cursor" } }, "required": [ - "grant_type" + "items", + "next_cursor" ], - "title": "Body_oauth2_token_oauth2_token_post", - "type": "object" - }, - "Body_redeem_share_with_password_s__share_key__post": { - "properties": { - "password": { - "default": "", - "title": "Password", - "type": "string" - } - }, - "title": "Body_redeem_share_with_password_s__share_key__post", + "title": "DriveListOut", "type": "object" }, - "ClaimInitRequest": { - "description": "`POST /agent/identity/claim` body.", + "DriveOut": { "properties": { - "claim_token": { - "description": "The per-identity claim_token returned by POST /agent/identity.", - "title": "Claim Token", + "created_at": { + "format": "date-time", + "title": "Created At", "type": "string" }, - "email": { + "created_by": { "anyOf": [ { "type": "string" @@ -558,229 +485,267 @@ "type": "null" } ], - "description": "Optional hint to display on the /claim page so the human knows which account the agent expected. Not enforced (design \u00a714 question #3).", - "title": "Email" - } - }, - "required": [ - "claim_token" - ], - "title": "ClaimInitRequest", - "type": "object" - }, - "ClaimInitResponse": { - "properties": { - "claim_attempt_token": { - "description": "Per-attempt opaque token; the agent does not need to present it.", - "title": "Claim Attempt Token", - "type": "string" - }, - "expires_at": { - "format": "date-time", - "title": "Expires At", - "type": "string" + "title": "Created By" }, - "user_code": { - "description": "Human-readable code the user types/sees on /claim.", - "title": "User Code", - "type": "string" + "deleted_at": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Deleted At" }, - "verification_uri": { - "description": "URL to direct the human to.", - "title": "Verification Uri", + "id": { + "pattern": "^drv_[a-f0-9]{16}$", + "title": "Id", "type": "string" }, - "verification_uri_complete": { - "description": "Convenience: same as `verification_uri` but with the user_code pre-baked so the human doesn't have to type it. RFC 8628 idiom.", - "title": "Verification Uri Complete", - "type": "string" - } - }, - "required": [ - "claim_attempt_token", - "user_code", - "verification_uri", - "verification_uri_complete", - "expires_at" - ], - "title": "ClaimInitResponse", - "type": "object" - }, - "ClaimMetadata": { - "description": "Hints the agent's UI/CLI can use when initiating the claim\nceremony. Decoupled from the `claim_token` itself so future\nadditions don't change the token's shape.", - "properties": { - "claim_endpoint": { - "title": "Claim Endpoint", - "type": "string" + "metadata": { + "additionalProperties": true, + "title": "Metadata", + "type": "object" }, - "supported_email_hints": { - "default": true, - "title": "Supported Email Hints", - "type": "boolean" - } - }, - "required": [ - "claim_endpoint" - ], - "title": "ClaimMetadata", - "type": "object" - }, - "ClientRegistrationOut": { - "additionalProperties": true, - "properties": { - "client_id": { - "title": "Client Id", + "name": { + "title": "Name", "type": "string" }, - "client_id_issued_at": { - "title": "Client Id Issued At", + "retrieval_bytes": { + "title": "Retrieval Bytes", "type": "integer" }, - "client_name": { - "title": "Client Name", + "revision": { + "pattern": "^rev_[a-f0-9]{16}$", + "title": "Revision", "type": "string" }, - "grant_types": { - "items": { - "type": "string" - }, - "title": "Grant Types", - "type": "array" + "root_folder_id": { + "title": "Root Folder Id", + "type": "string" }, - "redirect_uris": { - "items": { - "type": "string" - }, - "title": "Redirect Uris", - "type": "array" + "state": { + "enum": [ + "active", + "deleted" + ], + "title": "State", + "type": "string" }, - "response_types": { - "items": { - "type": "string" - }, - "title": "Response Types", - "type": "array" + "storage_bytes": { + "title": "Storage Bytes", + "type": "integer" }, - "scope": { - "title": "Scope", + "updated_at": { + "format": "date-time", + "title": "Updated At", "type": "string" }, - "token_endpoint_auth_method": { - "title": "Token Endpoint Auth Method", + "workspace_id": { + "title": "Workspace Id", "type": "string" } }, "required": [ - "client_id", - "client_id_issued_at", - "client_name", - "redirect_uris", - "grant_types", - "response_types", - "token_endpoint_auth_method", - "scope" + "id", + "workspace_id", + "created_by", + "name", + "metadata", + "revision", + "root_folder_id", + "storage_bytes", + "retrieval_bytes", + "created_at", + "updated_at", + "deleted_at", + "state" ], - "title": "ClientRegistrationOut", + "title": "DriveOut", "type": "object" }, - "CompileDiagnosticOut": { - "additionalProperties": true, + "DriveUpdateIn": { + "additionalProperties": false, + "description": "PATCH /v0/drives/{id} body \u2014 at least one field is required.", "properties": { - "category": { + "metadata": { "anyOf": [ { - "type": "string" + "additionalProperties": true, + "type": "object" }, { "type": "null" } ], - "title": "Category" + "title": "Metadata" }, - "file": { + "name": { "anyOf": [ { + "minLength": 1, "type": "string" }, { "type": "null" } ], - "title": "File" + "title": "Name" + } + }, + "title": "DriveUpdateIn", + "type": "object" + }, + "DriveUsageOut": { + "properties": { + "retrieval_bytes": { + "title": "Retrieval Bytes", + "type": "integer" }, - "line": { - "anyOf": [ - { - "type": "integer" + "storage_bytes": { + "title": "Storage Bytes", + "type": "integer" + } + }, + "required": [ + "storage_bytes", + "retrieval_bytes" + ], + "title": "DriveUsageOut", + "type": "object" + }, + "ErrorResponse": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" }, - { - "type": "null" + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" } + }, + "required": [ + "code", + "message" ], - "title": "Line" - }, - "message": { - "title": "Message", - "type": "string" - }, - "severity": { - "title": "Severity", - "type": "string" + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + }, + "FolderCascadeOut": { + "properties": { + "cascade": { + "additionalProperties": { + "type": "integer" + }, + "title": "Cascade", + "type": "object" }, - "suggestion": { + "folder": { + "$ref": "#/components/schemas/FolderOut" + } + }, + "required": [ + "folder", + "cascade" + ], + "title": "FolderCascadeOut", + "type": "object" + }, + "FolderCopyIn": { + "additionalProperties": false, + "description": "POST /v0/drives/{id}/folders/{folder_id}/copy body.\n\n``destination_drive_id`` must equal the source drive (or be absent) \u2014\ncross-drive copy is out of v0 scope and rejected.", + "properties": { + "destination_drive_id": { "anyOf": [ { + "pattern": "^drv_[a-f0-9]{16}$", "type": "string" }, { "type": "null" } ], - "title": "Suggestion" + "title": "Destination Drive Id" + }, + "destination_name": { + "maxLength": 255, + "minLength": 1, + "title": "Destination Name", + "type": "string" + }, + "destination_parent_id": { + "pattern": "^fld_[a-f0-9]{16}$", + "title": "Destination Parent Id", + "type": "string" } }, "required": [ - "severity", - "message" + "destination_parent_id", + "destination_name" ], - "title": "CompileDiagnosticOut", + "title": "FolderCopyIn", "type": "object" }, - "CompileJobIn": { + "FolderCreateIn": { + "additionalProperties": false, + "description": "POST /v0/drives/{id}/folders body.", "properties": { - "options": { - "$ref": "#/components/schemas/CompileOptions", - "default": { - "wait": false - } + "grant_inheritance": { + "default": "inherit", + "enum": [ + "inherit", + "sealed" + ], + "title": "Grant Inheritance", + "type": "string" + }, + "metadata": { + "additionalProperties": true, + "title": "Metadata", + "type": "object" + }, + "name": { + "maxLength": 255, + "minLength": 1, + "title": "Name", + "type": "string" }, - "task": { - "default": "latex.compile", - "title": "Task", + "parent_id": { + "pattern": "^fld_[a-f0-9]{16}$", + "title": "Parent Id", "type": "string" } }, - "title": "CompileJobIn", + "required": [ + "parent_id", + "name" + ], + "title": "FolderCreateIn", "type": "object" }, - "CompileJobListOut": { + "FolderListOut": { "properties": { "items": { "items": { - "$ref": "#/components/schemas/CompileJobOut" + "$ref": "#/components/schemas/FolderOut" }, "title": "Items", "type": "array" }, - "jobs": { - "deprecated": true, - "description": "Deprecated same-value alias for `items`; retained for compatibility.", - "items": { - "$ref": "#/components/schemas/CompileJobOut" - }, - "title": "Jobs", - "type": "array" - }, "next_cursor": { "anyOf": [ { @@ -790,51 +755,59 @@ "type": "null" } ], - "description": "Opaque continuation token, or null when the listing is complete.", "title": "Next Cursor" } }, "required": [ "items", - "jobs" + "next_cursor" ], - "title": "CompileJobListOut", + "title": "FolderListOut", "type": "object" }, - "CompileJobOut": { - "additionalProperties": true, + "FolderOut": { "properties": { - "cache_hit": { - "title": "Cache Hit", - "type": "boolean" + "created_at": { + "format": "date-time", + "title": "Created At", + "type": "string" }, - "diagnostics": { - "items": { - "$ref": "#/components/schemas/CompileDiagnosticOut" - }, - "title": "Diagnostics", - "type": "array" - }, - "duration_ms": { + "deleted_at": { "anyOf": [ { - "type": "integer" + "format": "date-time", + "type": "string" }, { "type": "null" } ], - "title": "Duration Ms" + "title": "Deleted At" + }, + "drive_id": { + "pattern": "^drv_[a-f0-9]{16}$", + "title": "Drive Id", + "type": "string" }, - "engine": { - "title": "Engine", + "grant_inheritance": { + "enum": [ + "inherit", + "sealed" + ], + "title": "Grant Inheritance", "type": "string" }, - "job_id": { - "title": "Job Id", + "id": { + "pattern": "^fld_[a-f0-9]{16}$", + "title": "Id", "type": "string" }, - "logs_url": { + "metadata": { + "additionalProperties": true, + "title": "Metadata", + "type": "object" + }, + "name": { "anyOf": [ { "type": "string" @@ -843,184 +816,118 @@ "type": "null" } ], - "title": "Logs Url" + "title": "Name" }, - "output": { + "parent_id": { "anyOf": [ { - "additionalProperties": true, - "type": "object" + "type": "string" }, { "type": "null" } ], - "title": "Output" + "title": "Parent Id" }, - "status": { - "title": "Status", + "revision": { + "pattern": "^rev_[a-f0-9]{16}$", + "title": "Revision", + "type": "string" + }, + "state": { + "enum": [ + "active", + "deleted" + ], + "title": "State", "type": "string" }, - "task": { - "title": "Task", + "updated_at": { + "format": "date-time", + "title": "Updated At", "type": "string" } }, "required": [ - "job_id", - "task", - "status", - "engine", - "cache_hit" + "id", + "drive_id", + "parent_id", + "name", + "metadata", + "grant_inheritance", + "revision", + "state", + "created_at", + "updated_at", + "deleted_at" ], - "title": "CompileJobOut", + "title": "FolderOut", "type": "object" }, - "CompileOptions": { + "FolderUpdateIn": { + "additionalProperties": false, + "description": "PATCH /v0/drives/{id}/folders/{folder_id} body \u2014 at least one field is\nrequired.", "properties": { - "engine": { + "grant_inheritance": { "anyOf": [ { + "enum": [ + "inherit", + "sealed" + ], "type": "string" }, { "type": "null" } ], - "title": "Engine" + "title": "Grant Inheritance" }, - "entrypoint": { + "metadata": { "anyOf": [ { - "type": "string" + "additionalProperties": true, + "type": "object" }, { "type": "null" } ], - "title": "Entrypoint" - }, - "wait": { - "default": false, - "title": "Wait", - "type": "boolean" - } - }, - "title": "CompileOptions", - "type": "object" - }, - "CompileProjectOut": { - "properties": { - "auto_compile": { - "title": "Auto Compile", - "type": "boolean" - }, - "engine": { - "title": "Engine", - "type": "string" - }, - "entrypoint": { - "title": "Entrypoint", - "type": "string" + "title": "Metadata" }, - "fld_id": { - "title": "Fld Id", - "type": "string" - } - }, - "required": [ - "fld_id", - "entrypoint", - "engine", - "auto_compile" - ], - "title": "CompileProjectOut", - "type": "object" - }, - "CopyIn": { - "description": "POST /v0/artifacts/{art_id}/copy body \u2014 duplicate to new path.", - "properties": { - "from_generation": { + "name": { "anyOf": [ { - "type": "integer" + "maxLength": 255, + "minLength": 1, + "type": "string" }, { "type": "null" } ], - "title": "From Generation" + "title": "Name" }, - "path": { - "title": "Path", - "type": "string" - }, - "source": { + "parent_id": { "anyOf": [ { - "$ref": "#/components/schemas/ArtifactSource" + "pattern": "^fld_[a-f0-9]{16}$", + "type": "string" }, { "type": "null" } - ] - } - }, - "required": [ - "path" - ], - "title": "CopyIn", - "type": "object" - }, - "DatasetDescriptionOut": { - "properties": { - "columns": { - "items": { - "$ref": "#/components/schemas/QueryColumnOut" - }, - "title": "Columns", - "type": "array" - }, - "dataset": { - "title": "Dataset", - "type": "string" - } - }, - "required": [ - "dataset", - "columns" - ], - "title": "DatasetDescriptionOut", - "type": "object" - }, - "DescribeIn": { - "properties": { - "dataset": { - "title": "Dataset", - "type": "string" + ], + "title": "Parent Id" } }, - "required": [ - "dataset" - ], - "title": "DescribeIn", + "title": "FolderUpdateIn", "type": "object" }, - "DownloadUrlOut": { - "description": "A URL the caller can GET to fetch the artifact's bytes.\n\n`direct=True` \u21d2 a short-lived signed GCS URL on `storage.googleapis.com`\n(client downloads straight from GCS; `expires_at` is set). `direct=False`\n\u21d2 the proxy `/download` endpoint on the API host (no expiry) \u2014 returned for\nsub-threshold artifacts or when signing is unavailable. The URL is opaque:\ncallers should not parse it. See large-download-design.md \u00a75.1.", + "GrantCreateIn": { + "additionalProperties": false, + "description": "POST /v0/drives/{id}/grants body.", "properties": { - "content_type": { - "title": "Content Type", - "type": "string" - }, - "direct": { - "title": "Direct", - "type": "boolean" - }, - "download_url": { - "title": "Download Url", - "type": "string" - }, "expires_at": { "anyOf": [ { @@ -1033,58 +940,7 @@ ], "title": "Expires At" }, - "filename": { - "title": "Filename", - "type": "string" - }, - "size_bytes": { - "title": "Size Bytes", - "type": "integer" - } - }, - "required": [ - "download_url", - "direct", - "size_bytes", - "content_type", - "filename" - ], - "title": "DownloadUrlOut", - "type": "object" - }, - "DriveApiKeyCreateIn": { - "description": "`POST /v0/drives/{id}/keys` body \u2014 a required human label (a name for\nthe key, e.g. the agent/integration it's for).", - "properties": { - "label": { - "maxLength": 80, - "minLength": 1, - "title": "Label", - "type": "string" - } - }, - "required": [ - "label" - ], - "title": "DriveApiKeyCreateIn", - "type": "object" - }, - "DriveApiKeyCreateOut": { - "description": "`POST /v0/drives/{id}/keys` response \u2014 the new key's metadata PLUS the\nraw `ad_live_` value, returned **once**. Store `api_key` now; only its hash\nis persisted.", - "properties": { - "api_key": { - "title": "Api Key", - "type": "string" - }, - "created_at": { - "format": "date-time", - "title": "Created At", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "label": { + "principal_id": { "anyOf": [ { "type": "string" @@ -1093,39 +949,60 @@ "type": "null" } ], - "title": "Label" + "title": "Principal Id" + }, + "principal_type": { + "enum": [ + "agent", + "user", + "workspace", + "public" + ], + "title": "Principal Type", + "type": "string" + }, + "resource_id": { + "minLength": 1, + "title": "Resource Id", + "type": "string" + }, + "resource_type": { + "enum": [ + "drive", + "folder", + "artifact" + ], + "title": "Resource Type", + "type": "string" }, - "prefix": { - "title": "Prefix", + "role": { + "enum": [ + "viewer", + "editor", + "manager" + ], + "title": "Role", "type": "string" } }, "required": [ - "id", - "api_key", - "prefix", - "created_at" + "principal_type", + "resource_type", + "resource_id", + "role" ], - "title": "DriveApiKeyCreateOut", + "title": "GrantCreateIn", "type": "object" }, - "DriveApiKeyListOut": { - "description": "`GET /v0/drives/{id}/keys` response \u2014 the drive's keys, oldest first\n(keyset order, design \u00a73), including recently-revoked rows (filter on\n`revoked_at` for live only).\n\n`items` is the canonical list field (B-3: one envelope key everywhere);\n`keys` is a deprecated same-value alias kept for one release \u2014 the REST\ntwin of the grep `matches` / compile `jobs` aliases.", + "GrantListOut": { "properties": { "items": { "items": { - "$ref": "#/components/schemas/DriveApiKeyOut" + "$ref": "#/components/schemas/GrantOut" }, "title": "Items", "type": "array" }, - "keys": { - "items": { - "$ref": "#/components/schemas/DriveApiKeyOut" - }, - "title": "Keys", - "type": "array" - }, "next_cursor": { "anyOf": [ { @@ -1140,48 +1017,77 @@ }, "required": [ "items", - "keys" + "next_cursor" ], - "title": "DriveApiKeyListOut", + "title": "GrantListOut", "type": "object" }, - "DriveApiKeyOut": { - "description": "One per-drive `ad_live_` key \u2014 metadata only (never the raw key or hash).\nItem shape for `GET /v0/drives/{id}/keys`.", + "GrantOut": { "properties": { "created_at": { "format": "date-time", "title": "Created At", "type": "string" }, - "id": { - "title": "Id", + "drive_id": { + "pattern": "^drv_[a-f0-9]{16}$", + "title": "Drive Id", "type": "string" }, - "label": { + "expires_at": { "anyOf": [ { + "format": "date-time", "type": "string" }, { "type": "null" } ], - "title": "Label" + "title": "Expires At" + }, + "id": { + "pattern": "^grn_[a-f0-9]{16}$", + "title": "Id", + "type": "string" }, - "last_used_at": { + "principal_id": { "anyOf": [ { - "format": "date-time", "type": "string" }, { "type": "null" } ], - "title": "Last Used At" + "title": "Principal Id" + }, + "principal_type": { + "enum": [ + "agent", + "user", + "workspace", + "public" + ], + "title": "Principal Type", + "type": "string" + }, + "resource_id": { + "title": "Resource Id", + "type": "string" + }, + "resource_type": { + "enum": [ + "drive", + "folder", + "artifact" + ], + "title": "Resource Type", + "type": "string" }, - "prefix": { - "title": "Prefix", + "revision": { + "pattern": "^rev_[a-f0-9]{16}$", + "title": "Revision", "type": "string" }, "revoked_at": { @@ -1195,117 +1101,178 @@ } ], "title": "Revoked At" + }, + "role": { + "enum": [ + "viewer", + "editor", + "manager" + ], + "title": "Role", + "type": "string" + }, + "state": { + "enum": [ + "active", + "revoked", + "expired" + ], + "title": "State", + "type": "string" } }, "required": [ "id", - "prefix", + "drive_id", + "resource_type", + "resource_id", + "principal_type", + "principal_id", + "role", + "revision", + "state", + "expires_at", + "revoked_at", "created_at" ], - "title": "DriveApiKeyOut", - "type": "object" - }, - "DriveCreateIn": { - "description": "POST /v0/drives body. `name` is the user-facing drive label; the\ncreator becomes the owner.", - "properties": { - "name": { - "maxLength": 120, - "minLength": 1, - "title": "Name", - "type": "string" - } - }, - "required": [ - "name" - ], - "title": "DriveCreateIn", + "title": "GrantOut", "type": "object" }, - "DriveCreateOut": { - "description": "The create response \u2014 the ONLY place (besides key-rotate) a raw\n`ad_live_` key is returned, reveal-once.", + "GrantUpdateIn": { + "additionalProperties": false, + "description": "PATCH /v0/drives/{id}/grants/{grant_id} body \u2014 at least one field is\nrequired. An explicit ``expires_at: null`` clears the expiry; omitting it\nleaves it unchanged.", "properties": { - "api_key": { - "title": "Api Key", - "type": "string" - }, - "created_at": { - "format": "date-time", - "title": "Created At", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "organization_id": { - "title": "Organization Id", - "type": "string" - }, - "owner_email": { + "expires_at": { "anyOf": [ { + "format": "date-time", "type": "string" }, { "type": "null" } ], - "title": "Owner Email" + "title": "Expires At" }, - "owner_user_id": { + "role": { "anyOf": [ { + "enum": [ + "viewer", + "editor", + "manager" + ], "type": "string" }, { "type": "null" } ], - "title": "Owner User Id" + "title": "Role" + } + }, + "title": "GrantUpdateIn", + "type": "object" + }, + "HealthDegradedDetail": { + "properties": { + "error": { + "title": "Error", + "type": "string" }, - "storage_bytes": { - "title": "Storage Bytes", - "type": "integer" + "status": { + "const": "degraded", + "title": "Status", + "type": "string" } }, "required": [ - "id", - "name", - "organization_id", - "storage_bytes", - "created_at", - "api_key" + "status", + "error" ], - "title": "DriveCreateOut", + "title": "HealthDegradedDetail", "type": "object" }, - "DriveDeleteOut": { - "description": "DELETE /v0/drives/{drive_id} response \u2014 the drive soft-delete receipt.\nReversible until the GC cron hard-deletes at `purge_at`; `restore_url`\npoints at the drive restore endpoint (deletion-design.md \u00a75.2).", + "HealthDegradedResponse": { + "description": "Legacy health-probe failure shape.\n\nHealth predates the `/v0` error envelope and is consumed by load\nbalancers. PR 1 documents the wire shape without changing it; convergence\non the canonical API envelope is a separately reviewed compatibility\ndecision.", "properties": { - "deleted_at": { - "format": "date-time", - "title": "Deleted At", + "detail": { + "$ref": "#/components/schemas/HealthDegradedDetail" + } + }, + "required": [ + "detail" + ], + "title": "HealthDegradedResponse", + "type": "object" + }, + "HealthOut": { + "properties": { + "status": { + "const": "ok", + "title": "Status", + "type": "string" + } + }, + "required": [ + "status" + ], + "title": "HealthOut", + "type": "object" + }, + "SearchHitOut": { + "properties": { + "content_type": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Content Type" + }, + "drive_id": { + "pattern": "^drv_[a-f0-9]{16}$", + "title": "Drive Id", "type": "string" }, "id": { + "pattern": "^art_[a-f0-9]{16}$", "title": "Id", "type": "string" }, - "ok": { - "default": true, - "title": "Ok", - "type": "boolean" + "name": { + "title": "Name", + "type": "string" + }, + "parent_id": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Parent Id" }, - "purge_at": { + "rank": { + "title": "Rank", + "type": "number" + }, + "snippet": { + "description": "HTML-safe highlighted excerpt. The ONLY markup it may contain is the server's own ... highlight pair; artifact content is entity-escaped, so this may be rendered as HTML.", + "title": "Snippet", + "type": "string" + }, + "updated_at": { "format": "date-time", - "title": "Purge At", + "title": "Updated At", "type": "string" }, - "restore_url": { + "version_id": { "anyOf": [ { "type": "string" @@ -1314,22 +1281,28 @@ "type": "null" } ], - "title": "Restore Url" + "title": "Version Id" } }, "required": [ "id", - "deleted_at", - "purge_at" + "drive_id", + "parent_id", + "name", + "version_id", + "rank", + "snippet", + "content_type", + "updated_at" ], - "title": "DriveDeleteOut", + "title": "SearchHitOut", "type": "object" }, - "DriveList": { + "SearchPageOut": { "properties": { "items": { "items": { - "$ref": "#/components/schemas/DriveOut" + "$ref": "#/components/schemas/SearchHitOut" }, "title": "Items", "type": "array" @@ -1347,77 +1320,206 @@ } }, "required": [ - "items" + "items", + "next_cursor" ], - "title": "DriveList", + "title": "SearchPageOut", "type": "object" }, - "DriveOut": { - "description": "One drive in a listing \u2014 metadata only (workspaces-design \u00a74.2).\nCarries NO capability and NEVER a raw key. An admin's inventory and a\nmember's owned list both serialize to this shape; `owner_email` is the\nonly owner-identifying field surfaced.", + "ShareCreateIn": { + "additionalProperties": false, + "description": "POST /v0/drives/{id}/shares body.", + "properties": { + "expires_at": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Expires At" + }, + "resource_id": { + "minLength": 1, + "title": "Resource Id", + "type": "string" + }, + "resource_type": { + "enum": [ + "artifact", + "artifact_version", + "folder" + ], + "title": "Resource Type", + "type": "string" + } + }, + "required": [ + "resource_type", + "resource_id" + ], + "title": "ShareCreateIn", + "type": "object" + }, + "ShareCreateOut": { + "description": "The create/rotate response \u2014 the ONLY response carrying the plaintext\nsecret.", "properties": { "created_at": { "format": "date-time", "title": "Created At", "type": "string" }, + "created_by": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Created By" + }, + "drive_id": { + "pattern": "^drv_[a-f0-9]{16}$", + "title": "Drive Id", + "type": "string" + }, + "expires_at": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Expires At" + }, "id": { + "pattern": "^shr_[a-f0-9]{16}$", "title": "Id", "type": "string" }, - "name": { - "title": "Name", + "resource_id": { + "title": "Resource Id", + "type": "string" + }, + "resource_type": { + "enum": [ + "artifact", + "artifact_version", + "folder" + ], + "title": "Resource Type", "type": "string" }, - "organization_id": { - "title": "Organization Id", + "revision": { + "pattern": "^rev_[a-f0-9]{16}$", + "title": "Revision", "type": "string" }, - "owner_email": { + "revoked_at": { "anyOf": [ { + "format": "date-time", "type": "string" }, { "type": "null" } ], - "title": "Owner Email" + "title": "Revoked At" }, - "owner_user_id": { + "rotated_at": { "anyOf": [ { + "format": "date-time", "type": "string" }, { "type": "null" } ], - "title": "Owner User Id" + "title": "Rotated At" }, - "storage_bytes": { - "title": "Storage Bytes", - "type": "integer" + "secret": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Plaintext share secret. Present only on first execution of a create or rotate; null on idempotent replay \u2014 rotate to obtain a new secret.", + "title": "Secret" + }, + "state": { + "enum": [ + "active", + "revoked" + ], + "title": "State", + "type": "string" } }, "required": [ "id", - "name", - "organization_id", - "storage_bytes", - "created_at" + "drive_id", + "resource_type", + "resource_id", + "created_by", + "revision", + "state", + "expires_at", + "revoked_at", + "created_at", + "rotated_at" ], - "title": "DriveOut", + "title": "ShareCreateOut", + "type": "object" + }, + "ShareListOut": { + "properties": { + "items": { + "items": { + "$ref": "#/components/schemas/ShareOut" + }, + "title": "Items", + "type": "array" + }, + "next_cursor": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Next Cursor" + } + }, + "required": [ + "items", + "next_cursor" + ], + "title": "ShareListOut", "type": "object" }, - "DriveReadOut": { - "description": "Drive singleton shape returned by both data-plane read routes.", + "ShareOut": { "properties": { "created_at": { "format": "date-time", "title": "Created At", "type": "string" }, - "email": { + "created_by": { "anyOf": [ { "type": "string" @@ -1426,217 +1528,213 @@ "type": "null" } ], - "title": "Email" + "title": "Created By" }, - "etag": { - "title": "Etag", + "drive_id": { + "pattern": "^drv_[a-f0-9]{16}$", + "title": "Drive Id", "type": "string" }, - "id": { - "title": "Id", - "type": "string" - }, - "metageneration": { - "title": "Metageneration", - "type": "integer" - }, - "organization_id": { - "title": "Organization Id", - "type": "string" - }, - "storage_bytes": { - "title": "Storage Bytes", - "type": "integer" + "expires_at": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Expires At" }, - "storage_limit": { - "title": "Storage Limit", - "type": "integer" - } - }, - "required": [ - "id", - "organization_id", - "storage_bytes", - "storage_limit", - "created_at", - "metageneration", - "etag" - ], - "title": "DriveReadOut", - "type": "object" - }, - "DriveRenameIn": { - "description": "PATCH /v0/drives/{id} body \u2014 rename a drive the caller owns.", - "properties": { - "name": { - "maxLength": 120, - "minLength": 1, - "title": "Name", - "type": "string" - } - }, - "required": [ - "name" - ], - "title": "DriveRenameIn", - "type": "object" - }, - "DriveRestoreOut": { - "properties": { "id": { + "pattern": "^shr_[a-f0-9]{16}$", "title": "Id", "type": "string" }, - "rebased_artifact_count": { - "title": "Rebased Artifact Count", - "type": "integer" - }, - "restored_at": { - "format": "date-time", - "title": "Restored At", + "resource_id": { + "title": "Resource Id", "type": "string" - } - }, - "required": [ - "id", - "restored_at", - "rebased_artifact_count" - ], - "title": "DriveRestoreOut", - "type": "object" - }, - "DriveUsageOut": { - "properties": { - "account_footprint": { - "$ref": "#/components/schemas/StorageFootprintOut" - }, - "egress_bytes": { - "$ref": "#/components/schemas/UsageCounterOut" - }, - "footprint": { - "$ref": "#/components/schemas/StorageFootprintOut" - }, - "indexed_bytes": { - "$ref": "#/components/schemas/UsageCounterOut" }, - "indexing_ops": { - "$ref": "#/components/schemas/UsageCounterOut" - }, - "ops_this_month": { - "$ref": "#/components/schemas/OperationUsageOut" - }, - "period": { - "$ref": "#/components/schemas/UsagePeriodOut" - }, - "retrieval_queries": { - "$ref": "#/components/schemas/UsageCounterOut" + "resource_type": { + "enum": [ + "artifact", + "artifact_version", + "folder" + ], + "title": "Resource Type", + "type": "string" }, - "storage": { - "$ref": "#/components/schemas/UsageCounterOut" + "revision": { + "pattern": "^rev_[a-f0-9]{16}$", + "title": "Revision", + "type": "string" }, - "storage_breakdown": { + "revoked_at": { "anyOf": [ { - "$ref": "#/components/schemas/StorageBreakdownOut" + "format": "date-time", + "type": "string" }, { "type": "null" } - ] - }, - "tokens_this_month": { - "$ref": "#/components/schemas/TokenUsageOut" - }, - "version_retention": { - "$ref": "#/components/schemas/VersionRetentionOut" + ], + "title": "Revoked At" }, - "writes_this_hour": { - "$ref": "#/components/schemas/HourlyUsageCounterOut" - } - }, - "required": [ - "period", - "storage", - "writes_this_hour", - "indexing_ops", - "retrieval_queries", - "indexed_bytes", - "egress_bytes", - "tokens_this_month", - "ops_this_month", - "footprint", - "account_footprint", - "version_retention" - ], - "title": "DriveUsageOut", - "type": "object" - }, - "ErrorBody": { - "additionalProperties": true, - "description": "Machine-readable API error.\n\nError-code-specific context (for example `limit`, `current_etag`, or\n`retry_after_s`) is intentionally additive.", - "properties": { - "code": { - "title": "Code", - "type": "string" + "rotated_at": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Rotated At" }, - "message": { - "title": "Message", + "state": { + "enum": [ + "active", + "revoked" + ], + "title": "State", "type": "string" } }, "required": [ - "code", - "message" + "id", + "drive_id", + "resource_type", + "resource_id", + "created_by", + "revision", + "state", + "expires_at", + "revoked_at", + "created_at", + "rotated_at" ], - "title": "ErrorBody", + "title": "ShareOut", "type": "object" }, - "ErrorDetail": { - "additionalProperties": true, + "V0ErrorEnvelope": { "properties": { "error": { - "$ref": "#/components/schemas/ErrorBody" + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" } }, "required": [ "error" ], - "title": "ErrorDetail", "type": "object" }, - "ErrorResponse": { - "additionalProperties": true, - "description": "Canonical non-validation error envelope emitted by AgentDrive.", + "ValidationErrorResponse": { "properties": { - "detail": { - "$ref": "#/components/schemas/ErrorDetail" + "error": { + "additionalProperties": true, + "properties": { + "code": { + "type": "string" + }, + "details": { + "properties": { + "fields": { + "items": { + "properties": { + "location": { + "type": "string" + }, + "reason": { + "type": "string" + } + }, + "type": "object" + }, + "type": "array" + } + }, + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" } }, "required": [ - "detail" + "error" ], - "title": "ErrorResponse", "type": "object" }, - "EventOut": { + "VersionCreatedOut": { + "description": "The append/restore response \u2014 a version plus the artifact's new\nrevision, which the version-creating 201 rotates.", "properties": { - "action": { - "title": "Action", + "artifact_id": { + "pattern": "^art_[a-f0-9]{16}$", + "title": "Artifact Id", + "type": "string" + }, + "artifact_revision": { + "description": "The artifact's revision after this version became head \u2014 the If-Match value for the next mutation.", + "pattern": "^rev_[a-f0-9]{16}$", + "title": "Artifact Revision", + "type": "string" + }, + "content_type": { + "title": "Content Type", + "type": "string" + }, + "created_at": { + "format": "date-time", + "title": "Created At", "type": "string" }, - "actor_name": { + "created_by": { "anyOf": [ { - "maxLength": 64, "type": "string" }, { "type": "null" } ], - "title": "Actor Name" + "title": "Created By" + }, + "hash": { + "title": "Hash", + "type": "string" + }, + "id": { + "pattern": "^ver_[a-f0-9]{16}$", + "title": "Id", + "type": "string" }, - "art_id": { + "parent_version_id": { "anyOf": [ { "type": "string" @@ -1645,41 +1743,39 @@ "type": "null" } ], - "title": "Art Id" - }, - "created_at": { - "format": "date-time", - "title": "Created At", - "type": "string" - }, - "drive_id": { - "title": "Drive Id", - "type": "string" + "title": "Parent Version Id" }, - "id": { - "title": "Id", - "type": "string" + "size_bytes": { + "minimum": 0.0, + "title": "Size Bytes", + "type": "integer" }, - "metadata": { - "additionalProperties": true, - "title": "Metadata", - "type": "object" + "version_number": { + "minimum": 1.0, + "title": "Version Number", + "type": "integer" } }, "required": [ "id", - "drive_id", - "action", - "created_at" + "artifact_id", + "version_number", + "parent_version_id", + "content_type", + "size_bytes", + "hash", + "created_by", + "created_at", + "artifact_revision" ], - "title": "EventOut", + "title": "VersionCreatedOut", "type": "object" }, - "EventPage": { + "VersionListOut": { "properties": { "items": { "items": { - "$ref": "#/components/schemas/EventOut" + "$ref": "#/components/schemas/VersionOut" }, "title": "Items", "type": "array" @@ -1697,86 +1793,29 @@ } }, "required": [ - "items" - ], - "title": "EventPage", - "type": "object" - }, - "ExtensionExchangeRequest": { - "description": "Single-use ticket \u2192 JWT pair. Called by `auth-complete.html`\ninside the SnipIt extension. No `Authorization` header \u2014 the\nticket itself is the credential.", - "properties": { - "ext_id": { - "description": "The extension's ID (Chrome Web Store ID or unpacked dev ID).", - "title": "Ext Id", - "type": "string" - }, - "ticket": { - "description": "The opaque ticket from the /auth/callback handoff.", - "title": "Ticket", - "type": "string" - } - }, - "required": [ - "ext_id", - "ticket" + "items", + "next_cursor" ], - "title": "ExtensionExchangeRequest", + "title": "VersionListOut", "type": "object" }, - "ExtensionExchangeResponse": { + "VersionOut": { "properties": { - "access_token": { - "description": "15-minute access_token (scope=extension).", - "title": "Access Token", - "type": "string" - }, - "drive_id": { - "description": "The drive these credentials are scoped to.", - "title": "Drive Id", - "type": "string" - }, - "expires_in": { - "description": "Seconds until access_token expiry.", - "title": "Expires In", - "type": "integer" - }, - "identity_assertion": { - "description": "90-day identity_assertion. Refresh via POST /oauth2/token.", - "title": "Identity Assertion", - "type": "string" - }, - "scope": { - "const": "extension", - "default": "extension", - "title": "Scope", + "artifact_id": { + "pattern": "^art_[a-f0-9]{16}$", + "title": "Artifact Id", "type": "string" }, - "token_type": { - "default": "Bearer", - "title": "Token Type", + "content_type": { + "title": "Content Type", "type": "string" - } - }, - "required": [ - "access_token", - "expires_in", - "identity_assertion", - "drive_id" - ], - "title": "ExtensionExchangeResponse", - "type": "object" - }, - "FeedbackCreateOut": { - "properties": { - "contact": { - "title": "Contact", - "type": "boolean" }, - "id": { - "title": "Id", + "created_at": { + "format": "date-time", + "title": "Created At", "type": "string" }, - "note": { + "created_by": { "anyOf": [ { "type": "string" @@ -1785,34 +1824,18 @@ "type": "null" } ], - "title": "Note" + "title": "Created By" }, - "status": { - "title": "Status", + "hash": { + "title": "Hash", "type": "string" - } - }, - "required": [ - "id", - "status", - "contact" - ], - "title": "FeedbackCreateOut", - "type": "object" - }, - "FeedbackStatusOut": { - "description": "GET /v0/feedback/{fbk_id} response \u2014 lifecycle status of feedback THIS\ndrive filed.", - "properties": { - "contact": { - "title": "Contact", - "type": "boolean" }, - "created_at": { - "format": "date-time", - "title": "Created At", + "id": { + "pattern": "^ver_[a-f0-9]{16}$", + "title": "Id", "type": "string" }, - "duplicate_of": { + "parent_version_id": { "anyOf": [ { "type": "string" @@ -1821,10720 +1844,114 @@ "type": "null" } ], - "title": "Duplicate Of" - }, - "id": { - "title": "Id", - "type": "string" + "title": "Parent Version Id" }, - "kind": { - "title": "Kind", - "type": "string" - }, - "status": { - "title": "Status", - "type": "string" - }, - "status_changed_at": { - "format": "date-time", - "title": "Status Changed At", - "type": "string" - }, - "title": { - "title": "Title", - "type": "string" - } - }, - "required": [ - "id", - "status", - "kind", - "title", - "contact", - "created_at", - "status_changed_at" - ], - "title": "FeedbackStatusOut", - "type": "object" - }, - "FindHitOut": { - "description": "One passage-level hit from `/v0/find` (hybrid chunk RAG over\n`embed_chunks`). The unit is a passage, not a file \u2014 consecutive\n`ord` values from the same `art_id` are normal because chunks\noverlap by ~400 tokens. Span fields are modality-aware: only the\npair matching `modality` is populated, the others stay None.", - "properties": { - "art_id": { - "title": "Art Id", - "type": "string" - }, - "char_end": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Char End" - }, - "char_start": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Char Start" - }, - "content_type": { - "title": "Content Type", - "type": "string" - }, - "drive_id": { - "title": "Drive Id", - "type": "string" - }, - "file_type": { - "title": "File Type", - "type": "string" - }, - "labels": { - "items": { - "type": "string" - }, - "title": "Labels", - "type": "array" - }, - "modality": { - "enum": [ - "text", - "code", - "pdf", - "image", - "audio", - "video" - ], - "title": "Modality", - "type": "string" - }, - "ord": { - "title": "Ord", - "type": "integer" - }, - "page_end": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Page End" - }, - "page_start": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Page Start" - }, - "path": { - "title": "Path", - "type": "string" - }, - "rank_lexical": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Rank Lexical" - }, - "rank_semantic": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Rank Semantic" - }, - "score": { - "title": "Score", - "type": "number" - }, - "snippet": { - "title": "Snippet", - "type": "string" - }, - "text": { - "title": "Text", - "type": "string" - }, - "time_end_ms": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Time End Ms" - }, - "time_start_ms": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Time Start Ms" - }, - "updated_at": { - "format": "date-time", - "title": "Updated At", - "type": "string" - }, - "url": { - "title": "Url", - "type": "string" + "size_bytes": { + "minimum": 0.0, + "title": "Size Bytes", + "type": "integer" }, "version_number": { + "minimum": 1.0, "title": "Version Number", "type": "integer" } }, - "required": [ - "art_id", - "drive_id", - "path", - "url", - "content_type", - "file_type", - "updated_at", - "version_number", - "modality", - "ord", - "text", - "snippet", - "score" - ], - "title": "FindHitOut", - "type": "object" - }, - "FindPage": { - "description": "`/v0/find` response \u2014 single-shot top-N, deliberately unpaginated\n(same contract + rationale as `SearchPage`).", - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/FindHitOut" - }, - "title": "Items", - "type": "array" - } - }, - "required": [ - "items" - ], - "title": "FindPage", - "type": "object" - }, - "FolderCopyIn": { - "description": "POST /v0/folders/{fld_id}/copy body \u2014 duplicate the subtree to a\nnew path. `path` is the target folder path (canonical, trailing\nslash). Its own schema (vs. reusing `FolderMoveIn`) keeps the copy\nsurface self-documenting in the OpenAPI spec.", - "properties": { - "from_metageneration": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "From Metageneration" - }, - "path": { - "title": "Path", - "type": "string" - } - }, - "required": [ - "path" - ], - "title": "FolderCopyIn", - "type": "object" - }, - "FolderCopyOut": { - "description": "POST /v0/folders/{fld_id}/copy response \u2014 the newly-created folder\nresource (same shape as `FolderOut`) plus copy-provenance fields:\n`from_fld_id` is the source folder and `n_artifacts_copied` is the\nnumber of descendant artifacts cloned into the new subtree. Mirrors\nthe MCP `copy` folder route's conceptual shape.", - "properties": { - "created_at": { - "format": "date-time", - "title": "Created At", - "type": "string" - }, - "deleted_at": { - "anyOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Deleted At" - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description" - }, - "drive_id": { - "title": "Drive Id", - "type": "string" - }, - "etag": { - "title": "Etag", - "type": "string" - }, - "from_fld_id": { - "title": "From Fld Id", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "inherit_grants": { - "default": true, - "title": "Inherit Grants", - "type": "boolean" - }, - "metageneration": { - "default": 1, - "title": "Metageneration", - "type": "integer" - }, - "n_artifacts_copied": { - "title": "N Artifacts Copied", - "type": "integer" - }, - "path": { - "title": "Path", - "type": "string" - }, - "purge_at": { - "anyOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Purge At" - }, - "updated_at": { - "format": "date-time", - "title": "Updated At", - "type": "string" - } - }, "required": [ "id", - "drive_id", - "path", - "etag", - "created_at", - "updated_at", - "from_fld_id", - "n_artifacts_copied" + "artifact_id", + "version_number", + "parent_version_id", + "content_type", + "size_bytes", + "hash", + "created_by", + "created_at" ], - "title": "FolderCopyOut", - "type": "object" - }, - "FolderCreateIn": { - "description": "PUT /v0/folders/{path} body for the optional metadata params.\nEmpty body is fine \u2014 `mkdir` with no description just creates the\nfolder row.", - "properties": { - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description" - } - }, - "title": "FolderCreateIn", + "title": "VersionOut", "type": "object" - }, - "FolderDeleteOut": { - "description": "DELETE response \u2014 surfaces cascade counts so the caller can\nconfirm scope of an rmdir before the client retries with\n`?recursive=true`.", - "properties": { - "deleted_at": { - "format": "date-time", - "title": "Deleted At", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "n_artifacts_deleted": { - "title": "N Artifacts Deleted", - "type": "integer" - }, - "n_subfolders_deleted": { - "title": "N Subfolders Deleted", - "type": "integer" - }, - "ok": { - "default": true, - "title": "Ok", - "type": "boolean" - }, - "path": { - "title": "Path", - "type": "string" - }, - "purge_at": { - "format": "date-time", - "title": "Purge At", - "type": "string" - }, - "retention_days": { - "title": "Retention Days", - "type": "integer" - } - }, - "required": [ - "id", - "path", - "deleted_at", - "purge_at", - "retention_days", - "n_subfolders_deleted", - "n_artifacts_deleted" - ], - "title": "FolderDeleteOut", - "type": "object" - }, - "FolderMoveIn": { - "description": "POST /v0/folders/{fld_id}/move body \u2014 rename / move.", - "properties": { - "path": { - "title": "Path", - "type": "string" - } - }, - "required": [ - "path" - ], - "title": "FolderMoveIn", - "type": "object" - }, - "FolderOut": { - "description": "Folder resource (folders+permalinks design \u00a713). `path` is the\ncanonical leading+trailing-slash form. Access is expressed through\ngrants (permission-sharing-design \u00a74.4), not a folder-level flag.", - "properties": { - "created_at": { - "format": "date-time", - "title": "Created At", - "type": "string" - }, - "deleted_at": { - "anyOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Deleted At" - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description" - }, - "drive_id": { - "title": "Drive Id", - "type": "string" - }, - "etag": { - "title": "Etag", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "inherit_grants": { - "default": true, - "title": "Inherit Grants", - "type": "boolean" - }, - "metageneration": { - "default": 1, - "title": "Metageneration", - "type": "integer" - }, - "path": { - "title": "Path", - "type": "string" - }, - "purge_at": { - "anyOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Purge At" - }, - "updated_at": { - "format": "date-time", - "title": "Updated At", - "type": "string" - } - }, - "required": [ - "id", - "drive_id", - "path", - "etag", - "created_at", - "updated_at" - ], - "title": "FolderOut", - "type": "object" - }, - "FolderPatchIn": { - "description": "PATCH /v0/folders/{fld_id} body \u2014 partial update. Field absence =\nunchanged. `description`: explicit null = clear. `inherit_grants`:\nnon-nullable \u2014 null/absent = unchanged (it cannot be cleared, only\nflipped true/false).", - "properties": { - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description" - }, - "inherit_grants": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Inherit Grants" - } - }, - "title": "FolderPatchIn", - "type": "object" - }, - "FolderRestoreOut": { - "description": "POST /v0/folders/{fld_id}/restore response \u2014 the restored (live)\nfolder resource (same shape as `FolderOut`) plus the cascade counts\nfrom `core.folders.restore_cascade` (dashboard-file-operations-design\n\u00a74.5), so the caller can confirm the scope of what came back with\nthe root.", - "properties": { - "created_at": { - "format": "date-time", - "title": "Created At", - "type": "string" - }, - "deleted_at": { - "anyOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Deleted At" - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description" - }, - "drive_id": { - "title": "Drive Id", - "type": "string" - }, - "etag": { - "title": "Etag", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "inherit_grants": { - "default": true, - "title": "Inherit Grants", - "type": "boolean" - }, - "metageneration": { - "default": 1, - "title": "Metageneration", - "type": "integer" - }, - "n_artifacts_restored": { - "title": "N Artifacts Restored", - "type": "integer" - }, - "n_subfolders_restored": { - "title": "N Subfolders Restored", - "type": "integer" - }, - "path": { - "title": "Path", - "type": "string" - }, - "purge_at": { - "anyOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Purge At" - }, - "updated_at": { - "format": "date-time", - "title": "Updated At", - "type": "string" - } - }, - "required": [ - "id", - "drive_id", - "path", - "etag", - "created_at", - "updated_at", - "n_subfolders_restored", - "n_artifacts_restored" - ], - "title": "FolderRestoreOut", - "type": "object" - }, - "GrantCreateIn": { - "description": "POST /v0/grants body. `resource` is an `art_*`/`fld_*` id or a path\n(resolved within the caller's drive). `expires_in` is seconds from now\n(omit for a permanent grant).", - "properties": { - "expires_in": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Expires In" - }, - "principal": { - "$ref": "#/components/schemas/GrantPrincipalIn" - }, - "resource": { - "title": "Resource", - "type": "string" - }, - "role": { - "enum": [ - "viewer", - "commenter", - "editor", - "manager" - ], - "title": "Role", - "type": "string" - } - }, - "required": [ - "resource", - "principal", - "role" - ], - "title": "GrantCreateIn", - "type": "object" - }, - "GrantList": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/GrantOut" - }, - "title": "Items", - "type": "array" - }, - "next_cursor": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Next Cursor" - } - }, - "required": [ - "items" - ], - "title": "GrantList", - "type": "object" - }, - "GrantOut": { - "description": "A live grant. Audit fields (`granted_by_*`, `on_behalf_of`) are\nsurfaced so a manager can see who shared what.", - "properties": { - "artifacts_affected": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Artifacts Affected" - }, - "created_at": { - "format": "date-time", - "title": "Created At", - "type": "string" - }, - "expires_at": { - "anyOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Expires At" - }, - "granted_by_id": { - "title": "Granted By Id", - "type": "string" - }, - "granted_by_type": { - "title": "Granted By Type", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "on_behalf_of": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "On Behalf Of" - }, - "principal_email": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Principal Email" - }, - "principal_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Principal Id" - }, - "principal_type": { - "enum": [ - "user", - "agent", - "org", - "anyone" - ], - "title": "Principal Type", - "type": "string" - }, - "resource_id": { - "title": "Resource Id", - "type": "string" - }, - "resource_type": { - "enum": [ - "artifact", - "folder" - ], - "title": "Resource Type", - "type": "string" - }, - "role": { - "enum": [ - "viewer", - "commenter", - "editor", - "manager" - ], - "title": "Role", - "type": "string" - } - }, - "required": [ - "id", - "resource_type", - "resource_id", - "principal_type", - "role", - "granted_by_type", - "granted_by_id", - "created_at" - ], - "title": "GrantOut", - "type": "object" - }, - "GrantPatchIn": { - "description": "PATCH /v0/grants/{grn_id} body. Field absence = unchanged; explicit\n`expires_in: null` clears the expiry (makes the grant permanent).", - "properties": { - "expires_in": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Expires In" - }, - "role": { - "anyOf": [ - { - "enum": [ - "viewer", - "commenter", - "editor", - "manager" - ], - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Role" - } - }, - "title": "GrantPatchIn", - "type": "object" - }, - "GrantPrincipalIn": { - "description": "Who a grant is for. `anyone` carries no id/email; `org`/`agent`\nrequire `id`; `user` requires exactly one of `id` / `email` (an email\nwith no account becomes a pending-email invite resolved on sign-in).", - "properties": { - "email": { - "anyOf": [ - { - "maxLength": 320, - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Email" - }, - "id": { - "anyOf": [ - { - "maxLength": 128, - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Id" - }, - "type": { - "enum": [ - "user", - "agent", - "org", - "anyone" - ], - "title": "Type", - "type": "string" - } - }, - "required": [ - "type" - ], - "title": "GrantPrincipalIn", - "type": "object" - }, - "HealthDegradedDetail": { - "properties": { - "error": { - "title": "Error", - "type": "string" - }, - "status": { - "const": "degraded", - "title": "Status", - "type": "string" - } - }, - "required": [ - "status", - "error" - ], - "title": "HealthDegradedDetail", - "type": "object" - }, - "HealthDegradedResponse": { - "description": "Legacy health-probe failure shape.\n\nHealth predates the `/v0` error envelope and is consumed by load\nbalancers. PR 1 documents the wire shape without changing it; convergence\non the canonical API envelope is a separately reviewed compatibility\ndecision.", - "properties": { - "detail": { - "$ref": "#/components/schemas/HealthDegradedDetail" - } - }, - "required": [ - "detail" - ], - "title": "HealthDegradedResponse", - "type": "object" - }, - "HealthOut": { - "properties": { - "status": { - "const": "ok", - "title": "Status", - "type": "string" - } - }, - "required": [ - "status" - ], - "title": "HealthOut", - "type": "object" - }, - "HourlyUsageCounterOut": { - "properties": { - "limit": { - "title": "Limit", - "type": "integer" - }, - "reset_at": { - "format": "date-time", - "title": "Reset At", - "type": "string" - }, - "used": { - "title": "Used", - "type": "integer" - } - }, - "required": [ - "used", - "limit", - "reset_at" - ], - "title": "HourlyUsageCounterOut", - "type": "object" - }, - "IdentityAssertionMetadataOut": { - "additionalProperties": true, - "properties": { - "alg": { - "title": "Alg", - "type": "string" - }, - "iss": { - "title": "Iss", - "type": "string" - }, - "version": { - "title": "Version", - "type": "integer" - } - }, - "required": [ - "alg", - "iss", - "version" - ], - "title": "IdentityAssertionMetadataOut", - "type": "object" - }, - "InvitationList": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/InvitationOut" - }, - "title": "Items", - "type": "array" - }, - "next_cursor": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Next Cursor" - } - }, - "required": [ - "items" - ], - "title": "InvitationList", - "type": "object" - }, - "InvitationOut": { - "description": "One workspace invitation \u2014 metadata only; the raw token is never\nsurfaced over the API (it lives only in the invite email).", - "properties": { - "created_at": { - "format": "date-time", - "title": "Created At", - "type": "string" - }, - "email": { - "title": "Email", - "type": "string" - }, - "expires_at": { - "format": "date-time", - "title": "Expires At", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "invited_by": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Invited By" - }, - "organization_id": { - "title": "Organization Id", - "type": "string" - }, - "role": { - "enum": [ - "admin", - "member" - ], - "title": "Role", - "type": "string" - }, - "status": { - "enum": [ - "pending", - "accepted", - "revoked", - "expired" - ], - "title": "Status", - "type": "string" - } - }, - "required": [ - "id", - "organization_id", - "email", - "role", - "status", - "expires_at", - "created_at" - ], - "title": "InvitationOut", - "type": "object" - }, - "InviteCreateOut": { - "description": "POST /v0/members/invite response. `already_member` is True when the\nemail was already a live member (no invite created \u2014 a no-op success).\n`email_delivered` is False when the invite row was created but the\nnotification email failed to send \u2014 the invite is still valid and can be\nresent, but the invitee has not yet received a link.", - "properties": { - "already_member": { - "default": false, - "title": "Already Member", - "type": "boolean" - }, - "email_delivered": { - "default": true, - "title": "Email Delivered", - "type": "boolean" - }, - "invitation": { - "anyOf": [ - { - "$ref": "#/components/schemas/InvitationOut" - }, - { - "type": "null" - } - ] - } - }, - "title": "InviteCreateOut", - "type": "object" - }, - "JwkOut": { - "additionalProperties": true, - "properties": { - "alg": { - "title": "Alg", - "type": "string" - }, - "e": { - "title": "E", - "type": "string" - }, - "kid": { - "title": "Kid", - "type": "string" - }, - "kty": { - "title": "Kty", - "type": "string" - }, - "n": { - "title": "N", - "type": "string" - }, - "use": { - "title": "Use", - "type": "string" - } - }, - "required": [ - "kty", - "kid", - "alg", - "use", - "n", - "e" - ], - "title": "JwkOut", - "type": "object" - }, - "JwksOut": { - "additionalProperties": true, - "properties": { - "keys": { - "items": { - "$ref": "#/components/schemas/JwkOut" - }, - "title": "Keys", - "type": "array" - } - }, - "required": [ - "keys" - ], - "title": "JwksOut", - "type": "object" - }, - "LookupValuesIn": { - "properties": { - "column": { - "title": "Column", - "type": "string" - }, - "dataset": { - "title": "Dataset", - "type": "string" - }, - "limit": { - "default": 50, - "title": "Limit", - "type": "integer" - } - }, - "required": [ - "dataset", - "column" - ], - "title": "LookupValuesIn", - "type": "object" - }, - "LookupValuesOut": { - "properties": { - "column": { - "title": "Column", - "type": "string" - }, - "dataset": { - "title": "Dataset", - "type": "string" - }, - "values": { - "items": {}, - "title": "Values", - "type": "array" - } - }, - "required": [ - "dataset", - "column", - "values" - ], - "title": "LookupValuesOut", - "type": "object" - }, - "MemberInviteIn": { - "description": "POST /v0/members/invite body \u2014 invite a person by email.", - "properties": { - "email": { - "maxLength": 320, - "minLength": 3, - "title": "Email", - "type": "string" - }, - "role": { - "default": "member", - "enum": [ - "admin", - "member" - ], - "title": "Role", - "type": "string" - } - }, - "required": [ - "email" - ], - "title": "MemberInviteIn", - "type": "object" - }, - "MemberList": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/MemberOut" - }, - "title": "Items", - "type": "array" - }, - "next_cursor": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Next Cursor" - } - }, - "required": [ - "items" - ], - "title": "MemberList", - "type": "object" - }, - "MemberOut": { - "description": "One live member of a workspace \u2014 metadata for the members page /\n`GET /v0/members`.", - "properties": { - "created_at": { - "format": "date-time", - "title": "Created At", - "type": "string" - }, - "email": { - "title": "Email", - "type": "string" - }, - "first_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "First Name" - }, - "last_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Last Name" - }, - "role": { - "enum": [ - "admin", - "member" - ], - "title": "Role", - "type": "string" - }, - "user_id": { - "title": "User Id", - "type": "string" - } - }, - "required": [ - "user_id", - "email", - "role", - "created_at" - ], - "title": "MemberOut", - "type": "object" - }, - "MemberRemoveOut": { - "description": "DELETE /v0/members/{user_id} response \u2014 the member-removal receipt.\n`id` is the removed user's id (replaces the ad-hoc `removed` key).", - "properties": { - "id": { - "title": "Id", - "type": "string" - }, - "ok": { - "default": true, - "title": "Ok", - "type": "boolean" - }, - "organization_id": { - "title": "Organization Id", - "type": "string" - } - }, - "required": [ - "id", - "organization_id" - ], - "title": "MemberRemoveOut", - "type": "object" - }, - "MemberRoleIn": { - "description": "PATCH /v0/members/{user} body \u2014 promote/demote a member.", - "properties": { - "role": { - "enum": [ - "admin", - "member" - ], - "title": "Role", - "type": "string" - } - }, - "required": [ - "role" - ], - "title": "MemberRoleIn", - "type": "object" - }, - "OAuthProtocolErrorOut": { - "additionalProperties": true, - "description": "RFC OAuth error shape used by public protocol endpoints.", - "properties": { - "error": { - "title": "Error", - "type": "string" - }, - "error_description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Error Description" - } - }, - "required": [ - "error" - ], - "title": "OAuthProtocolErrorOut", - "type": "object" - }, - "OAuthRevocationOut": { - "description": "RFC 7009 successful revocation has an empty JSON object.", - "properties": {}, - "title": "OAuthRevocationOut", - "type": "object" - }, - "OperationUsageOut": { - "properties": { - "reads": { - "title": "Reads", - "type": "integer" - }, - "writes": { - "title": "Writes", - "type": "integer" - } - }, - "required": [ - "reads", - "writes" - ], - "title": "OperationUsageOut", - "type": "object" - }, - "Page": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/ArtifactOut" - }, - "title": "Items", - "type": "array" - }, - "next_cursor": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Next Cursor" - } - }, - "required": [ - "items" - ], - "title": "Page", - "type": "object" - }, - "ProjectConfigIn": { - "properties": { - "auto_compile": { - "default": false, - "title": "Auto Compile", - "type": "boolean" - }, - "engine": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Engine" - }, - "entrypoint": { - "title": "Entrypoint", - "type": "string" - } - }, - "required": [ - "entrypoint" - ], - "title": "ProjectConfigIn", - "type": "object" - }, - "ProtectedResourceMetadataOut": { - "additionalProperties": true, - "properties": { - "authorization_servers": { - "items": { - "type": "string" - }, - "title": "Authorization Servers", - "type": "array" - }, - "bearer_methods_supported": { - "items": { - "type": "string" - }, - "title": "Bearer Methods Supported", - "type": "array" - }, - "resource": { - "title": "Resource", - "type": "string" - }, - "scopes_supported": { - "items": { - "type": "string" - }, - "title": "Scopes Supported", - "type": "array" - } - }, - "required": [ - "resource", - "authorization_servers", - "bearer_methods_supported", - "scopes_supported" - ], - "title": "ProtectedResourceMetadataOut", - "type": "object" - }, - "QueryColumnOut": { - "additionalProperties": true, - "properties": { - "name": { - "title": "Name", - "type": "string" - }, - "type": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Type" - } - }, - "required": [ - "name" - ], - "title": "QueryColumnOut", - "type": "object" - }, - "QueryDryRunOut": { - "additionalProperties": true, - "properties": { - "dry_run": { - "const": true, - "title": "Dry Run", - "type": "boolean" - }, - "engine": { - "title": "Engine", - "type": "string" - }, - "estimated_bytes_processed": { - "title": "Estimated Bytes Processed", - "type": "integer" - }, - "result_schema": { - "items": { - "$ref": "#/components/schemas/QueryColumnOut" - }, - "title": "Result Schema", - "type": "array" - }, - "valid": { - "title": "Valid", - "type": "boolean" - } - }, - "required": [ - "valid", - "dry_run", - "engine", - "result_schema", - "estimated_bytes_processed" - ], - "title": "QueryDryRunOut", - "type": "object" - }, - "QueryIn": { - "properties": { - "dry_run": { - "default": false, - "title": "Dry Run", - "type": "boolean" - }, - "inputs": { - "additionalProperties": { - "type": "string" - }, - "title": "Inputs", - "type": "object" - }, - "sql": { - "title": "Sql", - "type": "string" - } - }, - "required": [ - "sql" - ], - "title": "QueryIn", - "type": "object" - }, - "QueryResultOut": { - "additionalProperties": true, - "properties": { - "bytes_processed": { - "title": "Bytes Processed", - "type": "integer" - }, - "cache_hit": { - "title": "Cache Hit", - "type": "boolean" - }, - "engine": { - "title": "Engine", - "type": "string" - }, - "preview": { - "items": { - "additionalProperties": true, - "type": "object" - }, - "title": "Preview", - "type": "array" - }, - "result_art_id": { - "title": "Result Art Id", - "type": "string" - }, - "result_schema": { - "items": { - "$ref": "#/components/schemas/QueryColumnOut" - }, - "title": "Result Schema", - "type": "array" - }, - "row_count": { - "title": "Row Count", - "type": "integer" - } - }, - "required": [ - "result_art_id", - "engine", - "result_schema", - "row_count", - "bytes_processed", - "cache_hit", - "preview" - ], - "title": "QueryResultOut", - "type": "object" - }, - "RevokeOut": { - "description": "DELETE /v0/grants/{grn_id}, DELETE /v0/shares/{shr_id},\nDELETE /v0/invitations/{invitation_id} response \u2014 the unified\nrevoke receipt. `revoked` is a COUNT: 1 when a live row was revoked,\n0 when it was already gone (DELETE is idempotent).", - "properties": { - "id": { - "title": "Id", - "type": "string" - }, - "ok": { - "default": true, - "title": "Ok", - "type": "boolean" - }, - "revoked": { - "title": "Revoked", - "type": "integer" - } - }, - "required": [ - "id", - "revoked" - ], - "title": "RevokeOut", - "type": "object" - }, - "SearchHitOut": { - "properties": { - "art_id": { - "title": "Art Id", - "type": "string" - }, - "content_type": { - "title": "Content Type", - "type": "string" - }, - "drive_id": { - "title": "Drive Id", - "type": "string" - }, - "file_type": { - "title": "File Type", - "type": "string" - }, - "labels": { - "items": { - "type": "string" - }, - "title": "Labels", - "type": "array" - }, - "path": { - "title": "Path", - "type": "string" - }, - "score": { - "title": "Score", - "type": "number" - }, - "snippet": { - "title": "Snippet", - "type": "string" - }, - "updated_at": { - "format": "date-time", - "title": "Updated At", - "type": "string" - }, - "url": { - "title": "Url", - "type": "string" - }, - "version_number": { - "title": "Version Number", - "type": "integer" - } - }, - "required": [ - "art_id", - "drive_id", - "path", - "url", - "content_type", - "file_type", - "snippet", - "score", - "updated_at", - "version_number" - ], - "title": "SearchHitOut", - "type": "object" - }, - "SearchPage": { - "description": "`/v0/search` response \u2014 single-shot top-N, deliberately unpaginated.\n\nRanked retrieval doesn't paginate meaningfully (the industry norm:\nvector/RAG APIs are pure top-K; Algolia/GitHub cap ranked results\noutright) \u2014 the correct \"next page\" of a relevance-ranked list is a\nnarrower query. Raise `limit` (\u2264100) for more hits. A `next_cursor`\nfield advertised here in the past was structurally always null and\nwas dropped; if deep retrieval is ever needed, an ES-`search_after`\nstyle `(score, id)` keyset can be re-added additively.", - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/SearchHitOut" - }, - "title": "Items", - "type": "array" - } - }, - "required": [ - "items" - ], - "title": "SearchPage", - "type": "object" - }, - "ShareCreateIn": { - "description": "POST /v0/shares body. `resource` is an `art_*`/`fld_*` id or a path.\n`expires_in` is seconds from now (omit for the default: none for a human\ncreator, a short TTL for an agent). `password` (optional) gates redemption.", - "properties": { - "expires_in": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Expires In" - }, - "password": { - "anyOf": [ - { - "maxLength": 1024, - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Password" - }, - "resource": { - "title": "Resource", - "type": "string" - }, - "role": { - "default": "viewer", - "enum": [ - "viewer", - "commenter", - "editor" - ], - "title": "Role", - "type": "string" - } - }, - "required": [ - "resource" - ], - "title": "ShareCreateIn", - "type": "object" - }, - "ShareErrorOut": { - "description": "Negotiated JSON error shape for the public share protocol.", - "properties": { - "error": { - "$ref": "#/components/schemas/ErrorBody" - } - }, - "required": [ - "error" - ], - "title": "ShareErrorOut", - "type": "object" - }, - "ShareList": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/ShareOut" - }, - "title": "Items", - "type": "array" - }, - "next_cursor": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Next Cursor" - } - }, - "required": [ - "items" - ], - "title": "ShareList", - "type": "object" - }, - "ShareMintOut": { - "description": "The create/rotate response \u2014 the ONLY place the `share_key` and its\nredemption `url` are exposed.", - "properties": { - "access_count": { - "default": 0, - "title": "Access Count", - "type": "integer" - }, - "audience": { - "title": "Audience", - "type": "string" - }, - "created_at": { - "format": "date-time", - "title": "Created At", - "type": "string" - }, - "expires_at": { - "anyOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Expires At" - }, - "has_password": { - "title": "Has Password", - "type": "boolean" - }, - "id": { - "title": "Id", - "type": "string" - }, - "last_accessed_at": { - "anyOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Last Accessed At" - }, - "resource_id": { - "title": "Resource Id", - "type": "string" - }, - "resource_type": { - "enum": [ - "artifact", - "folder" - ], - "title": "Resource Type", - "type": "string" - }, - "role": { - "enum": [ - "viewer", - "commenter", - "editor" - ], - "title": "Role", - "type": "string" - }, - "share_key": { - "title": "Share Key", - "type": "string" - }, - "url": { - "title": "Url", - "type": "string" - } - }, - "required": [ - "id", - "resource_type", - "resource_id", - "role", - "audience", - "has_password", - "created_at", - "share_key", - "url" - ], - "title": "ShareMintOut", - "type": "object" - }, - "ShareOut": { - "description": "A live share link as seen on list/management \u2014 NEVER carries the\n`share_key` (that is the credential, returned only at mint/rotate).", - "properties": { - "access_count": { - "default": 0, - "title": "Access Count", - "type": "integer" - }, - "audience": { - "title": "Audience", - "type": "string" - }, - "created_at": { - "format": "date-time", - "title": "Created At", - "type": "string" - }, - "expires_at": { - "anyOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Expires At" - }, - "has_password": { - "title": "Has Password", - "type": "boolean" - }, - "id": { - "title": "Id", - "type": "string" - }, - "last_accessed_at": { - "anyOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Last Accessed At" - }, - "resource_id": { - "title": "Resource Id", - "type": "string" - }, - "resource_type": { - "enum": [ - "artifact", - "folder" - ], - "title": "Resource Type", - "type": "string" - }, - "role": { - "enum": [ - "viewer", - "commenter", - "editor" - ], - "title": "Role", - "type": "string" - } - }, - "required": [ - "id", - "resource_type", - "resource_id", - "role", - "audience", - "has_password", - "created_at" - ], - "title": "ShareOut", - "type": "object" - }, - "ShareRedeemOut": { - "properties": { - "expires_at": { - "format": "date-time", - "title": "Expires At", - "type": "string" - }, - "role": { - "title": "Role", - "type": "string" - }, - "token": { - "title": "Token", - "type": "string" - }, - "url": { - "title": "Url", - "type": "string" - } - }, - "required": [ - "url", - "token", - "role", - "expires_at" - ], - "title": "ShareRedeemOut", - "type": "object" - }, - "SourceRef": { - "description": "One typed provenance ref. `type` is open-vocabulary (server\nvalidates only length, not the value), so callers can declare new\ntypes as their integrations evolve. `id` is the type-specific\nidentifier \u2014 for `type='artifact'` this is an `art_\u2026` ID.", - "properties": { - "id": { - "title": "Id", - "type": "string" - }, - "metadata": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Metadata" - }, - "type": { - "title": "Type", - "type": "string" - } - }, - "required": [ - "type", - "id" - ], - "title": "SourceRef", - "type": "object" - }, - "StorageBreakdownOut": { - "properties": { - "as_of": { - "format": "date", - "title": "As Of", - "type": "string" - }, - "live_bytes": { - "title": "Live Bytes", - "type": "integer" - }, - "trash_bytes": { - "title": "Trash Bytes", - "type": "integer" - }, - "version_bytes": { - "title": "Version Bytes", - "type": "integer" - } - }, - "required": [ - "as_of", - "live_bytes", - "version_bytes", - "trash_bytes" - ], - "title": "StorageBreakdownOut", - "type": "object" - }, - "StorageFootprintOut": { - "properties": { - "as_of": { - "anyOf": [ - { - "format": "date", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "As Of" - }, - "live_bytes": { - "title": "Live Bytes", - "type": "integer" - }, - "total_bytes": { - "title": "Total Bytes", - "type": "integer" - }, - "trash_bytes": { - "title": "Trash Bytes", - "type": "integer" - }, - "version_bytes": { - "title": "Version Bytes", - "type": "integer" - } - }, - "required": [ - "live_bytes", - "version_bytes", - "trash_bytes", - "total_bytes" - ], - "title": "StorageFootprintOut", - "type": "object" - }, - "TokenResponse": { - "description": "`POST /oauth2/token` success response. Mirrors RFC 6749 with\nan optional `identity_assertion` field for the claim grant path\n(where a fresh post-claim assertion supersedes the pre-claim\none).", - "properties": { - "access_token": { - "title": "Access Token", - "type": "string" - }, - "expires_in": { - "description": "Seconds until access_token expiry.", - "title": "Expires In", - "type": "integer" - }, - "identity_assertion": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Identity Assertion" - }, - "scope": { - "title": "Scope", - "type": "string" - }, - "token_type": { - "default": "Bearer", - "title": "Token Type", - "type": "string" - } - }, - "required": [ - "access_token", - "expires_in", - "scope" - ], - "title": "TokenResponse", - "type": "object" - }, - "TokenUsageOut": { - "properties": { - "embed": { - "title": "Embed", - "type": "integer" - }, - "llm_cached": { - "title": "Llm Cached", - "type": "integer" - }, - "llm_input": { - "title": "Llm Input", - "type": "integer" - }, - "llm_output": { - "title": "Llm Output", - "type": "integer" - } - }, - "required": [ - "llm_input", - "llm_output", - "llm_cached", - "embed" - ], - "title": "TokenUsageOut", - "type": "object" - }, - "TrashArtifactOut": { - "properties": { - "deleted_at": { - "anyOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Deleted At" - }, - "id": { - "title": "Id", - "type": "string" - }, - "path": { - "title": "Path", - "type": "string" - }, - "purge_at": { - "anyOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Purge At" - }, - "restore_url": { - "title": "Restore Url", - "type": "string" - }, - "size_bytes": { - "title": "Size Bytes", - "type": "integer" - } - }, - "required": [ - "id", - "path", - "size_bytes", - "restore_url" - ], - "title": "TrashArtifactOut", - "type": "object" - }, - "TrashDriveOut": { - "properties": { - "deleted_at": { - "anyOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Deleted At" - }, - "id": { - "title": "Id", - "type": "string" - } - }, - "required": [ - "id" - ], - "title": "TrashDriveOut", - "type": "object" - }, - "TrashOut": { - "description": "Trash collection with a compatibility-preserving pagination opt-in.", - "properties": { - "artifacts": { - "deprecated": true, - "description": "Deprecated alias of items.", - "items": { - "$ref": "#/components/schemas/TrashArtifactOut" - }, - "title": "Artifacts", - "type": "array" - }, - "drive": { - "$ref": "#/components/schemas/TrashDriveOut" - }, - "items": { - "items": { - "$ref": "#/components/schemas/TrashArtifactOut" - }, - "title": "Items", - "type": "array" - }, - "next_cursor": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Next Cursor" - } - }, - "required": [ - "drive", - "items", - "artifacts" - ], - "title": "TrashOut", - "type": "object" - }, - "UploadAbortOut": { - "description": "Response of `DELETE /v0/uploads/{upload_id}` \u2014 the session is released.\n`released_bytes` is the reservation returned to the drive's quota (the\nsession's `size_bytes` for a live `initiated` session; `0` when the\nsession was already aborted or already expired \u2014 the GC sweep owns an\nexpired session's release).", - "properties": { - "released_bytes": { - "title": "Released Bytes", - "type": "integer" - }, - "state": { - "default": "aborted", - "enum": [ - "aborted", - "expired" - ], - "title": "State", - "type": "string" - }, - "upload_id": { - "title": "Upload Id", - "type": "string" - } - }, - "required": [ - "upload_id", - "released_bytes" - ], - "title": "UploadAbortOut", - "type": "object" - }, - "UploadBeginIn": { - "description": "Body of `POST /v0/uploads` \u2014 the large-upload begin call (large-upload-\ndesign.md \u00a75.1). All artifact decisions are frozen here; the subsequent\nGCS PUT carries only bytes, and `commit` carries only the `upload_id`.\n\n`labels`/`metadata`/`source` omitted (null) \u21d2 preserve the existing\nartifact's value at commit; present (incl. empty) \u21d2 replace.", - "properties": { - "actor_name": { - "anyOf": [ - { - "maxLength": 64, - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Actor Name" - }, - "change_summary": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Change Summary" - }, - "content_type": { - "default": "application/octet-stream", - "title": "Content Type", - "type": "string" - }, - "cors_origin": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Web origin (scheme://host[:port]) of the browser that will PUT the bytes, e.g. `https://app.example.com`. Set this when the `upload_url` is handed to browser code: GCS binds CORS at session initiate, so the returned session only echoes `Access-Control-Allow-Origin` (and is thus PUT-able from a browser) when opened with the caller's origin. A trusted backend relaying a browser upload forwards the browser's `Origin` here. Omit for server/desktop uploads (no CORS enforcement).", - "title": "Cors Origin" - }, - "crc32c": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Crc32C" - }, - "if_match": { - "anyOf": [ - { - "maximum": 2147483647.0, - "minimum": 0.0, - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "If Match" - }, - "if_none_match": { - "default": false, - "title": "If None Match", - "type": "boolean" - }, - "labels": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Labels" - }, - "metadata": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Metadata" - }, - "path": { - "title": "Path", - "type": "string" - }, - "size_bytes": { - "minimum": 1.0, - "title": "Size Bytes", - "type": "integer" - }, - "source": { - "anyOf": [ - { - "$ref": "#/components/schemas/ArtifactSource" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "path", - "size_bytes" - ], - "title": "UploadBeginIn", - "type": "object" - }, - "UploadBeginOut": { - "description": "Response of `POST /v0/uploads`. PUT the bytes to `upload_url` (no auth\nheader \u2014 the URL is the credential), then `POST .../commit`.", - "properties": { - "expires_at": { - "format": "date-time", - "title": "Expires At", - "type": "string" - }, - "headers": { - "additionalProperties": { - "type": "string" - }, - "title": "Headers", - "type": "object" - }, - "max_bytes": { - "title": "Max Bytes", - "type": "integer" - }, - "method": { - "const": "PUT", - "default": "PUT", - "title": "Method", - "type": "string" - }, - "upload_id": { - "title": "Upload Id", - "type": "string" - }, - "upload_url": { - "title": "Upload Url", - "type": "string" - } - }, - "required": [ - "upload_id", - "upload_url", - "headers", - "expires_at", - "max_bytes" - ], - "title": "UploadBeginOut", - "type": "object" - }, - "UploadStatusOut": { - "description": "Response of `GET /v0/uploads/{upload_id}` \u2014 the live state of a\ndirect-to-GCS upload session (large-upload-design.md \u00a75).\n\n`state` is derived, not a stored column:\n * `initiated` \u2014 session open; PUT the bytes to the `upload_url`, then\n `POST /v0/uploads/{upload_id}/commit`.\n * `committed` \u2014 the bytes landed and the artifact was created\n (`committed_at` is set).\n * `aborted` \u2014 released via `DELETE /v0/uploads/{upload_id}`.\n * `expired` \u2014 past `expires_at` without a commit; the reservation is\n reclaimed by the GC sweep.", - "properties": { - "committed_at": { - "anyOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Committed At" - }, - "content_type": { - "title": "Content Type", - "type": "string" - }, - "created_at": { - "format": "date-time", - "title": "Created At", - "type": "string" - }, - "expires_at": { - "format": "date-time", - "title": "Expires At", - "type": "string" - }, - "max_bytes": { - "title": "Max Bytes", - "type": "integer" - }, - "path": { - "title": "Path", - "type": "string" - }, - "size_bytes": { - "title": "Size Bytes", - "type": "integer" - }, - "state": { - "enum": [ - "initiated", - "committed", - "aborted", - "expired" - ], - "title": "State", - "type": "string" - }, - "upload_id": { - "title": "Upload Id", - "type": "string" - } - }, - "required": [ - "upload_id", - "path", - "content_type", - "size_bytes", - "state", - "max_bytes", - "expires_at", - "created_at" - ], - "title": "UploadStatusOut", - "type": "object" - }, - "UsageCounterOut": { - "properties": { - "limit": { - "title": "Limit", - "type": "integer" - }, - "used": { - "title": "Used", - "type": "integer" - } - }, - "required": [ - "used", - "limit" - ], - "title": "UsageCounterOut", - "type": "object" - }, - "UsagePeriodOut": { - "properties": { - "ends": { - "format": "date-time", - "title": "Ends", - "type": "string" - }, - "starts": { - "format": "date-time", - "title": "Starts", - "type": "string" - }, - "year_month": { - "title": "Year Month", - "type": "string" - } - }, - "required": [ - "year_month", - "starts", - "ends" - ], - "title": "UsagePeriodOut", - "type": "object" - }, - "UserTokenList": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/UserTokenOut" - }, - "title": "Items", - "type": "array" - }, - "next_cursor": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Next Cursor" - } - }, - "required": [ - "items" - ], - "title": "UserTokenList", - "type": "object" - }, - "UserTokenOut": { - "description": "One `ad_user_` token \u2014 metadata only. The raw token is NEVER\nexposed over the API (minting is web-only, reveal-once); this shape\nomits both the raw value and the stored hash by construction.", - "properties": { - "created_at": { - "format": "date-time", - "title": "Created At", - "type": "string" - }, - "default_drive_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Default Drive Id" - }, - "expires_at": { - "anyOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Expires At" - }, - "id": { - "title": "Id", - "type": "string" - }, - "label": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Label" - }, - "last_used_at": { - "anyOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Last Used At" - }, - "prefix": { - "title": "Prefix", - "type": "string" - }, - "revoked_at": { - "anyOf": [ - { - "format": "date-time", - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Revoked At" - }, - "scope": { - "enum": [ - "read", - "full" - ], - "title": "Scope", - "type": "string" - } - }, - "required": [ - "id", - "prefix", - "scope", - "created_at" - ], - "title": "UserTokenOut", - "type": "object" - }, - "ValidationErrorBody": { - "additionalProperties": true, - "properties": { - "code": { - "title": "Code", - "type": "string" - }, - "fields": { - "items": { - "$ref": "#/components/schemas/ValidationIssue" - }, - "title": "Fields", - "type": "array" - }, - "message": { - "title": "Message", - "type": "string" - } - }, - "required": [ - "code", - "message", - "fields" - ], - "title": "ValidationErrorBody", - "type": "object" - }, - "ValidationErrorDetail": { - "additionalProperties": true, - "properties": { - "error": { - "$ref": "#/components/schemas/ValidationErrorBody" - } - }, - "required": [ - "error" - ], - "title": "ValidationErrorDetail", - "type": "object" - }, - "ValidationErrorResponse": { - "additionalProperties": true, - "description": "The runtime `VALIDATION_ERROR` response for request parsing failures.", - "properties": { - "detail": { - "$ref": "#/components/schemas/ValidationErrorDetail" - } - }, - "required": [ - "detail" - ], - "title": "ValidationErrorResponse", - "type": "object" - }, - "ValidationIssue": { - "additionalProperties": true, - "description": "One Pydantic/FastAPI validation issue.", - "properties": { - "ctx": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Ctx" - }, - "input": { - "anyOf": [ - {}, - { - "type": "null" - } - ], - "title": "Input" - }, - "loc": { - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - } - ] - }, - "title": "Loc", - "type": "array" - }, - "msg": { - "title": "Msg", - "type": "string" - }, - "type": { - "title": "Type", - "type": "string" - } - }, - "required": [ - "type", - "loc", - "msg" - ], - "title": "ValidationIssue", - "type": "object" - }, - "VersionOut": { - "properties": { - "actor_name": { - "anyOf": [ - { - "maxLength": 64, - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Actor Name" - }, - "art_id": { - "title": "Art Id", - "type": "string" - }, - "change_summary": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Change Summary" - }, - "content_type": { - "title": "Content Type", - "type": "string" - }, - "created_at": { - "format": "date-time", - "title": "Created At", - "type": "string" - }, - "hash": { - "title": "Hash", - "type": "string" - }, - "size_bytes": { - "title": "Size Bytes", - "type": "integer" - }, - "version_number": { - "title": "Version Number", - "type": "integer" - } - }, - "required": [ - "art_id", - "version_number", - "size_bytes", - "hash", - "content_type", - "created_at" - ], - "title": "VersionOut", - "type": "object" - }, - "VersionPage": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/VersionOut" - }, - "title": "Items", - "type": "array" - }, - "next_cursor": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Next Cursor" - }, - "pruned_before": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Pruned Before" - } - }, - "required": [ - "items" - ], - "title": "VersionPage", - "type": "object" - }, - "VersionRetentionOut": { - "properties": { - "versions_max": { - "title": "Versions Max", - "type": "integer" - } - }, - "required": [ - "versions_max" - ], - "title": "VersionRetentionOut", - "type": "object" - }, - "WorkspaceCreateIn": { - "description": "POST /v0/workspaces body. `name` is the user-facing workspace label;\nthe creator becomes its admin and gets a starter drive.", - "properties": { - "name": { - "maxLength": 120, - "minLength": 1, - "title": "Name", - "type": "string" - } - }, - "required": [ - "name" - ], - "title": "WorkspaceCreateIn", - "type": "object" - }, - "WorkspaceCreateOut": { - "description": "POST /v0/workspaces response. Carries the new workspace + its starter\ndrive's `ad_live_` key **once** (`starter_drive_api_key`) \u2014 reveal-once,\nstore it now (mint more keys via `POST /v0/drives/{id}/keys`).", - "properties": { - "starter_drive_api_key": { - "title": "Starter Drive Api Key", - "type": "string" - }, - "starter_drive_id": { - "title": "Starter Drive Id", - "type": "string" - }, - "workspace": { - "$ref": "#/components/schemas/WorkspaceOut" - } - }, - "required": [ - "workspace", - "starter_drive_id", - "starter_drive_api_key" - ], - "title": "WorkspaceCreateOut", - "type": "object" - }, - "WorkspaceList": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/WorkspaceOut" - }, - "title": "Items", - "type": "array" - }, - "next_cursor": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Next Cursor" - } - }, - "required": [ - "items" - ], - "title": "WorkspaceList", - "type": "object" - }, - "WorkspaceOut": { - "description": "One workspace in a listing \u2014 metadata only. `role` is the CALLER's\nrole in it (admin/member), so a client can render management affordances\nwithout a second round-trip.", - "properties": { - "created_at": { - "format": "date-time", - "title": "Created At", - "type": "string" - }, - "id": { - "title": "Id", - "type": "string" - }, - "name": { - "title": "Name", - "type": "string" - }, - "role": { - "enum": [ - "admin", - "member" - ], - "title": "Role", - "type": "string" - }, - "tier_id": { - "title": "Tier Id", - "type": "string" - } - }, - "required": [ - "id", - "name", - "role", - "tier_id", - "created_at" - ], - "title": "WorkspaceOut", - "type": "object" - }, - "WorkspaceRenameIn": { - "description": "PATCH /v0/workspaces/{org} body \u2014 rename a workspace the caller\nadministers.", - "properties": { - "name": { - "maxLength": 120, - "minLength": 1, - "title": "Name", - "type": "string" - } - }, - "required": [ - "name" - ], - "title": "WorkspaceRenameIn", - "type": "object" - } - }, - "securitySchemes": { - "BearerAuth": { - "bearerFormat": "ad_live_ | ad_user_ | JWT", - "description": "AgentDrive bearer credential. Data-plane operations accept an `ad_live_` drive key, an `ad_user_` user token, or a supported short-lived JWT access token. User-control-plane operations accept `ad_user_` tokens. MCP `adat_` credentials are not valid on `/v0`.", - "scheme": "bearer", - "type": "http" - } - } - }, - "info": { - "description": "AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`.", - "title": "AgentDrive", - "version": "" - }, - "openapi": "3.1.0", - "paths": { - "/.well-known/jwks.json": { - "get": { - "description": "Public half of the RSA signing key for identity_assertion + access_token JWTs issued by AgentDrive. RFC 7517 shape. Cache-friendly; key rotation publishes both kids during the overlap window.", - "operationId": "jwks__well_known_jwks_json_get", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JwksOut" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "summary": "JSON Web Key Set \u2014 public keys for verifying AgentDrive JWTs", - "tags": [ - "agent-auth" - ] - } - }, - "/.well-known/oauth-authorization-server": { - "get": { - "description": "Discovery document for the auth.md protocol. Carries the standard RFC 8414 fields plus an `agent_auth` block per the auth.md spec \u2014 the latter is what an agent runtime keys off to find the identity + claim endpoints.", - "operationId": "oauth_authorization_server__well_known_oauth_authorization_server_get", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthorizationServerMetadataOut" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "summary": "Authorization-server metadata (RFC 8414 + auth.md agent_auth block)", - "tags": [ - "agent-auth" - ] - } - }, - "/.well-known/oauth-protected-resource": { - "get": { - "description": "Names this server as a protected resource and points clients at the authorization server they should obtain tokens from. In this design the resource server and authorization server are the same host.", - "operationId": "oauth_protected_resource__well_known_oauth_protected_resource_get", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProtectedResourceMetadataOut" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "summary": "Protected-resource metadata (auth.md / RFC 9728-like discovery)", - "tags": [ - "agent-auth" - ] - } - }, - "/.well-known/oauth-protected-resource/mcp": { - "get": { - "description": "Path-inserted variant of the protected-resource document. MCP clients derive this URL from the resource URL `{origin}/mcp` (RFC 9728 \u00a73.1: insert the well-known segment between host and path) after reading the WWW-Authenticate challenge on a 401 \u2014 it is the first hop of the client-side OAuth flow.", - "operationId": "oauth_protected_resource_mcp__well_known_oauth_protected_resource_mcp_get", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProtectedResourceMetadataOut" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "summary": "Protected-resource metadata for the MCP endpoint (RFC 9728 \u00a73.1)", - "tags": [ - "agent-auth" - ] - } - }, - "/a/{art_id}": { - "get": { - "description": "Resolve a stable artifact ID to its path-URL and 302 there.\n\nAuth model matches the path URL: public artifacts redirect for\nanyone; private artifacts redirect only for the owner. Non-owners\non private artifacts get 404 \u2014 same response as \"doesn't exist\",\nso the ID's existence isn't leaked. The forwarded query-param\nallowlist is `raw`, `download` (see _PERMALINK_FORWARDED_PARAMS).", - "operationId": "view_permalink_artifact_a__art_id__get", - "parameters": [ - { - "in": "path", - "name": "art_id", - "required": true, - "schema": { - "title": "Art Id", - "type": "string" - } - } - ], - "responses": { - "302": { - "description": "Redirect to the canonical or authentication URL.", - "headers": { - "Location": { - "description": "Redirect target.", - "schema": { - "format": "uri-reference", - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The artifact does not exist or is not readable.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "summary": "View Permalink Artifact" - } - }, - "/a/{art_id}/head": { - "get": { - "description": "Return `{\"version\": }` for a readable artifact.\n\nAuth mirrors the permalink/viewer: the owner, or an `anyone:viewer`\ngrant (a published artifact), reads. Two deliberate differences from\nthe HTML viewer:\n\n * Never redirect to login. A poll is a background `fetch`, not a\n navigation \u2014 an HTML login page would be a useless body and a\n same-origin redirect the client can't act on. Anonymous callers\n on a private/absent artifact get a flat 404.\n * \"Doesn't exist\" and \"exists but not readable\" collapse to the\n same 404, so an anonymous poller can't use this as an existence\n oracle (matches the permalink/viewer leak guard).", - "operationId": "view_artifact_head_a__art_id__head_get", - "parameters": [ - { - "in": "path", - "name": "art_id", - "required": true, - "schema": { - "title": "Art Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ArtifactHeadOut" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "summary": "View Artifact Head" - } - }, - "/agent/identity": { - "post": { - "description": "Two registration modes:\n\n**`type=anonymous`** \u2014 Provisions a brand-new agent identity bound to a fresh shadow-org drive. No human involved; returned `identity_assertion` carries `scope=pre_claim`. A human completes the claim ceremony later via /claim.\n\n**`type=identity_assertion`** \u2014 Agent provider (e.g. WorkOS) has already minted an ID-JAG asserting a user identity binding. We verify it against the provider's JWKS and provision a **claimed** identity immediately: scope=full, drive bound to the user, no claim ceremony needed.", - "operationId": "register_agent_identity_agent_identity_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "additionalProperties": true, - "title": "Body", - "type": "object" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AnonymousIdentityResponse" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/ValidationErrorResponse" - }, - { - "$ref": "#/components/schemas/ErrorResponse" - } - ] - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "503": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Agent identity signing is not configured.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "summary": "Register an agent identity (anonymous or ID-JAG)", - "tags": [ - "agent-auth" - ] - } - }, - "/agent/identity/claim": { - "post": { - "description": "Returns a `user_code` and `verification_uri` (RFC 8628 device-code idiom). The agent surfaces these to the human, who visits the URI, signs in, and approves the claim. The agent then polls POST /oauth2/token (grant_type=claim) with the same `claim_token` to learn when the claim completes.", - "operationId": "initiate_claim_agent_identity_claim_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClaimInitRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClaimInitResponse" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "summary": "Initiate the human-claim ceremony for an agent identity", - "tags": [ - "agent-auth" - ] - } - }, - "/auth/callback": { - "get": { - "description": "Complete a sign-in.\n\nHandles the auth provider's OAuth callback and shapes failures into\nuser-readable errors:\n * an invalid or expired login flow \u2014 LOGIN_FLOW_INVALID (400);\n * an invalid or already-used authorization code \u2014 AUTH_CODE_INVALID (400);\n * the upstream auth provider being unavailable \u2014 WORKOS_UNAVAILABLE (502),\n returned with Retry-After.", - "operationId": "callback_auth_callback_get", - "parameters": [ - { - "in": "query", - "name": "code", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Code" - } - }, - { - "in": "query", - "name": "state", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "State" - } - }, - { - "in": "query", - "name": "error", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Error" - } - } - ], - "responses": { - "200": { - "content": { - "text/html": { - "schema": { - "type": "string" - } - } - }, - "description": "Extension authentication handoff page.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "302": { - "description": "Redirect to the canonical or authentication URL.", - "headers": { - "Location": { - "description": "Redirect target.", - "schema": { - "format": "uri-reference", - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The login flow or authorization code is invalid.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "409": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - }, - "text/html": { - "schema": { - "type": "string" - } - } - }, - "description": "Account recovery is required or the Hub principal conflicts with the existing account link.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "502": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The upstream identity provider is temporarily unavailable.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "503": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Extension authentication is temporarily disabled.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "summary": "Callback" - } - }, - "/auth/extension/start": { - "get": { - "description": "Begin a sign-in flow on behalf of a Chrome extension.\n\nProvider follows AUTH_MODE (WorkOS AuthKit or the TokenCanopy hub),\nexactly like /auth/login. Stamps `for=ext` + `ext_id` into the\nsigned OAuth state so the callback handler knows to render the\nextension handoff page instead of setting a session cookie.\n\nThree short-circuits, all surface as actionable errors:\n * EXTENSION_AUTH_DISABLED (503): kill switch flipped off.\n * UNKNOWN_EXTENSION (400): `ext_id` not on the allow-list.\n * Missing `ext_id` query string (400 INVALID_REQUEST).", - "operationId": "extension_start_auth_extension_start_get", - "parameters": [ - { - "in": "query", - "name": "ext_id", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Ext Id" - } - } - ], - "responses": { - "302": { - "description": "Redirect to the canonical or authentication URL.", - "headers": { - "Location": { - "description": "Redirect target.", - "schema": { - "format": "uri-reference", - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The extension ID is missing or not allowed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "503": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Extension authentication is temporarily disabled.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "summary": "Extension Start" - } - }, - "/auth/login": { - "get": { - "description": "Begin a WorkOS sign-in flow.\n\nMints a pre-login state cookie (binds the OAuth flow to this\nbrowser \u2014 defense-in-depth against login-CSRF), signs a state\npayload, and redirects to AuthKit. The hosted AuthKit page lets\nthe user pick Google OAuth, Microsoft OAuth, magic-link,\npassword, or passkey; we don't care which \u2014 they all funnel\nback to /auth/callback with a `code` we exchange in D2.", - "operationId": "login_auth_login_get", - "parameters": [ - { - "in": "query", - "name": "return_to", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Return To" - } - } - ], - "responses": { - "302": { - "description": "Redirect to the canonical or authentication URL.", - "headers": { - "Location": { - "description": "Redirect target.", - "schema": { - "format": "uri-reference", - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "summary": "Login" - } - }, - "/auth/logout": { - "post": { - "description": "Terminate both the local session AND the upstream WorkOS session.\n\nWithout the WorkOS-side termination, the next `/auth/login` flow\nsilently re-authenticates the user through AuthKit's still-valid\nsession cookie on `api.workos.com` \u2014 \"Sign out\" feels broken and\na shared-browser user can't switch accounts. The recommended\npattern (per https://workos.com/docs/authkit/sessions) is to\nredirect to the WorkOS logout endpoint with the `sid` we stashed\nduring the callback; WorkOS clears its own session and returns\nthe browser to our `return_to`.\n\nFailure modes handled:\n * No `workos_session_id` in the session (legacy v2 cookie issued\n before this slice landed): fall back to local-only logout. The\n upstream session lingers but the user's local state is cleared\n \u2014 same UX as before this slice; cookie rotation on next sign-in\n eventually overwrites it.\n * SDK raises during `get_logout_url`: pure string formatting at\n WorkOS's end, so the only realistic failure is a misconfigured\n WorkOS dashboard (no Sign-out redirect registered). We catch\n and fall back to local-only logout rather than 500ing \u2014 the\n user clicked \"Sign out\", they should land somewhere, not on an\n error page.", - "operationId": "logout_auth_logout_post", - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/Body_logout_auth_logout_post" - } - } - }, - "required": true - }, - "responses": { - "302": { - "description": "Redirect to the canonical or authentication URL.", - "headers": { - "Location": { - "description": "Redirect target.", - "schema": { - "format": "uri-reference", - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The browser CSRF check failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "summary": "Logout" - } - }, - "/f/{fld_id}": { - "get": { - "description": "Resolve a stable folder ID to its current path-URL and 302.\n\nAuth model mirrors the artifact permalink: public folder = anon\nOK; private folder = owner only, otherwise 404 (no existence\nleak). \"Public\" is an `anyone:viewer` grant on the `fld_*` id\nresolved through `can_read` (\u00a74.4); folders carry no visibility\nflag of their own.", - "operationId": "view_permalink_folder_f__fld_id__get", - "parameters": [ - { - "in": "path", - "name": "fld_id", - "required": true, - "schema": { - "title": "Fld Id", - "type": "string" - } - } - ], - "responses": { - "302": { - "description": "Redirect to the canonical or authentication URL.", - "headers": { - "Location": { - "description": "Redirect target.", - "schema": { - "format": "uri-reference", - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The folder does not exist or is not readable.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "summary": "View Permalink Folder" - } - }, - "/health": { - "get": { - "description": "Liveness + DB-reachability probe. Used by Cloud Run / k8s healthchecks\nand any uptime monitor. Returns 200 only if the DB pool can serve a\ntrivial query; 503 otherwise so the orchestrator can pull the instance\nout of rotation.\n\nNOTE: route is `/health`, NOT `/healthz`. Google's edge infrastructure\nintercepts `/healthz` (legacy kubernetes-reserved path) and returns a\ngeneric 404 before traffic reaches Cloud Run \u2014 discovered the hard way\nduring the first prod deploy. Don't rename back.", - "operationId": "health_health_get", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HealthOut" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "503": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HealthDegradedResponse" - } - } - }, - "description": "The database reachability probe failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "summary": "Health" - } - }, - "/oauth2/authorize": { - "get": { - "operationId": "authorize_page_oauth2_authorize_get", - "responses": { - "200": { - "content": { - "text/html": { - "schema": { - "type": "string" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "302": { - "description": "Redirect to the canonical or authentication URL.", - "headers": { - "Location": { - "description": "Redirect target.", - "schema": { - "format": "uri-reference", - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OAuthProtocolErrorOut" - } - } - }, - "description": "The authorization request is invalid.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Authorization rate limit exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0.0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "summary": "Authorize Page", - "tags": [ - "mcp-oauth-ui" - ] - }, - "post": { - "operationId": "authorize_decision_oauth2_authorize_post", - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/Body_authorize_decision_oauth2_authorize_post" - } - } - }, - "required": true - }, - "responses": { - "302": { - "description": "Redirect to the canonical or authentication URL.", - "headers": { - "Location": { - "description": "Redirect target.", - "schema": { - "format": "uri-reference", - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "303": { - "description": "Continue after the form submission at the redirect target.", - "headers": { - "Location": { - "description": "Redirect target.", - "schema": { - "format": "uri-reference", - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OAuthProtocolErrorOut" - } - } - }, - "description": "The authorization decision or request is invalid.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/OAuthProtocolErrorOut" - }, - { - "$ref": "#/components/schemas/ErrorResponse" - } - ] - } - } - }, - "description": "The selected drive is unavailable or the browser CSRF check failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Authorization rate limit exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0.0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "summary": "Authorize Decision", - "tags": [ - "mcp-oauth-ui" - ] - } - }, - "/oauth2/register": { - "post": { - "description": "Anonymous registration endpoint for MCP clients. Public clients only (PKCE, no client_secret). Returns the registered metadata plus the assigned `client_id`. Registration grants nothing by itself \u2014 every token still requires a user consent ceremony at /oauth2/authorize.", - "operationId": "oauth2_register_oauth2_register_post", - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ClientRegistrationOut" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OAuthProtocolErrorOut" - } - } - }, - "description": "Invalid client metadata.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Registration rate limit exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0.0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "summary": "Dynamic Client Registration (RFC 7591)", - "tags": [ - "mcp-oauth" - ] - } - }, - "/oauth2/revoke": { - "post": { - "description": "Revokes an `adat_` access token (that token only) or an `adrt_` refresh token (the whole rotation chain). Unknown tokens return 200 per RFC 7009 \u00a72.2 \u2014 existence is not revealed. Public-client endpoint auth (`client_id` form param, no secret).", - "operationId": "oauth2_revoke_oauth2_revoke_post", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OAuthRevocationOut" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OAuthProtocolErrorOut" - } - } - }, - "description": "Invalid revocation request.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OAuthProtocolErrorOut" - } - } - }, - "description": "Client authentication failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OAuthProtocolErrorOut" - } - } - }, - "description": "Token type is unsupported.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Revocation rate limit exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0.0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "summary": "Token revocation (RFC 7009)", - "tags": [ - "mcp-oauth" - ] - } - }, - "/oauth2/token": { - "post": { - "description": "Two grant types:\n\n**`urn:ietf:params:oauth:grant-type:jwt-bearer`** (RFC 7523) \u2014 body `assertion=`. Returns a fresh 15-minute access_token with the same scope as the assertion.\n\n**`claim`** (custom) \u2014 body `claim_token=`. Polling endpoint for the claim ceremony. Returns one of: `authorization_pending` (400), `expired_token` (400), `access_denied` (400), or access_token + new identity_assertion + scope=full (200).", - "operationId": "oauth2_token_oauth2_token_post", - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/Body_oauth2_token_oauth2_token_post" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TokenResponse" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "summary": "Exchange a credential for an access_token", - "tags": [ - "agent-auth" - ] - } - }, - "/s/{share_key}": { - "get": { - "operationId": "redeem_share_s__share_key__get", - "parameters": [ - { - "in": "path", - "name": "share_key", - "required": true, - "schema": { - "title": "Share Key", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ShareRedeemOut" - } - }, - "text/html": { - "schema": { - "type": "string" - } - } - }, - "description": "JSON capability response or browser password form.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "302": { - "description": "Browser redemption succeeded; continue to the canonical URL.", - "headers": { - "Location": { - "description": "Redirect target.", - "schema": { - "format": "uri-reference", - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ShareErrorOut" - } - }, - "text/html": { - "schema": { - "type": "string" - } - } - }, - "description": "A password is required or the supplied password is invalid.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ShareErrorOut" - } - }, - "text/html": { - "schema": { - "type": "string" - } - } - }, - "description": "The share is invalid, expired, or no longer authorized.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "summary": "Redeem Share" - }, - "post": { - "operationId": "redeem_share_with_password_s__share_key__post", - "parameters": [ - { - "in": "path", - "name": "share_key", - "required": true, - "schema": { - "title": "Share Key", - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/x-www-form-urlencoded": { - "schema": { - "$ref": "#/components/schemas/Body_redeem_share_with_password_s__share_key__post" - } - } - } - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ShareRedeemOut" - } - }, - "text/html": { - "schema": { - "type": "string" - } - } - }, - "description": "JSON capability response or browser password form.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "302": { - "description": "Browser redemption succeeded; continue to the canonical URL.", - "headers": { - "Location": { - "description": "Redirect target.", - "schema": { - "format": "uri-reference", - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ShareErrorOut" - } - }, - "text/html": { - "schema": { - "type": "string" - } - } - }, - "description": "A password is required or the supplied password is invalid.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ShareErrorOut" - } - }, - "text/html": { - "schema": { - "type": "string" - } - } - }, - "description": "The share is invalid, expired, or no longer authorized.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "summary": "Redeem Share With Password" - } - }, - "/v/{art_id}/{version}": { - "get": { - "description": "Render version `version` of an artifact, read-only.\n\nVersion history is owner-only. The drive-blind `can_read` gate still\nprovides the same sign-in-or-404 masking as `/a/{art_id}`, but readable\nnon-owners cannot browse snapshots. A pruned or never-existed version\nrenders a friendly unavailable state, never a 500.\n`?raw=1` / `?download=1` stream the version's bytes (powering the bar's\nRaw / Download buttons) with the same sandbox+nosniff headers as the\nhead raw path.", - "operationId": "view_artifact_version_v__art_id___version__get", - "parameters": [ - { - "in": "path", - "name": "art_id", - "required": true, - "schema": { - "title": "Art Id", - "type": "string" - } - }, - { - "in": "path", - "name": "version", - "required": true, - "schema": { - "title": "Version", - "type": "integer" - } - }, - { - "in": "query", - "name": "raw", - "required": false, - "schema": { - "default": 0, - "title": "Raw", - "type": "integer" - } - }, - { - "in": "query", - "name": "download", - "required": false, - "schema": { - "default": 0, - "title": "Download", - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/octet-stream": { - "schema": { - "format": "binary", - "type": "string" - } - }, - "text/html": { - "schema": { - "type": "string" - } - } - }, - "description": "Rendered HTML or raw artifact bytes.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "summary": "View Artifact Version" - } - }, - "/v0/artifacts": { - "get": { - "description": "Returns artifacts sorted by path. Filter by `prefix`, `label` (repeatable + AND-combined), and `file_type`.\n\n**Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page. `next_cursor` is `null` on the final page. Filters MUST stay consistent across pages \u2014 the cursor encodes only the keyset position, not the filter set, so the client is responsible for re-sending the same filter on each page.", - "operationId": "list_artifacts_v0_artifacts_get", - "parameters": [ - { - "in": "query", - "name": "prefix", - "required": false, - "schema": { - "default": "", - "title": "Prefix", - "type": "string" - } - }, - { - "in": "query", - "name": "label", - "required": false, - "schema": { - "default": [], - "items": { - "type": "string" - }, - "title": "Label", - "type": "array" - } - }, - { - "in": "query", - "name": "file_type", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "File Type" - } - }, - { - "in": "query", - "name": "cursor", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Cursor" - } - }, - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "default": 50, - "maximum": 100, - "minimum": 1, - "title": "Limit", - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The pagination cursor is invalid.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "List artifacts in the drive" - } - }, - "/v0/artifacts/{art_id}": { - "delete": { - "description": "Soft-delete the artifact with this `art_\u2026` ID. Same semantics + response shape as the path-based `DELETE /v0/artifacts/{path}` (reversible until the GC cron hard-deletes at `purge_at`; `restore_url` points at the by-id restore), but keys on the immutable id so a concurrent rename can't change the target.\n\nReturns 404 ARTIFACT_NOT_FOUND if no live artifact has this id; 403 WIKI_RESERVED for `_wiki/` artifacts (system-managed); 412 if `If-Match` doesn't match the current version. Declared before the `{path:path}` family so the id convertor wins for DELETEs.", - "operationId": "delete_artifact_by_id_route_v0_artifacts__art_id__delete", - "parameters": [ - { - "in": "path", - "name": "art_id", - "required": true, - "schema": { - "title": "Art Id", - "type": "string" - } - }, - { - "in": "header", - "name": "if-match", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "If-Match" - } - }, - { - "in": "header", - "name": "x-agentdrive-actor", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "X-Agentdrive-Actor" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ArtifactDeleteOut" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "No live artifact with this ID exists.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "412": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "If-Match does not match the current artifact.", - "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Soft-delete an artifact by its stable ID" - }, - "get": { - "operationId": "get_artifact_by_id_v0_artifacts__art_id__get", - "parameters": [ - { - "in": "path", - "name": "art_id", - "required": true, - "schema": { - "title": "Art Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ArtifactOut" - } - } - }, - "description": "Successful Response", - "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "304": { - "description": "The current entity tag or modification date matched.", - "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "No such artifact exists in this drive.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Canonical lookup of an artifact by its stable ID" - }, - "patch": { - "description": "Metadata-only JSON-merge-patch update of a single artifact, keyed by its stable `art_\u2026` ID. Every field in the body is optional; a field that is **omitted** is left unchanged, a field that is **present** is applied \u2014 with an explicit `null` / `[]` / `{}` meaning \"clear\". This mirrors the MCP `set_metadata` tool.\n\nEditable fields:\n * `labels` \u2014 replace the label set (`[]`/`null` clears).\n * `metadata` \u2014 replace the free-form metadata object (`{}`/`null` clears).\n * `source` \u2014 replace provenance refs (`null` clears).\n\n**To move/rename an artifact, use `POST /v0/artifacts/{art_id}/move`** \u2014 PATCH no longer accepts `path`. The body is `extra=\"forbid\"`, so a stray field (notably a legacy `path`) is rejected with 422 rather than silently ignored.\n\nMetadata edits do NOT create a new content version (no `version_number` / generation bump, no `artifact_versions` row) but DO bump the artifact's `metageneration` and `updated_at`.\n\nReturns 400 BAD_LABELS / BAD_SOURCE for invalid metadata; 404 ARTIFACT_NOT_FOUND for an unknown id. Honors `If-Match`, which takes the composite ETag `\"..\"` and is compared as a whole tuple: ANY concurrent content **or** metadata change (a bumped generation OR metageneration) \u2192 412 PRECONDITION_FAILED. There is no last-writer-wins gap for metadata-only edits. Use `X-AgentDrive-Actor` to attach attribution to the emitted `artifact.metadata_updated` event.", - "operationId": "patch_artifact_route_v0_artifacts__art_id__patch", - "parameters": [ - { - "in": "path", - "name": "art_id", - "required": true, - "schema": { - "title": "Art Id", - "type": "string" - } - }, - { - "in": "header", - "name": "x-agentdrive-actor", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "X-Agentdrive-Actor" - } - }, - { - "in": "header", - "name": "if-match", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "If-Match" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ArtifactPatchIn" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ArtifactOut" - } - } - }, - "description": "Successful Response", - "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The labels or source metadata are invalid.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "No such live artifact exists in this drive.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "412": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request precondition did not match.", - "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Edit artifact metadata (labels / metadata / source)" - } - }, - "/v0/artifacts/{art_id}/copy": { - "post": { - "description": "Create a new artifact at `path` whose bytes are identical to the source artifact's. The copy reuses the source's CAS object (zero new storage) but gets a fresh `art_\u2026` ID, a fresh version 1, and \u2014 by default \u2014 `source.refs = [{type: 'artifact', id: ''}]` so provenance is preserved.\n\nQuota: the copy's `size_bytes` is added to the drive's `storage_bytes` even though physical bytes are shared.\n\nSource-version pin: pass `from_generation` in the body to require the source's current content generation (`version_number`) to equal it (\u2192 412 SOURCE_VERSION_MISMATCH); a concurrent source *metadata* edit does NOT fail the copy. Destination create-only: `If-None-Match: *` returns 412 CREATE_CONFLICT (instead of 409 PATH_CONFLICT) when the target path is occupied.\n\nReturns 409 PATH_CONFLICT if the target path is already taken; 413 STORAGE_QUOTA_EXCEEDED if the copy would push the drive over its limit.", - "operationId": "copy_artifact_route_v0_artifacts__art_id__copy_post", - "parameters": [ - { - "in": "path", - "name": "art_id", - "required": true, - "schema": { - "title": "Art Id", - "type": "string" - } - }, - { - "in": "header", - "name": "x-agentdrive-actor", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "X-Agentdrive-Actor" - } - }, - { - "in": "header", - "name": "if-none-match", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "If-None-Match" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CopyIn" - } - } - }, - "required": true - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ArtifactOut" - } - } - }, - "description": "Successful Response", - "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, - "Location": { - "description": "Canonical URL of the created resource.", - "schema": { - "format": "uri-reference", - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The destination path or source metadata is invalid.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The source artifact does not exist in this drive.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "409": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The destination path is already occupied.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "412": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request precondition did not match.", - "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "413": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The copy would exceed the drive storage limit.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Duplicate an artifact to a new path (CAS-shared, new ID)" - } - }, - "/v0/artifacts/{art_id}/download": { - "get": { - "operationId": "download_artifact_by_id_v0_artifacts__art_id__download_get", - "parameters": [ - { - "in": "path", - "name": "art_id", - "required": true, - "schema": { - "title": "Art Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/octet-stream": { - "schema": { - "format": "binary", - "type": "string" - } - } - }, - "description": "Raw artifact bytes.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "No live artifact with this ID exists.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Stream the artifact bytes by stable ID (never rendered HTML)" - } - }, - "/v0/artifacts/{art_id}/download-url": { - "get": { - "description": "Returns a URL for the artifact's bytes. For large artifacts (>= the signed-download threshold) when signing is available, it's a short-lived **signed GCS URL** the client fetches directly (`direct:true`, `expires_at` set); otherwise the **proxy** `/download` URL (`direct:false`). Treat the URL as opaque. large-download-design.md \u00a75.1.", - "operationId": "download_url_by_id_v0_artifacts__art_id__download_url_get", - "parameters": [ - { - "in": "path", - "name": "art_id", - "required": true, - "schema": { - "title": "Art Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DownloadUrlOut" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The artifact does not exist in this drive.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Signed direct-from-GCS download URL by stable ID" - } - }, - "/v0/artifacts/{art_id}/meta": { - "get": { - "operationId": "get_artifact_by_id_meta_v0_artifacts__art_id__meta_get", - "parameters": [ - { - "in": "path", - "name": "art_id", - "required": true, - "schema": { - "title": "Art Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ArtifactOut" - } - } - }, - "description": "Successful Response", - "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "304": { - "description": "The current entity tag or modification date matched.", - "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "No such artifact exists in this drive.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Artifact metadata by stable ID (same shape as path /meta)" - } - }, - "/v0/artifacts/{art_id}/move": { - "post": { - "description": "Canonical artifact move/rename, keyed by the stable `art_\u2026` ID (the artifact analogue of `POST /v0/folders/{fld_id}/move`). Moves the artifact to a new `path` on the same drive; ID, version history, source refs, labels, metadata, and the underlying CAS blob are all preserved \u2014 only `path` and `updated_at` change, and the move does NOT bump `version_number`.\n\nThe row UPDATE and the emitted `artifact.renamed` event commit in a SINGLE transaction \u2014 a failure leaves the artifact fully unchanged.\n\nReturns 409 PATH_CONFLICT if the target `path` is already taken; 404 ARTIFACT_NOT_FOUND for an unknown id; 403 WIKI_RESERVED for a `_wiki/` / `_compiled/` target. Honors `If-Match` (\u2192 412 PRECONDITION_FAILED). Use `X-AgentDrive-Actor` to attach attribution to the emitted `artifact.renamed` event.", - "operationId": "move_artifact_route_v0_artifacts__art_id__move_post", - "parameters": [ - { - "in": "path", - "name": "art_id", - "required": true, - "schema": { - "title": "Art Id", - "type": "string" - } - }, - { - "in": "header", - "name": "x-agentdrive-actor", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "X-Agentdrive-Actor" - } - }, - { - "in": "header", - "name": "if-match", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "If-Match" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ArtifactMoveIn" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ArtifactOut" - } - } - }, - "description": "Successful Response", - "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "No such artifact exists in this drive.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "409": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The destination path is already occupied.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "412": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request precondition did not match.", - "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Rename / move an artifact to a new path" - } - }, - "/v0/artifacts/{art_id}/restore": { - "post": { - "description": "Clear `deleted_at` + `purge_at` on a soft-deleted artifact. Available only while the artifact is in trash (i.e. before the GC cleanup cron purges it). Returns 404 if the artifact is live or already hard-deleted; 409 PATH_CONFLICT if its path is now occupied by another live artifact. The 409 payload includes a `restore_options` block with `rename_to` and `force_overwrite` URLs the caller can follow to resolve the conflict \u2014 see deletion-design.md \u00a75.4.", - "operationId": "restore_artifact_v0_artifacts__art_id__restore_post", - "parameters": [ - { - "in": "path", - "name": "art_id", - "required": true, - "schema": { - "title": "Art Id", - "type": "string" - } - }, - { - "description": "Restore at this path instead of the original. Soft-deletes the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. Mutually exclusive with `overwrite`.", - "in": "query", - "name": "rename", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "Restore at this path instead of the original. Soft-deletes the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. Mutually exclusive with `overwrite`.", - "title": "Rename" - } - }, - { - "description": "Soft-delete the live occupant at the original path and restore there. Audit `metadata.cause='restore_conflict_overwrite'`. Mutually exclusive with `rename`.", - "in": "query", - "name": "overwrite", - "required": false, - "schema": { - "default": false, - "description": "Soft-delete the live occupant at the original path and restore there. Audit `metadata.cause='restore_conflict_overwrite'`. Mutually exclusive with `rename`.", - "title": "Overwrite", - "type": "boolean" - } - }, - { - "in": "header", - "name": "x-agentdrive-actor", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "X-Agentdrive-Actor" - } - }, - { - "in": "header", - "name": "if-match", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "If-Match" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ArtifactOut" - } - } - }, - "description": "Successful Response", - "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "No restorable artifact exists with this ID.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "409": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The original or requested restore path is occupied.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "412": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request precondition did not match.", - "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Restore a soft-deleted artifact" - } - }, - "/v0/artifacts/{art_id}/versions": { - "get": { - "description": "Returns versions in descending `version_number` order. Cursor pagination via `?cursor=`; `next_cursor` is non-null when the page is full and more older versions may exist.", - "operationId": "list_artifact_versions_v0_artifacts__art_id__versions_get", - "parameters": [ - { - "in": "path", - "name": "art_id", - "required": true, - "schema": { - "title": "Art Id", - "type": "string" - } - }, - { - "in": "query", - "name": "cursor", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Cursor" - } - }, - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "default": 50, - "maximum": 100, - "minimum": 1, - "title": "Limit", - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VersionPage" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The pagination cursor is invalid.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The artifact does not exist in this drive.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "List versions of an artifact, newest first" - } - }, - "/v0/artifacts/{art_id}/versions/{version_number}": { - "get": { - "operationId": "get_artifact_version_v0_artifacts__art_id__versions__version_number__get", - "parameters": [ - { - "in": "path", - "name": "art_id", - "required": true, - "schema": { - "title": "Art Id", - "type": "string" - } - }, - { - "in": "path", - "name": "version_number", - "required": true, - "schema": { - "title": "Version Number", - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/VersionOut" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The artifact or version does not exist in this drive.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "410": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The requested version was pruned by retention.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Metadata for a specific version of an artifact" - } - }, - "/v0/artifacts/{art_id}/versions/{version_number}/download": { - "get": { - "operationId": "download_artifact_version_v0_artifacts__art_id__versions__version_number__download_get", - "parameters": [ - { - "in": "path", - "name": "art_id", - "required": true, - "schema": { - "title": "Art Id", - "type": "string" - } - }, - { - "in": "path", - "name": "version_number", - "required": true, - "schema": { - "title": "Version Number", - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/octet-stream": { - "schema": { - "format": "binary", - "type": "string" - } - } - }, - "description": "Raw artifact bytes.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The artifact or version does not exist.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "410": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The requested version has been pruned.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Stream bytes for a specific version (machine surface)" - } - }, - "/v0/artifacts/{art_id}/versions/{version_number}/download-url": { - "get": { - "description": "Same as `/{art_id}/download-url` but for a specific version's bytes (`direct:true` signed GCS URL when large + signing available, else the proxy `/versions/{n}/download` URL). large-download-design.md \u00a75.1.", - "operationId": "download_url_version_v0_artifacts__art_id__versions__version_number__download_url_get", - "parameters": [ - { - "in": "path", - "name": "art_id", - "required": true, - "schema": { - "title": "Art Id", - "type": "string" - } - }, - { - "in": "path", - "name": "version_number", - "required": true, - "schema": { - "title": "Version Number", - "type": "integer" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DownloadUrlOut" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The artifact or version does not exist in this drive.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "410": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The requested version was pruned by retention.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Signed direct-from-GCS download URL for a specific version" - } - }, - "/v0/artifacts/{art_id}/versions/{version_number}/restore": { - "post": { - "description": "Roll the artifact forward to the content of version `version_number` by creating a **new head version** with identical bytes. History is preserved \u2014 this never rewrites or deletes past versions. The prior version's content-addressed blob is reused, so no bytes are re-uploaded. A change summary of `Restored version N` is recorded on the new version; `X-AgentDrive-Actor` attributes it.\n\nRestoring a version whose content already matches the current head (including the head itself) is a **no-op**: it returns the current artifact unchanged, with no new version created.\n\nHonors `If-Match` on the current head (roll forward only if the head is unchanged \u2192 412 PRECONDITION_FAILED).\n\nErrors: `404 ARTIFACT_NOT_FOUND`, `404 VERSION_NOT_FOUND`, and `410 VERSION_PRUNED` when the version existed but its bytes were retained out of existence.", - "operationId": "restore_artifact_version_v0_artifacts__art_id__versions__version_number__restore_post", - "parameters": [ - { - "in": "path", - "name": "art_id", - "required": true, - "schema": { - "title": "Art Id", - "type": "string" - } - }, - { - "in": "path", - "name": "version_number", - "required": true, - "schema": { - "title": "Version Number", - "type": "integer" - } - }, - { - "in": "header", - "name": "x-agentdrive-actor", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "X-Agentdrive-Actor" - } - }, - { - "in": "header", - "name": "if-match", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "If-Match" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ArtifactOut" - } - } - }, - "description": "Successful Response", - "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The artifact or version does not exist in this drive.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "410": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The requested version was pruned by retention.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "412": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request precondition did not match.", - "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Restore a previous version as a new head version" - } - }, - "/v0/artifacts/{path}": { - "delete": { - "description": "Soft-delete the artifact at the given path.\n\nA delete WITHOUT an `If-Match` precondition is last-writer-wins and will\nsilently remove a concurrently-modified artifact.", - "operationId": "delete_artifact_v0_artifacts__path__delete", - "parameters": [ - { - "in": "path", - "name": "path", - "required": true, - "schema": { - "title": "Path", - "type": "string" - } - }, - { - "in": "header", - "name": "if-match", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "If-Match" - } - }, - { - "in": "header", - "name": "x-agentdrive-actor", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "X-Agentdrive-Actor" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ArtifactDeleteOut" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "No such live artifact exists in this drive.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "412": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request precondition did not match.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Delete Artifact" - }, - "put": { - "description": "Upload an artifact at the given path. The path is treated as the artifact's location in the drive \u2014 re-uploading the same path overwrites in place (idempotent). Returns 201 when the artifact is created (no prior live artifact at the path), 200 on overwrite \u2014 mirroring `PUT /v0/folders/{path}`.\n\n**Limits:** request body must not exceed **50 MB**. Path must be non-empty, \u2264256 chars, only `[A-Za-z0-9_./-]`, no `..` segments, no leading/trailing slash. Per-token write rate limit: 100/hour.\n\n**Optional headers.** Each preserves the existing artifact's value when omitted on an overwrite, and takes the create-default on a new path; send the header to replace it:\n- `X-AgentDrive-Labels`: comma-separated labels (e.g. `draft,report`); an empty value clears them. Each: lowercase `[a-z0-9_-]+`, \u226464 chars; \u226416 labels per artifact.\n- `X-AgentDrive-Metadata`: JSON object of agent-attached fields.\n- `X-AgentDrive-Source`: JSON `{\"refs\": [...]}` source provenance (present, including `{\"refs\": []}`, replaces).\n- `X-AgentDrive-Actor`: caller-supplied actor name (\u226464 chars) for event-log attribution. Untrusted; never used for authz.\n\n**Preconditions.** `If-Match: \"..\"` makes the write conditional on the current composite ETag (\u2192 412 PRECONDITION_FAILED). `If-None-Match: *` is create-only: it succeeds only if no live artifact occupies the path (\u2192 412 CREATE_CONFLICT if one does). The two are mutually exclusive (\u2192 400 BAD_PRECONDITION).\n\n**Integrity (optional).** `X-AgentDrive-Checksum: :` (`sha256:` or `crc32c:`) or the standard `Content-MD5` (base64 MD5) is verified against the received bytes before they land (\u2192 400 CHECKSUM_MISMATCH on mismatch); no artifact is created on failure.", - "operationId": "put_artifact_v0_artifacts__path__put", - "parameters": [ - { - "in": "path", - "name": "path", - "required": true, - "schema": { - "title": "Path", - "type": "string" - } - }, - { - "in": "header", - "name": "content-type", - "required": false, - "schema": { - "default": "application/octet-stream", - "title": "Content-Type", - "type": "string" - } - }, - { - "in": "header", - "name": "x-agentdrive-labels", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "X-Agentdrive-Labels" - } - }, - { - "in": "header", - "name": "x-agentdrive-metadata", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "X-Agentdrive-Metadata" - } - }, - { - "in": "header", - "name": "x-agentdrive-source", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "X-Agentdrive-Source" - } - }, - { - "in": "header", - "name": "x-agentdrive-actor", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "X-Agentdrive-Actor" - } - }, - { - "in": "header", - "name": "x-agentdrive-change-summary", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "X-Agentdrive-Change-Summary" - } - }, - { - "in": "header", - "name": "x-agentdrive-checksum", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "X-Agentdrive-Checksum" - } - }, - { - "in": "header", - "name": "content-md5", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Content-Md5" - } - }, - { - "in": "header", - "name": "if-match", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "If-Match" - } - }, - { - "in": "header", - "name": "if-none-match", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "If-None-Match" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ArtifactOut" - } - } - }, - "description": "Successful Response", - "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ArtifactOut" - } - } - }, - "description": "Artifact created at a previously unused path.", - "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, - "Location": { - "description": "Canonical URL of the created resource.", - "schema": { - "format": "uri-reference", - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The path, metadata, source, or conditional headers are invalid.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "409": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The path is occupied and overwrite semantics do not permit replacement.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "412": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request precondition did not match.", - "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "413": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The artifact or resulting drive storage exceeds its limit.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Upload (or overwrite) an artifact" - } - }, - "/v0/artifacts/{path}/download": { - "get": { - "description": "Same bytes-only machine surface as `/{art_id}/download` but resolves the artifact by path, so callers don't have to resolve path\u2192id first. Applies the identical CSP `sandbox` + `nosniff` posture (never serves HTML inline as active content).", - "operationId": "download_artifact_by_path_v0_artifacts__path__download_get", - "parameters": [ - { - "in": "path", - "name": "path", - "required": true, - "schema": { - "title": "Path", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/octet-stream": { - "schema": { - "format": "binary", - "type": "string" - } - } - }, - "description": "Raw artifact bytes.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "No live artifact exists at this path.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Stream the artifact bytes by path (never rendered HTML)" - } - }, - "/v0/artifacts/{path}/download-url": { - "get": { - "description": "Same as `/{art_id}/download-url` but resolves the artifact by path. The returned proxy URL (when `direct:false`) still points at the by-id `/download` endpoint. large-download-design.md \u00a75.1.", - "operationId": "download_url_by_path_v0_artifacts__path__download_url_get", - "parameters": [ - { - "in": "path", - "name": "path", - "required": true, - "schema": { - "title": "Path", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DownloadUrlOut" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The artifact does not exist in this drive.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Signed direct-from-GCS download URL by path" - } - }, - "/v0/artifacts/{path}/meta": { - "get": { - "operationId": "get_artifact_meta_v0_artifacts__path__meta_get", - "parameters": [ - { - "in": "path", - "name": "path", - "required": true, - "schema": { - "title": "Path", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ArtifactOut" - } - } - }, - "description": "Successful Response", - "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "304": { - "description": "The current entity tag or modification date matched.", - "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The artifact does not exist in this drive.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Get Artifact Meta" - } - }, - "/v0/auth/extension/exchange": { - "post": { - "description": "Single-use opaque ticket \u2192 JWT pair. Called once by an extension's auth-complete.html after the OAuth handoff lands. Returns a 15-minute `access_token` (scope=extension) and a 90-day `identity_assertion` the extension stores and refreshes via POST /oauth2/token.", - "operationId": "extension_exchange_v0_auth_extension_exchange_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExtensionExchangeRequest" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExtensionExchangeResponse" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The extension ID or ticket is invalid.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Too many extension sign-in attempts.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0.0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "503": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Extension authentication or token signing is unavailable.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "summary": "Redeem an extension OAuth ticket for a JWT pair", - "tags": [ - "agent-auth" - ] - } - }, - "/v0/drives": { - "get": { - "description": "Returns drive **metadata** (workspaces-design \u00a74.2): an **admin** sees the whole active workspace's drive inventory (every owner); a **member** sees only the drives they own. Metadata only \u2014 owner, size, timestamps \u2014 never a raw API key, and never an authorization to read a drive's contents. A `read`-scope token may call this; mutations require `full`.\n\n**Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected.", - "operationId": "list_drives_route_v0_drives_get", - "parameters": [ - { - "in": "query", - "name": "cursor", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Cursor" - } - }, - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DriveList" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "List the drives you can see", - "tags": [ - "drives" - ] - }, - "post": { - "description": "Create a named drive. Any **member** of the space may create one; the creator becomes its **owner**. Requires a `full`-scope user token. The response carries the drive's `ad_live_` API key **once** (`api_key`) \u2014 store it now, it is never returned again (mint more keys via `POST /v0/drives/{id}/keys`).\n\nThe target workspace is the user's active organization (`users.default_org`); cross-workspace creation names no other workspace in v0.\n\nA space may hold up to its plan's drive limit (workspaces-v2 \u00a74.6; seat-aware for shared drives). A caller at the limit is blocked with `403 DRIVE_LIMIT_REACHED`; the limit is tier-governed, not a hard cap.", - "operationId": "create_drive_route_v0_drives_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DriveCreateIn" - } - } - }, - "required": true - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DriveCreateOut" - } - } - }, - "description": "Successful Response", - "headers": { - "Location": { - "description": "Canonical URL of the created resource.", - "schema": { - "format": "uri-reference", - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Create a drive in your active space", - "tags": [ - "drives" - ] - } - }, - "/v0/drives/me": { - "get": { - "description": "Drive overview for the authenticated bearer token.\n\nWire-protocol preservation (WorkOS integration \u00a76): the `email` field\nis preserved in the response shape; its meaning is now \"the drive's\nowner's email\" (via `drives.owner_user_id` \u2192 `users.email`, joined\nin `auth.resolve_drive`). For solo signups this equals v0 behavior \u2014\nthe email the user signed up with. Returns null if the owner has\nbeen hard-purged. `organization_id` is a new additive field, as are\n`metageneration` / `etag` (also emitted as the `ETag` header).", - "operationId": "me_v0_drives_me_get", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DriveReadOut" - } - } - }, - "description": "Successful Response", - "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0.0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Me" - } - }, - "/v0/drives/me/usage": { - "get": { - "description": "Unified view of every metered dimension: storage (snapshot), writes (current hour), indexing ops + retrieval queries (current calendar month UTC). Each row carries `used` and `limit`; `limit: 0` means unlimited (the v0 free-tier default for the two monthly counters). Reads are de-throttled \u2014 there is no hourly read budget; the monthly read count appears under `ops_this_month.reads`.", - "operationId": "me_usage_v0_drives_me_usage_get", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DriveUsageOut" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0.0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Current-period usage + caps for the authenticated drive" - } - }, - "/v0/drives/{drive_id}": { - "delete": { - "description": "Mark the drive for cleanup. All tenant data (artifacts, versions, wiki, embeddings, events) is hidden via the `live_*` views and CASCADE-removed by the GC cleanup cron at `purge_at`. Restore via `POST /v0/drives/{id}/restore` while the row is still in trash. The path-param `drive_id` MUST match the authenticated drive.\n\nAccepts either an `ad_live_` per-drive key (deletes that key's drive) or an `ad_user_` user token selecting an owned drive (workspaces-design \u00a75.3); a `read`-scope user token is rejected with 403 `INSUFFICIENT_SCOPE`. **Guard (\u00a78):** a workspace must retain at least one live drive \u2014 deleting the workspace's last live drive returns 409 `LAST_DRIVE`.\n\n**Explicit confirmation required:** pass `?confirm=DELETE` or the request is rejected with 400 `CONFIRM_REQUIRED`. Tenant-level deletion is the largest-blast-radius operation on the API; the static token forces a deliberate act (soft-delete still gives a restore window on top).\n\n**Optimistic concurrency:** send `If-Match` with the drive's composite ETag (`\".0.\"`, from a drive read) to make the delete conditional \u2014 a stale token returns 412 PRECONDITION_FAILED. A delete WITHOUT an `If-Match` precondition is last-writer-wins and will silently trash a concurrently-modified drive.", - "operationId": "delete_drive_route_v0_drives__drive_id__delete", - "parameters": [ - { - "in": "path", - "name": "drive_id", - "required": true, - "schema": { - "title": "Drive Id", - "type": "string" - } - }, - { - "in": "query", - "name": "confirm", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Confirm" - } - }, - { - "in": "header", - "name": "x-agentdrive-actor", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "X-Agentdrive-Actor" - } - }, - { - "in": "header", - "name": "if-match", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "If-Match" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DriveDeleteOut" - } - } - }, - "description": "Successful Response", - "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The explicit DELETE confirmation is missing.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "No such drive exists for this principal.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "409": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The workspace must retain at least one live drive.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "412": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request precondition did not match.", - "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Soft-delete a drive" - }, - "get": { - "description": "Identical to `GET /v0/drives/me` \u2014 the by-id singleton so `Location`-style URLs and scripted clients can address the drive canonically. The path-param `drive_id` MUST match the authenticated drive (mirrors the delete/trash routes' no-leak 404). Emits the drive's composite `ETag` header (`\".0.\"`).", - "operationId": "get_drive_route_v0_drives__drive_id__get", - "parameters": [ - { - "in": "path", - "name": "drive_id", - "required": true, - "schema": { - "title": "Drive Id", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DriveReadOut" - } - } - }, - "description": "Successful Response", - "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "No matching authenticated drive exists.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Drive overview by id (same shape as /drives/me)" - }, - "patch": { - "description": "Rename a drive. **Owner only** \u2014 a drive id that isn't yours returns 404 (no-leak). Requires a `full`-scope user token.", - "operationId": "rename_drive_route_v0_drives__drive_id__patch", - "parameters": [ - { - "in": "path", - "name": "drive_id", - "required": true, - "schema": { - "title": "Drive Id", - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DriveRenameIn" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DriveOut" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The drive update is invalid.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "No such drive exists for this principal.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "409": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The drive update conflicts with current workspace state.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Rename a drive you own", - "tags": [ - "drives" - ] - } - }, - "/v0/drives/{drive_id}/keys": { - "get": { - "description": "List the `ad_live_` keys for a drive you manage (oldest first, including recently-revoked rows \u2014 filter on `revoked_at` for live only). **Manager only** (404 no-leak otherwise). A `read`-scope user token may list (metadata reveals no secret), mirroring `GET /v0/drives`. Metadata only \u2014 the raw key is never returned after mint.\n\n**Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected.", - "operationId": "list_drive_keys_route_v0_drives__drive_id__keys_get", - "parameters": [ - { - "in": "path", - "name": "drive_id", - "required": true, - "schema": { - "title": "Drive Id", - "type": "string" - } - }, - { - "in": "query", - "name": "cursor", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Cursor" - } - }, - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DriveApiKeyListOut" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The drive does not exist for this user.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "List a drive's API keys", - "tags": [ - "drives" - ] - }, - "post": { - "description": "Mint a new `ad_live_` key for a drive you manage \u2014 a drive may hold several (one per agent/integration). A `label` (a name for the key) is **required**. **Manager only** (404 no-leak otherwise), `full`-scope user token. The raw key is returned **once** \u2014 store it now.", - "operationId": "create_drive_key_route_v0_drives__drive_id__keys_post", - "parameters": [ - { - "in": "path", - "name": "drive_id", - "required": true, - "schema": { - "title": "Drive Id", - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DriveApiKeyCreateIn" - } - } - }, - "required": true - }, - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DriveApiKeyCreateOut" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The key label or scope is invalid.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The drive does not exist for this user.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { + } + }, + "securitySchemes": { + "bearerAuth": { + "bearerFormat": "JWT", + "description": "Hub-issued bearer token. Scopes: drives:*, content:*, sharing:*, changes:read, usage:read. See the OAuth-protected-resource discovery document (RFC 9728).", + "scheme": "bearer", + "type": "http" + } + } + }, + "info": { + "description": "AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match.", + "title": "AgentDrive", + "version": "" + }, + "openapi": "3.1.0", + "paths": { + "/.well-known/oauth-protected-resource": { + "get": { + "description": "Names the reset v0 surface as a protected resource and points clients at Hub \u2014 the only authorization server whose product tokens this deployment accepts.", + "operationId": "oauth_protected_resource", + "responses": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "additionalProperties": true, + "title": "Response Oauth Protected Resource", + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } + "description": "Successful Response" } }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Create a drive API key", + "summary": "Protected-resource metadata (RFC 9728)", "tags": [ - "drives" + "discovery" ] } }, - "/v0/drives/{drive_id}/keys/{key_id}/revoke": { - "post": { - "description": "Revoke one `ad_live_` key of a drive you manage \u2014 anything using it loses access immediately. **Manager only** (404 no-leak otherwise), `full`-scope user token. Idempotent: revoking an unknown/already-revoked key returns 204 too (no existence oracle).", - "operationId": "revoke_drive_key_route_v0_drives__drive_id__keys__key_id__revoke_post", - "parameters": [ - { - "in": "path", - "name": "drive_id", - "required": true, - "schema": { - "title": "Drive Id", - "type": "string" - } - }, - { - "in": "path", - "name": "key_id", - "required": true, - "schema": { - "title": "Key Id", - "type": "string" - } - } - ], + "/health": { + "get": { + "description": "Liveness + DB-reachability probe. Used by Cloud Run / k8s healthchecks\nand any uptime monitor. Returns 200 only if the DB pool can serve a\ntrivial query; 503 otherwise so the orchestrator can pull the instance\nout of rotation.\n\nNOTE: route is `/health`, NOT `/healthz`. Google's edge infrastructure\nintercepts `/healthz` (legacy kubernetes-reserved path) and returns a\ngeneric 404 before traffic reaches Cloud Run \u2014 discovered the hard way\nduring the first prod deploy. Don't rename back.", + "operationId": "health", "responses": { - "204": { - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The drive or key does not exist for this user.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "$ref": "#/components/schemas/HealthOut" } } }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } + "description": "Successful Response" }, - "429": { + "503": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "$ref": "#/components/schemas/HealthDegradedResponse" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } + "description": "The database reachability probe failed." } }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Revoke a drive API key", - "tags": [ - "drives" - ] + "summary": "Health" } }, - "/v0/drives/{drive_id}/keys/{key_id}/rotate": { - "post": { - "description": "Rotate a single `ad_live_` key: revoke `key_id` and mint a replacement that inherits its label. **Only that key** is affected \u2014 the drive's other keys keep working. **Manager only** (404 no-leak otherwise), `full`-scope user token. The new key is returned **once** \u2014 store it now. A `key_id` that isn't a live key of this drive is a 404.", - "operationId": "rotate_one_key_route_v0_drives__drive_id__keys__key_id__rotate_post", + "/s/{share_key}": { + "get": { + "description": "The un-slashed form. Browsers are canonicalized onto `/s/{key}/`.\n\nThis inherits the published `shares_redeem` operation id from the route it\nreplaced, because for an API client it *is* that operation, unchanged:\nsame URL, same JSON `Accept`, same bytes, same uniform 404. Only the\nbrowser arm is new. Dropping it from the spec would have described the\nroute as gone while it kept answering.\n\nThe page links its own sub-resources relatively (`content`), and relative\nresolution replaces the last path segment: from `/s/KEY` that reaches\n`/s/content`, from `/s/KEY/` it reaches `/s/KEY/content`. The trailing\nslash is what makes an image on a share page load at all. Links already in\nthe wild have no slash, so this redirect is how they keep working.\n\nIt is unconditional and runs before any lookup \u2014 redirecting only for keys\nthat resolve would turn the status code into an existence oracle and undo\nthe anti-enumeration property the rest of this module maintains.\n\nOnly browsers are moved. JSON and byte clients are answered in place, so\nthe shipped v0 contract for this URL is unchanged, redirect included.", + "operationId": "shares_redeem", "parameters": [ { "in": "path", - "name": "drive_id", - "required": true, - "schema": { - "title": "Drive Id", - "type": "string" - } - }, - { - "in": "path", - "name": "key_id", + "name": "share_key", "required": true, "schema": { - "title": "Key Id", + "title": "Share Key", "type": "string" } } @@ -12543,80 +1960,10 @@ "200": { "content": { "application/json": { - "schema": { - "$ref": "#/components/schemas/DriveApiKeyCreateOut" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } + "schema": {} } }, - "description": "The drive or key does not exist for this user.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } + "description": "Successful Response" }, "422": { "content": { @@ -12635,61 +1982,48 @@ } } } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } } }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Rotate one API key", + "summary": "Redeem Share", "tags": [ - "drives" + "shares-redemption" ] } }, - "/v0/drives/{drive_id}/restore": { - "post": { - "description": "Clear `deleted_at` + `purge_at` on a soft-deleted drive. Soft-deleted child artifacts get their retention window rebased to the drive-restore moment (see deletion-design.md \u00a75.2). Available only while the drive is in trash. Returns 404 if the drive is live or already hard-deleted.\n\n**Optimistic concurrency:** send `If-Match` with the trashed drive's composite ETag (`\".0.\"`, e.g. from the delete response's `ETag` header) to make the restore conditional \u2014 a stale token returns 412 PRECONDITION_FAILED. A restore WITHOUT an `If-Match` precondition is last-writer-wins.", - "operationId": "restore_drive_route_v0_drives__drive_id__restore_post", + "/v0/drives": { + "get": { + "description": "List the actor's workspace drives, newest-first (keyset paginated).\n\n``lifecycle`` (active|deleted|all) exposes soft-deleted drives so a\nmanager can read the post-delete revision as the If-Match source for a\nrestore. Unknown query parameters are rejected (\u00a76.3).", + "operationId": "drives_list", "parameters": [ { - "in": "path", - "name": "drive_id", - "required": true, + "in": "query", + "name": "lifecycle", + "required": false, "schema": { - "title": "Drive Id", + "default": "active", + "title": "Lifecycle", "type": "string" } }, { - "in": "header", - "name": "x-agentdrive-actor", + "in": "query", + "name": "limit", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Limit" + } + }, + { + "in": "query", + "name": "cursor", "required": false, "schema": { "anyOf": [ @@ -12700,12 +2034,12 @@ "type": "null" } ], - "title": "X-Agentdrive-Actor" + "title": "Cursor" } }, { "in": "header", - "name": "if-match", + "name": "authorization", "required": false, "schema": { "anyOf": [ @@ -12716,7 +2050,7 @@ "type": "null" } ], - "title": "If-Match" + "title": "Authorization" } } ], @@ -12725,18 +2059,12 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DriveRestoreOut" + "$ref": "#/components/schemas/DriveListOut" } } }, "description": "Successful Response", "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -12745,22 +2073,42 @@ } } }, - "401": { + "400": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -12769,16 +2117,48 @@ } } }, - "403": { + "401": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Missing or invalid bearer token.", "headers": { + "WWW-Authenticate": { + "description": "RFC 6750 bearer authentication challenge.", + "schema": { + "type": "string" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -12787,15 +2167,41 @@ } } }, - "404": { + "403": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The drive does not exist or is not in trash.", + "description": "Token lacks a required scope.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -12805,15 +2211,41 @@ } } }, - "409": { + "404": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The drive cannot be restored into its current workspace state.", + "description": "The resource was not found or is not visible to the caller.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -12823,22 +2255,16 @@ } } }, - "412": { + "422": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "$ref": "#/components/schemas/ValidationErrorResponse" } } }, - "description": "If-Match does not match the current drive.", + "description": "Request validation failed.", "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -12847,16 +2273,49 @@ } } }, - "422": { + "429": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Request validation failed.", + "description": "Rate limited.", "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -12865,15 +2324,41 @@ } } }, - "429": { + "503": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -12893,30 +2378,22 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Restore a soft-deleted drive" - } - }, - "/v0/drives/{drive_id}/trash": { - "get": { - "description": "Returns soft-deleted artifacts on the drive plus the drive's own soft-delete state (if applicable). The path-param `drive_id` MUST match the authenticated drive.\n\n**Compatibility window:** `limit` or `cursor` opts into cursor pagination. Unadorned requests retain the legacy complete result during the migration window. Paginated requests are clamped to 1\u2013100 items (default 50 when only `cursor` is supplied). `items` is canonical; `artifacts` is a deprecated same-value alias.", - "operationId": "list_trash_route_v0_drives__drive_id__trash_get", + "summary": "List Drives", + "tags": [ + "drives" + ] + }, + "post": { + "description": "Create a drive with its structural root folder and creator-manager\ngrant(s) in one transaction; idempotent under the ``Idempotency-Key``.", + "operationId": "drives_create", "parameters": [ { - "in": "path", - "name": "drive_id", + "in": "header", + "name": "Idempotency-Key", "required": true, - "schema": { - "title": "Drive Id", - "type": "string" - } - }, - { - "in": "query", - "name": "cursor", - "required": false, "schema": { "anyOf": [ { @@ -12926,37 +2403,60 @@ "type": "null" } ], - "title": "Cursor" + "title": "Idempotency-Key" } }, { - "in": "query", - "name": "limit", + "in": "header", + "name": "authorization", "required": false, "schema": { "anyOf": [ { - "type": "integer" + "type": "string" }, { "type": "null" } ], - "title": "Limit" + "title": "Authorization" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DriveCreateIn" + } + } + }, + "required": true + }, "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/TrashOut" + "$ref": "#/components/schemas/DriveOut" } } }, "description": "Successful Response", "headers": { + "ETag": { + "description": "Current strong entity tag.", + "schema": { + "type": "string" + } + }, + "Location": { + "description": "Canonical URL of the created resource.", + "schema": { + "format": "uri-reference", + "type": "string" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -12969,11 +2469,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The cursor is malformed (`BAD_CURSOR`).", + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -12987,11 +2513,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "Missing or invalid bearer token.", "headers": { "WWW-Authenticate": { "description": "RFC 6750 bearer authentication challenge.", @@ -13011,11 +2563,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Token lacks a required scope.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -13029,12 +2607,132 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "The parent or target resource was not found or is not visible.", + "headers": { + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "409": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "A sibling already occupies the name/path, or the idempotency key was reused for a different request.", + "headers": { + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "412": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "No matching authenticated drive exists.", + "description": "If-Match did not match (copy/restore preconditions).", "headers": { + "ETag": { + "description": "Current strong entity tag.", + "schema": { + "type": "string" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -13061,15 +2759,136 @@ } } }, - "429": { + "428": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "If-Match is required for this mutation.", + "headers": { + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "429": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "Rate limited.", + "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "503": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -13089,86 +2908,64 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "List the authenticated drive's trash" + "summary": "Create Drive", + "tags": [ + "drives" + ] } }, - "/v0/events": { - "get": { - "description": "Returns events newest-first. Filters compose with AND.\n\n**Cursor pagination:** pass the oldest event's `created_at` from the previous page as `before` to fetch the next page back in time. Combine `since` + `before` to bound a window.", - "operationId": "list_events_route_v0_events_get", + "/v0/drives/{drive_id}": { + "delete": { + "description": "Soft-delete a drive. Returns 200 with the deleted representation so the\nclient has the post-delete revision/ETag for a restore.", + "operationId": "drives_delete", "parameters": [ { - "in": "query", - "name": "art_id", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Art Id" - } - }, - { - "in": "query", - "name": "action", - "required": false, + "in": "path", + "name": "drive_id", + "required": true, "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Action" + "title": "Drive Id", + "type": "string" } }, { - "in": "query", - "name": "since", - "required": false, + "in": "header", + "name": "Idempotency-Key", + "required": true, "schema": { "anyOf": [ { - "format": "date-time", "type": "string" }, { "type": "null" } ], - "title": "Since" + "title": "Idempotency-Key" } }, { - "in": "query", - "name": "before", - "required": false, + "in": "header", + "name": "If-Match", + "required": true, "schema": { "anyOf": [ { - "format": "date-time", "type": "string" }, { "type": "null" } ], - "title": "Before" + "title": "If-Match" } }, { - "in": "query", - "name": "cursor", + "in": "header", + "name": "authorization", "required": false, "schema": { "anyOf": [ @@ -13179,19 +2976,7 @@ "type": "null" } ], - "title": "Cursor" - } - }, - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "default": 50, - "maximum": 200, - "minimum": 1, - "title": "Limit", - "type": "integer" + "title": "Authorization" } } ], @@ -13200,12 +2985,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/EventPage" + "$ref": "#/components/schemas/DriveOut" } } }, "description": "Successful Response", "headers": { + "ETag": { + "description": "Current strong entity tag.", + "schema": { + "type": "string" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -13218,11 +3009,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The pagination cursor is invalid.", + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -13236,11 +3053,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "Missing or invalid bearer token.", "headers": { "WWW-Authenticate": { "description": "RFC 6750 bearer authentication challenge.", @@ -13260,11 +3103,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Token lacks a required scope.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -13274,15 +3143,41 @@ } } }, - "422": { + "404": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Request validation failed.", + "description": "The resource was not found or is not visible to the caller.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -13292,23 +3187,42 @@ } } }, - "429": { + "409": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "The mutation conflicts with current state (name/path, lifecycle).", "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -13316,35 +3230,46 @@ } } } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Read the append-only event log for the authenticated drive" - } - }, - "/v0/feedback": { - "post": { - "description": "File feedback. Body: `{kind, title, body, contact?,\nattachments?: [art_id, ...]}` \u2014 attachments are snapshotted from\nthis drive's artifacts at submit time.", - "operationId": "post_feedback_v0_feedback_post", - "responses": { - "201": { + }, + "412": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FeedbackCreateOut" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Successful Response", + "description": "If-Match did not match the resource's current revision.", "headers": { - "Location": { - "description": "Canonical URL of the created resource.", + "ETag": { + "description": "Current strong entity tag.", "schema": { - "format": "uri-reference", "type": "string" } }, @@ -13356,15 +3281,15 @@ } } }, - "400": { + "422": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "$ref": "#/components/schemas/ValidationErrorResponse" } } }, - "description": "The feedback body or attachment list is invalid.", + "description": "Request validation failed.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -13374,22 +3299,42 @@ } } }, - "401": { + "428": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "If-Match is required for this mutation.", "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -13398,16 +3343,49 @@ } } }, - "403": { + "429": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Rate limited.", "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -13416,16 +3394,49 @@ } } }, - "404": { + "503": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "An attached artifact does not exist in this drive.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -13433,17 +3444,81 @@ } } } + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Delete Drive", + "tags": [ + "drives" + ] + }, + "get": { + "description": "Read one active drive. ETag = quoted revision; matching\n``If-None-Match`` \u2192 304. Deleted and cross-workspace drives are 404.", + "operationId": "drives_read", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "schema": { + "title": "Drive Id", + "type": "string" + } }, - "422": { + { + "in": "header", + "name": "If-None-Match", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "If-None-Match" + } + }, + { + "in": "header", + "name": "authorization", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization" + } + } + ], + "responses": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "$ref": "#/components/schemas/DriveOut" } } }, - "description": "Request validation failed.", + "description": "Successful Response", "headers": { + "ETag": { + "description": "Current strong entity tag.", + "schema": { + "type": "string" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -13452,21 +3527,13 @@ } } }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", + "304": { + "description": "If-None-Match matched the current ETag.", "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", + "ETag": { + "description": "Current strong entity tag.", "schema": { - "minimum": 0.0, - "type": "integer" + "type": "string" } }, "X-Request-Id": { @@ -13476,42 +3543,42 @@ } } } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Post Feedback", - "x-stability-level": "beta" - } - }, - "/v0/feedback/{fbk_id}": { - "get": { - "description": "Lifecycle status of feedback THIS drive filed. Foreign tickets\nread as 404 \u2014 indistinguishable from absent.", - "operationId": "get_feedback_status_v0_feedback__fbk_id__get", - "parameters": [ - { - "in": "path", - "name": "fbk_id", - "required": true, - "schema": { - "title": "Fbk Id", - "type": "string" - } - } - ], - "responses": { - "200": { + }, + "400": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FeedbackStatusOut" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Successful Response", + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -13525,11 +3592,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "Missing or invalid bearer token.", "headers": { "WWW-Authenticate": { "description": "RFC 6750 bearer authentication challenge.", @@ -13549,11 +3642,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Token lacks a required scope.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -13567,11 +3686,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The feedback ticket does not exist in this drive.", + "description": "The resource was not found or is not visible to the caller.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -13603,11 +3748,88 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "Rate limited.", + "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "503": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -13627,77 +3849,31 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Get Feedback Status", - "x-stability-level": "beta" - } - }, - "/v0/find": { - "get": { - "description": "Passage-level chunk RAG over `embed_chunks`. Lexical (`chunk_tsv`, GIN) + semantic (HNSW over `embedding`) are run in parallel and fused via Reciprocal Rank Fusion (k=60). Unlike `/v0/search`, which only sees the first ~16 KB preview of each artifact, `/v0/find` reaches the full file body.\n\n**Modes:**\n- `hybrid` (default) \u2014 lexical + semantic, RRF-fused.\n- `lexical` \u2014 `chunk_tsv` only. Best for exact tokens, identifiers, code snippets.\n- `semantic` \u2014 embedding only. Best for conceptual queries where the surface terms differ from the query phrasing.\n\n**Granularity:** results are passages, not files. A long document with multiple matching regions returns multiple hits with distinct `ord` values; consecutive `ord`s overlap by ~400 tokens. Dedupe by `art_id` if you want one row per file.\n\n**Span citations:** `char_start`/`char_end` for text & code, `page_start`/`page_end` for PDFs, `time_start_ms`/`time_end_ms` for audio & video. Only the modality-relevant pair is populated.\n\n**Filters:** `label`, `file_type`, `prefix`, `modality` (repeatable), `updated_after` / `updated_before` (RFC 3339 timestamps, inclusive bounds on `updated_at`, applied to both legs).\n\n**Wiki coverage:** `/v0/find` excludes `_wiki/` paths by default and \u2014 importantly \u2014 does NOT cover them even when the caller passes `prefix=_wiki/...`. Wiki pages are not embedded by the pipeline (they're system-generated output, not user input), so `embed_chunks` has no rows for them and the join returns empty. Use `wiki_search` (or `list`/`grep` with a `_wiki/` prefix) for the wiki layer.\n\n**Embedding availability:** when `GEMINI_API_KEY` is not configured, `mode=semantic` returns 503; `mode=hybrid` logs a warning and falls back to lexical-only; `mode=lexical` is unaffected.", - "operationId": "find_v0_find_get", + "summary": "Read Drive", + "tags": [ + "drives" + ] + }, + "patch": { + "description": "Rename / update a drive's metadata. Requires ``Idempotency-Key`` and\n``If-Match`` (428 absent, 412 stale); bumps the revision.", + "operationId": "drives_update", "parameters": [ { - "in": "query", - "name": "q", + "in": "path", + "name": "drive_id", "required": true, "schema": { - "maxLength": 500, - "minLength": 1, - "title": "Q", - "type": "string" - } - }, - { - "in": "query", - "name": "mode", - "required": false, - "schema": { - "default": "hybrid", - "enum": [ - "hybrid", - "lexical", - "semantic" - ], - "title": "Mode", + "title": "Drive Id", "type": "string" } }, { - "in": "query", - "name": "label", - "required": false, - "schema": { - "default": [], - "items": { - "type": "string" - }, - "title": "Label", - "type": "array" - } - }, - { - "in": "query", - "name": "file_type", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "File Type" - } - }, - { - "in": "query", - "name": "prefix", - "required": false, + "in": "header", + "name": "Idempotency-Key", + "required": true, "schema": { "anyOf": [ { @@ -13707,100 +3883,65 @@ "type": "null" } ], - "title": "Prefix" - } - }, - { - "in": "query", - "name": "modality", - "required": false, - "schema": { - "default": [], - "items": { - "type": "string" - }, - "title": "Modality", - "type": "array" + "title": "Idempotency-Key" } }, { - "in": "query", - "name": "updated_after", - "required": false, + "in": "header", + "name": "If-Match", + "required": true, "schema": { "anyOf": [ { - "format": "date-time", "type": "string" }, { "type": "null" } ], - "title": "Updated After" + "title": "If-Match" } }, { - "in": "query", - "name": "updated_before", + "in": "header", + "name": "authorization", "required": false, "schema": { "anyOf": [ { - "format": "date-time", "type": "string" }, { "type": "null" } ], - "title": "Updated Before" - } - }, - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "default": 20, - "maximum": 100, - "minimum": 1, - "title": "Limit", - "type": "integer" + "title": "Authorization" } } ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FindPage" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DriveUpdateIn" } } }, - "401": { + "required": true + }, + "responses": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "$ref": "#/components/schemas/DriveOut" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "Successful Response", "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", + "ETag": { + "description": "Current strong entity tag.", "schema": { "type": "string" } @@ -13813,15 +3954,41 @@ } } }, - "403": { + "400": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -13831,40 +3998,47 @@ } } }, - "422": { + "401": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Request validation failed.", + "description": "Missing or invalid bearer token.", "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", + "WWW-Authenticate": { + "description": "RFC 6750 bearer authentication challenge.", "schema": { "type": "string" } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } }, "X-Request-Id": { "description": "Request correlation identifier.", @@ -13874,15 +4048,41 @@ } } }, - "503": { + "403": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Semantic embeddings are unavailable; use lexical or hybrid mode.", + "description": "Token lacks a required scope.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -13890,83 +4090,43 @@ "type": "string" } } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Hybrid passage retrieval over the full file body" - } - }, - "/v0/folders/{fld_id}": { - "delete": { - "operationId": "delete_folder_by_id_v0_folders__fld_id__delete", - "parameters": [ - { - "in": "path", - "name": "fld_id", - "required": true, - "schema": { - "title": "Fld Id", - "type": "string" - } - }, - { - "in": "query", - "name": "recursive", - "required": false, - "schema": { - "default": false, - "title": "Recursive", - "type": "boolean" - } - }, - { - "in": "header", - "name": "x-agentdrive-actor", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "X-Agentdrive-Actor" - } - }, - { - "in": "header", - "name": "if-match", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "If-Match" - } - } - ], - "responses": { - "200": { + } + }, + "404": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FolderDeleteOut" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Successful Response", + "description": "The resource was not found or is not visible to the caller.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -13976,22 +4136,42 @@ } } }, - "401": { + "409": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "The mutation conflicts with current state (name/path, lifecycle).", "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -14000,16 +4180,48 @@ } } }, - "403": { + "412": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "If-Match did not match the resource's current revision.", "headers": { + "ETag": { + "description": "Current strong entity tag.", + "schema": { + "type": "string" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -14018,15 +4230,15 @@ } } }, - "404": { + "422": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "$ref": "#/components/schemas/ValidationErrorResponse" } } }, - "description": "The folder does not exist in this drive.", + "description": "Request validation failed.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -14036,15 +4248,41 @@ } } }, - "412": { + "428": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request precondition did not match.", + "description": "If-Match is required for this mutation.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -14054,16 +4292,49 @@ } } }, - "422": { + "429": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Request validation failed.", + "description": "Rate limited.", "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -14072,15 +4343,41 @@ } } }, - "429": { + "503": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -14100,22 +4397,184 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Soft-delete a folder by stable ID (cascade with ?recursive=true)" - }, + "summary": "Update Drive", + "tags": [ + "drives" + ] + } + }, + "/v0/drives/{drive_id}/artifacts": { "get": { - "operationId": "get_folder_by_id_v0_folders__fld_id__get", + "description": "List the drive's artifacts, newest-first (keyset paginated).\n\n``lifecycle`` (active|deleted|all) exposes soft-deleted artifacts.\n``parent_id`` / ``name`` / ``content_type`` / ``label`` are exact-match\nfilters; ``updated_after`` / ``updated_before`` are inclusive bounds.\nUnknown query parameters are rejected.", + "operationId": "artifacts_list", "parameters": [ { "in": "path", - "name": "fld_id", + "name": "drive_id", "required": true, "schema": { - "title": "Fld Id", + "title": "Drive Id", + "type": "string" + } + }, + { + "in": "query", + "name": "lifecycle", + "required": false, + "schema": { + "default": "active", + "title": "Lifecycle", "type": "string" } + }, + { + "in": "query", + "name": "limit", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Limit" + } + }, + { + "in": "query", + "name": "cursor", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Cursor" + } + }, + { + "in": "query", + "name": "parent_id", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Parent Id" + } + }, + { + "in": "query", + "name": "name", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + } + }, + { + "in": "query", + "name": "content_type", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Content Type" + } + }, + { + "in": "query", + "name": "label", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Label" + } + }, + { + "in": "query", + "name": "updated_after", + "required": false, + "schema": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Updated After" + } + }, + { + "in": "query", + "name": "updated_before", + "required": false, + "schema": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Updated Before" + } + }, + { + "in": "header", + "name": "authorization", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization" + } } ], "responses": { @@ -14123,18 +4582,12 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FolderOut" + "$ref": "#/components/schemas/ArtifactListOut" } } }, "description": "Successful Response", "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -14143,15 +4596,42 @@ } } }, - "304": { - "description": "The current entity tag or modification date matched.", - "headers": { - "ETag": { - "description": "Current strong entity tag.", + "400": { + "content": { + "application/json": { "schema": { - "type": "string" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } - }, + } + }, + "description": "Malformed request (invalid query parameter, cursor, or argument).", + "headers": { "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -14164,11 +4644,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "Missing or invalid bearer token.", "headers": { "WWW-Authenticate": { "description": "RFC 6750 bearer authentication challenge.", @@ -14188,11 +4694,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Token lacks a required scope.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -14206,11 +4738,55 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "The resource was not found or is not visible to the caller.", + "headers": { + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "422": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationErrorResponse" } } }, - "description": "The folder does not exist in this drive.", + "description": "Request validation failed.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -14220,16 +4796,49 @@ } } }, - "422": { + "429": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Request validation failed.", + "description": "Rate limited.", "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -14238,15 +4847,41 @@ } } }, - "429": { + "503": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -14266,27 +4901,31 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Canonical lookup of a folder by its stable ID" + "summary": "List Artifacts", + "tags": [ + "artifacts" + ] }, - "patch": { - "operationId": "patch_folder_by_id_v0_folders__fld_id__patch", + "post": { + "description": "Create one artifact with inline content \u2014 multipart only.\n\nMultipart only (415 for a JSON body). Parts: parent_id, name, metadata, content (bytes), content_type, sha256. parent_id, name, and content are required.", + "operationId": "artifacts_create", "parameters": [ { "in": "path", - "name": "fld_id", + "name": "drive_id", "required": true, "schema": { - "title": "Fld Id", + "title": "Drive Id", "type": "string" } }, { "in": "header", - "name": "x-agentdrive-actor", - "required": false, + "name": "Idempotency-Key", + "required": true, "schema": { "anyOf": [ { @@ -14296,12 +4935,12 @@ "type": "null" } ], - "title": "X-Agentdrive-Actor" + "title": "Idempotency-Key" } }, { "in": "header", - "name": "if-match", + "name": "authorization", "required": false, "schema": { "anyOf": [ @@ -14312,26 +4951,58 @@ "type": "null" } ], - "title": "If-Match" + "title": "Authorization" } } ], "requestBody": { "content": { - "application/json": { + "multipart/form-data": { "schema": { - "$ref": "#/components/schemas/FolderPatchIn" + "properties": { + "content": { + "description": "The artifact bytes.", + "format": "binary", + "type": "string" + }, + "content_type": { + "description": "Declared media type.", + "type": "string" + }, + "metadata": { + "description": "Free-form JSON metadata.", + "type": "object" + }, + "name": { + "description": "Artifact name.", + "type": "string" + }, + "parent_id": { + "description": "Destination folder id (fld_*).", + "type": "string" + }, + "sha256": { + "description": "Optional content sha256 for verification.", + "type": "string" + } + }, + "required": [ + "parent_id", + "name", + "content" + ], + "type": "object" } } }, "required": true }, "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FolderOut" + "$ref": "#/components/schemas/ArtifactOut" } } }, @@ -14343,6 +5014,13 @@ "type": "string" } }, + "Location": { + "description": "Canonical URL of the created resource.", + "schema": { + "format": "uri-reference", + "type": "string" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -14355,11 +5033,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The folder update is invalid.", + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -14373,11 +5077,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "Missing or invalid bearer token.", "headers": { "WWW-Authenticate": { "description": "RFC 6750 bearer authentication challenge.", @@ -14397,11 +5127,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Token lacks a required scope.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -14415,11 +5171,81 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "The parent or target resource was not found or is not visible.", + "headers": { + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "409": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The folder does not exist in this drive.", + "description": "A sibling already occupies the name/path, or the idempotency key was reused for a different request.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -14433,11 +5259,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request precondition did not match.", + "description": "If-Match did not match (copy/restore preconditions).", "headers": { "ETag": { "description": "Current strong entity tag.", @@ -14471,15 +5323,136 @@ } } }, + "428": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "If-Match is required for this mutation.", + "headers": { + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, "429": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "Rate limited.", + "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "503": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -14499,30 +5472,42 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Update folder metadata by stable ID" + "summary": "Create Artifact", + "tags": [ + "artifacts" + ] } }, - "/v0/folders/{fld_id}/copy": { - "post": { - "description": "Clone the folder identified by URL id \u2014 and every descendant folder + artifact \u2014 under the body's `path` (canonical, trailing slash). Each copied artifact reuses the source's CAS object (zero new storage) but gets a fresh `art_\u2026` ID, a fresh version 1, and `source.refs = [{type: 'artifact', id: ''}]` provenance. The new folder gets a fresh `fld_\u2026` ID and the source's description.\n\nThe entire subtree is copied in a SINGLE transaction \u2014 either every row lands or none does.\n\nQuota: each copy's `size_bytes` counts against the drive's `storage_bytes` even though physical bytes are shared.\n\nSource-version pin: pass `from_metageneration` in the body to require the source folder's current `metageneration` to equal it (\u2192 412 SOURCE_VERSION_MISMATCH). Destination create-only: `If-None-Match: *` returns 412 CREATE_CONFLICT (instead of 409 FOLDER_PATH_CONFLICT) when the destination folder is occupied.\n\nReturns 409 `FOLDER_PATH_CONFLICT` if the destination collides with a live folder or artifact; 400 `FOLDER_PATH_INVALID` if `path` is non-canonical; 413 `SUBTREE_TOO_LARGE` if the source holds more than 5000 artifacts; 413 `STORAGE_QUOTA_EXCEEDED` if the copy would push the drive over its limit.", - "operationId": "copy_folder_by_id_v0_folders__fld_id__copy_post", + "/v0/drives/{drive_id}/artifacts/{artifact_id}": { + "delete": { + "description": "Soft-delete one artifact (its versions stay).", + "operationId": "artifacts_delete", "parameters": [ { "in": "path", - "name": "fld_id", + "name": "drive_id", + "required": true, + "schema": { + "title": "Drive Id", + "type": "string" + } + }, + { + "in": "path", + "name": "artifact_id", "required": true, "schema": { - "title": "Fld Id", + "title": "Artifact Id", "type": "string" } }, { "in": "header", - "name": "x-agentdrive-actor", - "required": false, + "name": "Idempotency-Key", + "required": true, "schema": { "anyOf": [ { @@ -14532,13 +5517,13 @@ "type": "null" } ], - "title": "X-Agentdrive-Actor" + "title": "Idempotency-Key" } }, { "in": "header", - "name": "if-none-match", - "required": false, + "name": "If-Match", + "required": true, "schema": { "anyOf": [ { @@ -14548,122 +5533,43 @@ "type": "null" } ], - "title": "If-None-Match" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FolderCopyIn" - } - } - }, - "required": true - }, - "responses": { - "201": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FolderCopyOut" - } - } - }, - "description": "Successful Response", - "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, - "Location": { - "description": "Canonical URL of the created resource.", - "schema": { - "format": "uri-reference", - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The destination path is invalid.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } + "title": "If-Match" } }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { + { + "in": "header", + "name": "authorization", + "required": false, + "schema": { + "anyOf": [ + { "type": "string" + }, + { + "type": "null" } - } + ], + "title": "Authorization" } - }, - "404": { + } + ], + "responses": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "$ref": "#/components/schemas/ArtifactOut" } } }, - "description": "The folder does not exist in this drive.", + "description": "Successful Response", "headers": { + "ETag": { + "description": "Current strong entity tag.", + "schema": { + "type": "string" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -14672,15 +5578,41 @@ } } }, - "409": { + "400": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The destination path is already occupied.", + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -14690,18 +5622,44 @@ } } }, - "412": { + "401": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request precondition did not match.", + "description": "Missing or invalid bearer token.", "headers": { - "ETag": { - "description": "Current strong entity tag.", + "WWW-Authenticate": { + "description": "RFC 6750 bearer authentication challenge.", "schema": { "type": "string" } @@ -14714,15 +5672,41 @@ } } }, - "413": { + "403": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The copied subtree would exceed the drive storage limit.", + "description": "Token lacks a required scope.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -14732,15 +5716,41 @@ } } }, - "422": { + "404": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Request validation failed.", + "description": "The resource was not found or is not visible to the caller.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -14750,23 +5760,42 @@ } } }, - "429": { + "409": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "The mutation conflicts with current state (name/path, lifecycle).", "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -14774,57 +5803,42 @@ } } } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Duplicate a folder subtree to a new path (CAS-shared, new IDs)" - } - }, - "/v0/folders/{fld_id}/meta": { - "get": { - "operationId": "get_folder_by_id_meta_v0_folders__fld_id__meta_get", - "parameters": [ - { - "in": "path", - "name": "fld_id", - "required": true, - "schema": { - "title": "Fld Id", - "type": "string" - } - } - ], - "responses": { - "200": { + }, + "412": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FolderOut" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Successful Response", - "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "304": { - "description": "The current entity tag or modification date matched.", + "description": "If-Match did not match the resource's current revision.", "headers": { "ETag": { "description": "Current strong entity tag.", @@ -14840,22 +5854,16 @@ } } }, - "401": { + "422": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "$ref": "#/components/schemas/ValidationErrorResponse" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "Request validation failed.", "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -14864,15 +5872,41 @@ } } }, - "403": { + "428": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "If-Match is required for this mutation.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -14882,34 +5916,49 @@ } } }, - "404": { + "429": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The folder does not exist in this drive.", + "description": "Rate limited.", "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { + "Retry-After": { + "description": "Seconds until the caller should retry.", "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "minimum": 0, + "type": "integer" } - } - }, - "description": "Request validation failed.", - "headers": { + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -14918,15 +5967,41 @@ } } }, - "429": { + "503": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -14946,28 +6021,39 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Folder metadata by stable ID (same shape as the bare id route)" - } - }, - "/v0/folders/{fld_id}/move": { - "post": { - "operationId": "move_folder_by_id_v0_folders__fld_id__move_post", + "summary": "Delete Artifact", + "tags": [ + "artifacts" + ] + }, + "get": { + "description": "Read one active artifact. ``If-None-Match`` short-circuits to 304.", + "operationId": "artifacts_read", "parameters": [ { "in": "path", - "name": "fld_id", + "name": "drive_id", + "required": true, + "schema": { + "title": "Drive Id", + "type": "string" + } + }, + { + "in": "path", + "name": "artifact_id", "required": true, "schema": { - "title": "Fld Id", + "title": "Artifact Id", "type": "string" } }, { "in": "header", - "name": "x-agentdrive-actor", + "name": "If-None-Match", "required": false, "schema": { "anyOf": [ @@ -14978,12 +6064,12 @@ "type": "null" } ], - "title": "X-Agentdrive-Actor" + "title": "If-None-Match" } }, { "in": "header", - "name": "if-match", + "name": "authorization", "required": false, "schema": { "anyOf": [ @@ -14994,26 +6080,16 @@ "type": "null" } ], - "title": "If-Match" + "title": "Authorization" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FolderMoveIn" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FolderOut" + "$ref": "#/components/schemas/ArtifactOut" } } }, @@ -15033,15 +6109,58 @@ } } }, + "304": { + "description": "If-None-Match matched the current ETag.", + "headers": { + "ETag": { + "description": "Current strong entity tag.", + "schema": { + "type": "string" + } + }, + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, "400": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The destination path is invalid.", + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -15055,11 +6174,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "Missing or invalid bearer token.", "headers": { "WWW-Authenticate": { "description": "RFC 6750 bearer authentication challenge.", @@ -15079,11 +6224,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Token lacks a required scope.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -15097,11 +6268,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The folder does not exist in this drive.", + "description": "The resource was not found or is not visible to the caller.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -15111,15 +6308,15 @@ } } }, - "409": { + "422": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "$ref": "#/components/schemas/ValidationErrorResponse" } } }, - "description": "The destination path is already occupied.", + "description": "Request validation failed.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -15129,20 +6326,47 @@ } } }, - "412": { + "429": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request precondition did not match.", + "description": "Rate limited.", "headers": { - "ETag": { - "description": "Current strong entity tag.", + "Retry-After": { + "description": "Seconds until the caller should retry.", "schema": { - "type": "string" + "minimum": 0, + "type": "integer" } }, "X-Request-Id": { @@ -15153,33 +6377,41 @@ } } }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "429": { + "503": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -15199,30 +6431,56 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Rename / move a folder by stable ID (cascade descendants)" - } - }, - "/v0/folders/{fld_id}/restore": { - "post": { - "description": "Mirrors `POST /v0/artifacts/{art_id}/restore` for folders: clear `deleted_at` + `purge_at` on a soft-deleted folder AND exactly the descendants soft-deleted in the same cascade (descendants trashed separately keep their trash state; restore those individually \u2014 the per-artifact restore remains for cherry-picking). Available only while the folder is in trash; returns 404 if it is live or already hard-purged.\n\nReturns 409 `PATH_CONFLICT` when a live folder/artifact now occupies a path this restore would reinstate (`colliding_path` + `kind` identify it). Unlike artifact restore there are NO `rename`/`overwrite` escape hatches \u2014 the whole cascade aborts; free the colliding path (or cherry-pick artifacts) and retry.\n\n`If-Match` (the trashed folder's composite ETag) makes the restore conditional \u2192 412 PRECONDITION_FAILED on a stale token; omitted, the restore is last-writer-wins.", - "operationId": "restore_folder_by_id_v0_folders__fld_id__restore_post", + "summary": "Read Artifact", + "tags": [ + "artifacts" + ] + }, + "patch": { + "description": "Rename / move / set metadata or labels. At least one field required.", + "operationId": "artifacts_update", "parameters": [ { - "in": "path", - "name": "fld_id", + "in": "path", + "name": "drive_id", + "required": true, + "schema": { + "title": "Drive Id", + "type": "string" + } + }, + { + "in": "path", + "name": "artifact_id", + "required": true, + "schema": { + "title": "Artifact Id", + "type": "string" + } + }, + { + "in": "header", + "name": "Idempotency-Key", "required": true, "schema": { - "title": "Fld Id", - "type": "string" + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Idempotency-Key" } }, { "in": "header", - "name": "x-agentdrive-actor", - "required": false, + "name": "If-Match", + "required": true, "schema": { "anyOf": [ { @@ -15232,12 +6490,12 @@ "type": "null" } ], - "title": "X-Agentdrive-Actor" + "title": "If-Match" } }, { "in": "header", - "name": "if-match", + "name": "authorization", "required": false, "schema": { "anyOf": [ @@ -15248,16 +6506,26 @@ "type": "null" } ], - "title": "If-Match" + "title": "Authorization" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ArtifactUpdateIn" + } + } + }, + "required": true + }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FolderRestoreOut" + "$ref": "#/components/schemas/ArtifactOut" } } }, @@ -15277,15 +6545,85 @@ } } }, + "400": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "Malformed request (invalid query parameter, cursor, or argument).", + "headers": { + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, "401": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "Missing or invalid bearer token.", "headers": { "WWW-Authenticate": { "description": "RFC 6750 bearer authentication challenge.", @@ -15305,11 +6643,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Token lacks a required scope.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -15323,11 +6687,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "No restorable folder exists with this ID.", + "description": "The resource was not found or is not visible to the caller.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -15341,11 +6731,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The restore destination is already occupied.", + "description": "The mutation conflicts with current state (name/path, lifecycle).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -15359,11 +6775,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request precondition did not match.", + "description": "If-Match did not match the resource's current revision.", "headers": { "ETag": { "description": "Current strong entity tag.", @@ -15397,15 +6839,136 @@ } } }, + "428": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "If-Match is required for this mutation.", + "headers": { + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, "429": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "Rate limited.", + "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "503": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -15425,39 +6988,41 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Restore a soft-deleted folder (cascade)" + "summary": "Update Artifact", + "tags": [ + "artifacts" + ] } }, - "/v0/folders/{path}": { - "delete": { - "description": "Soft-delete the folder. Refuses if the folder has live descendants unless `?recursive=true` is set, in which case ALL descendant folders + artifacts are soft-deleted in the same transaction.\n\nReturns 409 `FOLDER_RECURSIVE_REQUIRED` (with descendant counts in `colliding_path`) when recursion is needed but the flag isn't set. Retention window is frozen on `purge_at` per deletion-design.md \u00a75.1; mid-retention tier changes don't shift it.", - "operationId": "delete_folder_by_path_v0_folders__path__delete", + "/v0/drives/{drive_id}/artifacts/{artifact_id}/content": { + "get": { + "description": "Download the head version's bytes \u2014 stream or 307 signed URL.", + "operationId": "artifacts_content", "parameters": [ { "in": "path", - "name": "path", + "name": "drive_id", "required": true, "schema": { - "title": "Path", + "title": "Drive Id", "type": "string" } }, { - "in": "query", - "name": "recursive", - "required": false, + "in": "path", + "name": "artifact_id", + "required": true, "schema": { - "default": false, - "title": "Recursive", - "type": "boolean" + "title": "Artifact Id", + "type": "string" } }, { "in": "header", - "name": "x-agentdrive-actor", + "name": "If-None-Match", "required": false, "schema": { "anyOf": [ @@ -15468,12 +7033,12 @@ "type": "null" } ], - "title": "X-Agentdrive-Actor" + "title": "If-None-Match" } }, { "in": "header", - "name": "if-match", + "name": "authorization", "required": false, "schema": { "anyOf": [ @@ -15484,98 +7049,21 @@ "type": "null" } ], - "title": "If-Match" + "title": "Authorization" } } ], "responses": { "200": { "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FolderDeleteOut" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The folder does not exist in this drive.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", + "application/octet-stream": { "schema": { + "format": "binary", "type": "string" } } - } - }, - "412": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } }, - "description": "A request precondition did not match.", + "description": "Raw artifact bytes (streamed).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -15585,40 +7073,14 @@ } } }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", + "304": { + "description": "If-None-Match matched the current ETag.", "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", + "ETag": { + "description": "Current strong entity tag.", "schema": { "type": "string" } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } }, "X-Request-Id": { "description": "Request correlation identifier.", @@ -15626,43 +7088,15 @@ "type": "string" } } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Soft-delete a folder (cascade with ?recursive=true)" - }, - "get": { - "operationId": "get_folder_by_path_v0_folders__path__get", - "parameters": [ - { - "in": "path", - "name": "path", - "required": true, - "schema": { - "title": "Path", - "type": "string" - } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FolderOut" - } - } - }, - "description": "Successful Response", + } + }, + "307": { + "description": "Redirect to a short-lived signed URL.", "headers": { - "ETag": { - "description": "Current strong entity tag.", + "Location": { + "description": "Redirect target.", "schema": { + "format": "uri-reference", "type": "string" } }, @@ -15674,15 +7108,42 @@ } } }, - "304": { - "description": "The current entity tag or modification date matched.", - "headers": { - "ETag": { - "description": "Current strong entity tag.", + "400": { + "content": { + "application/json": { "schema": { - "type": "string" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } - }, + } + }, + "description": "Malformed request (invalid query parameter, cursor, or argument).", + "headers": { "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -15695,11 +7156,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "Missing or invalid bearer token.", "headers": { "WWW-Authenticate": { "description": "RFC 6750 bearer authentication challenge.", @@ -15719,11 +7206,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Token lacks a required scope.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -15737,11 +7250,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The folder does not exist in this drive.", + "description": "The resource was not found or is not visible to the caller.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -15773,11 +7312,88 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "Rate limited.", + "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "503": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -15797,28 +7413,42 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Read folder metadata by path" - }, - "patch": { - "description": "Partial update \u2014 field absence leaves the value unchanged; explicit `null` clears the field. Use the by-id endpoint (slice 2) when you need stable addressing across renames.", - "operationId": "patch_folder_by_path_v0_folders__path__patch", + "summary": "Read Artifact Content", + "tags": [ + "artifacts" + ] + } + }, + "/v0/drives/{drive_id}/artifacts/{artifact_id}/copy": { + "post": { + "description": "Copy one artifact within the same drive.\n\nCross-drive copy is out of v0 scope and rejected (400 INVALID_ARGUMENT).\n``destination_drive_id`` must equal the source drive when present.\nMaterializes the artifact + its selected version synchronously \u2192 201.\n``If-Match`` is optional; when present it is validated against the source\nrevision (412 stale).", + "operationId": "artifacts_copy", "parameters": [ { "in": "path", - "name": "path", + "name": "drive_id", + "required": true, + "schema": { + "title": "Drive Id", + "type": "string" + } + }, + { + "in": "path", + "name": "artifact_id", "required": true, "schema": { - "title": "Path", + "title": "Artifact Id", "type": "string" } }, { "in": "header", - "name": "x-agentdrive-actor", - "required": false, + "name": "Idempotency-Key", + "required": true, "schema": { "anyOf": [ { @@ -15828,12 +7458,12 @@ "type": "null" } ], - "title": "X-Agentdrive-Actor" + "title": "Idempotency-Key" } }, { "in": "header", - "name": "if-match", + "name": "If-Match", "required": false, "schema": { "anyOf": [ @@ -15846,24 +7476,40 @@ ], "title": "If-Match" } + }, + { + "in": "header", + "name": "authorization", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization" + } } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FolderPatchIn" + "$ref": "#/components/schemas/ArtifactCopyIn" } } }, "required": true }, "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FolderOut" + "$ref": "#/components/schemas/ArtifactOut" } } }, @@ -15875,6 +7521,13 @@ "type": "string" } }, + "Location": { + "description": "Canonical URL of the created resource.", + "schema": { + "format": "uri-reference", + "type": "string" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -15887,11 +7540,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The folder update is invalid.", + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -15905,11 +7584,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "Missing or invalid bearer token.", "headers": { "WWW-Authenticate": { "description": "RFC 6750 bearer authentication challenge.", @@ -15929,11 +7634,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Token lacks a required scope.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -15947,11 +7678,81 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "The parent or target resource was not found or is not visible.", + "headers": { + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "409": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The folder does not exist in this drive.", + "description": "A sibling already occupies the name/path, or the idempotency key was reused for a different request.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -15965,11 +7766,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request precondition did not match.", + "description": "If-Match did not match (copy/restore preconditions).", "headers": { "ETag": { "description": "Current strong entity tag.", @@ -16003,15 +7830,136 @@ } } }, + "428": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "If-Match is required for this mutation.", + "headers": { + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, "429": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "Rate limited.", + "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "503": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -16031,28 +7979,58 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Update folder metadata by path" - }, - "put": { - "description": "Create a folder at the URL path. Idempotent create-at-known-URI (mirrors `PUT /v0/artifacts/{path}`) \u2014 a second call for the same live path returns the existing row unchanged (metadata updates require PATCH). Returns 201 on create, 200 when the folder already exists.\n\nSend `If-None-Match: *` to make it strictly create-only: an existing folder then returns 412 CREATE_CONFLICT instead of the idempotent 200.\n\nReturns 409 `FOLDER_PATH_CONFLICT` if a live artifact occupies the file form of the path (e.g. mkdir `/foo/` when an artifact lives at `/foo`).", - "operationId": "create_folder_by_path_v0_folders__path__put", + "summary": "Copy Artifact", + "tags": [ + "artifacts" + ] + } + }, + "/v0/drives/{drive_id}/artifacts/{artifact_id}/restore": { + "post": { + "description": "Restore a soft-deleted artifact atomically.", + "operationId": "artifacts_restore", "parameters": [ { "in": "path", - "name": "path", + "name": "drive_id", + "required": true, + "schema": { + "title": "Drive Id", + "type": "string" + } + }, + { + "in": "path", + "name": "artifact_id", "required": true, "schema": { - "title": "Path", + "title": "Artifact Id", "type": "string" } }, { "in": "header", - "name": "x-agentdrive-actor", - "required": false, + "name": "Idempotency-Key", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Idempotency-Key" + } + }, + { + "in": "header", + "name": "If-Match", + "required": true, "schema": { "anyOf": [ { @@ -16062,12 +8040,12 @@ "type": "null" } ], - "title": "X-Agentdrive-Actor" + "title": "If-Match" } }, { "in": "header", - "name": "if-none-match", + "name": "authorization", "required": false, "schema": { "anyOf": [ @@ -16078,57 +8056,16 @@ "type": "null" } ], - "title": "If-None-Match" + "title": "Authorization" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/FolderCreateIn" - }, - { - "type": "null" - } - ], - "title": "Body" - } - } - } - }, "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FolderOut" - } - } - }, - "description": "The existing folder was returned unchanged.", - "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "201": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FolderOut" + "$ref": "#/components/schemas/ArtifactOut" } } }, @@ -16140,13 +8077,6 @@ "type": "string" } }, - "Location": { - "description": "Canonical URL of the created resource.", - "schema": { - "format": "uri-reference", - "type": "string" - } - }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -16159,11 +8089,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The folder path is invalid.", + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -16177,11 +8133,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "Missing or invalid bearer token.", "headers": { "WWW-Authenticate": { "description": "RFC 6750 bearer authentication challenge.", @@ -16201,11 +8183,81 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "Token lacks a required scope.", + "headers": { + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "404": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "The resource was not found or is not visible to the caller.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -16219,11 +8271,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The folder conflicts with an existing path.", + "description": "The mutation conflicts with current state (name/path, lifecycle).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -16237,11 +8315,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request precondition did not match.", + "description": "If-Match did not match the resource's current revision.", "headers": { "ETag": { "description": "Current strong entity tag.", @@ -16275,15 +8379,136 @@ } } }, + "428": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "If-Match is required for this mutation.", + "headers": { + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, "429": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "Rate limited.", + "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "503": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -16303,24 +8528,85 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Create a folder (idempotent)" + "summary": "Restore Artifact", + "tags": [ + "artifacts" + ] } }, - "/v0/folders/{path}/meta": { + "/v0/drives/{drive_id}/artifacts/{artifact_id}/versions": { "get": { - "operationId": "get_folder_by_path_meta_v0_folders__path__meta_get", + "description": "List the artifact's version trail, newest first (ordinal DESC).", + "operationId": "versions_list", "parameters": [ { "in": "path", - "name": "path", + "name": "drive_id", + "required": true, + "schema": { + "title": "Drive Id", + "type": "string" + } + }, + { + "in": "path", + "name": "artifact_id", "required": true, "schema": { - "title": "Path", + "title": "Artifact Id", "type": "string" } + }, + { + "in": "query", + "name": "limit", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Limit" + } + }, + { + "in": "query", + "name": "cursor", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Cursor" + } + }, + { + "in": "header", + "name": "authorization", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization" + } } ], "responses": { @@ -16328,18 +8614,12 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FolderOut" + "$ref": "#/components/schemas/VersionListOut" } } }, "description": "Successful Response", "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -16348,15 +8628,42 @@ } } }, - "304": { - "description": "The current entity tag or modification date matched.", - "headers": { - "ETag": { - "description": "Current strong entity tag.", + "400": { + "content": { + "application/json": { "schema": { - "type": "string" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } - }, + } + }, + "description": "Malformed request (invalid query parameter, cursor, or argument).", + "headers": { "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -16369,11 +8676,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "Missing or invalid bearer token.", "headers": { "WWW-Authenticate": { "description": "RFC 6750 bearer authentication challenge.", @@ -16393,11 +8726,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Token lacks a required scope.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -16411,11 +8770,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The folder does not exist in this drive.", + "description": "The resource was not found or is not visible to the caller.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -16447,11 +8832,88 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "Rate limited.", + "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "503": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -16471,30 +8933,40 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Folder metadata by path (same shape as the bare path route)" - } - }, - "/v0/folders/{path}/move": { + "summary": "List Versions", + "tags": [ + "versions" + ] + }, "post": { - "description": "Move the folder identified by URL path to the body's `path`. All descendant folders + artifacts are path-prefix-updated in the same transaction. The folder's `fld_*` ID stays stable.\n\nReturns 409 `FOLDER_PATH_CONFLICT` if the destination prefix collides with a live folder or artifact path.", - "operationId": "move_folder_by_path_v0_folders__path__move_post", + "description": "Append one immutable version and rotate the artifact head.\n\nMultipart only (415 for a JSON body). Parts: content (bytes), content_type, sha256. content is required; name, parent_id, and metadata are not accepted here.", + "operationId": "versions_append", "parameters": [ { "in": "path", - "name": "path", + "name": "drive_id", + "required": true, + "schema": { + "title": "Drive Id", + "type": "string" + } + }, + { + "in": "path", + "name": "artifact_id", "required": true, "schema": { - "title": "Path", + "title": "Artifact Id", "type": "string" } }, { "in": "header", - "name": "x-agentdrive-actor", - "required": false, + "name": "Idempotency-Key", + "required": true, "schema": { "anyOf": [ { @@ -16504,13 +8976,13 @@ "type": "null" } ], - "title": "X-Agentdrive-Actor" + "title": "Idempotency-Key" } }, { "in": "header", - "name": "if-match", - "required": false, + "name": "If-Match", + "required": true, "schema": { "anyOf": [ { @@ -16522,24 +8994,58 @@ ], "title": "If-Match" } + }, + { + "in": "header", + "name": "authorization", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization" + } } ], "requestBody": { "content": { - "application/json": { + "multipart/form-data": { "schema": { - "$ref": "#/components/schemas/FolderMoveIn" + "properties": { + "content": { + "description": "The artifact bytes.", + "format": "binary", + "type": "string" + }, + "content_type": { + "description": "Declared media type.", + "type": "string" + }, + "sha256": { + "description": "Optional content sha256 for verification.", + "type": "string" + } + }, + "required": [ + "content" + ], + "type": "object" } } }, "required": true }, "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/FolderOut" + "$ref": "#/components/schemas/VersionCreatedOut" } } }, @@ -16551,6 +9057,13 @@ "type": "string" } }, + "Location": { + "description": "Canonical URL of the created resource.", + "schema": { + "format": "uri-reference", + "type": "string" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -16563,11 +9076,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The source or destination path is invalid.", + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -16581,11 +9120,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "Missing or invalid bearer token.", "headers": { "WWW-Authenticate": { "description": "RFC 6750 bearer authentication challenge.", @@ -16605,11 +9170,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Token lacks a required scope.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -16623,11 +9214,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The source folder does not exist in this drive.", + "description": "The resource was not found or is not visible to the caller.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -16641,11 +9258,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The destination path is already occupied.", + "description": "The mutation conflicts with current state (name/path, lifecycle).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -16659,11 +9302,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request precondition did not match.", + "description": "If-Match did not match the resource's current revision.", "headers": { "ETag": { "description": "Current strong entity tag.", @@ -16697,15 +9366,136 @@ } } }, + "428": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "If-Match is required for this mutation.", + "headers": { + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, "429": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "Rate limited.", + "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "503": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -16725,31 +9515,50 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Rename / move a folder (cascade-update descendants)" + "summary": "Append Version", + "tags": [ + "versions" + ] } }, - "/v0/grants": { + "/v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}": { "get": { - "description": "**Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. The `resource` filter must be re-sent on every page \u2014 the cursor encodes only the keyset position.", - "operationId": "list_grants_route_v0_grants_get", + "description": "Read one immutable version.", + "operationId": "versions_read", "parameters": [ { - "description": "art_*/fld_* id or a path", - "in": "query", - "name": "resource", + "in": "path", + "name": "drive_id", "required": true, "schema": { - "description": "art_*/fld_* id or a path", - "title": "Resource", + "title": "Drive Id", "type": "string" } }, { - "in": "query", - "name": "cursor", + "in": "path", + "name": "artifact_id", + "required": true, + "schema": { + "title": "Artifact Id", + "type": "string" + } + }, + { + "in": "path", + "name": "version_id", + "required": true, + "schema": { + "title": "Version Id", + "type": "string" + } + }, + { + "in": "header", + "name": "If-None-Match", "required": false, "schema": { "anyOf": [ @@ -16760,23 +9569,23 @@ "type": "null" } ], - "title": "Cursor" + "title": "If-None-Match" } }, { - "in": "query", - "name": "limit", + "in": "header", + "name": "authorization", "required": false, "schema": { "anyOf": [ { - "type": "integer" + "type": "string" }, { "type": "null" } ], - "title": "Limit" + "title": "Authorization" } } ], @@ -16785,50 +9594,14 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GrantList" + "$ref": "#/components/schemas/VersionOut" } } }, "description": "Successful Response", "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The cursor or resource reference is invalid.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", + "ETag": { + "description": "Current strong entity tag.", "schema": { "type": "string" } @@ -16841,52 +9614,15 @@ } } }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The target resource does not exist in this drive.", + "304": { + "description": "If-None-Match matched the current ETag.", "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", + "ETag": { + "description": "Current strong entity tag.", "schema": { "type": "string" } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -16895,23 +9631,42 @@ } } }, - "429": { + "400": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -16919,60 +9674,46 @@ } } } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "List live grants on a resource (requires can_manage)" - }, - "post": { - "operationId": "create_grant_route_v0_grants_post", - "parameters": [ - { - "in": "header", - "name": "x-agentdrive-actor", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "X-Agentdrive-Actor" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GrantCreateIn" - } - } }, - "required": true - }, - "responses": { - "201": { + "401": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GrantOut" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Successful Response", + "description": "Missing or invalid bearer token.", "headers": { - "Location": { - "description": "Canonical URL of the created resource.", + "WWW-Authenticate": { + "description": "RFC 6750 bearer authentication challenge.", "schema": { - "format": "uri-reference", "type": "string" } }, @@ -16984,40 +9725,42 @@ } } }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The grant or expiry is invalid.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { + "403": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "Token lacks a required scope.", "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -17026,15 +9769,41 @@ } } }, - "403": { + "404": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "The resource was not found or is not visible to the caller.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -17044,15 +9813,15 @@ } } }, - "404": { + "422": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "$ref": "#/components/schemas/ValidationErrorResponse" } } }, - "description": "The target resource does not exist in this drive.", + "description": "Request validation failed.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -17062,16 +9831,49 @@ } } }, - "422": { + "429": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Request validation failed.", + "description": "Rate limited.", "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -17080,15 +9882,41 @@ } } }, - "429": { + "503": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -17108,28 +9936,66 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Create (or fetch) a per-principal grant on a resource" + "summary": "Read Version", + "tags": [ + "versions" + ] } }, - "/v0/grants/{grn_id}": { - "delete": { - "operationId": "delete_grant_route_v0_grants__grn_id__delete", + "/v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}/content": { + "get": { + "description": "Download one version's immutable bytes \u2014 stream or 307.", + "operationId": "versions_content", "parameters": [ { "in": "path", - "name": "grn_id", + "name": "drive_id", + "required": true, + "schema": { + "title": "Drive Id", + "type": "string" + } + }, + { + "in": "path", + "name": "artifact_id", + "required": true, + "schema": { + "title": "Artifact Id", + "type": "string" + } + }, + { + "in": "path", + "name": "version_id", "required": true, "schema": { - "title": "Grn Id", + "title": "Version Id", "type": "string" } }, { "in": "header", - "name": "x-agentdrive-actor", + "name": "If-None-Match", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "If-None-Match" + } + }, + { + "in": "header", + "name": "authorization", "required": false, "schema": { "anyOf": [ @@ -17140,20 +10006,100 @@ "type": "null" } ], - "title": "X-Agentdrive-Actor" + "title": "Authorization" } } ], "responses": { "200": { + "content": { + "application/octet-stream": { + "schema": { + "format": "binary", + "type": "string" + } + } + }, + "description": "Raw artifact bytes (streamed).", + "headers": { + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "304": { + "description": "If-None-Match matched the current ETag.", + "headers": { + "ETag": { + "description": "Current strong entity tag.", + "schema": { + "type": "string" + } + }, + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "307": { + "description": "Redirect to a short-lived signed URL.", + "headers": { + "Location": { + "description": "Redirect target.", + "schema": { + "format": "uri-reference", + "type": "string" + } + }, + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "400": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RevokeOut" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Successful Response", + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -17167,11 +10113,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "Missing or invalid bearer token.", "headers": { "WWW-Authenticate": { "description": "RFC 6750 bearer authentication challenge.", @@ -17191,11 +10163,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Token lacks a required scope.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -17209,11 +10207,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The grant does not exist in this drive.", + "description": "The resource was not found or is not visible to the caller.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -17245,11 +10269,88 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "Rate limited.", + "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "503": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -17269,78 +10370,120 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Revoke a grant (can_manage, or self-revoke own grant)" - }, - "get": { - "description": "The `Location` target of `POST /v0/grants`. Authorization mirrors\nDELETE: `can_manage` on the granted resource, or the caller IS the\ngrant's own principal (a grantee may read \u2014 like revoke \u2014 their own\ngrant). A revoked grant reads as 404 (same no-leak shape as a\nforeign/absent id); DELETE stays idempotent on it.", - "operationId": "get_grant_route_v0_grants__grn_id__get", + "summary": "Read Version Content", + "tags": [ + "versions" + ] + } + }, + "/v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}/restore": { + "post": { + "description": "Restore a historical version as a NEW head version (no byte copy).", + "operationId": "versions_restore", "parameters": [ { "in": "path", - "name": "grn_id", + "name": "drive_id", "required": true, "schema": { - "title": "Grn Id", + "title": "Drive Id", "type": "string" } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GrantOut" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { + }, + { + "in": "path", + "name": "artifact_id", + "required": true, + "schema": { + "title": "Artifact Id", + "type": "string" + } + }, + { + "in": "path", + "name": "version_id", + "required": true, + "schema": { + "title": "Version Id", + "type": "string" + } + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, + "schema": { + "anyOf": [ + { "type": "string" + }, + { + "type": "null" } - } + ], + "title": "Idempotency-Key" } }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { + { + "in": "header", + "name": "If-Match", + "required": true, + "schema": { + "anyOf": [ + { "type": "string" + }, + { + "type": "null" } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { + ], + "title": "If-Match" + } + }, + { + "in": "header", + "name": "authorization", + "required": false, + "schema": { + "anyOf": [ + { "type": "string" + }, + { + "type": "null" } - } + ], + "title": "Authorization" } - }, - "403": { + } + ], + "responses": { + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "$ref": "#/components/schemas/VersionCreatedOut" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Successful Response", "headers": { + "ETag": { + "description": "Current strong entity tag.", + "schema": { + "type": "string" + } + }, + "Location": { + "description": "Canonical URL of the created resource.", + "schema": { + "format": "uri-reference", + "type": "string" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -17349,15 +10492,41 @@ } } }, - "404": { + "400": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The grant does not exist in this drive.", + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -17367,16 +10536,48 @@ } } }, - "422": { + "401": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Request validation failed.", + "description": "Missing or invalid bearer token.", "headers": { + "WWW-Authenticate": { + "description": "RFC 6750 bearer authentication challenge.", + "schema": { + "type": "string" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -17385,23 +10586,42 @@ } } }, - "429": { + "403": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token lacks a required scope.", "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -17409,64 +10629,42 @@ } } } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Read a single grant (can_manage, or the grant's own principal)" - }, - "patch": { - "operationId": "patch_grant_route_v0_grants__grn_id__patch", - "parameters": [ - { - "in": "path", - "name": "grn_id", - "required": true, - "schema": { - "title": "Grn Id", - "type": "string" - } - }, - { - "in": "header", - "name": "x-agentdrive-actor", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "X-Agentdrive-Actor" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GrantPatchIn" - } - } }, - "required": true - }, - "responses": { - "200": { + "404": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GrantOut" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Successful Response", + "description": "The resource was not found or is not visible to the caller.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -17476,15 +10674,41 @@ } } }, - "400": { + "409": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The grant update or expiry is invalid.", + "description": "The mutation conflicts with current state (name/path, lifecycle).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -17494,18 +10718,44 @@ } } }, - "401": { + "412": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "If-Match did not match the resource's current revision.", "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", + "ETag": { + "description": "Current strong entity tag.", "schema": { "type": "string" } @@ -17518,15 +10768,15 @@ } } }, - "403": { + "422": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "$ref": "#/components/schemas/ValidationErrorResponse" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Request validation failed.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -17536,15 +10786,41 @@ } } }, - "404": { + "428": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The grant does not exist in this drive.", + "description": "If-Match is required for this mutation.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -17554,16 +10830,49 @@ } } }, - "422": { + "429": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Request validation failed.", + "description": "Rate limited.", "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -17572,15 +10881,41 @@ } } }, - "429": { + "503": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -17600,17 +10935,65 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Update a grant's role and/or expiry (requires can_manage)" + "summary": "Restore Version", + "tags": [ + "versions" + ] } }, - "/v0/invitations": { + "/v0/drives/{drive_id}/changes": { "get": { - "description": "List the pending invitations for the caller's active workspace. **Admin only.** Metadata only \u2014 the raw invite token is never surfaced.\n\nNewest first (`created_at` descending, tie-broken by `id`). Paginated: `limit` is clamped to [1, 100] (default 50, never a 422); pass the response's `next_cursor` back as `cursor` for the next page (`null` when the listing is complete).", - "operationId": "list_invitations_v0_invitations_get", + "description": "Pull one page of changes. Exactly one of ``start`` or ``cursor``.", + "operationId": "changes_list", "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "schema": { + "title": "Drive Id", + "type": "string" + } + }, + { + "in": "query", + "name": "limit", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Limit" + } + }, + { + "in": "query", + "name": "start", + "required": false, + "schema": { + "anyOf": [ + { + "enum": [ + "now", + "beginning" + ], + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Start" + } + }, { "in": "query", "name": "cursor", @@ -17628,19 +11011,19 @@ } }, { - "in": "query", - "name": "limit", + "in": "header", + "name": "authorization", "required": false, "schema": { "anyOf": [ { - "type": "integer" + "type": "string" }, { "type": "null" } ], - "title": "Limit" + "title": "Authorization" } } ], @@ -17649,7 +11032,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvitationList" + "$ref": "#/components/schemas/ChangePageOut" } } }, @@ -17663,39 +11046,41 @@ } } }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "403": { + "400": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Malformed request (invalid query parameter, cursor, or argument). Pass exactly one of start or cursor (INVALID_REQUEST); a cursor not issued for this drive fails with INVALID_CURSOR.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -17705,86 +11090,91 @@ } } }, - "422": { + "401": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Request validation failed.", + "description": "Missing or invalid bearer token.", "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", + "WWW-Authenticate": { + "description": "RFC 6750 bearer authentication challenge.", "schema": { "type": "string" } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { "type": "string" - } - } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "List pending invitations", - "tags": [ - "members" - ] - } - }, - "/v0/invitations/{invitation_id}": { - "delete": { - "description": "Revoke a pending invitation in the caller's active workspace. **Admin only**, `full` scope. Org-scoped + idempotent: `revoked` is a COUNT \u2014 1 when a live invite was revoked, 0 when it was already gone (a forged id, an invite from another workspace, or an already-consumed invite all return `revoked: 0`, no-leak).", - "operationId": "revoke_invitation_v0_invitations__invitation_id__delete", - "parameters": [ - { - "in": "path", - "name": "invitation_id", - "required": true, - "schema": { - "title": "Invitation Id", - "type": "string" + } + } } - } - ], - "responses": { - "200": { + }, + "403": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RevokeOut" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Successful Response", + "description": "Token lacks a required scope.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -17794,22 +11184,42 @@ } } }, - "401": { + "404": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "The resource was not found or is not visible to the caller.", "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -17818,15 +11228,41 @@ } } }, - "403": { + "410": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "The change cursor is older than retained history. Recover with a full sync: capture start=now, enumerate current resources, then replay from the captured cursor.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -17836,15 +11272,15 @@ } } }, - "404": { + "422": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "$ref": "#/components/schemas/ValidationErrorResponse" } } }, - "description": "The invitation does not exist in this workspace.", + "description": "Request validation failed.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -17854,16 +11290,49 @@ } } }, - "422": { + "429": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Request validation failed.", + "description": "Rate limited.", "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -17872,15 +11341,41 @@ } } }, - "429": { + "503": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -17900,27 +11395,118 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Revoke a pending invitation", + "summary": "List Changes", "tags": [ - "members" + "changes" ] } }, - "/v0/jobs/{job_id}": { + "/v0/drives/{drive_id}/folders": { "get": { - "operationId": "get_job_v0_jobs__job_id__get", + "description": "List the drive's folders, newest-first (keyset paginated).\n\n``lifecycle`` (active|deleted|all) exposes soft-deleted folders so the\npost-delete revision can be read as the If-Match source for a restore.\n``parent_id`` / ``name`` are exact-match filters. Unknown query parameters\nare rejected (\u00a76.3).", + "operationId": "folders_list", "parameters": [ { "in": "path", - "name": "job_id", + "name": "drive_id", "required": true, "schema": { - "title": "Job Id", + "title": "Drive Id", + "type": "string" + } + }, + { + "in": "query", + "name": "lifecycle", + "required": false, + "schema": { + "default": "active", + "title": "Lifecycle", "type": "string" } + }, + { + "in": "query", + "name": "limit", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Limit" + } + }, + { + "in": "query", + "name": "cursor", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Cursor" + } + }, + { + "in": "query", + "name": "parent_id", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Parent Id" + } + }, + { + "in": "query", + "name": "name", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Name" + } + }, + { + "in": "header", + "name": "authorization", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization" + } } ], "responses": { @@ -17928,7 +11514,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CompileJobOut" + "$ref": "#/components/schemas/FolderListOut" } } }, @@ -17942,15 +11528,85 @@ } } }, + "400": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "Malformed request (invalid query parameter, cursor, or argument).", + "headers": { + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, "401": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "Missing or invalid bearer token.", "headers": { "WWW-Authenticate": { "description": "RFC 6750 bearer authentication challenge.", @@ -17970,11 +11626,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Token lacks a required scope.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -17988,11 +11670,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "No such compile job exists in this drive.", + "description": "The resource was not found or is not visible to the caller.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -18024,11 +11732,88 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "Rate limited.", + "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "503": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -18048,59 +11833,91 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Poll a job", - "x-stability-level": "beta" - } - }, - "/v0/jobs/{job_id}/cancel": { + "summary": "List Folders", + "tags": [ + "folders" + ] + }, "post": { - "operationId": "cancel_job_v0_jobs__job_id__cancel_post", + "description": "Create one folder under `parent_id`; idempotent under the\n``Idempotency-Key``.", + "operationId": "folders_create", "parameters": [ { "in": "path", - "name": "job_id", + "name": "drive_id", "required": true, "schema": { - "title": "Job Id", + "title": "Drive Id", "type": "string" } + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Idempotency-Key" + } + }, + { + "in": "header", + "name": "authorization", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization" + } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FolderCreateIn" + } + } + }, + "required": true + }, "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CompileJobOut" + "$ref": "#/components/schemas/FolderOut" } } }, "description": "Successful Response", "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", + "ETag": { + "description": "Current strong entity tag.", "schema": { "type": "string" } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", + }, + "Location": { + "description": "Canonical URL of the created resource.", "schema": { + "format": "uri-reference", "type": "string" } }, @@ -18112,15 +11929,41 @@ } } }, - "403": { + "400": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -18130,16 +11973,48 @@ } } }, - "404": { + "401": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "No such compile job exists in this drive.", + "description": "Missing or invalid bearer token.", "headers": { + "WWW-Authenticate": { + "description": "RFC 6750 bearer authentication challenge.", + "schema": { + "type": "string" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -18148,15 +12023,41 @@ } } }, - "422": { + "403": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Request validation failed.", + "description": "Token lacks a required scope.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -18166,23 +12067,42 @@ } } }, - "429": { + "404": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "The parent or target resource was not found or is not visible.", "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -18190,41 +12110,42 @@ } } } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Cancel a queued/running job", - "x-stability-level": "beta" - } - }, - "/v0/jobs/{job_id}/logs": { - "get": { - "operationId": "get_job_logs_v0_jobs__job_id__logs_get", - "parameters": [ - { - "in": "path", - "name": "job_id", - "required": true, - "schema": { - "title": "Job Id", - "type": "string" - } - } - ], - "responses": { - "200": { + }, + "409": { "content": { - "text/plain": { + "application/json": { "schema": { - "type": "string" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Raw compile log.", + "description": "A sibling already occupies the name/path, or the idempotency key was reused for a different request.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -18234,18 +12155,44 @@ } } }, - "401": { + "412": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "If-Match did not match (copy/restore preconditions).", "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", + "ETag": { + "description": "Current strong entity tag.", "schema": { "type": "string" } @@ -18258,15 +12205,15 @@ } } }, - "403": { + "422": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "$ref": "#/components/schemas/ValidationErrorResponse" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Request validation failed.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -18276,15 +12223,41 @@ } } }, - "404": { + "428": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The job or its captured log does not exist.", + "description": "If-Match is required for this mutation.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -18294,16 +12267,49 @@ } } }, - "422": { + "429": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Request validation failed.", + "description": "Rate limited.", "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -18312,15 +12318,41 @@ } } }, - "429": { + "503": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -18340,22 +12372,52 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Raw compile log (text/plain)", - "x-stability-level": "beta" + "summary": "Create Folder", + "tags": [ + "folders" + ] } }, - "/v0/members": { - "get": { - "description": "List live members (email, role, joined-at) of the caller's active workspace. Any **member** may list; a `read`-scope token is sufficient.\n\nOrdered by join time (`created_at`, tie-broken by `user_id`) \u2014 **no role grouping is promised**; a dashboard that wants admins-first sorts client-side. Paginated: `limit` is clamped to [1, 100] (default 50, never a 422); pass the response's `next_cursor` back as `cursor` for the next page (`null` when the listing is complete).", - "operationId": "list_members_v0_members_get", + "/v0/drives/{drive_id}/folders/{folder_id}": { + "delete": { + "description": "Soft-delete a folder and its full live subtree (folders + artifacts) in\none transaction. A non-empty subtree requires ``recursive=true`` (409\nFOLDER_RECURSIVE_REQUIRED otherwise). Returns the deleted root\nrepresentation plus exact cascade counts and the post-delete\nrevision/ETag for a restore.", + "operationId": "folders_delete", "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "schema": { + "title": "Drive Id", + "type": "string" + } + }, + { + "in": "path", + "name": "folder_id", + "required": true, + "schema": { + "title": "Folder Id", + "type": "string" + } + }, { "in": "query", - "name": "cursor", + "name": "recursive", "required": false, + "schema": { + "default": false, + "title": "Recursive", + "type": "boolean" + } + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, "schema": { "anyOf": [ { @@ -18365,23 +12427,39 @@ "type": "null" } ], - "title": "Cursor" + "title": "Idempotency-Key" } }, { - "in": "query", - "name": "limit", + "in": "header", + "name": "If-Match", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "If-Match" + } + }, + { + "in": "header", + "name": "authorization", "required": false, "schema": { "anyOf": [ { - "type": "integer" + "type": "string" }, { "type": "null" } ], - "title": "Limit" + "title": "Authorization" } } ], @@ -18390,32 +12468,14 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MemberList" + "$ref": "#/components/schemas/FolderCascadeOut" } } }, "description": "Successful Response", "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", + "ETag": { + "description": "Current strong entity tag.", "schema": { "type": "string" } @@ -18428,15 +12488,41 @@ } } }, - "403": { + "400": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -18446,16 +12532,48 @@ } } }, - "422": { + "401": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Request validation failed.", + "description": "Missing or invalid bearer token.", "headers": { + "WWW-Authenticate": { + "description": "RFC 6750 bearer authentication challenge.", + "schema": { + "type": "string" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -18464,23 +12582,42 @@ } } }, - "429": { + "403": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token lacks a required scope.", "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -18488,51 +12625,43 @@ } } } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "List the members of your active workspace", - "tags": [ - "members" - ] - } - }, - "/v0/members/invite": { - "post": { - "description": "Create a pending invitation in the caller's active workspace and enqueue the invite email. **Admin only**, `full` scope. Inviting an existing member is a no-op success (`already_member: true`). A duplicate pending invite for the same email returns 409 `INVITE_PENDING` (resend it from the members page). The raw invite token is delivered only by email \u2014 never in this response.", - "operationId": "invite_member_v0_members_invite_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MemberInviteIn" - } - } }, - "required": true - }, - "responses": { - "201": { + "404": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InviteCreateOut" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Successful Response", + "description": "The resource was not found or is not visible to the caller.", "headers": { - "Location": { - "description": "Canonical URL of the created resource.", - "schema": { - "format": "uri-reference", - "type": "string" - } - }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -18541,15 +12670,41 @@ } } }, - "400": { + "409": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The email or role is invalid.", + "description": "The mutation conflicts with current state (name/path, lifecycle).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -18559,18 +12714,44 @@ } } }, - "401": { + "412": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "If-Match did not match the resource's current revision.", "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", + "ETag": { + "description": "Current strong entity tag.", "schema": { "type": "string" } @@ -18583,15 +12764,15 @@ } } }, - "403": { + "422": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "$ref": "#/components/schemas/ValidationErrorResponse" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Request validation failed.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -18601,15 +12782,41 @@ } } }, - "409": { + "428": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The user is already a member or has a pending invitation.", + "description": "If-Match is required for this mutation.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -18619,16 +12826,49 @@ } } }, - "422": { + "429": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Request validation failed.", + "description": "Rate limited.", "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -18637,20 +12877,46 @@ } } }, - "429": { + "503": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", "schema": { - "minimum": 0.0, + "minimum": 0, "type": "integer" } }, @@ -18665,32 +12931,55 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Invite a person to your workspace by email", + "summary": "Delete Folder", "tags": [ - "members" + "folders" ] - } - }, - "/v0/members/{target_user_id}": { - "delete": { - "description": "Remove a member from the caller's active workspace, soft-deleting every drive that member owns there (workspaces-design \u00a74.4 \u2014 no ownership transfer in v0; their `ad_live_` keys then stop working). **Admin** may remove anyone; **any member** may remove themselves (self-leave). `full` scope. Removing the **last/sole admin** is rejected with 409 `LAST_ADMIN` (promote someone first, or delete the workspace).\n\n**Explicit confirmation required:** pass `?confirm=DELETE` or the request is rejected with 400 `CONFIRM_REQUIRED` \u2014 removal cascades a soft-delete of every drive the member owns, so it carries tenant-level blast radius (uniform with `DELETE /v0/drives/{id}`).\n\nDeliberately takes NO `If-Match`: membership rows carry no generation/metageneration axis to pin (there is no ETag to echo), so `?confirm=DELETE` is the sole mutation guard here.", - "operationId": "remove_member_v0_members__target_user_id__delete", + }, + "get": { + "description": "Read one active folder. ETag = quoted revision; matching\n``If-None-Match`` \u2192 304. Deleted and cross-workspace folders are 404.", + "operationId": "folders_read", "parameters": [ { "in": "path", - "name": "target_user_id", + "name": "drive_id", "required": true, "schema": { - "title": "Target User Id", + "title": "Drive Id", "type": "string" } }, { - "in": "query", - "name": "confirm", + "in": "path", + "name": "folder_id", + "required": true, + "schema": { + "title": "Folder Id", + "type": "string" + } + }, + { + "in": "header", + "name": "If-None-Match", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "If-None-Match" + } + }, + { + "in": "header", + "name": "authorization", "required": false, "schema": { "anyOf": [ @@ -18701,7 +12990,7 @@ "type": "null" } ], - "title": "Confirm" + "title": "Authorization" } } ], @@ -18710,11 +12999,78 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MemberRemoveOut" + "$ref": "#/components/schemas/FolderOut" } } }, "description": "Successful Response", + "headers": { + "ETag": { + "description": "Current strong entity tag.", + "schema": { + "type": "string" + } + }, + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "304": { + "description": "If-None-Match matched the current ETag.", + "headers": { + "ETag": { + "description": "Current strong entity tag.", + "schema": { + "type": "string" + } + }, + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "400": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -18728,11 +13084,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "Missing or invalid bearer token.", "headers": { "WWW-Authenticate": { "description": "RFC 6750 bearer authentication challenge.", @@ -18752,11 +13134,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Token lacks a required scope.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -18770,11 +13178,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The member does not exist in this workspace.", + "description": "The resource was not found or is not visible to the caller.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -18784,15 +13218,15 @@ } } }, - "409": { + "422": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "$ref": "#/components/schemas/ValidationErrorResponse" } } }, - "description": "The removal would violate workspace ownership requirements.", + "description": "Request validation failed.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -18802,16 +13236,49 @@ } } }, - "422": { + "429": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Request validation failed.", + "description": "Rate limited.", "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -18820,15 +13287,41 @@ } } }, - "429": { + "503": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -18848,33 +13341,90 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Remove a member (or leave)", + "summary": "Read Folder", "tags": [ - "members" + "folders" ] }, "patch": { - "description": "Promote/demote a member in the caller's active workspace. **Admin only**, `full` scope. Demoting the workspace's **last admin** is rejected with 409 `LAST_ADMIN` (promote someone first).", - "operationId": "set_member_role_v0_members__target_user_id__patch", + "description": "Rename / move / update a folder's metadata or inheritance. Requires\n``Idempotency-Key`` and ``If-Match`` (428 absent, 412 stale); bumps the\nrevision.", + "operationId": "folders_update", "parameters": [ { "in": "path", - "name": "target_user_id", + "name": "drive_id", + "required": true, + "schema": { + "title": "Drive Id", + "type": "string" + } + }, + { + "in": "path", + "name": "folder_id", "required": true, "schema": { - "title": "Target User Id", + "title": "Folder Id", "type": "string" } + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Idempotency-Key" + } + }, + { + "in": "header", + "name": "If-Match", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "If-Match" + } + }, + { + "in": "header", + "name": "authorization", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization" + } } ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MemberRoleIn" + "$ref": "#/components/schemas/FolderUpdateIn" } } }, @@ -18885,12 +13435,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/MemberOut" + "$ref": "#/components/schemas/FolderOut" } } }, "description": "Successful Response", "headers": { + "ETag": { + "description": "Current strong entity tag.", + "schema": { + "type": "string" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -18903,11 +13459,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The membership update is invalid.", + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -18921,11 +13503,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "Missing or invalid bearer token.", "headers": { "WWW-Authenticate": { "description": "RFC 6750 bearer authentication challenge.", @@ -18945,12 +13553,176 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "Token lacks a required scope.", + "headers": { + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "404": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "The resource was not found or is not visible to the caller.", + "headers": { + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "409": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "The mutation conflicts with current state (name/path, lifecycle).", + "headers": { + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "412": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "If-Match did not match the resource's current revision.", "headers": { + "ETag": { + "description": "Current strong entity tag.", + "schema": { + "type": "string" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -18959,15 +13731,15 @@ } } }, - "404": { + "422": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "$ref": "#/components/schemas/ValidationErrorResponse" } } }, - "description": "The member does not exist in this workspace.", + "description": "Request validation failed.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -18977,15 +13749,41 @@ } } }, - "409": { + "428": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The update would violate workspace ownership requirements.", + "description": "If-Match is required for this mutation.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -18995,16 +13793,49 @@ } } }, - "422": { + "429": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Request validation failed.", + "description": "Rate limited.", "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -19013,15 +13844,41 @@ } } }, - "429": { + "503": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -19041,61 +13898,118 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Change a member's role", + "summary": "Update Folder", "tags": [ - "members" + "folders" ] } }, - "/v0/projects/{fld_id}": { - "get": { - "operationId": "get_project_v0_projects__fld_id__get", + "/v0/drives/{drive_id}/folders/{folder_id}/copy": { + "post": { + "description": "Copy a folder's subtree within the same drive.\n\nCross-drive copy is out of v0 scope and rejected (400 INVALID_ARGUMENT).\n``destination_drive_id`` must equal the source drive when present.\nMaterializes the subtree synchronously \u2192 201 + the copied folder.\n``If-Match`` is optional; when present it is validated against the source\nrevision (412 stale).", + "operationId": "folders_copy", "parameters": [ { "in": "path", - "name": "fld_id", + "name": "drive_id", + "required": true, + "schema": { + "title": "Drive Id", + "type": "string" + } + }, + { + "in": "path", + "name": "folder_id", "required": true, "schema": { - "title": "Fld Id", + "title": "Folder Id", "type": "string" } + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Idempotency-Key" + } + }, + { + "in": "header", + "name": "If-Match", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "If-Match" + } + }, + { + "in": "header", + "name": "authorization", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization" + } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FolderCopyIn" + } + } + }, + "required": true + }, "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CompileProjectOut" + "$ref": "#/components/schemas/FolderOut" } } }, "description": "Successful Response", "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", + "ETag": { + "description": "Current strong entity tag.", "schema": { "type": "string" } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", + }, + "Location": { + "description": "Canonical URL of the created resource.", "schema": { + "format": "uri-reference", "type": "string" } }, @@ -19107,15 +14021,41 @@ } } }, - "403": { + "400": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -19125,34 +14065,48 @@ } } }, - "404": { + "401": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The project folder does not exist or has no compile configuration.", + "description": "Missing or invalid bearer token.", "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", + "WWW-Authenticate": { + "description": "RFC 6750 bearer authentication challenge.", "schema": { "type": "string" } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -19161,23 +14115,42 @@ } } }, - "429": { + "403": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token lacks a required scope.", "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -19185,49 +14158,42 @@ } } } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Get a project's compile config", - "x-stability-level": "beta" - }, - "put": { - "operationId": "put_project_v0_projects__fld_id__put", - "parameters": [ - { - "in": "path", - "name": "fld_id", - "required": true, - "schema": { - "title": "Fld Id", - "type": "string" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProjectConfigIn" - } - } }, - "required": true - }, - "responses": { - "200": { + "404": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CompileProjectOut" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Successful Response", + "description": "The parent or target resource was not found or is not visible.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -19237,15 +14203,41 @@ } } }, - "400": { + "409": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The compile engine or entrypoint is invalid.", + "description": "A sibling already occupies the name/path, or the idempotency key was reused for a different request.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -19255,18 +14247,44 @@ } } }, - "401": { + "412": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "If-Match did not match (copy/restore preconditions).", "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", + "ETag": { + "description": "Current strong entity tag.", "schema": { "type": "string" } @@ -19279,15 +14297,15 @@ } } }, - "403": { + "422": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "$ref": "#/components/schemas/ValidationErrorResponse" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Request validation failed.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -19297,15 +14315,41 @@ } } }, - "404": { + "428": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The project folder does not exist in this drive.", + "description": "If-Match is required for this mutation.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -19315,16 +14359,49 @@ } } }, - "422": { + "429": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Request validation failed.", + "description": "Rate limited.", "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -19333,15 +14410,41 @@ } } }, - "429": { + "503": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -19361,31 +14464,58 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Set a project's compile config (entrypoint/engine/auto_compile)", - "x-stability-level": "beta" + "summary": "Copy Folder", + "tags": [ + "folders" + ] } }, - "/v0/projects/{fld_id}/jobs": { - "get": { - "description": "List compile jobs newest first in stable `(created_at, job_id)` descending order. Pass a non-null `next_cursor` back as `cursor` to continue; malformed cursors return `400 BAD_CURSOR`. The cursor contains only the keyset position, so a `status` filter must be re-sent unchanged on every page. `limit` retains its existing default of 50 and validated range of 1 through 200.", - "operationId": "list_project_jobs_v0_projects__fld_id__jobs_get", + "/v0/drives/{drive_id}/folders/{folder_id}/restore": { + "post": { + "description": "Restore a soft-deleted folder and its deleted subtree atomically.\nIf-Match must carry the post-delete revision; restoring an already-active\nfolder is 409 CONFLICT.", + "operationId": "folders_restore", "parameters": [ { "in": "path", - "name": "fld_id", + "name": "drive_id", + "required": true, + "schema": { + "title": "Drive Id", + "type": "string" + } + }, + { + "in": "path", + "name": "folder_id", "required": true, "schema": { - "title": "Fld Id", + "title": "Folder Id", "type": "string" } }, { - "in": "query", - "name": "status", - "required": false, + "in": "header", + "name": "Idempotency-Key", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Idempotency-Key" + } + }, + { + "in": "header", + "name": "If-Match", + "required": true, "schema": { "anyOf": [ { @@ -19395,24 +14525,12 @@ "type": "null" } ], - "title": "Status" - } - }, - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "default": 50, - "maximum": 200, - "minimum": 1, - "title": "Limit", - "type": "integer" + "title": "If-Match" } }, { - "in": "query", - "name": "cursor", + "in": "header", + "name": "authorization", "required": false, "schema": { "anyOf": [ @@ -19423,7 +14541,7 @@ "type": "null" } ], - "title": "Cursor" + "title": "Authorization" } } ], @@ -19432,12 +14550,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CompileJobListOut" + "$ref": "#/components/schemas/FolderCascadeOut" } } }, "description": "Successful Response", "headers": { + "ETag": { + "description": "Current strong entity tag.", + "schema": { + "type": "string" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -19450,11 +14574,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The status filter is invalid, or the cursor is malformed (`BAD_CURSOR`).", + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -19468,11 +14618,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "Missing or invalid bearer token.", "headers": { "WWW-Authenticate": { "description": "RFC 6750 bearer authentication challenge.", @@ -19492,11 +14668,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Token lacks a required scope.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -19510,11 +14712,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The project folder does not exist in this drive.", + "description": "The resource was not found or is not visible to the caller.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -19524,15 +14752,41 @@ } } }, - "422": { + "409": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Request validation failed.", + "description": "The mutation conflicts with current state (name/path, lifecycle).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -19542,21 +14796,46 @@ } } }, - "429": { + "412": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "If-Match did not match the resource's current revision.", "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", + "ETag": { + "description": "Current strong entity tag.", "schema": { - "minimum": 0, - "type": "integer" + "type": "string" } }, "X-Request-Id": { @@ -19566,65 +14845,16 @@ } } } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "List a project's jobs", - "x-stability-level": "beta" - }, - "post": { - "operationId": "enqueue_job_v0_projects__fld_id__jobs_post", - "parameters": [ - { - "in": "path", - "name": "fld_id", - "required": true, - "schema": { - "title": "Fld Id", - "type": "string" - } - }, - { - "in": "header", - "name": "x-agentdrive-actor", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "X-Agentdrive-Actor" - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CompileJobIn" - } - } }, - "required": true - }, - "responses": { - "200": { + "422": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CompileJobOut" + "$ref": "#/components/schemas/ValidationErrorResponse" } } }, - "description": "Successful Response", + "description": "Request validation failed.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -19634,15 +14864,41 @@ } } }, - "202": { + "428": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CompileJobOut" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Compile accepted and queued or running.", + "description": "If-Match is required for this mutation.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -19652,16 +14908,49 @@ } } }, - "400": { + "429": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The task, engine, entrypoint, or project is invalid.", + "description": "Rate limited.", "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -19670,20 +14959,47 @@ } } }, - "401": { + "503": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", + "Retry-After": { + "description": "Seconds until the caller should retry.", "schema": { - "type": "string" + "minimum": 0, + "type": "integer" } }, "X-Request-Id": { @@ -19693,159 +15009,146 @@ } } } + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Restore Folder", + "tags": [ + "folders" + ] + } + }, + "/v0/drives/{drive_id}/grants": { + "get": { + "description": "List explicit grants in the drive, keyset paginated.\n\n**What you see depends on your role (contract change).** A caller holding\n``manager`` on the drive lists EVERY grant in it. Any other caller lists\nonly the grants that name them \u2014 their own agent/user rows, ``workspace``\ngrants covering them, and ``public`` grants (which already expose the\nresource to them anyway). Previously any drive ``viewer`` could page out\nevery principal id, role and expiry in the drive; that was an\naccess-graph disclosure, not a feature.\n\nThe operation is refused (404) only for a caller holding no live grant\nanywhere in the drive \u2014 never for lack of ``manager``, because seeing\nyour own access is not a privilege. That admits folder-scoped\nprincipals, who previously 404'd here despite having access to show. A\nfolder ``manager`` still sees only their own rows, not the roster of the\nsubtree they administer; scoping the listing by per-resource\nadministration authority is a follow-up this change does not claim.\n\n``resource_id`` filters to one resource's grants and REQUIRES\n``resource_type`` alongside it \u2014 a bare resource id is ambiguous across\nthe three resource kinds, and guessing the kind from the id prefix would\nmake the filter's meaning depend on an id format the contract does not\npromise to keep. ``resource_type`` on its own remains a valid (and\npre-existing) filter.", + "operationId": "grants_list", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "schema": { + "title": "Drive Id", + "type": "string" + } }, - "402": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The current plan does not permit this compile.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } + { + "in": "query", + "name": "lifecycle", + "required": false, + "schema": { + "default": "active", + "title": "Lifecycle", + "type": "string" } }, - "403": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The authenticated principal is not allowed to perform this operation.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" + { + "in": "query", + "name": "limit", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" } - } + ], + "title": "Limit" } }, - "404": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The project folder does not exist in this drive.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { + { + "in": "query", + "name": "cursor", + "required": false, + "schema": { + "anyOf": [ + { "type": "string" + }, + { + "type": "null" } - } + ], + "title": "Cursor" } }, - "413": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The compile project exceeds an input or storage limit.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { + { + "in": "query", + "name": "resource_type", + "required": false, + "schema": { + "anyOf": [ + { "type": "string" + }, + { + "type": "null" } - } + ], + "title": "Resource Type" } }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { + { + "in": "query", + "name": "resource_id", + "required": false, + "schema": { + "anyOf": [ + { "type": "string" + }, + { + "type": "null" } - } + ], + "title": "Resource Id" } }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { + { + "in": "query", + "name": "principal_type", + "required": false, + "schema": { + "anyOf": [ + { "type": "string" + }, + { + "type": "null" } - } + ], + "title": "Principal Type" } - } - }, - "security": [ + }, { - "BearerAuth": [] + "in": "header", + "name": "authorization", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization" + } } ], - "summary": "Enqueue a compile job for a project (folder)", - "x-stability-level": "beta" - } - }, - "/v0/query": { - "post": { - "operationId": "post_query_v0_query_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/QueryIn" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/QueryDryRunOut" - }, - { - "$ref": "#/components/schemas/QueryResultOut" - } - ], - "title": "Response Post Query V0 Query Post" + "$ref": "#/components/schemas/GrantListOut" } } }, @@ -19863,11 +15166,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The SQL or referenced dataset is invalid.", + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -19881,11 +15210,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "Missing or invalid bearer token.", "headers": { "WWW-Authenticate": { "description": "RFC 6750 bearer authentication challenge.", @@ -19901,15 +15256,41 @@ } } }, - "402": { + "403": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The current plan does not permit this query.", + "description": "Token lacks a required scope.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -19919,15 +15300,41 @@ } } }, - "403": { + "404": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "The resource was not found or is not visible to the caller.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -19959,16 +15366,42 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Rate limited.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", "schema": { - "minimum": 0.0, + "minimum": 0, "type": "integer" } }, @@ -19984,12 +15417,45 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The configured query engine is unavailable.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -20001,76 +15467,91 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Run a read-only SQL query over authorized datasets", - "x-stability-level": "beta" - } - }, - "/v0/query/describe": { + "summary": "List Grants", + "tags": [ + "grants" + ] + }, "post": { - "operationId": "post_describe_v0_query_describe_post", + "description": "Grant one principal a role on a drive, folder, or artifact.", + "operationId": "grants_create", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "schema": { + "title": "Drive Id", + "type": "string" + } + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Idempotency-Key" + } + }, + { + "in": "header", + "name": "authorization", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization" + } + } + ], "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DescribeIn" + "$ref": "#/components/schemas/GrantCreateIn" } } }, "required": true }, "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DatasetDescriptionOut" + "$ref": "#/components/schemas/GrantOut" } } }, "description": "Successful Response", "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "400": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The referenced dataset is invalid.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", + "ETag": { + "description": "Current strong entity tag.", "schema": { "type": "string" } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", + }, + "Location": { + "description": "Canonical URL of the created resource.", "schema": { + "format": "uri-reference", "type": "string" } }, @@ -20082,15 +15563,41 @@ } } }, - "403": { + "400": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -20100,40 +15607,47 @@ } } }, - "422": { + "401": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Request validation failed.", + "description": "Missing or invalid bearer token.", "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", + "WWW-Authenticate": { + "description": "RFC 6750 bearer authentication challenge.", "schema": { "type": "string" } - } - } - }, - "429": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "A request, operation, or quota rate limit was exceeded.", - "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0.0, - "type": "integer" - } }, "X-Request-Id": { "description": "Request correlation identifier.", @@ -20143,57 +15657,41 @@ } } }, - "503": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "The configured query engine is unavailable.", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Describe a dataset's column schema", - "x-stability-level": "beta" - } - }, - "/v0/query/lookup-values": { - "post": { - "operationId": "post_lookup_values_v0_query_lookup_values_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LookupValuesIn" - } - } - }, - "required": true - }, - "responses": { - "200": { + "403": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/LookupValuesOut" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Successful Response", + "description": "Token lacks a required scope.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -20203,15 +15701,41 @@ } } }, - "400": { + "404": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The dataset, column, or limit is invalid.", + "description": "The parent or target resource was not found or is not visible.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -20221,22 +15745,42 @@ } } }, - "401": { + "409": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "A sibling already occupies the name/path, or the idempotency key was reused for a different request.", "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { - "type": "string" - } - }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -20245,16 +15789,48 @@ } } }, - "402": { + "412": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The current plan does not permit this query.", + "description": "If-Match did not match (copy/restore preconditions).", "headers": { + "ETag": { + "description": "Current strong entity tag.", + "schema": { + "type": "string" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -20263,15 +15839,15 @@ } } }, - "403": { + "422": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "$ref": "#/components/schemas/ValidationErrorResponse" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Request validation failed.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -20281,15 +15857,41 @@ } } }, - "422": { + "428": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Request validation failed.", + "description": "If-Match is required for this mutation.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -20303,16 +15905,42 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Rate limited.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", "schema": { - "minimum": 0.0, + "minimum": 0, "type": "integer" } }, @@ -20328,12 +15956,45 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The configured query engine is unavailable.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -20345,62 +16006,42 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "List distinct values of a dataset column", - "x-stability-level": "beta" + "summary": "Create Grant", + "tags": [ + "grants" + ] } }, - "/v0/search": { - "get": { - "description": "Lexical (not semantic) full-text search powered by Postgres `websearch_to_tsquery`. Results are ranked by `ts_rank` over a weighted tsvector (path > content > metadata > labels).\n\n**Supported query syntax:**\n- Words: `kangaroo` (English stemming)\n- Phrases: `\"exact phrase\"`\n- Negation: `kangaroo -secret`\n- AND (implicit): `kangaroo secret`\n- OR: `kangaroo OR koala`\n- Paths & filenames: `reports/q3-summary.md` or `q3-summary.md` match by their path words (`/ . _ -` are word boundaries)\n\n**Not supported (v0):**\n- Semantic / embedding similarity\n- PDF and image content (only the path + metadata are searchable)\n- Non-English stemming\n- Fuzzy matching, regex\n- Boolean operator parentheses\n\n**Filters:** `label` (repeatable, AND), `file_type` (enum), `prefix` (path prefix), `updated_after` / `updated_before` (RFC 3339 timestamps, inclusive bounds on `updated_at`).", - "operationId": "search_v0_search_get", + "/v0/drives/{drive_id}/grants/{grant_id}": { + "delete": { + "description": "Revoke a grant (soft, sets revoked_at) under If-Match.", + "operationId": "grants_revoke", "parameters": [ { - "in": "query", - "name": "q", + "in": "path", + "name": "drive_id", "required": true, "schema": { - "maxLength": 200, - "minLength": 1, - "title": "Q", + "title": "Drive Id", "type": "string" } }, { - "in": "query", - "name": "label", - "required": false, - "schema": { - "default": [], - "items": { - "type": "string" - }, - "title": "Label", - "type": "array" - } - }, - { - "in": "query", - "name": "file_type", - "required": false, + "in": "path", + "name": "grant_id", + "required": true, "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "File Type" + "title": "Grant Id", + "type": "string" } }, { - "in": "query", - "name": "prefix", - "required": false, + "in": "header", + "name": "Idempotency-Key", + "required": true, "schema": { "anyOf": [ { @@ -20410,53 +16051,39 @@ "type": "null" } ], - "title": "Prefix" + "title": "Idempotency-Key" } }, { - "in": "query", - "name": "updated_after", - "required": false, + "in": "header", + "name": "If-Match", + "required": true, "schema": { "anyOf": [ { - "format": "date-time", "type": "string" }, { "type": "null" } ], - "title": "Updated After" + "title": "If-Match" } }, { - "in": "query", - "name": "updated_before", + "in": "header", + "name": "authorization", "required": false, "schema": { "anyOf": [ { - "format": "date-time", "type": "string" }, { "type": "null" } ], - "title": "Updated Before" - } - }, - { - "in": "query", - "name": "limit", - "required": false, - "schema": { - "default": 20, - "maximum": 100, - "minimum": 1, - "title": "Limit", - "type": "integer" + "title": "Authorization" } } ], @@ -20465,12 +16092,18 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/SearchPage" + "$ref": "#/components/schemas/GrantOut" } } }, "description": "Successful Response", "headers": { + "ETag": { + "description": "Current strong entity tag.", + "schema": { + "type": "string" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -20483,11 +16116,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The search query or filter is invalid.", + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -20501,11 +16160,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "Missing or invalid bearer token.", "headers": { "WWW-Authenticate": { "description": "RFC 6750 bearer authentication challenge.", @@ -20525,12 +16210,176 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "Token lacks a required scope.", + "headers": { + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "404": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "The resource was not found or is not visible to the caller.", + "headers": { + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "409": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "The mutation conflicts with current state (name/path, lifecycle).", + "headers": { + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "412": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "If-Match did not match the resource's current revision.", "headers": { + "ETag": { + "description": "Current strong entity tag.", + "schema": { + "type": "string" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -20557,15 +16406,136 @@ } } }, + "428": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "If-Match is required for this mutation.", + "headers": { + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, "429": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "Rate limited.", + "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "503": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -20585,31 +16555,39 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Full-text search over artifacts in the drive" - } - }, - "/v0/shares": { + "summary": "Revoke Grant", + "tags": [ + "grants" + ] + }, "get": { - "description": "**Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. The `resource` filter must be re-sent on every page \u2014 the cursor encodes only the keyset position.", - "operationId": "list_shares_route_v0_shares_get", + "description": "Read one grant in the drive.", + "operationId": "grants_read", "parameters": [ { - "description": "art_*/fld_* id or a path", - "in": "query", - "name": "resource", + "in": "path", + "name": "drive_id", "required": true, "schema": { - "description": "art_*/fld_* id or a path", - "title": "Resource", + "title": "Drive Id", "type": "string" } }, { - "in": "query", - "name": "cursor", + "in": "path", + "name": "grant_id", + "required": true, + "schema": { + "title": "Grant Id", + "type": "string" + } + }, + { + "in": "header", + "name": "If-None-Match", "required": false, "schema": { "anyOf": [ @@ -20620,23 +16598,23 @@ "type": "null" } ], - "title": "Cursor" + "title": "If-None-Match" } }, { - "in": "query", - "name": "limit", + "in": "header", + "name": "authorization", "required": false, "schema": { "anyOf": [ { - "type": "integer" + "type": "string" }, { "type": "null" } ], - "title": "Limit" + "title": "Authorization" } } ], @@ -20645,12 +16623,35 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShareList" + "$ref": "#/components/schemas/GrantOut" } } }, "description": "Successful Response", "headers": { + "ETag": { + "description": "Current strong entity tag.", + "schema": { + "type": "string" + } + }, + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "304": { + "description": "If-None-Match matched the current ETag.", + "headers": { + "ETag": { + "description": "Current strong entity tag.", + "schema": { + "type": "string" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -20663,11 +16664,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The cursor or resource reference is invalid.", + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -20681,11 +16708,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "Missing or invalid bearer token.", "headers": { "WWW-Authenticate": { "description": "RFC 6750 bearer authentication challenge.", @@ -20705,11 +16758,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Token lacks a required scope.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -20723,11 +16802,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The target resource does not exist in this drive.", + "description": "The resource was not found or is not visible to the caller.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -20759,11 +16864,88 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "Rate limited.", + "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "503": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -20783,17 +16965,71 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "List live share links on a resource (requires can_manage)" + "summary": "Read Grant", + "tags": [ + "grants" + ] }, - "post": { - "operationId": "create_share_route_v0_shares_post", + "patch": { + "description": "Change a grant's role or expiry under If-Match.", + "operationId": "grants_update", "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "schema": { + "title": "Drive Id", + "type": "string" + } + }, + { + "in": "path", + "name": "grant_id", + "required": true, + "schema": { + "title": "Grant Id", + "type": "string" + } + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Idempotency-Key" + } + }, + { + "in": "header", + "name": "If-Match", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "If-Match" + } + }, { "in": "header", - "name": "x-agentdrive-actor", + "name": "authorization", "required": false, "schema": { "anyOf": [ @@ -20804,7 +17040,7 @@ "type": "null" } ], - "title": "X-Agentdrive-Actor" + "title": "Authorization" } } ], @@ -20812,27 +17048,26 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShareCreateIn" + "$ref": "#/components/schemas/GrantUpdateIn" } } }, "required": true }, "responses": { - "201": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShareMintOut" + "$ref": "#/components/schemas/GrantOut" } } }, "description": "Successful Response", "headers": { - "Location": { - "description": "Canonical URL of the created resource.", + "ETag": { + "description": "Current strong entity tag.", "schema": { - "format": "uri-reference", "type": "string" } }, @@ -20848,11 +17083,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The share settings or expiry are invalid.", + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -20866,11 +17127,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "Missing or invalid bearer token.", "headers": { "WWW-Authenticate": { "description": "RFC 6750 bearer authentication challenge.", @@ -20890,11 +17177,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Token lacks a required scope.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -20908,12 +17221,132 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "The resource was not found or is not visible to the caller.", + "headers": { + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "409": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "The mutation conflicts with current state (name/path, lifecycle).", + "headers": { + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "412": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The target resource does not exist in this drive.", + "description": "If-Match did not match the resource's current revision.", "headers": { + "ETag": { + "description": "Current strong entity tag.", + "schema": { + "type": "string" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -20940,15 +17373,136 @@ } } }, + "428": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "If-Match is required for this mutation.", + "headers": { + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, "429": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "Rate limited.", + "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "503": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -20968,28 +17522,64 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Mint a share link (returns the share_key once)" + "summary": "Update Grant", + "tags": [ + "grants" + ] } }, - "/v0/shares/{shr_id}": { - "delete": { - "operationId": "delete_share_route_v0_shares__shr_id__delete", + "/v0/drives/{drive_id}/restore": { + "post": { + "description": "Restore a soft-deleted drive. If-Match must carry the post-delete\nrevision; restoring an already-active drive is 409 CONFLICT.", + "operationId": "drives_restore", "parameters": [ { "in": "path", - "name": "shr_id", + "name": "drive_id", "required": true, "schema": { - "title": "Shr Id", + "title": "Drive Id", "type": "string" } }, { "in": "header", - "name": "x-agentdrive-actor", + "name": "Idempotency-Key", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Idempotency-Key" + } + }, + { + "in": "header", + "name": "If-Match", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "If-Match" + } + }, + { + "in": "header", + "name": "authorization", "required": false, "schema": { "anyOf": [ @@ -21000,7 +17590,7 @@ "type": "null" } ], - "title": "X-Agentdrive-Actor" + "title": "Authorization" } } ], @@ -21009,32 +17599,14 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/RevokeOut" + "$ref": "#/components/schemas/DriveOut" } } }, "description": "Successful Response", "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", + "ETag": { + "description": "Current strong entity tag.", "schema": { "type": "string" } @@ -21047,15 +17619,41 @@ } } }, - "403": { + "400": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -21065,16 +17663,48 @@ } } }, - "404": { + "401": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The share does not exist in this drive.", + "description": "Missing or invalid bearer token.", "headers": { + "WWW-Authenticate": { + "description": "RFC 6750 bearer authentication challenge.", + "schema": { + "type": "string" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -21083,15 +17713,41 @@ } } }, - "422": { + "403": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Request validation failed.", + "description": "Token lacks a required scope.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -21101,23 +17757,42 @@ } } }, - "429": { + "404": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "The resource was not found or is not visible to the caller.", "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -21125,39 +17800,42 @@ } } } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Revoke a share link (requires can_manage)" - }, - "get": { - "description": "The `Location` target of `POST /v0/shares`. Metadata ONLY \u2014\n`ShareOut` never carries the raw `share_key`/URL (returned exactly\nonce at mint/rotate, \u00a74.5). Authorization mirrors DELETE:\n`can_manage` on the shared resource. A revoked share reads as 404\n(same no-leak shape as a foreign/absent id).", - "operationId": "get_share_route_v0_shares__shr_id__get", - "parameters": [ - { - "in": "path", - "name": "shr_id", - "required": true, - "schema": { - "title": "Shr Id", - "type": "string" - } - } - ], - "responses": { - "200": { + }, + "409": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShareOut" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Successful Response", + "description": "The mutation conflicts with current state (name/path, lifecycle).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -21167,18 +17845,44 @@ } } }, - "401": { + "412": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "If-Match did not match the resource's current revision.", "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", + "ETag": { + "description": "Current strong entity tag.", "schema": { "type": "string" } @@ -21191,15 +17895,15 @@ } } }, - "403": { + "422": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "$ref": "#/components/schemas/ValidationErrorResponse" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Request validation failed.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -21209,15 +17913,41 @@ } } }, - "404": { + "428": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The share does not exist in this drive.", + "description": "If-Match is required for this mutation.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -21227,16 +17957,49 @@ } } }, - "422": { + "429": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Request validation failed.", + "description": "Rate limited.", "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -21245,15 +18008,41 @@ } } }, - "429": { + "503": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -21267,34 +18056,177 @@ "schema": { "type": "string" } - } + } + } + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Restore Drive", + "tags": [ + "drives" + ] + } + }, + "/v0/drives/{drive_id}/search": { + "get": { + "description": "Search the drive's live artifacts. ``q`` is required and must be\nnon-empty.\n\n``mode`` selects the retrieval engine: ``lexical``, ``hybrid``, or\n``semantic``. This deployment enables ``lexical`` only; requesting a\ndisabled mode fails ``400 SEARCH_MODE_UNAVAILABLE``.\n\nEach hit's ``snippet`` is HTML-safe by contract: artifact content is\nentity-escaped and only the server's own ````/```` highlight\npair survives, so a client may render it as HTML.", + "operationId": "drive_search", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "schema": { + "title": "Drive Id", + "type": "string" + } + }, + { + "in": "query", + "name": "q", + "required": true, + "schema": { + "minLength": 1, + "title": "Q", + "type": "string" + } + }, + { + "in": "query", + "name": "mode", + "required": false, + "schema": { + "default": "lexical", + "enum": [ + "lexical", + "hybrid", + "semantic" + ], + "title": "Mode", + "type": "string" + } + }, + { + "in": "query", + "name": "limit", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Limit" + } + }, + { + "in": "query", + "name": "cursor", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Cursor" + } + }, + { + "in": "query", + "name": "parent_id", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Parent Id" + } + }, + { + "in": "query", + "name": "content_type", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Content Type" + } + }, + { + "in": "query", + "name": "label", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Label" + } + }, + { + "in": "query", + "name": "updated_after", + "required": false, + "schema": { + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Updated After" } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Read a single share link's metadata (requires can_manage)" - } - }, - "/v0/shares/{shr_id}/rotate": { - "post": { - "operationId": "rotate_share_route_v0_shares__shr_id__rotate_post", - "parameters": [ + }, { - "in": "path", - "name": "shr_id", - "required": true, + "in": "query", + "name": "updated_before", + "required": false, "schema": { - "title": "Shr Id", - "type": "string" + "anyOf": [ + { + "format": "date-time", + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Updated Before" } }, { "in": "header", - "name": "x-agentdrive-actor", + "name": "authorization", "required": false, "schema": { "anyOf": [ @@ -21305,7 +18237,7 @@ "type": "null" } ], - "title": "X-Agentdrive-Actor" + "title": "Authorization" } } ], @@ -21314,7 +18246,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ShareMintOut" + "$ref": "#/components/schemas/SearchPageOut" } } }, @@ -21332,11 +18264,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The replacement password is invalid.", + "description": "Malformed request (invalid query parameter, cursor, or argument). Requesting a disabled search mode fails with SEARCH_MODE_UNAVAILABLE.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -21350,11 +18308,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "Missing or invalid bearer token.", "headers": { "WWW-Authenticate": { "description": "RFC 6750 bearer authentication challenge.", @@ -21374,11 +18358,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Token lacks a required scope.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -21392,11 +18402,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The share does not exist in this drive.", + "description": "The resource was not found or is not visible to the caller.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -21428,11 +18464,88 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "Rate limited.", + "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "503": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -21452,17 +18565,55 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Revoke + reissue a share link's key (requires can_share)" + "summary": "Drive Search", + "tags": [ + "search" + ] } }, - "/v0/tokens": { + "/v0/drives/{drive_id}/shares": { "get": { - "description": "List the `ad_user_` tokens belonging to the authenticated user. Metadata only \u2014 the raw token is shown once at mint (web only) and is never returned here. Includes recently-revoked tokens (with `revoked_at` set) so the caller can audit them; newest first.\n\n**Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected.", - "operationId": "list_tokens_v0_tokens_get", + "description": "List the drive's shares (no secrets), keyset paginated.\n\n``resource_id`` narrows the page to one resource's links and REQUIRES\n``resource_type`` alongside it \u2014 a bare resource id is ambiguous across\n``artifact`` / ``artifact_version`` / ``folder``, and inferring the kind\nfrom the id prefix would tie the filter's meaning to an id format the\ncontract does not promise to keep. ``resource_type`` alone is a valid\nfilter. Listing shares already requires drive ``manager``, so these\nfilters only narrow a page the caller could already read in full.", + "operationId": "shares_list", "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "schema": { + "title": "Drive Id", + "type": "string" + } + }, + { + "in": "query", + "name": "lifecycle", + "required": false, + "schema": { + "default": "active", + "title": "Lifecycle", + "type": "string" + } + }, + { + "in": "query", + "name": "limit", + "required": false, + "schema": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "null" + } + ], + "title": "Limit" + } + }, { "in": "query", "name": "cursor", @@ -21481,18 +18632,50 @@ }, { "in": "query", - "name": "limit", + "name": "resource_type", "required": false, "schema": { "anyOf": [ { - "type": "integer" + "type": "string" }, { "type": "null" } ], - "title": "Limit" + "title": "Resource Type" + } + }, + { + "in": "query", + "name": "resource_id", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Resource Id" + } + }, + { + "in": "header", + "name": "authorization", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization" } } ], @@ -21501,7 +18684,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserTokenList" + "$ref": "#/components/schemas/ShareListOut" } } }, @@ -21515,15 +18698,85 @@ } } }, + "400": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "Malformed request (invalid query parameter, cursor, or argument).", + "headers": { + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, "401": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "Missing or invalid bearer token.", "headers": { "WWW-Authenticate": { "description": "RFC 6750 bearer authentication challenge.", @@ -21543,11 +18796,81 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "Token lacks a required scope.", + "headers": { + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "404": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "The resource was not found or is not visible to the caller.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -21579,11 +18902,88 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" + } + } + }, + "description": "Rate limited.", + "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, + "X-Request-Id": { + "description": "Request correlation identifier.", + "schema": { + "type": "string" + } + } + } + }, + "503": { + "content": { + "application/json": { + "schema": { + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -21597,68 +18997,97 @@ "schema": { "type": "string" } - } + } + } + } + }, + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "List Shares", + "tags": [ + "shares" + ] + }, + "post": { + "description": "Mint a read-only bearer link. The response carries the plaintext\nsecret \u2014 the only response that does.", + "operationId": "shares_create", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "schema": { + "title": "Drive Id", + "type": "string" + } + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Idempotency-Key" + } + }, + { + "in": "header", + "name": "authorization", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization" } } - }, - "security": [ - { - "BearerAuth": [] - } ], - "summary": "List your user-identity tokens", - "tags": [ - "tokens" - ] - } - }, - "/v0/tokens/{token_id}/revoke": { - "post": { - "description": "Revoke a single `ad_user_` token by id. Scoped to the authenticated user: a token id that isn't yours returns 404 (no-leak). Idempotent \u2014 revoking an already-revoked token also returns 404 (it is no longer a live token of yours to revoke). On success the revoked token's metadata is returned with `revoked_at` set.", - "operationId": "revoke_token_v0_tokens__token_id__revoke_post", - "parameters": [ - { - "in": "path", - "name": "token_id", - "required": true, - "schema": { - "title": "Token Id", - "type": "string" + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ShareCreateIn" + } } - } - ], + }, + "required": true + }, "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UserTokenOut" + "$ref": "#/components/schemas/ShareCreateOut" } } }, "description": "Successful Response", "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", + "ETag": { + "description": "Current strong entity tag.", "schema": { "type": "string" } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", + }, + "Location": { + "description": "Canonical URL of the created resource.", "schema": { + "format": "uri-reference", "type": "string" } }, @@ -21670,15 +19099,41 @@ } } }, - "403": { + "400": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -21688,34 +19143,48 @@ } } }, - "404": { + "401": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The token does not exist for this user.", + "description": "Missing or invalid bearer token.", "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", + "WWW-Authenticate": { + "description": "RFC 6750 bearer authentication challenge.", "schema": { "type": "string" } - } - } - }, - "422": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" - } - } - }, - "description": "Request validation failed.", - "headers": { + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -21724,23 +19193,42 @@ } } }, - "429": { + "403": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token lacks a required scope.", "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -21748,43 +19236,42 @@ } } } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Revoke one of your user-identity tokens", - "tags": [ - "tokens" - ] - } - }, - "/v0/uploads": { - "post": { - "description": "Reserve quota and open a resumable upload session for a file larger than the buffered-upload limit. Returns a `upload_url` to PUT the raw bytes to DIRECTLY (no Authorization header \u2014 the URL is the credential), then call `/v0/uploads/{upload_id}/commit`. All artifact decisions (path, labels, metadata, source, if_match) are frozen here.", - "operationId": "begin_upload_v0_uploads_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UploadBeginIn" - } - } }, - "required": true - }, - "responses": { - "200": { + "404": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UploadBeginOut" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Successful Response", + "description": "The parent or target resource was not found or is not visible.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -21794,15 +19281,41 @@ } } }, - "400": { + "409": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Invalid path, labels, metadata, or source.", + "description": "A sibling already occupies the name/path, or the idempotency key was reused for a different request.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -21812,18 +19325,44 @@ } } }, - "401": { + "412": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "If-Match did not match (copy/restore preconditions).", "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", + "ETag": { + "description": "Current strong entity tag.", "schema": { "type": "string" } @@ -21836,15 +19375,15 @@ } } }, - "403": { + "422": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "$ref": "#/components/schemas/ValidationErrorResponse" } } }, - "description": "Path reserved for the system (WIKI_RESERVED).", + "description": "Request validation failed.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -21854,15 +19393,41 @@ } } }, - "413": { + "428": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "size_bytes exceeds the per-artifact cap or storage quota.", + "description": "If-Match is required for this mutation.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -21872,16 +19437,49 @@ } } }, - "422": { + "429": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Request validation failed.", + "description": "Rate limited.", "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -21890,20 +19488,46 @@ } } }, - "429": { + "503": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Drive's per-hour write budget exhausted.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", "schema": { - "minimum": 0.0, + "minimum": 0, "type": "integer" } }, @@ -21918,80 +19542,104 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Begin a large (direct-to-GCS) upload" + "summary": "Create Share", + "tags": [ + "shares" + ] } }, - "/v0/uploads/{upload_id}": { + "/v0/drives/{drive_id}/shares/{share_id}": { "delete": { - "description": "Release an open upload session: return its reserved quota to the drive and mark it aborted. Idempotent \u2014 aborting an already-aborted or already-expired session succeeds with `released_bytes: 0`. A committed session cannot be aborted (409 ALREADY_COMMITTED). No write budget is charged \u2014 this frees resources rather than consuming them.", - "operationId": "abort_upload_v0_uploads__upload_id__delete", + "description": "Revoke a share (soft, sets revoked_at) under If-Match.", + "operationId": "shares_revoke", "parameters": [ { "in": "path", - "name": "upload_id", + "name": "drive_id", "required": true, "schema": { - "title": "Upload Id", + "title": "Drive Id", "type": "string" } - } - ], - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UploadAbortOut" - } - } - }, - "description": "Successful Response", - "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { + }, + { + "in": "path", + "name": "share_id", + "required": true, + "schema": { + "title": "Share Id", + "type": "string" + } + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, + "schema": { + "anyOf": [ + { "type": "string" + }, + { + "type": "null" } - } + ], + "title": "Idempotency-Key" } }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", - "schema": { + { + "in": "header", + "name": "If-Match", + "required": true, + "schema": { + "anyOf": [ + { "type": "string" + }, + { + "type": "null" } - }, - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { + ], + "title": "If-Match" + } + }, + { + "in": "header", + "name": "authorization", + "required": false, + "schema": { + "anyOf": [ + { "type": "string" + }, + { + "type": "null" } - } + ], + "title": "Authorization" } - }, - "403": { + } + ], + "responses": { + "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "$ref": "#/components/schemas/ShareOut" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Successful Response", "headers": { + "ETag": { + "description": "Current strong entity tag.", + "schema": { + "type": "string" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -22000,15 +19648,41 @@ } } }, - "404": { + "400": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "No such upload for this drive.", + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -22018,16 +19692,48 @@ } } }, - "409": { + "401": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Upload already committed and cannot be aborted.", + "description": "Missing or invalid bearer token.", "headers": { + "WWW-Authenticate": { + "description": "RFC 6750 bearer authentication challenge.", + "schema": { + "type": "string" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -22036,15 +19742,41 @@ } } }, - "422": { + "403": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Request validation failed.", + "description": "Token lacks a required scope.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -22054,23 +19786,42 @@ } } }, - "429": { + "404": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "The resource was not found or is not visible to the caller.", "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -22078,39 +19829,42 @@ } } } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Abort a large (direct-to-GCS) upload session" - }, - "get": { - "description": "Report the live state of an upload session begun at `/v0/uploads`. `state` is derived: `initiated` (open \u2014 PUT the bytes then commit), `committed` (artifact created), `aborted` (released via DELETE), or `expired` (past `expires_at` without a commit). Read-only; charges the read budget.", - "operationId": "get_upload_status_v0_uploads__upload_id__get", - "parameters": [ - { - "in": "path", - "name": "upload_id", - "required": true, - "schema": { - "title": "Upload Id", - "type": "string" - } - } - ], - "responses": { - "200": { + }, + "409": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UploadStatusOut" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Successful Response", + "description": "The mutation conflicts with current state (name/path, lifecycle).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -22120,18 +19874,44 @@ } } }, - "401": { + "412": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "If-Match did not match the resource's current revision.", "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", + "ETag": { + "description": "Current strong entity tag.", "schema": { "type": "string" } @@ -22144,15 +19924,15 @@ } } }, - "403": { + "422": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "$ref": "#/components/schemas/ValidationErrorResponse" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Request validation failed.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -22162,15 +19942,41 @@ } } }, - "404": { + "428": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "No such upload for this drive.", + "description": "If-Match is required for this mutation.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -22180,16 +19986,49 @@ } } }, - "422": { + "429": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Request validation failed.", + "description": "Rate limited.", "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -22198,15 +20037,41 @@ } } }, - "429": { + "503": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -22226,25 +20091,67 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Get the status of a large (direct-to-GCS) upload session" - } - }, - "/v0/uploads/{upload_id}/commit": { - "post": { - "description": "Finalize the upload begun at `/v0/uploads`: AgentDrive verifies the object that landed in GCS (size + checksum) and creates the artifact. Idempotent \u2014 a retry after a successful commit returns the same artifact. The write budget is charged when the upload session is created; commit retries are not charged again.", - "operationId": "commit_upload_v0_uploads__upload_id__commit_post", + "summary": "Revoke Share", + "tags": [ + "shares" + ] + }, + "get": { + "description": "Read one share's management representation (no secret).", + "operationId": "shares_read", "parameters": [ { "in": "path", - "name": "upload_id", + "name": "drive_id", + "required": true, + "schema": { + "title": "Drive Id", + "type": "string" + } + }, + { + "in": "path", + "name": "share_id", "required": true, "schema": { - "title": "Upload Id", + "title": "Share Id", "type": "string" } + }, + { + "in": "header", + "name": "If-None-Match", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "If-None-Match" + } + }, + { + "in": "header", + "name": "authorization", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization" + } } ], "responses": { @@ -22252,7 +20159,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ArtifactOut" + "$ref": "#/components/schemas/ShareOut" } } }, @@ -22272,18 +20179,11 @@ } } }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", + "304": { + "description": "If-None-Match matched the current ETag.", "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", + "ETag": { + "description": "Current strong entity tag.", "schema": { "type": "string" } @@ -22296,15 +20196,41 @@ } } }, - "403": { + "400": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -22314,34 +20240,48 @@ } } }, - "404": { + "401": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "No such upload for this drive.", + "description": "Missing or invalid bearer token.", "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", + "WWW-Authenticate": { + "description": "RFC 6750 bearer authentication challenge.", "schema": { "type": "string" } - } - } - }, - "409": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Uploaded object size differs from declared size_bytes.", - "headers": { + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -22350,15 +20290,41 @@ } } }, - "410": { + "403": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Upload session expired.", + "description": "Token lacks a required scope.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -22368,22 +20334,42 @@ } } }, - "412": { + "404": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "If-Match precondition failed or create-only conflict.", + "description": "The resource was not found or is not visible to the caller.", "headers": { - "ETag": { - "description": "Current strong entity tag.", - "schema": { - "type": "string" - } - }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -22392,15 +20378,15 @@ } } }, - "413": { + "422": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "$ref": "#/components/schemas/ValidationErrorResponse" } } }, - "description": "Committing the upload would exceed the storage quota.", + "description": "Request validation failed.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -22410,16 +20396,49 @@ } } }, - "422": { + "429": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Request validation failed.", + "description": "Rate limited.", "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -22428,15 +20447,41 @@ } } }, - "429": { + "503": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Drive's per-hour write budget exhausted.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -22456,21 +20501,42 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Commit a large (direct-to-GCS) upload" + "summary": "Read Share", + "tags": [ + "shares" + ] } }, - "/v0/workspaces": { - "get": { - "description": "Return every space the caller is a member of, each carrying the caller's `role` in it. Metadata only. A `read`-scope token is sufficient.\n\n**Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected.", - "operationId": "list_workspaces_route_v0_workspaces_get", + "/v0/drives/{drive_id}/shares/{share_id}/rotate": { + "post": { + "description": "Rotate the secret in place (same id, no grace window). The response\ncarries the new plaintext secret.", + "operationId": "shares_rotate", "parameters": [ { - "in": "query", - "name": "cursor", - "required": false, + "in": "path", + "name": "drive_id", + "required": true, + "schema": { + "title": "Drive Id", + "type": "string" + } + }, + { + "in": "path", + "name": "share_id", + "required": true, + "schema": { + "title": "Share Id", + "type": "string" + } + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, "schema": { "anyOf": [ { @@ -22480,23 +20546,39 @@ "type": "null" } ], - "title": "Cursor" + "title": "Idempotency-Key" + } + }, + { + "in": "header", + "name": "If-Match", + "required": true, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "If-Match" } }, { - "in": "query", - "name": "limit", + "in": "header", + "name": "authorization", "required": false, "schema": { "anyOf": [ { - "type": "integer" + "type": "string" }, { "type": "null" } ], - "title": "Limit" + "title": "Authorization" } } ], @@ -22505,32 +20587,14 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WorkspaceList" + "$ref": "#/components/schemas/ShareCreateOut" } } }, "description": "Successful Response", "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "401": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - }, - "description": "Bearer credential is missing or invalid.", - "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", + "ETag": { + "description": "Current strong entity tag.", "schema": { "type": "string" } @@ -22543,15 +20607,41 @@ } } }, - "403": { + "400": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -22561,16 +20651,48 @@ } } }, - "422": { + "401": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Request validation failed.", + "description": "Missing or invalid bearer token.", "headers": { + "WWW-Authenticate": { + "description": "RFC 6750 bearer authentication challenge.", + "schema": { + "type": "string" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -22579,23 +20701,42 @@ } } }, - "429": { + "403": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token lacks a required scope.", "headers": { - "Retry-After": { - "description": "Seconds until the caller should retry.", - "schema": { - "minimum": 0, - "type": "integer" - } - }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -22603,49 +20744,43 @@ } } } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "List the spaces you belong to", - "tags": [ - "workspaces" - ] - }, - "post": { - "description": "Create a new **shared drive** \u2014 a shared, multi-member space (the `workspaces` path is retained for API stability). You become its **admin** and get a starter drive; the starter drive's `ad_live_` key is returned **once** (`starter_drive_api_key`).\n\nA user may administer up to their plan's number of shared drives (workspaces-v2 \u00a74.6). A caller at the limit is blocked with `403 WORKSPACE_LIMIT_REACHED`. Requires a `full`-scope user token.", - "operationId": "create_workspace_route_v0_workspaces_post", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WorkspaceCreateIn" - } - } }, - "required": true - }, - "responses": { - "201": { + "404": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WorkspaceCreateOut" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Successful Response", + "description": "The resource was not found or is not visible to the caller.", "headers": { - "Location": { - "description": "Canonical URL of the created resource.", - "schema": { - "format": "uri-reference", - "type": "string" - } - }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -22654,15 +20789,41 @@ } } }, - "400": { + "409": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The workspace name or request is invalid.", + "description": "The mutation conflicts with current state (name/path, lifecycle).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -22672,18 +20833,44 @@ } } }, - "401": { + "412": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "If-Match did not match the resource's current revision.", "headers": { - "WWW-Authenticate": { - "description": "RFC 6750 bearer authentication challenge.", + "ETag": { + "description": "Current strong entity tag.", "schema": { "type": "string" } @@ -22696,15 +20883,15 @@ } } }, - "403": { + "422": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "$ref": "#/components/schemas/ValidationErrorResponse" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Request validation failed.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -22714,15 +20901,41 @@ } } }, - "409": { + "428": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The workspace conflicts with an existing organization.", + "description": "If-Match is required for this mutation.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -22732,16 +20945,49 @@ } } }, - "422": { + "429": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Request validation failed.", + "description": "Rate limited.", "headers": { + "Retry-After": { + "description": "Seconds until the caller should retry.", + "schema": { + "minimum": 0, + "type": "integer" + } + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -22750,15 +20996,41 @@ } } }, - "429": { + "503": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -22778,46 +21050,52 @@ }, "security": [ { - "BearerAuth": [] + "bearerAuth": [] } ], - "summary": "Create a new shared drive", + "summary": "Rotate Share", "tags": [ - "workspaces" + "shares" ] } }, - "/v0/workspaces/{org_id}": { - "patch": { - "description": "Rename a shared drive. **Admin only** \u2014 one you don't administer (or aren't a member of) returns 404 (no-leak). Requires a `full`-scope user token.", - "operationId": "rename_workspace_route_v0_workspaces__org_id__patch", + "/v0/drives/{drive_id}/usage": { + "get": { + "description": "Byte counters for one active drive: storage is the live sum of its\nversions' sizes; retrieval reads the counter the content-read slice\nmaintains (0 until it lands).", + "operationId": "drives_usage", "parameters": [ { "in": "path", - "name": "org_id", + "name": "drive_id", "required": true, "schema": { - "title": "Org Id", + "title": "Drive Id", "type": "string" } + }, + { + "in": "header", + "name": "authorization", + "required": false, + "schema": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "title": "Authorization" + } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WorkspaceRenameIn" - } - } - }, - "required": true - }, "responses": { "200": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/WorkspaceOut" + "$ref": "#/components/schemas/DriveUsageOut" } } }, @@ -22835,11 +21113,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The workspace update is invalid.", + "description": "Malformed request (invalid query parameter, cursor, or argument).", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -22853,11 +21157,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Bearer credential is missing or invalid.", + "description": "Missing or invalid bearer token.", "headers": { "WWW-Authenticate": { "description": "RFC 6750 bearer authentication challenge.", @@ -22877,11 +21207,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The authenticated principal is not allowed to perform this operation.", + "description": "Token lacks a required scope.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -22895,11 +21251,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "The workspace does not exist for this user.", + "description": "The resource was not found or is not visible to the caller.", "headers": { "X-Request-Id": { "description": "Request correlation identifier.", @@ -22931,11 +21313,37 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ErrorResponse" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "A request, operation, or quota rate limit was exceeded.", + "description": "Rate limited.", "headers": { "Retry-After": { "description": "Seconds until the caller should retry.", @@ -22951,97 +21359,50 @@ } } } - } - }, - "security": [ - { - "BearerAuth": [] - } - ], - "summary": "Rename a shared drive you administer", - "tags": [ - "workspaces" - ] - } - }, - "/{drive_id}/{path}": { - "get": { - "operationId": "view_file__drive_id___path__get", - "parameters": [ - { - "in": "path", - "name": "drive_id", - "required": true, - "schema": { - "title": "Drive Id", - "type": "string" - } }, - { - "in": "path", - "name": "path", - "required": true, - "schema": { - "title": "Path", - "type": "string" - } - }, - { - "in": "query", - "name": "raw", - "required": false, - "schema": { - "default": 0, - "title": "Raw", - "type": "integer" - } - }, - { - "in": "query", - "name": "download", - "required": false, - "schema": { - "default": 0, - "title": "Download", - "type": "integer" - } - } - ], - "responses": { - "200": { + "503": { "content": { - "application/octet-stream": { - "schema": { - "format": "binary", - "type": "string" - } - }, - "text/html": { + "application/json": { "schema": { - "type": "string" + "properties": { + "error": { + "additionalProperties": true, + "properties": { + "code": { + "description": "Stable machine-readable error code (see the error-catalog).", + "type": "string" + }, + "details": { + "description": "Error-code-specific context (optional).", + "type": "object" + }, + "message": { + "type": "string" + } + }, + "required": [ + "code", + "message" + ], + "type": "object" + } + }, + "required": [ + "error" + ], + "type": "object" } } }, - "description": "Rendered HTML or raw artifact bytes.", + "description": "Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API's unavailability, not a problem with the presented credential.", "headers": { - "X-Request-Id": { - "description": "Request correlation identifier.", - "schema": { - "type": "string" - } - } - } - }, - "422": { - "content": { - "application/json": { + "Retry-After": { + "description": "Seconds until the caller should retry.", "schema": { - "$ref": "#/components/schemas/ValidationErrorResponse" + "minimum": 0, + "type": "integer" } - } - }, - "description": "Request validation failed.", - "headers": { + }, "X-Request-Id": { "description": "Request correlation identifier.", "schema": { @@ -23051,7 +21412,15 @@ } } }, - "summary": "View File" + "security": [ + { + "bearerAuth": [] + } + ], + "summary": "Drive Usage", + "tags": [ + "drives" + ] } } }, diff --git a/sdk/openapi.provenance.json b/sdk/openapi.provenance.json index cffed98..f3a2aa7 100644 --- a/sdk/openapi.provenance.json +++ b/sdk/openapi.provenance.json @@ -1,7 +1,7 @@ { - "generator_image": "openapitools/openapi-generator-cli:v7.24.0", - "source_commit": "190b558bf1a6e1c33fcef9f3a5f2816d4b57badb", + "generator_image": "openapitools/openapi-generator-cli:v7.24.0@sha256:5bf3dc75f764c584da8e3344c51b2f3f1e74703461d46a035b5ac1d31515cc88", + "source_commit": "31cd35c8e12aef1cbee228e965289107cb51092c", "source_path": "tests/openapi.golden.json", "source_repository": "https://github.com/tokencanopy/agentdrive", - "source_sha256": "8c43a5fe17c937d9a8514fbeb4e99c5292ad1bb12056269ab8376ae2c6077922" + "source_sha256": "e420f70cc9ea20fb4707b9fbb5a48d17b988effe61d382cab4c70c5deaee35d7" } diff --git a/sdk/python/.github/workflows/python.yml b/sdk/python/.github/workflows/python.yml deleted file mode 100644 index 9e270d4..0000000 --- a/sdk/python/.github/workflows/python.yml +++ /dev/null @@ -1,34 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python - -name: agentdrive_sdk Python package - -on: [push, pull_request] - -permissions: - contents: read - -jobs: - build: - - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] - - steps: - - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - pip install -r test-requirements.txt - - name: Test with pytest - run: | - pytest --cov=agentdrive_sdk diff --git a/sdk/python/.gitignore b/sdk/python/.gitignore deleted file mode 100644 index 65b06b9..0000000 --- a/sdk/python/.gitignore +++ /dev/null @@ -1,66 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -*.egg-info/ -.installed.cfg -*.egg - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*,cover -.hypothesis/ -venv/ -.venv/ -.python-version -.pytest_cache - -# Translations -*.mo -*.pot - -# Django stuff: -*.log - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -# Ipython Notebook -.ipynb_checkpoints diff --git a/sdk/python/.gitlab-ci.yml b/sdk/python/.gitlab-ci.yml deleted file mode 100644 index dfbee35..0000000 --- a/sdk/python/.gitlab-ci.yml +++ /dev/null @@ -1,31 +0,0 @@ -# NOTE: This file is auto generated by OpenAPI Generator. -# URL: https://openapi-generator.tech -# -# ref: https://docs.gitlab.com/ee/ci/README.html -# ref: https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Python.gitlab-ci.yml - -stages: - - test - -.pytest: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=agentdrive_sdk - -pytest-3.10: - extends: .pytest - image: python:3.10-alpine -pytest-3.11: - extends: .pytest - image: python:3.11-alpine -pytest-3.12: - extends: .pytest - image: python:3.12-alpine -pytest-3.13: - extends: .pytest - image: python:3.13-alpine -pytest-3.14: - extends: .pytest - image: python:3.14-alpine diff --git a/sdk/python/.openapi-generator-ignore b/sdk/python/.openapi-generator-ignore deleted file mode 100644 index 7484ee5..0000000 --- a/sdk/python/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/sdk/python/.travis.yml b/sdk/python/.travis.yml deleted file mode 100644 index 5d2810b..0000000 --- a/sdk/python/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.10" - - "3.11" - - "3.12" - - "3.13" - - "3.14" - # uncomment the following if needed - #- "3.14-dev" # 3.14 development branch - #- "nightly" # nightly build -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=agentdrive_sdk diff --git a/sdk/python/LICENSE b/sdk/python/LICENSE new file mode 100644 index 0000000..2511b6b --- /dev/null +++ b/sdk/python/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Mnexa AI + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/sdk/python/README.md b/sdk/python/README.md index f87c2df..9f08877 100644 --- a/sdk/python/README.md +++ b/sdk/python/README.md @@ -1,342 +1,84 @@ -# agentdrive-sdk -AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. +# AgentDrive Python SDK -This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: +`agentdrive-sdk` is the official typed Python client for the AgentDrive REST +API. Version `0.1.0` contains the Phase 1 generated core: complete synchronous +and asynchronous clients for all 42 operations in the reviewed OpenAPI +contract. The ergonomic resource facade is a later phase. -- API version: <PINNED> -- Package version: 0.0.1 -- Generator version: 7.24.0 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen +> Alpha software: the old `0.0.1` distribution predates this contract and is +> superseded. Phase 1 begins at `0.1.0`; this repository change does not itself +> publish that release. Generated operation names and models mirror the OpenAPI +> contract exactly. -## Requirements. +## Install -Python 3.10+ - -## Installation & Usage -### pip install - -If the python package is hosted on a repository, you can install directly using: - -```sh -pip install git+https://github.com/Mnexa-AI/agentdrive-sdk.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/Mnexa-AI/agentdrive-sdk.git`) - -Then import the package: -```python -import agentdrive_sdk +```bash +python -m pip install agentdrive-sdk ``` -### Setuptools +## Synchronous client -Install via [Setuptools](http://pypi.python.org/pypi/setuptools). - -```sh -python setup.py install --user -``` -(or `sudo python setup.py install` to install the package for all users) - -Then import the package: ```python -import agentdrive_sdk -``` +import os -### Tests +from agentdrive_sdk.generated.sync import ApiClient, Configuration, DrivesApi -Execute `pytest` to run the tests. +configuration = Configuration( + host="https://api.agentdrive.run", + access_token=os.environ["AGENTDRIVE_API_KEY"], +) -## Getting Started +with ApiClient(configuration) as api_client: + drives = DrivesApi(api_client) + page = drives.drives_list() + print(page) +``` -Please follow the [installation procedure](#installation--usage) and then run the following: +## Asynchronous client ```python +import os -import agentdrive_sdk -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" +from agentdrive_sdk.generated.async_client import ( + ApiClient, + Configuration, + DrivesApi, ) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.AgentAuthApi(api_client) - extension_exchange_request = agentdrive_sdk.ExtensionExchangeRequest() # ExtensionExchangeRequest | - - try: - # Redeem an extension OAuth ticket for a JWT pair - api_response = api_instance.extension_exchange_v0_auth_extension_exchange_post(extension_exchange_request) - print("The response of AgentAuthApi->extension_exchange_v0_auth_extension_exchange_post:\n") - pprint(api_response) - except ApiException as e: - print("Exception when calling AgentAuthApi->extension_exchange_v0_auth_extension_exchange_post: %s\n" % e) - +async def list_drives(): + configuration = Configuration( + host="https://api.agentdrive.run", + access_token=os.environ["AGENTDRIVE_API_KEY"], + ) + async with ApiClient(configuration) as api_client: + drives = DrivesApi(api_client) + return await drives.drives_list() ``` -## Documentation for API Endpoints - -All URIs are relative to *https://api.agentdrive.run* +Both clients also expose `*_with_http_info` and +`*_without_preload_content` variants for status, headers, streaming, and other +low-level response handling. Automatic redirects are disabled in both +transports so an AgentDrive bearer token is never forwarded to a signed-storage +or share host. Callers must inspect and follow an allowed redirect explicitly +without the authorization header. -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AgentAuthApi* | [**extension_exchange_v0_auth_extension_exchange_post**](docs/AgentAuthApi.md#extension_exchange_v0_auth_extension_exchange_post) | **POST** /v0/auth/extension/exchange | Redeem an extension OAuth ticket for a JWT pair -*AgentAuthApi* | [**initiate_claim_agent_identity_claim_post**](docs/AgentAuthApi.md#initiate_claim_agent_identity_claim_post) | **POST** /agent/identity/claim | Initiate the human-claim ceremony for an agent identity -*AgentAuthApi* | [**jwks_well_known_jwks_json_get**](docs/AgentAuthApi.md#jwks_well_known_jwks_json_get) | **GET** /.well-known/jwks.json | JSON Web Key Set — public keys for verifying AgentDrive JWTs -*AgentAuthApi* | [**oauth2_token_oauth2_token_post**](docs/AgentAuthApi.md#oauth2_token_oauth2_token_post) | **POST** /oauth2/token | Exchange a credential for an access_token -*AgentAuthApi* | [**oauth_authorization_server_well_known_oauth_authorization_server_get**](docs/AgentAuthApi.md#oauth_authorization_server_well_known_oauth_authorization_server_get) | **GET** /.well-known/oauth-authorization-server | Authorization-server metadata (RFC 8414 + auth.md agent_auth block) -*AgentAuthApi* | [**oauth_protected_resource_mcp_well_known_oauth_protected_resource_mcp_get**](docs/AgentAuthApi.md#oauth_protected_resource_mcp_well_known_oauth_protected_resource_mcp_get) | **GET** /.well-known/oauth-protected-resource/mcp | Protected-resource metadata for the MCP endpoint (RFC 9728 §3.1) -*AgentAuthApi* | [**oauth_protected_resource_well_known_oauth_protected_resource_get**](docs/AgentAuthApi.md#oauth_protected_resource_well_known_oauth_protected_resource_get) | **GET** /.well-known/oauth-protected-resource | Protected-resource metadata (auth.md / RFC 9728-like discovery) -*AgentAuthApi* | [**register_agent_identity_agent_identity_post**](docs/AgentAuthApi.md#register_agent_identity_agent_identity_post) | **POST** /agent/identity | Register an agent identity (anonymous or ID-JAG) -*DefaultApi* | [**abort_upload_v0_uploads_upload_id_delete**](docs/DefaultApi.md#abort_upload_v0_uploads_upload_id_delete) | **DELETE** /v0/uploads/{upload_id} | Abort a large (direct-to-GCS) upload session -*DefaultApi* | [**begin_upload_v0_uploads_post**](docs/DefaultApi.md#begin_upload_v0_uploads_post) | **POST** /v0/uploads | Begin a large (direct-to-GCS) upload -*DefaultApi* | [**callback_auth_callback_get**](docs/DefaultApi.md#callback_auth_callback_get) | **GET** /auth/callback | Callback -*DefaultApi* | [**cancel_job_v0_jobs_job_id_cancel_post**](docs/DefaultApi.md#cancel_job_v0_jobs_job_id_cancel_post) | **POST** /v0/jobs/{job_id}/cancel | Cancel a queued/running job -*DefaultApi* | [**commit_upload_v0_uploads_upload_id_commit_post**](docs/DefaultApi.md#commit_upload_v0_uploads_upload_id_commit_post) | **POST** /v0/uploads/{upload_id}/commit | Commit a large (direct-to-GCS) upload -*DefaultApi* | [**copy_artifact_route_v0_artifacts_art_id_copy_post**](docs/DefaultApi.md#copy_artifact_route_v0_artifacts_art_id_copy_post) | **POST** /v0/artifacts/{art_id}/copy | Duplicate an artifact to a new path (CAS-shared, new ID) -*DefaultApi* | [**copy_folder_by_id_v0_folders_fld_id_copy_post**](docs/DefaultApi.md#copy_folder_by_id_v0_folders_fld_id_copy_post) | **POST** /v0/folders/{fld_id}/copy | Duplicate a folder subtree to a new path (CAS-shared, new IDs) -*DefaultApi* | [**create_folder_by_path_v0_folders_path_put**](docs/DefaultApi.md#create_folder_by_path_v0_folders_path_put) | **PUT** /v0/folders/{path} | Create a folder (idempotent) -*DefaultApi* | [**create_grant_route_v0_grants_post**](docs/DefaultApi.md#create_grant_route_v0_grants_post) | **POST** /v0/grants | Create (or fetch) a per-principal grant on a resource -*DefaultApi* | [**create_share_route_v0_shares_post**](docs/DefaultApi.md#create_share_route_v0_shares_post) | **POST** /v0/shares | Mint a share link (returns the share_key once) -*DefaultApi* | [**delete_artifact_by_id_route_v0_artifacts_art_id_delete**](docs/DefaultApi.md#delete_artifact_by_id_route_v0_artifacts_art_id_delete) | **DELETE** /v0/artifacts/{art_id} | Soft-delete an artifact by its stable ID -*DefaultApi* | [**delete_artifact_v0_artifacts_path_delete**](docs/DefaultApi.md#delete_artifact_v0_artifacts_path_delete) | **DELETE** /v0/artifacts/{path} | Delete Artifact -*DefaultApi* | [**delete_drive_route_v0_drives_drive_id_delete**](docs/DefaultApi.md#delete_drive_route_v0_drives_drive_id_delete) | **DELETE** /v0/drives/{drive_id} | Soft-delete a drive -*DefaultApi* | [**delete_folder_by_id_v0_folders_fld_id_delete**](docs/DefaultApi.md#delete_folder_by_id_v0_folders_fld_id_delete) | **DELETE** /v0/folders/{fld_id} | Soft-delete a folder by stable ID (cascade with ?recursive=true) -*DefaultApi* | [**delete_folder_by_path_v0_folders_path_delete**](docs/DefaultApi.md#delete_folder_by_path_v0_folders_path_delete) | **DELETE** /v0/folders/{path} | Soft-delete a folder (cascade with ?recursive=true) -*DefaultApi* | [**delete_grant_route_v0_grants_grn_id_delete**](docs/DefaultApi.md#delete_grant_route_v0_grants_grn_id_delete) | **DELETE** /v0/grants/{grn_id} | Revoke a grant (can_manage, or self-revoke own grant) -*DefaultApi* | [**delete_share_route_v0_shares_shr_id_delete**](docs/DefaultApi.md#delete_share_route_v0_shares_shr_id_delete) | **DELETE** /v0/shares/{shr_id} | Revoke a share link (requires can_manage) -*DefaultApi* | [**download_artifact_by_id_v0_artifacts_art_id_download_get**](docs/DefaultApi.md#download_artifact_by_id_v0_artifacts_art_id_download_get) | **GET** /v0/artifacts/{art_id}/download | Stream the artifact bytes by stable ID (never rendered HTML) -*DefaultApi* | [**download_artifact_by_path_v0_artifacts_path_download_get**](docs/DefaultApi.md#download_artifact_by_path_v0_artifacts_path_download_get) | **GET** /v0/artifacts/{path}/download | Stream the artifact bytes by path (never rendered HTML) -*DefaultApi* | [**download_artifact_version_v0_artifacts_art_id_versions_version_number_download_get**](docs/DefaultApi.md#download_artifact_version_v0_artifacts_art_id_versions_version_number_download_get) | **GET** /v0/artifacts/{art_id}/versions/{version_number}/download | Stream bytes for a specific version (machine surface) -*DefaultApi* | [**download_url_by_id_v0_artifacts_art_id_download_url_get**](docs/DefaultApi.md#download_url_by_id_v0_artifacts_art_id_download_url_get) | **GET** /v0/artifacts/{art_id}/download-url | Signed direct-from-GCS download URL by stable ID -*DefaultApi* | [**download_url_by_path_v0_artifacts_path_download_url_get**](docs/DefaultApi.md#download_url_by_path_v0_artifacts_path_download_url_get) | **GET** /v0/artifacts/{path}/download-url | Signed direct-from-GCS download URL by path -*DefaultApi* | [**download_url_version_v0_artifacts_art_id_versions_version_number_download_url_get**](docs/DefaultApi.md#download_url_version_v0_artifacts_art_id_versions_version_number_download_url_get) | **GET** /v0/artifacts/{art_id}/versions/{version_number}/download-url | Signed direct-from-GCS download URL for a specific version -*DefaultApi* | [**enqueue_job_v0_projects_fld_id_jobs_post**](docs/DefaultApi.md#enqueue_job_v0_projects_fld_id_jobs_post) | **POST** /v0/projects/{fld_id}/jobs | Enqueue a compile job for a project (folder) -*DefaultApi* | [**extension_start_auth_extension_start_get**](docs/DefaultApi.md#extension_start_auth_extension_start_get) | **GET** /auth/extension/start | Extension Start -*DefaultApi* | [**find_v0_find_get**](docs/DefaultApi.md#find_v0_find_get) | **GET** /v0/find | Hybrid passage retrieval over the full file body -*DefaultApi* | [**get_artifact_by_id_meta_v0_artifacts_art_id_meta_get**](docs/DefaultApi.md#get_artifact_by_id_meta_v0_artifacts_art_id_meta_get) | **GET** /v0/artifacts/{art_id}/meta | Artifact metadata by stable ID (same shape as path /meta) -*DefaultApi* | [**get_artifact_by_id_v0_artifacts_art_id_get**](docs/DefaultApi.md#get_artifact_by_id_v0_artifacts_art_id_get) | **GET** /v0/artifacts/{art_id} | Canonical lookup of an artifact by its stable ID -*DefaultApi* | [**get_artifact_meta_v0_artifacts_path_meta_get**](docs/DefaultApi.md#get_artifact_meta_v0_artifacts_path_meta_get) | **GET** /v0/artifacts/{path}/meta | Get Artifact Meta -*DefaultApi* | [**get_artifact_version_v0_artifacts_art_id_versions_version_number_get**](docs/DefaultApi.md#get_artifact_version_v0_artifacts_art_id_versions_version_number_get) | **GET** /v0/artifacts/{art_id}/versions/{version_number} | Metadata for a specific version of an artifact -*DefaultApi* | [**get_drive_route_v0_drives_drive_id_get**](docs/DefaultApi.md#get_drive_route_v0_drives_drive_id_get) | **GET** /v0/drives/{drive_id} | Drive overview by id (same shape as /drives/me) -*DefaultApi* | [**get_feedback_status_v0_feedback_fbk_id_get**](docs/DefaultApi.md#get_feedback_status_v0_feedback_fbk_id_get) | **GET** /v0/feedback/{fbk_id} | Get Feedback Status -*DefaultApi* | [**get_folder_by_id_meta_v0_folders_fld_id_meta_get**](docs/DefaultApi.md#get_folder_by_id_meta_v0_folders_fld_id_meta_get) | **GET** /v0/folders/{fld_id}/meta | Folder metadata by stable ID (same shape as the bare id route) -*DefaultApi* | [**get_folder_by_id_v0_folders_fld_id_get**](docs/DefaultApi.md#get_folder_by_id_v0_folders_fld_id_get) | **GET** /v0/folders/{fld_id} | Canonical lookup of a folder by its stable ID -*DefaultApi* | [**get_folder_by_path_meta_v0_folders_path_meta_get**](docs/DefaultApi.md#get_folder_by_path_meta_v0_folders_path_meta_get) | **GET** /v0/folders/{path}/meta | Folder metadata by path (same shape as the bare path route) -*DefaultApi* | [**get_folder_by_path_v0_folders_path_get**](docs/DefaultApi.md#get_folder_by_path_v0_folders_path_get) | **GET** /v0/folders/{path} | Read folder metadata by path -*DefaultApi* | [**get_grant_route_v0_grants_grn_id_get**](docs/DefaultApi.md#get_grant_route_v0_grants_grn_id_get) | **GET** /v0/grants/{grn_id} | Read a single grant (can_manage, or the grant's own principal) -*DefaultApi* | [**get_job_logs_v0_jobs_job_id_logs_get**](docs/DefaultApi.md#get_job_logs_v0_jobs_job_id_logs_get) | **GET** /v0/jobs/{job_id}/logs | Raw compile log (text/plain) -*DefaultApi* | [**get_job_v0_jobs_job_id_get**](docs/DefaultApi.md#get_job_v0_jobs_job_id_get) | **GET** /v0/jobs/{job_id} | Poll a job -*DefaultApi* | [**get_project_v0_projects_fld_id_get**](docs/DefaultApi.md#get_project_v0_projects_fld_id_get) | **GET** /v0/projects/{fld_id} | Get a project's compile config -*DefaultApi* | [**get_share_route_v0_shares_shr_id_get**](docs/DefaultApi.md#get_share_route_v0_shares_shr_id_get) | **GET** /v0/shares/{shr_id} | Read a single share link's metadata (requires can_manage) -*DefaultApi* | [**get_upload_status_v0_uploads_upload_id_get**](docs/DefaultApi.md#get_upload_status_v0_uploads_upload_id_get) | **GET** /v0/uploads/{upload_id} | Get the status of a large (direct-to-GCS) upload session -*DefaultApi* | [**health_health_get**](docs/DefaultApi.md#health_health_get) | **GET** /health | Health -*DefaultApi* | [**list_artifact_versions_v0_artifacts_art_id_versions_get**](docs/DefaultApi.md#list_artifact_versions_v0_artifacts_art_id_versions_get) | **GET** /v0/artifacts/{art_id}/versions | List versions of an artifact, newest first -*DefaultApi* | [**list_artifacts_v0_artifacts_get**](docs/DefaultApi.md#list_artifacts_v0_artifacts_get) | **GET** /v0/artifacts | List artifacts in the drive -*DefaultApi* | [**list_events_route_v0_events_get**](docs/DefaultApi.md#list_events_route_v0_events_get) | **GET** /v0/events | Read the append-only event log for the authenticated drive -*DefaultApi* | [**list_grants_route_v0_grants_get**](docs/DefaultApi.md#list_grants_route_v0_grants_get) | **GET** /v0/grants | List live grants on a resource (requires can_manage) -*DefaultApi* | [**list_project_jobs_v0_projects_fld_id_jobs_get**](docs/DefaultApi.md#list_project_jobs_v0_projects_fld_id_jobs_get) | **GET** /v0/projects/{fld_id}/jobs | List a project's jobs -*DefaultApi* | [**list_shares_route_v0_shares_get**](docs/DefaultApi.md#list_shares_route_v0_shares_get) | **GET** /v0/shares | List live share links on a resource (requires can_manage) -*DefaultApi* | [**list_trash_route_v0_drives_drive_id_trash_get**](docs/DefaultApi.md#list_trash_route_v0_drives_drive_id_trash_get) | **GET** /v0/drives/{drive_id}/trash | List the authenticated drive's trash -*DefaultApi* | [**login_auth_login_get**](docs/DefaultApi.md#login_auth_login_get) | **GET** /auth/login | Login -*DefaultApi* | [**logout_auth_logout_post**](docs/DefaultApi.md#logout_auth_logout_post) | **POST** /auth/logout | Logout -*DefaultApi* | [**me_usage_v0_drives_me_usage_get**](docs/DefaultApi.md#me_usage_v0_drives_me_usage_get) | **GET** /v0/drives/me/usage | Current-period usage + caps for the authenticated drive -*DefaultApi* | [**me_v0_drives_me_get**](docs/DefaultApi.md#me_v0_drives_me_get) | **GET** /v0/drives/me | Me -*DefaultApi* | [**move_artifact_route_v0_artifacts_art_id_move_post**](docs/DefaultApi.md#move_artifact_route_v0_artifacts_art_id_move_post) | **POST** /v0/artifacts/{art_id}/move | Rename / move an artifact to a new path -*DefaultApi* | [**move_folder_by_id_v0_folders_fld_id_move_post**](docs/DefaultApi.md#move_folder_by_id_v0_folders_fld_id_move_post) | **POST** /v0/folders/{fld_id}/move | Rename / move a folder by stable ID (cascade descendants) -*DefaultApi* | [**move_folder_by_path_v0_folders_path_move_post**](docs/DefaultApi.md#move_folder_by_path_v0_folders_path_move_post) | **POST** /v0/folders/{path}/move | Rename / move a folder (cascade-update descendants) -*DefaultApi* | [**patch_artifact_route_v0_artifacts_art_id_patch**](docs/DefaultApi.md#patch_artifact_route_v0_artifacts_art_id_patch) | **PATCH** /v0/artifacts/{art_id} | Edit artifact metadata (labels / metadata / source) -*DefaultApi* | [**patch_folder_by_id_v0_folders_fld_id_patch**](docs/DefaultApi.md#patch_folder_by_id_v0_folders_fld_id_patch) | **PATCH** /v0/folders/{fld_id} | Update folder metadata by stable ID -*DefaultApi* | [**patch_folder_by_path_v0_folders_path_patch**](docs/DefaultApi.md#patch_folder_by_path_v0_folders_path_patch) | **PATCH** /v0/folders/{path} | Update folder metadata by path -*DefaultApi* | [**patch_grant_route_v0_grants_grn_id_patch**](docs/DefaultApi.md#patch_grant_route_v0_grants_grn_id_patch) | **PATCH** /v0/grants/{grn_id} | Update a grant's role and/or expiry (requires can_manage) -*DefaultApi* | [**post_describe_v0_query_describe_post**](docs/DefaultApi.md#post_describe_v0_query_describe_post) | **POST** /v0/query/describe | Describe a dataset's column schema -*DefaultApi* | [**post_feedback_v0_feedback_post**](docs/DefaultApi.md#post_feedback_v0_feedback_post) | **POST** /v0/feedback | Post Feedback -*DefaultApi* | [**post_lookup_values_v0_query_lookup_values_post**](docs/DefaultApi.md#post_lookup_values_v0_query_lookup_values_post) | **POST** /v0/query/lookup-values | List distinct values of a dataset column -*DefaultApi* | [**post_query_v0_query_post**](docs/DefaultApi.md#post_query_v0_query_post) | **POST** /v0/query | Run a read-only SQL query over authorized datasets -*DefaultApi* | [**put_artifact_v0_artifacts_path_put**](docs/DefaultApi.md#put_artifact_v0_artifacts_path_put) | **PUT** /v0/artifacts/{path} | Upload (or overwrite) an artifact -*DefaultApi* | [**put_project_v0_projects_fld_id_put**](docs/DefaultApi.md#put_project_v0_projects_fld_id_put) | **PUT** /v0/projects/{fld_id} | Set a project's compile config (entrypoint/engine/auto_compile) -*DefaultApi* | [**redeem_share_s_share_key_get**](docs/DefaultApi.md#redeem_share_s_share_key_get) | **GET** /s/{share_key} | Redeem Share -*DefaultApi* | [**redeem_share_with_password_s_share_key_post**](docs/DefaultApi.md#redeem_share_with_password_s_share_key_post) | **POST** /s/{share_key} | Redeem Share With Password -*DefaultApi* | [**restore_artifact_v0_artifacts_art_id_restore_post**](docs/DefaultApi.md#restore_artifact_v0_artifacts_art_id_restore_post) | **POST** /v0/artifacts/{art_id}/restore | Restore a soft-deleted artifact -*DefaultApi* | [**restore_artifact_version_v0_artifacts_art_id_versions_version_number_restore_post**](docs/DefaultApi.md#restore_artifact_version_v0_artifacts_art_id_versions_version_number_restore_post) | **POST** /v0/artifacts/{art_id}/versions/{version_number}/restore | Restore a previous version as a new head version -*DefaultApi* | [**restore_drive_route_v0_drives_drive_id_restore_post**](docs/DefaultApi.md#restore_drive_route_v0_drives_drive_id_restore_post) | **POST** /v0/drives/{drive_id}/restore | Restore a soft-deleted drive -*DefaultApi* | [**restore_folder_by_id_v0_folders_fld_id_restore_post**](docs/DefaultApi.md#restore_folder_by_id_v0_folders_fld_id_restore_post) | **POST** /v0/folders/{fld_id}/restore | Restore a soft-deleted folder (cascade) -*DefaultApi* | [**rotate_share_route_v0_shares_shr_id_rotate_post**](docs/DefaultApi.md#rotate_share_route_v0_shares_shr_id_rotate_post) | **POST** /v0/shares/{shr_id}/rotate | Revoke + reissue a share link's key (requires can_share) -*DefaultApi* | [**search_v0_search_get**](docs/DefaultApi.md#search_v0_search_get) | **GET** /v0/search | Full-text search over artifacts in the drive -*DefaultApi* | [**view_artifact_head_a_art_id_head_get**](docs/DefaultApi.md#view_artifact_head_a_art_id_head_get) | **GET** /a/{art_id}/head | View Artifact Head -*DefaultApi* | [**view_artifact_version_v_art_id_version_get**](docs/DefaultApi.md#view_artifact_version_v_art_id_version_get) | **GET** /v/{art_id}/{version} | View Artifact Version -*DefaultApi* | [**view_file_drive_id_path_get**](docs/DefaultApi.md#view_file_drive_id_path_get) | **GET** /{drive_id}/{path} | View File -*DefaultApi* | [**view_permalink_artifact_a_art_id_get**](docs/DefaultApi.md#view_permalink_artifact_a_art_id_get) | **GET** /a/{art_id} | View Permalink Artifact -*DefaultApi* | [**view_permalink_folder_f_fld_id_get**](docs/DefaultApi.md#view_permalink_folder_f_fld_id_get) | **GET** /f/{fld_id} | View Permalink Folder -*DrivesApi* | [**create_drive_key_route_v0_drives_drive_id_keys_post**](docs/DrivesApi.md#create_drive_key_route_v0_drives_drive_id_keys_post) | **POST** /v0/drives/{drive_id}/keys | Create a drive API key -*DrivesApi* | [**create_drive_route_v0_drives_post**](docs/DrivesApi.md#create_drive_route_v0_drives_post) | **POST** /v0/drives | Create a drive in your active space -*DrivesApi* | [**list_drive_keys_route_v0_drives_drive_id_keys_get**](docs/DrivesApi.md#list_drive_keys_route_v0_drives_drive_id_keys_get) | **GET** /v0/drives/{drive_id}/keys | List a drive's API keys -*DrivesApi* | [**list_drives_route_v0_drives_get**](docs/DrivesApi.md#list_drives_route_v0_drives_get) | **GET** /v0/drives | List the drives you can see -*DrivesApi* | [**rename_drive_route_v0_drives_drive_id_patch**](docs/DrivesApi.md#rename_drive_route_v0_drives_drive_id_patch) | **PATCH** /v0/drives/{drive_id} | Rename a drive you own -*DrivesApi* | [**revoke_drive_key_route_v0_drives_drive_id_keys_key_id_revoke_post**](docs/DrivesApi.md#revoke_drive_key_route_v0_drives_drive_id_keys_key_id_revoke_post) | **POST** /v0/drives/{drive_id}/keys/{key_id}/revoke | Revoke a drive API key -*DrivesApi* | [**rotate_one_key_route_v0_drives_drive_id_keys_key_id_rotate_post**](docs/DrivesApi.md#rotate_one_key_route_v0_drives_drive_id_keys_key_id_rotate_post) | **POST** /v0/drives/{drive_id}/keys/{key_id}/rotate | Rotate one API key -*McpOauthApi* | [**oauth2_register_oauth2_register_post**](docs/McpOauthApi.md#oauth2_register_oauth2_register_post) | **POST** /oauth2/register | Dynamic Client Registration (RFC 7591) -*McpOauthApi* | [**oauth2_revoke_oauth2_revoke_post**](docs/McpOauthApi.md#oauth2_revoke_oauth2_revoke_post) | **POST** /oauth2/revoke | Token revocation (RFC 7009) -*McpOauthUiApi* | [**authorize_decision_oauth2_authorize_post**](docs/McpOauthUiApi.md#authorize_decision_oauth2_authorize_post) | **POST** /oauth2/authorize | Authorize Decision -*McpOauthUiApi* | [**authorize_page_oauth2_authorize_get**](docs/McpOauthUiApi.md#authorize_page_oauth2_authorize_get) | **GET** /oauth2/authorize | Authorize Page -*MembersApi* | [**invite_member_v0_members_invite_post**](docs/MembersApi.md#invite_member_v0_members_invite_post) | **POST** /v0/members/invite | Invite a person to your workspace by email -*MembersApi* | [**list_invitations_v0_invitations_get**](docs/MembersApi.md#list_invitations_v0_invitations_get) | **GET** /v0/invitations | List pending invitations -*MembersApi* | [**list_members_v0_members_get**](docs/MembersApi.md#list_members_v0_members_get) | **GET** /v0/members | List the members of your active workspace -*MembersApi* | [**remove_member_v0_members_target_user_id_delete**](docs/MembersApi.md#remove_member_v0_members_target_user_id_delete) | **DELETE** /v0/members/{target_user_id} | Remove a member (or leave) -*MembersApi* | [**revoke_invitation_v0_invitations_invitation_id_delete**](docs/MembersApi.md#revoke_invitation_v0_invitations_invitation_id_delete) | **DELETE** /v0/invitations/{invitation_id} | Revoke a pending invitation -*MembersApi* | [**set_member_role_v0_members_target_user_id_patch**](docs/MembersApi.md#set_member_role_v0_members_target_user_id_patch) | **PATCH** /v0/members/{target_user_id} | Change a member's role -*TokensApi* | [**list_tokens_v0_tokens_get**](docs/TokensApi.md#list_tokens_v0_tokens_get) | **GET** /v0/tokens | List your user-identity tokens -*TokensApi* | [**revoke_token_v0_tokens_token_id_revoke_post**](docs/TokensApi.md#revoke_token_v0_tokens_token_id_revoke_post) | **POST** /v0/tokens/{token_id}/revoke | Revoke one of your user-identity tokens -*WorkspacesApi* | [**create_workspace_route_v0_workspaces_post**](docs/WorkspacesApi.md#create_workspace_route_v0_workspaces_post) | **POST** /v0/workspaces | Create a new shared drive -*WorkspacesApi* | [**list_workspaces_route_v0_workspaces_get**](docs/WorkspacesApi.md#list_workspaces_route_v0_workspaces_get) | **GET** /v0/workspaces | List the spaces you belong to -*WorkspacesApi* | [**rename_workspace_route_v0_workspaces_org_id_patch**](docs/WorkspacesApi.md#rename_workspace_route_v0_workspaces_org_id_patch) | **PATCH** /v0/workspaces/{org_id} | Rename a shared drive you administer +The complete generated API-class signatures, docstrings, parameters, request +media, response status/model map, and declared response headers are in the +[generated API reference](https://github.com/tokencanopy/agentdrive-sdk/blob/main/docs/python-sdk-api-reference.md). +## Generated-code boundary -## Documentation For Models +Only these directories are generated: - - [AgentAuthMetadataOut](docs/AgentAuthMetadataOut.md) - - [AnonymousIdentityResponse](docs/AnonymousIdentityResponse.md) - - [ArtifactDeleteOut](docs/ArtifactDeleteOut.md) - - [ArtifactHeadOut](docs/ArtifactHeadOut.md) - - [ArtifactMoveIn](docs/ArtifactMoveIn.md) - - [ArtifactOut](docs/ArtifactOut.md) - - [ArtifactPatchIn](docs/ArtifactPatchIn.md) - - [ArtifactSource](docs/ArtifactSource.md) - - [AuthorizationServerMetadataOut](docs/AuthorizationServerMetadataOut.md) - - [AuthorizeDecisionOauth2AuthorizePost403Response](docs/AuthorizeDecisionOauth2AuthorizePost403Response.md) - - [ClaimInitRequest](docs/ClaimInitRequest.md) - - [ClaimInitResponse](docs/ClaimInitResponse.md) - - [ClaimMetadata](docs/ClaimMetadata.md) - - [ClientRegistrationOut](docs/ClientRegistrationOut.md) - - [CompileDiagnosticOut](docs/CompileDiagnosticOut.md) - - [CompileJobIn](docs/CompileJobIn.md) - - [CompileJobListOut](docs/CompileJobListOut.md) - - [CompileJobOut](docs/CompileJobOut.md) - - [CompileOptions](docs/CompileOptions.md) - - [CompileProjectOut](docs/CompileProjectOut.md) - - [CopyIn](docs/CopyIn.md) - - [DatasetDescriptionOut](docs/DatasetDescriptionOut.md) - - [DescribeIn](docs/DescribeIn.md) - - [DownloadUrlOut](docs/DownloadUrlOut.md) - - [DriveApiKeyCreateIn](docs/DriveApiKeyCreateIn.md) - - [DriveApiKeyCreateOut](docs/DriveApiKeyCreateOut.md) - - [DriveApiKeyListOut](docs/DriveApiKeyListOut.md) - - [DriveApiKeyOut](docs/DriveApiKeyOut.md) - - [DriveCreateIn](docs/DriveCreateIn.md) - - [DriveCreateOut](docs/DriveCreateOut.md) - - [DriveDeleteOut](docs/DriveDeleteOut.md) - - [DriveList](docs/DriveList.md) - - [DriveOut](docs/DriveOut.md) - - [DriveReadOut](docs/DriveReadOut.md) - - [DriveRenameIn](docs/DriveRenameIn.md) - - [DriveRestoreOut](docs/DriveRestoreOut.md) - - [DriveUsageOut](docs/DriveUsageOut.md) - - [ErrorBody](docs/ErrorBody.md) - - [ErrorDetail](docs/ErrorDetail.md) - - [ErrorResponse](docs/ErrorResponse.md) - - [EventOut](docs/EventOut.md) - - [EventPage](docs/EventPage.md) - - [ExtensionExchangeRequest](docs/ExtensionExchangeRequest.md) - - [ExtensionExchangeResponse](docs/ExtensionExchangeResponse.md) - - [FeedbackCreateOut](docs/FeedbackCreateOut.md) - - [FeedbackStatusOut](docs/FeedbackStatusOut.md) - - [FindHitOut](docs/FindHitOut.md) - - [FindPage](docs/FindPage.md) - - [FolderCopyIn](docs/FolderCopyIn.md) - - [FolderCopyOut](docs/FolderCopyOut.md) - - [FolderCreateIn](docs/FolderCreateIn.md) - - [FolderDeleteOut](docs/FolderDeleteOut.md) - - [FolderMoveIn](docs/FolderMoveIn.md) - - [FolderOut](docs/FolderOut.md) - - [FolderPatchIn](docs/FolderPatchIn.md) - - [FolderRestoreOut](docs/FolderRestoreOut.md) - - [GrantCreateIn](docs/GrantCreateIn.md) - - [GrantList](docs/GrantList.md) - - [GrantOut](docs/GrantOut.md) - - [GrantPatchIn](docs/GrantPatchIn.md) - - [GrantPrincipalIn](docs/GrantPrincipalIn.md) - - [HealthDegradedDetail](docs/HealthDegradedDetail.md) - - [HealthDegradedResponse](docs/HealthDegradedResponse.md) - - [HealthOut](docs/HealthOut.md) - - [HourlyUsageCounterOut](docs/HourlyUsageCounterOut.md) - - [IdentityAssertionMetadataOut](docs/IdentityAssertionMetadataOut.md) - - [InvitationList](docs/InvitationList.md) - - [InvitationOut](docs/InvitationOut.md) - - [InviteCreateOut](docs/InviteCreateOut.md) - - [JwkOut](docs/JwkOut.md) - - [JwksOut](docs/JwksOut.md) - - [LocInner](docs/LocInner.md) - - [LookupValuesIn](docs/LookupValuesIn.md) - - [LookupValuesOut](docs/LookupValuesOut.md) - - [MemberInviteIn](docs/MemberInviteIn.md) - - [MemberList](docs/MemberList.md) - - [MemberOut](docs/MemberOut.md) - - [MemberRemoveOut](docs/MemberRemoveOut.md) - - [MemberRoleIn](docs/MemberRoleIn.md) - - [OAuthProtocolErrorOut](docs/OAuthProtocolErrorOut.md) - - [OperationUsageOut](docs/OperationUsageOut.md) - - [Page](docs/Page.md) - - [ProjectConfigIn](docs/ProjectConfigIn.md) - - [ProtectedResourceMetadataOut](docs/ProtectedResourceMetadataOut.md) - - [QueryColumnOut](docs/QueryColumnOut.md) - - [QueryDryRunOut](docs/QueryDryRunOut.md) - - [QueryIn](docs/QueryIn.md) - - [QueryResultOut](docs/QueryResultOut.md) - - [RegisterAgentIdentityAgentIdentityPost422Response](docs/RegisterAgentIdentityAgentIdentityPost422Response.md) - - [ResponsePostQueryV0QueryPost](docs/ResponsePostQueryV0QueryPost.md) - - [RevokeOut](docs/RevokeOut.md) - - [SearchHitOut](docs/SearchHitOut.md) - - [SearchPage](docs/SearchPage.md) - - [ShareCreateIn](docs/ShareCreateIn.md) - - [ShareErrorOut](docs/ShareErrorOut.md) - - [ShareList](docs/ShareList.md) - - [ShareMintOut](docs/ShareMintOut.md) - - [ShareOut](docs/ShareOut.md) - - [ShareRedeemOut](docs/ShareRedeemOut.md) - - [SourceRef](docs/SourceRef.md) - - [StorageBreakdownOut](docs/StorageBreakdownOut.md) - - [StorageFootprintOut](docs/StorageFootprintOut.md) - - [TokenResponse](docs/TokenResponse.md) - - [TokenUsageOut](docs/TokenUsageOut.md) - - [TrashArtifactOut](docs/TrashArtifactOut.md) - - [TrashDriveOut](docs/TrashDriveOut.md) - - [TrashOut](docs/TrashOut.md) - - [UploadAbortOut](docs/UploadAbortOut.md) - - [UploadBeginIn](docs/UploadBeginIn.md) - - [UploadBeginOut](docs/UploadBeginOut.md) - - [UploadStatusOut](docs/UploadStatusOut.md) - - [UsageCounterOut](docs/UsageCounterOut.md) - - [UsagePeriodOut](docs/UsagePeriodOut.md) - - [UserTokenList](docs/UserTokenList.md) - - [UserTokenOut](docs/UserTokenOut.md) - - [ValidationErrorBody](docs/ValidationErrorBody.md) - - [ValidationErrorDetail](docs/ValidationErrorDetail.md) - - [ValidationErrorResponse](docs/ValidationErrorResponse.md) - - [ValidationIssue](docs/ValidationIssue.md) - - [VersionOut](docs/VersionOut.md) - - [VersionPage](docs/VersionPage.md) - - [VersionRetentionOut](docs/VersionRetentionOut.md) - - [WorkspaceCreateIn](docs/WorkspaceCreateIn.md) - - [WorkspaceCreateOut](docs/WorkspaceCreateOut.md) - - [WorkspaceList](docs/WorkspaceList.md) - - [WorkspaceOut](docs/WorkspaceOut.md) - - [WorkspaceRenameIn](docs/WorkspaceRenameIn.md) +- `src/agentdrive_sdk/generated/sync` +- `src/agentdrive_sdk/generated/async_client` +Do not edit them manually. Regenerate them from the repository root with: - -## Documentation For Authorization - - -Authentication schemes defined for the API: - -### BearerAuth - -- **Type**: Bearer authentication (ad_live_ | ad_user_ | JWT) - +```bash +bash scripts/generate-sdks.sh sdk/openapi.json +``` -## Author +The package metadata, README, license, type marker, tests, and future ergonomic +facade live outside the generated tree and survive regeneration. diff --git a/sdk/python/agentdrive_sdk/__init__.py b/sdk/python/agentdrive_sdk/__init__.py deleted file mode 100644 index fb99008..0000000 --- a/sdk/python/agentdrive_sdk/__init__.py +++ /dev/null @@ -1,315 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -__version__ = "0.0.1" - -# Define package exports -__all__ = [ - "AgentAuthApi", - "DefaultApi", - "DrivesApi", - "McpOauthApi", - "McpOauthUiApi", - "MembersApi", - "TokensApi", - "WorkspacesApi", - "ApiResponse", - "ApiClient", - "Configuration", - "OpenApiException", - "ApiTypeError", - "ApiValueError", - "ApiKeyError", - "ApiAttributeError", - "ApiException", - "AgentAuthMetadataOut", - "AnonymousIdentityResponse", - "ArtifactDeleteOut", - "ArtifactHeadOut", - "ArtifactMoveIn", - "ArtifactOut", - "ArtifactPatchIn", - "ArtifactSource", - "AuthorizationServerMetadataOut", - "AuthorizeDecisionOauth2AuthorizePost403Response", - "ClaimInitRequest", - "ClaimInitResponse", - "ClaimMetadata", - "ClientRegistrationOut", - "CompileDiagnosticOut", - "CompileJobIn", - "CompileJobListOut", - "CompileJobOut", - "CompileOptions", - "CompileProjectOut", - "CopyIn", - "DatasetDescriptionOut", - "DescribeIn", - "DownloadUrlOut", - "DriveApiKeyCreateIn", - "DriveApiKeyCreateOut", - "DriveApiKeyListOut", - "DriveApiKeyOut", - "DriveCreateIn", - "DriveCreateOut", - "DriveDeleteOut", - "DriveList", - "DriveOut", - "DriveReadOut", - "DriveRenameIn", - "DriveRestoreOut", - "DriveUsageOut", - "ErrorBody", - "ErrorDetail", - "ErrorResponse", - "EventOut", - "EventPage", - "ExtensionExchangeRequest", - "ExtensionExchangeResponse", - "FeedbackCreateOut", - "FeedbackStatusOut", - "FindHitOut", - "FindPage", - "FolderCopyIn", - "FolderCopyOut", - "FolderCreateIn", - "FolderDeleteOut", - "FolderMoveIn", - "FolderOut", - "FolderPatchIn", - "FolderRestoreOut", - "GrantCreateIn", - "GrantList", - "GrantOut", - "GrantPatchIn", - "GrantPrincipalIn", - "HealthDegradedDetail", - "HealthDegradedResponse", - "HealthOut", - "HourlyUsageCounterOut", - "IdentityAssertionMetadataOut", - "InvitationList", - "InvitationOut", - "InviteCreateOut", - "JwkOut", - "JwksOut", - "LocInner", - "LookupValuesIn", - "LookupValuesOut", - "MemberInviteIn", - "MemberList", - "MemberOut", - "MemberRemoveOut", - "MemberRoleIn", - "OAuthProtocolErrorOut", - "OperationUsageOut", - "Page", - "ProjectConfigIn", - "ProtectedResourceMetadataOut", - "QueryColumnOut", - "QueryDryRunOut", - "QueryIn", - "QueryResultOut", - "RegisterAgentIdentityAgentIdentityPost422Response", - "ResponsePostQueryV0QueryPost", - "RevokeOut", - "SearchHitOut", - "SearchPage", - "ShareCreateIn", - "ShareErrorOut", - "ShareList", - "ShareMintOut", - "ShareOut", - "ShareRedeemOut", - "SourceRef", - "StorageBreakdownOut", - "StorageFootprintOut", - "TokenResponse", - "TokenUsageOut", - "TrashArtifactOut", - "TrashDriveOut", - "TrashOut", - "UploadAbortOut", - "UploadBeginIn", - "UploadBeginOut", - "UploadStatusOut", - "UsageCounterOut", - "UsagePeriodOut", - "UserTokenList", - "UserTokenOut", - "ValidationErrorBody", - "ValidationErrorDetail", - "ValidationErrorResponse", - "ValidationIssue", - "VersionOut", - "VersionPage", - "VersionRetentionOut", - "WorkspaceCreateIn", - "WorkspaceCreateOut", - "WorkspaceList", - "WorkspaceOut", - "WorkspaceRenameIn", -] - -# import apis into sdk package -from agentdrive_sdk.api.agent_auth_api import AgentAuthApi as AgentAuthApi -from agentdrive_sdk.api.default_api import DefaultApi as DefaultApi -from agentdrive_sdk.api.drives_api import DrivesApi as DrivesApi -from agentdrive_sdk.api.mcp_oauth_api import McpOauthApi as McpOauthApi -from agentdrive_sdk.api.mcp_oauth_ui_api import McpOauthUiApi as McpOauthUiApi -from agentdrive_sdk.api.members_api import MembersApi as MembersApi -from agentdrive_sdk.api.tokens_api import TokensApi as TokensApi -from agentdrive_sdk.api.workspaces_api import WorkspacesApi as WorkspacesApi - -# import ApiClient -from agentdrive_sdk.api_response import ApiResponse as ApiResponse -from agentdrive_sdk.api_client import ApiClient as ApiClient -from agentdrive_sdk.configuration import Configuration as Configuration -from agentdrive_sdk.exceptions import OpenApiException as OpenApiException -from agentdrive_sdk.exceptions import ApiTypeError as ApiTypeError -from agentdrive_sdk.exceptions import ApiValueError as ApiValueError -from agentdrive_sdk.exceptions import ApiKeyError as ApiKeyError -from agentdrive_sdk.exceptions import ApiAttributeError as ApiAttributeError -from agentdrive_sdk.exceptions import ApiException as ApiException - -# import models into sdk package -from agentdrive_sdk.models.agent_auth_metadata_out import AgentAuthMetadataOut as AgentAuthMetadataOut -from agentdrive_sdk.models.anonymous_identity_response import AnonymousIdentityResponse as AnonymousIdentityResponse -from agentdrive_sdk.models.artifact_delete_out import ArtifactDeleteOut as ArtifactDeleteOut -from agentdrive_sdk.models.artifact_head_out import ArtifactHeadOut as ArtifactHeadOut -from agentdrive_sdk.models.artifact_move_in import ArtifactMoveIn as ArtifactMoveIn -from agentdrive_sdk.models.artifact_out import ArtifactOut as ArtifactOut -from agentdrive_sdk.models.artifact_patch_in import ArtifactPatchIn as ArtifactPatchIn -from agentdrive_sdk.models.artifact_source import ArtifactSource as ArtifactSource -from agentdrive_sdk.models.authorization_server_metadata_out import AuthorizationServerMetadataOut as AuthorizationServerMetadataOut -from agentdrive_sdk.models.authorize_decision_oauth2_authorize_post403_response import AuthorizeDecisionOauth2AuthorizePost403Response as AuthorizeDecisionOauth2AuthorizePost403Response -from agentdrive_sdk.models.claim_init_request import ClaimInitRequest as ClaimInitRequest -from agentdrive_sdk.models.claim_init_response import ClaimInitResponse as ClaimInitResponse -from agentdrive_sdk.models.claim_metadata import ClaimMetadata as ClaimMetadata -from agentdrive_sdk.models.client_registration_out import ClientRegistrationOut as ClientRegistrationOut -from agentdrive_sdk.models.compile_diagnostic_out import CompileDiagnosticOut as CompileDiagnosticOut -from agentdrive_sdk.models.compile_job_in import CompileJobIn as CompileJobIn -from agentdrive_sdk.models.compile_job_list_out import CompileJobListOut as CompileJobListOut -from agentdrive_sdk.models.compile_job_out import CompileJobOut as CompileJobOut -from agentdrive_sdk.models.compile_options import CompileOptions as CompileOptions -from agentdrive_sdk.models.compile_project_out import CompileProjectOut as CompileProjectOut -from agentdrive_sdk.models.copy_in import CopyIn as CopyIn -from agentdrive_sdk.models.dataset_description_out import DatasetDescriptionOut as DatasetDescriptionOut -from agentdrive_sdk.models.describe_in import DescribeIn as DescribeIn -from agentdrive_sdk.models.download_url_out import DownloadUrlOut as DownloadUrlOut -from agentdrive_sdk.models.drive_api_key_create_in import DriveApiKeyCreateIn as DriveApiKeyCreateIn -from agentdrive_sdk.models.drive_api_key_create_out import DriveApiKeyCreateOut as DriveApiKeyCreateOut -from agentdrive_sdk.models.drive_api_key_list_out import DriveApiKeyListOut as DriveApiKeyListOut -from agentdrive_sdk.models.drive_api_key_out import DriveApiKeyOut as DriveApiKeyOut -from agentdrive_sdk.models.drive_create_in import DriveCreateIn as DriveCreateIn -from agentdrive_sdk.models.drive_create_out import DriveCreateOut as DriveCreateOut -from agentdrive_sdk.models.drive_delete_out import DriveDeleteOut as DriveDeleteOut -from agentdrive_sdk.models.drive_list import DriveList as DriveList -from agentdrive_sdk.models.drive_out import DriveOut as DriveOut -from agentdrive_sdk.models.drive_read_out import DriveReadOut as DriveReadOut -from agentdrive_sdk.models.drive_rename_in import DriveRenameIn as DriveRenameIn -from agentdrive_sdk.models.drive_restore_out import DriveRestoreOut as DriveRestoreOut -from agentdrive_sdk.models.drive_usage_out import DriveUsageOut as DriveUsageOut -from agentdrive_sdk.models.error_body import ErrorBody as ErrorBody -from agentdrive_sdk.models.error_detail import ErrorDetail as ErrorDetail -from agentdrive_sdk.models.error_response import ErrorResponse as ErrorResponse -from agentdrive_sdk.models.event_out import EventOut as EventOut -from agentdrive_sdk.models.event_page import EventPage as EventPage -from agentdrive_sdk.models.extension_exchange_request import ExtensionExchangeRequest as ExtensionExchangeRequest -from agentdrive_sdk.models.extension_exchange_response import ExtensionExchangeResponse as ExtensionExchangeResponse -from agentdrive_sdk.models.feedback_create_out import FeedbackCreateOut as FeedbackCreateOut -from agentdrive_sdk.models.feedback_status_out import FeedbackStatusOut as FeedbackStatusOut -from agentdrive_sdk.models.find_hit_out import FindHitOut as FindHitOut -from agentdrive_sdk.models.find_page import FindPage as FindPage -from agentdrive_sdk.models.folder_copy_in import FolderCopyIn as FolderCopyIn -from agentdrive_sdk.models.folder_copy_out import FolderCopyOut as FolderCopyOut -from agentdrive_sdk.models.folder_create_in import FolderCreateIn as FolderCreateIn -from agentdrive_sdk.models.folder_delete_out import FolderDeleteOut as FolderDeleteOut -from agentdrive_sdk.models.folder_move_in import FolderMoveIn as FolderMoveIn -from agentdrive_sdk.models.folder_out import FolderOut as FolderOut -from agentdrive_sdk.models.folder_patch_in import FolderPatchIn as FolderPatchIn -from agentdrive_sdk.models.folder_restore_out import FolderRestoreOut as FolderRestoreOut -from agentdrive_sdk.models.grant_create_in import GrantCreateIn as GrantCreateIn -from agentdrive_sdk.models.grant_list import GrantList as GrantList -from agentdrive_sdk.models.grant_out import GrantOut as GrantOut -from agentdrive_sdk.models.grant_patch_in import GrantPatchIn as GrantPatchIn -from agentdrive_sdk.models.grant_principal_in import GrantPrincipalIn as GrantPrincipalIn -from agentdrive_sdk.models.health_degraded_detail import HealthDegradedDetail as HealthDegradedDetail -from agentdrive_sdk.models.health_degraded_response import HealthDegradedResponse as HealthDegradedResponse -from agentdrive_sdk.models.health_out import HealthOut as HealthOut -from agentdrive_sdk.models.hourly_usage_counter_out import HourlyUsageCounterOut as HourlyUsageCounterOut -from agentdrive_sdk.models.identity_assertion_metadata_out import IdentityAssertionMetadataOut as IdentityAssertionMetadataOut -from agentdrive_sdk.models.invitation_list import InvitationList as InvitationList -from agentdrive_sdk.models.invitation_out import InvitationOut as InvitationOut -from agentdrive_sdk.models.invite_create_out import InviteCreateOut as InviteCreateOut -from agentdrive_sdk.models.jwk_out import JwkOut as JwkOut -from agentdrive_sdk.models.jwks_out import JwksOut as JwksOut -from agentdrive_sdk.models.loc_inner import LocInner as LocInner -from agentdrive_sdk.models.lookup_values_in import LookupValuesIn as LookupValuesIn -from agentdrive_sdk.models.lookup_values_out import LookupValuesOut as LookupValuesOut -from agentdrive_sdk.models.member_invite_in import MemberInviteIn as MemberInviteIn -from agentdrive_sdk.models.member_list import MemberList as MemberList -from agentdrive_sdk.models.member_out import MemberOut as MemberOut -from agentdrive_sdk.models.member_remove_out import MemberRemoveOut as MemberRemoveOut -from agentdrive_sdk.models.member_role_in import MemberRoleIn as MemberRoleIn -from agentdrive_sdk.models.o_auth_protocol_error_out import OAuthProtocolErrorOut as OAuthProtocolErrorOut -from agentdrive_sdk.models.operation_usage_out import OperationUsageOut as OperationUsageOut -from agentdrive_sdk.models.page import Page as Page -from agentdrive_sdk.models.project_config_in import ProjectConfigIn as ProjectConfigIn -from agentdrive_sdk.models.protected_resource_metadata_out import ProtectedResourceMetadataOut as ProtectedResourceMetadataOut -from agentdrive_sdk.models.query_column_out import QueryColumnOut as QueryColumnOut -from agentdrive_sdk.models.query_dry_run_out import QueryDryRunOut as QueryDryRunOut -from agentdrive_sdk.models.query_in import QueryIn as QueryIn -from agentdrive_sdk.models.query_result_out import QueryResultOut as QueryResultOut -from agentdrive_sdk.models.register_agent_identity_agent_identity_post422_response import RegisterAgentIdentityAgentIdentityPost422Response as RegisterAgentIdentityAgentIdentityPost422Response -from agentdrive_sdk.models.response_post_query_v0_query_post import ResponsePostQueryV0QueryPost as ResponsePostQueryV0QueryPost -from agentdrive_sdk.models.revoke_out import RevokeOut as RevokeOut -from agentdrive_sdk.models.search_hit_out import SearchHitOut as SearchHitOut -from agentdrive_sdk.models.search_page import SearchPage as SearchPage -from agentdrive_sdk.models.share_create_in import ShareCreateIn as ShareCreateIn -from agentdrive_sdk.models.share_error_out import ShareErrorOut as ShareErrorOut -from agentdrive_sdk.models.share_list import ShareList as ShareList -from agentdrive_sdk.models.share_mint_out import ShareMintOut as ShareMintOut -from agentdrive_sdk.models.share_out import ShareOut as ShareOut -from agentdrive_sdk.models.share_redeem_out import ShareRedeemOut as ShareRedeemOut -from agentdrive_sdk.models.source_ref import SourceRef as SourceRef -from agentdrive_sdk.models.storage_breakdown_out import StorageBreakdownOut as StorageBreakdownOut -from agentdrive_sdk.models.storage_footprint_out import StorageFootprintOut as StorageFootprintOut -from agentdrive_sdk.models.token_response import TokenResponse as TokenResponse -from agentdrive_sdk.models.token_usage_out import TokenUsageOut as TokenUsageOut -from agentdrive_sdk.models.trash_artifact_out import TrashArtifactOut as TrashArtifactOut -from agentdrive_sdk.models.trash_drive_out import TrashDriveOut as TrashDriveOut -from agentdrive_sdk.models.trash_out import TrashOut as TrashOut -from agentdrive_sdk.models.upload_abort_out import UploadAbortOut as UploadAbortOut -from agentdrive_sdk.models.upload_begin_in import UploadBeginIn as UploadBeginIn -from agentdrive_sdk.models.upload_begin_out import UploadBeginOut as UploadBeginOut -from agentdrive_sdk.models.upload_status_out import UploadStatusOut as UploadStatusOut -from agentdrive_sdk.models.usage_counter_out import UsageCounterOut as UsageCounterOut -from agentdrive_sdk.models.usage_period_out import UsagePeriodOut as UsagePeriodOut -from agentdrive_sdk.models.user_token_list import UserTokenList as UserTokenList -from agentdrive_sdk.models.user_token_out import UserTokenOut as UserTokenOut -from agentdrive_sdk.models.validation_error_body import ValidationErrorBody as ValidationErrorBody -from agentdrive_sdk.models.validation_error_detail import ValidationErrorDetail as ValidationErrorDetail -from agentdrive_sdk.models.validation_error_response import ValidationErrorResponse as ValidationErrorResponse -from agentdrive_sdk.models.validation_issue import ValidationIssue as ValidationIssue -from agentdrive_sdk.models.version_out import VersionOut as VersionOut -from agentdrive_sdk.models.version_page import VersionPage as VersionPage -from agentdrive_sdk.models.version_retention_out import VersionRetentionOut as VersionRetentionOut -from agentdrive_sdk.models.workspace_create_in import WorkspaceCreateIn as WorkspaceCreateIn -from agentdrive_sdk.models.workspace_create_out import WorkspaceCreateOut as WorkspaceCreateOut -from agentdrive_sdk.models.workspace_list import WorkspaceList as WorkspaceList -from agentdrive_sdk.models.workspace_out import WorkspaceOut as WorkspaceOut -from agentdrive_sdk.models.workspace_rename_in import WorkspaceRenameIn as WorkspaceRenameIn diff --git a/sdk/python/agentdrive_sdk/api/__init__.py b/sdk/python/agentdrive_sdk/api/__init__.py deleted file mode 100644 index a66719f..0000000 --- a/sdk/python/agentdrive_sdk/api/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -# flake8: noqa - -# import apis into api package -from agentdrive_sdk.api.agent_auth_api import AgentAuthApi -from agentdrive_sdk.api.default_api import DefaultApi -from agentdrive_sdk.api.drives_api import DrivesApi -from agentdrive_sdk.api.mcp_oauth_api import McpOauthApi -from agentdrive_sdk.api.mcp_oauth_ui_api import McpOauthUiApi -from agentdrive_sdk.api.members_api import MembersApi -from agentdrive_sdk.api.tokens_api import TokensApi -from agentdrive_sdk.api.workspaces_api import WorkspacesApi diff --git a/sdk/python/agentdrive_sdk/api/agent_auth_api.py b/sdk/python/agentdrive_sdk/api/agent_auth_api.py deleted file mode 100644 index d4671b7..0000000 --- a/sdk/python/agentdrive_sdk/api/agent_auth_api.py +++ /dev/null @@ -1,2169 +0,0 @@ -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import StrictStr -from typing import Any, Dict, Optional -from agentdrive_sdk.models.anonymous_identity_response import AnonymousIdentityResponse -from agentdrive_sdk.models.authorization_server_metadata_out import AuthorizationServerMetadataOut -from agentdrive_sdk.models.claim_init_request import ClaimInitRequest -from agentdrive_sdk.models.claim_init_response import ClaimInitResponse -from agentdrive_sdk.models.extension_exchange_request import ExtensionExchangeRequest -from agentdrive_sdk.models.extension_exchange_response import ExtensionExchangeResponse -from agentdrive_sdk.models.jwks_out import JwksOut -from agentdrive_sdk.models.protected_resource_metadata_out import ProtectedResourceMetadataOut -from agentdrive_sdk.models.token_response import TokenResponse - -from agentdrive_sdk.api_client import ApiClient, RequestSerialized -from agentdrive_sdk.api_response import ApiResponse -from agentdrive_sdk.rest import RESTResponseType - - -class AgentAuthApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def extension_exchange_v0_auth_extension_exchange_post( - self, - extension_exchange_request: ExtensionExchangeRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ExtensionExchangeResponse: - """Redeem an extension OAuth ticket for a JWT pair - - Single-use opaque ticket → JWT pair. Called once by an extension's auth-complete.html after the OAuth handoff lands. Returns a 15-minute `access_token` (scope=extension) and a 90-day `identity_assertion` the extension stores and refreshes via POST /oauth2/token. - - :param extension_exchange_request: (required) - :type extension_exchange_request: ExtensionExchangeRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._extension_exchange_v0_auth_extension_exchange_post_serialize( - extension_exchange_request=extension_exchange_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ExtensionExchangeResponse", - '400': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - '503': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def extension_exchange_v0_auth_extension_exchange_post_with_http_info( - self, - extension_exchange_request: ExtensionExchangeRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ExtensionExchangeResponse]: - """Redeem an extension OAuth ticket for a JWT pair - - Single-use opaque ticket → JWT pair. Called once by an extension's auth-complete.html after the OAuth handoff lands. Returns a 15-minute `access_token` (scope=extension) and a 90-day `identity_assertion` the extension stores and refreshes via POST /oauth2/token. - - :param extension_exchange_request: (required) - :type extension_exchange_request: ExtensionExchangeRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._extension_exchange_v0_auth_extension_exchange_post_serialize( - extension_exchange_request=extension_exchange_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ExtensionExchangeResponse", - '400': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - '503': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def extension_exchange_v0_auth_extension_exchange_post_without_preload_content( - self, - extension_exchange_request: ExtensionExchangeRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Redeem an extension OAuth ticket for a JWT pair - - Single-use opaque ticket → JWT pair. Called once by an extension's auth-complete.html after the OAuth handoff lands. Returns a 15-minute `access_token` (scope=extension) and a 90-day `identity_assertion` the extension stores and refreshes via POST /oauth2/token. - - :param extension_exchange_request: (required) - :type extension_exchange_request: ExtensionExchangeRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._extension_exchange_v0_auth_extension_exchange_post_serialize( - extension_exchange_request=extension_exchange_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ExtensionExchangeResponse", - '400': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - '503': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _extension_exchange_v0_auth_extension_exchange_post_serialize( - self, - extension_exchange_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if extension_exchange_request is not None: - _body_params = extension_exchange_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v0/auth/extension/exchange', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def initiate_claim_agent_identity_claim_post( - self, - claim_init_request: ClaimInitRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ClaimInitResponse: - """Initiate the human-claim ceremony for an agent identity - - Returns a `user_code` and `verification_uri` (RFC 8628 device-code idiom). The agent surfaces these to the human, who visits the URI, signs in, and approves the claim. The agent then polls POST /oauth2/token (grant_type=claim) with the same `claim_token` to learn when the claim completes. - - :param claim_init_request: (required) - :type claim_init_request: ClaimInitRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._initiate_claim_agent_identity_claim_post_serialize( - claim_init_request=claim_init_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ClaimInitResponse", - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def initiate_claim_agent_identity_claim_post_with_http_info( - self, - claim_init_request: ClaimInitRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ClaimInitResponse]: - """Initiate the human-claim ceremony for an agent identity - - Returns a `user_code` and `verification_uri` (RFC 8628 device-code idiom). The agent surfaces these to the human, who visits the URI, signs in, and approves the claim. The agent then polls POST /oauth2/token (grant_type=claim) with the same `claim_token` to learn when the claim completes. - - :param claim_init_request: (required) - :type claim_init_request: ClaimInitRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._initiate_claim_agent_identity_claim_post_serialize( - claim_init_request=claim_init_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ClaimInitResponse", - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def initiate_claim_agent_identity_claim_post_without_preload_content( - self, - claim_init_request: ClaimInitRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Initiate the human-claim ceremony for an agent identity - - Returns a `user_code` and `verification_uri` (RFC 8628 device-code idiom). The agent surfaces these to the human, who visits the URI, signs in, and approves the claim. The agent then polls POST /oauth2/token (grant_type=claim) with the same `claim_token` to learn when the claim completes. - - :param claim_init_request: (required) - :type claim_init_request: ClaimInitRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._initiate_claim_agent_identity_claim_post_serialize( - claim_init_request=claim_init_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ClaimInitResponse", - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _initiate_claim_agent_identity_claim_post_serialize( - self, - claim_init_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if claim_init_request is not None: - _body_params = claim_init_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/agent/identity/claim', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def jwks_well_known_jwks_json_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> JwksOut: - """JSON Web Key Set — public keys for verifying AgentDrive JWTs - - Public half of the RSA signing key for identity_assertion + access_token JWTs issued by AgentDrive. RFC 7517 shape. Cache-friendly; key rotation publishes both kids during the overlap window. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._jwks_well_known_jwks_json_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "JwksOut", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def jwks_well_known_jwks_json_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[JwksOut]: - """JSON Web Key Set — public keys for verifying AgentDrive JWTs - - Public half of the RSA signing key for identity_assertion + access_token JWTs issued by AgentDrive. RFC 7517 shape. Cache-friendly; key rotation publishes both kids during the overlap window. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._jwks_well_known_jwks_json_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "JwksOut", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def jwks_well_known_jwks_json_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """JSON Web Key Set — public keys for verifying AgentDrive JWTs - - Public half of the RSA signing key for identity_assertion + access_token JWTs issued by AgentDrive. RFC 7517 shape. Cache-friendly; key rotation publishes both kids during the overlap window. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._jwks_well_known_jwks_json_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "JwksOut", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _jwks_well_known_jwks_json_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/.well-known/jwks.json', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def oauth2_token_oauth2_token_post( - self, - grant_type: StrictStr, - assertion: Optional[StrictStr] = None, - claim_token: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TokenResponse: - """Exchange a credential for an access_token - - Two grant types: **`urn:ietf:params:oauth:grant-type:jwt-bearer`** (RFC 7523) — body `assertion=`. Returns a fresh 15-minute access_token with the same scope as the assertion. **`claim`** (custom) — body `claim_token=`. Polling endpoint for the claim ceremony. Returns one of: `authorization_pending` (400), `expired_token` (400), `access_denied` (400), or access_token + new identity_assertion + scope=full (200). - - :param grant_type: (required) - :type grant_type: str - :param assertion: - :type assertion: str - :param claim_token: - :type claim_token: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._oauth2_token_oauth2_token_post_serialize( - grant_type=grant_type, - assertion=assertion, - claim_token=claim_token, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "TokenResponse", - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def oauth2_token_oauth2_token_post_with_http_info( - self, - grant_type: StrictStr, - assertion: Optional[StrictStr] = None, - claim_token: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TokenResponse]: - """Exchange a credential for an access_token - - Two grant types: **`urn:ietf:params:oauth:grant-type:jwt-bearer`** (RFC 7523) — body `assertion=`. Returns a fresh 15-minute access_token with the same scope as the assertion. **`claim`** (custom) — body `claim_token=`. Polling endpoint for the claim ceremony. Returns one of: `authorization_pending` (400), `expired_token` (400), `access_denied` (400), or access_token + new identity_assertion + scope=full (200). - - :param grant_type: (required) - :type grant_type: str - :param assertion: - :type assertion: str - :param claim_token: - :type claim_token: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._oauth2_token_oauth2_token_post_serialize( - grant_type=grant_type, - assertion=assertion, - claim_token=claim_token, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "TokenResponse", - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def oauth2_token_oauth2_token_post_without_preload_content( - self, - grant_type: StrictStr, - assertion: Optional[StrictStr] = None, - claim_token: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Exchange a credential for an access_token - - Two grant types: **`urn:ietf:params:oauth:grant-type:jwt-bearer`** (RFC 7523) — body `assertion=`. Returns a fresh 15-minute access_token with the same scope as the assertion. **`claim`** (custom) — body `claim_token=`. Polling endpoint for the claim ceremony. Returns one of: `authorization_pending` (400), `expired_token` (400), `access_denied` (400), or access_token + new identity_assertion + scope=full (200). - - :param grant_type: (required) - :type grant_type: str - :param assertion: - :type assertion: str - :param claim_token: - :type claim_token: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._oauth2_token_oauth2_token_post_serialize( - grant_type=grant_type, - assertion=assertion, - claim_token=claim_token, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "TokenResponse", - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _oauth2_token_oauth2_token_post_serialize( - self, - grant_type, - assertion, - claim_token, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - if assertion is not None: - _form_params.append(('assertion', assertion)) - if claim_token is not None: - _form_params.append(('claim_token', claim_token)) - if grant_type is not None: - _form_params.append(('grant_type', grant_type)) - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/x-www-form-urlencoded' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/oauth2/token', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def oauth_authorization_server_well_known_oauth_authorization_server_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AuthorizationServerMetadataOut: - """Authorization-server metadata (RFC 8414 + auth.md agent_auth block) - - Discovery document for the auth.md protocol. Carries the standard RFC 8414 fields plus an `agent_auth` block per the auth.md spec — the latter is what an agent runtime keys off to find the identity + claim endpoints. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._oauth_authorization_server_well_known_oauth_authorization_server_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "AuthorizationServerMetadataOut", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def oauth_authorization_server_well_known_oauth_authorization_server_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AuthorizationServerMetadataOut]: - """Authorization-server metadata (RFC 8414 + auth.md agent_auth block) - - Discovery document for the auth.md protocol. Carries the standard RFC 8414 fields plus an `agent_auth` block per the auth.md spec — the latter is what an agent runtime keys off to find the identity + claim endpoints. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._oauth_authorization_server_well_known_oauth_authorization_server_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "AuthorizationServerMetadataOut", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def oauth_authorization_server_well_known_oauth_authorization_server_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Authorization-server metadata (RFC 8414 + auth.md agent_auth block) - - Discovery document for the auth.md protocol. Carries the standard RFC 8414 fields plus an `agent_auth` block per the auth.md spec — the latter is what an agent runtime keys off to find the identity + claim endpoints. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._oauth_authorization_server_well_known_oauth_authorization_server_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "AuthorizationServerMetadataOut", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _oauth_authorization_server_well_known_oauth_authorization_server_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/.well-known/oauth-authorization-server', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def oauth_protected_resource_mcp_well_known_oauth_protected_resource_mcp_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ProtectedResourceMetadataOut: - """Protected-resource metadata for the MCP endpoint (RFC 9728 §3.1) - - Path-inserted variant of the protected-resource document. MCP clients derive this URL from the resource URL `{origin}/mcp` (RFC 9728 §3.1: insert the well-known segment between host and path) after reading the WWW-Authenticate challenge on a 401 — it is the first hop of the client-side OAuth flow. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._oauth_protected_resource_mcp_well_known_oauth_protected_resource_mcp_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ProtectedResourceMetadataOut", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def oauth_protected_resource_mcp_well_known_oauth_protected_resource_mcp_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ProtectedResourceMetadataOut]: - """Protected-resource metadata for the MCP endpoint (RFC 9728 §3.1) - - Path-inserted variant of the protected-resource document. MCP clients derive this URL from the resource URL `{origin}/mcp` (RFC 9728 §3.1: insert the well-known segment between host and path) after reading the WWW-Authenticate challenge on a 401 — it is the first hop of the client-side OAuth flow. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._oauth_protected_resource_mcp_well_known_oauth_protected_resource_mcp_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ProtectedResourceMetadataOut", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def oauth_protected_resource_mcp_well_known_oauth_protected_resource_mcp_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Protected-resource metadata for the MCP endpoint (RFC 9728 §3.1) - - Path-inserted variant of the protected-resource document. MCP clients derive this URL from the resource URL `{origin}/mcp` (RFC 9728 §3.1: insert the well-known segment between host and path) after reading the WWW-Authenticate challenge on a 401 — it is the first hop of the client-side OAuth flow. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._oauth_protected_resource_mcp_well_known_oauth_protected_resource_mcp_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ProtectedResourceMetadataOut", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _oauth_protected_resource_mcp_well_known_oauth_protected_resource_mcp_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/.well-known/oauth-protected-resource/mcp', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def oauth_protected_resource_well_known_oauth_protected_resource_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ProtectedResourceMetadataOut: - """Protected-resource metadata (auth.md / RFC 9728-like discovery) - - Names this server as a protected resource and points clients at the authorization server they should obtain tokens from. In this design the resource server and authorization server are the same host. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._oauth_protected_resource_well_known_oauth_protected_resource_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ProtectedResourceMetadataOut", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def oauth_protected_resource_well_known_oauth_protected_resource_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ProtectedResourceMetadataOut]: - """Protected-resource metadata (auth.md / RFC 9728-like discovery) - - Names this server as a protected resource and points clients at the authorization server they should obtain tokens from. In this design the resource server and authorization server are the same host. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._oauth_protected_resource_well_known_oauth_protected_resource_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ProtectedResourceMetadataOut", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def oauth_protected_resource_well_known_oauth_protected_resource_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Protected-resource metadata (auth.md / RFC 9728-like discovery) - - Names this server as a protected resource and points clients at the authorization server they should obtain tokens from. In this design the resource server and authorization server are the same host. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._oauth_protected_resource_well_known_oauth_protected_resource_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ProtectedResourceMetadataOut", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _oauth_protected_resource_well_known_oauth_protected_resource_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/.well-known/oauth-protected-resource', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def register_agent_identity_agent_identity_post( - self, - request_body: Dict[str, Any], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> AnonymousIdentityResponse: - """Register an agent identity (anonymous or ID-JAG) - - Two registration modes: **`type=anonymous`** — Provisions a brand-new agent identity bound to a fresh shadow-org drive. No human involved; returned `identity_assertion` carries `scope=pre_claim`. A human completes the claim ceremony later via /claim. **`type=identity_assertion`** — Agent provider (e.g. WorkOS) has already minted an ID-JAG asserting a user identity binding. We verify it against the provider's JWKS and provision a **claimed** identity immediately: scope=full, drive bound to the user, no claim ceremony needed. - - :param request_body: (required) - :type request_body: Dict[str, Optional[object]] - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._register_agent_identity_agent_identity_post_serialize( - request_body=request_body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "AnonymousIdentityResponse", - '422': "RegisterAgentIdentityAgentIdentityPost422Response", - '503': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def register_agent_identity_agent_identity_post_with_http_info( - self, - request_body: Dict[str, Any], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[AnonymousIdentityResponse]: - """Register an agent identity (anonymous or ID-JAG) - - Two registration modes: **`type=anonymous`** — Provisions a brand-new agent identity bound to a fresh shadow-org drive. No human involved; returned `identity_assertion` carries `scope=pre_claim`. A human completes the claim ceremony later via /claim. **`type=identity_assertion`** — Agent provider (e.g. WorkOS) has already minted an ID-JAG asserting a user identity binding. We verify it against the provider's JWKS and provision a **claimed** identity immediately: scope=full, drive bound to the user, no claim ceremony needed. - - :param request_body: (required) - :type request_body: Dict[str, Optional[object]] - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._register_agent_identity_agent_identity_post_serialize( - request_body=request_body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "AnonymousIdentityResponse", - '422': "RegisterAgentIdentityAgentIdentityPost422Response", - '503': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def register_agent_identity_agent_identity_post_without_preload_content( - self, - request_body: Dict[str, Any], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Register an agent identity (anonymous or ID-JAG) - - Two registration modes: **`type=anonymous`** — Provisions a brand-new agent identity bound to a fresh shadow-org drive. No human involved; returned `identity_assertion` carries `scope=pre_claim`. A human completes the claim ceremony later via /claim. **`type=identity_assertion`** — Agent provider (e.g. WorkOS) has already minted an ID-JAG asserting a user identity binding. We verify it against the provider's JWKS and provision a **claimed** identity immediately: scope=full, drive bound to the user, no claim ceremony needed. - - :param request_body: (required) - :type request_body: Dict[str, Optional[object]] - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._register_agent_identity_agent_identity_post_serialize( - request_body=request_body, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "AnonymousIdentityResponse", - '422': "RegisterAgentIdentityAgentIdentityPost422Response", - '503': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _register_agent_identity_agent_identity_post_serialize( - self, - request_body, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if request_body is not None: - _body_params = request_body - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/agent/identity', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) diff --git a/sdk/python/agentdrive_sdk/api/default_api.py b/sdk/python/agentdrive_sdk/api/default_api.py deleted file mode 100644 index 13ad110..0000000 --- a/sdk/python/agentdrive_sdk/api/default_api.py +++ /dev/null @@ -1,24335 +0,0 @@ -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from datetime import datetime -from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr, field_validator -from typing import List, Optional, Tuple, Union -from typing_extensions import Annotated -from agentdrive_sdk.models.artifact_delete_out import ArtifactDeleteOut -from agentdrive_sdk.models.artifact_head_out import ArtifactHeadOut -from agentdrive_sdk.models.artifact_move_in import ArtifactMoveIn -from agentdrive_sdk.models.artifact_out import ArtifactOut -from agentdrive_sdk.models.artifact_patch_in import ArtifactPatchIn -from agentdrive_sdk.models.compile_job_in import CompileJobIn -from agentdrive_sdk.models.compile_job_list_out import CompileJobListOut -from agentdrive_sdk.models.compile_job_out import CompileJobOut -from agentdrive_sdk.models.compile_project_out import CompileProjectOut -from agentdrive_sdk.models.copy_in import CopyIn -from agentdrive_sdk.models.dataset_description_out import DatasetDescriptionOut -from agentdrive_sdk.models.describe_in import DescribeIn -from agentdrive_sdk.models.download_url_out import DownloadUrlOut -from agentdrive_sdk.models.drive_delete_out import DriveDeleteOut -from agentdrive_sdk.models.drive_read_out import DriveReadOut -from agentdrive_sdk.models.drive_restore_out import DriveRestoreOut -from agentdrive_sdk.models.drive_usage_out import DriveUsageOut -from agentdrive_sdk.models.event_page import EventPage -from agentdrive_sdk.models.feedback_create_out import FeedbackCreateOut -from agentdrive_sdk.models.feedback_status_out import FeedbackStatusOut -from agentdrive_sdk.models.find_page import FindPage -from agentdrive_sdk.models.folder_copy_in import FolderCopyIn -from agentdrive_sdk.models.folder_copy_out import FolderCopyOut -from agentdrive_sdk.models.folder_create_in import FolderCreateIn -from agentdrive_sdk.models.folder_delete_out import FolderDeleteOut -from agentdrive_sdk.models.folder_move_in import FolderMoveIn -from agentdrive_sdk.models.folder_out import FolderOut -from agentdrive_sdk.models.folder_patch_in import FolderPatchIn -from agentdrive_sdk.models.folder_restore_out import FolderRestoreOut -from agentdrive_sdk.models.grant_create_in import GrantCreateIn -from agentdrive_sdk.models.grant_list import GrantList -from agentdrive_sdk.models.grant_out import GrantOut -from agentdrive_sdk.models.grant_patch_in import GrantPatchIn -from agentdrive_sdk.models.health_out import HealthOut -from agentdrive_sdk.models.lookup_values_in import LookupValuesIn -from agentdrive_sdk.models.lookup_values_out import LookupValuesOut -from agentdrive_sdk.models.page import Page -from agentdrive_sdk.models.project_config_in import ProjectConfigIn -from agentdrive_sdk.models.query_in import QueryIn -from agentdrive_sdk.models.response_post_query_v0_query_post import ResponsePostQueryV0QueryPost -from agentdrive_sdk.models.revoke_out import RevokeOut -from agentdrive_sdk.models.search_page import SearchPage -from agentdrive_sdk.models.share_create_in import ShareCreateIn -from agentdrive_sdk.models.share_list import ShareList -from agentdrive_sdk.models.share_mint_out import ShareMintOut -from agentdrive_sdk.models.share_out import ShareOut -from agentdrive_sdk.models.share_redeem_out import ShareRedeemOut -from agentdrive_sdk.models.trash_out import TrashOut -from agentdrive_sdk.models.upload_abort_out import UploadAbortOut -from agentdrive_sdk.models.upload_begin_in import UploadBeginIn -from agentdrive_sdk.models.upload_begin_out import UploadBeginOut -from agentdrive_sdk.models.upload_status_out import UploadStatusOut -from agentdrive_sdk.models.version_out import VersionOut -from agentdrive_sdk.models.version_page import VersionPage - -from agentdrive_sdk.api_client import ApiClient, RequestSerialized -from agentdrive_sdk.api_response import ApiResponse -from agentdrive_sdk.rest import RESTResponseType - - -class DefaultApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def abort_upload_v0_uploads_upload_id_delete( - self, - upload_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UploadAbortOut: - """Abort a large (direct-to-GCS) upload session - - Release an open upload session: return its reserved quota to the drive and mark it aborted. Idempotent — aborting an already-aborted or already-expired session succeeds with `released_bytes: 0`. A committed session cannot be aborted (409 ALREADY_COMMITTED). No write budget is charged — this frees resources rather than consuming them. - - :param upload_id: (required) - :type upload_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._abort_upload_v0_uploads_upload_id_delete_serialize( - upload_id=upload_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UploadAbortOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def abort_upload_v0_uploads_upload_id_delete_with_http_info( - self, - upload_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UploadAbortOut]: - """Abort a large (direct-to-GCS) upload session - - Release an open upload session: return its reserved quota to the drive and mark it aborted. Idempotent — aborting an already-aborted or already-expired session succeeds with `released_bytes: 0`. A committed session cannot be aborted (409 ALREADY_COMMITTED). No write budget is charged — this frees resources rather than consuming them. - - :param upload_id: (required) - :type upload_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._abort_upload_v0_uploads_upload_id_delete_serialize( - upload_id=upload_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UploadAbortOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def abort_upload_v0_uploads_upload_id_delete_without_preload_content( - self, - upload_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Abort a large (direct-to-GCS) upload session - - Release an open upload session: return its reserved quota to the drive and mark it aborted. Idempotent — aborting an already-aborted or already-expired session succeeds with `released_bytes: 0`. A committed session cannot be aborted (409 ALREADY_COMMITTED). No write budget is charged — this frees resources rather than consuming them. - - :param upload_id: (required) - :type upload_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._abort_upload_v0_uploads_upload_id_delete_serialize( - upload_id=upload_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UploadAbortOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _abort_upload_v0_uploads_upload_id_delete_serialize( - self, - upload_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if upload_id is not None: - _path_params['upload_id'] = upload_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/v0/uploads/{upload_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def begin_upload_v0_uploads_post( - self, - upload_begin_in: UploadBeginIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UploadBeginOut: - """Begin a large (direct-to-GCS) upload - - Reserve quota and open a resumable upload session for a file larger than the buffered-upload limit. Returns a `upload_url` to PUT the raw bytes to DIRECTLY (no Authorization header — the URL is the credential), then call `/v0/uploads/{upload_id}/commit`. All artifact decisions (path, labels, metadata, source, if_match) are frozen here. - - :param upload_begin_in: (required) - :type upload_begin_in: UploadBeginIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._begin_upload_v0_uploads_post_serialize( - upload_begin_in=upload_begin_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UploadBeginOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '413': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def begin_upload_v0_uploads_post_with_http_info( - self, - upload_begin_in: UploadBeginIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UploadBeginOut]: - """Begin a large (direct-to-GCS) upload - - Reserve quota and open a resumable upload session for a file larger than the buffered-upload limit. Returns a `upload_url` to PUT the raw bytes to DIRECTLY (no Authorization header — the URL is the credential), then call `/v0/uploads/{upload_id}/commit`. All artifact decisions (path, labels, metadata, source, if_match) are frozen here. - - :param upload_begin_in: (required) - :type upload_begin_in: UploadBeginIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._begin_upload_v0_uploads_post_serialize( - upload_begin_in=upload_begin_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UploadBeginOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '413': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def begin_upload_v0_uploads_post_without_preload_content( - self, - upload_begin_in: UploadBeginIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Begin a large (direct-to-GCS) upload - - Reserve quota and open a resumable upload session for a file larger than the buffered-upload limit. Returns a `upload_url` to PUT the raw bytes to DIRECTLY (no Authorization header — the URL is the credential), then call `/v0/uploads/{upload_id}/commit`. All artifact decisions (path, labels, metadata, source, if_match) are frozen here. - - :param upload_begin_in: (required) - :type upload_begin_in: UploadBeginIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._begin_upload_v0_uploads_post_serialize( - upload_begin_in=upload_begin_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UploadBeginOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '413': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _begin_upload_v0_uploads_post_serialize( - self, - upload_begin_in, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if upload_begin_in is not None: - _body_params = upload_begin_in - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v0/uploads', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def callback_auth_callback_get( - self, - code: Optional[StrictStr] = None, - state: Optional[StrictStr] = None, - error: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> str: - """Callback - - Complete a sign-in. Handles the auth provider's OAuth callback and shapes failures into user-readable errors: * an invalid or expired login flow — LOGIN_FLOW_INVALID (400); * an invalid or already-used authorization code — AUTH_CODE_INVALID (400); * the upstream auth provider being unavailable — WORKOS_UNAVAILABLE (502), returned with Retry-After. - - :param code: - :type code: str - :param state: - :type state: str - :param error: - :type error: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._callback_auth_callback_get_serialize( - code=code, - state=state, - error=error, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - '302': None, - '400': "ErrorResponse", - '409': "ErrorResponse", - '422': "ValidationErrorResponse", - '502': "ErrorResponse", - '503': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def callback_auth_callback_get_with_http_info( - self, - code: Optional[StrictStr] = None, - state: Optional[StrictStr] = None, - error: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[str]: - """Callback - - Complete a sign-in. Handles the auth provider's OAuth callback and shapes failures into user-readable errors: * an invalid or expired login flow — LOGIN_FLOW_INVALID (400); * an invalid or already-used authorization code — AUTH_CODE_INVALID (400); * the upstream auth provider being unavailable — WORKOS_UNAVAILABLE (502), returned with Retry-After. - - :param code: - :type code: str - :param state: - :type state: str - :param error: - :type error: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._callback_auth_callback_get_serialize( - code=code, - state=state, - error=error, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - '302': None, - '400': "ErrorResponse", - '409': "ErrorResponse", - '422': "ValidationErrorResponse", - '502': "ErrorResponse", - '503': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def callback_auth_callback_get_without_preload_content( - self, - code: Optional[StrictStr] = None, - state: Optional[StrictStr] = None, - error: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Callback - - Complete a sign-in. Handles the auth provider's OAuth callback and shapes failures into user-readable errors: * an invalid or expired login flow — LOGIN_FLOW_INVALID (400); * an invalid or already-used authorization code — AUTH_CODE_INVALID (400); * the upstream auth provider being unavailable — WORKOS_UNAVAILABLE (502), returned with Retry-After. - - :param code: - :type code: str - :param state: - :type state: str - :param error: - :type error: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._callback_auth_callback_get_serialize( - code=code, - state=state, - error=error, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - '302': None, - '400': "ErrorResponse", - '409': "ErrorResponse", - '422': "ValidationErrorResponse", - '502': "ErrorResponse", - '503': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _callback_auth_callback_get_serialize( - self, - code, - state, - error, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if code is not None: - - _query_params.append(('code', code)) - - if state is not None: - - _query_params.append(('state', state)) - - if error is not None: - - _query_params.append(('error', error)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'text/html', - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/auth/callback', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def cancel_job_v0_jobs_job_id_cancel_post( - self, - job_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CompileJobOut: - """Cancel a queued/running job - - - :param job_id: (required) - :type job_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._cancel_job_v0_jobs_job_id_cancel_post_serialize( - job_id=job_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CompileJobOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def cancel_job_v0_jobs_job_id_cancel_post_with_http_info( - self, - job_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CompileJobOut]: - """Cancel a queued/running job - - - :param job_id: (required) - :type job_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._cancel_job_v0_jobs_job_id_cancel_post_serialize( - job_id=job_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CompileJobOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def cancel_job_v0_jobs_job_id_cancel_post_without_preload_content( - self, - job_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Cancel a queued/running job - - - :param job_id: (required) - :type job_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._cancel_job_v0_jobs_job_id_cancel_post_serialize( - job_id=job_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CompileJobOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _cancel_job_v0_jobs_job_id_cancel_post_serialize( - self, - job_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if job_id is not None: - _path_params['job_id'] = job_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v0/jobs/{job_id}/cancel', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def commit_upload_v0_uploads_upload_id_commit_post( - self, - upload_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ArtifactOut: - """Commit a large (direct-to-GCS) upload - - Finalize the upload begun at `/v0/uploads`: AgentDrive verifies the object that landed in GCS (size + checksum) and creates the artifact. Idempotent — a retry after a successful commit returns the same artifact. The write budget is charged when the upload session is created; commit retries are not charged again. - - :param upload_id: (required) - :type upload_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._commit_upload_v0_uploads_upload_id_commit_post_serialize( - upload_id=upload_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '410': "ErrorResponse", - '412': "ErrorResponse", - '413': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def commit_upload_v0_uploads_upload_id_commit_post_with_http_info( - self, - upload_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ArtifactOut]: - """Commit a large (direct-to-GCS) upload - - Finalize the upload begun at `/v0/uploads`: AgentDrive verifies the object that landed in GCS (size + checksum) and creates the artifact. Idempotent — a retry after a successful commit returns the same artifact. The write budget is charged when the upload session is created; commit retries are not charged again. - - :param upload_id: (required) - :type upload_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._commit_upload_v0_uploads_upload_id_commit_post_serialize( - upload_id=upload_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '410': "ErrorResponse", - '412': "ErrorResponse", - '413': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def commit_upload_v0_uploads_upload_id_commit_post_without_preload_content( - self, - upload_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Commit a large (direct-to-GCS) upload - - Finalize the upload begun at `/v0/uploads`: AgentDrive verifies the object that landed in GCS (size + checksum) and creates the artifact. Idempotent — a retry after a successful commit returns the same artifact. The write budget is charged when the upload session is created; commit retries are not charged again. - - :param upload_id: (required) - :type upload_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._commit_upload_v0_uploads_upload_id_commit_post_serialize( - upload_id=upload_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '410': "ErrorResponse", - '412': "ErrorResponse", - '413': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _commit_upload_v0_uploads_upload_id_commit_post_serialize( - self, - upload_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if upload_id is not None: - _path_params['upload_id'] = upload_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v0/uploads/{upload_id}/commit', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def copy_artifact_route_v0_artifacts_art_id_copy_post( - self, - art_id: StrictStr, - copy_in: CopyIn, - x_agentdrive_actor: Optional[StrictStr] = None, - if_none_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ArtifactOut: - """Duplicate an artifact to a new path (CAS-shared, new ID) - - Create a new artifact at `path` whose bytes are identical to the source artifact's. The copy reuses the source's CAS object (zero new storage) but gets a fresh `art_…` ID, a fresh version 1, and — by default — `source.refs = [{type: 'artifact', id: ''}]` so provenance is preserved. Quota: the copy's `size_bytes` is added to the drive's `storage_bytes` even though physical bytes are shared. Source-version pin: pass `from_generation` in the body to require the source's current content generation (`version_number`) to equal it (→ 412 SOURCE_VERSION_MISMATCH); a concurrent source *metadata* edit does NOT fail the copy. Destination create-only: `If-None-Match: *` returns 412 CREATE_CONFLICT (instead of 409 PATH_CONFLICT) when the target path is occupied. Returns 409 PATH_CONFLICT if the target path is already taken; 413 STORAGE_QUOTA_EXCEEDED if the copy would push the drive over its limit. - - :param art_id: (required) - :type art_id: str - :param copy_in: (required) - :type copy_in: CopyIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_none_match: - :type if_none_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._copy_artifact_route_v0_artifacts_art_id_copy_post_serialize( - art_id=art_id, - copy_in=copy_in, - x_agentdrive_actor=x_agentdrive_actor, - if_none_match=if_none_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "ArtifactOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '413': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def copy_artifact_route_v0_artifacts_art_id_copy_post_with_http_info( - self, - art_id: StrictStr, - copy_in: CopyIn, - x_agentdrive_actor: Optional[StrictStr] = None, - if_none_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ArtifactOut]: - """Duplicate an artifact to a new path (CAS-shared, new ID) - - Create a new artifact at `path` whose bytes are identical to the source artifact's. The copy reuses the source's CAS object (zero new storage) but gets a fresh `art_…` ID, a fresh version 1, and — by default — `source.refs = [{type: 'artifact', id: ''}]` so provenance is preserved. Quota: the copy's `size_bytes` is added to the drive's `storage_bytes` even though physical bytes are shared. Source-version pin: pass `from_generation` in the body to require the source's current content generation (`version_number`) to equal it (→ 412 SOURCE_VERSION_MISMATCH); a concurrent source *metadata* edit does NOT fail the copy. Destination create-only: `If-None-Match: *` returns 412 CREATE_CONFLICT (instead of 409 PATH_CONFLICT) when the target path is occupied. Returns 409 PATH_CONFLICT if the target path is already taken; 413 STORAGE_QUOTA_EXCEEDED if the copy would push the drive over its limit. - - :param art_id: (required) - :type art_id: str - :param copy_in: (required) - :type copy_in: CopyIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_none_match: - :type if_none_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._copy_artifact_route_v0_artifacts_art_id_copy_post_serialize( - art_id=art_id, - copy_in=copy_in, - x_agentdrive_actor=x_agentdrive_actor, - if_none_match=if_none_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "ArtifactOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '413': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def copy_artifact_route_v0_artifacts_art_id_copy_post_without_preload_content( - self, - art_id: StrictStr, - copy_in: CopyIn, - x_agentdrive_actor: Optional[StrictStr] = None, - if_none_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Duplicate an artifact to a new path (CAS-shared, new ID) - - Create a new artifact at `path` whose bytes are identical to the source artifact's. The copy reuses the source's CAS object (zero new storage) but gets a fresh `art_…` ID, a fresh version 1, and — by default — `source.refs = [{type: 'artifact', id: ''}]` so provenance is preserved. Quota: the copy's `size_bytes` is added to the drive's `storage_bytes` even though physical bytes are shared. Source-version pin: pass `from_generation` in the body to require the source's current content generation (`version_number`) to equal it (→ 412 SOURCE_VERSION_MISMATCH); a concurrent source *metadata* edit does NOT fail the copy. Destination create-only: `If-None-Match: *` returns 412 CREATE_CONFLICT (instead of 409 PATH_CONFLICT) when the target path is occupied. Returns 409 PATH_CONFLICT if the target path is already taken; 413 STORAGE_QUOTA_EXCEEDED if the copy would push the drive over its limit. - - :param art_id: (required) - :type art_id: str - :param copy_in: (required) - :type copy_in: CopyIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_none_match: - :type if_none_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._copy_artifact_route_v0_artifacts_art_id_copy_post_serialize( - art_id=art_id, - copy_in=copy_in, - x_agentdrive_actor=x_agentdrive_actor, - if_none_match=if_none_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "ArtifactOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '413': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _copy_artifact_route_v0_artifacts_art_id_copy_post_serialize( - self, - art_id, - copy_in, - x_agentdrive_actor, - if_none_match, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if art_id is not None: - _path_params['art_id'] = art_id - # process the query parameters - # process the header parameters - if x_agentdrive_actor is not None: - _header_params['x-agentdrive-actor'] = x_agentdrive_actor - if if_none_match is not None: - _header_params['if-none-match'] = if_none_match - # process the form parameters - # process the body parameter - if copy_in is not None: - _body_params = copy_in - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v0/artifacts/{art_id}/copy', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def copy_folder_by_id_v0_folders_fld_id_copy_post( - self, - fld_id: StrictStr, - folder_copy_in: FolderCopyIn, - x_agentdrive_actor: Optional[StrictStr] = None, - if_none_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FolderCopyOut: - """Duplicate a folder subtree to a new path (CAS-shared, new IDs) - - Clone the folder identified by URL id — and every descendant folder + artifact — under the body's `path` (canonical, trailing slash). Each copied artifact reuses the source's CAS object (zero new storage) but gets a fresh `art_…` ID, a fresh version 1, and `source.refs = [{type: 'artifact', id: ''}]` provenance. The new folder gets a fresh `fld_…` ID and the source's description. The entire subtree is copied in a SINGLE transaction — either every row lands or none does. Quota: each copy's `size_bytes` counts against the drive's `storage_bytes` even though physical bytes are shared. Source-version pin: pass `from_metageneration` in the body to require the source folder's current `metageneration` to equal it (→ 412 SOURCE_VERSION_MISMATCH). Destination create-only: `If-None-Match: *` returns 412 CREATE_CONFLICT (instead of 409 FOLDER_PATH_CONFLICT) when the destination folder is occupied. Returns 409 `FOLDER_PATH_CONFLICT` if the destination collides with a live folder or artifact; 400 `FOLDER_PATH_INVALID` if `path` is non-canonical; 413 `SUBTREE_TOO_LARGE` if the source holds more than 5000 artifacts; 413 `STORAGE_QUOTA_EXCEEDED` if the copy would push the drive over its limit. - - :param fld_id: (required) - :type fld_id: str - :param folder_copy_in: (required) - :type folder_copy_in: FolderCopyIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_none_match: - :type if_none_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._copy_folder_by_id_v0_folders_fld_id_copy_post_serialize( - fld_id=fld_id, - folder_copy_in=folder_copy_in, - x_agentdrive_actor=x_agentdrive_actor, - if_none_match=if_none_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "FolderCopyOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '413': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def copy_folder_by_id_v0_folders_fld_id_copy_post_with_http_info( - self, - fld_id: StrictStr, - folder_copy_in: FolderCopyIn, - x_agentdrive_actor: Optional[StrictStr] = None, - if_none_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FolderCopyOut]: - """Duplicate a folder subtree to a new path (CAS-shared, new IDs) - - Clone the folder identified by URL id — and every descendant folder + artifact — under the body's `path` (canonical, trailing slash). Each copied artifact reuses the source's CAS object (zero new storage) but gets a fresh `art_…` ID, a fresh version 1, and `source.refs = [{type: 'artifact', id: ''}]` provenance. The new folder gets a fresh `fld_…` ID and the source's description. The entire subtree is copied in a SINGLE transaction — either every row lands or none does. Quota: each copy's `size_bytes` counts against the drive's `storage_bytes` even though physical bytes are shared. Source-version pin: pass `from_metageneration` in the body to require the source folder's current `metageneration` to equal it (→ 412 SOURCE_VERSION_MISMATCH). Destination create-only: `If-None-Match: *` returns 412 CREATE_CONFLICT (instead of 409 FOLDER_PATH_CONFLICT) when the destination folder is occupied. Returns 409 `FOLDER_PATH_CONFLICT` if the destination collides with a live folder or artifact; 400 `FOLDER_PATH_INVALID` if `path` is non-canonical; 413 `SUBTREE_TOO_LARGE` if the source holds more than 5000 artifacts; 413 `STORAGE_QUOTA_EXCEEDED` if the copy would push the drive over its limit. - - :param fld_id: (required) - :type fld_id: str - :param folder_copy_in: (required) - :type folder_copy_in: FolderCopyIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_none_match: - :type if_none_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._copy_folder_by_id_v0_folders_fld_id_copy_post_serialize( - fld_id=fld_id, - folder_copy_in=folder_copy_in, - x_agentdrive_actor=x_agentdrive_actor, - if_none_match=if_none_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "FolderCopyOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '413': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def copy_folder_by_id_v0_folders_fld_id_copy_post_without_preload_content( - self, - fld_id: StrictStr, - folder_copy_in: FolderCopyIn, - x_agentdrive_actor: Optional[StrictStr] = None, - if_none_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Duplicate a folder subtree to a new path (CAS-shared, new IDs) - - Clone the folder identified by URL id — and every descendant folder + artifact — under the body's `path` (canonical, trailing slash). Each copied artifact reuses the source's CAS object (zero new storage) but gets a fresh `art_…` ID, a fresh version 1, and `source.refs = [{type: 'artifact', id: ''}]` provenance. The new folder gets a fresh `fld_…` ID and the source's description. The entire subtree is copied in a SINGLE transaction — either every row lands or none does. Quota: each copy's `size_bytes` counts against the drive's `storage_bytes` even though physical bytes are shared. Source-version pin: pass `from_metageneration` in the body to require the source folder's current `metageneration` to equal it (→ 412 SOURCE_VERSION_MISMATCH). Destination create-only: `If-None-Match: *` returns 412 CREATE_CONFLICT (instead of 409 FOLDER_PATH_CONFLICT) when the destination folder is occupied. Returns 409 `FOLDER_PATH_CONFLICT` if the destination collides with a live folder or artifact; 400 `FOLDER_PATH_INVALID` if `path` is non-canonical; 413 `SUBTREE_TOO_LARGE` if the source holds more than 5000 artifacts; 413 `STORAGE_QUOTA_EXCEEDED` if the copy would push the drive over its limit. - - :param fld_id: (required) - :type fld_id: str - :param folder_copy_in: (required) - :type folder_copy_in: FolderCopyIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_none_match: - :type if_none_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._copy_folder_by_id_v0_folders_fld_id_copy_post_serialize( - fld_id=fld_id, - folder_copy_in=folder_copy_in, - x_agentdrive_actor=x_agentdrive_actor, - if_none_match=if_none_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "FolderCopyOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '413': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _copy_folder_by_id_v0_folders_fld_id_copy_post_serialize( - self, - fld_id, - folder_copy_in, - x_agentdrive_actor, - if_none_match, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if fld_id is not None: - _path_params['fld_id'] = fld_id - # process the query parameters - # process the header parameters - if x_agentdrive_actor is not None: - _header_params['x-agentdrive-actor'] = x_agentdrive_actor - if if_none_match is not None: - _header_params['if-none-match'] = if_none_match - # process the form parameters - # process the body parameter - if folder_copy_in is not None: - _body_params = folder_copy_in - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v0/folders/{fld_id}/copy', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def create_folder_by_path_v0_folders_path_put( - self, - path: StrictStr, - x_agentdrive_actor: Optional[StrictStr] = None, - if_none_match: Optional[StrictStr] = None, - folder_create_in: Optional[FolderCreateIn] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FolderOut: - """Create a folder (idempotent) - - Create a folder at the URL path. Idempotent create-at-known-URI (mirrors `PUT /v0/artifacts/{path}`) — a second call for the same live path returns the existing row unchanged (metadata updates require PATCH). Returns 201 on create, 200 when the folder already exists. Send `If-None-Match: *` to make it strictly create-only: an existing folder then returns 412 CREATE_CONFLICT instead of the idempotent 200. Returns 409 `FOLDER_PATH_CONFLICT` if a live artifact occupies the file form of the path (e.g. mkdir `/foo/` when an artifact lives at `/foo`). - - :param path: (required) - :type path: str - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_none_match: - :type if_none_match: str - :param folder_create_in: - :type folder_create_in: FolderCreateIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_folder_by_path_v0_folders_path_put_serialize( - path=path, - x_agentdrive_actor=x_agentdrive_actor, - if_none_match=if_none_match, - folder_create_in=folder_create_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderOut", - '201': "FolderOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def create_folder_by_path_v0_folders_path_put_with_http_info( - self, - path: StrictStr, - x_agentdrive_actor: Optional[StrictStr] = None, - if_none_match: Optional[StrictStr] = None, - folder_create_in: Optional[FolderCreateIn] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FolderOut]: - """Create a folder (idempotent) - - Create a folder at the URL path. Idempotent create-at-known-URI (mirrors `PUT /v0/artifacts/{path}`) — a second call for the same live path returns the existing row unchanged (metadata updates require PATCH). Returns 201 on create, 200 when the folder already exists. Send `If-None-Match: *` to make it strictly create-only: an existing folder then returns 412 CREATE_CONFLICT instead of the idempotent 200. Returns 409 `FOLDER_PATH_CONFLICT` if a live artifact occupies the file form of the path (e.g. mkdir `/foo/` when an artifact lives at `/foo`). - - :param path: (required) - :type path: str - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_none_match: - :type if_none_match: str - :param folder_create_in: - :type folder_create_in: FolderCreateIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_folder_by_path_v0_folders_path_put_serialize( - path=path, - x_agentdrive_actor=x_agentdrive_actor, - if_none_match=if_none_match, - folder_create_in=folder_create_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderOut", - '201': "FolderOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def create_folder_by_path_v0_folders_path_put_without_preload_content( - self, - path: StrictStr, - x_agentdrive_actor: Optional[StrictStr] = None, - if_none_match: Optional[StrictStr] = None, - folder_create_in: Optional[FolderCreateIn] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Create a folder (idempotent) - - Create a folder at the URL path. Idempotent create-at-known-URI (mirrors `PUT /v0/artifacts/{path}`) — a second call for the same live path returns the existing row unchanged (metadata updates require PATCH). Returns 201 on create, 200 when the folder already exists. Send `If-None-Match: *` to make it strictly create-only: an existing folder then returns 412 CREATE_CONFLICT instead of the idempotent 200. Returns 409 `FOLDER_PATH_CONFLICT` if a live artifact occupies the file form of the path (e.g. mkdir `/foo/` when an artifact lives at `/foo`). - - :param path: (required) - :type path: str - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_none_match: - :type if_none_match: str - :param folder_create_in: - :type folder_create_in: FolderCreateIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_folder_by_path_v0_folders_path_put_serialize( - path=path, - x_agentdrive_actor=x_agentdrive_actor, - if_none_match=if_none_match, - folder_create_in=folder_create_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderOut", - '201': "FolderOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_folder_by_path_v0_folders_path_put_serialize( - self, - path, - x_agentdrive_actor, - if_none_match, - folder_create_in, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if path is not None: - _path_params['path'] = path - # process the query parameters - # process the header parameters - if x_agentdrive_actor is not None: - _header_params['x-agentdrive-actor'] = x_agentdrive_actor - if if_none_match is not None: - _header_params['if-none-match'] = if_none_match - # process the form parameters - # process the body parameter - if folder_create_in is not None: - _body_params = folder_create_in - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/v0/folders/{path}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def create_grant_route_v0_grants_post( - self, - grant_create_in: GrantCreateIn, - x_agentdrive_actor: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GrantOut: - """Create (or fetch) a per-principal grant on a resource - - - :param grant_create_in: (required) - :type grant_create_in: GrantCreateIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_grant_route_v0_grants_post_serialize( - grant_create_in=grant_create_in, - x_agentdrive_actor=x_agentdrive_actor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "GrantOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def create_grant_route_v0_grants_post_with_http_info( - self, - grant_create_in: GrantCreateIn, - x_agentdrive_actor: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GrantOut]: - """Create (or fetch) a per-principal grant on a resource - - - :param grant_create_in: (required) - :type grant_create_in: GrantCreateIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_grant_route_v0_grants_post_serialize( - grant_create_in=grant_create_in, - x_agentdrive_actor=x_agentdrive_actor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "GrantOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def create_grant_route_v0_grants_post_without_preload_content( - self, - grant_create_in: GrantCreateIn, - x_agentdrive_actor: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Create (or fetch) a per-principal grant on a resource - - - :param grant_create_in: (required) - :type grant_create_in: GrantCreateIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_grant_route_v0_grants_post_serialize( - grant_create_in=grant_create_in, - x_agentdrive_actor=x_agentdrive_actor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "GrantOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_grant_route_v0_grants_post_serialize( - self, - grant_create_in, - x_agentdrive_actor, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - if x_agentdrive_actor is not None: - _header_params['x-agentdrive-actor'] = x_agentdrive_actor - # process the form parameters - # process the body parameter - if grant_create_in is not None: - _body_params = grant_create_in - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v0/grants', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def create_share_route_v0_shares_post( - self, - share_create_in: ShareCreateIn, - x_agentdrive_actor: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ShareMintOut: - """Mint a share link (returns the share_key once) - - - :param share_create_in: (required) - :type share_create_in: ShareCreateIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_share_route_v0_shares_post_serialize( - share_create_in=share_create_in, - x_agentdrive_actor=x_agentdrive_actor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "ShareMintOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def create_share_route_v0_shares_post_with_http_info( - self, - share_create_in: ShareCreateIn, - x_agentdrive_actor: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ShareMintOut]: - """Mint a share link (returns the share_key once) - - - :param share_create_in: (required) - :type share_create_in: ShareCreateIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_share_route_v0_shares_post_serialize( - share_create_in=share_create_in, - x_agentdrive_actor=x_agentdrive_actor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "ShareMintOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def create_share_route_v0_shares_post_without_preload_content( - self, - share_create_in: ShareCreateIn, - x_agentdrive_actor: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Mint a share link (returns the share_key once) - - - :param share_create_in: (required) - :type share_create_in: ShareCreateIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_share_route_v0_shares_post_serialize( - share_create_in=share_create_in, - x_agentdrive_actor=x_agentdrive_actor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "ShareMintOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_share_route_v0_shares_post_serialize( - self, - share_create_in, - x_agentdrive_actor, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - if x_agentdrive_actor is not None: - _header_params['x-agentdrive-actor'] = x_agentdrive_actor - # process the form parameters - # process the body parameter - if share_create_in is not None: - _body_params = share_create_in - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v0/shares', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def delete_artifact_by_id_route_v0_artifacts_art_id_delete( - self, - art_id: StrictStr, - if_match: Optional[StrictStr] = None, - x_agentdrive_actor: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ArtifactDeleteOut: - """Soft-delete an artifact by its stable ID - - Soft-delete the artifact with this `art_…` ID. Same semantics + response shape as the path-based `DELETE /v0/artifacts/{path}` (reversible until the GC cron hard-deletes at `purge_at`; `restore_url` points at the by-id restore), but keys on the immutable id so a concurrent rename can't change the target. Returns 404 ARTIFACT_NOT_FOUND if no live artifact has this id; 403 WIKI_RESERVED for `_wiki/` artifacts (system-managed); 412 if `If-Match` doesn't match the current version. Declared before the `{path:path}` family so the id convertor wins for DELETEs. - - :param art_id: (required) - :type art_id: str - :param if_match: - :type if_match: str - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_artifact_by_id_route_v0_artifacts_art_id_delete_serialize( - art_id=art_id, - if_match=if_match, - x_agentdrive_actor=x_agentdrive_actor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactDeleteOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def delete_artifact_by_id_route_v0_artifacts_art_id_delete_with_http_info( - self, - art_id: StrictStr, - if_match: Optional[StrictStr] = None, - x_agentdrive_actor: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ArtifactDeleteOut]: - """Soft-delete an artifact by its stable ID - - Soft-delete the artifact with this `art_…` ID. Same semantics + response shape as the path-based `DELETE /v0/artifacts/{path}` (reversible until the GC cron hard-deletes at `purge_at`; `restore_url` points at the by-id restore), but keys on the immutable id so a concurrent rename can't change the target. Returns 404 ARTIFACT_NOT_FOUND if no live artifact has this id; 403 WIKI_RESERVED for `_wiki/` artifacts (system-managed); 412 if `If-Match` doesn't match the current version. Declared before the `{path:path}` family so the id convertor wins for DELETEs. - - :param art_id: (required) - :type art_id: str - :param if_match: - :type if_match: str - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_artifact_by_id_route_v0_artifacts_art_id_delete_serialize( - art_id=art_id, - if_match=if_match, - x_agentdrive_actor=x_agentdrive_actor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactDeleteOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def delete_artifact_by_id_route_v0_artifacts_art_id_delete_without_preload_content( - self, - art_id: StrictStr, - if_match: Optional[StrictStr] = None, - x_agentdrive_actor: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Soft-delete an artifact by its stable ID - - Soft-delete the artifact with this `art_…` ID. Same semantics + response shape as the path-based `DELETE /v0/artifacts/{path}` (reversible until the GC cron hard-deletes at `purge_at`; `restore_url` points at the by-id restore), but keys on the immutable id so a concurrent rename can't change the target. Returns 404 ARTIFACT_NOT_FOUND if no live artifact has this id; 403 WIKI_RESERVED for `_wiki/` artifacts (system-managed); 412 if `If-Match` doesn't match the current version. Declared before the `{path:path}` family so the id convertor wins for DELETEs. - - :param art_id: (required) - :type art_id: str - :param if_match: - :type if_match: str - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_artifact_by_id_route_v0_artifacts_art_id_delete_serialize( - art_id=art_id, - if_match=if_match, - x_agentdrive_actor=x_agentdrive_actor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactDeleteOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_artifact_by_id_route_v0_artifacts_art_id_delete_serialize( - self, - art_id, - if_match, - x_agentdrive_actor, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if art_id is not None: - _path_params['art_id'] = art_id - # process the query parameters - # process the header parameters - if if_match is not None: - _header_params['if-match'] = if_match - if x_agentdrive_actor is not None: - _header_params['x-agentdrive-actor'] = x_agentdrive_actor - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/v0/artifacts/{art_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def delete_artifact_v0_artifacts_path_delete( - self, - path: StrictStr, - if_match: Optional[StrictStr] = None, - x_agentdrive_actor: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ArtifactDeleteOut: - """Delete Artifact - - Soft-delete the artifact at the given path. A delete WITHOUT an `If-Match` precondition is last-writer-wins and will silently remove a concurrently-modified artifact. - - :param path: (required) - :type path: str - :param if_match: - :type if_match: str - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_artifact_v0_artifacts_path_delete_serialize( - path=path, - if_match=if_match, - x_agentdrive_actor=x_agentdrive_actor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactDeleteOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def delete_artifact_v0_artifacts_path_delete_with_http_info( - self, - path: StrictStr, - if_match: Optional[StrictStr] = None, - x_agentdrive_actor: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ArtifactDeleteOut]: - """Delete Artifact - - Soft-delete the artifact at the given path. A delete WITHOUT an `If-Match` precondition is last-writer-wins and will silently remove a concurrently-modified artifact. - - :param path: (required) - :type path: str - :param if_match: - :type if_match: str - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_artifact_v0_artifacts_path_delete_serialize( - path=path, - if_match=if_match, - x_agentdrive_actor=x_agentdrive_actor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactDeleteOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def delete_artifact_v0_artifacts_path_delete_without_preload_content( - self, - path: StrictStr, - if_match: Optional[StrictStr] = None, - x_agentdrive_actor: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Delete Artifact - - Soft-delete the artifact at the given path. A delete WITHOUT an `If-Match` precondition is last-writer-wins and will silently remove a concurrently-modified artifact. - - :param path: (required) - :type path: str - :param if_match: - :type if_match: str - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_artifact_v0_artifacts_path_delete_serialize( - path=path, - if_match=if_match, - x_agentdrive_actor=x_agentdrive_actor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactDeleteOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_artifact_v0_artifacts_path_delete_serialize( - self, - path, - if_match, - x_agentdrive_actor, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if path is not None: - _path_params['path'] = path - # process the query parameters - # process the header parameters - if if_match is not None: - _header_params['if-match'] = if_match - if x_agentdrive_actor is not None: - _header_params['x-agentdrive-actor'] = x_agentdrive_actor - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/v0/artifacts/{path}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def delete_drive_route_v0_drives_drive_id_delete( - self, - drive_id: StrictStr, - confirm: Optional[StrictStr] = None, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DriveDeleteOut: - """Soft-delete a drive - - Mark the drive for cleanup. All tenant data (artifacts, versions, wiki, embeddings, events) is hidden via the `live_*` views and CASCADE-removed by the GC cleanup cron at `purge_at`. Restore via `POST /v0/drives/{id}/restore` while the row is still in trash. The path-param `drive_id` MUST match the authenticated drive. Accepts either an `ad_live_` per-drive key (deletes that key's drive) or an `ad_user_` user token selecting an owned drive (workspaces-design §5.3); a `read`-scope user token is rejected with 403 `INSUFFICIENT_SCOPE`. **Guard (§8):** a workspace must retain at least one live drive — deleting the workspace's last live drive returns 409 `LAST_DRIVE`. **Explicit confirmation required:** pass `?confirm=DELETE` or the request is rejected with 400 `CONFIRM_REQUIRED`. Tenant-level deletion is the largest-blast-radius operation on the API; the static token forces a deliberate act (soft-delete still gives a restore window on top). **Optimistic concurrency:** send `If-Match` with the drive's composite ETag (`\".0.\"`, from a drive read) to make the delete conditional — a stale token returns 412 PRECONDITION_FAILED. A delete WITHOUT an `If-Match` precondition is last-writer-wins and will silently trash a concurrently-modified drive. - - :param drive_id: (required) - :type drive_id: str - :param confirm: - :type confirm: str - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_drive_route_v0_drives_drive_id_delete_serialize( - drive_id=drive_id, - confirm=confirm, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DriveDeleteOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def delete_drive_route_v0_drives_drive_id_delete_with_http_info( - self, - drive_id: StrictStr, - confirm: Optional[StrictStr] = None, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DriveDeleteOut]: - """Soft-delete a drive - - Mark the drive for cleanup. All tenant data (artifacts, versions, wiki, embeddings, events) is hidden via the `live_*` views and CASCADE-removed by the GC cleanup cron at `purge_at`. Restore via `POST /v0/drives/{id}/restore` while the row is still in trash. The path-param `drive_id` MUST match the authenticated drive. Accepts either an `ad_live_` per-drive key (deletes that key's drive) or an `ad_user_` user token selecting an owned drive (workspaces-design §5.3); a `read`-scope user token is rejected with 403 `INSUFFICIENT_SCOPE`. **Guard (§8):** a workspace must retain at least one live drive — deleting the workspace's last live drive returns 409 `LAST_DRIVE`. **Explicit confirmation required:** pass `?confirm=DELETE` or the request is rejected with 400 `CONFIRM_REQUIRED`. Tenant-level deletion is the largest-blast-radius operation on the API; the static token forces a deliberate act (soft-delete still gives a restore window on top). **Optimistic concurrency:** send `If-Match` with the drive's composite ETag (`\".0.\"`, from a drive read) to make the delete conditional — a stale token returns 412 PRECONDITION_FAILED. A delete WITHOUT an `If-Match` precondition is last-writer-wins and will silently trash a concurrently-modified drive. - - :param drive_id: (required) - :type drive_id: str - :param confirm: - :type confirm: str - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_drive_route_v0_drives_drive_id_delete_serialize( - drive_id=drive_id, - confirm=confirm, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DriveDeleteOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def delete_drive_route_v0_drives_drive_id_delete_without_preload_content( - self, - drive_id: StrictStr, - confirm: Optional[StrictStr] = None, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Soft-delete a drive - - Mark the drive for cleanup. All tenant data (artifacts, versions, wiki, embeddings, events) is hidden via the `live_*` views and CASCADE-removed by the GC cleanup cron at `purge_at`. Restore via `POST /v0/drives/{id}/restore` while the row is still in trash. The path-param `drive_id` MUST match the authenticated drive. Accepts either an `ad_live_` per-drive key (deletes that key's drive) or an `ad_user_` user token selecting an owned drive (workspaces-design §5.3); a `read`-scope user token is rejected with 403 `INSUFFICIENT_SCOPE`. **Guard (§8):** a workspace must retain at least one live drive — deleting the workspace's last live drive returns 409 `LAST_DRIVE`. **Explicit confirmation required:** pass `?confirm=DELETE` or the request is rejected with 400 `CONFIRM_REQUIRED`. Tenant-level deletion is the largest-blast-radius operation on the API; the static token forces a deliberate act (soft-delete still gives a restore window on top). **Optimistic concurrency:** send `If-Match` with the drive's composite ETag (`\".0.\"`, from a drive read) to make the delete conditional — a stale token returns 412 PRECONDITION_FAILED. A delete WITHOUT an `If-Match` precondition is last-writer-wins and will silently trash a concurrently-modified drive. - - :param drive_id: (required) - :type drive_id: str - :param confirm: - :type confirm: str - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_drive_route_v0_drives_drive_id_delete_serialize( - drive_id=drive_id, - confirm=confirm, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DriveDeleteOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_drive_route_v0_drives_drive_id_delete_serialize( - self, - drive_id, - confirm, - x_agentdrive_actor, - if_match, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if drive_id is not None: - _path_params['drive_id'] = drive_id - # process the query parameters - if confirm is not None: - - _query_params.append(('confirm', confirm)) - - # process the header parameters - if x_agentdrive_actor is not None: - _header_params['x-agentdrive-actor'] = x_agentdrive_actor - if if_match is not None: - _header_params['if-match'] = if_match - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/v0/drives/{drive_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def delete_folder_by_id_v0_folders_fld_id_delete( - self, - fld_id: StrictStr, - recursive: Optional[StrictBool] = None, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FolderDeleteOut: - """Soft-delete a folder by stable ID (cascade with ?recursive=true) - - - :param fld_id: (required) - :type fld_id: str - :param recursive: - :type recursive: bool - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_folder_by_id_v0_folders_fld_id_delete_serialize( - fld_id=fld_id, - recursive=recursive, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderDeleteOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def delete_folder_by_id_v0_folders_fld_id_delete_with_http_info( - self, - fld_id: StrictStr, - recursive: Optional[StrictBool] = None, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FolderDeleteOut]: - """Soft-delete a folder by stable ID (cascade with ?recursive=true) - - - :param fld_id: (required) - :type fld_id: str - :param recursive: - :type recursive: bool - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_folder_by_id_v0_folders_fld_id_delete_serialize( - fld_id=fld_id, - recursive=recursive, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderDeleteOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def delete_folder_by_id_v0_folders_fld_id_delete_without_preload_content( - self, - fld_id: StrictStr, - recursive: Optional[StrictBool] = None, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Soft-delete a folder by stable ID (cascade with ?recursive=true) - - - :param fld_id: (required) - :type fld_id: str - :param recursive: - :type recursive: bool - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_folder_by_id_v0_folders_fld_id_delete_serialize( - fld_id=fld_id, - recursive=recursive, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderDeleteOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_folder_by_id_v0_folders_fld_id_delete_serialize( - self, - fld_id, - recursive, - x_agentdrive_actor, - if_match, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if fld_id is not None: - _path_params['fld_id'] = fld_id - # process the query parameters - if recursive is not None: - - _query_params.append(('recursive', recursive)) - - # process the header parameters - if x_agentdrive_actor is not None: - _header_params['x-agentdrive-actor'] = x_agentdrive_actor - if if_match is not None: - _header_params['if-match'] = if_match - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/v0/folders/{fld_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def delete_folder_by_path_v0_folders_path_delete( - self, - path: StrictStr, - recursive: Optional[StrictBool] = None, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FolderDeleteOut: - """Soft-delete a folder (cascade with ?recursive=true) - - Soft-delete the folder. Refuses if the folder has live descendants unless `?recursive=true` is set, in which case ALL descendant folders + artifacts are soft-deleted in the same transaction. Returns 409 `FOLDER_RECURSIVE_REQUIRED` (with descendant counts in `colliding_path`) when recursion is needed but the flag isn't set. Retention window is frozen on `purge_at` per deletion-design.md §5.1; mid-retention tier changes don't shift it. - - :param path: (required) - :type path: str - :param recursive: - :type recursive: bool - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_folder_by_path_v0_folders_path_delete_serialize( - path=path, - recursive=recursive, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderDeleteOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def delete_folder_by_path_v0_folders_path_delete_with_http_info( - self, - path: StrictStr, - recursive: Optional[StrictBool] = None, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FolderDeleteOut]: - """Soft-delete a folder (cascade with ?recursive=true) - - Soft-delete the folder. Refuses if the folder has live descendants unless `?recursive=true` is set, in which case ALL descendant folders + artifacts are soft-deleted in the same transaction. Returns 409 `FOLDER_RECURSIVE_REQUIRED` (with descendant counts in `colliding_path`) when recursion is needed but the flag isn't set. Retention window is frozen on `purge_at` per deletion-design.md §5.1; mid-retention tier changes don't shift it. - - :param path: (required) - :type path: str - :param recursive: - :type recursive: bool - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_folder_by_path_v0_folders_path_delete_serialize( - path=path, - recursive=recursive, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderDeleteOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def delete_folder_by_path_v0_folders_path_delete_without_preload_content( - self, - path: StrictStr, - recursive: Optional[StrictBool] = None, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Soft-delete a folder (cascade with ?recursive=true) - - Soft-delete the folder. Refuses if the folder has live descendants unless `?recursive=true` is set, in which case ALL descendant folders + artifacts are soft-deleted in the same transaction. Returns 409 `FOLDER_RECURSIVE_REQUIRED` (with descendant counts in `colliding_path`) when recursion is needed but the flag isn't set. Retention window is frozen on `purge_at` per deletion-design.md §5.1; mid-retention tier changes don't shift it. - - :param path: (required) - :type path: str - :param recursive: - :type recursive: bool - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_folder_by_path_v0_folders_path_delete_serialize( - path=path, - recursive=recursive, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderDeleteOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_folder_by_path_v0_folders_path_delete_serialize( - self, - path, - recursive, - x_agentdrive_actor, - if_match, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if path is not None: - _path_params['path'] = path - # process the query parameters - if recursive is not None: - - _query_params.append(('recursive', recursive)) - - # process the header parameters - if x_agentdrive_actor is not None: - _header_params['x-agentdrive-actor'] = x_agentdrive_actor - if if_match is not None: - _header_params['if-match'] = if_match - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/v0/folders/{path}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def delete_grant_route_v0_grants_grn_id_delete( - self, - grn_id: StrictStr, - x_agentdrive_actor: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RevokeOut: - """Revoke a grant (can_manage, or self-revoke own grant) - - - :param grn_id: (required) - :type grn_id: str - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_grant_route_v0_grants_grn_id_delete_serialize( - grn_id=grn_id, - x_agentdrive_actor=x_agentdrive_actor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RevokeOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def delete_grant_route_v0_grants_grn_id_delete_with_http_info( - self, - grn_id: StrictStr, - x_agentdrive_actor: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[RevokeOut]: - """Revoke a grant (can_manage, or self-revoke own grant) - - - :param grn_id: (required) - :type grn_id: str - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_grant_route_v0_grants_grn_id_delete_serialize( - grn_id=grn_id, - x_agentdrive_actor=x_agentdrive_actor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RevokeOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def delete_grant_route_v0_grants_grn_id_delete_without_preload_content( - self, - grn_id: StrictStr, - x_agentdrive_actor: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Revoke a grant (can_manage, or self-revoke own grant) - - - :param grn_id: (required) - :type grn_id: str - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_grant_route_v0_grants_grn_id_delete_serialize( - grn_id=grn_id, - x_agentdrive_actor=x_agentdrive_actor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RevokeOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_grant_route_v0_grants_grn_id_delete_serialize( - self, - grn_id, - x_agentdrive_actor, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if grn_id is not None: - _path_params['grn_id'] = grn_id - # process the query parameters - # process the header parameters - if x_agentdrive_actor is not None: - _header_params['x-agentdrive-actor'] = x_agentdrive_actor - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/v0/grants/{grn_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def delete_share_route_v0_shares_shr_id_delete( - self, - shr_id: StrictStr, - x_agentdrive_actor: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RevokeOut: - """Revoke a share link (requires can_manage) - - - :param shr_id: (required) - :type shr_id: str - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_share_route_v0_shares_shr_id_delete_serialize( - shr_id=shr_id, - x_agentdrive_actor=x_agentdrive_actor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RevokeOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def delete_share_route_v0_shares_shr_id_delete_with_http_info( - self, - shr_id: StrictStr, - x_agentdrive_actor: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[RevokeOut]: - """Revoke a share link (requires can_manage) - - - :param shr_id: (required) - :type shr_id: str - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_share_route_v0_shares_shr_id_delete_serialize( - shr_id=shr_id, - x_agentdrive_actor=x_agentdrive_actor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RevokeOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def delete_share_route_v0_shares_shr_id_delete_without_preload_content( - self, - shr_id: StrictStr, - x_agentdrive_actor: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Revoke a share link (requires can_manage) - - - :param shr_id: (required) - :type shr_id: str - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_share_route_v0_shares_shr_id_delete_serialize( - shr_id=shr_id, - x_agentdrive_actor=x_agentdrive_actor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RevokeOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_share_route_v0_shares_shr_id_delete_serialize( - self, - shr_id, - x_agentdrive_actor, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if shr_id is not None: - _path_params['shr_id'] = shr_id - # process the query parameters - # process the header parameters - if x_agentdrive_actor is not None: - _header_params['x-agentdrive-actor'] = x_agentdrive_actor - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/v0/shares/{shr_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def download_artifact_by_id_v0_artifacts_art_id_download_get( - self, - art_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> bytes: - """Stream the artifact bytes by stable ID (never rendered HTML) - - - :param art_id: (required) - :type art_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._download_artifact_by_id_v0_artifacts_art_id_download_get_serialize( - art_id=art_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytes", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def download_artifact_by_id_v0_artifacts_art_id_download_get_with_http_info( - self, - art_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[bytes]: - """Stream the artifact bytes by stable ID (never rendered HTML) - - - :param art_id: (required) - :type art_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._download_artifact_by_id_v0_artifacts_art_id_download_get_serialize( - art_id=art_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytes", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def download_artifact_by_id_v0_artifacts_art_id_download_get_without_preload_content( - self, - art_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Stream the artifact bytes by stable ID (never rendered HTML) - - - :param art_id: (required) - :type art_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._download_artifact_by_id_v0_artifacts_art_id_download_get_serialize( - art_id=art_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytes", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _download_artifact_by_id_v0_artifacts_art_id_download_get_serialize( - self, - art_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if art_id is not None: - _path_params['art_id'] = art_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/octet-stream', - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/artifacts/{art_id}/download', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def download_artifact_by_path_v0_artifacts_path_download_get( - self, - path: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> bytes: - """Stream the artifact bytes by path (never rendered HTML) - - Same bytes-only machine surface as `/{art_id}/download` but resolves the artifact by path, so callers don't have to resolve path→id first. Applies the identical CSP `sandbox` + `nosniff` posture (never serves HTML inline as active content). - - :param path: (required) - :type path: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._download_artifact_by_path_v0_artifacts_path_download_get_serialize( - path=path, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytes", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def download_artifact_by_path_v0_artifacts_path_download_get_with_http_info( - self, - path: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[bytes]: - """Stream the artifact bytes by path (never rendered HTML) - - Same bytes-only machine surface as `/{art_id}/download` but resolves the artifact by path, so callers don't have to resolve path→id first. Applies the identical CSP `sandbox` + `nosniff` posture (never serves HTML inline as active content). - - :param path: (required) - :type path: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._download_artifact_by_path_v0_artifacts_path_download_get_serialize( - path=path, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytes", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def download_artifact_by_path_v0_artifacts_path_download_get_without_preload_content( - self, - path: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Stream the artifact bytes by path (never rendered HTML) - - Same bytes-only machine surface as `/{art_id}/download` but resolves the artifact by path, so callers don't have to resolve path→id first. Applies the identical CSP `sandbox` + `nosniff` posture (never serves HTML inline as active content). - - :param path: (required) - :type path: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._download_artifact_by_path_v0_artifacts_path_download_get_serialize( - path=path, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytes", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _download_artifact_by_path_v0_artifacts_path_download_get_serialize( - self, - path, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if path is not None: - _path_params['path'] = path - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/octet-stream', - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/artifacts/{path}/download', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def download_artifact_version_v0_artifacts_art_id_versions_version_number_download_get( - self, - art_id: StrictStr, - version_number: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> bytes: - """Stream bytes for a specific version (machine surface) - - - :param art_id: (required) - :type art_id: str - :param version_number: (required) - :type version_number: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._download_artifact_version_v0_artifacts_art_id_versions_version_number_download_get_serialize( - art_id=art_id, - version_number=version_number, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytes", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '410': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def download_artifact_version_v0_artifacts_art_id_versions_version_number_download_get_with_http_info( - self, - art_id: StrictStr, - version_number: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[bytes]: - """Stream bytes for a specific version (machine surface) - - - :param art_id: (required) - :type art_id: str - :param version_number: (required) - :type version_number: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._download_artifact_version_v0_artifacts_art_id_versions_version_number_download_get_serialize( - art_id=art_id, - version_number=version_number, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytes", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '410': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def download_artifact_version_v0_artifacts_art_id_versions_version_number_download_get_without_preload_content( - self, - art_id: StrictStr, - version_number: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Stream bytes for a specific version (machine surface) - - - :param art_id: (required) - :type art_id: str - :param version_number: (required) - :type version_number: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._download_artifact_version_v0_artifacts_art_id_versions_version_number_download_get_serialize( - art_id=art_id, - version_number=version_number, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytes", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '410': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _download_artifact_version_v0_artifacts_art_id_versions_version_number_download_get_serialize( - self, - art_id, - version_number, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if art_id is not None: - _path_params['art_id'] = art_id - if version_number is not None: - _path_params['version_number'] = version_number - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/octet-stream', - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/artifacts/{art_id}/versions/{version_number}/download', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def download_url_by_id_v0_artifacts_art_id_download_url_get( - self, - art_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DownloadUrlOut: - """Signed direct-from-GCS download URL by stable ID - - Returns a URL for the artifact's bytes. For large artifacts (>= the signed-download threshold) when signing is available, it's a short-lived **signed GCS URL** the client fetches directly (`direct:true`, `expires_at` set); otherwise the **proxy** `/download` URL (`direct:false`). Treat the URL as opaque. large-download-design.md §5.1. - - :param art_id: (required) - :type art_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._download_url_by_id_v0_artifacts_art_id_download_url_get_serialize( - art_id=art_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DownloadUrlOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def download_url_by_id_v0_artifacts_art_id_download_url_get_with_http_info( - self, - art_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DownloadUrlOut]: - """Signed direct-from-GCS download URL by stable ID - - Returns a URL for the artifact's bytes. For large artifacts (>= the signed-download threshold) when signing is available, it's a short-lived **signed GCS URL** the client fetches directly (`direct:true`, `expires_at` set); otherwise the **proxy** `/download` URL (`direct:false`). Treat the URL as opaque. large-download-design.md §5.1. - - :param art_id: (required) - :type art_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._download_url_by_id_v0_artifacts_art_id_download_url_get_serialize( - art_id=art_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DownloadUrlOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def download_url_by_id_v0_artifacts_art_id_download_url_get_without_preload_content( - self, - art_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Signed direct-from-GCS download URL by stable ID - - Returns a URL for the artifact's bytes. For large artifacts (>= the signed-download threshold) when signing is available, it's a short-lived **signed GCS URL** the client fetches directly (`direct:true`, `expires_at` set); otherwise the **proxy** `/download` URL (`direct:false`). Treat the URL as opaque. large-download-design.md §5.1. - - :param art_id: (required) - :type art_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._download_url_by_id_v0_artifacts_art_id_download_url_get_serialize( - art_id=art_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DownloadUrlOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _download_url_by_id_v0_artifacts_art_id_download_url_get_serialize( - self, - art_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if art_id is not None: - _path_params['art_id'] = art_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/artifacts/{art_id}/download-url', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def download_url_by_path_v0_artifacts_path_download_url_get( - self, - path: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DownloadUrlOut: - """Signed direct-from-GCS download URL by path - - Same as `/{art_id}/download-url` but resolves the artifact by path. The returned proxy URL (when `direct:false`) still points at the by-id `/download` endpoint. large-download-design.md §5.1. - - :param path: (required) - :type path: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._download_url_by_path_v0_artifacts_path_download_url_get_serialize( - path=path, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DownloadUrlOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def download_url_by_path_v0_artifacts_path_download_url_get_with_http_info( - self, - path: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DownloadUrlOut]: - """Signed direct-from-GCS download URL by path - - Same as `/{art_id}/download-url` but resolves the artifact by path. The returned proxy URL (when `direct:false`) still points at the by-id `/download` endpoint. large-download-design.md §5.1. - - :param path: (required) - :type path: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._download_url_by_path_v0_artifacts_path_download_url_get_serialize( - path=path, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DownloadUrlOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def download_url_by_path_v0_artifacts_path_download_url_get_without_preload_content( - self, - path: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Signed direct-from-GCS download URL by path - - Same as `/{art_id}/download-url` but resolves the artifact by path. The returned proxy URL (when `direct:false`) still points at the by-id `/download` endpoint. large-download-design.md §5.1. - - :param path: (required) - :type path: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._download_url_by_path_v0_artifacts_path_download_url_get_serialize( - path=path, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DownloadUrlOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _download_url_by_path_v0_artifacts_path_download_url_get_serialize( - self, - path, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if path is not None: - _path_params['path'] = path - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/artifacts/{path}/download-url', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def download_url_version_v0_artifacts_art_id_versions_version_number_download_url_get( - self, - art_id: StrictStr, - version_number: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DownloadUrlOut: - """Signed direct-from-GCS download URL for a specific version - - Same as `/{art_id}/download-url` but for a specific version's bytes (`direct:true` signed GCS URL when large + signing available, else the proxy `/versions/{n}/download` URL). large-download-design.md §5.1. - - :param art_id: (required) - :type art_id: str - :param version_number: (required) - :type version_number: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._download_url_version_v0_artifacts_art_id_versions_version_number_download_url_get_serialize( - art_id=art_id, - version_number=version_number, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DownloadUrlOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '410': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def download_url_version_v0_artifacts_art_id_versions_version_number_download_url_get_with_http_info( - self, - art_id: StrictStr, - version_number: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DownloadUrlOut]: - """Signed direct-from-GCS download URL for a specific version - - Same as `/{art_id}/download-url` but for a specific version's bytes (`direct:true` signed GCS URL when large + signing available, else the proxy `/versions/{n}/download` URL). large-download-design.md §5.1. - - :param art_id: (required) - :type art_id: str - :param version_number: (required) - :type version_number: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._download_url_version_v0_artifacts_art_id_versions_version_number_download_url_get_serialize( - art_id=art_id, - version_number=version_number, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DownloadUrlOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '410': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def download_url_version_v0_artifacts_art_id_versions_version_number_download_url_get_without_preload_content( - self, - art_id: StrictStr, - version_number: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Signed direct-from-GCS download URL for a specific version - - Same as `/{art_id}/download-url` but for a specific version's bytes (`direct:true` signed GCS URL when large + signing available, else the proxy `/versions/{n}/download` URL). large-download-design.md §5.1. - - :param art_id: (required) - :type art_id: str - :param version_number: (required) - :type version_number: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._download_url_version_v0_artifacts_art_id_versions_version_number_download_url_get_serialize( - art_id=art_id, - version_number=version_number, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DownloadUrlOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '410': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _download_url_version_v0_artifacts_art_id_versions_version_number_download_url_get_serialize( - self, - art_id, - version_number, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if art_id is not None: - _path_params['art_id'] = art_id - if version_number is not None: - _path_params['version_number'] = version_number - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/artifacts/{art_id}/versions/{version_number}/download-url', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def enqueue_job_v0_projects_fld_id_jobs_post( - self, - fld_id: StrictStr, - compile_job_in: CompileJobIn, - x_agentdrive_actor: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CompileJobOut: - """Enqueue a compile job for a project (folder) - - - :param fld_id: (required) - :type fld_id: str - :param compile_job_in: (required) - :type compile_job_in: CompileJobIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._enqueue_job_v0_projects_fld_id_jobs_post_serialize( - fld_id=fld_id, - compile_job_in=compile_job_in, - x_agentdrive_actor=x_agentdrive_actor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CompileJobOut", - '202': "CompileJobOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '402': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '413': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def enqueue_job_v0_projects_fld_id_jobs_post_with_http_info( - self, - fld_id: StrictStr, - compile_job_in: CompileJobIn, - x_agentdrive_actor: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CompileJobOut]: - """Enqueue a compile job for a project (folder) - - - :param fld_id: (required) - :type fld_id: str - :param compile_job_in: (required) - :type compile_job_in: CompileJobIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._enqueue_job_v0_projects_fld_id_jobs_post_serialize( - fld_id=fld_id, - compile_job_in=compile_job_in, - x_agentdrive_actor=x_agentdrive_actor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CompileJobOut", - '202': "CompileJobOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '402': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '413': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def enqueue_job_v0_projects_fld_id_jobs_post_without_preload_content( - self, - fld_id: StrictStr, - compile_job_in: CompileJobIn, - x_agentdrive_actor: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Enqueue a compile job for a project (folder) - - - :param fld_id: (required) - :type fld_id: str - :param compile_job_in: (required) - :type compile_job_in: CompileJobIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._enqueue_job_v0_projects_fld_id_jobs_post_serialize( - fld_id=fld_id, - compile_job_in=compile_job_in, - x_agentdrive_actor=x_agentdrive_actor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CompileJobOut", - '202': "CompileJobOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '402': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '413': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _enqueue_job_v0_projects_fld_id_jobs_post_serialize( - self, - fld_id, - compile_job_in, - x_agentdrive_actor, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if fld_id is not None: - _path_params['fld_id'] = fld_id - # process the query parameters - # process the header parameters - if x_agentdrive_actor is not None: - _header_params['x-agentdrive-actor'] = x_agentdrive_actor - # process the form parameters - # process the body parameter - if compile_job_in is not None: - _body_params = compile_job_in - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v0/projects/{fld_id}/jobs', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def extension_start_auth_extension_start_get( - self, - ext_id: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Extension Start - - Begin a sign-in flow on behalf of a Chrome extension. Provider follows AUTH_MODE (WorkOS AuthKit or the TokenCanopy hub), exactly like /auth/login. Stamps `for=ext` + `ext_id` into the signed OAuth state so the callback handler knows to render the extension handoff page instead of setting a session cookie. Three short-circuits, all surface as actionable errors: * EXTENSION_AUTH_DISABLED (503): kill switch flipped off. * UNKNOWN_EXTENSION (400): `ext_id` not on the allow-list. * Missing `ext_id` query string (400 INVALID_REQUEST). - - :param ext_id: - :type ext_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._extension_start_auth_extension_start_get_serialize( - ext_id=ext_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '302': None, - '400': "ErrorResponse", - '422': "ValidationErrorResponse", - '503': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def extension_start_auth_extension_start_get_with_http_info( - self, - ext_id: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Extension Start - - Begin a sign-in flow on behalf of a Chrome extension. Provider follows AUTH_MODE (WorkOS AuthKit or the TokenCanopy hub), exactly like /auth/login. Stamps `for=ext` + `ext_id` into the signed OAuth state so the callback handler knows to render the extension handoff page instead of setting a session cookie. Three short-circuits, all surface as actionable errors: * EXTENSION_AUTH_DISABLED (503): kill switch flipped off. * UNKNOWN_EXTENSION (400): `ext_id` not on the allow-list. * Missing `ext_id` query string (400 INVALID_REQUEST). - - :param ext_id: - :type ext_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._extension_start_auth_extension_start_get_serialize( - ext_id=ext_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '302': None, - '400': "ErrorResponse", - '422': "ValidationErrorResponse", - '503': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def extension_start_auth_extension_start_get_without_preload_content( - self, - ext_id: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Extension Start - - Begin a sign-in flow on behalf of a Chrome extension. Provider follows AUTH_MODE (WorkOS AuthKit or the TokenCanopy hub), exactly like /auth/login. Stamps `for=ext` + `ext_id` into the signed OAuth state so the callback handler knows to render the extension handoff page instead of setting a session cookie. Three short-circuits, all surface as actionable errors: * EXTENSION_AUTH_DISABLED (503): kill switch flipped off. * UNKNOWN_EXTENSION (400): `ext_id` not on the allow-list. * Missing `ext_id` query string (400 INVALID_REQUEST). - - :param ext_id: - :type ext_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._extension_start_auth_extension_start_get_serialize( - ext_id=ext_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '302': None, - '400': "ErrorResponse", - '422': "ValidationErrorResponse", - '503': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _extension_start_auth_extension_start_get_serialize( - self, - ext_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if ext_id is not None: - - _query_params.append(('ext_id', ext_id)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/auth/extension/start', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def find_v0_find_get( - self, - q: Annotated[str, Field(min_length=1, strict=True, max_length=500)], - mode: Optional[StrictStr] = None, - label: Optional[List[StrictStr]] = None, - file_type: Optional[StrictStr] = None, - prefix: Optional[StrictStr] = None, - modality: Optional[List[Optional[StrictStr]]] = None, - updated_after: Optional[datetime] = None, - updated_before: Optional[datetime] = None, - limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FindPage: - """Hybrid passage retrieval over the full file body - - Passage-level chunk RAG over `embed_chunks`. Lexical (`chunk_tsv`, GIN) + semantic (HNSW over `embedding`) are run in parallel and fused via Reciprocal Rank Fusion (k=60). Unlike `/v0/search`, which only sees the first ~16 KB preview of each artifact, `/v0/find` reaches the full file body. **Modes:** - `hybrid` (default) — lexical + semantic, RRF-fused. - `lexical` — `chunk_tsv` only. Best for exact tokens, identifiers, code snippets. - `semantic` — embedding only. Best for conceptual queries where the surface terms differ from the query phrasing. **Granularity:** results are passages, not files. A long document with multiple matching regions returns multiple hits with distinct `ord` values; consecutive `ord`s overlap by ~400 tokens. Dedupe by `art_id` if you want one row per file. **Span citations:** `char_start`/`char_end` for text & code, `page_start`/`page_end` for PDFs, `time_start_ms`/`time_end_ms` for audio & video. Only the modality-relevant pair is populated. **Filters:** `label`, `file_type`, `prefix`, `modality` (repeatable), `updated_after` / `updated_before` (RFC 3339 timestamps, inclusive bounds on `updated_at`, applied to both legs). **Wiki coverage:** `/v0/find` excludes `_wiki/` paths by default and — importantly — does NOT cover them even when the caller passes `prefix=_wiki/...`. Wiki pages are not embedded by the pipeline (they're system-generated output, not user input), so `embed_chunks` has no rows for them and the join returns empty. Use `wiki_search` (or `list`/`grep` with a `_wiki/` prefix) for the wiki layer. **Embedding availability:** when `GEMINI_API_KEY` is not configured, `mode=semantic` returns 503; `mode=hybrid` logs a warning and falls back to lexical-only; `mode=lexical` is unaffected. - - :param q: (required) - :type q: str - :param mode: - :type mode: str - :param label: - :type label: List[str] - :param file_type: - :type file_type: str - :param prefix: - :type prefix: str - :param modality: - :type modality: List[Optional[str]] - :param updated_after: - :type updated_after: datetime - :param updated_before: - :type updated_before: datetime - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._find_v0_find_get_serialize( - q=q, - mode=mode, - label=label, - file_type=file_type, - prefix=prefix, - modality=modality, - updated_after=updated_after, - updated_before=updated_before, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FindPage", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - '503': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def find_v0_find_get_with_http_info( - self, - q: Annotated[str, Field(min_length=1, strict=True, max_length=500)], - mode: Optional[StrictStr] = None, - label: Optional[List[StrictStr]] = None, - file_type: Optional[StrictStr] = None, - prefix: Optional[StrictStr] = None, - modality: Optional[List[Optional[StrictStr]]] = None, - updated_after: Optional[datetime] = None, - updated_before: Optional[datetime] = None, - limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FindPage]: - """Hybrid passage retrieval over the full file body - - Passage-level chunk RAG over `embed_chunks`. Lexical (`chunk_tsv`, GIN) + semantic (HNSW over `embedding`) are run in parallel and fused via Reciprocal Rank Fusion (k=60). Unlike `/v0/search`, which only sees the first ~16 KB preview of each artifact, `/v0/find` reaches the full file body. **Modes:** - `hybrid` (default) — lexical + semantic, RRF-fused. - `lexical` — `chunk_tsv` only. Best for exact tokens, identifiers, code snippets. - `semantic` — embedding only. Best for conceptual queries where the surface terms differ from the query phrasing. **Granularity:** results are passages, not files. A long document with multiple matching regions returns multiple hits with distinct `ord` values; consecutive `ord`s overlap by ~400 tokens. Dedupe by `art_id` if you want one row per file. **Span citations:** `char_start`/`char_end` for text & code, `page_start`/`page_end` for PDFs, `time_start_ms`/`time_end_ms` for audio & video. Only the modality-relevant pair is populated. **Filters:** `label`, `file_type`, `prefix`, `modality` (repeatable), `updated_after` / `updated_before` (RFC 3339 timestamps, inclusive bounds on `updated_at`, applied to both legs). **Wiki coverage:** `/v0/find` excludes `_wiki/` paths by default and — importantly — does NOT cover them even when the caller passes `prefix=_wiki/...`. Wiki pages are not embedded by the pipeline (they're system-generated output, not user input), so `embed_chunks` has no rows for them and the join returns empty. Use `wiki_search` (or `list`/`grep` with a `_wiki/` prefix) for the wiki layer. **Embedding availability:** when `GEMINI_API_KEY` is not configured, `mode=semantic` returns 503; `mode=hybrid` logs a warning and falls back to lexical-only; `mode=lexical` is unaffected. - - :param q: (required) - :type q: str - :param mode: - :type mode: str - :param label: - :type label: List[str] - :param file_type: - :type file_type: str - :param prefix: - :type prefix: str - :param modality: - :type modality: List[Optional[str]] - :param updated_after: - :type updated_after: datetime - :param updated_before: - :type updated_before: datetime - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._find_v0_find_get_serialize( - q=q, - mode=mode, - label=label, - file_type=file_type, - prefix=prefix, - modality=modality, - updated_after=updated_after, - updated_before=updated_before, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FindPage", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - '503': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def find_v0_find_get_without_preload_content( - self, - q: Annotated[str, Field(min_length=1, strict=True, max_length=500)], - mode: Optional[StrictStr] = None, - label: Optional[List[StrictStr]] = None, - file_type: Optional[StrictStr] = None, - prefix: Optional[StrictStr] = None, - modality: Optional[List[Optional[StrictStr]]] = None, - updated_after: Optional[datetime] = None, - updated_before: Optional[datetime] = None, - limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Hybrid passage retrieval over the full file body - - Passage-level chunk RAG over `embed_chunks`. Lexical (`chunk_tsv`, GIN) + semantic (HNSW over `embedding`) are run in parallel and fused via Reciprocal Rank Fusion (k=60). Unlike `/v0/search`, which only sees the first ~16 KB preview of each artifact, `/v0/find` reaches the full file body. **Modes:** - `hybrid` (default) — lexical + semantic, RRF-fused. - `lexical` — `chunk_tsv` only. Best for exact tokens, identifiers, code snippets. - `semantic` — embedding only. Best for conceptual queries where the surface terms differ from the query phrasing. **Granularity:** results are passages, not files. A long document with multiple matching regions returns multiple hits with distinct `ord` values; consecutive `ord`s overlap by ~400 tokens. Dedupe by `art_id` if you want one row per file. **Span citations:** `char_start`/`char_end` for text & code, `page_start`/`page_end` for PDFs, `time_start_ms`/`time_end_ms` for audio & video. Only the modality-relevant pair is populated. **Filters:** `label`, `file_type`, `prefix`, `modality` (repeatable), `updated_after` / `updated_before` (RFC 3339 timestamps, inclusive bounds on `updated_at`, applied to both legs). **Wiki coverage:** `/v0/find` excludes `_wiki/` paths by default and — importantly — does NOT cover them even when the caller passes `prefix=_wiki/...`. Wiki pages are not embedded by the pipeline (they're system-generated output, not user input), so `embed_chunks` has no rows for them and the join returns empty. Use `wiki_search` (or `list`/`grep` with a `_wiki/` prefix) for the wiki layer. **Embedding availability:** when `GEMINI_API_KEY` is not configured, `mode=semantic` returns 503; `mode=hybrid` logs a warning and falls back to lexical-only; `mode=lexical` is unaffected. - - :param q: (required) - :type q: str - :param mode: - :type mode: str - :param label: - :type label: List[str] - :param file_type: - :type file_type: str - :param prefix: - :type prefix: str - :param modality: - :type modality: List[Optional[str]] - :param updated_after: - :type updated_after: datetime - :param updated_before: - :type updated_before: datetime - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._find_v0_find_get_serialize( - q=q, - mode=mode, - label=label, - file_type=file_type, - prefix=prefix, - modality=modality, - updated_after=updated_after, - updated_before=updated_before, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FindPage", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - '503': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _find_v0_find_get_serialize( - self, - q, - mode, - label, - file_type, - prefix, - modality, - updated_after, - updated_before, - limit, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - 'label': 'multi', - 'modality': 'multi', - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if q is not None: - - _query_params.append(('q', q)) - - if mode is not None: - - _query_params.append(('mode', mode)) - - if label is not None: - - _query_params.append(('label', label)) - - if file_type is not None: - - _query_params.append(('file_type', file_type)) - - if prefix is not None: - - _query_params.append(('prefix', prefix)) - - if modality is not None: - - _query_params.append(('modality', modality)) - - if updated_after is not None: - if isinstance(updated_after, datetime): - _query_params.append( - ( - 'updated_after', - updated_after.strftime( - self.api_client.configuration.datetime_format - ) - ) - ) - else: - _query_params.append(('updated_after', updated_after)) - - if updated_before is not None: - if isinstance(updated_before, datetime): - _query_params.append( - ( - 'updated_before', - updated_before.strftime( - self.api_client.configuration.datetime_format - ) - ) - ) - else: - _query_params.append(('updated_before', updated_before)) - - if limit is not None: - - _query_params.append(('limit', limit)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/find', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_artifact_by_id_meta_v0_artifacts_art_id_meta_get( - self, - art_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ArtifactOut: - """Artifact metadata by stable ID (same shape as path /meta) - - - :param art_id: (required) - :type art_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_artifact_by_id_meta_v0_artifacts_art_id_meta_get_serialize( - art_id=art_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactOut", - '304': None, - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_artifact_by_id_meta_v0_artifacts_art_id_meta_get_with_http_info( - self, - art_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ArtifactOut]: - """Artifact metadata by stable ID (same shape as path /meta) - - - :param art_id: (required) - :type art_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_artifact_by_id_meta_v0_artifacts_art_id_meta_get_serialize( - art_id=art_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactOut", - '304': None, - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_artifact_by_id_meta_v0_artifacts_art_id_meta_get_without_preload_content( - self, - art_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Artifact metadata by stable ID (same shape as path /meta) - - - :param art_id: (required) - :type art_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_artifact_by_id_meta_v0_artifacts_art_id_meta_get_serialize( - art_id=art_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactOut", - '304': None, - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_artifact_by_id_meta_v0_artifacts_art_id_meta_get_serialize( - self, - art_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if art_id is not None: - _path_params['art_id'] = art_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/artifacts/{art_id}/meta', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_artifact_by_id_v0_artifacts_art_id_get( - self, - art_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ArtifactOut: - """Canonical lookup of an artifact by its stable ID - - - :param art_id: (required) - :type art_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_artifact_by_id_v0_artifacts_art_id_get_serialize( - art_id=art_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactOut", - '304': None, - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_artifact_by_id_v0_artifacts_art_id_get_with_http_info( - self, - art_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ArtifactOut]: - """Canonical lookup of an artifact by its stable ID - - - :param art_id: (required) - :type art_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_artifact_by_id_v0_artifacts_art_id_get_serialize( - art_id=art_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactOut", - '304': None, - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_artifact_by_id_v0_artifacts_art_id_get_without_preload_content( - self, - art_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Canonical lookup of an artifact by its stable ID - - - :param art_id: (required) - :type art_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_artifact_by_id_v0_artifacts_art_id_get_serialize( - art_id=art_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactOut", - '304': None, - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_artifact_by_id_v0_artifacts_art_id_get_serialize( - self, - art_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if art_id is not None: - _path_params['art_id'] = art_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/artifacts/{art_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_artifact_meta_v0_artifacts_path_meta_get( - self, - path: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ArtifactOut: - """Get Artifact Meta - - - :param path: (required) - :type path: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_artifact_meta_v0_artifacts_path_meta_get_serialize( - path=path, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactOut", - '304': None, - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_artifact_meta_v0_artifacts_path_meta_get_with_http_info( - self, - path: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ArtifactOut]: - """Get Artifact Meta - - - :param path: (required) - :type path: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_artifact_meta_v0_artifacts_path_meta_get_serialize( - path=path, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactOut", - '304': None, - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_artifact_meta_v0_artifacts_path_meta_get_without_preload_content( - self, - path: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get Artifact Meta - - - :param path: (required) - :type path: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_artifact_meta_v0_artifacts_path_meta_get_serialize( - path=path, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactOut", - '304': None, - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_artifact_meta_v0_artifacts_path_meta_get_serialize( - self, - path, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if path is not None: - _path_params['path'] = path - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/artifacts/{path}/meta', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_artifact_version_v0_artifacts_art_id_versions_version_number_get( - self, - art_id: StrictStr, - version_number: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> VersionOut: - """Metadata for a specific version of an artifact - - - :param art_id: (required) - :type art_id: str - :param version_number: (required) - :type version_number: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_artifact_version_v0_artifacts_art_id_versions_version_number_get_serialize( - art_id=art_id, - version_number=version_number, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "VersionOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '410': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_artifact_version_v0_artifacts_art_id_versions_version_number_get_with_http_info( - self, - art_id: StrictStr, - version_number: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[VersionOut]: - """Metadata for a specific version of an artifact - - - :param art_id: (required) - :type art_id: str - :param version_number: (required) - :type version_number: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_artifact_version_v0_artifacts_art_id_versions_version_number_get_serialize( - art_id=art_id, - version_number=version_number, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "VersionOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '410': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_artifact_version_v0_artifacts_art_id_versions_version_number_get_without_preload_content( - self, - art_id: StrictStr, - version_number: StrictInt, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Metadata for a specific version of an artifact - - - :param art_id: (required) - :type art_id: str - :param version_number: (required) - :type version_number: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_artifact_version_v0_artifacts_art_id_versions_version_number_get_serialize( - art_id=art_id, - version_number=version_number, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "VersionOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '410': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_artifact_version_v0_artifacts_art_id_versions_version_number_get_serialize( - self, - art_id, - version_number, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if art_id is not None: - _path_params['art_id'] = art_id - if version_number is not None: - _path_params['version_number'] = version_number - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/artifacts/{art_id}/versions/{version_number}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_drive_route_v0_drives_drive_id_get( - self, - drive_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DriveReadOut: - """Drive overview by id (same shape as /drives/me) - - Identical to `GET /v0/drives/me` — the by-id singleton so `Location`-style URLs and scripted clients can address the drive canonically. The path-param `drive_id` MUST match the authenticated drive (mirrors the delete/trash routes' no-leak 404). Emits the drive's composite `ETag` header (`\".0.\"`). - - :param drive_id: (required) - :type drive_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_drive_route_v0_drives_drive_id_get_serialize( - drive_id=drive_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DriveReadOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_drive_route_v0_drives_drive_id_get_with_http_info( - self, - drive_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DriveReadOut]: - """Drive overview by id (same shape as /drives/me) - - Identical to `GET /v0/drives/me` — the by-id singleton so `Location`-style URLs and scripted clients can address the drive canonically. The path-param `drive_id` MUST match the authenticated drive (mirrors the delete/trash routes' no-leak 404). Emits the drive's composite `ETag` header (`\".0.\"`). - - :param drive_id: (required) - :type drive_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_drive_route_v0_drives_drive_id_get_serialize( - drive_id=drive_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DriveReadOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_drive_route_v0_drives_drive_id_get_without_preload_content( - self, - drive_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Drive overview by id (same shape as /drives/me) - - Identical to `GET /v0/drives/me` — the by-id singleton so `Location`-style URLs and scripted clients can address the drive canonically. The path-param `drive_id` MUST match the authenticated drive (mirrors the delete/trash routes' no-leak 404). Emits the drive's composite `ETag` header (`\".0.\"`). - - :param drive_id: (required) - :type drive_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_drive_route_v0_drives_drive_id_get_serialize( - drive_id=drive_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DriveReadOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_drive_route_v0_drives_drive_id_get_serialize( - self, - drive_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if drive_id is not None: - _path_params['drive_id'] = drive_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/drives/{drive_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_feedback_status_v0_feedback_fbk_id_get( - self, - fbk_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FeedbackStatusOut: - """Get Feedback Status - - Lifecycle status of feedback THIS drive filed. Foreign tickets read as 404 — indistinguishable from absent. - - :param fbk_id: (required) - :type fbk_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_feedback_status_v0_feedback_fbk_id_get_serialize( - fbk_id=fbk_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FeedbackStatusOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_feedback_status_v0_feedback_fbk_id_get_with_http_info( - self, - fbk_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FeedbackStatusOut]: - """Get Feedback Status - - Lifecycle status of feedback THIS drive filed. Foreign tickets read as 404 — indistinguishable from absent. - - :param fbk_id: (required) - :type fbk_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_feedback_status_v0_feedback_fbk_id_get_serialize( - fbk_id=fbk_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FeedbackStatusOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_feedback_status_v0_feedback_fbk_id_get_without_preload_content( - self, - fbk_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get Feedback Status - - Lifecycle status of feedback THIS drive filed. Foreign tickets read as 404 — indistinguishable from absent. - - :param fbk_id: (required) - :type fbk_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_feedback_status_v0_feedback_fbk_id_get_serialize( - fbk_id=fbk_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FeedbackStatusOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_feedback_status_v0_feedback_fbk_id_get_serialize( - self, - fbk_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if fbk_id is not None: - _path_params['fbk_id'] = fbk_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/feedback/{fbk_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_folder_by_id_meta_v0_folders_fld_id_meta_get( - self, - fld_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FolderOut: - """Folder metadata by stable ID (same shape as the bare id route) - - - :param fld_id: (required) - :type fld_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_folder_by_id_meta_v0_folders_fld_id_meta_get_serialize( - fld_id=fld_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderOut", - '304': None, - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_folder_by_id_meta_v0_folders_fld_id_meta_get_with_http_info( - self, - fld_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FolderOut]: - """Folder metadata by stable ID (same shape as the bare id route) - - - :param fld_id: (required) - :type fld_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_folder_by_id_meta_v0_folders_fld_id_meta_get_serialize( - fld_id=fld_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderOut", - '304': None, - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_folder_by_id_meta_v0_folders_fld_id_meta_get_without_preload_content( - self, - fld_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Folder metadata by stable ID (same shape as the bare id route) - - - :param fld_id: (required) - :type fld_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_folder_by_id_meta_v0_folders_fld_id_meta_get_serialize( - fld_id=fld_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderOut", - '304': None, - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_folder_by_id_meta_v0_folders_fld_id_meta_get_serialize( - self, - fld_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if fld_id is not None: - _path_params['fld_id'] = fld_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/folders/{fld_id}/meta', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_folder_by_id_v0_folders_fld_id_get( - self, - fld_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FolderOut: - """Canonical lookup of a folder by its stable ID - - - :param fld_id: (required) - :type fld_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_folder_by_id_v0_folders_fld_id_get_serialize( - fld_id=fld_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderOut", - '304': None, - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_folder_by_id_v0_folders_fld_id_get_with_http_info( - self, - fld_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FolderOut]: - """Canonical lookup of a folder by its stable ID - - - :param fld_id: (required) - :type fld_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_folder_by_id_v0_folders_fld_id_get_serialize( - fld_id=fld_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderOut", - '304': None, - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_folder_by_id_v0_folders_fld_id_get_without_preload_content( - self, - fld_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Canonical lookup of a folder by its stable ID - - - :param fld_id: (required) - :type fld_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_folder_by_id_v0_folders_fld_id_get_serialize( - fld_id=fld_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderOut", - '304': None, - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_folder_by_id_v0_folders_fld_id_get_serialize( - self, - fld_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if fld_id is not None: - _path_params['fld_id'] = fld_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/folders/{fld_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_folder_by_path_meta_v0_folders_path_meta_get( - self, - path: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FolderOut: - """Folder metadata by path (same shape as the bare path route) - - - :param path: (required) - :type path: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_folder_by_path_meta_v0_folders_path_meta_get_serialize( - path=path, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderOut", - '304': None, - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_folder_by_path_meta_v0_folders_path_meta_get_with_http_info( - self, - path: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FolderOut]: - """Folder metadata by path (same shape as the bare path route) - - - :param path: (required) - :type path: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_folder_by_path_meta_v0_folders_path_meta_get_serialize( - path=path, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderOut", - '304': None, - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_folder_by_path_meta_v0_folders_path_meta_get_without_preload_content( - self, - path: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Folder metadata by path (same shape as the bare path route) - - - :param path: (required) - :type path: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_folder_by_path_meta_v0_folders_path_meta_get_serialize( - path=path, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderOut", - '304': None, - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_folder_by_path_meta_v0_folders_path_meta_get_serialize( - self, - path, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if path is not None: - _path_params['path'] = path - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/folders/{path}/meta', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_folder_by_path_v0_folders_path_get( - self, - path: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FolderOut: - """Read folder metadata by path - - - :param path: (required) - :type path: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_folder_by_path_v0_folders_path_get_serialize( - path=path, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderOut", - '304': None, - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_folder_by_path_v0_folders_path_get_with_http_info( - self, - path: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FolderOut]: - """Read folder metadata by path - - - :param path: (required) - :type path: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_folder_by_path_v0_folders_path_get_serialize( - path=path, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderOut", - '304': None, - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_folder_by_path_v0_folders_path_get_without_preload_content( - self, - path: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Read folder metadata by path - - - :param path: (required) - :type path: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_folder_by_path_v0_folders_path_get_serialize( - path=path, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderOut", - '304': None, - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_folder_by_path_v0_folders_path_get_serialize( - self, - path, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if path is not None: - _path_params['path'] = path - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/folders/{path}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_grant_route_v0_grants_grn_id_get( - self, - grn_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GrantOut: - """Read a single grant (can_manage, or the grant's own principal) - - The `Location` target of `POST /v0/grants`. Authorization mirrors DELETE: `can_manage` on the granted resource, or the caller IS the grant's own principal (a grantee may read — like revoke — their own grant). A revoked grant reads as 404 (same no-leak shape as a foreign/absent id); DELETE stays idempotent on it. - - :param grn_id: (required) - :type grn_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_grant_route_v0_grants_grn_id_get_serialize( - grn_id=grn_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GrantOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_grant_route_v0_grants_grn_id_get_with_http_info( - self, - grn_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GrantOut]: - """Read a single grant (can_manage, or the grant's own principal) - - The `Location` target of `POST /v0/grants`. Authorization mirrors DELETE: `can_manage` on the granted resource, or the caller IS the grant's own principal (a grantee may read — like revoke — their own grant). A revoked grant reads as 404 (same no-leak shape as a foreign/absent id); DELETE stays idempotent on it. - - :param grn_id: (required) - :type grn_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_grant_route_v0_grants_grn_id_get_serialize( - grn_id=grn_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GrantOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_grant_route_v0_grants_grn_id_get_without_preload_content( - self, - grn_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Read a single grant (can_manage, or the grant's own principal) - - The `Location` target of `POST /v0/grants`. Authorization mirrors DELETE: `can_manage` on the granted resource, or the caller IS the grant's own principal (a grantee may read — like revoke — their own grant). A revoked grant reads as 404 (same no-leak shape as a foreign/absent id); DELETE stays idempotent on it. - - :param grn_id: (required) - :type grn_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_grant_route_v0_grants_grn_id_get_serialize( - grn_id=grn_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GrantOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_grant_route_v0_grants_grn_id_get_serialize( - self, - grn_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if grn_id is not None: - _path_params['grn_id'] = grn_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/grants/{grn_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_job_logs_v0_jobs_job_id_logs_get( - self, - job_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> str: - """Raw compile log (text/plain) - - - :param job_id: (required) - :type job_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_job_logs_v0_jobs_job_id_logs_get_serialize( - job_id=job_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_job_logs_v0_jobs_job_id_logs_get_with_http_info( - self, - job_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[str]: - """Raw compile log (text/plain) - - - :param job_id: (required) - :type job_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_job_logs_v0_jobs_job_id_logs_get_serialize( - job_id=job_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_job_logs_v0_jobs_job_id_logs_get_without_preload_content( - self, - job_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Raw compile log (text/plain) - - - :param job_id: (required) - :type job_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_job_logs_v0_jobs_job_id_logs_get_serialize( - job_id=job_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_job_logs_v0_jobs_job_id_logs_get_serialize( - self, - job_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if job_id is not None: - _path_params['job_id'] = job_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'text/plain', - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/jobs/{job_id}/logs', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_job_v0_jobs_job_id_get( - self, - job_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CompileJobOut: - """Poll a job - - - :param job_id: (required) - :type job_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_job_v0_jobs_job_id_get_serialize( - job_id=job_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CompileJobOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_job_v0_jobs_job_id_get_with_http_info( - self, - job_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CompileJobOut]: - """Poll a job - - - :param job_id: (required) - :type job_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_job_v0_jobs_job_id_get_serialize( - job_id=job_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CompileJobOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_job_v0_jobs_job_id_get_without_preload_content( - self, - job_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Poll a job - - - :param job_id: (required) - :type job_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_job_v0_jobs_job_id_get_serialize( - job_id=job_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CompileJobOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_job_v0_jobs_job_id_get_serialize( - self, - job_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if job_id is not None: - _path_params['job_id'] = job_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/jobs/{job_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_project_v0_projects_fld_id_get( - self, - fld_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CompileProjectOut: - """Get a project's compile config - - - :param fld_id: (required) - :type fld_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_project_v0_projects_fld_id_get_serialize( - fld_id=fld_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CompileProjectOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_project_v0_projects_fld_id_get_with_http_info( - self, - fld_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CompileProjectOut]: - """Get a project's compile config - - - :param fld_id: (required) - :type fld_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_project_v0_projects_fld_id_get_serialize( - fld_id=fld_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CompileProjectOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_project_v0_projects_fld_id_get_without_preload_content( - self, - fld_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get a project's compile config - - - :param fld_id: (required) - :type fld_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_project_v0_projects_fld_id_get_serialize( - fld_id=fld_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CompileProjectOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_project_v0_projects_fld_id_get_serialize( - self, - fld_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if fld_id is not None: - _path_params['fld_id'] = fld_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/projects/{fld_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_share_route_v0_shares_shr_id_get( - self, - shr_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ShareOut: - """Read a single share link's metadata (requires can_manage) - - The `Location` target of `POST /v0/shares`. Metadata ONLY — `ShareOut` never carries the raw `share_key`/URL (returned exactly once at mint/rotate, §4.5). Authorization mirrors DELETE: `can_manage` on the shared resource. A revoked share reads as 404 (same no-leak shape as a foreign/absent id). - - :param shr_id: (required) - :type shr_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_share_route_v0_shares_shr_id_get_serialize( - shr_id=shr_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ShareOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_share_route_v0_shares_shr_id_get_with_http_info( - self, - shr_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ShareOut]: - """Read a single share link's metadata (requires can_manage) - - The `Location` target of `POST /v0/shares`. Metadata ONLY — `ShareOut` never carries the raw `share_key`/URL (returned exactly once at mint/rotate, §4.5). Authorization mirrors DELETE: `can_manage` on the shared resource. A revoked share reads as 404 (same no-leak shape as a foreign/absent id). - - :param shr_id: (required) - :type shr_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_share_route_v0_shares_shr_id_get_serialize( - shr_id=shr_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ShareOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_share_route_v0_shares_shr_id_get_without_preload_content( - self, - shr_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Read a single share link's metadata (requires can_manage) - - The `Location` target of `POST /v0/shares`. Metadata ONLY — `ShareOut` never carries the raw `share_key`/URL (returned exactly once at mint/rotate, §4.5). Authorization mirrors DELETE: `can_manage` on the shared resource. A revoked share reads as 404 (same no-leak shape as a foreign/absent id). - - :param shr_id: (required) - :type shr_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_share_route_v0_shares_shr_id_get_serialize( - shr_id=shr_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ShareOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_share_route_v0_shares_shr_id_get_serialize( - self, - shr_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if shr_id is not None: - _path_params['shr_id'] = shr_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/shares/{shr_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_upload_status_v0_uploads_upload_id_get( - self, - upload_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UploadStatusOut: - """Get the status of a large (direct-to-GCS) upload session - - Report the live state of an upload session begun at `/v0/uploads`. `state` is derived: `initiated` (open — PUT the bytes then commit), `committed` (artifact created), `aborted` (released via DELETE), or `expired` (past `expires_at` without a commit). Read-only; charges the read budget. - - :param upload_id: (required) - :type upload_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_upload_status_v0_uploads_upload_id_get_serialize( - upload_id=upload_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UploadStatusOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_upload_status_v0_uploads_upload_id_get_with_http_info( - self, - upload_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UploadStatusOut]: - """Get the status of a large (direct-to-GCS) upload session - - Report the live state of an upload session begun at `/v0/uploads`. `state` is derived: `initiated` (open — PUT the bytes then commit), `committed` (artifact created), `aborted` (released via DELETE), or `expired` (past `expires_at` without a commit). Read-only; charges the read budget. - - :param upload_id: (required) - :type upload_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_upload_status_v0_uploads_upload_id_get_serialize( - upload_id=upload_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UploadStatusOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_upload_status_v0_uploads_upload_id_get_without_preload_content( - self, - upload_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get the status of a large (direct-to-GCS) upload session - - Report the live state of an upload session begun at `/v0/uploads`. `state` is derived: `initiated` (open — PUT the bytes then commit), `committed` (artifact created), `aborted` (released via DELETE), or `expired` (past `expires_at` without a commit). Read-only; charges the read budget. - - :param upload_id: (required) - :type upload_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_upload_status_v0_uploads_upload_id_get_serialize( - upload_id=upload_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UploadStatusOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_upload_status_v0_uploads_upload_id_get_serialize( - self, - upload_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if upload_id is not None: - _path_params['upload_id'] = upload_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/uploads/{upload_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def health_health_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> HealthOut: - """Health - - Liveness + DB-reachability probe. Used by Cloud Run / k8s healthchecks and any uptime monitor. Returns 200 only if the DB pool can serve a trivial query; 503 otherwise so the orchestrator can pull the instance out of rotation. NOTE: route is `/health`, NOT `/healthz`. Google's edge infrastructure intercepts `/healthz` (legacy kubernetes-reserved path) and returns a generic 404 before traffic reaches Cloud Run — discovered the hard way during the first prod deploy. Don't rename back. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._health_health_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "HealthOut", - '503': "HealthDegradedResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def health_health_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[HealthOut]: - """Health - - Liveness + DB-reachability probe. Used by Cloud Run / k8s healthchecks and any uptime monitor. Returns 200 only if the DB pool can serve a trivial query; 503 otherwise so the orchestrator can pull the instance out of rotation. NOTE: route is `/health`, NOT `/healthz`. Google's edge infrastructure intercepts `/healthz` (legacy kubernetes-reserved path) and returns a generic 404 before traffic reaches Cloud Run — discovered the hard way during the first prod deploy. Don't rename back. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._health_health_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "HealthOut", - '503': "HealthDegradedResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def health_health_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Health - - Liveness + DB-reachability probe. Used by Cloud Run / k8s healthchecks and any uptime monitor. Returns 200 only if the DB pool can serve a trivial query; 503 otherwise so the orchestrator can pull the instance out of rotation. NOTE: route is `/health`, NOT `/healthz`. Google's edge infrastructure intercepts `/healthz` (legacy kubernetes-reserved path) and returns a generic 404 before traffic reaches Cloud Run — discovered the hard way during the first prod deploy. Don't rename back. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._health_health_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "HealthOut", - '503': "HealthDegradedResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _health_health_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/health', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def list_artifact_versions_v0_artifacts_art_id_versions_get( - self, - art_id: StrictStr, - cursor: Optional[StrictStr] = None, - limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> VersionPage: - """List versions of an artifact, newest first - - Returns versions in descending `version_number` order. Cursor pagination via `?cursor=`; `next_cursor` is non-null when the page is full and more older versions may exist. - - :param art_id: (required) - :type art_id: str - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_artifact_versions_v0_artifacts_art_id_versions_get_serialize( - art_id=art_id, - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "VersionPage", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def list_artifact_versions_v0_artifacts_art_id_versions_get_with_http_info( - self, - art_id: StrictStr, - cursor: Optional[StrictStr] = None, - limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[VersionPage]: - """List versions of an artifact, newest first - - Returns versions in descending `version_number` order. Cursor pagination via `?cursor=`; `next_cursor` is non-null when the page is full and more older versions may exist. - - :param art_id: (required) - :type art_id: str - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_artifact_versions_v0_artifacts_art_id_versions_get_serialize( - art_id=art_id, - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "VersionPage", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def list_artifact_versions_v0_artifacts_art_id_versions_get_without_preload_content( - self, - art_id: StrictStr, - cursor: Optional[StrictStr] = None, - limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List versions of an artifact, newest first - - Returns versions in descending `version_number` order. Cursor pagination via `?cursor=`; `next_cursor` is non-null when the page is full and more older versions may exist. - - :param art_id: (required) - :type art_id: str - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_artifact_versions_v0_artifacts_art_id_versions_get_serialize( - art_id=art_id, - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "VersionPage", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_artifact_versions_v0_artifacts_art_id_versions_get_serialize( - self, - art_id, - cursor, - limit, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if art_id is not None: - _path_params['art_id'] = art_id - # process the query parameters - if cursor is not None: - - _query_params.append(('cursor', cursor)) - - if limit is not None: - - _query_params.append(('limit', limit)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/artifacts/{art_id}/versions', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def list_artifacts_v0_artifacts_get( - self, - prefix: Optional[StrictStr] = None, - label: Optional[List[Optional[StrictStr]]] = None, - file_type: Optional[StrictStr] = None, - cursor: Optional[StrictStr] = None, - limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> Page: - """List artifacts in the drive - - Returns artifacts sorted by path. Filter by `prefix`, `label` (repeatable + AND-combined), and `file_type`. **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page. `next_cursor` is `null` on the final page. Filters MUST stay consistent across pages — the cursor encodes only the keyset position, not the filter set, so the client is responsible for re-sending the same filter on each page. - - :param prefix: - :type prefix: str - :param label: - :type label: List[Optional[str]] - :param file_type: - :type file_type: str - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_artifacts_v0_artifacts_get_serialize( - prefix=prefix, - label=label, - file_type=file_type, - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Page", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def list_artifacts_v0_artifacts_get_with_http_info( - self, - prefix: Optional[StrictStr] = None, - label: Optional[List[Optional[StrictStr]]] = None, - file_type: Optional[StrictStr] = None, - cursor: Optional[StrictStr] = None, - limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[Page]: - """List artifacts in the drive - - Returns artifacts sorted by path. Filter by `prefix`, `label` (repeatable + AND-combined), and `file_type`. **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page. `next_cursor` is `null` on the final page. Filters MUST stay consistent across pages — the cursor encodes only the keyset position, not the filter set, so the client is responsible for re-sending the same filter on each page. - - :param prefix: - :type prefix: str - :param label: - :type label: List[Optional[str]] - :param file_type: - :type file_type: str - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_artifacts_v0_artifacts_get_serialize( - prefix=prefix, - label=label, - file_type=file_type, - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Page", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def list_artifacts_v0_artifacts_get_without_preload_content( - self, - prefix: Optional[StrictStr] = None, - label: Optional[List[Optional[StrictStr]]] = None, - file_type: Optional[StrictStr] = None, - cursor: Optional[StrictStr] = None, - limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List artifacts in the drive - - Returns artifacts sorted by path. Filter by `prefix`, `label` (repeatable + AND-combined), and `file_type`. **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page. `next_cursor` is `null` on the final page. Filters MUST stay consistent across pages — the cursor encodes only the keyset position, not the filter set, so the client is responsible for re-sending the same filter on each page. - - :param prefix: - :type prefix: str - :param label: - :type label: List[Optional[str]] - :param file_type: - :type file_type: str - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_artifacts_v0_artifacts_get_serialize( - prefix=prefix, - label=label, - file_type=file_type, - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "Page", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_artifacts_v0_artifacts_get_serialize( - self, - prefix, - label, - file_type, - cursor, - limit, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - 'label': 'multi', - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if prefix is not None: - - _query_params.append(('prefix', prefix)) - - if label is not None: - - _query_params.append(('label', label)) - - if file_type is not None: - - _query_params.append(('file_type', file_type)) - - if cursor is not None: - - _query_params.append(('cursor', cursor)) - - if limit is not None: - - _query_params.append(('limit', limit)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/artifacts', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def list_events_route_v0_events_get( - self, - art_id: Optional[StrictStr] = None, - action: Optional[StrictStr] = None, - since: Optional[datetime] = None, - before: Optional[datetime] = None, - cursor: Optional[StrictStr] = None, - limit: Optional[Annotated[int, Field(le=200, strict=True, ge=1)]] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> EventPage: - """Read the append-only event log for the authenticated drive - - Returns events newest-first. Filters compose with AND. **Cursor pagination:** pass the oldest event's `created_at` from the previous page as `before` to fetch the next page back in time. Combine `since` + `before` to bound a window. - - :param art_id: - :type art_id: str - :param action: - :type action: str - :param since: - :type since: datetime - :param before: - :type before: datetime - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_events_route_v0_events_get_serialize( - art_id=art_id, - action=action, - since=since, - before=before, - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "EventPage", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def list_events_route_v0_events_get_with_http_info( - self, - art_id: Optional[StrictStr] = None, - action: Optional[StrictStr] = None, - since: Optional[datetime] = None, - before: Optional[datetime] = None, - cursor: Optional[StrictStr] = None, - limit: Optional[Annotated[int, Field(le=200, strict=True, ge=1)]] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[EventPage]: - """Read the append-only event log for the authenticated drive - - Returns events newest-first. Filters compose with AND. **Cursor pagination:** pass the oldest event's `created_at` from the previous page as `before` to fetch the next page back in time. Combine `since` + `before` to bound a window. - - :param art_id: - :type art_id: str - :param action: - :type action: str - :param since: - :type since: datetime - :param before: - :type before: datetime - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_events_route_v0_events_get_serialize( - art_id=art_id, - action=action, - since=since, - before=before, - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "EventPage", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def list_events_route_v0_events_get_without_preload_content( - self, - art_id: Optional[StrictStr] = None, - action: Optional[StrictStr] = None, - since: Optional[datetime] = None, - before: Optional[datetime] = None, - cursor: Optional[StrictStr] = None, - limit: Optional[Annotated[int, Field(le=200, strict=True, ge=1)]] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Read the append-only event log for the authenticated drive - - Returns events newest-first. Filters compose with AND. **Cursor pagination:** pass the oldest event's `created_at` from the previous page as `before` to fetch the next page back in time. Combine `since` + `before` to bound a window. - - :param art_id: - :type art_id: str - :param action: - :type action: str - :param since: - :type since: datetime - :param before: - :type before: datetime - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_events_route_v0_events_get_serialize( - art_id=art_id, - action=action, - since=since, - before=before, - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "EventPage", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_events_route_v0_events_get_serialize( - self, - art_id, - action, - since, - before, - cursor, - limit, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if art_id is not None: - - _query_params.append(('art_id', art_id)) - - if action is not None: - - _query_params.append(('action', action)) - - if since is not None: - if isinstance(since, datetime): - _query_params.append( - ( - 'since', - since.strftime( - self.api_client.configuration.datetime_format - ) - ) - ) - else: - _query_params.append(('since', since)) - - if before is not None: - if isinstance(before, datetime): - _query_params.append( - ( - 'before', - before.strftime( - self.api_client.configuration.datetime_format - ) - ) - ) - else: - _query_params.append(('before', before)) - - if cursor is not None: - - _query_params.append(('cursor', cursor)) - - if limit is not None: - - _query_params.append(('limit', limit)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/events', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def list_grants_route_v0_grants_get( - self, - resource: Annotated[StrictStr, Field(description="art_*/fld_* id or a path")], - cursor: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GrantList: - """List live grants on a resource (requires can_manage) - - **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. The `resource` filter must be re-sent on every page — the cursor encodes only the keyset position. - - :param resource: art_*/fld_* id or a path (required) - :type resource: str - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_grants_route_v0_grants_get_serialize( - resource=resource, - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GrantList", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def list_grants_route_v0_grants_get_with_http_info( - self, - resource: Annotated[StrictStr, Field(description="art_*/fld_* id or a path")], - cursor: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GrantList]: - """List live grants on a resource (requires can_manage) - - **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. The `resource` filter must be re-sent on every page — the cursor encodes only the keyset position. - - :param resource: art_*/fld_* id or a path (required) - :type resource: str - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_grants_route_v0_grants_get_serialize( - resource=resource, - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GrantList", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def list_grants_route_v0_grants_get_without_preload_content( - self, - resource: Annotated[StrictStr, Field(description="art_*/fld_* id or a path")], - cursor: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List live grants on a resource (requires can_manage) - - **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. The `resource` filter must be re-sent on every page — the cursor encodes only the keyset position. - - :param resource: art_*/fld_* id or a path (required) - :type resource: str - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_grants_route_v0_grants_get_serialize( - resource=resource, - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GrantList", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_grants_route_v0_grants_get_serialize( - self, - resource, - cursor, - limit, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if resource is not None: - - _query_params.append(('resource', resource)) - - if cursor is not None: - - _query_params.append(('cursor', cursor)) - - if limit is not None: - - _query_params.append(('limit', limit)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/grants', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def list_project_jobs_v0_projects_fld_id_jobs_get( - self, - fld_id: StrictStr, - status: Optional[StrictStr] = None, - limit: Optional[Annotated[int, Field(le=200, strict=True, ge=1)]] = None, - cursor: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CompileJobListOut: - """List a project's jobs - - List compile jobs newest first in stable `(created_at, job_id)` descending order. Pass a non-null `next_cursor` back as `cursor` to continue; malformed cursors return `400 BAD_CURSOR`. The cursor contains only the keyset position, so a `status` filter must be re-sent unchanged on every page. `limit` retains its existing default of 50 and validated range of 1 through 200. - - :param fld_id: (required) - :type fld_id: str - :param status: - :type status: str - :param limit: - :type limit: int - :param cursor: - :type cursor: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_project_jobs_v0_projects_fld_id_jobs_get_serialize( - fld_id=fld_id, - status=status, - limit=limit, - cursor=cursor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CompileJobListOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def list_project_jobs_v0_projects_fld_id_jobs_get_with_http_info( - self, - fld_id: StrictStr, - status: Optional[StrictStr] = None, - limit: Optional[Annotated[int, Field(le=200, strict=True, ge=1)]] = None, - cursor: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CompileJobListOut]: - """List a project's jobs - - List compile jobs newest first in stable `(created_at, job_id)` descending order. Pass a non-null `next_cursor` back as `cursor` to continue; malformed cursors return `400 BAD_CURSOR`. The cursor contains only the keyset position, so a `status` filter must be re-sent unchanged on every page. `limit` retains its existing default of 50 and validated range of 1 through 200. - - :param fld_id: (required) - :type fld_id: str - :param status: - :type status: str - :param limit: - :type limit: int - :param cursor: - :type cursor: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_project_jobs_v0_projects_fld_id_jobs_get_serialize( - fld_id=fld_id, - status=status, - limit=limit, - cursor=cursor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CompileJobListOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def list_project_jobs_v0_projects_fld_id_jobs_get_without_preload_content( - self, - fld_id: StrictStr, - status: Optional[StrictStr] = None, - limit: Optional[Annotated[int, Field(le=200, strict=True, ge=1)]] = None, - cursor: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List a project's jobs - - List compile jobs newest first in stable `(created_at, job_id)` descending order. Pass a non-null `next_cursor` back as `cursor` to continue; malformed cursors return `400 BAD_CURSOR`. The cursor contains only the keyset position, so a `status` filter must be re-sent unchanged on every page. `limit` retains its existing default of 50 and validated range of 1 through 200. - - :param fld_id: (required) - :type fld_id: str - :param status: - :type status: str - :param limit: - :type limit: int - :param cursor: - :type cursor: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_project_jobs_v0_projects_fld_id_jobs_get_serialize( - fld_id=fld_id, - status=status, - limit=limit, - cursor=cursor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CompileJobListOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_project_jobs_v0_projects_fld_id_jobs_get_serialize( - self, - fld_id, - status, - limit, - cursor, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if fld_id is not None: - _path_params['fld_id'] = fld_id - # process the query parameters - if status is not None: - - _query_params.append(('status', status)) - - if limit is not None: - - _query_params.append(('limit', limit)) - - if cursor is not None: - - _query_params.append(('cursor', cursor)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/projects/{fld_id}/jobs', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def list_shares_route_v0_shares_get( - self, - resource: Annotated[StrictStr, Field(description="art_*/fld_* id or a path")], - cursor: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ShareList: - """List live share links on a resource (requires can_manage) - - **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. The `resource` filter must be re-sent on every page — the cursor encodes only the keyset position. - - :param resource: art_*/fld_* id or a path (required) - :type resource: str - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_shares_route_v0_shares_get_serialize( - resource=resource, - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ShareList", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def list_shares_route_v0_shares_get_with_http_info( - self, - resource: Annotated[StrictStr, Field(description="art_*/fld_* id or a path")], - cursor: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ShareList]: - """List live share links on a resource (requires can_manage) - - **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. The `resource` filter must be re-sent on every page — the cursor encodes only the keyset position. - - :param resource: art_*/fld_* id or a path (required) - :type resource: str - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_shares_route_v0_shares_get_serialize( - resource=resource, - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ShareList", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def list_shares_route_v0_shares_get_without_preload_content( - self, - resource: Annotated[StrictStr, Field(description="art_*/fld_* id or a path")], - cursor: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List live share links on a resource (requires can_manage) - - **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. The `resource` filter must be re-sent on every page — the cursor encodes only the keyset position. - - :param resource: art_*/fld_* id or a path (required) - :type resource: str - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_shares_route_v0_shares_get_serialize( - resource=resource, - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ShareList", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_shares_route_v0_shares_get_serialize( - self, - resource, - cursor, - limit, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if resource is not None: - - _query_params.append(('resource', resource)) - - if cursor is not None: - - _query_params.append(('cursor', cursor)) - - if limit is not None: - - _query_params.append(('limit', limit)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/shares', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def list_trash_route_v0_drives_drive_id_trash_get( - self, - drive_id: StrictStr, - cursor: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> TrashOut: - """List the authenticated drive's trash - - Returns soft-deleted artifacts on the drive plus the drive's own soft-delete state (if applicable). The path-param `drive_id` MUST match the authenticated drive. **Compatibility window:** `limit` or `cursor` opts into cursor pagination. Unadorned requests retain the legacy complete result during the migration window. Paginated requests are clamped to 1–100 items (default 50 when only `cursor` is supplied). `items` is canonical; `artifacts` is a deprecated same-value alias. - - :param drive_id: (required) - :type drive_id: str - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_trash_route_v0_drives_drive_id_trash_get_serialize( - drive_id=drive_id, - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "TrashOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def list_trash_route_v0_drives_drive_id_trash_get_with_http_info( - self, - drive_id: StrictStr, - cursor: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[TrashOut]: - """List the authenticated drive's trash - - Returns soft-deleted artifacts on the drive plus the drive's own soft-delete state (if applicable). The path-param `drive_id` MUST match the authenticated drive. **Compatibility window:** `limit` or `cursor` opts into cursor pagination. Unadorned requests retain the legacy complete result during the migration window. Paginated requests are clamped to 1–100 items (default 50 when only `cursor` is supplied). `items` is canonical; `artifacts` is a deprecated same-value alias. - - :param drive_id: (required) - :type drive_id: str - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_trash_route_v0_drives_drive_id_trash_get_serialize( - drive_id=drive_id, - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "TrashOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def list_trash_route_v0_drives_drive_id_trash_get_without_preload_content( - self, - drive_id: StrictStr, - cursor: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List the authenticated drive's trash - - Returns soft-deleted artifacts on the drive plus the drive's own soft-delete state (if applicable). The path-param `drive_id` MUST match the authenticated drive. **Compatibility window:** `limit` or `cursor` opts into cursor pagination. Unadorned requests retain the legacy complete result during the migration window. Paginated requests are clamped to 1–100 items (default 50 when only `cursor` is supplied). `items` is canonical; `artifacts` is a deprecated same-value alias. - - :param drive_id: (required) - :type drive_id: str - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_trash_route_v0_drives_drive_id_trash_get_serialize( - drive_id=drive_id, - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "TrashOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_trash_route_v0_drives_drive_id_trash_get_serialize( - self, - drive_id, - cursor, - limit, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if drive_id is not None: - _path_params['drive_id'] = drive_id - # process the query parameters - if cursor is not None: - - _query_params.append(('cursor', cursor)) - - if limit is not None: - - _query_params.append(('limit', limit)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/drives/{drive_id}/trash', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def login_auth_login_get( - self, - return_to: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Login - - Begin a WorkOS sign-in flow. Mints a pre-login state cookie (binds the OAuth flow to this browser — defense-in-depth against login-CSRF), signs a state payload, and redirects to AuthKit. The hosted AuthKit page lets the user pick Google OAuth, Microsoft OAuth, magic-link, password, or passkey; we don't care which — they all funnel back to /auth/callback with a `code` we exchange in D2. - - :param return_to: - :type return_to: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._login_auth_login_get_serialize( - return_to=return_to, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '302': None, - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def login_auth_login_get_with_http_info( - self, - return_to: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Login - - Begin a WorkOS sign-in flow. Mints a pre-login state cookie (binds the OAuth flow to this browser — defense-in-depth against login-CSRF), signs a state payload, and redirects to AuthKit. The hosted AuthKit page lets the user pick Google OAuth, Microsoft OAuth, magic-link, password, or passkey; we don't care which — they all funnel back to /auth/callback with a `code` we exchange in D2. - - :param return_to: - :type return_to: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._login_auth_login_get_serialize( - return_to=return_to, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '302': None, - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def login_auth_login_get_without_preload_content( - self, - return_to: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Login - - Begin a WorkOS sign-in flow. Mints a pre-login state cookie (binds the OAuth flow to this browser — defense-in-depth against login-CSRF), signs a state payload, and redirects to AuthKit. The hosted AuthKit page lets the user pick Google OAuth, Microsoft OAuth, magic-link, password, or passkey; we don't care which — they all funnel back to /auth/callback with a `code` we exchange in D2. - - :param return_to: - :type return_to: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._login_auth_login_get_serialize( - return_to=return_to, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '302': None, - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _login_auth_login_get_serialize( - self, - return_to, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if return_to is not None: - - _query_params.append(('return_to', return_to)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/auth/login', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def logout_auth_logout_post( - self, - csrf: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Logout - - Terminate both the local session AND the upstream WorkOS session. Without the WorkOS-side termination, the next `/auth/login` flow silently re-authenticates the user through AuthKit's still-valid session cookie on `api.workos.com` — \"Sign out\" feels broken and a shared-browser user can't switch accounts. The recommended pattern (per https://workos.com/docs/authkit/sessions) is to redirect to the WorkOS logout endpoint with the `sid` we stashed during the callback; WorkOS clears its own session and returns the browser to our `return_to`. Failure modes handled: * No `workos_session_id` in the session (legacy v2 cookie issued before this slice landed): fall back to local-only logout. The upstream session lingers but the user's local state is cleared — same UX as before this slice; cookie rotation on next sign-in eventually overwrites it. * SDK raises during `get_logout_url`: pure string formatting at WorkOS's end, so the only realistic failure is a misconfigured WorkOS dashboard (no Sign-out redirect registered). We catch and fall back to local-only logout rather than 500ing — the user clicked \"Sign out\", they should land somewhere, not on an error page. - - :param csrf: (required) - :type csrf: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._logout_auth_logout_post_serialize( - csrf=csrf, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '302': None, - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def logout_auth_logout_post_with_http_info( - self, - csrf: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Logout - - Terminate both the local session AND the upstream WorkOS session. Without the WorkOS-side termination, the next `/auth/login` flow silently re-authenticates the user through AuthKit's still-valid session cookie on `api.workos.com` — \"Sign out\" feels broken and a shared-browser user can't switch accounts. The recommended pattern (per https://workos.com/docs/authkit/sessions) is to redirect to the WorkOS logout endpoint with the `sid` we stashed during the callback; WorkOS clears its own session and returns the browser to our `return_to`. Failure modes handled: * No `workos_session_id` in the session (legacy v2 cookie issued before this slice landed): fall back to local-only logout. The upstream session lingers but the user's local state is cleared — same UX as before this slice; cookie rotation on next sign-in eventually overwrites it. * SDK raises during `get_logout_url`: pure string formatting at WorkOS's end, so the only realistic failure is a misconfigured WorkOS dashboard (no Sign-out redirect registered). We catch and fall back to local-only logout rather than 500ing — the user clicked \"Sign out\", they should land somewhere, not on an error page. - - :param csrf: (required) - :type csrf: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._logout_auth_logout_post_serialize( - csrf=csrf, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '302': None, - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def logout_auth_logout_post_without_preload_content( - self, - csrf: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Logout - - Terminate both the local session AND the upstream WorkOS session. Without the WorkOS-side termination, the next `/auth/login` flow silently re-authenticates the user through AuthKit's still-valid session cookie on `api.workos.com` — \"Sign out\" feels broken and a shared-browser user can't switch accounts. The recommended pattern (per https://workos.com/docs/authkit/sessions) is to redirect to the WorkOS logout endpoint with the `sid` we stashed during the callback; WorkOS clears its own session and returns the browser to our `return_to`. Failure modes handled: * No `workos_session_id` in the session (legacy v2 cookie issued before this slice landed): fall back to local-only logout. The upstream session lingers but the user's local state is cleared — same UX as before this slice; cookie rotation on next sign-in eventually overwrites it. * SDK raises during `get_logout_url`: pure string formatting at WorkOS's end, so the only realistic failure is a misconfigured WorkOS dashboard (no Sign-out redirect registered). We catch and fall back to local-only logout rather than 500ing — the user clicked \"Sign out\", they should land somewhere, not on an error page. - - :param csrf: (required) - :type csrf: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._logout_auth_logout_post_serialize( - csrf=csrf, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '302': None, - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _logout_auth_logout_post_serialize( - self, - csrf, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - if csrf is not None: - _form_params.append(('csrf', csrf)) - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/x-www-form-urlencoded' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/auth/logout', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def me_usage_v0_drives_me_usage_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DriveUsageOut: - """Current-period usage + caps for the authenticated drive - - Unified view of every metered dimension: storage (snapshot), writes (current hour), indexing ops + retrieval queries (current calendar month UTC). Each row carries `used` and `limit`; `limit: 0` means unlimited (the v0 free-tier default for the two monthly counters). Reads are de-throttled — there is no hourly read budget; the monthly read count appears under `ops_this_month.reads`. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._me_usage_v0_drives_me_usage_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DriveUsageOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def me_usage_v0_drives_me_usage_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DriveUsageOut]: - """Current-period usage + caps for the authenticated drive - - Unified view of every metered dimension: storage (snapshot), writes (current hour), indexing ops + retrieval queries (current calendar month UTC). Each row carries `used` and `limit`; `limit: 0` means unlimited (the v0 free-tier default for the two monthly counters). Reads are de-throttled — there is no hourly read budget; the monthly read count appears under `ops_this_month.reads`. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._me_usage_v0_drives_me_usage_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DriveUsageOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def me_usage_v0_drives_me_usage_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Current-period usage + caps for the authenticated drive - - Unified view of every metered dimension: storage (snapshot), writes (current hour), indexing ops + retrieval queries (current calendar month UTC). Each row carries `used` and `limit`; `limit: 0` means unlimited (the v0 free-tier default for the two monthly counters). Reads are de-throttled — there is no hourly read budget; the monthly read count appears under `ops_this_month.reads`. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._me_usage_v0_drives_me_usage_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DriveUsageOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _me_usage_v0_drives_me_usage_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/drives/me/usage', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def me_v0_drives_me_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DriveReadOut: - """Me - - Drive overview for the authenticated bearer token. Wire-protocol preservation (WorkOS integration §6): the `email` field is preserved in the response shape; its meaning is now \"the drive's owner's email\" (via `drives.owner_user_id` → `users.email`, joined in `auth.resolve_drive`). For solo signups this equals v0 behavior — the email the user signed up with. Returns null if the owner has been hard-purged. `organization_id` is a new additive field, as are `metageneration` / `etag` (also emitted as the `ETag` header). - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._me_v0_drives_me_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DriveReadOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def me_v0_drives_me_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DriveReadOut]: - """Me - - Drive overview for the authenticated bearer token. Wire-protocol preservation (WorkOS integration §6): the `email` field is preserved in the response shape; its meaning is now \"the drive's owner's email\" (via `drives.owner_user_id` → `users.email`, joined in `auth.resolve_drive`). For solo signups this equals v0 behavior — the email the user signed up with. Returns null if the owner has been hard-purged. `organization_id` is a new additive field, as are `metageneration` / `etag` (also emitted as the `ETag` header). - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._me_v0_drives_me_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DriveReadOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def me_v0_drives_me_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Me - - Drive overview for the authenticated bearer token. Wire-protocol preservation (WorkOS integration §6): the `email` field is preserved in the response shape; its meaning is now \"the drive's owner's email\" (via `drives.owner_user_id` → `users.email`, joined in `auth.resolve_drive`). For solo signups this equals v0 behavior — the email the user signed up with. Returns null if the owner has been hard-purged. `organization_id` is a new additive field, as are `metageneration` / `etag` (also emitted as the `ETag` header). - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._me_v0_drives_me_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DriveReadOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _me_v0_drives_me_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/drives/me', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def move_artifact_route_v0_artifacts_art_id_move_post( - self, - art_id: StrictStr, - artifact_move_in: ArtifactMoveIn, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ArtifactOut: - """Rename / move an artifact to a new path - - Canonical artifact move/rename, keyed by the stable `art_…` ID (the artifact analogue of `POST /v0/folders/{fld_id}/move`). Moves the artifact to a new `path` on the same drive; ID, version history, source refs, labels, metadata, and the underlying CAS blob are all preserved — only `path` and `updated_at` change, and the move does NOT bump `version_number`. The row UPDATE and the emitted `artifact.renamed` event commit in a SINGLE transaction — a failure leaves the artifact fully unchanged. Returns 409 PATH_CONFLICT if the target `path` is already taken; 404 ARTIFACT_NOT_FOUND for an unknown id; 403 WIKI_RESERVED for a `_wiki/` / `_compiled/` target. Honors `If-Match` (→ 412 PRECONDITION_FAILED). Use `X-AgentDrive-Actor` to attach attribution to the emitted `artifact.renamed` event. - - :param art_id: (required) - :type art_id: str - :param artifact_move_in: (required) - :type artifact_move_in: ArtifactMoveIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._move_artifact_route_v0_artifacts_art_id_move_post_serialize( - art_id=art_id, - artifact_move_in=artifact_move_in, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def move_artifact_route_v0_artifacts_art_id_move_post_with_http_info( - self, - art_id: StrictStr, - artifact_move_in: ArtifactMoveIn, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ArtifactOut]: - """Rename / move an artifact to a new path - - Canonical artifact move/rename, keyed by the stable `art_…` ID (the artifact analogue of `POST /v0/folders/{fld_id}/move`). Moves the artifact to a new `path` on the same drive; ID, version history, source refs, labels, metadata, and the underlying CAS blob are all preserved — only `path` and `updated_at` change, and the move does NOT bump `version_number`. The row UPDATE and the emitted `artifact.renamed` event commit in a SINGLE transaction — a failure leaves the artifact fully unchanged. Returns 409 PATH_CONFLICT if the target `path` is already taken; 404 ARTIFACT_NOT_FOUND for an unknown id; 403 WIKI_RESERVED for a `_wiki/` / `_compiled/` target. Honors `If-Match` (→ 412 PRECONDITION_FAILED). Use `X-AgentDrive-Actor` to attach attribution to the emitted `artifact.renamed` event. - - :param art_id: (required) - :type art_id: str - :param artifact_move_in: (required) - :type artifact_move_in: ArtifactMoveIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._move_artifact_route_v0_artifacts_art_id_move_post_serialize( - art_id=art_id, - artifact_move_in=artifact_move_in, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def move_artifact_route_v0_artifacts_art_id_move_post_without_preload_content( - self, - art_id: StrictStr, - artifact_move_in: ArtifactMoveIn, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Rename / move an artifact to a new path - - Canonical artifact move/rename, keyed by the stable `art_…` ID (the artifact analogue of `POST /v0/folders/{fld_id}/move`). Moves the artifact to a new `path` on the same drive; ID, version history, source refs, labels, metadata, and the underlying CAS blob are all preserved — only `path` and `updated_at` change, and the move does NOT bump `version_number`. The row UPDATE and the emitted `artifact.renamed` event commit in a SINGLE transaction — a failure leaves the artifact fully unchanged. Returns 409 PATH_CONFLICT if the target `path` is already taken; 404 ARTIFACT_NOT_FOUND for an unknown id; 403 WIKI_RESERVED for a `_wiki/` / `_compiled/` target. Honors `If-Match` (→ 412 PRECONDITION_FAILED). Use `X-AgentDrive-Actor` to attach attribution to the emitted `artifact.renamed` event. - - :param art_id: (required) - :type art_id: str - :param artifact_move_in: (required) - :type artifact_move_in: ArtifactMoveIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._move_artifact_route_v0_artifacts_art_id_move_post_serialize( - art_id=art_id, - artifact_move_in=artifact_move_in, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _move_artifact_route_v0_artifacts_art_id_move_post_serialize( - self, - art_id, - artifact_move_in, - x_agentdrive_actor, - if_match, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if art_id is not None: - _path_params['art_id'] = art_id - # process the query parameters - # process the header parameters - if x_agentdrive_actor is not None: - _header_params['x-agentdrive-actor'] = x_agentdrive_actor - if if_match is not None: - _header_params['if-match'] = if_match - # process the form parameters - # process the body parameter - if artifact_move_in is not None: - _body_params = artifact_move_in - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v0/artifacts/{art_id}/move', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def move_folder_by_id_v0_folders_fld_id_move_post( - self, - fld_id: StrictStr, - folder_move_in: FolderMoveIn, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FolderOut: - """Rename / move a folder by stable ID (cascade descendants) - - - :param fld_id: (required) - :type fld_id: str - :param folder_move_in: (required) - :type folder_move_in: FolderMoveIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._move_folder_by_id_v0_folders_fld_id_move_post_serialize( - fld_id=fld_id, - folder_move_in=folder_move_in, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def move_folder_by_id_v0_folders_fld_id_move_post_with_http_info( - self, - fld_id: StrictStr, - folder_move_in: FolderMoveIn, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FolderOut]: - """Rename / move a folder by stable ID (cascade descendants) - - - :param fld_id: (required) - :type fld_id: str - :param folder_move_in: (required) - :type folder_move_in: FolderMoveIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._move_folder_by_id_v0_folders_fld_id_move_post_serialize( - fld_id=fld_id, - folder_move_in=folder_move_in, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def move_folder_by_id_v0_folders_fld_id_move_post_without_preload_content( - self, - fld_id: StrictStr, - folder_move_in: FolderMoveIn, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Rename / move a folder by stable ID (cascade descendants) - - - :param fld_id: (required) - :type fld_id: str - :param folder_move_in: (required) - :type folder_move_in: FolderMoveIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._move_folder_by_id_v0_folders_fld_id_move_post_serialize( - fld_id=fld_id, - folder_move_in=folder_move_in, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _move_folder_by_id_v0_folders_fld_id_move_post_serialize( - self, - fld_id, - folder_move_in, - x_agentdrive_actor, - if_match, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if fld_id is not None: - _path_params['fld_id'] = fld_id - # process the query parameters - # process the header parameters - if x_agentdrive_actor is not None: - _header_params['x-agentdrive-actor'] = x_agentdrive_actor - if if_match is not None: - _header_params['if-match'] = if_match - # process the form parameters - # process the body parameter - if folder_move_in is not None: - _body_params = folder_move_in - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v0/folders/{fld_id}/move', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def move_folder_by_path_v0_folders_path_move_post( - self, - path: StrictStr, - folder_move_in: FolderMoveIn, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FolderOut: - """Rename / move a folder (cascade-update descendants) - - Move the folder identified by URL path to the body's `path`. All descendant folders + artifacts are path-prefix-updated in the same transaction. The folder's `fld_*` ID stays stable. Returns 409 `FOLDER_PATH_CONFLICT` if the destination prefix collides with a live folder or artifact path. - - :param path: (required) - :type path: str - :param folder_move_in: (required) - :type folder_move_in: FolderMoveIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._move_folder_by_path_v0_folders_path_move_post_serialize( - path=path, - folder_move_in=folder_move_in, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def move_folder_by_path_v0_folders_path_move_post_with_http_info( - self, - path: StrictStr, - folder_move_in: FolderMoveIn, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FolderOut]: - """Rename / move a folder (cascade-update descendants) - - Move the folder identified by URL path to the body's `path`. All descendant folders + artifacts are path-prefix-updated in the same transaction. The folder's `fld_*` ID stays stable. Returns 409 `FOLDER_PATH_CONFLICT` if the destination prefix collides with a live folder or artifact path. - - :param path: (required) - :type path: str - :param folder_move_in: (required) - :type folder_move_in: FolderMoveIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._move_folder_by_path_v0_folders_path_move_post_serialize( - path=path, - folder_move_in=folder_move_in, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def move_folder_by_path_v0_folders_path_move_post_without_preload_content( - self, - path: StrictStr, - folder_move_in: FolderMoveIn, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Rename / move a folder (cascade-update descendants) - - Move the folder identified by URL path to the body's `path`. All descendant folders + artifacts are path-prefix-updated in the same transaction. The folder's `fld_*` ID stays stable. Returns 409 `FOLDER_PATH_CONFLICT` if the destination prefix collides with a live folder or artifact path. - - :param path: (required) - :type path: str - :param folder_move_in: (required) - :type folder_move_in: FolderMoveIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._move_folder_by_path_v0_folders_path_move_post_serialize( - path=path, - folder_move_in=folder_move_in, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _move_folder_by_path_v0_folders_path_move_post_serialize( - self, - path, - folder_move_in, - x_agentdrive_actor, - if_match, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if path is not None: - _path_params['path'] = path - # process the query parameters - # process the header parameters - if x_agentdrive_actor is not None: - _header_params['x-agentdrive-actor'] = x_agentdrive_actor - if if_match is not None: - _header_params['if-match'] = if_match - # process the form parameters - # process the body parameter - if folder_move_in is not None: - _body_params = folder_move_in - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v0/folders/{path}/move', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def patch_artifact_route_v0_artifacts_art_id_patch( - self, - art_id: StrictStr, - artifact_patch_in: ArtifactPatchIn, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ArtifactOut: - """Edit artifact metadata (labels / metadata / source) - - Metadata-only JSON-merge-patch update of a single artifact, keyed by its stable `art_…` ID. Every field in the body is optional; a field that is **omitted** is left unchanged, a field that is **present** is applied — with an explicit `null` / `[]` / `{}` meaning \"clear\". This mirrors the MCP `set_metadata` tool. Editable fields: * `labels` — replace the label set (`[]`/`null` clears). * `metadata` — replace the free-form metadata object (`{}`/`null` clears). * `source` — replace provenance refs (`null` clears). **To move/rename an artifact, use `POST /v0/artifacts/{art_id}/move`** — PATCH no longer accepts `path`. The body is `extra=\"forbid\"`, so a stray field (notably a legacy `path`) is rejected with 422 rather than silently ignored. Metadata edits do NOT create a new content version (no `version_number` / generation bump, no `artifact_versions` row) but DO bump the artifact's `metageneration` and `updated_at`. Returns 400 BAD_LABELS / BAD_SOURCE for invalid metadata; 404 ARTIFACT_NOT_FOUND for an unknown id. Honors `If-Match`, which takes the composite ETag `\"..\"` and is compared as a whole tuple: ANY concurrent content **or** metadata change (a bumped generation OR metageneration) → 412 PRECONDITION_FAILED. There is no last-writer-wins gap for metadata-only edits. Use `X-AgentDrive-Actor` to attach attribution to the emitted `artifact.metadata_updated` event. - - :param art_id: (required) - :type art_id: str - :param artifact_patch_in: (required) - :type artifact_patch_in: ArtifactPatchIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._patch_artifact_route_v0_artifacts_art_id_patch_serialize( - art_id=art_id, - artifact_patch_in=artifact_patch_in, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def patch_artifact_route_v0_artifacts_art_id_patch_with_http_info( - self, - art_id: StrictStr, - artifact_patch_in: ArtifactPatchIn, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ArtifactOut]: - """Edit artifact metadata (labels / metadata / source) - - Metadata-only JSON-merge-patch update of a single artifact, keyed by its stable `art_…` ID. Every field in the body is optional; a field that is **omitted** is left unchanged, a field that is **present** is applied — with an explicit `null` / `[]` / `{}` meaning \"clear\". This mirrors the MCP `set_metadata` tool. Editable fields: * `labels` — replace the label set (`[]`/`null` clears). * `metadata` — replace the free-form metadata object (`{}`/`null` clears). * `source` — replace provenance refs (`null` clears). **To move/rename an artifact, use `POST /v0/artifacts/{art_id}/move`** — PATCH no longer accepts `path`. The body is `extra=\"forbid\"`, so a stray field (notably a legacy `path`) is rejected with 422 rather than silently ignored. Metadata edits do NOT create a new content version (no `version_number` / generation bump, no `artifact_versions` row) but DO bump the artifact's `metageneration` and `updated_at`. Returns 400 BAD_LABELS / BAD_SOURCE for invalid metadata; 404 ARTIFACT_NOT_FOUND for an unknown id. Honors `If-Match`, which takes the composite ETag `\"..\"` and is compared as a whole tuple: ANY concurrent content **or** metadata change (a bumped generation OR metageneration) → 412 PRECONDITION_FAILED. There is no last-writer-wins gap for metadata-only edits. Use `X-AgentDrive-Actor` to attach attribution to the emitted `artifact.metadata_updated` event. - - :param art_id: (required) - :type art_id: str - :param artifact_patch_in: (required) - :type artifact_patch_in: ArtifactPatchIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._patch_artifact_route_v0_artifacts_art_id_patch_serialize( - art_id=art_id, - artifact_patch_in=artifact_patch_in, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def patch_artifact_route_v0_artifacts_art_id_patch_without_preload_content( - self, - art_id: StrictStr, - artifact_patch_in: ArtifactPatchIn, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Edit artifact metadata (labels / metadata / source) - - Metadata-only JSON-merge-patch update of a single artifact, keyed by its stable `art_…` ID. Every field in the body is optional; a field that is **omitted** is left unchanged, a field that is **present** is applied — with an explicit `null` / `[]` / `{}` meaning \"clear\". This mirrors the MCP `set_metadata` tool. Editable fields: * `labels` — replace the label set (`[]`/`null` clears). * `metadata` — replace the free-form metadata object (`{}`/`null` clears). * `source` — replace provenance refs (`null` clears). **To move/rename an artifact, use `POST /v0/artifacts/{art_id}/move`** — PATCH no longer accepts `path`. The body is `extra=\"forbid\"`, so a stray field (notably a legacy `path`) is rejected with 422 rather than silently ignored. Metadata edits do NOT create a new content version (no `version_number` / generation bump, no `artifact_versions` row) but DO bump the artifact's `metageneration` and `updated_at`. Returns 400 BAD_LABELS / BAD_SOURCE for invalid metadata; 404 ARTIFACT_NOT_FOUND for an unknown id. Honors `If-Match`, which takes the composite ETag `\"..\"` and is compared as a whole tuple: ANY concurrent content **or** metadata change (a bumped generation OR metageneration) → 412 PRECONDITION_FAILED. There is no last-writer-wins gap for metadata-only edits. Use `X-AgentDrive-Actor` to attach attribution to the emitted `artifact.metadata_updated` event. - - :param art_id: (required) - :type art_id: str - :param artifact_patch_in: (required) - :type artifact_patch_in: ArtifactPatchIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._patch_artifact_route_v0_artifacts_art_id_patch_serialize( - art_id=art_id, - artifact_patch_in=artifact_patch_in, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _patch_artifact_route_v0_artifacts_art_id_patch_serialize( - self, - art_id, - artifact_patch_in, - x_agentdrive_actor, - if_match, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if art_id is not None: - _path_params['art_id'] = art_id - # process the query parameters - # process the header parameters - if x_agentdrive_actor is not None: - _header_params['x-agentdrive-actor'] = x_agentdrive_actor - if if_match is not None: - _header_params['if-match'] = if_match - # process the form parameters - # process the body parameter - if artifact_patch_in is not None: - _body_params = artifact_patch_in - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='PATCH', - resource_path='/v0/artifacts/{art_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def patch_folder_by_id_v0_folders_fld_id_patch( - self, - fld_id: StrictStr, - folder_patch_in: FolderPatchIn, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FolderOut: - """Update folder metadata by stable ID - - - :param fld_id: (required) - :type fld_id: str - :param folder_patch_in: (required) - :type folder_patch_in: FolderPatchIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._patch_folder_by_id_v0_folders_fld_id_patch_serialize( - fld_id=fld_id, - folder_patch_in=folder_patch_in, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def patch_folder_by_id_v0_folders_fld_id_patch_with_http_info( - self, - fld_id: StrictStr, - folder_patch_in: FolderPatchIn, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FolderOut]: - """Update folder metadata by stable ID - - - :param fld_id: (required) - :type fld_id: str - :param folder_patch_in: (required) - :type folder_patch_in: FolderPatchIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._patch_folder_by_id_v0_folders_fld_id_patch_serialize( - fld_id=fld_id, - folder_patch_in=folder_patch_in, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def patch_folder_by_id_v0_folders_fld_id_patch_without_preload_content( - self, - fld_id: StrictStr, - folder_patch_in: FolderPatchIn, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Update folder metadata by stable ID - - - :param fld_id: (required) - :type fld_id: str - :param folder_patch_in: (required) - :type folder_patch_in: FolderPatchIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._patch_folder_by_id_v0_folders_fld_id_patch_serialize( - fld_id=fld_id, - folder_patch_in=folder_patch_in, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _patch_folder_by_id_v0_folders_fld_id_patch_serialize( - self, - fld_id, - folder_patch_in, - x_agentdrive_actor, - if_match, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if fld_id is not None: - _path_params['fld_id'] = fld_id - # process the query parameters - # process the header parameters - if x_agentdrive_actor is not None: - _header_params['x-agentdrive-actor'] = x_agentdrive_actor - if if_match is not None: - _header_params['if-match'] = if_match - # process the form parameters - # process the body parameter - if folder_patch_in is not None: - _body_params = folder_patch_in - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='PATCH', - resource_path='/v0/folders/{fld_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def patch_folder_by_path_v0_folders_path_patch( - self, - path: StrictStr, - folder_patch_in: FolderPatchIn, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FolderOut: - """Update folder metadata by path - - Partial update — field absence leaves the value unchanged; explicit `null` clears the field. Use the by-id endpoint (slice 2) when you need stable addressing across renames. - - :param path: (required) - :type path: str - :param folder_patch_in: (required) - :type folder_patch_in: FolderPatchIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._patch_folder_by_path_v0_folders_path_patch_serialize( - path=path, - folder_patch_in=folder_patch_in, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def patch_folder_by_path_v0_folders_path_patch_with_http_info( - self, - path: StrictStr, - folder_patch_in: FolderPatchIn, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FolderOut]: - """Update folder metadata by path - - Partial update — field absence leaves the value unchanged; explicit `null` clears the field. Use the by-id endpoint (slice 2) when you need stable addressing across renames. - - :param path: (required) - :type path: str - :param folder_patch_in: (required) - :type folder_patch_in: FolderPatchIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._patch_folder_by_path_v0_folders_path_patch_serialize( - path=path, - folder_patch_in=folder_patch_in, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def patch_folder_by_path_v0_folders_path_patch_without_preload_content( - self, - path: StrictStr, - folder_patch_in: FolderPatchIn, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Update folder metadata by path - - Partial update — field absence leaves the value unchanged; explicit `null` clears the field. Use the by-id endpoint (slice 2) when you need stable addressing across renames. - - :param path: (required) - :type path: str - :param folder_patch_in: (required) - :type folder_patch_in: FolderPatchIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._patch_folder_by_path_v0_folders_path_patch_serialize( - path=path, - folder_patch_in=folder_patch_in, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _patch_folder_by_path_v0_folders_path_patch_serialize( - self, - path, - folder_patch_in, - x_agentdrive_actor, - if_match, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if path is not None: - _path_params['path'] = path - # process the query parameters - # process the header parameters - if x_agentdrive_actor is not None: - _header_params['x-agentdrive-actor'] = x_agentdrive_actor - if if_match is not None: - _header_params['if-match'] = if_match - # process the form parameters - # process the body parameter - if folder_patch_in is not None: - _body_params = folder_patch_in - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='PATCH', - resource_path='/v0/folders/{path}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def patch_grant_route_v0_grants_grn_id_patch( - self, - grn_id: StrictStr, - grant_patch_in: GrantPatchIn, - x_agentdrive_actor: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GrantOut: - """Update a grant's role and/or expiry (requires can_manage) - - - :param grn_id: (required) - :type grn_id: str - :param grant_patch_in: (required) - :type grant_patch_in: GrantPatchIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._patch_grant_route_v0_grants_grn_id_patch_serialize( - grn_id=grn_id, - grant_patch_in=grant_patch_in, - x_agentdrive_actor=x_agentdrive_actor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GrantOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def patch_grant_route_v0_grants_grn_id_patch_with_http_info( - self, - grn_id: StrictStr, - grant_patch_in: GrantPatchIn, - x_agentdrive_actor: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GrantOut]: - """Update a grant's role and/or expiry (requires can_manage) - - - :param grn_id: (required) - :type grn_id: str - :param grant_patch_in: (required) - :type grant_patch_in: GrantPatchIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._patch_grant_route_v0_grants_grn_id_patch_serialize( - grn_id=grn_id, - grant_patch_in=grant_patch_in, - x_agentdrive_actor=x_agentdrive_actor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GrantOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def patch_grant_route_v0_grants_grn_id_patch_without_preload_content( - self, - grn_id: StrictStr, - grant_patch_in: GrantPatchIn, - x_agentdrive_actor: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Update a grant's role and/or expiry (requires can_manage) - - - :param grn_id: (required) - :type grn_id: str - :param grant_patch_in: (required) - :type grant_patch_in: GrantPatchIn - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._patch_grant_route_v0_grants_grn_id_patch_serialize( - grn_id=grn_id, - grant_patch_in=grant_patch_in, - x_agentdrive_actor=x_agentdrive_actor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GrantOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _patch_grant_route_v0_grants_grn_id_patch_serialize( - self, - grn_id, - grant_patch_in, - x_agentdrive_actor, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if grn_id is not None: - _path_params['grn_id'] = grn_id - # process the query parameters - # process the header parameters - if x_agentdrive_actor is not None: - _header_params['x-agentdrive-actor'] = x_agentdrive_actor - # process the form parameters - # process the body parameter - if grant_patch_in is not None: - _body_params = grant_patch_in - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='PATCH', - resource_path='/v0/grants/{grn_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def post_describe_v0_query_describe_post( - self, - describe_in: DescribeIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DatasetDescriptionOut: - """Describe a dataset's column schema - - - :param describe_in: (required) - :type describe_in: DescribeIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._post_describe_v0_query_describe_post_serialize( - describe_in=describe_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DatasetDescriptionOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - '503': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def post_describe_v0_query_describe_post_with_http_info( - self, - describe_in: DescribeIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DatasetDescriptionOut]: - """Describe a dataset's column schema - - - :param describe_in: (required) - :type describe_in: DescribeIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._post_describe_v0_query_describe_post_serialize( - describe_in=describe_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DatasetDescriptionOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - '503': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def post_describe_v0_query_describe_post_without_preload_content( - self, - describe_in: DescribeIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Describe a dataset's column schema - - - :param describe_in: (required) - :type describe_in: DescribeIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._post_describe_v0_query_describe_post_serialize( - describe_in=describe_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DatasetDescriptionOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - '503': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _post_describe_v0_query_describe_post_serialize( - self, - describe_in, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if describe_in is not None: - _body_params = describe_in - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v0/query/describe', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def post_feedback_v0_feedback_post( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FeedbackCreateOut: - """Post Feedback - - File feedback. Body: `{kind, title, body, contact?, attachments?: [art_id, ...]}` — attachments are snapshotted from this drive's artifacts at submit time. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._post_feedback_v0_feedback_post_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "FeedbackCreateOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def post_feedback_v0_feedback_post_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FeedbackCreateOut]: - """Post Feedback - - File feedback. Body: `{kind, title, body, contact?, attachments?: [art_id, ...]}` — attachments are snapshotted from this drive's artifacts at submit time. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._post_feedback_v0_feedback_post_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "FeedbackCreateOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def post_feedback_v0_feedback_post_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Post Feedback - - File feedback. Body: `{kind, title, body, contact?, attachments?: [art_id, ...]}` — attachments are snapshotted from this drive's artifacts at submit time. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._post_feedback_v0_feedback_post_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "FeedbackCreateOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _post_feedback_v0_feedback_post_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v0/feedback', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def post_lookup_values_v0_query_lookup_values_post( - self, - lookup_values_in: LookupValuesIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> LookupValuesOut: - """List distinct values of a dataset column - - - :param lookup_values_in: (required) - :type lookup_values_in: LookupValuesIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._post_lookup_values_v0_query_lookup_values_post_serialize( - lookup_values_in=lookup_values_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "LookupValuesOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '402': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - '503': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def post_lookup_values_v0_query_lookup_values_post_with_http_info( - self, - lookup_values_in: LookupValuesIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[LookupValuesOut]: - """List distinct values of a dataset column - - - :param lookup_values_in: (required) - :type lookup_values_in: LookupValuesIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._post_lookup_values_v0_query_lookup_values_post_serialize( - lookup_values_in=lookup_values_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "LookupValuesOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '402': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - '503': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def post_lookup_values_v0_query_lookup_values_post_without_preload_content( - self, - lookup_values_in: LookupValuesIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List distinct values of a dataset column - - - :param lookup_values_in: (required) - :type lookup_values_in: LookupValuesIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._post_lookup_values_v0_query_lookup_values_post_serialize( - lookup_values_in=lookup_values_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "LookupValuesOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '402': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - '503': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _post_lookup_values_v0_query_lookup_values_post_serialize( - self, - lookup_values_in, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if lookup_values_in is not None: - _body_params = lookup_values_in - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v0/query/lookup-values', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def post_query_v0_query_post( - self, - query_in: QueryIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ResponsePostQueryV0QueryPost: - """Run a read-only SQL query over authorized datasets - - - :param query_in: (required) - :type query_in: QueryIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._post_query_v0_query_post_serialize( - query_in=query_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ResponsePostQueryV0QueryPost", - '400': "ErrorResponse", - '401': "ErrorResponse", - '402': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - '503': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def post_query_v0_query_post_with_http_info( - self, - query_in: QueryIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ResponsePostQueryV0QueryPost]: - """Run a read-only SQL query over authorized datasets - - - :param query_in: (required) - :type query_in: QueryIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._post_query_v0_query_post_serialize( - query_in=query_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ResponsePostQueryV0QueryPost", - '400': "ErrorResponse", - '401': "ErrorResponse", - '402': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - '503': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def post_query_v0_query_post_without_preload_content( - self, - query_in: QueryIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Run a read-only SQL query over authorized datasets - - - :param query_in: (required) - :type query_in: QueryIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._post_query_v0_query_post_serialize( - query_in=query_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ResponsePostQueryV0QueryPost", - '400': "ErrorResponse", - '401': "ErrorResponse", - '402': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - '503': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _post_query_v0_query_post_serialize( - self, - query_in, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if query_in is not None: - _body_params = query_in - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v0/query', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def put_artifact_v0_artifacts_path_put( - self, - path: StrictStr, - content_type: Optional[StrictStr] = None, - x_agentdrive_labels: Optional[StrictStr] = None, - x_agentdrive_metadata: Optional[StrictStr] = None, - x_agentdrive_source: Optional[StrictStr] = None, - x_agentdrive_actor: Optional[StrictStr] = None, - x_agentdrive_change_summary: Optional[StrictStr] = None, - x_agentdrive_checksum: Optional[StrictStr] = None, - content_md5: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - if_none_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ArtifactOut: - """Upload (or overwrite) an artifact - - Upload an artifact at the given path. The path is treated as the artifact's location in the drive — re-uploading the same path overwrites in place (idempotent). Returns 201 when the artifact is created (no prior live artifact at the path), 200 on overwrite — mirroring `PUT /v0/folders/{path}`. **Limits:** request body must not exceed **50 MB**. Path must be non-empty, ≤256 chars, only `[A-Za-z0-9_./-]`, no `..` segments, no leading/trailing slash. Per-token write rate limit: 100/hour. **Optional headers.** Each preserves the existing artifact's value when omitted on an overwrite, and takes the create-default on a new path; send the header to replace it: - `X-AgentDrive-Labels`: comma-separated labels (e.g. `draft,report`); an empty value clears them. Each: lowercase `[a-z0-9_-]+`, ≤64 chars; ≤16 labels per artifact. - `X-AgentDrive-Metadata`: JSON object of agent-attached fields. - `X-AgentDrive-Source`: JSON `{\"refs\": [...]}` source provenance (present, including `{\"refs\": []}`, replaces). - `X-AgentDrive-Actor`: caller-supplied actor name (≤64 chars) for event-log attribution. Untrusted; never used for authz. **Preconditions.** `If-Match: \"..\"` makes the write conditional on the current composite ETag (→ 412 PRECONDITION_FAILED). `If-None-Match: *` is create-only: it succeeds only if no live artifact occupies the path (→ 412 CREATE_CONFLICT if one does). The two are mutually exclusive (→ 400 BAD_PRECONDITION). **Integrity (optional).** `X-AgentDrive-Checksum: :` (`sha256:` or `crc32c:`) or the standard `Content-MD5` (base64 MD5) is verified against the received bytes before they land (→ 400 CHECKSUM_MISMATCH on mismatch); no artifact is created on failure. - - :param path: (required) - :type path: str - :param content_type: - :type content_type: str - :param x_agentdrive_labels: - :type x_agentdrive_labels: str - :param x_agentdrive_metadata: - :type x_agentdrive_metadata: str - :param x_agentdrive_source: - :type x_agentdrive_source: str - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param x_agentdrive_change_summary: - :type x_agentdrive_change_summary: str - :param x_agentdrive_checksum: - :type x_agentdrive_checksum: str - :param content_md5: - :type content_md5: str - :param if_match: - :type if_match: str - :param if_none_match: - :type if_none_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._put_artifact_v0_artifacts_path_put_serialize( - path=path, - content_type=content_type, - x_agentdrive_labels=x_agentdrive_labels, - x_agentdrive_metadata=x_agentdrive_metadata, - x_agentdrive_source=x_agentdrive_source, - x_agentdrive_actor=x_agentdrive_actor, - x_agentdrive_change_summary=x_agentdrive_change_summary, - x_agentdrive_checksum=x_agentdrive_checksum, - content_md5=content_md5, - if_match=if_match, - if_none_match=if_none_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactOut", - '201': "ArtifactOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '413': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def put_artifact_v0_artifacts_path_put_with_http_info( - self, - path: StrictStr, - content_type: Optional[StrictStr] = None, - x_agentdrive_labels: Optional[StrictStr] = None, - x_agentdrive_metadata: Optional[StrictStr] = None, - x_agentdrive_source: Optional[StrictStr] = None, - x_agentdrive_actor: Optional[StrictStr] = None, - x_agentdrive_change_summary: Optional[StrictStr] = None, - x_agentdrive_checksum: Optional[StrictStr] = None, - content_md5: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - if_none_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ArtifactOut]: - """Upload (or overwrite) an artifact - - Upload an artifact at the given path. The path is treated as the artifact's location in the drive — re-uploading the same path overwrites in place (idempotent). Returns 201 when the artifact is created (no prior live artifact at the path), 200 on overwrite — mirroring `PUT /v0/folders/{path}`. **Limits:** request body must not exceed **50 MB**. Path must be non-empty, ≤256 chars, only `[A-Za-z0-9_./-]`, no `..` segments, no leading/trailing slash. Per-token write rate limit: 100/hour. **Optional headers.** Each preserves the existing artifact's value when omitted on an overwrite, and takes the create-default on a new path; send the header to replace it: - `X-AgentDrive-Labels`: comma-separated labels (e.g. `draft,report`); an empty value clears them. Each: lowercase `[a-z0-9_-]+`, ≤64 chars; ≤16 labels per artifact. - `X-AgentDrive-Metadata`: JSON object of agent-attached fields. - `X-AgentDrive-Source`: JSON `{\"refs\": [...]}` source provenance (present, including `{\"refs\": []}`, replaces). - `X-AgentDrive-Actor`: caller-supplied actor name (≤64 chars) for event-log attribution. Untrusted; never used for authz. **Preconditions.** `If-Match: \"..\"` makes the write conditional on the current composite ETag (→ 412 PRECONDITION_FAILED). `If-None-Match: *` is create-only: it succeeds only if no live artifact occupies the path (→ 412 CREATE_CONFLICT if one does). The two are mutually exclusive (→ 400 BAD_PRECONDITION). **Integrity (optional).** `X-AgentDrive-Checksum: :` (`sha256:` or `crc32c:`) or the standard `Content-MD5` (base64 MD5) is verified against the received bytes before they land (→ 400 CHECKSUM_MISMATCH on mismatch); no artifact is created on failure. - - :param path: (required) - :type path: str - :param content_type: - :type content_type: str - :param x_agentdrive_labels: - :type x_agentdrive_labels: str - :param x_agentdrive_metadata: - :type x_agentdrive_metadata: str - :param x_agentdrive_source: - :type x_agentdrive_source: str - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param x_agentdrive_change_summary: - :type x_agentdrive_change_summary: str - :param x_agentdrive_checksum: - :type x_agentdrive_checksum: str - :param content_md5: - :type content_md5: str - :param if_match: - :type if_match: str - :param if_none_match: - :type if_none_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._put_artifact_v0_artifacts_path_put_serialize( - path=path, - content_type=content_type, - x_agentdrive_labels=x_agentdrive_labels, - x_agentdrive_metadata=x_agentdrive_metadata, - x_agentdrive_source=x_agentdrive_source, - x_agentdrive_actor=x_agentdrive_actor, - x_agentdrive_change_summary=x_agentdrive_change_summary, - x_agentdrive_checksum=x_agentdrive_checksum, - content_md5=content_md5, - if_match=if_match, - if_none_match=if_none_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactOut", - '201': "ArtifactOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '413': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def put_artifact_v0_artifacts_path_put_without_preload_content( - self, - path: StrictStr, - content_type: Optional[StrictStr] = None, - x_agentdrive_labels: Optional[StrictStr] = None, - x_agentdrive_metadata: Optional[StrictStr] = None, - x_agentdrive_source: Optional[StrictStr] = None, - x_agentdrive_actor: Optional[StrictStr] = None, - x_agentdrive_change_summary: Optional[StrictStr] = None, - x_agentdrive_checksum: Optional[StrictStr] = None, - content_md5: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - if_none_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Upload (or overwrite) an artifact - - Upload an artifact at the given path. The path is treated as the artifact's location in the drive — re-uploading the same path overwrites in place (idempotent). Returns 201 when the artifact is created (no prior live artifact at the path), 200 on overwrite — mirroring `PUT /v0/folders/{path}`. **Limits:** request body must not exceed **50 MB**. Path must be non-empty, ≤256 chars, only `[A-Za-z0-9_./-]`, no `..` segments, no leading/trailing slash. Per-token write rate limit: 100/hour. **Optional headers.** Each preserves the existing artifact's value when omitted on an overwrite, and takes the create-default on a new path; send the header to replace it: - `X-AgentDrive-Labels`: comma-separated labels (e.g. `draft,report`); an empty value clears them. Each: lowercase `[a-z0-9_-]+`, ≤64 chars; ≤16 labels per artifact. - `X-AgentDrive-Metadata`: JSON object of agent-attached fields. - `X-AgentDrive-Source`: JSON `{\"refs\": [...]}` source provenance (present, including `{\"refs\": []}`, replaces). - `X-AgentDrive-Actor`: caller-supplied actor name (≤64 chars) for event-log attribution. Untrusted; never used for authz. **Preconditions.** `If-Match: \"..\"` makes the write conditional on the current composite ETag (→ 412 PRECONDITION_FAILED). `If-None-Match: *` is create-only: it succeeds only if no live artifact occupies the path (→ 412 CREATE_CONFLICT if one does). The two are mutually exclusive (→ 400 BAD_PRECONDITION). **Integrity (optional).** `X-AgentDrive-Checksum: :` (`sha256:` or `crc32c:`) or the standard `Content-MD5` (base64 MD5) is verified against the received bytes before they land (→ 400 CHECKSUM_MISMATCH on mismatch); no artifact is created on failure. - - :param path: (required) - :type path: str - :param content_type: - :type content_type: str - :param x_agentdrive_labels: - :type x_agentdrive_labels: str - :param x_agentdrive_metadata: - :type x_agentdrive_metadata: str - :param x_agentdrive_source: - :type x_agentdrive_source: str - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param x_agentdrive_change_summary: - :type x_agentdrive_change_summary: str - :param x_agentdrive_checksum: - :type x_agentdrive_checksum: str - :param content_md5: - :type content_md5: str - :param if_match: - :type if_match: str - :param if_none_match: - :type if_none_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._put_artifact_v0_artifacts_path_put_serialize( - path=path, - content_type=content_type, - x_agentdrive_labels=x_agentdrive_labels, - x_agentdrive_metadata=x_agentdrive_metadata, - x_agentdrive_source=x_agentdrive_source, - x_agentdrive_actor=x_agentdrive_actor, - x_agentdrive_change_summary=x_agentdrive_change_summary, - x_agentdrive_checksum=x_agentdrive_checksum, - content_md5=content_md5, - if_match=if_match, - if_none_match=if_none_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactOut", - '201': "ArtifactOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '413': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _put_artifact_v0_artifacts_path_put_serialize( - self, - path, - content_type, - x_agentdrive_labels, - x_agentdrive_metadata, - x_agentdrive_source, - x_agentdrive_actor, - x_agentdrive_change_summary, - x_agentdrive_checksum, - content_md5, - if_match, - if_none_match, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if path is not None: - _path_params['path'] = path - # process the query parameters - # process the header parameters - if content_type is not None: - _header_params['content-type'] = content_type - if x_agentdrive_labels is not None: - _header_params['x-agentdrive-labels'] = x_agentdrive_labels - if x_agentdrive_metadata is not None: - _header_params['x-agentdrive-metadata'] = x_agentdrive_metadata - if x_agentdrive_source is not None: - _header_params['x-agentdrive-source'] = x_agentdrive_source - if x_agentdrive_actor is not None: - _header_params['x-agentdrive-actor'] = x_agentdrive_actor - if x_agentdrive_change_summary is not None: - _header_params['x-agentdrive-change-summary'] = x_agentdrive_change_summary - if x_agentdrive_checksum is not None: - _header_params['x-agentdrive-checksum'] = x_agentdrive_checksum - if content_md5 is not None: - _header_params['content-md5'] = content_md5 - if if_match is not None: - _header_params['if-match'] = if_match - if if_none_match is not None: - _header_params['if-none-match'] = if_none_match - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/v0/artifacts/{path}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def put_project_v0_projects_fld_id_put( - self, - fld_id: StrictStr, - project_config_in: ProjectConfigIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CompileProjectOut: - """Set a project's compile config (entrypoint/engine/auto_compile) - - - :param fld_id: (required) - :type fld_id: str - :param project_config_in: (required) - :type project_config_in: ProjectConfigIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._put_project_v0_projects_fld_id_put_serialize( - fld_id=fld_id, - project_config_in=project_config_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CompileProjectOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def put_project_v0_projects_fld_id_put_with_http_info( - self, - fld_id: StrictStr, - project_config_in: ProjectConfigIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CompileProjectOut]: - """Set a project's compile config (entrypoint/engine/auto_compile) - - - :param fld_id: (required) - :type fld_id: str - :param project_config_in: (required) - :type project_config_in: ProjectConfigIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._put_project_v0_projects_fld_id_put_serialize( - fld_id=fld_id, - project_config_in=project_config_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CompileProjectOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def put_project_v0_projects_fld_id_put_without_preload_content( - self, - fld_id: StrictStr, - project_config_in: ProjectConfigIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Set a project's compile config (entrypoint/engine/auto_compile) - - - :param fld_id: (required) - :type fld_id: str - :param project_config_in: (required) - :type project_config_in: ProjectConfigIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._put_project_v0_projects_fld_id_put_serialize( - fld_id=fld_id, - project_config_in=project_config_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "CompileProjectOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _put_project_v0_projects_fld_id_put_serialize( - self, - fld_id, - project_config_in, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if fld_id is not None: - _path_params['fld_id'] = fld_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if project_config_in is not None: - _body_params = project_config_in - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/v0/projects/{fld_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def redeem_share_s_share_key_get( - self, - share_key: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ShareRedeemOut: - """Redeem Share - - - :param share_key: (required) - :type share_key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._redeem_share_s_share_key_get_serialize( - share_key=share_key, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ShareRedeemOut", - '302': None, - '401': "ShareErrorOut", - '404': "ShareErrorOut", - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def redeem_share_s_share_key_get_with_http_info( - self, - share_key: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ShareRedeemOut]: - """Redeem Share - - - :param share_key: (required) - :type share_key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._redeem_share_s_share_key_get_serialize( - share_key=share_key, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ShareRedeemOut", - '302': None, - '401': "ShareErrorOut", - '404': "ShareErrorOut", - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def redeem_share_s_share_key_get_without_preload_content( - self, - share_key: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Redeem Share - - - :param share_key: (required) - :type share_key: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._redeem_share_s_share_key_get_serialize( - share_key=share_key, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ShareRedeemOut", - '302': None, - '401': "ShareErrorOut", - '404': "ShareErrorOut", - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _redeem_share_s_share_key_get_serialize( - self, - share_key, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if share_key is not None: - _path_params['share_key'] = share_key - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'text/html' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/s/{share_key}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def redeem_share_with_password_s_share_key_post( - self, - share_key: StrictStr, - password: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ShareRedeemOut: - """Redeem Share With Password - - - :param share_key: (required) - :type share_key: str - :param password: - :type password: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._redeem_share_with_password_s_share_key_post_serialize( - share_key=share_key, - password=password, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ShareRedeemOut", - '302': None, - '401': "ShareErrorOut", - '404': "ShareErrorOut", - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def redeem_share_with_password_s_share_key_post_with_http_info( - self, - share_key: StrictStr, - password: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ShareRedeemOut]: - """Redeem Share With Password - - - :param share_key: (required) - :type share_key: str - :param password: - :type password: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._redeem_share_with_password_s_share_key_post_serialize( - share_key=share_key, - password=password, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ShareRedeemOut", - '302': None, - '401': "ShareErrorOut", - '404': "ShareErrorOut", - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def redeem_share_with_password_s_share_key_post_without_preload_content( - self, - share_key: StrictStr, - password: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Redeem Share With Password - - - :param share_key: (required) - :type share_key: str - :param password: - :type password: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._redeem_share_with_password_s_share_key_post_serialize( - share_key=share_key, - password=password, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ShareRedeemOut", - '302': None, - '401': "ShareErrorOut", - '404': "ShareErrorOut", - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _redeem_share_with_password_s_share_key_post_serialize( - self, - share_key, - password, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if share_key is not None: - _path_params['share_key'] = share_key - # process the query parameters - # process the header parameters - # process the form parameters - if password is not None: - _form_params.append(('password', password)) - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json', - 'text/html' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/x-www-form-urlencoded' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/s/{share_key}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def restore_artifact_v0_artifacts_art_id_restore_post( - self, - art_id: StrictStr, - rename: Annotated[Optional[StrictStr], Field(description="Restore at this path instead of the original. Soft-deletes the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. Mutually exclusive with `overwrite`.")] = None, - overwrite: Annotated[Optional[StrictBool], Field(description="Soft-delete the live occupant at the original path and restore there. Audit `metadata.cause='restore_conflict_overwrite'`. Mutually exclusive with `rename`.")] = None, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ArtifactOut: - """Restore a soft-deleted artifact - - Clear `deleted_at` + `purge_at` on a soft-deleted artifact. Available only while the artifact is in trash (i.e. before the GC cleanup cron purges it). Returns 404 if the artifact is live or already hard-deleted; 409 PATH_CONFLICT if its path is now occupied by another live artifact. The 409 payload includes a `restore_options` block with `rename_to` and `force_overwrite` URLs the caller can follow to resolve the conflict — see deletion-design.md §5.4. - - :param art_id: (required) - :type art_id: str - :param rename: Restore at this path instead of the original. Soft-deletes the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. Mutually exclusive with `overwrite`. - :type rename: str - :param overwrite: Soft-delete the live occupant at the original path and restore there. Audit `metadata.cause='restore_conflict_overwrite'`. Mutually exclusive with `rename`. - :type overwrite: bool - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._restore_artifact_v0_artifacts_art_id_restore_post_serialize( - art_id=art_id, - rename=rename, - overwrite=overwrite, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def restore_artifact_v0_artifacts_art_id_restore_post_with_http_info( - self, - art_id: StrictStr, - rename: Annotated[Optional[StrictStr], Field(description="Restore at this path instead of the original. Soft-deletes the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. Mutually exclusive with `overwrite`.")] = None, - overwrite: Annotated[Optional[StrictBool], Field(description="Soft-delete the live occupant at the original path and restore there. Audit `metadata.cause='restore_conflict_overwrite'`. Mutually exclusive with `rename`.")] = None, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ArtifactOut]: - """Restore a soft-deleted artifact - - Clear `deleted_at` + `purge_at` on a soft-deleted artifact. Available only while the artifact is in trash (i.e. before the GC cleanup cron purges it). Returns 404 if the artifact is live or already hard-deleted; 409 PATH_CONFLICT if its path is now occupied by another live artifact. The 409 payload includes a `restore_options` block with `rename_to` and `force_overwrite` URLs the caller can follow to resolve the conflict — see deletion-design.md §5.4. - - :param art_id: (required) - :type art_id: str - :param rename: Restore at this path instead of the original. Soft-deletes the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. Mutually exclusive with `overwrite`. - :type rename: str - :param overwrite: Soft-delete the live occupant at the original path and restore there. Audit `metadata.cause='restore_conflict_overwrite'`. Mutually exclusive with `rename`. - :type overwrite: bool - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._restore_artifact_v0_artifacts_art_id_restore_post_serialize( - art_id=art_id, - rename=rename, - overwrite=overwrite, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def restore_artifact_v0_artifacts_art_id_restore_post_without_preload_content( - self, - art_id: StrictStr, - rename: Annotated[Optional[StrictStr], Field(description="Restore at this path instead of the original. Soft-deletes the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. Mutually exclusive with `overwrite`.")] = None, - overwrite: Annotated[Optional[StrictBool], Field(description="Soft-delete the live occupant at the original path and restore there. Audit `metadata.cause='restore_conflict_overwrite'`. Mutually exclusive with `rename`.")] = None, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Restore a soft-deleted artifact - - Clear `deleted_at` + `purge_at` on a soft-deleted artifact. Available only while the artifact is in trash (i.e. before the GC cleanup cron purges it). Returns 404 if the artifact is live or already hard-deleted; 409 PATH_CONFLICT if its path is now occupied by another live artifact. The 409 payload includes a `restore_options` block with `rename_to` and `force_overwrite` URLs the caller can follow to resolve the conflict — see deletion-design.md §5.4. - - :param art_id: (required) - :type art_id: str - :param rename: Restore at this path instead of the original. Soft-deletes the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. Mutually exclusive with `overwrite`. - :type rename: str - :param overwrite: Soft-delete the live occupant at the original path and restore there. Audit `metadata.cause='restore_conflict_overwrite'`. Mutually exclusive with `rename`. - :type overwrite: bool - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._restore_artifact_v0_artifacts_art_id_restore_post_serialize( - art_id=art_id, - rename=rename, - overwrite=overwrite, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _restore_artifact_v0_artifacts_art_id_restore_post_serialize( - self, - art_id, - rename, - overwrite, - x_agentdrive_actor, - if_match, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if art_id is not None: - _path_params['art_id'] = art_id - # process the query parameters - if rename is not None: - - _query_params.append(('rename', rename)) - - if overwrite is not None: - - _query_params.append(('overwrite', overwrite)) - - # process the header parameters - if x_agentdrive_actor is not None: - _header_params['x-agentdrive-actor'] = x_agentdrive_actor - if if_match is not None: - _header_params['if-match'] = if_match - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v0/artifacts/{art_id}/restore', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def restore_artifact_version_v0_artifacts_art_id_versions_version_number_restore_post( - self, - art_id: StrictStr, - version_number: StrictInt, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ArtifactOut: - """Restore a previous version as a new head version - - Roll the artifact forward to the content of version `version_number` by creating a **new head version** with identical bytes. History is preserved — this never rewrites or deletes past versions. The prior version's content-addressed blob is reused, so no bytes are re-uploaded. A change summary of `Restored version N` is recorded on the new version; `X-AgentDrive-Actor` attributes it. Restoring a version whose content already matches the current head (including the head itself) is a **no-op**: it returns the current artifact unchanged, with no new version created. Honors `If-Match` on the current head (roll forward only if the head is unchanged → 412 PRECONDITION_FAILED). Errors: `404 ARTIFACT_NOT_FOUND`, `404 VERSION_NOT_FOUND`, and `410 VERSION_PRUNED` when the version existed but its bytes were retained out of existence. - - :param art_id: (required) - :type art_id: str - :param version_number: (required) - :type version_number: int - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._restore_artifact_version_v0_artifacts_art_id_versions_version_number_restore_post_serialize( - art_id=art_id, - version_number=version_number, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '410': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def restore_artifact_version_v0_artifacts_art_id_versions_version_number_restore_post_with_http_info( - self, - art_id: StrictStr, - version_number: StrictInt, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ArtifactOut]: - """Restore a previous version as a new head version - - Roll the artifact forward to the content of version `version_number` by creating a **new head version** with identical bytes. History is preserved — this never rewrites or deletes past versions. The prior version's content-addressed blob is reused, so no bytes are re-uploaded. A change summary of `Restored version N` is recorded on the new version; `X-AgentDrive-Actor` attributes it. Restoring a version whose content already matches the current head (including the head itself) is a **no-op**: it returns the current artifact unchanged, with no new version created. Honors `If-Match` on the current head (roll forward only if the head is unchanged → 412 PRECONDITION_FAILED). Errors: `404 ARTIFACT_NOT_FOUND`, `404 VERSION_NOT_FOUND`, and `410 VERSION_PRUNED` when the version existed but its bytes were retained out of existence. - - :param art_id: (required) - :type art_id: str - :param version_number: (required) - :type version_number: int - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._restore_artifact_version_v0_artifacts_art_id_versions_version_number_restore_post_serialize( - art_id=art_id, - version_number=version_number, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '410': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def restore_artifact_version_v0_artifacts_art_id_versions_version_number_restore_post_without_preload_content( - self, - art_id: StrictStr, - version_number: StrictInt, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Restore a previous version as a new head version - - Roll the artifact forward to the content of version `version_number` by creating a **new head version** with identical bytes. History is preserved — this never rewrites or deletes past versions. The prior version's content-addressed blob is reused, so no bytes are re-uploaded. A change summary of `Restored version N` is recorded on the new version; `X-AgentDrive-Actor` attributes it. Restoring a version whose content already matches the current head (including the head itself) is a **no-op**: it returns the current artifact unchanged, with no new version created. Honors `If-Match` on the current head (roll forward only if the head is unchanged → 412 PRECONDITION_FAILED). Errors: `404 ARTIFACT_NOT_FOUND`, `404 VERSION_NOT_FOUND`, and `410 VERSION_PRUNED` when the version existed but its bytes were retained out of existence. - - :param art_id: (required) - :type art_id: str - :param version_number: (required) - :type version_number: int - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._restore_artifact_version_v0_artifacts_art_id_versions_version_number_restore_post_serialize( - art_id=art_id, - version_number=version_number, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '410': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _restore_artifact_version_v0_artifacts_art_id_versions_version_number_restore_post_serialize( - self, - art_id, - version_number, - x_agentdrive_actor, - if_match, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if art_id is not None: - _path_params['art_id'] = art_id - if version_number is not None: - _path_params['version_number'] = version_number - # process the query parameters - # process the header parameters - if x_agentdrive_actor is not None: - _header_params['x-agentdrive-actor'] = x_agentdrive_actor - if if_match is not None: - _header_params['if-match'] = if_match - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v0/artifacts/{art_id}/versions/{version_number}/restore', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def restore_drive_route_v0_drives_drive_id_restore_post( - self, - drive_id: StrictStr, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DriveRestoreOut: - """Restore a soft-deleted drive - - Clear `deleted_at` + `purge_at` on a soft-deleted drive. Soft-deleted child artifacts get their retention window rebased to the drive-restore moment (see deletion-design.md §5.2). Available only while the drive is in trash. Returns 404 if the drive is live or already hard-deleted. **Optimistic concurrency:** send `If-Match` with the trashed drive's composite ETag (`\".0.\"`, e.g. from the delete response's `ETag` header) to make the restore conditional — a stale token returns 412 PRECONDITION_FAILED. A restore WITHOUT an `If-Match` precondition is last-writer-wins. - - :param drive_id: (required) - :type drive_id: str - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._restore_drive_route_v0_drives_drive_id_restore_post_serialize( - drive_id=drive_id, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DriveRestoreOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def restore_drive_route_v0_drives_drive_id_restore_post_with_http_info( - self, - drive_id: StrictStr, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DriveRestoreOut]: - """Restore a soft-deleted drive - - Clear `deleted_at` + `purge_at` on a soft-deleted drive. Soft-deleted child artifacts get their retention window rebased to the drive-restore moment (see deletion-design.md §5.2). Available only while the drive is in trash. Returns 404 if the drive is live or already hard-deleted. **Optimistic concurrency:** send `If-Match` with the trashed drive's composite ETag (`\".0.\"`, e.g. from the delete response's `ETag` header) to make the restore conditional — a stale token returns 412 PRECONDITION_FAILED. A restore WITHOUT an `If-Match` precondition is last-writer-wins. - - :param drive_id: (required) - :type drive_id: str - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._restore_drive_route_v0_drives_drive_id_restore_post_serialize( - drive_id=drive_id, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DriveRestoreOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def restore_drive_route_v0_drives_drive_id_restore_post_without_preload_content( - self, - drive_id: StrictStr, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Restore a soft-deleted drive - - Clear `deleted_at` + `purge_at` on a soft-deleted drive. Soft-deleted child artifacts get their retention window rebased to the drive-restore moment (see deletion-design.md §5.2). Available only while the drive is in trash. Returns 404 if the drive is live or already hard-deleted. **Optimistic concurrency:** send `If-Match` with the trashed drive's composite ETag (`\".0.\"`, e.g. from the delete response's `ETag` header) to make the restore conditional — a stale token returns 412 PRECONDITION_FAILED. A restore WITHOUT an `If-Match` precondition is last-writer-wins. - - :param drive_id: (required) - :type drive_id: str - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._restore_drive_route_v0_drives_drive_id_restore_post_serialize( - drive_id=drive_id, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DriveRestoreOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _restore_drive_route_v0_drives_drive_id_restore_post_serialize( - self, - drive_id, - x_agentdrive_actor, - if_match, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if drive_id is not None: - _path_params['drive_id'] = drive_id - # process the query parameters - # process the header parameters - if x_agentdrive_actor is not None: - _header_params['x-agentdrive-actor'] = x_agentdrive_actor - if if_match is not None: - _header_params['if-match'] = if_match - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v0/drives/{drive_id}/restore', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def restore_folder_by_id_v0_folders_fld_id_restore_post( - self, - fld_id: StrictStr, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FolderRestoreOut: - """Restore a soft-deleted folder (cascade) - - Mirrors `POST /v0/artifacts/{art_id}/restore` for folders: clear `deleted_at` + `purge_at` on a soft-deleted folder AND exactly the descendants soft-deleted in the same cascade (descendants trashed separately keep their trash state; restore those individually — the per-artifact restore remains for cherry-picking). Available only while the folder is in trash; returns 404 if it is live or already hard-purged. Returns 409 `PATH_CONFLICT` when a live folder/artifact now occupies a path this restore would reinstate (`colliding_path` + `kind` identify it). Unlike artifact restore there are NO `rename`/`overwrite` escape hatches — the whole cascade aborts; free the colliding path (or cherry-pick artifacts) and retry. `If-Match` (the trashed folder's composite ETag) makes the restore conditional → 412 PRECONDITION_FAILED on a stale token; omitted, the restore is last-writer-wins. - - :param fld_id: (required) - :type fld_id: str - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._restore_folder_by_id_v0_folders_fld_id_restore_post_serialize( - fld_id=fld_id, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderRestoreOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def restore_folder_by_id_v0_folders_fld_id_restore_post_with_http_info( - self, - fld_id: StrictStr, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FolderRestoreOut]: - """Restore a soft-deleted folder (cascade) - - Mirrors `POST /v0/artifacts/{art_id}/restore` for folders: clear `deleted_at` + `purge_at` on a soft-deleted folder AND exactly the descendants soft-deleted in the same cascade (descendants trashed separately keep their trash state; restore those individually — the per-artifact restore remains for cherry-picking). Available only while the folder is in trash; returns 404 if it is live or already hard-purged. Returns 409 `PATH_CONFLICT` when a live folder/artifact now occupies a path this restore would reinstate (`colliding_path` + `kind` identify it). Unlike artifact restore there are NO `rename`/`overwrite` escape hatches — the whole cascade aborts; free the colliding path (or cherry-pick artifacts) and retry. `If-Match` (the trashed folder's composite ETag) makes the restore conditional → 412 PRECONDITION_FAILED on a stale token; omitted, the restore is last-writer-wins. - - :param fld_id: (required) - :type fld_id: str - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._restore_folder_by_id_v0_folders_fld_id_restore_post_serialize( - fld_id=fld_id, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderRestoreOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def restore_folder_by_id_v0_folders_fld_id_restore_post_without_preload_content( - self, - fld_id: StrictStr, - x_agentdrive_actor: Optional[StrictStr] = None, - if_match: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Restore a soft-deleted folder (cascade) - - Mirrors `POST /v0/artifacts/{art_id}/restore` for folders: clear `deleted_at` + `purge_at` on a soft-deleted folder AND exactly the descendants soft-deleted in the same cascade (descendants trashed separately keep their trash state; restore those individually — the per-artifact restore remains for cherry-picking). Available only while the folder is in trash; returns 404 if it is live or already hard-purged. Returns 409 `PATH_CONFLICT` when a live folder/artifact now occupies a path this restore would reinstate (`colliding_path` + `kind` identify it). Unlike artifact restore there are NO `rename`/`overwrite` escape hatches — the whole cascade aborts; free the colliding path (or cherry-pick artifacts) and retry. `If-Match` (the trashed folder's composite ETag) makes the restore conditional → 412 PRECONDITION_FAILED on a stale token; omitted, the restore is last-writer-wins. - - :param fld_id: (required) - :type fld_id: str - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param if_match: - :type if_match: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._restore_folder_by_id_v0_folders_fld_id_restore_post_serialize( - fld_id=fld_id, - x_agentdrive_actor=x_agentdrive_actor, - if_match=if_match, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FolderRestoreOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '412': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _restore_folder_by_id_v0_folders_fld_id_restore_post_serialize( - self, - fld_id, - x_agentdrive_actor, - if_match, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if fld_id is not None: - _path_params['fld_id'] = fld_id - # process the query parameters - # process the header parameters - if x_agentdrive_actor is not None: - _header_params['x-agentdrive-actor'] = x_agentdrive_actor - if if_match is not None: - _header_params['if-match'] = if_match - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v0/folders/{fld_id}/restore', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def rotate_share_route_v0_shares_shr_id_rotate_post( - self, - shr_id: StrictStr, - x_agentdrive_actor: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ShareMintOut: - """Revoke + reissue a share link's key (requires can_share) - - - :param shr_id: (required) - :type shr_id: str - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._rotate_share_route_v0_shares_shr_id_rotate_post_serialize( - shr_id=shr_id, - x_agentdrive_actor=x_agentdrive_actor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ShareMintOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def rotate_share_route_v0_shares_shr_id_rotate_post_with_http_info( - self, - shr_id: StrictStr, - x_agentdrive_actor: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ShareMintOut]: - """Revoke + reissue a share link's key (requires can_share) - - - :param shr_id: (required) - :type shr_id: str - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._rotate_share_route_v0_shares_shr_id_rotate_post_serialize( - shr_id=shr_id, - x_agentdrive_actor=x_agentdrive_actor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ShareMintOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def rotate_share_route_v0_shares_shr_id_rotate_post_without_preload_content( - self, - shr_id: StrictStr, - x_agentdrive_actor: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Revoke + reissue a share link's key (requires can_share) - - - :param shr_id: (required) - :type shr_id: str - :param x_agentdrive_actor: - :type x_agentdrive_actor: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._rotate_share_route_v0_shares_shr_id_rotate_post_serialize( - shr_id=shr_id, - x_agentdrive_actor=x_agentdrive_actor, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ShareMintOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _rotate_share_route_v0_shares_shr_id_rotate_post_serialize( - self, - shr_id, - x_agentdrive_actor, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if shr_id is not None: - _path_params['shr_id'] = shr_id - # process the query parameters - # process the header parameters - if x_agentdrive_actor is not None: - _header_params['x-agentdrive-actor'] = x_agentdrive_actor - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v0/shares/{shr_id}/rotate', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def search_v0_search_get( - self, - q: Annotated[str, Field(min_length=1, strict=True, max_length=200)], - label: Optional[List[StrictStr]] = None, - file_type: Optional[StrictStr] = None, - prefix: Optional[StrictStr] = None, - updated_after: Optional[datetime] = None, - updated_before: Optional[datetime] = None, - limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> SearchPage: - """Full-text search over artifacts in the drive - - Lexical (not semantic) full-text search powered by Postgres `websearch_to_tsquery`. Results are ranked by `ts_rank` over a weighted tsvector (path > content > metadata > labels). **Supported query syntax:** - Words: `kangaroo` (English stemming) - Phrases: `\"exact phrase\"` - Negation: `kangaroo -secret` - AND (implicit): `kangaroo secret` - OR: `kangaroo OR koala` - Paths & filenames: `reports/q3-summary.md` or `q3-summary.md` match by their path words (`/ . _ -` are word boundaries) **Not supported (v0):** - Semantic / embedding similarity - PDF and image content (only the path + metadata are searchable) - Non-English stemming - Fuzzy matching, regex - Boolean operator parentheses **Filters:** `label` (repeatable, AND), `file_type` (enum), `prefix` (path prefix), `updated_after` / `updated_before` (RFC 3339 timestamps, inclusive bounds on `updated_at`). - - :param q: (required) - :type q: str - :param label: - :type label: List[str] - :param file_type: - :type file_type: str - :param prefix: - :type prefix: str - :param updated_after: - :type updated_after: datetime - :param updated_before: - :type updated_before: datetime - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._search_v0_search_get_serialize( - q=q, - label=label, - file_type=file_type, - prefix=prefix, - updated_after=updated_after, - updated_before=updated_before, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SearchPage", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def search_v0_search_get_with_http_info( - self, - q: Annotated[str, Field(min_length=1, strict=True, max_length=200)], - label: Optional[List[StrictStr]] = None, - file_type: Optional[StrictStr] = None, - prefix: Optional[StrictStr] = None, - updated_after: Optional[datetime] = None, - updated_before: Optional[datetime] = None, - limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SearchPage]: - """Full-text search over artifacts in the drive - - Lexical (not semantic) full-text search powered by Postgres `websearch_to_tsquery`. Results are ranked by `ts_rank` over a weighted tsvector (path > content > metadata > labels). **Supported query syntax:** - Words: `kangaroo` (English stemming) - Phrases: `\"exact phrase\"` - Negation: `kangaroo -secret` - AND (implicit): `kangaroo secret` - OR: `kangaroo OR koala` - Paths & filenames: `reports/q3-summary.md` or `q3-summary.md` match by their path words (`/ . _ -` are word boundaries) **Not supported (v0):** - Semantic / embedding similarity - PDF and image content (only the path + metadata are searchable) - Non-English stemming - Fuzzy matching, regex - Boolean operator parentheses **Filters:** `label` (repeatable, AND), `file_type` (enum), `prefix` (path prefix), `updated_after` / `updated_before` (RFC 3339 timestamps, inclusive bounds on `updated_at`). - - :param q: (required) - :type q: str - :param label: - :type label: List[str] - :param file_type: - :type file_type: str - :param prefix: - :type prefix: str - :param updated_after: - :type updated_after: datetime - :param updated_before: - :type updated_before: datetime - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._search_v0_search_get_serialize( - q=q, - label=label, - file_type=file_type, - prefix=prefix, - updated_after=updated_after, - updated_before=updated_before, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SearchPage", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def search_v0_search_get_without_preload_content( - self, - q: Annotated[str, Field(min_length=1, strict=True, max_length=200)], - label: Optional[List[StrictStr]] = None, - file_type: Optional[StrictStr] = None, - prefix: Optional[StrictStr] = None, - updated_after: Optional[datetime] = None, - updated_before: Optional[datetime] = None, - limit: Optional[Annotated[int, Field(le=100, strict=True, ge=1)]] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Full-text search over artifacts in the drive - - Lexical (not semantic) full-text search powered by Postgres `websearch_to_tsquery`. Results are ranked by `ts_rank` over a weighted tsvector (path > content > metadata > labels). **Supported query syntax:** - Words: `kangaroo` (English stemming) - Phrases: `\"exact phrase\"` - Negation: `kangaroo -secret` - AND (implicit): `kangaroo secret` - OR: `kangaroo OR koala` - Paths & filenames: `reports/q3-summary.md` or `q3-summary.md` match by their path words (`/ . _ -` are word boundaries) **Not supported (v0):** - Semantic / embedding similarity - PDF and image content (only the path + metadata are searchable) - Non-English stemming - Fuzzy matching, regex - Boolean operator parentheses **Filters:** `label` (repeatable, AND), `file_type` (enum), `prefix` (path prefix), `updated_after` / `updated_before` (RFC 3339 timestamps, inclusive bounds on `updated_at`). - - :param q: (required) - :type q: str - :param label: - :type label: List[str] - :param file_type: - :type file_type: str - :param prefix: - :type prefix: str - :param updated_after: - :type updated_after: datetime - :param updated_before: - :type updated_before: datetime - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._search_v0_search_get_serialize( - q=q, - label=label, - file_type=file_type, - prefix=prefix, - updated_after=updated_after, - updated_before=updated_before, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SearchPage", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _search_v0_search_get_serialize( - self, - q, - label, - file_type, - prefix, - updated_after, - updated_before, - limit, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - 'label': 'multi', - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if q is not None: - - _query_params.append(('q', q)) - - if label is not None: - - _query_params.append(('label', label)) - - if file_type is not None: - - _query_params.append(('file_type', file_type)) - - if prefix is not None: - - _query_params.append(('prefix', prefix)) - - if updated_after is not None: - if isinstance(updated_after, datetime): - _query_params.append( - ( - 'updated_after', - updated_after.strftime( - self.api_client.configuration.datetime_format - ) - ) - ) - else: - _query_params.append(('updated_after', updated_after)) - - if updated_before is not None: - if isinstance(updated_before, datetime): - _query_params.append( - ( - 'updated_before', - updated_before.strftime( - self.api_client.configuration.datetime_format - ) - ) - ) - else: - _query_params.append(('updated_before', updated_before)) - - if limit is not None: - - _query_params.append(('limit', limit)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/search', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def view_artifact_head_a_art_id_head_get( - self, - art_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ArtifactHeadOut: - """View Artifact Head - - Return `{\"version\": }` for a readable artifact. Auth mirrors the permalink/viewer: the owner, or an `anyone:viewer` grant (a published artifact), reads. Two deliberate differences from the HTML viewer: * Never redirect to login. A poll is a background `fetch`, not a navigation — an HTML login page would be a useless body and a same-origin redirect the client can't act on. Anonymous callers on a private/absent artifact get a flat 404. * \"Doesn't exist\" and \"exists but not readable\" collapse to the same 404, so an anonymous poller can't use this as an existence oracle (matches the permalink/viewer leak guard). - - :param art_id: (required) - :type art_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._view_artifact_head_a_art_id_head_get_serialize( - art_id=art_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactHeadOut", - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def view_artifact_head_a_art_id_head_get_with_http_info( - self, - art_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ArtifactHeadOut]: - """View Artifact Head - - Return `{\"version\": }` for a readable artifact. Auth mirrors the permalink/viewer: the owner, or an `anyone:viewer` grant (a published artifact), reads. Two deliberate differences from the HTML viewer: * Never redirect to login. A poll is a background `fetch`, not a navigation — an HTML login page would be a useless body and a same-origin redirect the client can't act on. Anonymous callers on a private/absent artifact get a flat 404. * \"Doesn't exist\" and \"exists but not readable\" collapse to the same 404, so an anonymous poller can't use this as an existence oracle (matches the permalink/viewer leak guard). - - :param art_id: (required) - :type art_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._view_artifact_head_a_art_id_head_get_serialize( - art_id=art_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactHeadOut", - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def view_artifact_head_a_art_id_head_get_without_preload_content( - self, - art_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """View Artifact Head - - Return `{\"version\": }` for a readable artifact. Auth mirrors the permalink/viewer: the owner, or an `anyone:viewer` grant (a published artifact), reads. Two deliberate differences from the HTML viewer: * Never redirect to login. A poll is a background `fetch`, not a navigation — an HTML login page would be a useless body and a same-origin redirect the client can't act on. Anonymous callers on a private/absent artifact get a flat 404. * \"Doesn't exist\" and \"exists but not readable\" collapse to the same 404, so an anonymous poller can't use this as an existence oracle (matches the permalink/viewer leak guard). - - :param art_id: (required) - :type art_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._view_artifact_head_a_art_id_head_get_serialize( - art_id=art_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ArtifactHeadOut", - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _view_artifact_head_a_art_id_head_get_serialize( - self, - art_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if art_id is not None: - _path_params['art_id'] = art_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/a/{art_id}/head', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def view_artifact_version_v_art_id_version_get( - self, - art_id: StrictStr, - version: StrictInt, - raw: Optional[StrictInt] = None, - download: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> bytes: - """View Artifact Version - - Render version `version` of an artifact, read-only. Version history is owner-only. The drive-blind `can_read` gate still provides the same sign-in-or-404 masking as `/a/{art_id}`, but readable non-owners cannot browse snapshots. A pruned or never-existed version renders a friendly unavailable state, never a 500. `?raw=1` / `?download=1` stream the version's bytes (powering the bar's Raw / Download buttons) with the same sandbox+nosniff headers as the head raw path. - - :param art_id: (required) - :type art_id: str - :param version: (required) - :type version: int - :param raw: - :type raw: int - :param download: - :type download: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._view_artifact_version_v_art_id_version_get_serialize( - art_id=art_id, - version=version, - raw=raw, - download=download, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytes", - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def view_artifact_version_v_art_id_version_get_with_http_info( - self, - art_id: StrictStr, - version: StrictInt, - raw: Optional[StrictInt] = None, - download: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[bytes]: - """View Artifact Version - - Render version `version` of an artifact, read-only. Version history is owner-only. The drive-blind `can_read` gate still provides the same sign-in-or-404 masking as `/a/{art_id}`, but readable non-owners cannot browse snapshots. A pruned or never-existed version renders a friendly unavailable state, never a 500. `?raw=1` / `?download=1` stream the version's bytes (powering the bar's Raw / Download buttons) with the same sandbox+nosniff headers as the head raw path. - - :param art_id: (required) - :type art_id: str - :param version: (required) - :type version: int - :param raw: - :type raw: int - :param download: - :type download: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._view_artifact_version_v_art_id_version_get_serialize( - art_id=art_id, - version=version, - raw=raw, - download=download, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytes", - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def view_artifact_version_v_art_id_version_get_without_preload_content( - self, - art_id: StrictStr, - version: StrictInt, - raw: Optional[StrictInt] = None, - download: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """View Artifact Version - - Render version `version` of an artifact, read-only. Version history is owner-only. The drive-blind `can_read` gate still provides the same sign-in-or-404 masking as `/a/{art_id}`, but readable non-owners cannot browse snapshots. A pruned or never-existed version renders a friendly unavailable state, never a 500. `?raw=1` / `?download=1` stream the version's bytes (powering the bar's Raw / Download buttons) with the same sandbox+nosniff headers as the head raw path. - - :param art_id: (required) - :type art_id: str - :param version: (required) - :type version: int - :param raw: - :type raw: int - :param download: - :type download: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._view_artifact_version_v_art_id_version_get_serialize( - art_id=art_id, - version=version, - raw=raw, - download=download, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytes", - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _view_artifact_version_v_art_id_version_get_serialize( - self, - art_id, - version, - raw, - download, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if art_id is not None: - _path_params['art_id'] = art_id - if version is not None: - _path_params['version'] = version - # process the query parameters - if raw is not None: - - _query_params.append(('raw', raw)) - - if download is not None: - - _query_params.append(('download', download)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/octet-stream', - 'text/html', - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v/{art_id}/{version}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def view_file_drive_id_path_get( - self, - drive_id: StrictStr, - path: StrictStr, - raw: Optional[StrictInt] = None, - download: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> bytes: - """View File - - - :param drive_id: (required) - :type drive_id: str - :param path: (required) - :type path: str - :param raw: - :type raw: int - :param download: - :type download: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._view_file_drive_id_path_get_serialize( - drive_id=drive_id, - path=path, - raw=raw, - download=download, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytes", - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def view_file_drive_id_path_get_with_http_info( - self, - drive_id: StrictStr, - path: StrictStr, - raw: Optional[StrictInt] = None, - download: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[bytes]: - """View File - - - :param drive_id: (required) - :type drive_id: str - :param path: (required) - :type path: str - :param raw: - :type raw: int - :param download: - :type download: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._view_file_drive_id_path_get_serialize( - drive_id=drive_id, - path=path, - raw=raw, - download=download, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytes", - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def view_file_drive_id_path_get_without_preload_content( - self, - drive_id: StrictStr, - path: StrictStr, - raw: Optional[StrictInt] = None, - download: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """View File - - - :param drive_id: (required) - :type drive_id: str - :param path: (required) - :type path: str - :param raw: - :type raw: int - :param download: - :type download: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._view_file_drive_id_path_get_serialize( - drive_id=drive_id, - path=path, - raw=raw, - download=download, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "bytes", - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _view_file_drive_id_path_get_serialize( - self, - drive_id, - path, - raw, - download, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if drive_id is not None: - _path_params['drive_id'] = drive_id - if path is not None: - _path_params['path'] = path - # process the query parameters - if raw is not None: - - _query_params.append(('raw', raw)) - - if download is not None: - - _query_params.append(('download', download)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/octet-stream', - 'text/html', - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/{drive_id}/{path}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def view_permalink_artifact_a_art_id_get( - self, - art_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """View Permalink Artifact - - Resolve a stable artifact ID to its path-URL and 302 there. Auth model matches the path URL: public artifacts redirect for anyone; private artifacts redirect only for the owner. Non-owners on private artifacts get 404 — same response as \"doesn't exist\", so the ID's existence isn't leaked. The forwarded query-param allowlist is `raw`, `download` (see _PERMALINK_FORWARDED_PARAMS). - - :param art_id: (required) - :type art_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._view_permalink_artifact_a_art_id_get_serialize( - art_id=art_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '302': None, - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def view_permalink_artifact_a_art_id_get_with_http_info( - self, - art_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """View Permalink Artifact - - Resolve a stable artifact ID to its path-URL and 302 there. Auth model matches the path URL: public artifacts redirect for anyone; private artifacts redirect only for the owner. Non-owners on private artifacts get 404 — same response as \"doesn't exist\", so the ID's existence isn't leaked. The forwarded query-param allowlist is `raw`, `download` (see _PERMALINK_FORWARDED_PARAMS). - - :param art_id: (required) - :type art_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._view_permalink_artifact_a_art_id_get_serialize( - art_id=art_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '302': None, - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def view_permalink_artifact_a_art_id_get_without_preload_content( - self, - art_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """View Permalink Artifact - - Resolve a stable artifact ID to its path-URL and 302 there. Auth model matches the path URL: public artifacts redirect for anyone; private artifacts redirect only for the owner. Non-owners on private artifacts get 404 — same response as \"doesn't exist\", so the ID's existence isn't leaked. The forwarded query-param allowlist is `raw`, `download` (see _PERMALINK_FORWARDED_PARAMS). - - :param art_id: (required) - :type art_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._view_permalink_artifact_a_art_id_get_serialize( - art_id=art_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '302': None, - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _view_permalink_artifact_a_art_id_get_serialize( - self, - art_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if art_id is not None: - _path_params['art_id'] = art_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/a/{art_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def view_permalink_folder_f_fld_id_get( - self, - fld_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """View Permalink Folder - - Resolve a stable folder ID to its current path-URL and 302. Auth model mirrors the artifact permalink: public folder = anon OK; private folder = owner only, otherwise 404 (no existence leak). \"Public\" is an `anyone:viewer` grant on the `fld_*` id resolved through `can_read` (§4.4); folders carry no visibility flag of their own. - - :param fld_id: (required) - :type fld_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._view_permalink_folder_f_fld_id_get_serialize( - fld_id=fld_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '302': None, - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def view_permalink_folder_f_fld_id_get_with_http_info( - self, - fld_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """View Permalink Folder - - Resolve a stable folder ID to its current path-URL and 302. Auth model mirrors the artifact permalink: public folder = anon OK; private folder = owner only, otherwise 404 (no existence leak). \"Public\" is an `anyone:viewer` grant on the `fld_*` id resolved through `can_read` (§4.4); folders carry no visibility flag of their own. - - :param fld_id: (required) - :type fld_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._view_permalink_folder_f_fld_id_get_serialize( - fld_id=fld_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '302': None, - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def view_permalink_folder_f_fld_id_get_without_preload_content( - self, - fld_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """View Permalink Folder - - Resolve a stable folder ID to its current path-URL and 302. Auth model mirrors the artifact permalink: public folder = anon OK; private folder = owner only, otherwise 404 (no existence leak). \"Public\" is an `anyone:viewer` grant on the `fld_*` id resolved through `can_read` (§4.4); folders carry no visibility flag of their own. - - :param fld_id: (required) - :type fld_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._view_permalink_folder_f_fld_id_get_serialize( - fld_id=fld_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '302': None, - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _view_permalink_folder_f_fld_id_get_serialize( - self, - fld_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if fld_id is not None: - _path_params['fld_id'] = fld_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/f/{fld_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) diff --git a/sdk/python/agentdrive_sdk/api/drives_api.py b/sdk/python/agentdrive_sdk/api/drives_api.py deleted file mode 100644 index 849ea5f..0000000 --- a/sdk/python/agentdrive_sdk/api/drives_api.py +++ /dev/null @@ -1,2129 +0,0 @@ -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import StrictInt, StrictStr -from typing import Optional -from agentdrive_sdk.models.drive_api_key_create_in import DriveApiKeyCreateIn -from agentdrive_sdk.models.drive_api_key_create_out import DriveApiKeyCreateOut -from agentdrive_sdk.models.drive_api_key_list_out import DriveApiKeyListOut -from agentdrive_sdk.models.drive_create_in import DriveCreateIn -from agentdrive_sdk.models.drive_create_out import DriveCreateOut -from agentdrive_sdk.models.drive_list import DriveList -from agentdrive_sdk.models.drive_out import DriveOut -from agentdrive_sdk.models.drive_rename_in import DriveRenameIn - -from agentdrive_sdk.api_client import ApiClient, RequestSerialized -from agentdrive_sdk.api_response import ApiResponse -from agentdrive_sdk.rest import RESTResponseType - - -class DrivesApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def create_drive_key_route_v0_drives_drive_id_keys_post( - self, - drive_id: StrictStr, - drive_api_key_create_in: DriveApiKeyCreateIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DriveApiKeyCreateOut: - """Create a drive API key - - Mint a new `ad_live_` key for a drive you manage — a drive may hold several (one per agent/integration). A `label` (a name for the key) is **required**. **Manager only** (404 no-leak otherwise), `full`-scope user token. The raw key is returned **once** — store it now. - - :param drive_id: (required) - :type drive_id: str - :param drive_api_key_create_in: (required) - :type drive_api_key_create_in: DriveApiKeyCreateIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_drive_key_route_v0_drives_drive_id_keys_post_serialize( - drive_id=drive_id, - drive_api_key_create_in=drive_api_key_create_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DriveApiKeyCreateOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def create_drive_key_route_v0_drives_drive_id_keys_post_with_http_info( - self, - drive_id: StrictStr, - drive_api_key_create_in: DriveApiKeyCreateIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DriveApiKeyCreateOut]: - """Create a drive API key - - Mint a new `ad_live_` key for a drive you manage — a drive may hold several (one per agent/integration). A `label` (a name for the key) is **required**. **Manager only** (404 no-leak otherwise), `full`-scope user token. The raw key is returned **once** — store it now. - - :param drive_id: (required) - :type drive_id: str - :param drive_api_key_create_in: (required) - :type drive_api_key_create_in: DriveApiKeyCreateIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_drive_key_route_v0_drives_drive_id_keys_post_serialize( - drive_id=drive_id, - drive_api_key_create_in=drive_api_key_create_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DriveApiKeyCreateOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def create_drive_key_route_v0_drives_drive_id_keys_post_without_preload_content( - self, - drive_id: StrictStr, - drive_api_key_create_in: DriveApiKeyCreateIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Create a drive API key - - Mint a new `ad_live_` key for a drive you manage — a drive may hold several (one per agent/integration). A `label` (a name for the key) is **required**. **Manager only** (404 no-leak otherwise), `full`-scope user token. The raw key is returned **once** — store it now. - - :param drive_id: (required) - :type drive_id: str - :param drive_api_key_create_in: (required) - :type drive_api_key_create_in: DriveApiKeyCreateIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_drive_key_route_v0_drives_drive_id_keys_post_serialize( - drive_id=drive_id, - drive_api_key_create_in=drive_api_key_create_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DriveApiKeyCreateOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_drive_key_route_v0_drives_drive_id_keys_post_serialize( - self, - drive_id, - drive_api_key_create_in, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if drive_id is not None: - _path_params['drive_id'] = drive_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if drive_api_key_create_in is not None: - _body_params = drive_api_key_create_in - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v0/drives/{drive_id}/keys', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def create_drive_route_v0_drives_post( - self, - drive_create_in: DriveCreateIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DriveCreateOut: - """Create a drive in your active space - - Create a named drive. Any **member** of the space may create one; the creator becomes its **owner**. Requires a `full`-scope user token. The response carries the drive's `ad_live_` API key **once** (`api_key`) — store it now, it is never returned again (mint more keys via `POST /v0/drives/{id}/keys`). The target workspace is the user's active organization (`users.default_org`); cross-workspace creation names no other workspace in v0. A space may hold up to its plan's drive limit (workspaces-v2 §4.6; seat-aware for shared drives). A caller at the limit is blocked with `403 DRIVE_LIMIT_REACHED`; the limit is tier-governed, not a hard cap. - - :param drive_create_in: (required) - :type drive_create_in: DriveCreateIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_drive_route_v0_drives_post_serialize( - drive_create_in=drive_create_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "DriveCreateOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def create_drive_route_v0_drives_post_with_http_info( - self, - drive_create_in: DriveCreateIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DriveCreateOut]: - """Create a drive in your active space - - Create a named drive. Any **member** of the space may create one; the creator becomes its **owner**. Requires a `full`-scope user token. The response carries the drive's `ad_live_` API key **once** (`api_key`) — store it now, it is never returned again (mint more keys via `POST /v0/drives/{id}/keys`). The target workspace is the user's active organization (`users.default_org`); cross-workspace creation names no other workspace in v0. A space may hold up to its plan's drive limit (workspaces-v2 §4.6; seat-aware for shared drives). A caller at the limit is blocked with `403 DRIVE_LIMIT_REACHED`; the limit is tier-governed, not a hard cap. - - :param drive_create_in: (required) - :type drive_create_in: DriveCreateIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_drive_route_v0_drives_post_serialize( - drive_create_in=drive_create_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "DriveCreateOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def create_drive_route_v0_drives_post_without_preload_content( - self, - drive_create_in: DriveCreateIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Create a drive in your active space - - Create a named drive. Any **member** of the space may create one; the creator becomes its **owner**. Requires a `full`-scope user token. The response carries the drive's `ad_live_` API key **once** (`api_key`) — store it now, it is never returned again (mint more keys via `POST /v0/drives/{id}/keys`). The target workspace is the user's active organization (`users.default_org`); cross-workspace creation names no other workspace in v0. A space may hold up to its plan's drive limit (workspaces-v2 §4.6; seat-aware for shared drives). A caller at the limit is blocked with `403 DRIVE_LIMIT_REACHED`; the limit is tier-governed, not a hard cap. - - :param drive_create_in: (required) - :type drive_create_in: DriveCreateIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_drive_route_v0_drives_post_serialize( - drive_create_in=drive_create_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "DriveCreateOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_drive_route_v0_drives_post_serialize( - self, - drive_create_in, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if drive_create_in is not None: - _body_params = drive_create_in - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v0/drives', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def list_drive_keys_route_v0_drives_drive_id_keys_get( - self, - drive_id: StrictStr, - cursor: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DriveApiKeyListOut: - """List a drive's API keys - - List the `ad_live_` keys for a drive you manage (oldest first, including recently-revoked rows — filter on `revoked_at` for live only). **Manager only** (404 no-leak otherwise). A `read`-scope user token may list (metadata reveals no secret), mirroring `GET /v0/drives`. Metadata only — the raw key is never returned after mint. **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - - :param drive_id: (required) - :type drive_id: str - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_drive_keys_route_v0_drives_drive_id_keys_get_serialize( - drive_id=drive_id, - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DriveApiKeyListOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def list_drive_keys_route_v0_drives_drive_id_keys_get_with_http_info( - self, - drive_id: StrictStr, - cursor: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DriveApiKeyListOut]: - """List a drive's API keys - - List the `ad_live_` keys for a drive you manage (oldest first, including recently-revoked rows — filter on `revoked_at` for live only). **Manager only** (404 no-leak otherwise). A `read`-scope user token may list (metadata reveals no secret), mirroring `GET /v0/drives`. Metadata only — the raw key is never returned after mint. **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - - :param drive_id: (required) - :type drive_id: str - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_drive_keys_route_v0_drives_drive_id_keys_get_serialize( - drive_id=drive_id, - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DriveApiKeyListOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def list_drive_keys_route_v0_drives_drive_id_keys_get_without_preload_content( - self, - drive_id: StrictStr, - cursor: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List a drive's API keys - - List the `ad_live_` keys for a drive you manage (oldest first, including recently-revoked rows — filter on `revoked_at` for live only). **Manager only** (404 no-leak otherwise). A `read`-scope user token may list (metadata reveals no secret), mirroring `GET /v0/drives`. Metadata only — the raw key is never returned after mint. **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - - :param drive_id: (required) - :type drive_id: str - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_drive_keys_route_v0_drives_drive_id_keys_get_serialize( - drive_id=drive_id, - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DriveApiKeyListOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_drive_keys_route_v0_drives_drive_id_keys_get_serialize( - self, - drive_id, - cursor, - limit, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if drive_id is not None: - _path_params['drive_id'] = drive_id - # process the query parameters - if cursor is not None: - - _query_params.append(('cursor', cursor)) - - if limit is not None: - - _query_params.append(('limit', limit)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/drives/{drive_id}/keys', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def list_drives_route_v0_drives_get( - self, - cursor: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DriveList: - """List the drives you can see - - Returns drive **metadata** (workspaces-design §4.2): an **admin** sees the whole active workspace's drive inventory (every owner); a **member** sees only the drives they own. Metadata only — owner, size, timestamps — never a raw API key, and never an authorization to read a drive's contents. A `read`-scope token may call this; mutations require `full`. **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_drives_route_v0_drives_get_serialize( - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DriveList", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def list_drives_route_v0_drives_get_with_http_info( - self, - cursor: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DriveList]: - """List the drives you can see - - Returns drive **metadata** (workspaces-design §4.2): an **admin** sees the whole active workspace's drive inventory (every owner); a **member** sees only the drives they own. Metadata only — owner, size, timestamps — never a raw API key, and never an authorization to read a drive's contents. A `read`-scope token may call this; mutations require `full`. **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_drives_route_v0_drives_get_serialize( - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DriveList", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def list_drives_route_v0_drives_get_without_preload_content( - self, - cursor: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List the drives you can see - - Returns drive **metadata** (workspaces-design §4.2): an **admin** sees the whole active workspace's drive inventory (every owner); a **member** sees only the drives they own. Metadata only — owner, size, timestamps — never a raw API key, and never an authorization to read a drive's contents. A `read`-scope token may call this; mutations require `full`. **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_drives_route_v0_drives_get_serialize( - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DriveList", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_drives_route_v0_drives_get_serialize( - self, - cursor, - limit, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if cursor is not None: - - _query_params.append(('cursor', cursor)) - - if limit is not None: - - _query_params.append(('limit', limit)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/drives', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def rename_drive_route_v0_drives_drive_id_patch( - self, - drive_id: StrictStr, - drive_rename_in: DriveRenameIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DriveOut: - """Rename a drive you own - - Rename a drive. **Owner only** — a drive id that isn't yours returns 404 (no-leak). Requires a `full`-scope user token. - - :param drive_id: (required) - :type drive_id: str - :param drive_rename_in: (required) - :type drive_rename_in: DriveRenameIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._rename_drive_route_v0_drives_drive_id_patch_serialize( - drive_id=drive_id, - drive_rename_in=drive_rename_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DriveOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def rename_drive_route_v0_drives_drive_id_patch_with_http_info( - self, - drive_id: StrictStr, - drive_rename_in: DriveRenameIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DriveOut]: - """Rename a drive you own - - Rename a drive. **Owner only** — a drive id that isn't yours returns 404 (no-leak). Requires a `full`-scope user token. - - :param drive_id: (required) - :type drive_id: str - :param drive_rename_in: (required) - :type drive_rename_in: DriveRenameIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._rename_drive_route_v0_drives_drive_id_patch_serialize( - drive_id=drive_id, - drive_rename_in=drive_rename_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DriveOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def rename_drive_route_v0_drives_drive_id_patch_without_preload_content( - self, - drive_id: StrictStr, - drive_rename_in: DriveRenameIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Rename a drive you own - - Rename a drive. **Owner only** — a drive id that isn't yours returns 404 (no-leak). Requires a `full`-scope user token. - - :param drive_id: (required) - :type drive_id: str - :param drive_rename_in: (required) - :type drive_rename_in: DriveRenameIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._rename_drive_route_v0_drives_drive_id_patch_serialize( - drive_id=drive_id, - drive_rename_in=drive_rename_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DriveOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _rename_drive_route_v0_drives_drive_id_patch_serialize( - self, - drive_id, - drive_rename_in, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if drive_id is not None: - _path_params['drive_id'] = drive_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if drive_rename_in is not None: - _body_params = drive_rename_in - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='PATCH', - resource_path='/v0/drives/{drive_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def revoke_drive_key_route_v0_drives_drive_id_keys_key_id_revoke_post( - self, - drive_id: StrictStr, - key_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Revoke a drive API key - - Revoke one `ad_live_` key of a drive you manage — anything using it loses access immediately. **Manager only** (404 no-leak otherwise), `full`-scope user token. Idempotent: revoking an unknown/already-revoked key returns 204 too (no existence oracle). - - :param drive_id: (required) - :type drive_id: str - :param key_id: (required) - :type key_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._revoke_drive_key_route_v0_drives_drive_id_keys_key_id_revoke_post_serialize( - drive_id=drive_id, - key_id=key_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def revoke_drive_key_route_v0_drives_drive_id_keys_key_id_revoke_post_with_http_info( - self, - drive_id: StrictStr, - key_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Revoke a drive API key - - Revoke one `ad_live_` key of a drive you manage — anything using it loses access immediately. **Manager only** (404 no-leak otherwise), `full`-scope user token. Idempotent: revoking an unknown/already-revoked key returns 204 too (no existence oracle). - - :param drive_id: (required) - :type drive_id: str - :param key_id: (required) - :type key_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._revoke_drive_key_route_v0_drives_drive_id_keys_key_id_revoke_post_serialize( - drive_id=drive_id, - key_id=key_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def revoke_drive_key_route_v0_drives_drive_id_keys_key_id_revoke_post_without_preload_content( - self, - drive_id: StrictStr, - key_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Revoke a drive API key - - Revoke one `ad_live_` key of a drive you manage — anything using it loses access immediately. **Manager only** (404 no-leak otherwise), `full`-scope user token. Idempotent: revoking an unknown/already-revoked key returns 204 too (no existence oracle). - - :param drive_id: (required) - :type drive_id: str - :param key_id: (required) - :type key_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._revoke_drive_key_route_v0_drives_drive_id_keys_key_id_revoke_post_serialize( - drive_id=drive_id, - key_id=key_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _revoke_drive_key_route_v0_drives_drive_id_keys_key_id_revoke_post_serialize( - self, - drive_id, - key_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if drive_id is not None: - _path_params['drive_id'] = drive_id - if key_id is not None: - _path_params['key_id'] = key_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v0/drives/{drive_id}/keys/{key_id}/revoke', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def rotate_one_key_route_v0_drives_drive_id_keys_key_id_rotate_post( - self, - drive_id: StrictStr, - key_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> DriveApiKeyCreateOut: - """Rotate one API key - - Rotate a single `ad_live_` key: revoke `key_id` and mint a replacement that inherits its label. **Only that key** is affected — the drive's other keys keep working. **Manager only** (404 no-leak otherwise), `full`-scope user token. The new key is returned **once** — store it now. A `key_id` that isn't a live key of this drive is a 404. - - :param drive_id: (required) - :type drive_id: str - :param key_id: (required) - :type key_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._rotate_one_key_route_v0_drives_drive_id_keys_key_id_rotate_post_serialize( - drive_id=drive_id, - key_id=key_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DriveApiKeyCreateOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def rotate_one_key_route_v0_drives_drive_id_keys_key_id_rotate_post_with_http_info( - self, - drive_id: StrictStr, - key_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[DriveApiKeyCreateOut]: - """Rotate one API key - - Rotate a single `ad_live_` key: revoke `key_id` and mint a replacement that inherits its label. **Only that key** is affected — the drive's other keys keep working. **Manager only** (404 no-leak otherwise), `full`-scope user token. The new key is returned **once** — store it now. A `key_id` that isn't a live key of this drive is a 404. - - :param drive_id: (required) - :type drive_id: str - :param key_id: (required) - :type key_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._rotate_one_key_route_v0_drives_drive_id_keys_key_id_rotate_post_serialize( - drive_id=drive_id, - key_id=key_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DriveApiKeyCreateOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def rotate_one_key_route_v0_drives_drive_id_keys_key_id_rotate_post_without_preload_content( - self, - drive_id: StrictStr, - key_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Rotate one API key - - Rotate a single `ad_live_` key: revoke `key_id` and mint a replacement that inherits its label. **Only that key** is affected — the drive's other keys keep working. **Manager only** (404 no-leak otherwise), `full`-scope user token. The new key is returned **once** — store it now. A `key_id` that isn't a live key of this drive is a 404. - - :param drive_id: (required) - :type drive_id: str - :param key_id: (required) - :type key_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._rotate_one_key_route_v0_drives_drive_id_keys_key_id_rotate_post_serialize( - drive_id=drive_id, - key_id=key_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "DriveApiKeyCreateOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _rotate_one_key_route_v0_drives_drive_id_keys_key_id_rotate_post_serialize( - self, - drive_id, - key_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if drive_id is not None: - _path_params['drive_id'] = drive_id - if key_id is not None: - _path_params['key_id'] = key_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v0/drives/{drive_id}/keys/{key_id}/rotate', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) diff --git a/sdk/python/agentdrive_sdk/api/mcp_oauth_api.py b/sdk/python/agentdrive_sdk/api/mcp_oauth_api.py deleted file mode 100644 index a999f3e..0000000 --- a/sdk/python/agentdrive_sdk/api/mcp_oauth_api.py +++ /dev/null @@ -1,542 +0,0 @@ -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from typing import Any, Dict -from agentdrive_sdk.models.client_registration_out import ClientRegistrationOut - -from agentdrive_sdk.api_client import ApiClient, RequestSerialized -from agentdrive_sdk.api_response import ApiResponse -from agentdrive_sdk.rest import RESTResponseType - - -class McpOauthApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def oauth2_register_oauth2_register_post( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ClientRegistrationOut: - """Dynamic Client Registration (RFC 7591) - - Anonymous registration endpoint for MCP clients. Public clients only (PKCE, no client_secret). Returns the registered metadata plus the assigned `client_id`. Registration grants nothing by itself — every token still requires a user consent ceremony at /oauth2/authorize. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._oauth2_register_oauth2_register_post_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "ClientRegistrationOut", - '400': "OAuthProtocolErrorOut", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def oauth2_register_oauth2_register_post_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ClientRegistrationOut]: - """Dynamic Client Registration (RFC 7591) - - Anonymous registration endpoint for MCP clients. Public clients only (PKCE, no client_secret). Returns the registered metadata plus the assigned `client_id`. Registration grants nothing by itself — every token still requires a user consent ceremony at /oauth2/authorize. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._oauth2_register_oauth2_register_post_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "ClientRegistrationOut", - '400': "OAuthProtocolErrorOut", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def oauth2_register_oauth2_register_post_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Dynamic Client Registration (RFC 7591) - - Anonymous registration endpoint for MCP clients. Public clients only (PKCE, no client_secret). Returns the registered metadata plus the assigned `client_id`. Registration grants nothing by itself — every token still requires a user consent ceremony at /oauth2/authorize. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._oauth2_register_oauth2_register_post_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "ClientRegistrationOut", - '400': "OAuthProtocolErrorOut", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _oauth2_register_oauth2_register_post_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/oauth2/register', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def oauth2_revoke_oauth2_revoke_post( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> object: - """Token revocation (RFC 7009) - - Revokes an `adat_` access token (that token only) or an `adrt_` refresh token (the whole rotation chain). Unknown tokens return 200 per RFC 7009 §2.2 — existence is not revealed. Public-client endpoint auth (`client_id` form param, no secret). - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._oauth2_revoke_oauth2_revoke_post_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '400': "OAuthProtocolErrorOut", - '401': "OAuthProtocolErrorOut", - '403': "OAuthProtocolErrorOut", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def oauth2_revoke_oauth2_revoke_post_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """Token revocation (RFC 7009) - - Revokes an `adat_` access token (that token only) or an `adrt_` refresh token (the whole rotation chain). Unknown tokens return 200 per RFC 7009 §2.2 — existence is not revealed. Public-client endpoint auth (`client_id` form param, no secret). - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._oauth2_revoke_oauth2_revoke_post_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '400': "OAuthProtocolErrorOut", - '401': "OAuthProtocolErrorOut", - '403': "OAuthProtocolErrorOut", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def oauth2_revoke_oauth2_revoke_post_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Token revocation (RFC 7009) - - Revokes an `adat_` access token (that token only) or an `adrt_` refresh token (the whole rotation chain). Unknown tokens return 200 per RFC 7009 §2.2 — existence is not revealed. Public-client endpoint auth (`client_id` form param, no secret). - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._oauth2_revoke_oauth2_revoke_post_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '400': "OAuthProtocolErrorOut", - '401': "OAuthProtocolErrorOut", - '403': "OAuthProtocolErrorOut", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _oauth2_revoke_oauth2_revoke_post_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/oauth2/revoke', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) diff --git a/sdk/python/agentdrive_sdk/api/mcp_oauth_ui_api.py b/sdk/python/agentdrive_sdk/api/mcp_oauth_ui_api.py deleted file mode 100644 index e7c3199..0000000 --- a/sdk/python/agentdrive_sdk/api/mcp_oauth_ui_api.py +++ /dev/null @@ -1,570 +0,0 @@ -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import StrictStr - -from agentdrive_sdk.api_client import ApiClient, RequestSerialized -from agentdrive_sdk.api_response import ApiResponse -from agentdrive_sdk.rest import RESTResponseType - - -class McpOauthUiApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def authorize_decision_oauth2_authorize_post( - self, - csrf: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Authorize Decision - - - :param csrf: (required) - :type csrf: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._authorize_decision_oauth2_authorize_post_serialize( - csrf=csrf, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '302': None, - '303': None, - '400': "OAuthProtocolErrorOut", - '403': "AuthorizeDecisionOauth2AuthorizePost403Response", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def authorize_decision_oauth2_authorize_post_with_http_info( - self, - csrf: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Authorize Decision - - - :param csrf: (required) - :type csrf: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._authorize_decision_oauth2_authorize_post_serialize( - csrf=csrf, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '302': None, - '303': None, - '400': "OAuthProtocolErrorOut", - '403': "AuthorizeDecisionOauth2AuthorizePost403Response", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def authorize_decision_oauth2_authorize_post_without_preload_content( - self, - csrf: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Authorize Decision - - - :param csrf: (required) - :type csrf: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._authorize_decision_oauth2_authorize_post_serialize( - csrf=csrf, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '302': None, - '303': None, - '400': "OAuthProtocolErrorOut", - '403': "AuthorizeDecisionOauth2AuthorizePost403Response", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _authorize_decision_oauth2_authorize_post_serialize( - self, - csrf, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - if csrf is not None: - _form_params.append(('csrf', csrf)) - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/x-www-form-urlencoded' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/oauth2/authorize', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def authorize_page_oauth2_authorize_get( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> str: - """Authorize Page - - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._authorize_page_oauth2_authorize_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - '302': None, - '400': "OAuthProtocolErrorOut", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def authorize_page_oauth2_authorize_get_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[str]: - """Authorize Page - - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._authorize_page_oauth2_authorize_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - '302': None, - '400': "OAuthProtocolErrorOut", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def authorize_page_oauth2_authorize_get_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Authorize Page - - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._authorize_page_oauth2_authorize_get_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "str", - '302': None, - '400': "OAuthProtocolErrorOut", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _authorize_page_oauth2_authorize_get_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'text/html', - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/oauth2/authorize', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) diff --git a/sdk/python/agentdrive_sdk/api/members_api.py b/sdk/python/agentdrive_sdk/api/members_api.py deleted file mode 100644 index a258859..0000000 --- a/sdk/python/agentdrive_sdk/api/members_api.py +++ /dev/null @@ -1,1800 +0,0 @@ -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import StrictInt, StrictStr -from typing import Optional -from agentdrive_sdk.models.invitation_list import InvitationList -from agentdrive_sdk.models.invite_create_out import InviteCreateOut -from agentdrive_sdk.models.member_invite_in import MemberInviteIn -from agentdrive_sdk.models.member_list import MemberList -from agentdrive_sdk.models.member_out import MemberOut -from agentdrive_sdk.models.member_remove_out import MemberRemoveOut -from agentdrive_sdk.models.member_role_in import MemberRoleIn -from agentdrive_sdk.models.revoke_out import RevokeOut - -from agentdrive_sdk.api_client import ApiClient, RequestSerialized -from agentdrive_sdk.api_response import ApiResponse -from agentdrive_sdk.rest import RESTResponseType - - -class MembersApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def invite_member_v0_members_invite_post( - self, - member_invite_in: MemberInviteIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> InviteCreateOut: - """Invite a person to your workspace by email - - Create a pending invitation in the caller's active workspace and enqueue the invite email. **Admin only**, `full` scope. Inviting an existing member is a no-op success (`already_member: true`). A duplicate pending invite for the same email returns 409 `INVITE_PENDING` (resend it from the members page). The raw invite token is delivered only by email — never in this response. - - :param member_invite_in: (required) - :type member_invite_in: MemberInviteIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._invite_member_v0_members_invite_post_serialize( - member_invite_in=member_invite_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "InviteCreateOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '409': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def invite_member_v0_members_invite_post_with_http_info( - self, - member_invite_in: MemberInviteIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[InviteCreateOut]: - """Invite a person to your workspace by email - - Create a pending invitation in the caller's active workspace and enqueue the invite email. **Admin only**, `full` scope. Inviting an existing member is a no-op success (`already_member: true`). A duplicate pending invite for the same email returns 409 `INVITE_PENDING` (resend it from the members page). The raw invite token is delivered only by email — never in this response. - - :param member_invite_in: (required) - :type member_invite_in: MemberInviteIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._invite_member_v0_members_invite_post_serialize( - member_invite_in=member_invite_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "InviteCreateOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '409': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def invite_member_v0_members_invite_post_without_preload_content( - self, - member_invite_in: MemberInviteIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Invite a person to your workspace by email - - Create a pending invitation in the caller's active workspace and enqueue the invite email. **Admin only**, `full` scope. Inviting an existing member is a no-op success (`already_member: true`). A duplicate pending invite for the same email returns 409 `INVITE_PENDING` (resend it from the members page). The raw invite token is delivered only by email — never in this response. - - :param member_invite_in: (required) - :type member_invite_in: MemberInviteIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._invite_member_v0_members_invite_post_serialize( - member_invite_in=member_invite_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "InviteCreateOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '409': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _invite_member_v0_members_invite_post_serialize( - self, - member_invite_in, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if member_invite_in is not None: - _body_params = member_invite_in - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v0/members/invite', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def list_invitations_v0_invitations_get( - self, - cursor: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> InvitationList: - """List pending invitations - - List the pending invitations for the caller's active workspace. **Admin only.** Metadata only — the raw invite token is never surfaced. Newest first (`created_at` descending, tie-broken by `id`). Paginated: `limit` is clamped to [1, 100] (default 50, never a 422); pass the response's `next_cursor` back as `cursor` for the next page (`null` when the listing is complete). - - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_invitations_v0_invitations_get_serialize( - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "InvitationList", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def list_invitations_v0_invitations_get_with_http_info( - self, - cursor: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[InvitationList]: - """List pending invitations - - List the pending invitations for the caller's active workspace. **Admin only.** Metadata only — the raw invite token is never surfaced. Newest first (`created_at` descending, tie-broken by `id`). Paginated: `limit` is clamped to [1, 100] (default 50, never a 422); pass the response's `next_cursor` back as `cursor` for the next page (`null` when the listing is complete). - - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_invitations_v0_invitations_get_serialize( - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "InvitationList", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def list_invitations_v0_invitations_get_without_preload_content( - self, - cursor: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List pending invitations - - List the pending invitations for the caller's active workspace. **Admin only.** Metadata only — the raw invite token is never surfaced. Newest first (`created_at` descending, tie-broken by `id`). Paginated: `limit` is clamped to [1, 100] (default 50, never a 422); pass the response's `next_cursor` back as `cursor` for the next page (`null` when the listing is complete). - - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_invitations_v0_invitations_get_serialize( - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "InvitationList", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_invitations_v0_invitations_get_serialize( - self, - cursor, - limit, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if cursor is not None: - - _query_params.append(('cursor', cursor)) - - if limit is not None: - - _query_params.append(('limit', limit)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/invitations', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def list_members_v0_members_get( - self, - cursor: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> MemberList: - """List the members of your active workspace - - List live members (email, role, joined-at) of the caller's active workspace. Any **member** may list; a `read`-scope token is sufficient. Ordered by join time (`created_at`, tie-broken by `user_id`) — **no role grouping is promised**; a dashboard that wants admins-first sorts client-side. Paginated: `limit` is clamped to [1, 100] (default 50, never a 422); pass the response's `next_cursor` back as `cursor` for the next page (`null` when the listing is complete). - - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_members_v0_members_get_serialize( - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "MemberList", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def list_members_v0_members_get_with_http_info( - self, - cursor: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[MemberList]: - """List the members of your active workspace - - List live members (email, role, joined-at) of the caller's active workspace. Any **member** may list; a `read`-scope token is sufficient. Ordered by join time (`created_at`, tie-broken by `user_id`) — **no role grouping is promised**; a dashboard that wants admins-first sorts client-side. Paginated: `limit` is clamped to [1, 100] (default 50, never a 422); pass the response's `next_cursor` back as `cursor` for the next page (`null` when the listing is complete). - - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_members_v0_members_get_serialize( - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "MemberList", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def list_members_v0_members_get_without_preload_content( - self, - cursor: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List the members of your active workspace - - List live members (email, role, joined-at) of the caller's active workspace. Any **member** may list; a `read`-scope token is sufficient. Ordered by join time (`created_at`, tie-broken by `user_id`) — **no role grouping is promised**; a dashboard that wants admins-first sorts client-side. Paginated: `limit` is clamped to [1, 100] (default 50, never a 422); pass the response's `next_cursor` back as `cursor` for the next page (`null` when the listing is complete). - - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_members_v0_members_get_serialize( - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "MemberList", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_members_v0_members_get_serialize( - self, - cursor, - limit, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if cursor is not None: - - _query_params.append(('cursor', cursor)) - - if limit is not None: - - _query_params.append(('limit', limit)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/members', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def remove_member_v0_members_target_user_id_delete( - self, - target_user_id: StrictStr, - confirm: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> MemberRemoveOut: - """Remove a member (or leave) - - Remove a member from the caller's active workspace, soft-deleting every drive that member owns there (workspaces-design §4.4 — no ownership transfer in v0; their `ad_live_` keys then stop working). **Admin** may remove anyone; **any member** may remove themselves (self-leave). `full` scope. Removing the **last/sole admin** is rejected with 409 `LAST_ADMIN` (promote someone first, or delete the workspace). **Explicit confirmation required:** pass `?confirm=DELETE` or the request is rejected with 400 `CONFIRM_REQUIRED` — removal cascades a soft-delete of every drive the member owns, so it carries tenant-level blast radius (uniform with `DELETE /v0/drives/{id}`). Deliberately takes NO `If-Match`: membership rows carry no generation/metageneration axis to pin (there is no ETag to echo), so `?confirm=DELETE` is the sole mutation guard here. - - :param target_user_id: (required) - :type target_user_id: str - :param confirm: - :type confirm: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._remove_member_v0_members_target_user_id_delete_serialize( - target_user_id=target_user_id, - confirm=confirm, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "MemberRemoveOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def remove_member_v0_members_target_user_id_delete_with_http_info( - self, - target_user_id: StrictStr, - confirm: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[MemberRemoveOut]: - """Remove a member (or leave) - - Remove a member from the caller's active workspace, soft-deleting every drive that member owns there (workspaces-design §4.4 — no ownership transfer in v0; their `ad_live_` keys then stop working). **Admin** may remove anyone; **any member** may remove themselves (self-leave). `full` scope. Removing the **last/sole admin** is rejected with 409 `LAST_ADMIN` (promote someone first, or delete the workspace). **Explicit confirmation required:** pass `?confirm=DELETE` or the request is rejected with 400 `CONFIRM_REQUIRED` — removal cascades a soft-delete of every drive the member owns, so it carries tenant-level blast radius (uniform with `DELETE /v0/drives/{id}`). Deliberately takes NO `If-Match`: membership rows carry no generation/metageneration axis to pin (there is no ETag to echo), so `?confirm=DELETE` is the sole mutation guard here. - - :param target_user_id: (required) - :type target_user_id: str - :param confirm: - :type confirm: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._remove_member_v0_members_target_user_id_delete_serialize( - target_user_id=target_user_id, - confirm=confirm, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "MemberRemoveOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def remove_member_v0_members_target_user_id_delete_without_preload_content( - self, - target_user_id: StrictStr, - confirm: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Remove a member (or leave) - - Remove a member from the caller's active workspace, soft-deleting every drive that member owns there (workspaces-design §4.4 — no ownership transfer in v0; their `ad_live_` keys then stop working). **Admin** may remove anyone; **any member** may remove themselves (self-leave). `full` scope. Removing the **last/sole admin** is rejected with 409 `LAST_ADMIN` (promote someone first, or delete the workspace). **Explicit confirmation required:** pass `?confirm=DELETE` or the request is rejected with 400 `CONFIRM_REQUIRED` — removal cascades a soft-delete of every drive the member owns, so it carries tenant-level blast radius (uniform with `DELETE /v0/drives/{id}`). Deliberately takes NO `If-Match`: membership rows carry no generation/metageneration axis to pin (there is no ETag to echo), so `?confirm=DELETE` is the sole mutation guard here. - - :param target_user_id: (required) - :type target_user_id: str - :param confirm: - :type confirm: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._remove_member_v0_members_target_user_id_delete_serialize( - target_user_id=target_user_id, - confirm=confirm, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "MemberRemoveOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _remove_member_v0_members_target_user_id_delete_serialize( - self, - target_user_id, - confirm, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if target_user_id is not None: - _path_params['target_user_id'] = target_user_id - # process the query parameters - if confirm is not None: - - _query_params.append(('confirm', confirm)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/v0/members/{target_user_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def revoke_invitation_v0_invitations_invitation_id_delete( - self, - invitation_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RevokeOut: - """Revoke a pending invitation - - Revoke a pending invitation in the caller's active workspace. **Admin only**, `full` scope. Org-scoped + idempotent: `revoked` is a COUNT — 1 when a live invite was revoked, 0 when it was already gone (a forged id, an invite from another workspace, or an already-consumed invite all return `revoked: 0`, no-leak). - - :param invitation_id: (required) - :type invitation_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._revoke_invitation_v0_invitations_invitation_id_delete_serialize( - invitation_id=invitation_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RevokeOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def revoke_invitation_v0_invitations_invitation_id_delete_with_http_info( - self, - invitation_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[RevokeOut]: - """Revoke a pending invitation - - Revoke a pending invitation in the caller's active workspace. **Admin only**, `full` scope. Org-scoped + idempotent: `revoked` is a COUNT — 1 when a live invite was revoked, 0 when it was already gone (a forged id, an invite from another workspace, or an already-consumed invite all return `revoked: 0`, no-leak). - - :param invitation_id: (required) - :type invitation_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._revoke_invitation_v0_invitations_invitation_id_delete_serialize( - invitation_id=invitation_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RevokeOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def revoke_invitation_v0_invitations_invitation_id_delete_without_preload_content( - self, - invitation_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Revoke a pending invitation - - Revoke a pending invitation in the caller's active workspace. **Admin only**, `full` scope. Org-scoped + idempotent: `revoked` is a COUNT — 1 when a live invite was revoked, 0 when it was already gone (a forged id, an invite from another workspace, or an already-consumed invite all return `revoked: 0`, no-leak). - - :param invitation_id: (required) - :type invitation_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._revoke_invitation_v0_invitations_invitation_id_delete_serialize( - invitation_id=invitation_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RevokeOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _revoke_invitation_v0_invitations_invitation_id_delete_serialize( - self, - invitation_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if invitation_id is not None: - _path_params['invitation_id'] = invitation_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/v0/invitations/{invitation_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def set_member_role_v0_members_target_user_id_patch( - self, - target_user_id: StrictStr, - member_role_in: MemberRoleIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> MemberOut: - """Change a member's role - - Promote/demote a member in the caller's active workspace. **Admin only**, `full` scope. Demoting the workspace's **last admin** is rejected with 409 `LAST_ADMIN` (promote someone first). - - :param target_user_id: (required) - :type target_user_id: str - :param member_role_in: (required) - :type member_role_in: MemberRoleIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._set_member_role_v0_members_target_user_id_patch_serialize( - target_user_id=target_user_id, - member_role_in=member_role_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "MemberOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def set_member_role_v0_members_target_user_id_patch_with_http_info( - self, - target_user_id: StrictStr, - member_role_in: MemberRoleIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[MemberOut]: - """Change a member's role - - Promote/demote a member in the caller's active workspace. **Admin only**, `full` scope. Demoting the workspace's **last admin** is rejected with 409 `LAST_ADMIN` (promote someone first). - - :param target_user_id: (required) - :type target_user_id: str - :param member_role_in: (required) - :type member_role_in: MemberRoleIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._set_member_role_v0_members_target_user_id_patch_serialize( - target_user_id=target_user_id, - member_role_in=member_role_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "MemberOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def set_member_role_v0_members_target_user_id_patch_without_preload_content( - self, - target_user_id: StrictStr, - member_role_in: MemberRoleIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Change a member's role - - Promote/demote a member in the caller's active workspace. **Admin only**, `full` scope. Demoting the workspace's **last admin** is rejected with 409 `LAST_ADMIN` (promote someone first). - - :param target_user_id: (required) - :type target_user_id: str - :param member_role_in: (required) - :type member_role_in: MemberRoleIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._set_member_role_v0_members_target_user_id_patch_serialize( - target_user_id=target_user_id, - member_role_in=member_role_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "MemberOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '409': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _set_member_role_v0_members_target_user_id_patch_serialize( - self, - target_user_id, - member_role_in, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if target_user_id is not None: - _path_params['target_user_id'] = target_user_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if member_role_in is not None: - _body_params = member_role_in - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='PATCH', - resource_path='/v0/members/{target_user_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) diff --git a/sdk/python/agentdrive_sdk/api/tokens_api.py b/sdk/python/agentdrive_sdk/api/tokens_api.py deleted file mode 100644 index eb388e3..0000000 --- a/sdk/python/agentdrive_sdk/api/tokens_api.py +++ /dev/null @@ -1,604 +0,0 @@ -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import StrictInt, StrictStr -from typing import Optional -from agentdrive_sdk.models.user_token_list import UserTokenList -from agentdrive_sdk.models.user_token_out import UserTokenOut - -from agentdrive_sdk.api_client import ApiClient, RequestSerialized -from agentdrive_sdk.api_response import ApiResponse -from agentdrive_sdk.rest import RESTResponseType - - -class TokensApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def list_tokens_v0_tokens_get( - self, - cursor: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserTokenList: - """List your user-identity tokens - - List the `ad_user_` tokens belonging to the authenticated user. Metadata only — the raw token is shown once at mint (web only) and is never returned here. Includes recently-revoked tokens (with `revoked_at` set) so the caller can audit them; newest first. **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_tokens_v0_tokens_get_serialize( - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserTokenList", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def list_tokens_v0_tokens_get_with_http_info( - self, - cursor: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserTokenList]: - """List your user-identity tokens - - List the `ad_user_` tokens belonging to the authenticated user. Metadata only — the raw token is shown once at mint (web only) and is never returned here. Includes recently-revoked tokens (with `revoked_at` set) so the caller can audit them; newest first. **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_tokens_v0_tokens_get_serialize( - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserTokenList", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def list_tokens_v0_tokens_get_without_preload_content( - self, - cursor: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List your user-identity tokens - - List the `ad_user_` tokens belonging to the authenticated user. Metadata only — the raw token is shown once at mint (web only) and is never returned here. Includes recently-revoked tokens (with `revoked_at` set) so the caller can audit them; newest first. **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_tokens_v0_tokens_get_serialize( - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserTokenList", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_tokens_v0_tokens_get_serialize( - self, - cursor, - limit, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if cursor is not None: - - _query_params.append(('cursor', cursor)) - - if limit is not None: - - _query_params.append(('limit', limit)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/tokens', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def revoke_token_v0_tokens_token_id_revoke_post( - self, - token_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserTokenOut: - """Revoke one of your user-identity tokens - - Revoke a single `ad_user_` token by id. Scoped to the authenticated user: a token id that isn't yours returns 404 (no-leak). Idempotent — revoking an already-revoked token also returns 404 (it is no longer a live token of yours to revoke). On success the revoked token's metadata is returned with `revoked_at` set. - - :param token_id: (required) - :type token_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._revoke_token_v0_tokens_token_id_revoke_post_serialize( - token_id=token_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserTokenOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def revoke_token_v0_tokens_token_id_revoke_post_with_http_info( - self, - token_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserTokenOut]: - """Revoke one of your user-identity tokens - - Revoke a single `ad_user_` token by id. Scoped to the authenticated user: a token id that isn't yours returns 404 (no-leak). Idempotent — revoking an already-revoked token also returns 404 (it is no longer a live token of yours to revoke). On success the revoked token's metadata is returned with `revoked_at` set. - - :param token_id: (required) - :type token_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._revoke_token_v0_tokens_token_id_revoke_post_serialize( - token_id=token_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserTokenOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def revoke_token_v0_tokens_token_id_revoke_post_without_preload_content( - self, - token_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Revoke one of your user-identity tokens - - Revoke a single `ad_user_` token by id. Scoped to the authenticated user: a token id that isn't yours returns 404 (no-leak). Idempotent — revoking an already-revoked token also returns 404 (it is no longer a live token of yours to revoke). On success the revoked token's metadata is returned with `revoked_at` set. - - :param token_id: (required) - :type token_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._revoke_token_v0_tokens_token_id_revoke_post_serialize( - token_id=token_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserTokenOut", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _revoke_token_v0_tokens_token_id_revoke_post_serialize( - self, - token_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if token_id is not None: - _path_params['token_id'] = token_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v0/tokens/{token_id}/revoke', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) diff --git a/sdk/python/agentdrive_sdk/api/workspaces_api.py b/sdk/python/agentdrive_sdk/api/workspaces_api.py deleted file mode 100644 index d7fb0e5..0000000 --- a/sdk/python/agentdrive_sdk/api/workspaces_api.py +++ /dev/null @@ -1,930 +0,0 @@ -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import StrictInt, StrictStr -from typing import Optional -from agentdrive_sdk.models.workspace_create_in import WorkspaceCreateIn -from agentdrive_sdk.models.workspace_create_out import WorkspaceCreateOut -from agentdrive_sdk.models.workspace_list import WorkspaceList -from agentdrive_sdk.models.workspace_out import WorkspaceOut -from agentdrive_sdk.models.workspace_rename_in import WorkspaceRenameIn - -from agentdrive_sdk.api_client import ApiClient, RequestSerialized -from agentdrive_sdk.api_response import ApiResponse -from agentdrive_sdk.rest import RESTResponseType - - -class WorkspacesApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def create_workspace_route_v0_workspaces_post( - self, - workspace_create_in: WorkspaceCreateIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> WorkspaceCreateOut: - """Create a new shared drive - - Create a new **shared drive** — a shared, multi-member space (the `workspaces` path is retained for API stability). You become its **admin** and get a starter drive; the starter drive's `ad_live_` key is returned **once** (`starter_drive_api_key`). A user may administer up to their plan's number of shared drives (workspaces-v2 §4.6). A caller at the limit is blocked with `403 WORKSPACE_LIMIT_REACHED`. Requires a `full`-scope user token. - - :param workspace_create_in: (required) - :type workspace_create_in: WorkspaceCreateIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_workspace_route_v0_workspaces_post_serialize( - workspace_create_in=workspace_create_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "WorkspaceCreateOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '409': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def create_workspace_route_v0_workspaces_post_with_http_info( - self, - workspace_create_in: WorkspaceCreateIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[WorkspaceCreateOut]: - """Create a new shared drive - - Create a new **shared drive** — a shared, multi-member space (the `workspaces` path is retained for API stability). You become its **admin** and get a starter drive; the starter drive's `ad_live_` key is returned **once** (`starter_drive_api_key`). A user may administer up to their plan's number of shared drives (workspaces-v2 §4.6). A caller at the limit is blocked with `403 WORKSPACE_LIMIT_REACHED`. Requires a `full`-scope user token. - - :param workspace_create_in: (required) - :type workspace_create_in: WorkspaceCreateIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_workspace_route_v0_workspaces_post_serialize( - workspace_create_in=workspace_create_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "WorkspaceCreateOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '409': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def create_workspace_route_v0_workspaces_post_without_preload_content( - self, - workspace_create_in: WorkspaceCreateIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Create a new shared drive - - Create a new **shared drive** — a shared, multi-member space (the `workspaces` path is retained for API stability). You become its **admin** and get a starter drive; the starter drive's `ad_live_` key is returned **once** (`starter_drive_api_key`). A user may administer up to their plan's number of shared drives (workspaces-v2 §4.6). A caller at the limit is blocked with `403 WORKSPACE_LIMIT_REACHED`. Requires a `full`-scope user token. - - :param workspace_create_in: (required) - :type workspace_create_in: WorkspaceCreateIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_workspace_route_v0_workspaces_post_serialize( - workspace_create_in=workspace_create_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "WorkspaceCreateOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '409': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_workspace_route_v0_workspaces_post_serialize( - self, - workspace_create_in, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if workspace_create_in is not None: - _body_params = workspace_create_in - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v0/workspaces', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def list_workspaces_route_v0_workspaces_get( - self, - cursor: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> WorkspaceList: - """List the spaces you belong to - - Return every space the caller is a member of, each carrying the caller's `role` in it. Metadata only. A `read`-scope token is sufficient. **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_workspaces_route_v0_workspaces_get_serialize( - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "WorkspaceList", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def list_workspaces_route_v0_workspaces_get_with_http_info( - self, - cursor: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[WorkspaceList]: - """List the spaces you belong to - - Return every space the caller is a member of, each carrying the caller's `role` in it. Metadata only. A `read`-scope token is sufficient. **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_workspaces_route_v0_workspaces_get_serialize( - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "WorkspaceList", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def list_workspaces_route_v0_workspaces_get_without_preload_content( - self, - cursor: Optional[StrictStr] = None, - limit: Optional[StrictInt] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List the spaces you belong to - - Return every space the caller is a member of, each carrying the caller's `role` in it. Metadata only. A `read`-scope token is sufficient. **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - - :param cursor: - :type cursor: str - :param limit: - :type limit: int - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_workspaces_route_v0_workspaces_get_serialize( - cursor=cursor, - limit=limit, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "WorkspaceList", - '401': "ErrorResponse", - '403': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_workspaces_route_v0_workspaces_get_serialize( - self, - cursor, - limit, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if cursor is not None: - - _query_params.append(('cursor', cursor)) - - if limit is not None: - - _query_params.append(('limit', limit)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v0/workspaces', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def rename_workspace_route_v0_workspaces_org_id_patch( - self, - org_id: StrictStr, - workspace_rename_in: WorkspaceRenameIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> WorkspaceOut: - """Rename a shared drive you administer - - Rename a shared drive. **Admin only** — one you don't administer (or aren't a member of) returns 404 (no-leak). Requires a `full`-scope user token. - - :param org_id: (required) - :type org_id: str - :param workspace_rename_in: (required) - :type workspace_rename_in: WorkspaceRenameIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._rename_workspace_route_v0_workspaces_org_id_patch_serialize( - org_id=org_id, - workspace_rename_in=workspace_rename_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "WorkspaceOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def rename_workspace_route_v0_workspaces_org_id_patch_with_http_info( - self, - org_id: StrictStr, - workspace_rename_in: WorkspaceRenameIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[WorkspaceOut]: - """Rename a shared drive you administer - - Rename a shared drive. **Admin only** — one you don't administer (or aren't a member of) returns 404 (no-leak). Requires a `full`-scope user token. - - :param org_id: (required) - :type org_id: str - :param workspace_rename_in: (required) - :type workspace_rename_in: WorkspaceRenameIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._rename_workspace_route_v0_workspaces_org_id_patch_serialize( - org_id=org_id, - workspace_rename_in=workspace_rename_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "WorkspaceOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def rename_workspace_route_v0_workspaces_org_id_patch_without_preload_content( - self, - org_id: StrictStr, - workspace_rename_in: WorkspaceRenameIn, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Rename a shared drive you administer - - Rename a shared drive. **Admin only** — one you don't administer (or aren't a member of) returns 404 (no-leak). Requires a `full`-scope user token. - - :param org_id: (required) - :type org_id: str - :param workspace_rename_in: (required) - :type workspace_rename_in: WorkspaceRenameIn - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._rename_workspace_route_v0_workspaces_org_id_patch_serialize( - org_id=org_id, - workspace_rename_in=workspace_rename_in, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "WorkspaceOut", - '400': "ErrorResponse", - '401': "ErrorResponse", - '403': "ErrorResponse", - '404': "ErrorResponse", - '422': "ValidationErrorResponse", - '429': "ErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _rename_workspace_route_v0_workspaces_org_id_patch_serialize( - self, - org_id, - workspace_rename_in, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if org_id is not None: - _path_params['org_id'] = org_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if workspace_rename_in is not None: - _body_params = workspace_rename_in - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='PATCH', - resource_path='/v0/workspaces/{org_id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) diff --git a/sdk/python/agentdrive_sdk/api_client.py b/sdk/python/agentdrive_sdk/api_client.py deleted file mode 100644 index fdb9de8..0000000 --- a/sdk/python/agentdrive_sdk/api_client.py +++ /dev/null @@ -1,819 +0,0 @@ -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - - -import datetime -from dateutil.parser import parse -from enum import Enum -import decimal -import json -import mimetypes -import os -import re -import tempfile -import uuid - -from urllib.parse import quote -from typing import Tuple, Optional, List, Dict, Union -from pydantic import SecretStr - -from agentdrive_sdk.configuration import Configuration -from agentdrive_sdk.api_response import ApiResponse, T as ApiResponseT -import agentdrive_sdk.models -from agentdrive_sdk import rest -from agentdrive_sdk.exceptions import ( - ApiValueError, - ApiException, - BadRequestException, - UnauthorizedException, - ForbiddenException, - NotFoundException, - ServiceException -) - -RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] - -class ApiClient: - """Generic API client for OpenAPI client library builds. - - OpenAPI generic API client. This client handles the client- - server communication, and is invariant across implementations. Specifics of - the methods and models for each application are generated from the OpenAPI - templates. - - :param configuration: .Configuration object for this client - :param header_name: a header to pass when making calls to the API. - :param header_value: a header value to pass when making calls to - the API. - :param cookie: a cookie to include in the header when making calls - to the API - """ - - PRIMITIVE_TYPES = (float, bool, bytes, str, int) - NATIVE_TYPES_MAPPING = { - 'int': int, - 'long': int, # TODO remove as only py3 is supported? - 'float': float, - 'str': str, - 'bool': bool, - 'date': datetime.date, - 'datetime': datetime.datetime, - 'decimal': decimal.Decimal, - 'UUID': uuid.UUID, - 'object': object, - } - _pool = None - - def __init__( - self, - configuration=None, - header_name=None, - header_value=None, - cookie=None - ) -> None: - # use default configuration if none is provided - if configuration is None: - configuration = Configuration.get_default() - self.configuration = configuration - - self.rest_client = rest.RESTClientObject(configuration) - self.default_headers = {} - if header_name is not None: - self.default_headers[header_name] = header_value - self.cookie = cookie - # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/0.0.1/python' - self.client_side_validation = configuration.client_side_validation - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - pass - - @property - def user_agent(self): - """User agent for this API client""" - return self.default_headers['User-Agent'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - - _default = None - - @classmethod - def get_default(cls): - """Return new instance of ApiClient. - - This method returns newly created, based on default constructor, - object of ApiClient class or returns a copy of default - ApiClient. - - :return: The ApiClient object. - """ - if cls._default is None: - cls._default = ApiClient() - return cls._default - - @classmethod - def set_default(cls, default): - """Set default instance of ApiClient. - - It stores default ApiClient. - - :param default: object of ApiClient. - """ - cls._default = default - - def param_serialize( - self, - method, - resource_path, - path_params=None, - query_params=None, - header_params=None, - body=None, - post_params=None, - files=None, auth_settings=None, - collection_formats=None, - _host=None, - _request_auth=None - ) -> RequestSerialized: - - """Builds the HTTP request params needed by the request. - :param method: Method to call. - :param resource_path: Path to method endpoint. - :param path_params: Path parameters in the url. - :param query_params: Query parameters in the url. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param auth_settings list: Auth Settings names for the request. - :param files dict: key -> filename, value -> filepath, - for `multipart/form-data`. - :param collection_formats: dict of collection formats for path, query, - header, and post parameters. - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the authentication - in the spec for a single request. - :return: tuple of form (path, http_method, query_params, header_params, - body, post_params, files) - """ - - config = self.configuration - - # header parameters - header_params = header_params or {} - header_params.update(self.default_headers) - if self.cookie: - header_params['Cookie'] = self.cookie - if header_params: - header_params = self.sanitize_for_serialization(header_params) - header_params = dict( - self.parameters_to_tuples(header_params,collection_formats) - ) - - # path parameters - if path_params: - path_params = self.sanitize_for_serialization(path_params) - path_params = self.parameters_to_tuples( - path_params, - collection_formats - ) - for k, v in path_params: - # specified safe chars, encode everything - resource_path = resource_path.replace( - '{%s}' % k, - quote(str(v), safe=config.safe_chars_for_path_param) - ) - - # post parameters - if post_params or files: - post_params = post_params if post_params else [] - post_params = self.sanitize_for_serialization(post_params) - post_params = self.parameters_to_tuples( - post_params, - collection_formats - ) - if files: - post_params.extend(self.files_parameters(files)) - - # auth setting - self.update_params_for_auth( - header_params, - query_params, - auth_settings, - resource_path, - method, - body, - request_auth=_request_auth - ) - - # body - if body: - body = self.sanitize_for_serialization(body) - - # request url - if _host is None or self.configuration.ignore_operation_servers: - url = self.configuration.host + resource_path - else: - # use server/host defined in path or operation instead - url = _host + resource_path - - # query parameters - if query_params: - query_params = self.sanitize_for_serialization(query_params) - url_query = self.parameters_to_url_query( - query_params, - collection_formats - ) - url += "?" + url_query - - return method, url, header_params, body, post_params - - - def call_api( - self, - method, - url, - header_params=None, - body=None, - post_params=None, - _request_timeout=None - ) -> rest.RESTResponse: - """Makes the HTTP request (synchronous) - :param method: Method to call. - :param url: Path to method endpoint. - :param header_params: Header parameters to be - placed in the request header. - :param body: Request body. - :param post_params dict: Request post form parameters, - for `application/x-www-form-urlencoded`, `multipart/form-data`. - :param _request_timeout: timeout setting for this request. - :return: RESTResponse - """ - - try: - # perform request and return response - response_data = self.rest_client.request( - method, url, - headers=header_params, - body=body, post_params=post_params, - _request_timeout=_request_timeout - ) - - except ApiException as e: - raise e - - return response_data - - def response_deserialize( - self, - response_data: rest.RESTResponse, - response_types_map: Optional[Dict[str, ApiResponseT]]=None - ) -> ApiResponse[ApiResponseT]: - """Deserializes response into an object. - :param response_data: RESTResponse object to be deserialized. - :param response_types_map: dict of response types. - :return: ApiResponse - """ - - msg = "RESTResponse.read() must be called before passing it to response_deserialize()" - assert response_data.data is not None, msg - - response_type = response_types_map.get(str(response_data.status), None) - if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: - # if not found, look for '1XX', '2XX', etc. - response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) - - # If the response_type has not matched (eg. did not match the previous if statements) and the default response is available, use it. - if response_type is None and str(response_data.status) not in response_types_map \ - and (not isinstance(response_data.status, int) or not 100 <= response_data.status <= 599 or str(response_data.status)[0] + "XX" not in response_types_map) \ - and 'default' in response_types_map: - response_type = response_types_map['default'] - - # deserialize response data - response_text = None - return_data = None - try: - if response_type in ("bytearray", "bytes"): - return_data = response_data.data - elif response_type == "file": - return_data = self.__deserialize_file(response_data) - elif response_type is not None: - match = None - content_type = response_data.headers.get('content-type') - if content_type is not None: - match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) - encoding = match.group(1) if match else "utf-8" - response_text = response_data.data.decode(encoding) - return_data = self.deserialize(response_text, response_type, content_type) - finally: - if not 200 <= response_data.status <= 299: - raise ApiException.from_response( - http_resp=response_data, - body=response_text, - data=return_data, - ) - - return ApiResponse( - status_code = response_data.status, - data = return_data, - headers = response_data.headers, - raw_data = response_data.data - ) - - def sanitize_for_serialization(self, obj): - """Builds a JSON POST object. - - If obj is None, return None. - If obj is SecretStr, return obj.get_secret_value() - If obj is str, int, long, float, bool, return directly. - If obj is datetime.datetime, datetime.date - convert to string in iso8601 format. - If obj is decimal.Decimal return string representation. - If obj is list, sanitize each element in the list. - If obj is dict, return the dict. - If obj is OpenAPI model, return the properties dict. - - :param obj: The data to serialize. - :return: The serialized form of data. - """ - if obj is None: - return None - elif isinstance(obj, Enum): - return obj.value - elif isinstance(obj, SecretStr): - return obj.get_secret_value() - elif isinstance(obj, self.PRIMITIVE_TYPES): - return obj - elif isinstance(obj, uuid.UUID): - return str(obj) - elif isinstance(obj, list): - return [ - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ] - elif isinstance(obj, tuple): - return tuple( - self.sanitize_for_serialization(sub_obj) for sub_obj in obj - ) - elif isinstance(obj, (datetime.datetime, datetime.date)): - return obj.isoformat() - elif isinstance(obj, decimal.Decimal): - return str(obj) - elif isinstance(obj, dict): - return { - key: self.sanitize_for_serialization(val) - for key, val in obj.items() - } - - # Convert model obj to dict except - # attributes `openapi_types`, `attribute_map` - # and attributes which value is not None. - # Convert attribute name to json key in - # model definition for request. - if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): - obj_dict = obj.to_dict() - else: - obj_dict = obj.__dict__ - - return self.sanitize_for_serialization(obj_dict) - - - def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): - """Deserializes response into an object. - - :param response: RESTResponse object to be deserialized. - :param response_type: class literal for - deserialized object, or string of class name. - :param content_type: content type of response. - - :return: deserialized object. - """ - - # fetch data from response object - if content_type is None: - try: - data = json.loads(response_text) - except ValueError: - data = response_text - elif re.match(r'^application/(json|[\w!#$&.+\-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): - if response_text == "": - data = "" - else: - data = json.loads(response_text) - elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE): - data = response_text - else: - raise ApiException( - status=0, - reason="Unsupported content type: {0}".format(content_type) - ) - - return self.__deserialize(data, response_type) - - def __deserialize(self, data, klass): - """Deserializes dict, list, str into an object. - - :param data: dict, list or str. - :param klass: class literal, or string of class name. - - :return: object. - """ - if data is None: - return None - - if isinstance(klass, str): - if klass.startswith('List['): - m = re.match(r'List\[(.*)]', klass) - assert m is not None, "Malformed List type definition" - sub_kls = m.group(1) - return [self.__deserialize(sub_data, sub_kls) - for sub_data in data] - - if klass.startswith('Dict['): - m = re.match(r'Dict\[([^,]*), (.*)]', klass) - assert m is not None, "Malformed Dict type definition" - sub_kls = m.group(2) - return {k: self.__deserialize(v, sub_kls) - for k, v in data.items()} - - # convert str to class - if klass in self.NATIVE_TYPES_MAPPING: - klass = self.NATIVE_TYPES_MAPPING[klass] - else: - klass = getattr(agentdrive_sdk.models, klass) - - if klass in self.PRIMITIVE_TYPES: - return self.__deserialize_primitive(data, klass) - elif klass is object: - return self.__deserialize_object(data) - elif klass is datetime.date: - return self.__deserialize_date(data) - elif klass is datetime.datetime: - return self.__deserialize_datetime(data) - elif klass is decimal.Decimal: - return decimal.Decimal(data) - elif klass is uuid.UUID: - return uuid.UUID(data) - elif issubclass(klass, Enum): - return self.__deserialize_enum(data, klass) - else: - return self.__deserialize_model(data, klass) - - def parameters_to_tuples(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: Parameters as list of tuples, collections formatted - """ - new_params: List[Tuple[str, str]] = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, value) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(str(value) for value in v))) - else: - new_params.append((k, v)) - return new_params - - def parameters_to_url_query(self, params, collection_formats): - """Get parameters as list of tuples, formatting collections. - - :param params: Parameters as dict or list of two-tuples - :param dict collection_formats: Parameter collection formats - :return: URL query string (e.g. a=Hello%20World&b=123) - """ - new_params: List[Tuple[str, str]] = [] - if collection_formats is None: - collection_formats = {} - for k, v in params.items() if isinstance(params, dict) else params: - if isinstance(v, bool): - v = str(v).lower() - if isinstance(v, (int, float)): - v = str(v) - if isinstance(v, dict): - v = json.dumps(v) - - if k in collection_formats: - collection_format = collection_formats[k] - if collection_format == 'multi': - new_params.extend((k, quote(str(value))) for value in v) - else: - if collection_format == 'ssv': - delimiter = ' ' - elif collection_format == 'tsv': - delimiter = '\t' - elif collection_format == 'pipes': - delimiter = '|' - else: # csv is the default - delimiter = ',' - new_params.append( - (k, delimiter.join(quote(str(value)) for value in v)) - ) - else: - new_params.append((k, quote(str(v)))) - - return "&".join(["=".join(map(str, item)) for item in new_params]) - - def files_parameters( - self, - files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], - ): - """Builds form parameters. - - :param files: File parameters. - :return: Form parameters with files. - """ - params = [] - for k, v in files.items(): - if isinstance(v, str): - with open(v, 'rb') as f: - filename = os.path.basename(f.name) - filedata = f.read() - elif isinstance(v, bytes): - filename = k - filedata = v - elif isinstance(v, tuple): - filename, filedata = v - elif isinstance(v, list): - for file_param in v: - params.extend(self.files_parameters({k: file_param})) - continue - else: - raise ValueError("Unsupported file value") - mimetype = ( - mimetypes.guess_type(filename)[0] - or 'application/octet-stream' - ) - params.append( - tuple([k, tuple([filename, filedata, mimetype])]) - ) - return params - - def select_header_accept(self, accepts: List[str]) -> Optional[str]: - """Returns `Accept` based on an array of accepts provided. - - :param accepts: List of headers. - :return: Accept (e.g. application/json). - """ - if not accepts: - return None - - for accept in accepts: - if re.search('json', accept, re.IGNORECASE): - return accept - - return accepts[0] - - def select_header_content_type(self, content_types): - """Returns `Content-Type` based on an array of content_types provided. - - :param content_types: List of content-types. - :return: Content-Type (e.g. application/json). - """ - if not content_types: - return None - - for content_type in content_types: - if re.search('json', content_type, re.IGNORECASE): - return content_type - - return content_types[0] - - def update_params_for_auth( - self, - headers, - queries, - auth_settings, - resource_path, - method, - body, - request_auth=None - ) -> None: - """Updates header and query params based on authentication setting. - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :param auth_settings: Authentication setting identifiers list. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param request_auth: if set, the provided settings will - override the token in the configuration. - """ - if not auth_settings: - return - - if request_auth: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - request_auth - ) - else: - for auth in auth_settings: - auth_setting = self.configuration.auth_settings().get(auth) - if auth_setting: - self._apply_auth_params( - headers, - queries, - resource_path, - method, - body, - auth_setting - ) - - def _apply_auth_params( - self, - headers, - queries, - resource_path, - method, - body, - auth_setting - ) -> None: - """Updates the request parameters based on a single auth_setting - - :param headers: Header parameters dict to be updated. - :param queries: Query parameters tuple list to be updated. - :resource_path: A string representation of the HTTP request resource path. - :method: A string representation of the HTTP request method. - :body: A object representing the body of the HTTP request. - The object type is the return value of sanitize_for_serialization(). - :param auth_setting: auth settings for the endpoint - """ - if auth_setting['in'] == 'cookie': - if not 'Cookie' in headers: - headers['Cookie'] = "" - else: - headers['Cookie'] += "; " - # Account for cookie value containing spaces and special characters - cookie_value = str(auth_setting['value']) - if not re.match("^\".*\"$", cookie_value): - cookie_value = cookie_value.replace("\"", "\\\"") - cookie_value = f"\"{cookie_value}\"" - headers['Cookie'] += f"{auth_setting['key']}={cookie_value}" - elif auth_setting['in'] == 'header': - if auth_setting['type'] != 'http-signature': - headers[auth_setting['key']] = auth_setting['value'] - elif auth_setting['in'] == 'query': - queries.append((auth_setting['key'], auth_setting['value'])) - else: - raise ApiValueError( - 'Authentication token must be in `query` or `header`' - ) - - def __deserialize_file(self, response): - """Deserializes body to file - - Saves response body into a file in a temporary folder, - using the filename from the `Content-Disposition` header if provided. - - handle file downloading - save response body into a tmp file and return the instance - - :param response: RESTResponse. - :return: file path. - """ - fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) - os.close(fd) - os.remove(path) - - content_disposition = response.headers.get("Content-Disposition") - if content_disposition: - m = re.search( - r'filename=[\'"]?([^\'"\s]+)[\'"]?', - content_disposition - ) - assert m is not None, "Unexpected 'content-disposition' header value" - filename = os.path.basename(m.group(1)) # Strip any directory traversal - if filename in ("", ".", ".."): # fall back to tmp filename - filename = os.path.basename(path) - path = os.path.join(os.path.dirname(path), filename) - - with open(path, "wb") as f: - f.write(response.data) - - return path - - def __deserialize_primitive(self, data, klass): - """Deserializes string to primitive type. - - :param data: str. - :param klass: class literal. - - :return: int, long, float, str, bool. - """ - try: - return klass(data) - except UnicodeEncodeError: - return str(data) - except TypeError: - return data - - def __deserialize_object(self, value): - """Return an original value. - - :return: object. - """ - return value - - def __deserialize_date(self, string): - """Deserializes string to date. - - :param string: str. - :return: date. - """ - try: - return parse(string).date() - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason="Failed to parse `{0}` as date object".format(string) - ) - - def __deserialize_datetime(self, string): - """Deserializes string to datetime. - - The string should be in iso8601 datetime format. - - :param string: str. - :return: datetime. - """ - try: - return parse(string) - except ImportError: - return string - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as datetime object" - .format(string) - ) - ) - - def __deserialize_enum(self, data, klass): - """Deserializes primitive type to enum. - - :param data: primitive type. - :param klass: class literal. - :return: enum value. - """ - try: - return klass(data) - except ValueError: - raise rest.ApiException( - status=0, - reason=( - "Failed to parse `{0}` as `{1}`" - .format(data, klass) - ) - ) - - def __deserialize_model(self, data, klass): - """Deserializes list or dict to model. - - :param data: dict, list. - :param klass: class literal. - :return: model object. - """ - - return klass.from_dict(data) diff --git a/sdk/python/agentdrive_sdk/configuration.py b/sdk/python/agentdrive_sdk/configuration.py deleted file mode 100644 index fcefbb1..0000000 --- a/sdk/python/agentdrive_sdk/configuration.py +++ /dev/null @@ -1,623 +0,0 @@ -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import copy -import http.client as httplib -import logging -from logging import FileHandler -import multiprocessing -import sys -from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union -from urllib.parse import urlparse -from urllib.request import getproxies -from typing_extensions import NotRequired, Self - -import urllib3 - - -JSON_SCHEMA_VALIDATION_KEYWORDS = { - 'multipleOf', 'maximum', 'exclusiveMaximum', - 'minimum', 'exclusiveMinimum', 'maxLength', - 'minLength', 'pattern', 'maxItems', 'minItems' -} - -ServerVariablesT = Dict[str, str] - -GenericAuthSetting = TypedDict( - "GenericAuthSetting", - { - "type": str, - "in": str, - "key": str, - "value": str, - }, -) - - -OAuth2AuthSetting = TypedDict( - "OAuth2AuthSetting", - { - "type": Literal["oauth2"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": str, - }, -) - - -APIKeyAuthSetting = TypedDict( - "APIKeyAuthSetting", - { - "type": Literal["api_key"], - "in": str, - "key": str, - "value": Optional[str], - }, -) - - -BasicAuthSetting = TypedDict( - "BasicAuthSetting", - { - "type": Literal["basic"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": Optional[str], - }, -) - - -BearerFormatAuthSetting = TypedDict( - "BearerFormatAuthSetting", - { - "type": Literal["bearer"], - "in": Literal["header"], - "format": Literal["JWT"], - "key": Literal["Authorization"], - "value": str, - }, -) - - -BearerAuthSetting = TypedDict( - "BearerAuthSetting", - { - "type": Literal["bearer"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": str, - }, -) - - -HTTPSignatureAuthSetting = TypedDict( - "HTTPSignatureAuthSetting", - { - "type": Literal["http-signature"], - "in": Literal["header"], - "key": Literal["Authorization"], - "value": None, - }, -) - - -AuthSettings = TypedDict( - "AuthSettings", - { - "BearerAuth": BearerFormatAuthSetting, - }, - total=False, -) - - -class HostSettingVariable(TypedDict): - description: str - default_value: str - enum_values: List[str] - - -class HostSetting(TypedDict): - url: str - description: str - variables: NotRequired[Dict[str, HostSettingVariable]] - - -class Configuration: - """This class contains various settings of the API client. - - :param host: Base url. - :param ignore_operation_servers - Boolean to ignore operation servers for the API client. - Config will use `host` as the base url regardless of the operation servers. - :param api_key: Dict to store API key(s). - Each entry in the dict specifies an API key. - The dict key is the name of the security scheme in the OAS specification. - The dict value is the API key secret. - :param api_key_prefix: Dict to store API prefix (e.g. Bearer). - The dict key is the name of the security scheme in the OAS specification. - The dict value is an API key prefix when generating the auth data. - :param username: Username for HTTP basic authentication. - :param password: Password for HTTP basic authentication. - :param access_token: Access token. - :param server_index: Index to servers configuration. - :param server_variables: Mapping with string values to replace variables in - templated server configuration. The validation of enums is performed for - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum - values before. - :param verify_ssl: bool - Set this to false to skip verifying SSL certificate - when calling API from https server. - :param ssl_ca_cert: str - the path to a file of concatenated CA certificates - in PEM format. - :param retries: int | urllib3.util.retry.Retry - Retry configuration. - :param ca_cert_data: verify the peer using concatenated CA certificate data - in PEM (str) or DER (bytes) format. - :param cert_file: the path to a client certificate file, for mTLS. - :param key_file: the path to a client key file, for mTLS. - :param assert_hostname: Set this to True/False to enable/disable SSL hostname verification. - :param tls_server_name: SSL/TLS Server Name Indication (SNI). Set this to the SNI value expected by the server. - :param connection_pool_maxsize: Connection pool max size. None in the constructor is coerced to 100 for async and cpu_count * 5 for sync. - :param proxy: Proxy URL. - :param no_proxy: Comma-separated hosts that bypass the proxy. - :param proxy_headers: Proxy headers. - :param safe_chars_for_path_param: Safe characters for path parameter encoding. - :param client_side_validation: Enable client-side validation. Default True. - :param socket_options: Options to pass down to the underlying urllib3 socket. - :param datetime_format: Datetime format string for serialization. - :param date_format: Date format string for serialization. - - :Example: - """ - - _default: ClassVar[Optional[Self]] = None - - def __init__( - self, - host: Optional[str]=None, - api_key: Optional[Dict[str, str]]=None, - api_key_prefix: Optional[Dict[str, str]]=None, - username: Optional[str]=None, - password: Optional[str]=None, - access_token: Optional[str]=None, - server_index: Optional[int]=None, - server_variables: Optional[ServerVariablesT]=None, - server_operation_index: Optional[Dict[int, int]]=None, - server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, - ignore_operation_servers: bool=False, - ssl_ca_cert: Optional[str]=None, - retries: Optional[Union[int, urllib3.util.retry.Retry]] = None, - ca_cert_data: Optional[Union[str, bytes]] = None, - cert_file: Optional[str]=None, - key_file: Optional[str]=None, - verify_ssl: bool=True, - assert_hostname: Optional[bool]=None, - tls_server_name: Optional[str]=None, - connection_pool_maxsize: Optional[int]=None, - proxy: Optional[str]=None, - no_proxy: Optional[str]=None, - proxy_headers: Optional[Any]=None, - safe_chars_for_path_param: str='', - client_side_validation: bool=True, - socket_options: Optional[Any]=None, - datetime_format: str="%Y-%m-%dT%H:%M:%S.%f%z", - date_format: str="%Y-%m-%d", - *, - debug: Optional[bool] = None, - ) -> None: - """Constructor - """ - self._base_path = "https://api.agentdrive.run" if host is None else host - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.ignore_operation_servers = ignore_operation_servers - """Ignore operation servers - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.username = username - """Username for HTTP basic authentication - """ - self.password = password - """Password for HTTP basic authentication - """ - self.access_token = access_token - """Access token - """ - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("agentdrive_sdk") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler: Optional[FileHandler] = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - if debug is not None: - self.debug = debug - else: - self.__debug = False - """Debug switch - """ - - self.verify_ssl = verify_ssl - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = ssl_ca_cert - """Set this to customize the certificate file to verify the peer. - """ - self.ca_cert_data = ca_cert_data - """Set this to verify the peer using PEM (str) or DER (bytes) - certificate data. - """ - self.cert_file = cert_file - """client certificate file - """ - self.key_file = key_file - """client key file - """ - self.assert_hostname = assert_hostname - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = tls_server_name - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - self.connection_pool_maxsize = connection_pool_maxsize if connection_pool_maxsize is not None else multiprocessing.cpu_count() * 5 - """urllib3 connection pool's maximum number of connections saved - per pool. None in the constructor is coerced to cpu_count * 5. - """ - - # urllib3 does not read proxy environment variables itself: - # https://github.com/urllib3/urllib3/issues/1785 - if proxy is None or no_proxy is None: - proxies = getproxies() - if proxy is None: - scheme = urlparse(self.host).scheme - proxy = proxies.get(scheme) or proxies.get("all") - if no_proxy is None: - no_proxy = proxies.get("no") - self.proxy = proxy - """Proxy URL - """ - self.no_proxy = no_proxy - """Hosts that bypass the proxy - """ - self.proxy_headers = proxy_headers - """Proxy headers - """ - self.safe_chars_for_path_param = safe_chars_for_path_param - """Safe chars for path_param - """ - self.retries = retries - """Retry configuration - """ - # Enable client side validation - self.client_side_validation = client_side_validation - - self.socket_options = socket_options - """Options to pass down to the underlying urllib3 socket - """ - - self.datetime_format = datetime_format - """datetime format - """ - - self.date_format = date_format - """date format - """ - - def __deepcopy__(self, memo: Dict[int, Any]) -> Self: - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setter to re-create the file handler (excluded from __dict__ copy) - result.logger_file = self.logger_file - - return result - - def __setattr__(self, name: str, value: Any) -> None: - object.__setattr__(self, name, value) - - @classmethod - def set_default(cls, default: Optional[Self]) -> None: - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = default - - @classmethod - def get_default_copy(cls) -> Self: - """Deprecated. Please use `get_default` instead. - - Deprecated. Please use `get_default` instead. - - :return: The configuration object. - """ - return cls.get_default() - - @classmethod - def get_default(cls) -> Self: - """Return the default configuration. - - This method returns newly created, based on default constructor, - object of Configuration class or returns a copy of default - configuration. - - :return: The configuration object. - """ - if cls._default is None: - cls._default = cls() - return cls._default - - @property - def logger_file(self) -> Optional[str]: - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value: Optional[str]) -> None: - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self) -> bool: - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value: bool) -> None: - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on httplib debug - httplib.HTTPConnection.debuglevel = 1 - else: - # if debug status is False, turn off debug logging, - # setting log level to default `logging.WARNING` - for _, logger in self.logger.items(): - logger.setLevel(logging.WARNING) - # turn off httplib debug - httplib.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self) -> str: - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value: str) -> None: - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]: - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get( - identifier, self.api_key_prefix.get(alias) if alias is not None else None) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - return None - - def get_basic_auth_token(self) -> Optional[str]: - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self)-> AuthSettings: - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth: AuthSettings = {} - if self.access_token is not None: - auth['BearerAuth'] = { - 'type': 'bearer', - 'in': 'header', - 'format': 'ad_live_ | ad_user_ | JWT', - 'key': 'Authorization', - 'value': 'Bearer ' + self.access_token - } - return auth - - def to_debug_report(self) -> str: - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: <PINNED>\n"\ - "SDK Package Version: 0.0.1".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self) -> List[HostSetting]: - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "https://api.agentdrive.run", - 'description': "AgentDrive public API", - } - ] - - def get_host_from_settings( - self, - index: Optional[int], - variables: Optional[ServerVariablesT]=None, - servers: Optional[List[HostSetting]]=None, - ) -> str: - """Gets host URL based on the index and variables - :param index: array index of the host settings - :param variables: hash of variable and the corresponding value - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and variable['enum_values'] \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self) -> str: - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - def host(self, value: str) -> None: - """Fix base path.""" - self._base_path = value - self.server_index = None diff --git a/sdk/python/agentdrive_sdk/exceptions.py b/sdk/python/agentdrive_sdk/exceptions.py deleted file mode 100644 index cf78b95..0000000 --- a/sdk/python/agentdrive_sdk/exceptions.py +++ /dev/null @@ -1,218 +0,0 @@ -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from typing import Any, Optional -from typing_extensions import Self - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None) -> None: - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None) -> None: - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -class ApiException(OpenApiException): - - def __init__( - self, - status=None, - reason=None, - http_resp=None, - *, - body: Optional[str] = None, - data: Optional[Any] = None, - ) -> None: - self.status = status - self.reason = reason - self.body = body - self.data = data - self.headers = None - - if http_resp: - if self.status is None: - self.status = http_resp.status - if self.reason is None: - self.reason = http_resp.reason - if self.body is None: - try: - self.body = http_resp.data.decode('utf-8') - except Exception: - pass - self.headers = http_resp.headers - - @classmethod - def from_response( - cls, - *, - http_resp, - body: Optional[str], - data: Optional[Any], - ) -> Self: - if http_resp.status == 400: - raise BadRequestException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 401: - raise UnauthorizedException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 403: - raise ForbiddenException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 404: - raise NotFoundException(http_resp=http_resp, body=body, data=data) - - # Added new conditions for 409 and 422 - if http_resp.status == 409: - raise ConflictException(http_resp=http_resp, body=body, data=data) - - if http_resp.status == 422: - raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data) - - if 500 <= http_resp.status <= 599: - raise ServiceException(http_resp=http_resp, body=body, data=data) - raise ApiException(http_resp=http_resp, body=body, data=data) - - def __str__(self): - """Custom error messages for exception""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - if self.data: - error_message += "HTTP response data: {0}\n".format(self.data) - - return error_message - - -class BadRequestException(ApiException): - pass - - -class NotFoundException(ApiException): - pass - - -class UnauthorizedException(ApiException): - pass - - -class ForbiddenException(ApiException): - pass - - -class ServiceException(ApiException): - pass - - -class ConflictException(ApiException): - """Exception for HTTP 409 Conflict.""" - pass - - -class UnprocessableEntityException(ApiException): - """Exception for HTTP 422 Unprocessable Entity.""" - pass - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/sdk/python/agentdrive_sdk/models/__init__.py b/sdk/python/agentdrive_sdk/models/__init__.py deleted file mode 100644 index 3f082d1..0000000 --- a/sdk/python/agentdrive_sdk/models/__init__.py +++ /dev/null @@ -1,142 +0,0 @@ -# coding: utf-8 - -# flake8: noqa -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -# import models into model package -from agentdrive_sdk.models.agent_auth_metadata_out import AgentAuthMetadataOut -from agentdrive_sdk.models.anonymous_identity_response import AnonymousIdentityResponse -from agentdrive_sdk.models.artifact_delete_out import ArtifactDeleteOut -from agentdrive_sdk.models.artifact_head_out import ArtifactHeadOut -from agentdrive_sdk.models.artifact_move_in import ArtifactMoveIn -from agentdrive_sdk.models.artifact_out import ArtifactOut -from agentdrive_sdk.models.artifact_patch_in import ArtifactPatchIn -from agentdrive_sdk.models.artifact_source import ArtifactSource -from agentdrive_sdk.models.authorization_server_metadata_out import AuthorizationServerMetadataOut -from agentdrive_sdk.models.authorize_decision_oauth2_authorize_post403_response import AuthorizeDecisionOauth2AuthorizePost403Response -from agentdrive_sdk.models.claim_init_request import ClaimInitRequest -from agentdrive_sdk.models.claim_init_response import ClaimInitResponse -from agentdrive_sdk.models.claim_metadata import ClaimMetadata -from agentdrive_sdk.models.client_registration_out import ClientRegistrationOut -from agentdrive_sdk.models.compile_diagnostic_out import CompileDiagnosticOut -from agentdrive_sdk.models.compile_job_in import CompileJobIn -from agentdrive_sdk.models.compile_job_list_out import CompileJobListOut -from agentdrive_sdk.models.compile_job_out import CompileJobOut -from agentdrive_sdk.models.compile_options import CompileOptions -from agentdrive_sdk.models.compile_project_out import CompileProjectOut -from agentdrive_sdk.models.copy_in import CopyIn -from agentdrive_sdk.models.dataset_description_out import DatasetDescriptionOut -from agentdrive_sdk.models.describe_in import DescribeIn -from agentdrive_sdk.models.download_url_out import DownloadUrlOut -from agentdrive_sdk.models.drive_api_key_create_in import DriveApiKeyCreateIn -from agentdrive_sdk.models.drive_api_key_create_out import DriveApiKeyCreateOut -from agentdrive_sdk.models.drive_api_key_list_out import DriveApiKeyListOut -from agentdrive_sdk.models.drive_api_key_out import DriveApiKeyOut -from agentdrive_sdk.models.drive_create_in import DriveCreateIn -from agentdrive_sdk.models.drive_create_out import DriveCreateOut -from agentdrive_sdk.models.drive_delete_out import DriveDeleteOut -from agentdrive_sdk.models.drive_list import DriveList -from agentdrive_sdk.models.drive_out import DriveOut -from agentdrive_sdk.models.drive_read_out import DriveReadOut -from agentdrive_sdk.models.drive_rename_in import DriveRenameIn -from agentdrive_sdk.models.drive_restore_out import DriveRestoreOut -from agentdrive_sdk.models.drive_usage_out import DriveUsageOut -from agentdrive_sdk.models.error_body import ErrorBody -from agentdrive_sdk.models.error_detail import ErrorDetail -from agentdrive_sdk.models.error_response import ErrorResponse -from agentdrive_sdk.models.event_out import EventOut -from agentdrive_sdk.models.event_page import EventPage -from agentdrive_sdk.models.extension_exchange_request import ExtensionExchangeRequest -from agentdrive_sdk.models.extension_exchange_response import ExtensionExchangeResponse -from agentdrive_sdk.models.feedback_create_out import FeedbackCreateOut -from agentdrive_sdk.models.feedback_status_out import FeedbackStatusOut -from agentdrive_sdk.models.find_hit_out import FindHitOut -from agentdrive_sdk.models.find_page import FindPage -from agentdrive_sdk.models.folder_copy_in import FolderCopyIn -from agentdrive_sdk.models.folder_copy_out import FolderCopyOut -from agentdrive_sdk.models.folder_create_in import FolderCreateIn -from agentdrive_sdk.models.folder_delete_out import FolderDeleteOut -from agentdrive_sdk.models.folder_move_in import FolderMoveIn -from agentdrive_sdk.models.folder_out import FolderOut -from agentdrive_sdk.models.folder_patch_in import FolderPatchIn -from agentdrive_sdk.models.folder_restore_out import FolderRestoreOut -from agentdrive_sdk.models.grant_create_in import GrantCreateIn -from agentdrive_sdk.models.grant_list import GrantList -from agentdrive_sdk.models.grant_out import GrantOut -from agentdrive_sdk.models.grant_patch_in import GrantPatchIn -from agentdrive_sdk.models.grant_principal_in import GrantPrincipalIn -from agentdrive_sdk.models.health_degraded_detail import HealthDegradedDetail -from agentdrive_sdk.models.health_degraded_response import HealthDegradedResponse -from agentdrive_sdk.models.health_out import HealthOut -from agentdrive_sdk.models.hourly_usage_counter_out import HourlyUsageCounterOut -from agentdrive_sdk.models.identity_assertion_metadata_out import IdentityAssertionMetadataOut -from agentdrive_sdk.models.invitation_list import InvitationList -from agentdrive_sdk.models.invitation_out import InvitationOut -from agentdrive_sdk.models.invite_create_out import InviteCreateOut -from agentdrive_sdk.models.jwk_out import JwkOut -from agentdrive_sdk.models.jwks_out import JwksOut -from agentdrive_sdk.models.loc_inner import LocInner -from agentdrive_sdk.models.lookup_values_in import LookupValuesIn -from agentdrive_sdk.models.lookup_values_out import LookupValuesOut -from agentdrive_sdk.models.member_invite_in import MemberInviteIn -from agentdrive_sdk.models.member_list import MemberList -from agentdrive_sdk.models.member_out import MemberOut -from agentdrive_sdk.models.member_remove_out import MemberRemoveOut -from agentdrive_sdk.models.member_role_in import MemberRoleIn -from agentdrive_sdk.models.o_auth_protocol_error_out import OAuthProtocolErrorOut -from agentdrive_sdk.models.operation_usage_out import OperationUsageOut -from agentdrive_sdk.models.page import Page -from agentdrive_sdk.models.project_config_in import ProjectConfigIn -from agentdrive_sdk.models.protected_resource_metadata_out import ProtectedResourceMetadataOut -from agentdrive_sdk.models.query_column_out import QueryColumnOut -from agentdrive_sdk.models.query_dry_run_out import QueryDryRunOut -from agentdrive_sdk.models.query_in import QueryIn -from agentdrive_sdk.models.query_result_out import QueryResultOut -from agentdrive_sdk.models.register_agent_identity_agent_identity_post422_response import RegisterAgentIdentityAgentIdentityPost422Response -from agentdrive_sdk.models.response_post_query_v0_query_post import ResponsePostQueryV0QueryPost -from agentdrive_sdk.models.revoke_out import RevokeOut -from agentdrive_sdk.models.search_hit_out import SearchHitOut -from agentdrive_sdk.models.search_page import SearchPage -from agentdrive_sdk.models.share_create_in import ShareCreateIn -from agentdrive_sdk.models.share_error_out import ShareErrorOut -from agentdrive_sdk.models.share_list import ShareList -from agentdrive_sdk.models.share_mint_out import ShareMintOut -from agentdrive_sdk.models.share_out import ShareOut -from agentdrive_sdk.models.share_redeem_out import ShareRedeemOut -from agentdrive_sdk.models.source_ref import SourceRef -from agentdrive_sdk.models.storage_breakdown_out import StorageBreakdownOut -from agentdrive_sdk.models.storage_footprint_out import StorageFootprintOut -from agentdrive_sdk.models.token_response import TokenResponse -from agentdrive_sdk.models.token_usage_out import TokenUsageOut -from agentdrive_sdk.models.trash_artifact_out import TrashArtifactOut -from agentdrive_sdk.models.trash_drive_out import TrashDriveOut -from agentdrive_sdk.models.trash_out import TrashOut -from agentdrive_sdk.models.upload_abort_out import UploadAbortOut -from agentdrive_sdk.models.upload_begin_in import UploadBeginIn -from agentdrive_sdk.models.upload_begin_out import UploadBeginOut -from agentdrive_sdk.models.upload_status_out import UploadStatusOut -from agentdrive_sdk.models.usage_counter_out import UsageCounterOut -from agentdrive_sdk.models.usage_period_out import UsagePeriodOut -from agentdrive_sdk.models.user_token_list import UserTokenList -from agentdrive_sdk.models.user_token_out import UserTokenOut -from agentdrive_sdk.models.validation_error_body import ValidationErrorBody -from agentdrive_sdk.models.validation_error_detail import ValidationErrorDetail -from agentdrive_sdk.models.validation_error_response import ValidationErrorResponse -from agentdrive_sdk.models.validation_issue import ValidationIssue -from agentdrive_sdk.models.version_out import VersionOut -from agentdrive_sdk.models.version_page import VersionPage -from agentdrive_sdk.models.version_retention_out import VersionRetentionOut -from agentdrive_sdk.models.workspace_create_in import WorkspaceCreateIn -from agentdrive_sdk.models.workspace_create_out import WorkspaceCreateOut -from agentdrive_sdk.models.workspace_list import WorkspaceList -from agentdrive_sdk.models.workspace_out import WorkspaceOut -from agentdrive_sdk.models.workspace_rename_in import WorkspaceRenameIn diff --git a/sdk/python/agentdrive_sdk/models/agent_auth_metadata_out.py b/sdk/python/agentdrive_sdk/models/agent_auth_metadata_out.py deleted file mode 100644 index a86110d..0000000 --- a/sdk/python/agentdrive_sdk/models/agent_auth_metadata_out.py +++ /dev/null @@ -1,120 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from agentdrive_sdk.models.identity_assertion_metadata_out import IdentityAssertionMetadataOut -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class AgentAuthMetadataOut(BaseModel): - """ - AgentAuthMetadataOut - """ # noqa: E501 - claim_endpoint: StrictStr - events_endpoint: Optional[StrictStr] - identity_assertion: IdentityAssertionMetadataOut - identity_endpoint: StrictStr - identity_types_supported: List[StrictStr] - skill: StrictStr - spec_version: StrictStr - additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["claim_endpoint", "events_endpoint", "identity_assertion", "identity_endpoint", "identity_types_supported", "skill", "spec_version"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AgentAuthMetadataOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - * Fields in `self.additional_properties` are added to the output dict. - """ - excluded_fields: Set[str] = set([ - "additional_properties", - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of identity_assertion - if self.identity_assertion: - _dict['identity_assertion'] = self.identity_assertion.to_dict() - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - # set to None if events_endpoint (nullable) is None - # and model_fields_set contains the field - if self.events_endpoint is None and "events_endpoint" in self.model_fields_set: - _dict['events_endpoint'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AgentAuthMetadataOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "claim_endpoint": obj.get("claim_endpoint"), - "events_endpoint": obj.get("events_endpoint"), - "identity_assertion": IdentityAssertionMetadataOut.from_dict(obj["identity_assertion"]) if obj.get("identity_assertion") is not None else None, - "identity_endpoint": obj.get("identity_endpoint"), - "identity_types_supported": obj.get("identity_types_supported"), - "skill": obj.get("skill"), - "spec_version": obj.get("spec_version") - }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj diff --git a/sdk/python/agentdrive_sdk/models/anonymous_identity_response.py b/sdk/python/agentdrive_sdk/models/anonymous_identity_response.py deleted file mode 100644 index 1a2be50..0000000 --- a/sdk/python/agentdrive_sdk/models/anonymous_identity_response.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from agentdrive_sdk.models.claim_metadata import ClaimMetadata -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class AnonymousIdentityResponse(BaseModel): - """ - `POST /agent/identity` response on the anonymous path. The agent stores `identity_assertion` as its long-lived credential and uses `claim_token` to initiate the claim ceremony when the human is ready. - """ # noqa: E501 - agent_identity_id: StrictStr - claim_metadata: ClaimMetadata - claim_token: StrictStr = Field(description="Opaque server-issued secret. Present at POST /agent/identity/claim and at POST /oauth2/token (grant_type=claim).") - drive_id: StrictStr - expires_at: datetime - identity_assertion: StrictStr = Field(description="JWT signed by AgentDrive, scope=pre_claim. 30-day TTL.") - __properties: ClassVar[List[str]] = ["agent_identity_id", "claim_metadata", "claim_token", "drive_id", "expires_at", "identity_assertion"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AnonymousIdentityResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of claim_metadata - if self.claim_metadata: - _dict['claim_metadata'] = self.claim_metadata.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AnonymousIdentityResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "agent_identity_id": obj.get("agent_identity_id"), - "claim_metadata": ClaimMetadata.from_dict(obj["claim_metadata"]) if obj.get("claim_metadata") is not None else None, - "claim_token": obj.get("claim_token"), - "drive_id": obj.get("drive_id"), - "expires_at": obj.get("expires_at"), - "identity_assertion": obj.get("identity_assertion") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/artifact_delete_out.py b/sdk/python/agentdrive_sdk/models/artifact_delete_out.py deleted file mode 100644 index d1654c4..0000000 --- a/sdk/python/agentdrive_sdk/models/artifact_delete_out.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class ArtifactDeleteOut(BaseModel): - """ - DELETE /v0/artifacts/{art_id} response — the soft-delete receipt. Reversible until the GC cron hard-deletes at `purge_at`; `restore_url` points at the by-id restore endpoint (deletion-design.md §5.3). - """ # noqa: E501 - deleted_at: datetime - id: StrictStr - ok: Optional[StrictBool] = True - path: StrictStr - purge_at: datetime - restore_url: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["deleted_at", "id", "ok", "path", "purge_at", "restore_url"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ArtifactDeleteOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if restore_url (nullable) is None - # and model_fields_set contains the field - if self.restore_url is None and "restore_url" in self.model_fields_set: - _dict['restore_url'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ArtifactDeleteOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "deleted_at": obj.get("deleted_at"), - "id": obj.get("id"), - "ok": obj.get("ok") if obj.get("ok") is not None else True, - "path": obj.get("path"), - "purge_at": obj.get("purge_at"), - "restore_url": obj.get("restore_url") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/artifact_head_out.py b/sdk/python/agentdrive_sdk/models/artifact_head_out.py deleted file mode 100644 index 06a7470..0000000 --- a/sdk/python/agentdrive_sdk/models/artifact_head_out.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictInt -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class ArtifactHeadOut(BaseModel): - """ - ArtifactHeadOut - """ # noqa: E501 - version: StrictInt - __properties: ClassVar[List[str]] = ["version"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ArtifactHeadOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ArtifactHeadOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "version": obj.get("version") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/artifact_move_in.py b/sdk/python/agentdrive_sdk/models/artifact_move_in.py deleted file mode 100644 index ebcd6f7..0000000 --- a/sdk/python/agentdrive_sdk/models/artifact_move_in.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class ArtifactMoveIn(BaseModel): - """ - POST /v0/artifacts/{art_id}/move body — rename / move to a new path on the same drive. Mirrors `FolderMoveIn`; its own schema (vs. reusing another body) keeps the move surface self-documenting in the OpenAPI spec. - """ # noqa: E501 - path: StrictStr - __properties: ClassVar[List[str]] = ["path"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ArtifactMoveIn from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ArtifactMoveIn from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "path": obj.get("path") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/artifact_out.py b/sdk/python/agentdrive_sdk/models/artifact_out.py deleted file mode 100644 index 82edce2..0000000 --- a/sdk/python/agentdrive_sdk/models/artifact_out.py +++ /dev/null @@ -1,149 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from agentdrive_sdk.models.artifact_source import ArtifactSource -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class ArtifactOut(BaseModel): - """ - ArtifactOut - """ # noqa: E501 - content_type: StrictStr - created_at: datetime - drive_id: StrictStr - embedded_at: Optional[datetime] = None - etag: StrictStr - file_type: StrictStr - hash: StrictStr - id: StrictStr - indexed_at: Optional[datetime] = None - labels: Optional[List[StrictStr]] = None - llm_index: Optional[Dict[str, Any]] = None - metadata: Optional[Dict[str, Any]] = None - metageneration: Optional[StrictInt] = 1 - path: StrictStr - permalink: StrictStr - size_bytes: StrictInt - source: Optional[ArtifactSource] = None - updated_at: datetime - url: StrictStr - version_number: Optional[StrictInt] = 1 - __properties: ClassVar[List[str]] = ["content_type", "created_at", "drive_id", "embedded_at", "etag", "file_type", "hash", "id", "indexed_at", "labels", "llm_index", "metadata", "metageneration", "path", "permalink", "size_bytes", "source", "updated_at", "url", "version_number"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ArtifactOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of source - if self.source: - _dict['source'] = self.source.to_dict() - # set to None if embedded_at (nullable) is None - # and model_fields_set contains the field - if self.embedded_at is None and "embedded_at" in self.model_fields_set: - _dict['embedded_at'] = None - - # set to None if indexed_at (nullable) is None - # and model_fields_set contains the field - if self.indexed_at is None and "indexed_at" in self.model_fields_set: - _dict['indexed_at'] = None - - # set to None if llm_index (nullable) is None - # and model_fields_set contains the field - if self.llm_index is None and "llm_index" in self.model_fields_set: - _dict['llm_index'] = None - - # set to None if source (nullable) is None - # and model_fields_set contains the field - if self.source is None and "source" in self.model_fields_set: - _dict['source'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ArtifactOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "content_type": obj.get("content_type"), - "created_at": obj.get("created_at"), - "drive_id": obj.get("drive_id"), - "embedded_at": obj.get("embedded_at"), - "etag": obj.get("etag"), - "file_type": obj.get("file_type"), - "hash": obj.get("hash"), - "id": obj.get("id"), - "indexed_at": obj.get("indexed_at"), - "labels": obj.get("labels"), - "llm_index": obj.get("llm_index"), - "metadata": obj.get("metadata"), - "metageneration": obj.get("metageneration") if obj.get("metageneration") is not None else 1, - "path": obj.get("path"), - "permalink": obj.get("permalink"), - "size_bytes": obj.get("size_bytes"), - "source": ArtifactSource.from_dict(obj["source"]) if obj.get("source") is not None else None, - "updated_at": obj.get("updated_at"), - "url": obj.get("url"), - "version_number": obj.get("version_number") if obj.get("version_number") is not None else 1 - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/artifact_patch_in.py b/sdk/python/agentdrive_sdk/models/artifact_patch_in.py deleted file mode 100644 index cb07e94..0000000 --- a/sdk/python/agentdrive_sdk/models/artifact_patch_in.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from agentdrive_sdk.models.artifact_source import ArtifactSource -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class ArtifactPatchIn(BaseModel): - """ - PATCH /v0/artifacts/{art_id} body — metadata-only partial (JSON-merge-patch) update. Every field is optional. Presence is what matters, not the value: a field left out of the body (per Pydantic `model_fields_set`) is left unchanged; a field that IS present is applied — with an explicit `null` / `[]` / `{}` meaning \"clear it\". This mirrors the MCP `set_metadata` tool and the core `patch_artifact_metadata` sentinel semantics (omitted = preserve, present = replace/clear). * `labels` — replace the label set; `[]` or `null` clears it. * `metadata` — replace the free-form metadata object; `{}` or `null` clears it. * `source` — replace provenance refs; `null` (or `{\"refs\": []}`) clears them. PATCH is metadata-only: to move/rename an artifact, use `POST /v0/artifacts/{art_id}/move`. `extra=\"forbid\"` makes a stray field (notably a legacy `path`) a hard 422 rather than a silent no-op — a clean-break signal to migrate to the move verb. - """ # noqa: E501 - labels: Optional[List[StrictStr]] = None - metadata: Optional[Dict[str, Any]] = None - source: Optional[ArtifactSource] = None - additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["labels", "metadata", "source"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ArtifactPatchIn from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - * Fields in `self.additional_properties` are added to the output dict. - """ - excluded_fields: Set[str] = set([ - "additional_properties", - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of source - if self.source: - _dict['source'] = self.source.to_dict() - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - # set to None if labels (nullable) is None - # and model_fields_set contains the field - if self.labels is None and "labels" in self.model_fields_set: - _dict['labels'] = None - - # set to None if metadata (nullable) is None - # and model_fields_set contains the field - if self.metadata is None and "metadata" in self.model_fields_set: - _dict['metadata'] = None - - # set to None if source (nullable) is None - # and model_fields_set contains the field - if self.source is None and "source" in self.model_fields_set: - _dict['source'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ArtifactPatchIn from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "labels": obj.get("labels"), - "metadata": obj.get("metadata"), - "source": ArtifactSource.from_dict(obj["source"]) if obj.get("source") is not None else None - }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj diff --git a/sdk/python/agentdrive_sdk/models/artifact_source.py b/sdk/python/agentdrive_sdk/models/artifact_source.py deleted file mode 100644 index 5663f57..0000000 --- a/sdk/python/agentdrive_sdk/models/artifact_source.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional -from agentdrive_sdk.models.source_ref import SourceRef -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class ArtifactSource(BaseModel): - """ - Caller-supplied provenance metadata, attached to an artifact. v0.6 model: a list of typed refs. The legacy v0.5 fields (`agent_id`, `run_id`, `prompt_hash`) were never validated and are superseded by the `refs` shape (an agent-id ref would be `{\"type\": \"agent\", \"id\": \"...\"}` in v0.6 vocabulary). - """ # noqa: E501 - refs: Optional[List[SourceRef]] = None - __properties: ClassVar[List[str]] = ["refs"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ArtifactSource from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in refs (list) - _items = [] - if self.refs: - for _item_refs in self.refs: - if _item_refs: - _items.append(_item_refs.to_dict()) - _dict['refs'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ArtifactSource from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "refs": [SourceRef.from_dict(_item) for _item in obj["refs"]] if obj.get("refs") is not None else None - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/authorization_server_metadata_out.py b/sdk/python/agentdrive_sdk/models/authorization_server_metadata_out.py deleted file mode 100644 index 2454924..0000000 --- a/sdk/python/agentdrive_sdk/models/authorization_server_metadata_out.py +++ /dev/null @@ -1,131 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List -from agentdrive_sdk.models.agent_auth_metadata_out import AgentAuthMetadataOut -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class AuthorizationServerMetadataOut(BaseModel): - """ - AuthorizationServerMetadataOut - """ # noqa: E501 - agent_auth: AgentAuthMetadataOut - authorization_endpoint: StrictStr - authorization_response_iss_parameter_supported: StrictBool - code_challenge_methods_supported: List[StrictStr] - grant_types_supported: List[StrictStr] - issuer: StrictStr - jwks_uri: StrictStr - registration_endpoint: StrictStr - response_modes_supported: List[StrictStr] - response_types_supported: List[StrictStr] - revocation_endpoint: StrictStr - revocation_endpoint_auth_methods_supported: List[StrictStr] - scopes_supported: List[StrictStr] - token_endpoint: StrictStr - token_endpoint_auth_methods_supported: List[StrictStr] - additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["agent_auth", "authorization_endpoint", "authorization_response_iss_parameter_supported", "code_challenge_methods_supported", "grant_types_supported", "issuer", "jwks_uri", "registration_endpoint", "response_modes_supported", "response_types_supported", "revocation_endpoint", "revocation_endpoint_auth_methods_supported", "scopes_supported", "token_endpoint", "token_endpoint_auth_methods_supported"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of AuthorizationServerMetadataOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - * Fields in `self.additional_properties` are added to the output dict. - """ - excluded_fields: Set[str] = set([ - "additional_properties", - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of agent_auth - if self.agent_auth: - _dict['agent_auth'] = self.agent_auth.to_dict() - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of AuthorizationServerMetadataOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "agent_auth": AgentAuthMetadataOut.from_dict(obj["agent_auth"]) if obj.get("agent_auth") is not None else None, - "authorization_endpoint": obj.get("authorization_endpoint"), - "authorization_response_iss_parameter_supported": obj.get("authorization_response_iss_parameter_supported"), - "code_challenge_methods_supported": obj.get("code_challenge_methods_supported"), - "grant_types_supported": obj.get("grant_types_supported"), - "issuer": obj.get("issuer"), - "jwks_uri": obj.get("jwks_uri"), - "registration_endpoint": obj.get("registration_endpoint"), - "response_modes_supported": obj.get("response_modes_supported"), - "response_types_supported": obj.get("response_types_supported"), - "revocation_endpoint": obj.get("revocation_endpoint"), - "revocation_endpoint_auth_methods_supported": obj.get("revocation_endpoint_auth_methods_supported"), - "scopes_supported": obj.get("scopes_supported"), - "token_endpoint": obj.get("token_endpoint"), - "token_endpoint_auth_methods_supported": obj.get("token_endpoint_auth_methods_supported") - }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj diff --git a/sdk/python/agentdrive_sdk/models/authorize_decision_oauth2_authorize_post403_response.py b/sdk/python/agentdrive_sdk/models/authorize_decision_oauth2_authorize_post403_response.py deleted file mode 100644 index 17f3bd9..0000000 --- a/sdk/python/agentdrive_sdk/models/authorize_decision_oauth2_authorize_post403_response.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from agentdrive_sdk.models.error_response import ErrorResponse -from agentdrive_sdk.models.o_auth_protocol_error_out import OAuthProtocolErrorOut -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -AUTHORIZEDECISIONOAUTH2AUTHORIZEPOST403RESPONSE_ONE_OF_SCHEMAS = ["ErrorResponse", "OAuthProtocolErrorOut"] - -class AuthorizeDecisionOauth2AuthorizePost403Response(BaseModel): - """ - AuthorizeDecisionOauth2AuthorizePost403Response - """ - # data type: OAuthProtocolErrorOut - oneof_schema_1_validator: Optional[OAuthProtocolErrorOut] = None - # data type: ErrorResponse - oneof_schema_2_validator: Optional[ErrorResponse] = None - actual_instance: Optional[Union[ErrorResponse, OAuthProtocolErrorOut]] = None - one_of_schemas: Set[str] = { "ErrorResponse", "OAuthProtocolErrorOut" } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = AuthorizeDecisionOauth2AuthorizePost403Response.model_construct() - error_messages = [] - match = 0 - # validate data type: OAuthProtocolErrorOut - if not isinstance(v, OAuthProtocolErrorOut): - error_messages.append(f"Error! Input type `{type(v)}` is not `OAuthProtocolErrorOut`") - else: - match += 1 - # validate data type: ErrorResponse - if not isinstance(v, ErrorResponse): - error_messages.append(f"Error! Input type `{type(v)}` is not `ErrorResponse`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in AuthorizeDecisionOauth2AuthorizePost403Response with oneOf schemas: ErrorResponse, OAuthProtocolErrorOut. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in AuthorizeDecisionOauth2AuthorizePost403Response with oneOf schemas: ErrorResponse, OAuthProtocolErrorOut. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into OAuthProtocolErrorOut - try: - instance.actual_instance = OAuthProtocolErrorOut.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into ErrorResponse - try: - instance.actual_instance = ErrorResponse.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into AuthorizeDecisionOauth2AuthorizePost403Response with oneOf schemas: ErrorResponse, OAuthProtocolErrorOut. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into AuthorizeDecisionOauth2AuthorizePost403Response with oneOf schemas: ErrorResponse, OAuthProtocolErrorOut. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], ErrorResponse, OAuthProtocolErrorOut]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) diff --git a/sdk/python/agentdrive_sdk/models/claim_init_request.py b/sdk/python/agentdrive_sdk/models/claim_init_request.py deleted file mode 100644 index 6b399ad..0000000 --- a/sdk/python/agentdrive_sdk/models/claim_init_request.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class ClaimInitRequest(BaseModel): - """ - `POST /agent/identity/claim` body. - """ # noqa: E501 - claim_token: StrictStr = Field(description="The per-identity claim_token returned by POST /agent/identity.") - email: Optional[StrictStr] = Field(default=None, description="Optional hint to display on the /claim page so the human knows which account the agent expected. Not enforced (design §14 question #3).") - __properties: ClassVar[List[str]] = ["claim_token", "email"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ClaimInitRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if email (nullable) is None - # and model_fields_set contains the field - if self.email is None and "email" in self.model_fields_set: - _dict['email'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ClaimInitRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "claim_token": obj.get("claim_token"), - "email": obj.get("email") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/claim_init_response.py b/sdk/python/agentdrive_sdk/models/claim_init_response.py deleted file mode 100644 index 604f283..0000000 --- a/sdk/python/agentdrive_sdk/models/claim_init_response.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class ClaimInitResponse(BaseModel): - """ - ClaimInitResponse - """ # noqa: E501 - claim_attempt_token: StrictStr = Field(description="Per-attempt opaque token; the agent does not need to present it.") - expires_at: datetime - user_code: StrictStr = Field(description="Human-readable code the user types/sees on /claim.") - verification_uri: StrictStr = Field(description="URL to direct the human to.") - verification_uri_complete: StrictStr = Field(description="Convenience: same as `verification_uri` but with the user_code pre-baked so the human doesn't have to type it. RFC 8628 idiom.") - __properties: ClassVar[List[str]] = ["claim_attempt_token", "expires_at", "user_code", "verification_uri", "verification_uri_complete"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ClaimInitResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ClaimInitResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "claim_attempt_token": obj.get("claim_attempt_token"), - "expires_at": obj.get("expires_at"), - "user_code": obj.get("user_code"), - "verification_uri": obj.get("verification_uri"), - "verification_uri_complete": obj.get("verification_uri_complete") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/claim_metadata.py b/sdk/python/agentdrive_sdk/models/claim_metadata.py deleted file mode 100644 index d6310b6..0000000 --- a/sdk/python/agentdrive_sdk/models/claim_metadata.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class ClaimMetadata(BaseModel): - """ - Hints the agent's UI/CLI can use when initiating the claim ceremony. Decoupled from the `claim_token` itself so future additions don't change the token's shape. - """ # noqa: E501 - claim_endpoint: StrictStr - supported_email_hints: Optional[StrictBool] = True - __properties: ClassVar[List[str]] = ["claim_endpoint", "supported_email_hints"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ClaimMetadata from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ClaimMetadata from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "claim_endpoint": obj.get("claim_endpoint"), - "supported_email_hints": obj.get("supported_email_hints") if obj.get("supported_email_hints") is not None else True - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/client_registration_out.py b/sdk/python/agentdrive_sdk/models/client_registration_out.py deleted file mode 100644 index 6f5930a..0000000 --- a/sdk/python/agentdrive_sdk/models/client_registration_out.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class ClientRegistrationOut(BaseModel): - """ - ClientRegistrationOut - """ # noqa: E501 - client_id: StrictStr - client_id_issued_at: StrictInt - client_name: StrictStr - grant_types: List[StrictStr] - redirect_uris: List[StrictStr] - response_types: List[StrictStr] - scope: StrictStr - token_endpoint_auth_method: StrictStr - additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["client_id", "client_id_issued_at", "client_name", "grant_types", "redirect_uris", "response_types", "scope", "token_endpoint_auth_method"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ClientRegistrationOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - * Fields in `self.additional_properties` are added to the output dict. - """ - excluded_fields: Set[str] = set([ - "additional_properties", - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ClientRegistrationOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "client_id": obj.get("client_id"), - "client_id_issued_at": obj.get("client_id_issued_at"), - "client_name": obj.get("client_name"), - "grant_types": obj.get("grant_types"), - "redirect_uris": obj.get("redirect_uris"), - "response_types": obj.get("response_types"), - "scope": obj.get("scope"), - "token_endpoint_auth_method": obj.get("token_endpoint_auth_method") - }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj diff --git a/sdk/python/agentdrive_sdk/models/compile_diagnostic_out.py b/sdk/python/agentdrive_sdk/models/compile_diagnostic_out.py deleted file mode 100644 index a3c9bfe..0000000 --- a/sdk/python/agentdrive_sdk/models/compile_diagnostic_out.py +++ /dev/null @@ -1,129 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class CompileDiagnosticOut(BaseModel): - """ - CompileDiagnosticOut - """ # noqa: E501 - category: Optional[StrictStr] = None - file: Optional[StrictStr] = None - line: Optional[StrictInt] = None - message: StrictStr - severity: StrictStr - suggestion: Optional[StrictStr] = None - additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["category", "file", "line", "message", "severity", "suggestion"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CompileDiagnosticOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - * Fields in `self.additional_properties` are added to the output dict. - """ - excluded_fields: Set[str] = set([ - "additional_properties", - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - # set to None if category (nullable) is None - # and model_fields_set contains the field - if self.category is None and "category" in self.model_fields_set: - _dict['category'] = None - - # set to None if file (nullable) is None - # and model_fields_set contains the field - if self.file is None and "file" in self.model_fields_set: - _dict['file'] = None - - # set to None if line (nullable) is None - # and model_fields_set contains the field - if self.line is None and "line" in self.model_fields_set: - _dict['line'] = None - - # set to None if suggestion (nullable) is None - # and model_fields_set contains the field - if self.suggestion is None and "suggestion" in self.model_fields_set: - _dict['suggestion'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CompileDiagnosticOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "category": obj.get("category"), - "file": obj.get("file"), - "line": obj.get("line"), - "message": obj.get("message"), - "severity": obj.get("severity"), - "suggestion": obj.get("suggestion") - }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj diff --git a/sdk/python/agentdrive_sdk/models/compile_job_in.py b/sdk/python/agentdrive_sdk/models/compile_job_in.py deleted file mode 100644 index cc214d4..0000000 --- a/sdk/python/agentdrive_sdk/models/compile_job_in.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from agentdrive_sdk.models.compile_options import CompileOptions -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class CompileJobIn(BaseModel): - """ - CompileJobIn - """ # noqa: E501 - options: Optional[CompileOptions] = None - task: Optional[StrictStr] = 'latex.compile' - __properties: ClassVar[List[str]] = ["options", "task"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CompileJobIn from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of options - if self.options: - _dict['options'] = self.options.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CompileJobIn from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "options": CompileOptions.from_dict(obj["options"]) if obj.get("options") is not None else None, - "task": obj.get("task") if obj.get("task") is not None else 'latex.compile' - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/compile_job_list_out.py b/sdk/python/agentdrive_sdk/models/compile_job_list_out.py deleted file mode 100644 index 9eeba09..0000000 --- a/sdk/python/agentdrive_sdk/models/compile_job_list_out.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from agentdrive_sdk.models.compile_job_out import CompileJobOut -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class CompileJobListOut(BaseModel): - """ - CompileJobListOut - """ # noqa: E501 - items: List[CompileJobOut] - jobs: List[CompileJobOut] = Field(description="Deprecated same-value alias for `items`; retained for compatibility.") - next_cursor: Optional[StrictStr] = Field(default=None, description="Opaque continuation token, or null when the listing is complete.") - __properties: ClassVar[List[str]] = ["items", "jobs", "next_cursor"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CompileJobListOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in items (list) - _items = [] - if self.items: - for _item_items in self.items: - if _item_items: - _items.append(_item_items.to_dict()) - _dict['items'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in jobs (list) - _items = [] - if self.jobs: - for _item_jobs in self.jobs: - if _item_jobs: - _items.append(_item_jobs.to_dict()) - _dict['jobs'] = _items - # set to None if next_cursor (nullable) is None - # and model_fields_set contains the field - if self.next_cursor is None and "next_cursor" in self.model_fields_set: - _dict['next_cursor'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CompileJobListOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "items": [CompileJobOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, - "jobs": [CompileJobOut.from_dict(_item) for _item in obj["jobs"]] if obj.get("jobs") is not None else None, - "next_cursor": obj.get("next_cursor") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/compile_job_out.py b/sdk/python/agentdrive_sdk/models/compile_job_out.py deleted file mode 100644 index 0f8167b..0000000 --- a/sdk/python/agentdrive_sdk/models/compile_job_out.py +++ /dev/null @@ -1,138 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from agentdrive_sdk.models.compile_diagnostic_out import CompileDiagnosticOut -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class CompileJobOut(BaseModel): - """ - CompileJobOut - """ # noqa: E501 - cache_hit: StrictBool - diagnostics: Optional[List[CompileDiagnosticOut]] = None - duration_ms: Optional[StrictInt] = None - engine: StrictStr - job_id: StrictStr - logs_url: Optional[StrictStr] = None - output: Optional[Dict[str, Any]] = None - status: StrictStr - task: StrictStr - additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["cache_hit", "diagnostics", "duration_ms", "engine", "job_id", "logs_url", "output", "status", "task"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CompileJobOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - * Fields in `self.additional_properties` are added to the output dict. - """ - excluded_fields: Set[str] = set([ - "additional_properties", - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in diagnostics (list) - _items = [] - if self.diagnostics: - for _item_diagnostics in self.diagnostics: - if _item_diagnostics: - _items.append(_item_diagnostics.to_dict()) - _dict['diagnostics'] = _items - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - # set to None if duration_ms (nullable) is None - # and model_fields_set contains the field - if self.duration_ms is None and "duration_ms" in self.model_fields_set: - _dict['duration_ms'] = None - - # set to None if logs_url (nullable) is None - # and model_fields_set contains the field - if self.logs_url is None and "logs_url" in self.model_fields_set: - _dict['logs_url'] = None - - # set to None if output (nullable) is None - # and model_fields_set contains the field - if self.output is None and "output" in self.model_fields_set: - _dict['output'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CompileJobOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "cache_hit": obj.get("cache_hit"), - "diagnostics": [CompileDiagnosticOut.from_dict(_item) for _item in obj["diagnostics"]] if obj.get("diagnostics") is not None else None, - "duration_ms": obj.get("duration_ms"), - "engine": obj.get("engine"), - "job_id": obj.get("job_id"), - "logs_url": obj.get("logs_url"), - "output": obj.get("output"), - "status": obj.get("status"), - "task": obj.get("task") - }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj diff --git a/sdk/python/agentdrive_sdk/models/compile_options.py b/sdk/python/agentdrive_sdk/models/compile_options.py deleted file mode 100644 index 86bf3b3..0000000 --- a/sdk/python/agentdrive_sdk/models/compile_options.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class CompileOptions(BaseModel): - """ - CompileOptions - """ # noqa: E501 - engine: Optional[StrictStr] = None - entrypoint: Optional[StrictStr] = None - wait: Optional[StrictBool] = False - __properties: ClassVar[List[str]] = ["engine", "entrypoint", "wait"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CompileOptions from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if engine (nullable) is None - # and model_fields_set contains the field - if self.engine is None and "engine" in self.model_fields_set: - _dict['engine'] = None - - # set to None if entrypoint (nullable) is None - # and model_fields_set contains the field - if self.entrypoint is None and "entrypoint" in self.model_fields_set: - _dict['entrypoint'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CompileOptions from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "engine": obj.get("engine"), - "entrypoint": obj.get("entrypoint"), - "wait": obj.get("wait") if obj.get("wait") is not None else False - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/compile_project_out.py b/sdk/python/agentdrive_sdk/models/compile_project_out.py deleted file mode 100644 index f5c5279..0000000 --- a/sdk/python/agentdrive_sdk/models/compile_project_out.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class CompileProjectOut(BaseModel): - """ - CompileProjectOut - """ # noqa: E501 - auto_compile: StrictBool - engine: StrictStr - entrypoint: StrictStr - fld_id: StrictStr - __properties: ClassVar[List[str]] = ["auto_compile", "engine", "entrypoint", "fld_id"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CompileProjectOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CompileProjectOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "auto_compile": obj.get("auto_compile"), - "engine": obj.get("engine"), - "entrypoint": obj.get("entrypoint"), - "fld_id": obj.get("fld_id") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/copy_in.py b/sdk/python/agentdrive_sdk/models/copy_in.py deleted file mode 100644 index 41435ea..0000000 --- a/sdk/python/agentdrive_sdk/models/copy_in.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from agentdrive_sdk.models.artifact_source import ArtifactSource -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class CopyIn(BaseModel): - """ - POST /v0/artifacts/{art_id}/copy body — duplicate to new path. - """ # noqa: E501 - from_generation: Optional[StrictInt] = None - path: StrictStr - source: Optional[ArtifactSource] = None - __properties: ClassVar[List[str]] = ["from_generation", "path", "source"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CopyIn from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of source - if self.source: - _dict['source'] = self.source.to_dict() - # set to None if from_generation (nullable) is None - # and model_fields_set contains the field - if self.from_generation is None and "from_generation" in self.model_fields_set: - _dict['from_generation'] = None - - # set to None if source (nullable) is None - # and model_fields_set contains the field - if self.source is None and "source" in self.model_fields_set: - _dict['source'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CopyIn from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "from_generation": obj.get("from_generation"), - "path": obj.get("path"), - "source": ArtifactSource.from_dict(obj["source"]) if obj.get("source") is not None else None - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/dataset_description_out.py b/sdk/python/agentdrive_sdk/models/dataset_description_out.py deleted file mode 100644 index 59bc7f7..0000000 --- a/sdk/python/agentdrive_sdk/models/dataset_description_out.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List -from agentdrive_sdk.models.query_column_out import QueryColumnOut -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class DatasetDescriptionOut(BaseModel): - """ - DatasetDescriptionOut - """ # noqa: E501 - columns: List[QueryColumnOut] - dataset: StrictStr - __properties: ClassVar[List[str]] = ["columns", "dataset"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DatasetDescriptionOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in columns (list) - _items = [] - if self.columns: - for _item_columns in self.columns: - if _item_columns: - _items.append(_item_columns.to_dict()) - _dict['columns'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DatasetDescriptionOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "columns": [QueryColumnOut.from_dict(_item) for _item in obj["columns"]] if obj.get("columns") is not None else None, - "dataset": obj.get("dataset") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/describe_in.py b/sdk/python/agentdrive_sdk/models/describe_in.py deleted file mode 100644 index f5faf84..0000000 --- a/sdk/python/agentdrive_sdk/models/describe_in.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class DescribeIn(BaseModel): - """ - DescribeIn - """ # noqa: E501 - dataset: StrictStr - __properties: ClassVar[List[str]] = ["dataset"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DescribeIn from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DescribeIn from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "dataset": obj.get("dataset") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/download_url_out.py b/sdk/python/agentdrive_sdk/models/download_url_out.py deleted file mode 100644 index dc07ec5..0000000 --- a/sdk/python/agentdrive_sdk/models/download_url_out.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class DownloadUrlOut(BaseModel): - """ - A URL the caller can GET to fetch the artifact's bytes. `direct=True` ⇒ a short-lived signed GCS URL on `storage.googleapis.com` (client downloads straight from GCS; `expires_at` is set). `direct=False` ⇒ the proxy `/download` endpoint on the API host (no expiry) — returned for sub-threshold artifacts or when signing is unavailable. The URL is opaque: callers should not parse it. See large-download-design.md §5.1. - """ # noqa: E501 - content_type: StrictStr - direct: StrictBool - download_url: StrictStr - expires_at: Optional[datetime] = None - filename: StrictStr - size_bytes: StrictInt - __properties: ClassVar[List[str]] = ["content_type", "direct", "download_url", "expires_at", "filename", "size_bytes"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DownloadUrlOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if expires_at (nullable) is None - # and model_fields_set contains the field - if self.expires_at is None and "expires_at" in self.model_fields_set: - _dict['expires_at'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DownloadUrlOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "content_type": obj.get("content_type"), - "direct": obj.get("direct"), - "download_url": obj.get("download_url"), - "expires_at": obj.get("expires_at"), - "filename": obj.get("filename"), - "size_bytes": obj.get("size_bytes") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/drive_api_key_create_in.py b/sdk/python/agentdrive_sdk/models/drive_api_key_create_in.py deleted file mode 100644 index 072806b..0000000 --- a/sdk/python/agentdrive_sdk/models/drive_api_key_create_in.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class DriveApiKeyCreateIn(BaseModel): - """ - `POST /v0/drives/{id}/keys` body — a required human label (a name for the key, e.g. the agent/integration it's for). - """ # noqa: E501 - label: Annotated[str, Field(min_length=1, strict=True, max_length=80)] - __properties: ClassVar[List[str]] = ["label"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DriveApiKeyCreateIn from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DriveApiKeyCreateIn from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "label": obj.get("label") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/drive_api_key_create_out.py b/sdk/python/agentdrive_sdk/models/drive_api_key_create_out.py deleted file mode 100644 index a258bc7..0000000 --- a/sdk/python/agentdrive_sdk/models/drive_api_key_create_out.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class DriveApiKeyCreateOut(BaseModel): - """ - `POST /v0/drives/{id}/keys` response — the new key's metadata PLUS the raw `ad_live_` value, returned **once**. Store `api_key` now; only its hash is persisted. - """ # noqa: E501 - api_key: StrictStr - created_at: datetime - id: StrictStr - label: Optional[StrictStr] = None - prefix: StrictStr - __properties: ClassVar[List[str]] = ["api_key", "created_at", "id", "label", "prefix"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DriveApiKeyCreateOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if label (nullable) is None - # and model_fields_set contains the field - if self.label is None and "label" in self.model_fields_set: - _dict['label'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DriveApiKeyCreateOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "api_key": obj.get("api_key"), - "created_at": obj.get("created_at"), - "id": obj.get("id"), - "label": obj.get("label"), - "prefix": obj.get("prefix") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/drive_api_key_list_out.py b/sdk/python/agentdrive_sdk/models/drive_api_key_list_out.py deleted file mode 100644 index ea70079..0000000 --- a/sdk/python/agentdrive_sdk/models/drive_api_key_list_out.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from agentdrive_sdk.models.drive_api_key_out import DriveApiKeyOut -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class DriveApiKeyListOut(BaseModel): - """ - `GET /v0/drives/{id}/keys` response — the drive's keys, oldest first (keyset order, design §3), including recently-revoked rows (filter on `revoked_at` for live only). `items` is the canonical list field (B-3: one envelope key everywhere); `keys` is a deprecated same-value alias kept for one release — the REST twin of the grep `matches` / compile `jobs` aliases. - """ # noqa: E501 - items: List[DriveApiKeyOut] - keys: List[DriveApiKeyOut] - next_cursor: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["items", "keys", "next_cursor"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DriveApiKeyListOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in items (list) - _items = [] - if self.items: - for _item_items in self.items: - if _item_items: - _items.append(_item_items.to_dict()) - _dict['items'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in keys (list) - _items = [] - if self.keys: - for _item_keys in self.keys: - if _item_keys: - _items.append(_item_keys.to_dict()) - _dict['keys'] = _items - # set to None if next_cursor (nullable) is None - # and model_fields_set contains the field - if self.next_cursor is None and "next_cursor" in self.model_fields_set: - _dict['next_cursor'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DriveApiKeyListOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "items": [DriveApiKeyOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, - "keys": [DriveApiKeyOut.from_dict(_item) for _item in obj["keys"]] if obj.get("keys") is not None else None, - "next_cursor": obj.get("next_cursor") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/drive_api_key_out.py b/sdk/python/agentdrive_sdk/models/drive_api_key_out.py deleted file mode 100644 index 0805ae7..0000000 --- a/sdk/python/agentdrive_sdk/models/drive_api_key_out.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class DriveApiKeyOut(BaseModel): - """ - One per-drive `ad_live_` key — metadata only (never the raw key or hash). Item shape for `GET /v0/drives/{id}/keys`. - """ # noqa: E501 - created_at: datetime - id: StrictStr - label: Optional[StrictStr] = None - last_used_at: Optional[datetime] = None - prefix: StrictStr - revoked_at: Optional[datetime] = None - __properties: ClassVar[List[str]] = ["created_at", "id", "label", "last_used_at", "prefix", "revoked_at"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DriveApiKeyOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if label (nullable) is None - # and model_fields_set contains the field - if self.label is None and "label" in self.model_fields_set: - _dict['label'] = None - - # set to None if last_used_at (nullable) is None - # and model_fields_set contains the field - if self.last_used_at is None and "last_used_at" in self.model_fields_set: - _dict['last_used_at'] = None - - # set to None if revoked_at (nullable) is None - # and model_fields_set contains the field - if self.revoked_at is None and "revoked_at" in self.model_fields_set: - _dict['revoked_at'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DriveApiKeyOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "created_at": obj.get("created_at"), - "id": obj.get("id"), - "label": obj.get("label"), - "last_used_at": obj.get("last_used_at"), - "prefix": obj.get("prefix"), - "revoked_at": obj.get("revoked_at") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/drive_create_in.py b/sdk/python/agentdrive_sdk/models/drive_create_in.py deleted file mode 100644 index 7ac1a9b..0000000 --- a/sdk/python/agentdrive_sdk/models/drive_create_in.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class DriveCreateIn(BaseModel): - """ - POST /v0/drives body. `name` is the user-facing drive label; the creator becomes the owner. - """ # noqa: E501 - name: Annotated[str, Field(min_length=1, strict=True, max_length=120)] - __properties: ClassVar[List[str]] = ["name"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DriveCreateIn from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DriveCreateIn from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/drive_create_out.py b/sdk/python/agentdrive_sdk/models/drive_create_out.py deleted file mode 100644 index baccd82..0000000 --- a/sdk/python/agentdrive_sdk/models/drive_create_out.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class DriveCreateOut(BaseModel): - """ - The create response — the ONLY place (besides key-rotate) a raw `ad_live_` key is returned, reveal-once. - """ # noqa: E501 - api_key: StrictStr - created_at: datetime - id: StrictStr - name: StrictStr - organization_id: StrictStr - owner_email: Optional[StrictStr] = None - owner_user_id: Optional[StrictStr] = None - storage_bytes: StrictInt - __properties: ClassVar[List[str]] = ["api_key", "created_at", "id", "name", "organization_id", "owner_email", "owner_user_id", "storage_bytes"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DriveCreateOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if owner_email (nullable) is None - # and model_fields_set contains the field - if self.owner_email is None and "owner_email" in self.model_fields_set: - _dict['owner_email'] = None - - # set to None if owner_user_id (nullable) is None - # and model_fields_set contains the field - if self.owner_user_id is None and "owner_user_id" in self.model_fields_set: - _dict['owner_user_id'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DriveCreateOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "api_key": obj.get("api_key"), - "created_at": obj.get("created_at"), - "id": obj.get("id"), - "name": obj.get("name"), - "organization_id": obj.get("organization_id"), - "owner_email": obj.get("owner_email"), - "owner_user_id": obj.get("owner_user_id"), - "storage_bytes": obj.get("storage_bytes") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/drive_delete_out.py b/sdk/python/agentdrive_sdk/models/drive_delete_out.py deleted file mode 100644 index 5d7ffc5..0000000 --- a/sdk/python/agentdrive_sdk/models/drive_delete_out.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class DriveDeleteOut(BaseModel): - """ - DELETE /v0/drives/{drive_id} response — the drive soft-delete receipt. Reversible until the GC cron hard-deletes at `purge_at`; `restore_url` points at the drive restore endpoint (deletion-design.md §5.2). - """ # noqa: E501 - deleted_at: datetime - id: StrictStr - ok: Optional[StrictBool] = True - purge_at: datetime - restore_url: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["deleted_at", "id", "ok", "purge_at", "restore_url"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DriveDeleteOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if restore_url (nullable) is None - # and model_fields_set contains the field - if self.restore_url is None and "restore_url" in self.model_fields_set: - _dict['restore_url'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DriveDeleteOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "deleted_at": obj.get("deleted_at"), - "id": obj.get("id"), - "ok": obj.get("ok") if obj.get("ok") is not None else True, - "purge_at": obj.get("purge_at"), - "restore_url": obj.get("restore_url") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/drive_list.py b/sdk/python/agentdrive_sdk/models/drive_list.py deleted file mode 100644 index 07a3b96..0000000 --- a/sdk/python/agentdrive_sdk/models/drive_list.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from agentdrive_sdk.models.drive_out import DriveOut -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class DriveList(BaseModel): - """ - DriveList - """ # noqa: E501 - items: List[DriveOut] - next_cursor: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["items", "next_cursor"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DriveList from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in items (list) - _items = [] - if self.items: - for _item_items in self.items: - if _item_items: - _items.append(_item_items.to_dict()) - _dict['items'] = _items - # set to None if next_cursor (nullable) is None - # and model_fields_set contains the field - if self.next_cursor is None and "next_cursor" in self.model_fields_set: - _dict['next_cursor'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DriveList from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "items": [DriveOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, - "next_cursor": obj.get("next_cursor") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/drive_out.py b/sdk/python/agentdrive_sdk/models/drive_out.py deleted file mode 100644 index 04ea2b0..0000000 --- a/sdk/python/agentdrive_sdk/models/drive_out.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class DriveOut(BaseModel): - """ - One drive in a listing — metadata only (workspaces-design §4.2). Carries NO capability and NEVER a raw key. An admin's inventory and a member's owned list both serialize to this shape; `owner_email` is the only owner-identifying field surfaced. - """ # noqa: E501 - created_at: datetime - id: StrictStr - name: StrictStr - organization_id: StrictStr - owner_email: Optional[StrictStr] = None - owner_user_id: Optional[StrictStr] = None - storage_bytes: StrictInt - __properties: ClassVar[List[str]] = ["created_at", "id", "name", "organization_id", "owner_email", "owner_user_id", "storage_bytes"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DriveOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if owner_email (nullable) is None - # and model_fields_set contains the field - if self.owner_email is None and "owner_email" in self.model_fields_set: - _dict['owner_email'] = None - - # set to None if owner_user_id (nullable) is None - # and model_fields_set contains the field - if self.owner_user_id is None and "owner_user_id" in self.model_fields_set: - _dict['owner_user_id'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DriveOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "created_at": obj.get("created_at"), - "id": obj.get("id"), - "name": obj.get("name"), - "organization_id": obj.get("organization_id"), - "owner_email": obj.get("owner_email"), - "owner_user_id": obj.get("owner_user_id"), - "storage_bytes": obj.get("storage_bytes") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/drive_read_out.py b/sdk/python/agentdrive_sdk/models/drive_read_out.py deleted file mode 100644 index cefa113..0000000 --- a/sdk/python/agentdrive_sdk/models/drive_read_out.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class DriveReadOut(BaseModel): - """ - Drive singleton shape returned by both data-plane read routes. - """ # noqa: E501 - created_at: datetime - email: Optional[StrictStr] = None - etag: StrictStr - id: StrictStr - metageneration: StrictInt - organization_id: StrictStr - storage_bytes: StrictInt - storage_limit: StrictInt - __properties: ClassVar[List[str]] = ["created_at", "email", "etag", "id", "metageneration", "organization_id", "storage_bytes", "storage_limit"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DriveReadOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if email (nullable) is None - # and model_fields_set contains the field - if self.email is None and "email" in self.model_fields_set: - _dict['email'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DriveReadOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "created_at": obj.get("created_at"), - "email": obj.get("email"), - "etag": obj.get("etag"), - "id": obj.get("id"), - "metageneration": obj.get("metageneration"), - "organization_id": obj.get("organization_id"), - "storage_bytes": obj.get("storage_bytes"), - "storage_limit": obj.get("storage_limit") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/drive_rename_in.py b/sdk/python/agentdrive_sdk/models/drive_rename_in.py deleted file mode 100644 index 989e699..0000000 --- a/sdk/python/agentdrive_sdk/models/drive_rename_in.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class DriveRenameIn(BaseModel): - """ - PATCH /v0/drives/{id} body — rename a drive the caller owns. - """ # noqa: E501 - name: Annotated[str, Field(min_length=1, strict=True, max_length=120)] - __properties: ClassVar[List[str]] = ["name"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DriveRenameIn from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DriveRenameIn from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/drive_restore_out.py b/sdk/python/agentdrive_sdk/models/drive_restore_out.py deleted file mode 100644 index 6d1ec51..0000000 --- a/sdk/python/agentdrive_sdk/models/drive_restore_out.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class DriveRestoreOut(BaseModel): - """ - DriveRestoreOut - """ # noqa: E501 - id: StrictStr - rebased_artifact_count: StrictInt - restored_at: datetime - __properties: ClassVar[List[str]] = ["id", "rebased_artifact_count", "restored_at"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DriveRestoreOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DriveRestoreOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "rebased_artifact_count": obj.get("rebased_artifact_count"), - "restored_at": obj.get("restored_at") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/drive_usage_out.py b/sdk/python/agentdrive_sdk/models/drive_usage_out.py deleted file mode 100644 index 5922166..0000000 --- a/sdk/python/agentdrive_sdk/models/drive_usage_out.py +++ /dev/null @@ -1,162 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List, Optional -from agentdrive_sdk.models.hourly_usage_counter_out import HourlyUsageCounterOut -from agentdrive_sdk.models.operation_usage_out import OperationUsageOut -from agentdrive_sdk.models.storage_breakdown_out import StorageBreakdownOut -from agentdrive_sdk.models.storage_footprint_out import StorageFootprintOut -from agentdrive_sdk.models.token_usage_out import TokenUsageOut -from agentdrive_sdk.models.usage_counter_out import UsageCounterOut -from agentdrive_sdk.models.usage_period_out import UsagePeriodOut -from agentdrive_sdk.models.version_retention_out import VersionRetentionOut -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class DriveUsageOut(BaseModel): - """ - DriveUsageOut - """ # noqa: E501 - account_footprint: StorageFootprintOut - egress_bytes: UsageCounterOut - footprint: StorageFootprintOut - indexed_bytes: UsageCounterOut - indexing_ops: UsageCounterOut - ops_this_month: OperationUsageOut - period: UsagePeriodOut - retrieval_queries: UsageCounterOut - storage: UsageCounterOut - storage_breakdown: Optional[StorageBreakdownOut] = None - tokens_this_month: TokenUsageOut - version_retention: VersionRetentionOut - writes_this_hour: HourlyUsageCounterOut - __properties: ClassVar[List[str]] = ["account_footprint", "egress_bytes", "footprint", "indexed_bytes", "indexing_ops", "ops_this_month", "period", "retrieval_queries", "storage", "storage_breakdown", "tokens_this_month", "version_retention", "writes_this_hour"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of DriveUsageOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of account_footprint - if self.account_footprint: - _dict['account_footprint'] = self.account_footprint.to_dict() - # override the default output from pydantic by calling `to_dict()` of egress_bytes - if self.egress_bytes: - _dict['egress_bytes'] = self.egress_bytes.to_dict() - # override the default output from pydantic by calling `to_dict()` of footprint - if self.footprint: - _dict['footprint'] = self.footprint.to_dict() - # override the default output from pydantic by calling `to_dict()` of indexed_bytes - if self.indexed_bytes: - _dict['indexed_bytes'] = self.indexed_bytes.to_dict() - # override the default output from pydantic by calling `to_dict()` of indexing_ops - if self.indexing_ops: - _dict['indexing_ops'] = self.indexing_ops.to_dict() - # override the default output from pydantic by calling `to_dict()` of ops_this_month - if self.ops_this_month: - _dict['ops_this_month'] = self.ops_this_month.to_dict() - # override the default output from pydantic by calling `to_dict()` of period - if self.period: - _dict['period'] = self.period.to_dict() - # override the default output from pydantic by calling `to_dict()` of retrieval_queries - if self.retrieval_queries: - _dict['retrieval_queries'] = self.retrieval_queries.to_dict() - # override the default output from pydantic by calling `to_dict()` of storage - if self.storage: - _dict['storage'] = self.storage.to_dict() - # override the default output from pydantic by calling `to_dict()` of storage_breakdown - if self.storage_breakdown: - _dict['storage_breakdown'] = self.storage_breakdown.to_dict() - # override the default output from pydantic by calling `to_dict()` of tokens_this_month - if self.tokens_this_month: - _dict['tokens_this_month'] = self.tokens_this_month.to_dict() - # override the default output from pydantic by calling `to_dict()` of version_retention - if self.version_retention: - _dict['version_retention'] = self.version_retention.to_dict() - # override the default output from pydantic by calling `to_dict()` of writes_this_hour - if self.writes_this_hour: - _dict['writes_this_hour'] = self.writes_this_hour.to_dict() - # set to None if storage_breakdown (nullable) is None - # and model_fields_set contains the field - if self.storage_breakdown is None and "storage_breakdown" in self.model_fields_set: - _dict['storage_breakdown'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of DriveUsageOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "account_footprint": StorageFootprintOut.from_dict(obj["account_footprint"]) if obj.get("account_footprint") is not None else None, - "egress_bytes": UsageCounterOut.from_dict(obj["egress_bytes"]) if obj.get("egress_bytes") is not None else None, - "footprint": StorageFootprintOut.from_dict(obj["footprint"]) if obj.get("footprint") is not None else None, - "indexed_bytes": UsageCounterOut.from_dict(obj["indexed_bytes"]) if obj.get("indexed_bytes") is not None else None, - "indexing_ops": UsageCounterOut.from_dict(obj["indexing_ops"]) if obj.get("indexing_ops") is not None else None, - "ops_this_month": OperationUsageOut.from_dict(obj["ops_this_month"]) if obj.get("ops_this_month") is not None else None, - "period": UsagePeriodOut.from_dict(obj["period"]) if obj.get("period") is not None else None, - "retrieval_queries": UsageCounterOut.from_dict(obj["retrieval_queries"]) if obj.get("retrieval_queries") is not None else None, - "storage": UsageCounterOut.from_dict(obj["storage"]) if obj.get("storage") is not None else None, - "storage_breakdown": StorageBreakdownOut.from_dict(obj["storage_breakdown"]) if obj.get("storage_breakdown") is not None else None, - "tokens_this_month": TokenUsageOut.from_dict(obj["tokens_this_month"]) if obj.get("tokens_this_month") is not None else None, - "version_retention": VersionRetentionOut.from_dict(obj["version_retention"]) if obj.get("version_retention") is not None else None, - "writes_this_hour": HourlyUsageCounterOut.from_dict(obj["writes_this_hour"]) if obj.get("writes_this_hour") is not None else None - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/error_body.py b/sdk/python/agentdrive_sdk/models/error_body.py deleted file mode 100644 index 418168a..0000000 --- a/sdk/python/agentdrive_sdk/models/error_body.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class ErrorBody(BaseModel): - """ - Machine-readable API error. Error-code-specific context (for example `limit`, `current_etag`, or `retry_after_s`) is intentionally additive. - """ # noqa: E501 - code: StrictStr - message: StrictStr - additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["code", "message"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ErrorBody from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - * Fields in `self.additional_properties` are added to the output dict. - """ - excluded_fields: Set[str] = set([ - "additional_properties", - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ErrorBody from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "code": obj.get("code"), - "message": obj.get("message") - }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj diff --git a/sdk/python/agentdrive_sdk/models/error_detail.py b/sdk/python/agentdrive_sdk/models/error_detail.py deleted file mode 100644 index 9f5876c..0000000 --- a/sdk/python/agentdrive_sdk/models/error_detail.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from agentdrive_sdk.models.error_body import ErrorBody -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class ErrorDetail(BaseModel): - """ - ErrorDetail - """ # noqa: E501 - error: ErrorBody - additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["error"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ErrorDetail from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - * Fields in `self.additional_properties` are added to the output dict. - """ - excluded_fields: Set[str] = set([ - "additional_properties", - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of error - if self.error: - _dict['error'] = self.error.to_dict() - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ErrorDetail from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "error": ErrorBody.from_dict(obj["error"]) if obj.get("error") is not None else None - }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj diff --git a/sdk/python/agentdrive_sdk/models/error_response.py b/sdk/python/agentdrive_sdk/models/error_response.py deleted file mode 100644 index dcde2d0..0000000 --- a/sdk/python/agentdrive_sdk/models/error_response.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from agentdrive_sdk.models.error_detail import ErrorDetail -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class ErrorResponse(BaseModel): - """ - Canonical non-validation error envelope emitted by AgentDrive. - """ # noqa: E501 - detail: ErrorDetail - additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["detail"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ErrorResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - * Fields in `self.additional_properties` are added to the output dict. - """ - excluded_fields: Set[str] = set([ - "additional_properties", - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of detail - if self.detail: - _dict['detail'] = self.detail.to_dict() - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ErrorResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "detail": ErrorDetail.from_dict(obj["detail"]) if obj.get("detail") is not None else None - }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj diff --git a/sdk/python/agentdrive_sdk/models/event_out.py b/sdk/python/agentdrive_sdk/models/event_out.py deleted file mode 100644 index 605d25b..0000000 --- a/sdk/python/agentdrive_sdk/models/event_out.py +++ /dev/null @@ -1,110 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class EventOut(BaseModel): - """ - EventOut - """ # noqa: E501 - action: StrictStr - actor_name: Optional[Annotated[str, Field(strict=True, max_length=64)]] = None - art_id: Optional[StrictStr] = None - created_at: datetime - drive_id: StrictStr - id: StrictStr - metadata: Optional[Dict[str, Any]] = None - __properties: ClassVar[List[str]] = ["action", "actor_name", "art_id", "created_at", "drive_id", "id", "metadata"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of EventOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if actor_name (nullable) is None - # and model_fields_set contains the field - if self.actor_name is None and "actor_name" in self.model_fields_set: - _dict['actor_name'] = None - - # set to None if art_id (nullable) is None - # and model_fields_set contains the field - if self.art_id is None and "art_id" in self.model_fields_set: - _dict['art_id'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of EventOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "action": obj.get("action"), - "actor_name": obj.get("actor_name"), - "art_id": obj.get("art_id"), - "created_at": obj.get("created_at"), - "drive_id": obj.get("drive_id"), - "id": obj.get("id"), - "metadata": obj.get("metadata") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/event_page.py b/sdk/python/agentdrive_sdk/models/event_page.py deleted file mode 100644 index 66ac46a..0000000 --- a/sdk/python/agentdrive_sdk/models/event_page.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from agentdrive_sdk.models.event_out import EventOut -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class EventPage(BaseModel): - """ - EventPage - """ # noqa: E501 - items: List[EventOut] - next_cursor: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["items", "next_cursor"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of EventPage from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in items (list) - _items = [] - if self.items: - for _item_items in self.items: - if _item_items: - _items.append(_item_items.to_dict()) - _dict['items'] = _items - # set to None if next_cursor (nullable) is None - # and model_fields_set contains the field - if self.next_cursor is None and "next_cursor" in self.model_fields_set: - _dict['next_cursor'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of EventPage from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "items": [EventOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, - "next_cursor": obj.get("next_cursor") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/extension_exchange_request.py b/sdk/python/agentdrive_sdk/models/extension_exchange_request.py deleted file mode 100644 index e36c4e3..0000000 --- a/sdk/python/agentdrive_sdk/models/extension_exchange_request.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class ExtensionExchangeRequest(BaseModel): - """ - Single-use ticket → JWT pair. Called by `auth-complete.html` inside the SnipIt extension. No `Authorization` header — the ticket itself is the credential. - """ # noqa: E501 - ext_id: StrictStr = Field(description="The extension's ID (Chrome Web Store ID or unpacked dev ID).") - ticket: StrictStr = Field(description="The opaque ticket from the /auth/callback handoff.") - __properties: ClassVar[List[str]] = ["ext_id", "ticket"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ExtensionExchangeRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ExtensionExchangeRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "ext_id": obj.get("ext_id"), - "ticket": obj.get("ticket") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/extension_exchange_response.py b/sdk/python/agentdrive_sdk/models/extension_exchange_response.py deleted file mode 100644 index 1af118a..0000000 --- a/sdk/python/agentdrive_sdk/models/extension_exchange_response.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class ExtensionExchangeResponse(BaseModel): - """ - ExtensionExchangeResponse - """ # noqa: E501 - access_token: StrictStr = Field(description="15-minute access_token (scope=extension).") - drive_id: StrictStr = Field(description="The drive these credentials are scoped to.") - expires_in: StrictInt = Field(description="Seconds until access_token expiry.") - identity_assertion: StrictStr = Field(description="90-day identity_assertion. Refresh via POST /oauth2/token.") - scope: Optional[StrictStr] = 'extension' - token_type: Optional[StrictStr] = 'Bearer' - __properties: ClassVar[List[str]] = ["access_token", "drive_id", "expires_in", "identity_assertion", "scope", "token_type"] - - @field_validator('scope') - def scope_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['extension']): - raise ValueError("must be one of enum values ('extension')") - return value - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ExtensionExchangeResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ExtensionExchangeResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "access_token": obj.get("access_token"), - "drive_id": obj.get("drive_id"), - "expires_in": obj.get("expires_in"), - "identity_assertion": obj.get("identity_assertion"), - "scope": obj.get("scope") if obj.get("scope") is not None else 'extension', - "token_type": obj.get("token_type") if obj.get("token_type") is not None else 'Bearer' - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/feedback_create_out.py b/sdk/python/agentdrive_sdk/models/feedback_create_out.py deleted file mode 100644 index 93b803a..0000000 --- a/sdk/python/agentdrive_sdk/models/feedback_create_out.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class FeedbackCreateOut(BaseModel): - """ - FeedbackCreateOut - """ # noqa: E501 - contact: StrictBool - id: StrictStr - note: Optional[StrictStr] = None - status: StrictStr - __properties: ClassVar[List[str]] = ["contact", "id", "note", "status"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of FeedbackCreateOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if note (nullable) is None - # and model_fields_set contains the field - if self.note is None and "note" in self.model_fields_set: - _dict['note'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FeedbackCreateOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "contact": obj.get("contact"), - "id": obj.get("id"), - "note": obj.get("note"), - "status": obj.get("status") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/feedback_status_out.py b/sdk/python/agentdrive_sdk/models/feedback_status_out.py deleted file mode 100644 index 4e06e5b..0000000 --- a/sdk/python/agentdrive_sdk/models/feedback_status_out.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class FeedbackStatusOut(BaseModel): - """ - GET /v0/feedback/{fbk_id} response — lifecycle status of feedback THIS drive filed. - """ # noqa: E501 - contact: StrictBool - created_at: datetime - duplicate_of: Optional[StrictStr] = None - id: StrictStr - kind: StrictStr - status: StrictStr - status_changed_at: datetime - title: StrictStr - __properties: ClassVar[List[str]] = ["contact", "created_at", "duplicate_of", "id", "kind", "status", "status_changed_at", "title"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of FeedbackStatusOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if duplicate_of (nullable) is None - # and model_fields_set contains the field - if self.duplicate_of is None and "duplicate_of" in self.model_fields_set: - _dict['duplicate_of'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FeedbackStatusOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "contact": obj.get("contact"), - "created_at": obj.get("created_at"), - "duplicate_of": obj.get("duplicate_of"), - "id": obj.get("id"), - "kind": obj.get("kind"), - "status": obj.get("status"), - "status_changed_at": obj.get("status_changed_at"), - "title": obj.get("title") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/find_hit_out.py b/sdk/python/agentdrive_sdk/models/find_hit_out.py deleted file mode 100644 index 511c231..0000000 --- a/sdk/python/agentdrive_sdk/models/find_hit_out.py +++ /dev/null @@ -1,176 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class FindHitOut(BaseModel): - """ - One passage-level hit from `/v0/find` (hybrid chunk RAG over `embed_chunks`). The unit is a passage, not a file — consecutive `ord` values from the same `art_id` are normal because chunks overlap by ~400 tokens. Span fields are modality-aware: only the pair matching `modality` is populated, the others stay None. - """ # noqa: E501 - art_id: StrictStr - char_end: Optional[StrictInt] = None - char_start: Optional[StrictInt] = None - content_type: StrictStr - drive_id: StrictStr - file_type: StrictStr - labels: Optional[List[StrictStr]] = None - modality: StrictStr - ord: StrictInt - page_end: Optional[StrictInt] = None - page_start: Optional[StrictInt] = None - path: StrictStr - rank_lexical: Optional[StrictInt] = None - rank_semantic: Optional[StrictInt] = None - score: Union[StrictFloat, StrictInt] - snippet: StrictStr - text: StrictStr - time_end_ms: Optional[StrictInt] = None - time_start_ms: Optional[StrictInt] = None - updated_at: datetime - url: StrictStr - version_number: StrictInt - __properties: ClassVar[List[str]] = ["art_id", "char_end", "char_start", "content_type", "drive_id", "file_type", "labels", "modality", "ord", "page_end", "page_start", "path", "rank_lexical", "rank_semantic", "score", "snippet", "text", "time_end_ms", "time_start_ms", "updated_at", "url", "version_number"] - - @field_validator('modality') - def modality_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['text', 'code', 'pdf', 'image', 'audio', 'video']): - raise ValueError("must be one of enum values ('text', 'code', 'pdf', 'image', 'audio', 'video')") - return value - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of FindHitOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if char_end (nullable) is None - # and model_fields_set contains the field - if self.char_end is None and "char_end" in self.model_fields_set: - _dict['char_end'] = None - - # set to None if char_start (nullable) is None - # and model_fields_set contains the field - if self.char_start is None and "char_start" in self.model_fields_set: - _dict['char_start'] = None - - # set to None if page_end (nullable) is None - # and model_fields_set contains the field - if self.page_end is None and "page_end" in self.model_fields_set: - _dict['page_end'] = None - - # set to None if page_start (nullable) is None - # and model_fields_set contains the field - if self.page_start is None and "page_start" in self.model_fields_set: - _dict['page_start'] = None - - # set to None if rank_lexical (nullable) is None - # and model_fields_set contains the field - if self.rank_lexical is None and "rank_lexical" in self.model_fields_set: - _dict['rank_lexical'] = None - - # set to None if rank_semantic (nullable) is None - # and model_fields_set contains the field - if self.rank_semantic is None and "rank_semantic" in self.model_fields_set: - _dict['rank_semantic'] = None - - # set to None if time_end_ms (nullable) is None - # and model_fields_set contains the field - if self.time_end_ms is None and "time_end_ms" in self.model_fields_set: - _dict['time_end_ms'] = None - - # set to None if time_start_ms (nullable) is None - # and model_fields_set contains the field - if self.time_start_ms is None and "time_start_ms" in self.model_fields_set: - _dict['time_start_ms'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FindHitOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "art_id": obj.get("art_id"), - "char_end": obj.get("char_end"), - "char_start": obj.get("char_start"), - "content_type": obj.get("content_type"), - "drive_id": obj.get("drive_id"), - "file_type": obj.get("file_type"), - "labels": obj.get("labels"), - "modality": obj.get("modality"), - "ord": obj.get("ord"), - "page_end": obj.get("page_end"), - "page_start": obj.get("page_start"), - "path": obj.get("path"), - "rank_lexical": obj.get("rank_lexical"), - "rank_semantic": obj.get("rank_semantic"), - "score": obj.get("score"), - "snippet": obj.get("snippet"), - "text": obj.get("text"), - "time_end_ms": obj.get("time_end_ms"), - "time_start_ms": obj.get("time_start_ms"), - "updated_at": obj.get("updated_at"), - "url": obj.get("url"), - "version_number": obj.get("version_number") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/find_page.py b/sdk/python/agentdrive_sdk/models/find_page.py deleted file mode 100644 index 7892d12..0000000 --- a/sdk/python/agentdrive_sdk/models/find_page.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from agentdrive_sdk.models.find_hit_out import FindHitOut -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class FindPage(BaseModel): - """ - `/v0/find` response — single-shot top-N, deliberately unpaginated (same contract + rationale as `SearchPage`). - """ # noqa: E501 - items: List[FindHitOut] - __properties: ClassVar[List[str]] = ["items"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of FindPage from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in items (list) - _items = [] - if self.items: - for _item_items in self.items: - if _item_items: - _items.append(_item_items.to_dict()) - _dict['items'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FindPage from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "items": [FindHitOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/folder_copy_in.py b/sdk/python/agentdrive_sdk/models/folder_copy_in.py deleted file mode 100644 index 395feb8..0000000 --- a/sdk/python/agentdrive_sdk/models/folder_copy_in.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class FolderCopyIn(BaseModel): - """ - POST /v0/folders/{fld_id}/copy body — duplicate the subtree to a new path. `path` is the target folder path (canonical, trailing slash). Its own schema (vs. reusing `FolderMoveIn`) keeps the copy surface self-documenting in the OpenAPI spec. - """ # noqa: E501 - from_metageneration: Optional[StrictInt] = None - path: StrictStr - __properties: ClassVar[List[str]] = ["from_metageneration", "path"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of FolderCopyIn from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if from_metageneration (nullable) is None - # and model_fields_set contains the field - if self.from_metageneration is None and "from_metageneration" in self.model_fields_set: - _dict['from_metageneration'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FolderCopyIn from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "from_metageneration": obj.get("from_metageneration"), - "path": obj.get("path") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/folder_copy_out.py b/sdk/python/agentdrive_sdk/models/folder_copy_out.py deleted file mode 100644 index f4a1e7f..0000000 --- a/sdk/python/agentdrive_sdk/models/folder_copy_out.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class FolderCopyOut(BaseModel): - """ - POST /v0/folders/{fld_id}/copy response — the newly-created folder resource (same shape as `FolderOut`) plus copy-provenance fields: `from_fld_id` is the source folder and `n_artifacts_copied` is the number of descendant artifacts cloned into the new subtree. Mirrors the MCP `copy` folder route's conceptual shape. - """ # noqa: E501 - created_at: datetime - deleted_at: Optional[datetime] = None - description: Optional[StrictStr] = None - drive_id: StrictStr - etag: StrictStr - from_fld_id: StrictStr - id: StrictStr - inherit_grants: Optional[StrictBool] = True - metageneration: Optional[StrictInt] = 1 - n_artifacts_copied: StrictInt - path: StrictStr - purge_at: Optional[datetime] = None - updated_at: datetime - __properties: ClassVar[List[str]] = ["created_at", "deleted_at", "description", "drive_id", "etag", "from_fld_id", "id", "inherit_grants", "metageneration", "n_artifacts_copied", "path", "purge_at", "updated_at"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of FolderCopyOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if deleted_at (nullable) is None - # and model_fields_set contains the field - if self.deleted_at is None and "deleted_at" in self.model_fields_set: - _dict['deleted_at'] = None - - # set to None if description (nullable) is None - # and model_fields_set contains the field - if self.description is None and "description" in self.model_fields_set: - _dict['description'] = None - - # set to None if purge_at (nullable) is None - # and model_fields_set contains the field - if self.purge_at is None and "purge_at" in self.model_fields_set: - _dict['purge_at'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FolderCopyOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "created_at": obj.get("created_at"), - "deleted_at": obj.get("deleted_at"), - "description": obj.get("description"), - "drive_id": obj.get("drive_id"), - "etag": obj.get("etag"), - "from_fld_id": obj.get("from_fld_id"), - "id": obj.get("id"), - "inherit_grants": obj.get("inherit_grants") if obj.get("inherit_grants") is not None else True, - "metageneration": obj.get("metageneration") if obj.get("metageneration") is not None else 1, - "n_artifacts_copied": obj.get("n_artifacts_copied"), - "path": obj.get("path"), - "purge_at": obj.get("purge_at"), - "updated_at": obj.get("updated_at") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/folder_create_in.py b/sdk/python/agentdrive_sdk/models/folder_create_in.py deleted file mode 100644 index b70c5d9..0000000 --- a/sdk/python/agentdrive_sdk/models/folder_create_in.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class FolderCreateIn(BaseModel): - """ - PUT /v0/folders/{path} body for the optional metadata params. Empty body is fine — `mkdir` with no description just creates the folder row. - """ # noqa: E501 - description: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["description"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of FolderCreateIn from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if description (nullable) is None - # and model_fields_set contains the field - if self.description is None and "description" in self.model_fields_set: - _dict['description'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FolderCreateIn from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "description": obj.get("description") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/folder_delete_out.py b/sdk/python/agentdrive_sdk/models/folder_delete_out.py deleted file mode 100644 index 05c9b64..0000000 --- a/sdk/python/agentdrive_sdk/models/folder_delete_out.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class FolderDeleteOut(BaseModel): - """ - DELETE response — surfaces cascade counts so the caller can confirm scope of an rmdir before the client retries with `?recursive=true`. - """ # noqa: E501 - deleted_at: datetime - id: StrictStr - n_artifacts_deleted: StrictInt - n_subfolders_deleted: StrictInt - ok: Optional[StrictBool] = True - path: StrictStr - purge_at: datetime - retention_days: StrictInt - __properties: ClassVar[List[str]] = ["deleted_at", "id", "n_artifacts_deleted", "n_subfolders_deleted", "ok", "path", "purge_at", "retention_days"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of FolderDeleteOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FolderDeleteOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "deleted_at": obj.get("deleted_at"), - "id": obj.get("id"), - "n_artifacts_deleted": obj.get("n_artifacts_deleted"), - "n_subfolders_deleted": obj.get("n_subfolders_deleted"), - "ok": obj.get("ok") if obj.get("ok") is not None else True, - "path": obj.get("path"), - "purge_at": obj.get("purge_at"), - "retention_days": obj.get("retention_days") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/folder_move_in.py b/sdk/python/agentdrive_sdk/models/folder_move_in.py deleted file mode 100644 index 9d2ceeb..0000000 --- a/sdk/python/agentdrive_sdk/models/folder_move_in.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class FolderMoveIn(BaseModel): - """ - POST /v0/folders/{fld_id}/move body — rename / move. - """ # noqa: E501 - path: StrictStr - __properties: ClassVar[List[str]] = ["path"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of FolderMoveIn from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FolderMoveIn from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "path": obj.get("path") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/folder_out.py b/sdk/python/agentdrive_sdk/models/folder_out.py deleted file mode 100644 index 228a38c..0000000 --- a/sdk/python/agentdrive_sdk/models/folder_out.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class FolderOut(BaseModel): - """ - Folder resource (folders+permalinks design §13). `path` is the canonical leading+trailing-slash form. Access is expressed through grants (permission-sharing-design §4.4), not a folder-level flag. - """ # noqa: E501 - created_at: datetime - deleted_at: Optional[datetime] = None - description: Optional[StrictStr] = None - drive_id: StrictStr - etag: StrictStr - id: StrictStr - inherit_grants: Optional[StrictBool] = True - metageneration: Optional[StrictInt] = 1 - path: StrictStr - purge_at: Optional[datetime] = None - updated_at: datetime - __properties: ClassVar[List[str]] = ["created_at", "deleted_at", "description", "drive_id", "etag", "id", "inherit_grants", "metageneration", "path", "purge_at", "updated_at"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of FolderOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if deleted_at (nullable) is None - # and model_fields_set contains the field - if self.deleted_at is None and "deleted_at" in self.model_fields_set: - _dict['deleted_at'] = None - - # set to None if description (nullable) is None - # and model_fields_set contains the field - if self.description is None and "description" in self.model_fields_set: - _dict['description'] = None - - # set to None if purge_at (nullable) is None - # and model_fields_set contains the field - if self.purge_at is None and "purge_at" in self.model_fields_set: - _dict['purge_at'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FolderOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "created_at": obj.get("created_at"), - "deleted_at": obj.get("deleted_at"), - "description": obj.get("description"), - "drive_id": obj.get("drive_id"), - "etag": obj.get("etag"), - "id": obj.get("id"), - "inherit_grants": obj.get("inherit_grants") if obj.get("inherit_grants") is not None else True, - "metageneration": obj.get("metageneration") if obj.get("metageneration") is not None else 1, - "path": obj.get("path"), - "purge_at": obj.get("purge_at"), - "updated_at": obj.get("updated_at") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/folder_patch_in.py b/sdk/python/agentdrive_sdk/models/folder_patch_in.py deleted file mode 100644 index a19ec30..0000000 --- a/sdk/python/agentdrive_sdk/models/folder_patch_in.py +++ /dev/null @@ -1,98 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class FolderPatchIn(BaseModel): - """ - PATCH /v0/folders/{fld_id} body — partial update. Field absence = unchanged. `description`: explicit null = clear. `inherit_grants`: non-nullable — null/absent = unchanged (it cannot be cleared, only flipped true/false). - """ # noqa: E501 - description: Optional[StrictStr] = None - inherit_grants: Optional[StrictBool] = None - __properties: ClassVar[List[str]] = ["description", "inherit_grants"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of FolderPatchIn from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if description (nullable) is None - # and model_fields_set contains the field - if self.description is None and "description" in self.model_fields_set: - _dict['description'] = None - - # set to None if inherit_grants (nullable) is None - # and model_fields_set contains the field - if self.inherit_grants is None and "inherit_grants" in self.model_fields_set: - _dict['inherit_grants'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FolderPatchIn from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "description": obj.get("description"), - "inherit_grants": obj.get("inherit_grants") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/folder_restore_out.py b/sdk/python/agentdrive_sdk/models/folder_restore_out.py deleted file mode 100644 index 78d6ccf..0000000 --- a/sdk/python/agentdrive_sdk/models/folder_restore_out.py +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class FolderRestoreOut(BaseModel): - """ - POST /v0/folders/{fld_id}/restore response — the restored (live) folder resource (same shape as `FolderOut`) plus the cascade counts from `core.folders.restore_cascade` (dashboard-file-operations-design §4.5), so the caller can confirm the scope of what came back with the root. - """ # noqa: E501 - created_at: datetime - deleted_at: Optional[datetime] = None - description: Optional[StrictStr] = None - drive_id: StrictStr - etag: StrictStr - id: StrictStr - inherit_grants: Optional[StrictBool] = True - metageneration: Optional[StrictInt] = 1 - n_artifacts_restored: StrictInt - n_subfolders_restored: StrictInt - path: StrictStr - purge_at: Optional[datetime] = None - updated_at: datetime - __properties: ClassVar[List[str]] = ["created_at", "deleted_at", "description", "drive_id", "etag", "id", "inherit_grants", "metageneration", "n_artifacts_restored", "n_subfolders_restored", "path", "purge_at", "updated_at"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of FolderRestoreOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if deleted_at (nullable) is None - # and model_fields_set contains the field - if self.deleted_at is None and "deleted_at" in self.model_fields_set: - _dict['deleted_at'] = None - - # set to None if description (nullable) is None - # and model_fields_set contains the field - if self.description is None and "description" in self.model_fields_set: - _dict['description'] = None - - # set to None if purge_at (nullable) is None - # and model_fields_set contains the field - if self.purge_at is None and "purge_at" in self.model_fields_set: - _dict['purge_at'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of FolderRestoreOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "created_at": obj.get("created_at"), - "deleted_at": obj.get("deleted_at"), - "description": obj.get("description"), - "drive_id": obj.get("drive_id"), - "etag": obj.get("etag"), - "id": obj.get("id"), - "inherit_grants": obj.get("inherit_grants") if obj.get("inherit_grants") is not None else True, - "metageneration": obj.get("metageneration") if obj.get("metageneration") is not None else 1, - "n_artifacts_restored": obj.get("n_artifacts_restored"), - "n_subfolders_restored": obj.get("n_subfolders_restored"), - "path": obj.get("path"), - "purge_at": obj.get("purge_at"), - "updated_at": obj.get("updated_at") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/grant_create_in.py b/sdk/python/agentdrive_sdk/models/grant_create_in.py deleted file mode 100644 index 3d13f9a..0000000 --- a/sdk/python/agentdrive_sdk/models/grant_create_in.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from agentdrive_sdk.models.grant_principal_in import GrantPrincipalIn -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class GrantCreateIn(BaseModel): - """ - POST /v0/grants body. `resource` is an `art_*`/`fld_*` id or a path (resolved within the caller's drive). `expires_in` is seconds from now (omit for a permanent grant). - """ # noqa: E501 - expires_in: Optional[StrictInt] = None - principal: GrantPrincipalIn - resource: StrictStr - role: StrictStr - __properties: ClassVar[List[str]] = ["expires_in", "principal", "resource", "role"] - - @field_validator('role') - def role_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['viewer', 'commenter', 'editor', 'manager']): - raise ValueError("must be one of enum values ('viewer', 'commenter', 'editor', 'manager')") - return value - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of GrantCreateIn from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of principal - if self.principal: - _dict['principal'] = self.principal.to_dict() - # set to None if expires_in (nullable) is None - # and model_fields_set contains the field - if self.expires_in is None and "expires_in" in self.model_fields_set: - _dict['expires_in'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of GrantCreateIn from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "expires_in": obj.get("expires_in"), - "principal": GrantPrincipalIn.from_dict(obj["principal"]) if obj.get("principal") is not None else None, - "resource": obj.get("resource"), - "role": obj.get("role") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/grant_list.py b/sdk/python/agentdrive_sdk/models/grant_list.py deleted file mode 100644 index e24aedc..0000000 --- a/sdk/python/agentdrive_sdk/models/grant_list.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from agentdrive_sdk.models.grant_out import GrantOut -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class GrantList(BaseModel): - """ - GrantList - """ # noqa: E501 - items: List[GrantOut] - next_cursor: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["items", "next_cursor"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of GrantList from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in items (list) - _items = [] - if self.items: - for _item_items in self.items: - if _item_items: - _items.append(_item_items.to_dict()) - _dict['items'] = _items - # set to None if next_cursor (nullable) is None - # and model_fields_set contains the field - if self.next_cursor is None and "next_cursor" in self.model_fields_set: - _dict['next_cursor'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of GrantList from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "items": [GrantOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, - "next_cursor": obj.get("next_cursor") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/grant_out.py b/sdk/python/agentdrive_sdk/models/grant_out.py deleted file mode 100644 index aa043ff..0000000 --- a/sdk/python/agentdrive_sdk/models/grant_out.py +++ /dev/null @@ -1,157 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class GrantOut(BaseModel): - """ - A live grant. Audit fields (`granted_by_*`, `on_behalf_of`) are surfaced so a manager can see who shared what. - """ # noqa: E501 - artifacts_affected: Optional[StrictInt] = None - created_at: datetime - expires_at: Optional[datetime] = None - granted_by_id: StrictStr - granted_by_type: StrictStr - id: StrictStr - on_behalf_of: Optional[StrictStr] = None - principal_email: Optional[StrictStr] = None - principal_id: Optional[StrictStr] = None - principal_type: StrictStr - resource_id: StrictStr - resource_type: StrictStr - role: StrictStr - __properties: ClassVar[List[str]] = ["artifacts_affected", "created_at", "expires_at", "granted_by_id", "granted_by_type", "id", "on_behalf_of", "principal_email", "principal_id", "principal_type", "resource_id", "resource_type", "role"] - - @field_validator('principal_type') - def principal_type_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['user', 'agent', 'org', 'anyone']): - raise ValueError("must be one of enum values ('user', 'agent', 'org', 'anyone')") - return value - - @field_validator('resource_type') - def resource_type_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['artifact', 'folder']): - raise ValueError("must be one of enum values ('artifact', 'folder')") - return value - - @field_validator('role') - def role_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['viewer', 'commenter', 'editor', 'manager']): - raise ValueError("must be one of enum values ('viewer', 'commenter', 'editor', 'manager')") - return value - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of GrantOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if artifacts_affected (nullable) is None - # and model_fields_set contains the field - if self.artifacts_affected is None and "artifacts_affected" in self.model_fields_set: - _dict['artifacts_affected'] = None - - # set to None if expires_at (nullable) is None - # and model_fields_set contains the field - if self.expires_at is None and "expires_at" in self.model_fields_set: - _dict['expires_at'] = None - - # set to None if on_behalf_of (nullable) is None - # and model_fields_set contains the field - if self.on_behalf_of is None and "on_behalf_of" in self.model_fields_set: - _dict['on_behalf_of'] = None - - # set to None if principal_email (nullable) is None - # and model_fields_set contains the field - if self.principal_email is None and "principal_email" in self.model_fields_set: - _dict['principal_email'] = None - - # set to None if principal_id (nullable) is None - # and model_fields_set contains the field - if self.principal_id is None and "principal_id" in self.model_fields_set: - _dict['principal_id'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of GrantOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "artifacts_affected": obj.get("artifacts_affected"), - "created_at": obj.get("created_at"), - "expires_at": obj.get("expires_at"), - "granted_by_id": obj.get("granted_by_id"), - "granted_by_type": obj.get("granted_by_type"), - "id": obj.get("id"), - "on_behalf_of": obj.get("on_behalf_of"), - "principal_email": obj.get("principal_email"), - "principal_id": obj.get("principal_id"), - "principal_type": obj.get("principal_type"), - "resource_id": obj.get("resource_id"), - "resource_type": obj.get("resource_type"), - "role": obj.get("role") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/grant_patch_in.py b/sdk/python/agentdrive_sdk/models/grant_patch_in.py deleted file mode 100644 index 24eac22..0000000 --- a/sdk/python/agentdrive_sdk/models/grant_patch_in.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class GrantPatchIn(BaseModel): - """ - PATCH /v0/grants/{grn_id} body. Field absence = unchanged; explicit `expires_in: null` clears the expiry (makes the grant permanent). - """ # noqa: E501 - expires_in: Optional[StrictInt] = None - role: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["expires_in", "role"] - - @field_validator('role') - def role_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['viewer', 'commenter', 'editor', 'manager']): - raise ValueError("must be one of enum values ('viewer', 'commenter', 'editor', 'manager')") - return value - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of GrantPatchIn from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if expires_in (nullable) is None - # and model_fields_set contains the field - if self.expires_in is None and "expires_in" in self.model_fields_set: - _dict['expires_in'] = None - - # set to None if role (nullable) is None - # and model_fields_set contains the field - if self.role is None and "role" in self.model_fields_set: - _dict['role'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of GrantPatchIn from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "expires_in": obj.get("expires_in"), - "role": obj.get("role") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/grant_principal_in.py b/sdk/python/agentdrive_sdk/models/grant_principal_in.py deleted file mode 100644 index 81fe672..0000000 --- a/sdk/python/agentdrive_sdk/models/grant_principal_in.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class GrantPrincipalIn(BaseModel): - """ - Who a grant is for. `anyone` carries no id/email; `org`/`agent` require `id`; `user` requires exactly one of `id` / `email` (an email with no account becomes a pending-email invite resolved on sign-in). - """ # noqa: E501 - email: Optional[Annotated[str, Field(strict=True, max_length=320)]] = None - id: Optional[Annotated[str, Field(strict=True, max_length=128)]] = None - type: StrictStr - __properties: ClassVar[List[str]] = ["email", "id", "type"] - - @field_validator('type') - def type_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['user', 'agent', 'org', 'anyone']): - raise ValueError("must be one of enum values ('user', 'agent', 'org', 'anyone')") - return value - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of GrantPrincipalIn from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if email (nullable) is None - # and model_fields_set contains the field - if self.email is None and "email" in self.model_fields_set: - _dict['email'] = None - - # set to None if id (nullable) is None - # and model_fields_set contains the field - if self.id is None and "id" in self.model_fields_set: - _dict['id'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of GrantPrincipalIn from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "email": obj.get("email"), - "id": obj.get("id"), - "type": obj.get("type") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/health_degraded_detail.py b/sdk/python/agentdrive_sdk/models/health_degraded_detail.py deleted file mode 100644 index 299fe08..0000000 --- a/sdk/python/agentdrive_sdk/models/health_degraded_detail.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class HealthDegradedDetail(BaseModel): - """ - HealthDegradedDetail - """ # noqa: E501 - error: StrictStr - status: StrictStr - __properties: ClassVar[List[str]] = ["error", "status"] - - @field_validator('status') - def status_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['degraded']): - raise ValueError("must be one of enum values ('degraded')") - return value - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of HealthDegradedDetail from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of HealthDegradedDetail from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "error": obj.get("error"), - "status": obj.get("status") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/health_degraded_response.py b/sdk/python/agentdrive_sdk/models/health_degraded_response.py deleted file mode 100644 index 8a4a00e..0000000 --- a/sdk/python/agentdrive_sdk/models/health_degraded_response.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from agentdrive_sdk.models.health_degraded_detail import HealthDegradedDetail -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class HealthDegradedResponse(BaseModel): - """ - Legacy health-probe failure shape. Health predates the `/v0` error envelope and is consumed by load balancers. PR 1 documents the wire shape without changing it; convergence on the canonical API envelope is a separately reviewed compatibility decision. - """ # noqa: E501 - detail: HealthDegradedDetail - __properties: ClassVar[List[str]] = ["detail"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of HealthDegradedResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of detail - if self.detail: - _dict['detail'] = self.detail.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of HealthDegradedResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "detail": HealthDegradedDetail.from_dict(obj["detail"]) if obj.get("detail") is not None else None - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/health_out.py b/sdk/python/agentdrive_sdk/models/health_out.py deleted file mode 100644 index 5aea803..0000000 --- a/sdk/python/agentdrive_sdk/models/health_out.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class HealthOut(BaseModel): - """ - HealthOut - """ # noqa: E501 - status: StrictStr - __properties: ClassVar[List[str]] = ["status"] - - @field_validator('status') - def status_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['ok']): - raise ValueError("must be one of enum values ('ok')") - return value - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of HealthOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of HealthOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "status": obj.get("status") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/hourly_usage_counter_out.py b/sdk/python/agentdrive_sdk/models/hourly_usage_counter_out.py deleted file mode 100644 index 72b32cb..0000000 --- a/sdk/python/agentdrive_sdk/models/hourly_usage_counter_out.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictInt -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class HourlyUsageCounterOut(BaseModel): - """ - HourlyUsageCounterOut - """ # noqa: E501 - limit: StrictInt - reset_at: datetime - used: StrictInt - __properties: ClassVar[List[str]] = ["limit", "reset_at", "used"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of HourlyUsageCounterOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of HourlyUsageCounterOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "limit": obj.get("limit"), - "reset_at": obj.get("reset_at"), - "used": obj.get("used") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/identity_assertion_metadata_out.py b/sdk/python/agentdrive_sdk/models/identity_assertion_metadata_out.py deleted file mode 100644 index 1984aa4..0000000 --- a/sdk/python/agentdrive_sdk/models/identity_assertion_metadata_out.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class IdentityAssertionMetadataOut(BaseModel): - """ - IdentityAssertionMetadataOut - """ # noqa: E501 - alg: StrictStr - iss: StrictStr - version: StrictInt - additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["alg", "iss", "version"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of IdentityAssertionMetadataOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - * Fields in `self.additional_properties` are added to the output dict. - """ - excluded_fields: Set[str] = set([ - "additional_properties", - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of IdentityAssertionMetadataOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "alg": obj.get("alg"), - "iss": obj.get("iss"), - "version": obj.get("version") - }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj diff --git a/sdk/python/agentdrive_sdk/models/invitation_list.py b/sdk/python/agentdrive_sdk/models/invitation_list.py deleted file mode 100644 index 319c020..0000000 --- a/sdk/python/agentdrive_sdk/models/invitation_list.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from agentdrive_sdk.models.invitation_out import InvitationOut -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class InvitationList(BaseModel): - """ - InvitationList - """ # noqa: E501 - items: List[InvitationOut] - next_cursor: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["items", "next_cursor"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of InvitationList from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in items (list) - _items = [] - if self.items: - for _item_items in self.items: - if _item_items: - _items.append(_item_items.to_dict()) - _dict['items'] = _items - # set to None if next_cursor (nullable) is None - # and model_fields_set contains the field - if self.next_cursor is None and "next_cursor" in self.model_fields_set: - _dict['next_cursor'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of InvitationList from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "items": [InvitationOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, - "next_cursor": obj.get("next_cursor") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/invitation_out.py b/sdk/python/agentdrive_sdk/models/invitation_out.py deleted file mode 100644 index 1282d8b..0000000 --- a/sdk/python/agentdrive_sdk/models/invitation_out.py +++ /dev/null @@ -1,120 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class InvitationOut(BaseModel): - """ - One workspace invitation — metadata only; the raw token is never surfaced over the API (it lives only in the invite email). - """ # noqa: E501 - created_at: datetime - email: StrictStr - expires_at: datetime - id: StrictStr - invited_by: Optional[StrictStr] = None - organization_id: StrictStr - role: StrictStr - status: StrictStr - __properties: ClassVar[List[str]] = ["created_at", "email", "expires_at", "id", "invited_by", "organization_id", "role", "status"] - - @field_validator('role') - def role_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['admin', 'member']): - raise ValueError("must be one of enum values ('admin', 'member')") - return value - - @field_validator('status') - def status_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['pending', 'accepted', 'revoked', 'expired']): - raise ValueError("must be one of enum values ('pending', 'accepted', 'revoked', 'expired')") - return value - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of InvitationOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if invited_by (nullable) is None - # and model_fields_set contains the field - if self.invited_by is None and "invited_by" in self.model_fields_set: - _dict['invited_by'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of InvitationOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "created_at": obj.get("created_at"), - "email": obj.get("email"), - "expires_at": obj.get("expires_at"), - "id": obj.get("id"), - "invited_by": obj.get("invited_by"), - "organization_id": obj.get("organization_id"), - "role": obj.get("role"), - "status": obj.get("status") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/invite_create_out.py b/sdk/python/agentdrive_sdk/models/invite_create_out.py deleted file mode 100644 index 14de25a..0000000 --- a/sdk/python/agentdrive_sdk/models/invite_create_out.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictBool -from typing import Any, ClassVar, Dict, List, Optional -from agentdrive_sdk.models.invitation_out import InvitationOut -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class InviteCreateOut(BaseModel): - """ - POST /v0/members/invite response. `already_member` is True when the email was already a live member (no invite created — a no-op success). `email_delivered` is False when the invite row was created but the notification email failed to send — the invite is still valid and can be resent, but the invitee has not yet received a link. - """ # noqa: E501 - already_member: Optional[StrictBool] = False - email_delivered: Optional[StrictBool] = True - invitation: Optional[InvitationOut] = None - __properties: ClassVar[List[str]] = ["already_member", "email_delivered", "invitation"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of InviteCreateOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of invitation - if self.invitation: - _dict['invitation'] = self.invitation.to_dict() - # set to None if invitation (nullable) is None - # and model_fields_set contains the field - if self.invitation is None and "invitation" in self.model_fields_set: - _dict['invitation'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of InviteCreateOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "already_member": obj.get("already_member") if obj.get("already_member") is not None else False, - "email_delivered": obj.get("email_delivered") if obj.get("email_delivered") is not None else True, - "invitation": InvitationOut.from_dict(obj["invitation"]) if obj.get("invitation") is not None else None - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/jwk_out.py b/sdk/python/agentdrive_sdk/models/jwk_out.py deleted file mode 100644 index c57d93b..0000000 --- a/sdk/python/agentdrive_sdk/models/jwk_out.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class JwkOut(BaseModel): - """ - JwkOut - """ # noqa: E501 - alg: StrictStr - e: StrictStr - kid: StrictStr - kty: StrictStr - n: StrictStr - use: StrictStr - additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["alg", "e", "kid", "kty", "n", "use"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of JwkOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - * Fields in `self.additional_properties` are added to the output dict. - """ - excluded_fields: Set[str] = set([ - "additional_properties", - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of JwkOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "alg": obj.get("alg"), - "e": obj.get("e"), - "kid": obj.get("kid"), - "kty": obj.get("kty"), - "n": obj.get("n"), - "use": obj.get("use") - }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj diff --git a/sdk/python/agentdrive_sdk/models/jwks_out.py b/sdk/python/agentdrive_sdk/models/jwks_out.py deleted file mode 100644 index 02e109c..0000000 --- a/sdk/python/agentdrive_sdk/models/jwks_out.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from agentdrive_sdk.models.jwk_out import JwkOut -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class JwksOut(BaseModel): - """ - JwksOut - """ # noqa: E501 - keys: List[JwkOut] - additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["keys"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of JwksOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - * Fields in `self.additional_properties` are added to the output dict. - """ - excluded_fields: Set[str] = set([ - "additional_properties", - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in keys (list) - _items = [] - if self.keys: - for _item_keys in self.keys: - if _item_keys: - _items.append(_item_keys.to_dict()) - _dict['keys'] = _items - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of JwksOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "keys": [JwkOut.from_dict(_item) for _item in obj["keys"]] if obj.get("keys") is not None else None - }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj diff --git a/sdk/python/agentdrive_sdk/models/loc_inner.py b/sdk/python/agentdrive_sdk/models/loc_inner.py deleted file mode 100644 index 9ecd198..0000000 --- a/sdk/python/agentdrive_sdk/models/loc_inner.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, ValidationError, field_validator -from typing import Optional -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -LOCINNER_ANY_OF_SCHEMAS = ["int", "str"] - -class LocInner(BaseModel): - """ - LocInner - """ - - # data type: str - anyof_schema_1_validator: Optional[StrictStr] = None - # data type: int - anyof_schema_2_validator: Optional[StrictInt] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[int, str]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "int", "str" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = LocInner.model_construct() - error_messages = [] - # validate data type: str - try: - instance.anyof_schema_1_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # validate data type: int - try: - instance.anyof_schema_2_validator = v - return v - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in LocInner with anyOf schemas: int, str. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # deserialize data into str - try: - # validation - instance.anyof_schema_1_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_1_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into int - try: - # validation - instance.anyof_schema_2_validator = json.loads(json_str) - # assign value to actual_instance - instance.actual_instance = instance.anyof_schema_2_validator - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into LocInner with anyOf schemas: int, str. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], int, str]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) diff --git a/sdk/python/agentdrive_sdk/models/lookup_values_in.py b/sdk/python/agentdrive_sdk/models/lookup_values_in.py deleted file mode 100644 index 9da5329..0000000 --- a/sdk/python/agentdrive_sdk/models/lookup_values_in.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class LookupValuesIn(BaseModel): - """ - LookupValuesIn - """ # noqa: E501 - column: StrictStr - dataset: StrictStr - limit: Optional[StrictInt] = 50 - __properties: ClassVar[List[str]] = ["column", "dataset", "limit"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of LookupValuesIn from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of LookupValuesIn from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "column": obj.get("column"), - "dataset": obj.get("dataset"), - "limit": obj.get("limit") if obj.get("limit") is not None else 50 - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/lookup_values_out.py b/sdk/python/agentdrive_sdk/models/lookup_values_out.py deleted file mode 100644 index 79d5071..0000000 --- a/sdk/python/agentdrive_sdk/models/lookup_values_out.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class LookupValuesOut(BaseModel): - """ - LookupValuesOut - """ # noqa: E501 - column: StrictStr - dataset: StrictStr - values: List[Any] - __properties: ClassVar[List[str]] = ["column", "dataset", "values"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of LookupValuesOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of LookupValuesOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "column": obj.get("column"), - "dataset": obj.get("dataset"), - "values": obj.get("values") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/member_invite_in.py b/sdk/python/agentdrive_sdk/models/member_invite_in.py deleted file mode 100644 index 7cf46a8..0000000 --- a/sdk/python/agentdrive_sdk/models/member_invite_in.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class MemberInviteIn(BaseModel): - """ - POST /v0/members/invite body — invite a person by email. - """ # noqa: E501 - email: Annotated[str, Field(min_length=3, strict=True, max_length=320)] - role: Optional[StrictStr] = 'member' - __properties: ClassVar[List[str]] = ["email", "role"] - - @field_validator('role') - def role_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['admin', 'member']): - raise ValueError("must be one of enum values ('admin', 'member')") - return value - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of MemberInviteIn from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of MemberInviteIn from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "email": obj.get("email"), - "role": obj.get("role") if obj.get("role") is not None else 'member' - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/member_list.py b/sdk/python/agentdrive_sdk/models/member_list.py deleted file mode 100644 index c6eafcf..0000000 --- a/sdk/python/agentdrive_sdk/models/member_list.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from agentdrive_sdk.models.member_out import MemberOut -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class MemberList(BaseModel): - """ - MemberList - """ # noqa: E501 - items: List[MemberOut] - next_cursor: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["items", "next_cursor"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of MemberList from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in items (list) - _items = [] - if self.items: - for _item_items in self.items: - if _item_items: - _items.append(_item_items.to_dict()) - _dict['items'] = _items - # set to None if next_cursor (nullable) is None - # and model_fields_set contains the field - if self.next_cursor is None and "next_cursor" in self.model_fields_set: - _dict['next_cursor'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of MemberList from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "items": [MemberOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, - "next_cursor": obj.get("next_cursor") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/member_out.py b/sdk/python/agentdrive_sdk/models/member_out.py deleted file mode 100644 index c45d1b8..0000000 --- a/sdk/python/agentdrive_sdk/models/member_out.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class MemberOut(BaseModel): - """ - One live member of a workspace — metadata for the members page / `GET /v0/members`. - """ # noqa: E501 - created_at: datetime - email: StrictStr - first_name: Optional[StrictStr] = None - last_name: Optional[StrictStr] = None - role: StrictStr - user_id: StrictStr - __properties: ClassVar[List[str]] = ["created_at", "email", "first_name", "last_name", "role", "user_id"] - - @field_validator('role') - def role_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['admin', 'member']): - raise ValueError("must be one of enum values ('admin', 'member')") - return value - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of MemberOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if first_name (nullable) is None - # and model_fields_set contains the field - if self.first_name is None and "first_name" in self.model_fields_set: - _dict['first_name'] = None - - # set to None if last_name (nullable) is None - # and model_fields_set contains the field - if self.last_name is None and "last_name" in self.model_fields_set: - _dict['last_name'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of MemberOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "created_at": obj.get("created_at"), - "email": obj.get("email"), - "first_name": obj.get("first_name"), - "last_name": obj.get("last_name"), - "role": obj.get("role"), - "user_id": obj.get("user_id") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/member_remove_out.py b/sdk/python/agentdrive_sdk/models/member_remove_out.py deleted file mode 100644 index 10ff73b..0000000 --- a/sdk/python/agentdrive_sdk/models/member_remove_out.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class MemberRemoveOut(BaseModel): - """ - DELETE /v0/members/{user_id} response — the member-removal receipt. `id` is the removed user's id (replaces the ad-hoc `removed` key). - """ # noqa: E501 - id: StrictStr - ok: Optional[StrictBool] = True - organization_id: StrictStr - __properties: ClassVar[List[str]] = ["id", "ok", "organization_id"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of MemberRemoveOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of MemberRemoveOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "ok": obj.get("ok") if obj.get("ok") is not None else True, - "organization_id": obj.get("organization_id") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/member_role_in.py b/sdk/python/agentdrive_sdk/models/member_role_in.py deleted file mode 100644 index 3145193..0000000 --- a/sdk/python/agentdrive_sdk/models/member_role_in.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class MemberRoleIn(BaseModel): - """ - PATCH /v0/members/{user} body — promote/demote a member. - """ # noqa: E501 - role: StrictStr - __properties: ClassVar[List[str]] = ["role"] - - @field_validator('role') - def role_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['admin', 'member']): - raise ValueError("must be one of enum values ('admin', 'member')") - return value - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of MemberRoleIn from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of MemberRoleIn from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "role": obj.get("role") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/o_auth_protocol_error_out.py b/sdk/python/agentdrive_sdk/models/o_auth_protocol_error_out.py deleted file mode 100644 index 98eecfe..0000000 --- a/sdk/python/agentdrive_sdk/models/o_auth_protocol_error_out.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class OAuthProtocolErrorOut(BaseModel): - """ - RFC OAuth error shape used by public protocol endpoints. - """ # noqa: E501 - error: StrictStr - error_description: Optional[StrictStr] = None - additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["error", "error_description"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OAuthProtocolErrorOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - * Fields in `self.additional_properties` are added to the output dict. - """ - excluded_fields: Set[str] = set([ - "additional_properties", - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - # set to None if error_description (nullable) is None - # and model_fields_set contains the field - if self.error_description is None and "error_description" in self.model_fields_set: - _dict['error_description'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OAuthProtocolErrorOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "error": obj.get("error"), - "error_description": obj.get("error_description") - }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj diff --git a/sdk/python/agentdrive_sdk/models/operation_usage_out.py b/sdk/python/agentdrive_sdk/models/operation_usage_out.py deleted file mode 100644 index 8f5f3ec..0000000 --- a/sdk/python/agentdrive_sdk/models/operation_usage_out.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictInt -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class OperationUsageOut(BaseModel): - """ - OperationUsageOut - """ # noqa: E501 - reads: StrictInt - writes: StrictInt - __properties: ClassVar[List[str]] = ["reads", "writes"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of OperationUsageOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of OperationUsageOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "reads": obj.get("reads"), - "writes": obj.get("writes") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/page.py b/sdk/python/agentdrive_sdk/models/page.py deleted file mode 100644 index 1506923..0000000 --- a/sdk/python/agentdrive_sdk/models/page.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from agentdrive_sdk.models.artifact_out import ArtifactOut -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class Page(BaseModel): - """ - Page - """ # noqa: E501 - items: List[ArtifactOut] - next_cursor: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["items", "next_cursor"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Page from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in items (list) - _items = [] - if self.items: - for _item_items in self.items: - if _item_items: - _items.append(_item_items.to_dict()) - _dict['items'] = _items - # set to None if next_cursor (nullable) is None - # and model_fields_set contains the field - if self.next_cursor is None and "next_cursor" in self.model_fields_set: - _dict['next_cursor'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Page from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "items": [ArtifactOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, - "next_cursor": obj.get("next_cursor") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/project_config_in.py b/sdk/python/agentdrive_sdk/models/project_config_in.py deleted file mode 100644 index 9827ba7..0000000 --- a/sdk/python/agentdrive_sdk/models/project_config_in.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class ProjectConfigIn(BaseModel): - """ - ProjectConfigIn - """ # noqa: E501 - auto_compile: Optional[StrictBool] = False - engine: Optional[StrictStr] = None - entrypoint: StrictStr - __properties: ClassVar[List[str]] = ["auto_compile", "engine", "entrypoint"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ProjectConfigIn from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if engine (nullable) is None - # and model_fields_set contains the field - if self.engine is None and "engine" in self.model_fields_set: - _dict['engine'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ProjectConfigIn from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "auto_compile": obj.get("auto_compile") if obj.get("auto_compile") is not None else False, - "engine": obj.get("engine"), - "entrypoint": obj.get("entrypoint") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/protected_resource_metadata_out.py b/sdk/python/agentdrive_sdk/models/protected_resource_metadata_out.py deleted file mode 100644 index 97503a8..0000000 --- a/sdk/python/agentdrive_sdk/models/protected_resource_metadata_out.py +++ /dev/null @@ -1,105 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class ProtectedResourceMetadataOut(BaseModel): - """ - ProtectedResourceMetadataOut - """ # noqa: E501 - authorization_servers: List[StrictStr] - bearer_methods_supported: List[StrictStr] - resource: StrictStr - scopes_supported: List[StrictStr] - additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["authorization_servers", "bearer_methods_supported", "resource", "scopes_supported"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ProtectedResourceMetadataOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - * Fields in `self.additional_properties` are added to the output dict. - """ - excluded_fields: Set[str] = set([ - "additional_properties", - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ProtectedResourceMetadataOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "authorization_servers": obj.get("authorization_servers"), - "bearer_methods_supported": obj.get("bearer_methods_supported"), - "resource": obj.get("resource"), - "scopes_supported": obj.get("scopes_supported") - }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj diff --git a/sdk/python/agentdrive_sdk/models/query_column_out.py b/sdk/python/agentdrive_sdk/models/query_column_out.py deleted file mode 100644 index 7f3ad2e..0000000 --- a/sdk/python/agentdrive_sdk/models/query_column_out.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class QueryColumnOut(BaseModel): - """ - QueryColumnOut - """ # noqa: E501 - name: StrictStr - type: Optional[StrictStr] = None - additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["name", "type"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of QueryColumnOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - * Fields in `self.additional_properties` are added to the output dict. - """ - excluded_fields: Set[str] = set([ - "additional_properties", - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - # set to None if type (nullable) is None - # and model_fields_set contains the field - if self.type is None and "type" in self.model_fields_set: - _dict['type'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of QueryColumnOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name"), - "type": obj.get("type") - }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj diff --git a/sdk/python/agentdrive_sdk/models/query_dry_run_out.py b/sdk/python/agentdrive_sdk/models/query_dry_run_out.py deleted file mode 100644 index 9e10416..0000000 --- a/sdk/python/agentdrive_sdk/models/query_dry_run_out.py +++ /dev/null @@ -1,122 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List -from agentdrive_sdk.models.query_column_out import QueryColumnOut -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class QueryDryRunOut(BaseModel): - """ - QueryDryRunOut - """ # noqa: E501 - dry_run: StrictBool - engine: StrictStr - estimated_bytes_processed: StrictInt - result_schema: List[QueryColumnOut] - valid: StrictBool - additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["dry_run", "engine", "estimated_bytes_processed", "result_schema", "valid"] - - @field_validator('dry_run') - def dry_run_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['true']): - raise ValueError("must be one of enum values ('true')") - return value - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of QueryDryRunOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - * Fields in `self.additional_properties` are added to the output dict. - """ - excluded_fields: Set[str] = set([ - "additional_properties", - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in result_schema (list) - _items = [] - if self.result_schema: - for _item_result_schema in self.result_schema: - if _item_result_schema: - _items.append(_item_result_schema.to_dict()) - _dict['result_schema'] = _items - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of QueryDryRunOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "dry_run": obj.get("dry_run"), - "engine": obj.get("engine"), - "estimated_bytes_processed": obj.get("estimated_bytes_processed"), - "result_schema": [QueryColumnOut.from_dict(_item) for _item in obj["result_schema"]] if obj.get("result_schema") is not None else None, - "valid": obj.get("valid") - }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj diff --git a/sdk/python/agentdrive_sdk/models/query_in.py b/sdk/python/agentdrive_sdk/models/query_in.py deleted file mode 100644 index 815f811..0000000 --- a/sdk/python/agentdrive_sdk/models/query_in.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class QueryIn(BaseModel): - """ - QueryIn - """ # noqa: E501 - dry_run: Optional[StrictBool] = False - inputs: Optional[Dict[str, StrictStr]] = None - sql: StrictStr - __properties: ClassVar[List[str]] = ["dry_run", "inputs", "sql"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of QueryIn from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of QueryIn from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "dry_run": obj.get("dry_run") if obj.get("dry_run") is not None else False, - "inputs": obj.get("inputs"), - "sql": obj.get("sql") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/query_result_out.py b/sdk/python/agentdrive_sdk/models/query_result_out.py deleted file mode 100644 index d8990d2..0000000 --- a/sdk/python/agentdrive_sdk/models/query_result_out.py +++ /dev/null @@ -1,119 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from agentdrive_sdk.models.query_column_out import QueryColumnOut -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class QueryResultOut(BaseModel): - """ - QueryResultOut - """ # noqa: E501 - bytes_processed: StrictInt - cache_hit: StrictBool - engine: StrictStr - preview: List[Optional[Dict[str, Any]]] - result_art_id: StrictStr - result_schema: List[QueryColumnOut] - row_count: StrictInt - additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["bytes_processed", "cache_hit", "engine", "preview", "result_art_id", "result_schema", "row_count"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of QueryResultOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - * Fields in `self.additional_properties` are added to the output dict. - """ - excluded_fields: Set[str] = set([ - "additional_properties", - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in result_schema (list) - _items = [] - if self.result_schema: - for _item_result_schema in self.result_schema: - if _item_result_schema: - _items.append(_item_result_schema.to_dict()) - _dict['result_schema'] = _items - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of QueryResultOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "bytes_processed": obj.get("bytes_processed"), - "cache_hit": obj.get("cache_hit"), - "engine": obj.get("engine"), - "preview": obj.get("preview"), - "result_art_id": obj.get("result_art_id"), - "result_schema": [QueryColumnOut.from_dict(_item) for _item in obj["result_schema"]] if obj.get("result_schema") is not None else None, - "row_count": obj.get("row_count") - }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj diff --git a/sdk/python/agentdrive_sdk/models/register_agent_identity_agent_identity_post422_response.py b/sdk/python/agentdrive_sdk/models/register_agent_identity_agent_identity_post422_response.py deleted file mode 100644 index 90d63f4..0000000 --- a/sdk/python/agentdrive_sdk/models/register_agent_identity_agent_identity_post422_response.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from agentdrive_sdk.models.error_response import ErrorResponse -from agentdrive_sdk.models.validation_error_response import ValidationErrorResponse -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -REGISTERAGENTIDENTITYAGENTIDENTITYPOST422RESPONSE_ONE_OF_SCHEMAS = ["ErrorResponse", "ValidationErrorResponse"] - -class RegisterAgentIdentityAgentIdentityPost422Response(BaseModel): - """ - RegisterAgentIdentityAgentIdentityPost422Response - """ - # data type: ValidationErrorResponse - oneof_schema_1_validator: Optional[ValidationErrorResponse] = None - # data type: ErrorResponse - oneof_schema_2_validator: Optional[ErrorResponse] = None - actual_instance: Optional[Union[ErrorResponse, ValidationErrorResponse]] = None - one_of_schemas: Set[str] = { "ErrorResponse", "ValidationErrorResponse" } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = RegisterAgentIdentityAgentIdentityPost422Response.model_construct() - error_messages = [] - match = 0 - # validate data type: ValidationErrorResponse - if not isinstance(v, ValidationErrorResponse): - error_messages.append(f"Error! Input type `{type(v)}` is not `ValidationErrorResponse`") - else: - match += 1 - # validate data type: ErrorResponse - if not isinstance(v, ErrorResponse): - error_messages.append(f"Error! Input type `{type(v)}` is not `ErrorResponse`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in RegisterAgentIdentityAgentIdentityPost422Response with oneOf schemas: ErrorResponse, ValidationErrorResponse. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in RegisterAgentIdentityAgentIdentityPost422Response with oneOf schemas: ErrorResponse, ValidationErrorResponse. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into ValidationErrorResponse - try: - instance.actual_instance = ValidationErrorResponse.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into ErrorResponse - try: - instance.actual_instance = ErrorResponse.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into RegisterAgentIdentityAgentIdentityPost422Response with oneOf schemas: ErrorResponse, ValidationErrorResponse. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into RegisterAgentIdentityAgentIdentityPost422Response with oneOf schemas: ErrorResponse, ValidationErrorResponse. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], ErrorResponse, ValidationErrorResponse]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) diff --git a/sdk/python/agentdrive_sdk/models/response_post_query_v0_query_post.py b/sdk/python/agentdrive_sdk/models/response_post_query_v0_query_post.py deleted file mode 100644 index 3bd8351..0000000 --- a/sdk/python/agentdrive_sdk/models/response_post_query_v0_query_post.py +++ /dev/null @@ -1,132 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -from inspect import getfullargspec -import json -import pprint -import re # noqa: F401 -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Optional -from agentdrive_sdk.models.query_dry_run_out import QueryDryRunOut -from agentdrive_sdk.models.query_result_out import QueryResultOut -from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict -from typing_extensions import Literal, Self -from pydantic import Field - -RESPONSEPOSTQUERYV0QUERYPOST_ANY_OF_SCHEMAS = ["QueryDryRunOut", "QueryResultOut"] - -class ResponsePostQueryV0QueryPost(BaseModel): - """ - ResponsePostQueryV0QueryPost - """ - - # data type: QueryDryRunOut - anyof_schema_1_validator: Optional[QueryDryRunOut] = None - # data type: QueryResultOut - anyof_schema_2_validator: Optional[QueryResultOut] = None - if TYPE_CHECKING: - actual_instance: Optional[Union[QueryDryRunOut, QueryResultOut]] = None - else: - actual_instance: Any = None - any_of_schemas: Set[str] = { "QueryDryRunOut", "QueryResultOut" } - - model_config = { - "validate_assignment": True, - "protected_namespaces": (), - } - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_anyof(cls, v): - instance = ResponsePostQueryV0QueryPost.model_construct() - error_messages = [] - # validate data type: QueryDryRunOut - if not isinstance(v, QueryDryRunOut): - error_messages.append(f"Error! Input type `{type(v)}` is not `QueryDryRunOut`") - else: - return v - - # validate data type: QueryResultOut - if not isinstance(v, QueryResultOut): - error_messages.append(f"Error! Input type `{type(v)}` is not `QueryResultOut`") - else: - return v - - if error_messages: - # no match - raise ValueError("No match found when setting the actual_instance in ResponsePostQueryV0QueryPost with anyOf schemas: QueryDryRunOut, QueryResultOut. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Dict[str, Any]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - # anyof_schema_1_validator: Optional[QueryDryRunOut] = None - try: - instance.actual_instance = QueryDryRunOut.from_json(json_str) - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # anyof_schema_2_validator: Optional[QueryResultOut] = None - try: - instance.actual_instance = QueryResultOut.from_json(json_str) - return instance - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if error_messages: - # no match - raise ValueError("No match found when deserializing the JSON string into ResponsePostQueryV0QueryPost with anyOf schemas: QueryDryRunOut, QueryResultOut. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], QueryDryRunOut, QueryResultOut]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) diff --git a/sdk/python/agentdrive_sdk/models/revoke_out.py b/sdk/python/agentdrive_sdk/models/revoke_out.py deleted file mode 100644 index fb75b77..0000000 --- a/sdk/python/agentdrive_sdk/models/revoke_out.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class RevokeOut(BaseModel): - """ - DELETE /v0/grants/{grn_id}, DELETE /v0/shares/{shr_id}, DELETE /v0/invitations/{invitation_id} response — the unified revoke receipt. `revoked` is a COUNT: 1 when a live row was revoked, 0 when it was already gone (DELETE is idempotent). - """ # noqa: E501 - id: StrictStr - ok: Optional[StrictBool] = True - revoked: StrictInt - __properties: ClassVar[List[str]] = ["id", "ok", "revoked"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RevokeOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RevokeOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "ok": obj.get("ok") if obj.get("ok") is not None else True, - "revoked": obj.get("revoked") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/search_hit_out.py b/sdk/python/agentdrive_sdk/models/search_hit_out.py deleted file mode 100644 index fbbed51..0000000 --- a/sdk/python/agentdrive_sdk/models/search_hit_out.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Union -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class SearchHitOut(BaseModel): - """ - SearchHitOut - """ # noqa: E501 - art_id: StrictStr - content_type: StrictStr - drive_id: StrictStr - file_type: StrictStr - labels: Optional[List[StrictStr]] = None - path: StrictStr - score: Union[StrictFloat, StrictInt] - snippet: StrictStr - updated_at: datetime - url: StrictStr - version_number: StrictInt - __properties: ClassVar[List[str]] = ["art_id", "content_type", "drive_id", "file_type", "labels", "path", "score", "snippet", "updated_at", "url", "version_number"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SearchHitOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SearchHitOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "art_id": obj.get("art_id"), - "content_type": obj.get("content_type"), - "drive_id": obj.get("drive_id"), - "file_type": obj.get("file_type"), - "labels": obj.get("labels"), - "path": obj.get("path"), - "score": obj.get("score"), - "snippet": obj.get("snippet"), - "updated_at": obj.get("updated_at"), - "url": obj.get("url"), - "version_number": obj.get("version_number") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/search_page.py b/sdk/python/agentdrive_sdk/models/search_page.py deleted file mode 100644 index 517104b..0000000 --- a/sdk/python/agentdrive_sdk/models/search_page.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from agentdrive_sdk.models.search_hit_out import SearchHitOut -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class SearchPage(BaseModel): - """ - `/v0/search` response — single-shot top-N, deliberately unpaginated. Ranked retrieval doesn't paginate meaningfully (the industry norm: vector/RAG APIs are pure top-K; Algolia/GitHub cap ranked results outright) — the correct \"next page\" of a relevance-ranked list is a narrower query. Raise `limit` (≤100) for more hits. A `next_cursor` field advertised here in the past was structurally always null and was dropped; if deep retrieval is ever needed, an ES-`search_after` style `(score, id)` keyset can be re-added additively. - """ # noqa: E501 - items: List[SearchHitOut] - __properties: ClassVar[List[str]] = ["items"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SearchPage from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in items (list) - _items = [] - if self.items: - for _item_items in self.items: - if _item_items: - _items.append(_item_items.to_dict()) - _dict['items'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SearchPage from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "items": [SearchHitOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/share_create_in.py b/sdk/python/agentdrive_sdk/models/share_create_in.py deleted file mode 100644 index 9fedfe3..0000000 --- a/sdk/python/agentdrive_sdk/models/share_create_in.py +++ /dev/null @@ -1,113 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class ShareCreateIn(BaseModel): - """ - POST /v0/shares body. `resource` is an `art_*`/`fld_*` id or a path. `expires_in` is seconds from now (omit for the default: none for a human creator, a short TTL for an agent). `password` (optional) gates redemption. - """ # noqa: E501 - expires_in: Optional[StrictInt] = None - password: Optional[Annotated[str, Field(strict=True, max_length=1024)]] = None - resource: StrictStr - role: Optional[StrictStr] = 'viewer' - __properties: ClassVar[List[str]] = ["expires_in", "password", "resource", "role"] - - @field_validator('role') - def role_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['viewer', 'commenter', 'editor']): - raise ValueError("must be one of enum values ('viewer', 'commenter', 'editor')") - return value - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ShareCreateIn from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if expires_in (nullable) is None - # and model_fields_set contains the field - if self.expires_in is None and "expires_in" in self.model_fields_set: - _dict['expires_in'] = None - - # set to None if password (nullable) is None - # and model_fields_set contains the field - if self.password is None and "password" in self.model_fields_set: - _dict['password'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ShareCreateIn from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "expires_in": obj.get("expires_in"), - "password": obj.get("password"), - "resource": obj.get("resource"), - "role": obj.get("role") if obj.get("role") is not None else 'viewer' - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/share_error_out.py b/sdk/python/agentdrive_sdk/models/share_error_out.py deleted file mode 100644 index 5fdd6df..0000000 --- a/sdk/python/agentdrive_sdk/models/share_error_out.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from agentdrive_sdk.models.error_body import ErrorBody -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class ShareErrorOut(BaseModel): - """ - Negotiated JSON error shape for the public share protocol. - """ # noqa: E501 - error: ErrorBody - __properties: ClassVar[List[str]] = ["error"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ShareErrorOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of error - if self.error: - _dict['error'] = self.error.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ShareErrorOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "error": ErrorBody.from_dict(obj["error"]) if obj.get("error") is not None else None - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/share_list.py b/sdk/python/agentdrive_sdk/models/share_list.py deleted file mode 100644 index 800641a..0000000 --- a/sdk/python/agentdrive_sdk/models/share_list.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from agentdrive_sdk.models.share_out import ShareOut -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class ShareList(BaseModel): - """ - ShareList - """ # noqa: E501 - items: List[ShareOut] - next_cursor: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["items", "next_cursor"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ShareList from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in items (list) - _items = [] - if self.items: - for _item_items in self.items: - if _item_items: - _items.append(_item_items.to_dict()) - _dict['items'] = _items - # set to None if next_cursor (nullable) is None - # and model_fields_set contains the field - if self.next_cursor is None and "next_cursor" in self.model_fields_set: - _dict['next_cursor'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ShareList from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "items": [ShareOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, - "next_cursor": obj.get("next_cursor") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/share_mint_out.py b/sdk/python/agentdrive_sdk/models/share_mint_out.py deleted file mode 100644 index 76b3e42..0000000 --- a/sdk/python/agentdrive_sdk/models/share_mint_out.py +++ /dev/null @@ -1,133 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class ShareMintOut(BaseModel): - """ - The create/rotate response — the ONLY place the `share_key` and its redemption `url` are exposed. - """ # noqa: E501 - access_count: Optional[StrictInt] = 0 - audience: StrictStr - created_at: datetime - expires_at: Optional[datetime] = None - has_password: StrictBool - id: StrictStr - last_accessed_at: Optional[datetime] = None - resource_id: StrictStr - resource_type: StrictStr - role: StrictStr - share_key: StrictStr - url: StrictStr - __properties: ClassVar[List[str]] = ["access_count", "audience", "created_at", "expires_at", "has_password", "id", "last_accessed_at", "resource_id", "resource_type", "role", "share_key", "url"] - - @field_validator('resource_type') - def resource_type_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['artifact', 'folder']): - raise ValueError("must be one of enum values ('artifact', 'folder')") - return value - - @field_validator('role') - def role_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['viewer', 'commenter', 'editor']): - raise ValueError("must be one of enum values ('viewer', 'commenter', 'editor')") - return value - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ShareMintOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if expires_at (nullable) is None - # and model_fields_set contains the field - if self.expires_at is None and "expires_at" in self.model_fields_set: - _dict['expires_at'] = None - - # set to None if last_accessed_at (nullable) is None - # and model_fields_set contains the field - if self.last_accessed_at is None and "last_accessed_at" in self.model_fields_set: - _dict['last_accessed_at'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ShareMintOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "access_count": obj.get("access_count") if obj.get("access_count") is not None else 0, - "audience": obj.get("audience"), - "created_at": obj.get("created_at"), - "expires_at": obj.get("expires_at"), - "has_password": obj.get("has_password"), - "id": obj.get("id"), - "last_accessed_at": obj.get("last_accessed_at"), - "resource_id": obj.get("resource_id"), - "resource_type": obj.get("resource_type"), - "role": obj.get("role"), - "share_key": obj.get("share_key"), - "url": obj.get("url") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/share_out.py b/sdk/python/agentdrive_sdk/models/share_out.py deleted file mode 100644 index ab27235..0000000 --- a/sdk/python/agentdrive_sdk/models/share_out.py +++ /dev/null @@ -1,129 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictBool, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class ShareOut(BaseModel): - """ - A live share link as seen on list/management — NEVER carries the `share_key` (that is the credential, returned only at mint/rotate). - """ # noqa: E501 - access_count: Optional[StrictInt] = 0 - audience: StrictStr - created_at: datetime - expires_at: Optional[datetime] = None - has_password: StrictBool - id: StrictStr - last_accessed_at: Optional[datetime] = None - resource_id: StrictStr - resource_type: StrictStr - role: StrictStr - __properties: ClassVar[List[str]] = ["access_count", "audience", "created_at", "expires_at", "has_password", "id", "last_accessed_at", "resource_id", "resource_type", "role"] - - @field_validator('resource_type') - def resource_type_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['artifact', 'folder']): - raise ValueError("must be one of enum values ('artifact', 'folder')") - return value - - @field_validator('role') - def role_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['viewer', 'commenter', 'editor']): - raise ValueError("must be one of enum values ('viewer', 'commenter', 'editor')") - return value - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ShareOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if expires_at (nullable) is None - # and model_fields_set contains the field - if self.expires_at is None and "expires_at" in self.model_fields_set: - _dict['expires_at'] = None - - # set to None if last_accessed_at (nullable) is None - # and model_fields_set contains the field - if self.last_accessed_at is None and "last_accessed_at" in self.model_fields_set: - _dict['last_accessed_at'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ShareOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "access_count": obj.get("access_count") if obj.get("access_count") is not None else 0, - "audience": obj.get("audience"), - "created_at": obj.get("created_at"), - "expires_at": obj.get("expires_at"), - "has_password": obj.get("has_password"), - "id": obj.get("id"), - "last_accessed_at": obj.get("last_accessed_at"), - "resource_id": obj.get("resource_id"), - "resource_type": obj.get("resource_type"), - "role": obj.get("role") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/share_redeem_out.py b/sdk/python/agentdrive_sdk/models/share_redeem_out.py deleted file mode 100644 index 9c18d6e..0000000 --- a/sdk/python/agentdrive_sdk/models/share_redeem_out.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class ShareRedeemOut(BaseModel): - """ - ShareRedeemOut - """ # noqa: E501 - expires_at: datetime - role: StrictStr - token: StrictStr - url: StrictStr - __properties: ClassVar[List[str]] = ["expires_at", "role", "token", "url"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ShareRedeemOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ShareRedeemOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "expires_at": obj.get("expires_at"), - "role": obj.get("role"), - "token": obj.get("token"), - "url": obj.get("url") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/source_ref.py b/sdk/python/agentdrive_sdk/models/source_ref.py deleted file mode 100644 index a38d498..0000000 --- a/sdk/python/agentdrive_sdk/models/source_ref.py +++ /dev/null @@ -1,95 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class SourceRef(BaseModel): - """ - One typed provenance ref. `type` is open-vocabulary (server validates only length, not the value), so callers can declare new types as their integrations evolve. `id` is the type-specific identifier — for `type='artifact'` this is an `art_…` ID. - """ # noqa: E501 - id: StrictStr - metadata: Optional[Dict[str, Any]] = None - type: StrictStr - __properties: ClassVar[List[str]] = ["id", "metadata", "type"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SourceRef from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if metadata (nullable) is None - # and model_fields_set contains the field - if self.metadata is None and "metadata" in self.model_fields_set: - _dict['metadata'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SourceRef from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "id": obj.get("id"), - "metadata": obj.get("metadata"), - "type": obj.get("type") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/storage_breakdown_out.py b/sdk/python/agentdrive_sdk/models/storage_breakdown_out.py deleted file mode 100644 index b2e2475..0000000 --- a/sdk/python/agentdrive_sdk/models/storage_breakdown_out.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import date -from pydantic import BaseModel, ConfigDict, StrictInt -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class StorageBreakdownOut(BaseModel): - """ - StorageBreakdownOut - """ # noqa: E501 - as_of: date - live_bytes: StrictInt - trash_bytes: StrictInt - version_bytes: StrictInt - __properties: ClassVar[List[str]] = ["as_of", "live_bytes", "trash_bytes", "version_bytes"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of StorageBreakdownOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of StorageBreakdownOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "as_of": obj.get("as_of"), - "live_bytes": obj.get("live_bytes"), - "trash_bytes": obj.get("trash_bytes"), - "version_bytes": obj.get("version_bytes") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/storage_footprint_out.py b/sdk/python/agentdrive_sdk/models/storage_footprint_out.py deleted file mode 100644 index 81e11bf..0000000 --- a/sdk/python/agentdrive_sdk/models/storage_footprint_out.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import date -from pydantic import BaseModel, ConfigDict, StrictInt -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class StorageFootprintOut(BaseModel): - """ - StorageFootprintOut - """ # noqa: E501 - as_of: Optional[date] = None - live_bytes: StrictInt - total_bytes: StrictInt - trash_bytes: StrictInt - version_bytes: StrictInt - __properties: ClassVar[List[str]] = ["as_of", "live_bytes", "total_bytes", "trash_bytes", "version_bytes"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of StorageFootprintOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if as_of (nullable) is None - # and model_fields_set contains the field - if self.as_of is None and "as_of" in self.model_fields_set: - _dict['as_of'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of StorageFootprintOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "as_of": obj.get("as_of"), - "live_bytes": obj.get("live_bytes"), - "total_bytes": obj.get("total_bytes"), - "trash_bytes": obj.get("trash_bytes"), - "version_bytes": obj.get("version_bytes") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/token_response.py b/sdk/python/agentdrive_sdk/models/token_response.py deleted file mode 100644 index e2cfbfa..0000000 --- a/sdk/python/agentdrive_sdk/models/token_response.py +++ /dev/null @@ -1,99 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class TokenResponse(BaseModel): - """ - `POST /oauth2/token` success response. Mirrors RFC 6749 with an optional `identity_assertion` field for the claim grant path (where a fresh post-claim assertion supersedes the pre-claim one). - """ # noqa: E501 - access_token: StrictStr - expires_in: StrictInt = Field(description="Seconds until access_token expiry.") - identity_assertion: Optional[StrictStr] = None - scope: StrictStr - token_type: Optional[StrictStr] = 'Bearer' - __properties: ClassVar[List[str]] = ["access_token", "expires_in", "identity_assertion", "scope", "token_type"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of TokenResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if identity_assertion (nullable) is None - # and model_fields_set contains the field - if self.identity_assertion is None and "identity_assertion" in self.model_fields_set: - _dict['identity_assertion'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of TokenResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "access_token": obj.get("access_token"), - "expires_in": obj.get("expires_in"), - "identity_assertion": obj.get("identity_assertion"), - "scope": obj.get("scope"), - "token_type": obj.get("token_type") if obj.get("token_type") is not None else 'Bearer' - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/token_usage_out.py b/sdk/python/agentdrive_sdk/models/token_usage_out.py deleted file mode 100644 index 6ae4fc2..0000000 --- a/sdk/python/agentdrive_sdk/models/token_usage_out.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictInt -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class TokenUsageOut(BaseModel): - """ - TokenUsageOut - """ # noqa: E501 - embed: StrictInt - llm_cached: StrictInt - llm_input: StrictInt - llm_output: StrictInt - __properties: ClassVar[List[str]] = ["embed", "llm_cached", "llm_input", "llm_output"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of TokenUsageOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of TokenUsageOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "embed": obj.get("embed"), - "llm_cached": obj.get("llm_cached"), - "llm_input": obj.get("llm_input"), - "llm_output": obj.get("llm_output") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/trash_artifact_out.py b/sdk/python/agentdrive_sdk/models/trash_artifact_out.py deleted file mode 100644 index 9b86a52..0000000 --- a/sdk/python/agentdrive_sdk/models/trash_artifact_out.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class TrashArtifactOut(BaseModel): - """ - TrashArtifactOut - """ # noqa: E501 - deleted_at: Optional[datetime] = None - id: StrictStr - path: StrictStr - purge_at: Optional[datetime] = None - restore_url: StrictStr - size_bytes: StrictInt - __properties: ClassVar[List[str]] = ["deleted_at", "id", "path", "purge_at", "restore_url", "size_bytes"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of TrashArtifactOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if deleted_at (nullable) is None - # and model_fields_set contains the field - if self.deleted_at is None and "deleted_at" in self.model_fields_set: - _dict['deleted_at'] = None - - # set to None if purge_at (nullable) is None - # and model_fields_set contains the field - if self.purge_at is None and "purge_at" in self.model_fields_set: - _dict['purge_at'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of TrashArtifactOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "deleted_at": obj.get("deleted_at"), - "id": obj.get("id"), - "path": obj.get("path"), - "purge_at": obj.get("purge_at"), - "restore_url": obj.get("restore_url"), - "size_bytes": obj.get("size_bytes") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/trash_drive_out.py b/sdk/python/agentdrive_sdk/models/trash_drive_out.py deleted file mode 100644 index 553f6c9..0000000 --- a/sdk/python/agentdrive_sdk/models/trash_drive_out.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class TrashDriveOut(BaseModel): - """ - TrashDriveOut - """ # noqa: E501 - deleted_at: Optional[datetime] = None - id: StrictStr - __properties: ClassVar[List[str]] = ["deleted_at", "id"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of TrashDriveOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if deleted_at (nullable) is None - # and model_fields_set contains the field - if self.deleted_at is None and "deleted_at" in self.model_fields_set: - _dict['deleted_at'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of TrashDriveOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "deleted_at": obj.get("deleted_at"), - "id": obj.get("id") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/trash_out.py b/sdk/python/agentdrive_sdk/models/trash_out.py deleted file mode 100644 index ac793be..0000000 --- a/sdk/python/agentdrive_sdk/models/trash_out.py +++ /dev/null @@ -1,116 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from agentdrive_sdk.models.trash_artifact_out import TrashArtifactOut -from agentdrive_sdk.models.trash_drive_out import TrashDriveOut -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class TrashOut(BaseModel): - """ - Trash collection with a compatibility-preserving pagination opt-in. - """ # noqa: E501 - artifacts: List[TrashArtifactOut] = Field(description="Deprecated alias of items.") - drive: TrashDriveOut - items: List[TrashArtifactOut] - next_cursor: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["artifacts", "drive", "items", "next_cursor"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of TrashOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in artifacts (list) - _items = [] - if self.artifacts: - for _item_artifacts in self.artifacts: - if _item_artifacts: - _items.append(_item_artifacts.to_dict()) - _dict['artifacts'] = _items - # override the default output from pydantic by calling `to_dict()` of drive - if self.drive: - _dict['drive'] = self.drive.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in items (list) - _items = [] - if self.items: - for _item_items in self.items: - if _item_items: - _items.append(_item_items.to_dict()) - _dict['items'] = _items - # set to None if next_cursor (nullable) is None - # and model_fields_set contains the field - if self.next_cursor is None and "next_cursor" in self.model_fields_set: - _dict['next_cursor'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of TrashOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "artifacts": [TrashArtifactOut.from_dict(_item) for _item in obj["artifacts"]] if obj.get("artifacts") is not None else None, - "drive": TrashDriveOut.from_dict(obj["drive"]) if obj.get("drive") is not None else None, - "items": [TrashArtifactOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, - "next_cursor": obj.get("next_cursor") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/upload_abort_out.py b/sdk/python/agentdrive_sdk/models/upload_abort_out.py deleted file mode 100644 index 5cc9704..0000000 --- a/sdk/python/agentdrive_sdk/models/upload_abort_out.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class UploadAbortOut(BaseModel): - """ - Response of `DELETE /v0/uploads/{upload_id}` — the session is released. `released_bytes` is the reservation returned to the drive's quota (the session's `size_bytes` for a live `initiated` session; `0` when the session was already aborted or already expired — the GC sweep owns an expired session's release). - """ # noqa: E501 - released_bytes: StrictInt - state: Optional[StrictStr] = 'aborted' - upload_id: StrictStr - __properties: ClassVar[List[str]] = ["released_bytes", "state", "upload_id"] - - @field_validator('state') - def state_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['aborted', 'expired']): - raise ValueError("must be one of enum values ('aborted', 'expired')") - return value - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UploadAbortOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UploadAbortOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "released_bytes": obj.get("released_bytes"), - "state": obj.get("state") if obj.get("state") is not None else 'aborted', - "upload_id": obj.get("upload_id") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/upload_begin_in.py b/sdk/python/agentdrive_sdk/models/upload_begin_in.py deleted file mode 100644 index 7d41476..0000000 --- a/sdk/python/agentdrive_sdk/models/upload_begin_in.py +++ /dev/null @@ -1,153 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from agentdrive_sdk.models.artifact_source import ArtifactSource -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class UploadBeginIn(BaseModel): - """ - Body of `POST /v0/uploads` — the large-upload begin call (large-upload- design.md §5.1). All artifact decisions are frozen here; the subsequent GCS PUT carries only bytes, and `commit` carries only the `upload_id`. `labels`/`metadata`/`source` omitted (null) ⇒ preserve the existing artifact's value at commit; present (incl. empty) ⇒ replace. - """ # noqa: E501 - actor_name: Optional[Annotated[str, Field(strict=True, max_length=64)]] = None - change_summary: Optional[StrictStr] = None - content_type: Optional[StrictStr] = 'application/octet-stream' - cors_origin: Optional[StrictStr] = Field(default=None, description="Web origin (scheme://host[:port]) of the browser that will PUT the bytes, e.g. `https://app.example.com`. Set this when the `upload_url` is handed to browser code: GCS binds CORS at session initiate, so the returned session only echoes `Access-Control-Allow-Origin` (and is thus PUT-able from a browser) when opened with the caller's origin. A trusted backend relaying a browser upload forwards the browser's `Origin` here. Omit for server/desktop uploads (no CORS enforcement).") - crc32c: Optional[StrictStr] = None - if_match: Optional[Annotated[int, Field(le=2147483647, strict=True, ge=0)]] = None - if_none_match: Optional[StrictBool] = False - labels: Optional[List[StrictStr]] = None - metadata: Optional[Dict[str, Any]] = None - path: StrictStr - size_bytes: Annotated[int, Field(strict=True, ge=1)] - source: Optional[ArtifactSource] = None - __properties: ClassVar[List[str]] = ["actor_name", "change_summary", "content_type", "cors_origin", "crc32c", "if_match", "if_none_match", "labels", "metadata", "path", "size_bytes", "source"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UploadBeginIn from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of source - if self.source: - _dict['source'] = self.source.to_dict() - # set to None if actor_name (nullable) is None - # and model_fields_set contains the field - if self.actor_name is None and "actor_name" in self.model_fields_set: - _dict['actor_name'] = None - - # set to None if change_summary (nullable) is None - # and model_fields_set contains the field - if self.change_summary is None and "change_summary" in self.model_fields_set: - _dict['change_summary'] = None - - # set to None if cors_origin (nullable) is None - # and model_fields_set contains the field - if self.cors_origin is None and "cors_origin" in self.model_fields_set: - _dict['cors_origin'] = None - - # set to None if crc32c (nullable) is None - # and model_fields_set contains the field - if self.crc32c is None and "crc32c" in self.model_fields_set: - _dict['crc32c'] = None - - # set to None if if_match (nullable) is None - # and model_fields_set contains the field - if self.if_match is None and "if_match" in self.model_fields_set: - _dict['if_match'] = None - - # set to None if labels (nullable) is None - # and model_fields_set contains the field - if self.labels is None and "labels" in self.model_fields_set: - _dict['labels'] = None - - # set to None if metadata (nullable) is None - # and model_fields_set contains the field - if self.metadata is None and "metadata" in self.model_fields_set: - _dict['metadata'] = None - - # set to None if source (nullable) is None - # and model_fields_set contains the field - if self.source is None and "source" in self.model_fields_set: - _dict['source'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UploadBeginIn from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "actor_name": obj.get("actor_name"), - "change_summary": obj.get("change_summary"), - "content_type": obj.get("content_type") if obj.get("content_type") is not None else 'application/octet-stream', - "cors_origin": obj.get("cors_origin"), - "crc32c": obj.get("crc32c"), - "if_match": obj.get("if_match"), - "if_none_match": obj.get("if_none_match") if obj.get("if_none_match") is not None else False, - "labels": obj.get("labels"), - "metadata": obj.get("metadata"), - "path": obj.get("path"), - "size_bytes": obj.get("size_bytes"), - "source": ArtifactSource.from_dict(obj["source"]) if obj.get("source") is not None else None - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/upload_begin_out.py b/sdk/python/agentdrive_sdk/models/upload_begin_out.py deleted file mode 100644 index edd6627..0000000 --- a/sdk/python/agentdrive_sdk/models/upload_begin_out.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class UploadBeginOut(BaseModel): - """ - Response of `POST /v0/uploads`. PUT the bytes to `upload_url` (no auth header — the URL is the credential), then `POST .../commit`. - """ # noqa: E501 - expires_at: datetime - headers: Dict[str, StrictStr] - max_bytes: StrictInt - method: Optional[StrictStr] = 'PUT' - upload_id: StrictStr - upload_url: StrictStr - __properties: ClassVar[List[str]] = ["expires_at", "headers", "max_bytes", "method", "upload_id", "upload_url"] - - @field_validator('method') - def method_validate_enum(cls, value): - """Validates the enum""" - if value is None: - return value - - if value not in set(['PUT']): - raise ValueError("must be one of enum values ('PUT')") - return value - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UploadBeginOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UploadBeginOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "expires_at": obj.get("expires_at"), - "headers": obj.get("headers"), - "max_bytes": obj.get("max_bytes"), - "method": obj.get("method") if obj.get("method") is not None else 'PUT', - "upload_id": obj.get("upload_id"), - "upload_url": obj.get("upload_url") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/upload_status_out.py b/sdk/python/agentdrive_sdk/models/upload_status_out.py deleted file mode 100644 index 641c757..0000000 --- a/sdk/python/agentdrive_sdk/models/upload_status_out.py +++ /dev/null @@ -1,115 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class UploadStatusOut(BaseModel): - """ - Response of `GET /v0/uploads/{upload_id}` — the live state of a direct-to-GCS upload session (large-upload-design.md §5). `state` is derived, not a stored column: * `initiated` — session open; PUT the bytes to the `upload_url`, then `POST /v0/uploads/{upload_id}/commit`. * `committed` — the bytes landed and the artifact was created (`committed_at` is set). * `aborted` — released via `DELETE /v0/uploads/{upload_id}`. * `expired` — past `expires_at` without a commit; the reservation is reclaimed by the GC sweep. - """ # noqa: E501 - committed_at: Optional[datetime] = None - content_type: StrictStr - created_at: datetime - expires_at: datetime - max_bytes: StrictInt - path: StrictStr - size_bytes: StrictInt - state: StrictStr - upload_id: StrictStr - __properties: ClassVar[List[str]] = ["committed_at", "content_type", "created_at", "expires_at", "max_bytes", "path", "size_bytes", "state", "upload_id"] - - @field_validator('state') - def state_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['initiated', 'committed', 'aborted', 'expired']): - raise ValueError("must be one of enum values ('initiated', 'committed', 'aborted', 'expired')") - return value - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UploadStatusOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if committed_at (nullable) is None - # and model_fields_set contains the field - if self.committed_at is None and "committed_at" in self.model_fields_set: - _dict['committed_at'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UploadStatusOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "committed_at": obj.get("committed_at"), - "content_type": obj.get("content_type"), - "created_at": obj.get("created_at"), - "expires_at": obj.get("expires_at"), - "max_bytes": obj.get("max_bytes"), - "path": obj.get("path"), - "size_bytes": obj.get("size_bytes"), - "state": obj.get("state"), - "upload_id": obj.get("upload_id") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/usage_counter_out.py b/sdk/python/agentdrive_sdk/models/usage_counter_out.py deleted file mode 100644 index 01340f6..0000000 --- a/sdk/python/agentdrive_sdk/models/usage_counter_out.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictInt -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class UsageCounterOut(BaseModel): - """ - UsageCounterOut - """ # noqa: E501 - limit: StrictInt - used: StrictInt - __properties: ClassVar[List[str]] = ["limit", "used"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UsageCounterOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UsageCounterOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "limit": obj.get("limit"), - "used": obj.get("used") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/usage_period_out.py b/sdk/python/agentdrive_sdk/models/usage_period_out.py deleted file mode 100644 index bf1266a..0000000 --- a/sdk/python/agentdrive_sdk/models/usage_period_out.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class UsagePeriodOut(BaseModel): - """ - UsagePeriodOut - """ # noqa: E501 - ends: datetime - starts: datetime - year_month: StrictStr - __properties: ClassVar[List[str]] = ["ends", "starts", "year_month"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UsagePeriodOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UsagePeriodOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "ends": obj.get("ends"), - "starts": obj.get("starts"), - "year_month": obj.get("year_month") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/user_token_list.py b/sdk/python/agentdrive_sdk/models/user_token_list.py deleted file mode 100644 index 2c0205c..0000000 --- a/sdk/python/agentdrive_sdk/models/user_token_list.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from agentdrive_sdk.models.user_token_out import UserTokenOut -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class UserTokenList(BaseModel): - """ - UserTokenList - """ # noqa: E501 - items: List[UserTokenOut] - next_cursor: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["items", "next_cursor"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserTokenList from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in items (list) - _items = [] - if self.items: - for _item_items in self.items: - if _item_items: - _items.append(_item_items.to_dict()) - _dict['items'] = _items - # set to None if next_cursor (nullable) is None - # and model_fields_set contains the field - if self.next_cursor is None and "next_cursor" in self.model_fields_set: - _dict['next_cursor'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserTokenList from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "items": [UserTokenOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, - "next_cursor": obj.get("next_cursor") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/user_token_out.py b/sdk/python/agentdrive_sdk/models/user_token_out.py deleted file mode 100644 index 0286f6f..0000000 --- a/sdk/python/agentdrive_sdk/models/user_token_out.py +++ /dev/null @@ -1,135 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class UserTokenOut(BaseModel): - """ - One `ad_user_` token — metadata only. The raw token is NEVER exposed over the API (minting is web-only, reveal-once); this shape omits both the raw value and the stored hash by construction. - """ # noqa: E501 - created_at: datetime - default_drive_id: Optional[StrictStr] = None - expires_at: Optional[datetime] = None - id: StrictStr - label: Optional[StrictStr] = None - last_used_at: Optional[datetime] = None - prefix: StrictStr - revoked_at: Optional[datetime] = None - scope: StrictStr - __properties: ClassVar[List[str]] = ["created_at", "default_drive_id", "expires_at", "id", "label", "last_used_at", "prefix", "revoked_at", "scope"] - - @field_validator('scope') - def scope_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['read', 'full']): - raise ValueError("must be one of enum values ('read', 'full')") - return value - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UserTokenOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if default_drive_id (nullable) is None - # and model_fields_set contains the field - if self.default_drive_id is None and "default_drive_id" in self.model_fields_set: - _dict['default_drive_id'] = None - - # set to None if expires_at (nullable) is None - # and model_fields_set contains the field - if self.expires_at is None and "expires_at" in self.model_fields_set: - _dict['expires_at'] = None - - # set to None if label (nullable) is None - # and model_fields_set contains the field - if self.label is None and "label" in self.model_fields_set: - _dict['label'] = None - - # set to None if last_used_at (nullable) is None - # and model_fields_set contains the field - if self.last_used_at is None and "last_used_at" in self.model_fields_set: - _dict['last_used_at'] = None - - # set to None if revoked_at (nullable) is None - # and model_fields_set contains the field - if self.revoked_at is None and "revoked_at" in self.model_fields_set: - _dict['revoked_at'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UserTokenOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "created_at": obj.get("created_at"), - "default_drive_id": obj.get("default_drive_id"), - "expires_at": obj.get("expires_at"), - "id": obj.get("id"), - "label": obj.get("label"), - "last_used_at": obj.get("last_used_at"), - "prefix": obj.get("prefix"), - "revoked_at": obj.get("revoked_at"), - "scope": obj.get("scope") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/validation_error_body.py b/sdk/python/agentdrive_sdk/models/validation_error_body.py deleted file mode 100644 index 9cacb6a..0000000 --- a/sdk/python/agentdrive_sdk/models/validation_error_body.py +++ /dev/null @@ -1,111 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List -from agentdrive_sdk.models.validation_issue import ValidationIssue -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class ValidationErrorBody(BaseModel): - """ - ValidationErrorBody - """ # noqa: E501 - code: StrictStr - fields: List[ValidationIssue] - message: StrictStr - additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["code", "fields", "message"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ValidationErrorBody from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - * Fields in `self.additional_properties` are added to the output dict. - """ - excluded_fields: Set[str] = set([ - "additional_properties", - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in fields (list) - _items = [] - if self.fields: - for _item_fields in self.fields: - if _item_fields: - _items.append(_item_fields.to_dict()) - _dict['fields'] = _items - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ValidationErrorBody from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "code": obj.get("code"), - "fields": [ValidationIssue.from_dict(_item) for _item in obj["fields"]] if obj.get("fields") is not None else None, - "message": obj.get("message") - }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj diff --git a/sdk/python/agentdrive_sdk/models/validation_error_detail.py b/sdk/python/agentdrive_sdk/models/validation_error_detail.py deleted file mode 100644 index 2b3497f..0000000 --- a/sdk/python/agentdrive_sdk/models/validation_error_detail.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from agentdrive_sdk.models.validation_error_body import ValidationErrorBody -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class ValidationErrorDetail(BaseModel): - """ - ValidationErrorDetail - """ # noqa: E501 - error: ValidationErrorBody - additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["error"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ValidationErrorDetail from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - * Fields in `self.additional_properties` are added to the output dict. - """ - excluded_fields: Set[str] = set([ - "additional_properties", - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of error - if self.error: - _dict['error'] = self.error.to_dict() - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ValidationErrorDetail from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "error": ValidationErrorBody.from_dict(obj["error"]) if obj.get("error") is not None else None - }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj diff --git a/sdk/python/agentdrive_sdk/models/validation_error_response.py b/sdk/python/agentdrive_sdk/models/validation_error_response.py deleted file mode 100644 index 496cd74..0000000 --- a/sdk/python/agentdrive_sdk/models/validation_error_response.py +++ /dev/null @@ -1,103 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from agentdrive_sdk.models.validation_error_detail import ValidationErrorDetail -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class ValidationErrorResponse(BaseModel): - """ - The runtime `VALIDATION_ERROR` response for request parsing failures. - """ # noqa: E501 - detail: ValidationErrorDetail - additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["detail"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ValidationErrorResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - * Fields in `self.additional_properties` are added to the output dict. - """ - excluded_fields: Set[str] = set([ - "additional_properties", - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of detail - if self.detail: - _dict['detail'] = self.detail.to_dict() - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ValidationErrorResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "detail": ValidationErrorDetail.from_dict(obj["detail"]) if obj.get("detail") is not None else None - }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj diff --git a/sdk/python/agentdrive_sdk/models/validation_issue.py b/sdk/python/agentdrive_sdk/models/validation_issue.py deleted file mode 100644 index 6523096..0000000 --- a/sdk/python/agentdrive_sdk/models/validation_issue.py +++ /dev/null @@ -1,128 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from agentdrive_sdk.models.loc_inner import LocInner -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class ValidationIssue(BaseModel): - """ - One Pydantic/FastAPI validation issue. - """ # noqa: E501 - ctx: Optional[Dict[str, Any]] = None - input: Optional[Any] = None - loc: List[LocInner] - msg: StrictStr - type: StrictStr - additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["ctx", "input", "loc", "msg", "type"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ValidationIssue from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - * Fields in `self.additional_properties` are added to the output dict. - """ - excluded_fields: Set[str] = set([ - "additional_properties", - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of input - if self.input: - _dict['input'] = self.input.to_dict() - # override the default output from pydantic by calling `to_dict()` of each item in loc (list) - _items = [] - if self.loc: - for _item_loc in self.loc: - if _item_loc: - _items.append(_item_loc.to_dict()) - _dict['loc'] = _items - # puts key-value pairs in additional_properties in the top level - if self.additional_properties is not None: - for _key, _value in self.additional_properties.items(): - _dict[_key] = _value - - # set to None if ctx (nullable) is None - # and model_fields_set contains the field - if self.ctx is None and "ctx" in self.model_fields_set: - _dict['ctx'] = None - - # set to None if input (nullable) is None - # and model_fields_set contains the field - if self.input is None and "input" in self.model_fields_set: - _dict['input'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ValidationIssue from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "ctx": obj.get("ctx"), - "input": AnyOf.from_dict(obj["input"]) if obj.get("input") is not None else None, - "loc": [LocInner.from_dict(_item) for _item in obj["loc"]] if obj.get("loc") is not None else None, - "msg": obj.get("msg"), - "type": obj.get("type") - }) - # store additional fields in additional_properties - for _key in obj.keys(): - if _key not in cls.__properties: - _obj.additional_properties[_key] = obj.get(_key) - - return _obj diff --git a/sdk/python/agentdrive_sdk/models/version_out.py b/sdk/python/agentdrive_sdk/models/version_out.py deleted file mode 100644 index d38c84d..0000000 --- a/sdk/python/agentdrive_sdk/models/version_out.py +++ /dev/null @@ -1,112 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class VersionOut(BaseModel): - """ - VersionOut - """ # noqa: E501 - actor_name: Optional[Annotated[str, Field(strict=True, max_length=64)]] = None - art_id: StrictStr - change_summary: Optional[StrictStr] = None - content_type: StrictStr - created_at: datetime - hash: StrictStr - size_bytes: StrictInt - version_number: StrictInt - __properties: ClassVar[List[str]] = ["actor_name", "art_id", "change_summary", "content_type", "created_at", "hash", "size_bytes", "version_number"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of VersionOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if actor_name (nullable) is None - # and model_fields_set contains the field - if self.actor_name is None and "actor_name" in self.model_fields_set: - _dict['actor_name'] = None - - # set to None if change_summary (nullable) is None - # and model_fields_set contains the field - if self.change_summary is None and "change_summary" in self.model_fields_set: - _dict['change_summary'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of VersionOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "actor_name": obj.get("actor_name"), - "art_id": obj.get("art_id"), - "change_summary": obj.get("change_summary"), - "content_type": obj.get("content_type"), - "created_at": obj.get("created_at"), - "hash": obj.get("hash"), - "size_bytes": obj.get("size_bytes"), - "version_number": obj.get("version_number") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/version_page.py b/sdk/python/agentdrive_sdk/models/version_page.py deleted file mode 100644 index c2c5075..0000000 --- a/sdk/python/agentdrive_sdk/models/version_page.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from agentdrive_sdk.models.version_out import VersionOut -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class VersionPage(BaseModel): - """ - VersionPage - """ # noqa: E501 - items: List[VersionOut] - next_cursor: Optional[StrictStr] = None - pruned_before: Optional[StrictInt] = None - __properties: ClassVar[List[str]] = ["items", "next_cursor", "pruned_before"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of VersionPage from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in items (list) - _items = [] - if self.items: - for _item_items in self.items: - if _item_items: - _items.append(_item_items.to_dict()) - _dict['items'] = _items - # set to None if next_cursor (nullable) is None - # and model_fields_set contains the field - if self.next_cursor is None and "next_cursor" in self.model_fields_set: - _dict['next_cursor'] = None - - # set to None if pruned_before (nullable) is None - # and model_fields_set contains the field - if self.pruned_before is None and "pruned_before" in self.model_fields_set: - _dict['pruned_before'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of VersionPage from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "items": [VersionOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, - "next_cursor": obj.get("next_cursor"), - "pruned_before": obj.get("pruned_before") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/version_retention_out.py b/sdk/python/agentdrive_sdk/models/version_retention_out.py deleted file mode 100644 index c140e8e..0000000 --- a/sdk/python/agentdrive_sdk/models/version_retention_out.py +++ /dev/null @@ -1,86 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictInt -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class VersionRetentionOut(BaseModel): - """ - VersionRetentionOut - """ # noqa: E501 - versions_max: StrictInt - __properties: ClassVar[List[str]] = ["versions_max"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of VersionRetentionOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of VersionRetentionOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "versions_max": obj.get("versions_max") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/workspace_create_in.py b/sdk/python/agentdrive_sdk/models/workspace_create_in.py deleted file mode 100644 index dd3c8c1..0000000 --- a/sdk/python/agentdrive_sdk/models/workspace_create_in.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class WorkspaceCreateIn(BaseModel): - """ - POST /v0/workspaces body. `name` is the user-facing workspace label; the creator becomes its admin and gets a starter drive. - """ # noqa: E501 - name: Annotated[str, Field(min_length=1, strict=True, max_length=120)] - __properties: ClassVar[List[str]] = ["name"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of WorkspaceCreateIn from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of WorkspaceCreateIn from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/workspace_create_out.py b/sdk/python/agentdrive_sdk/models/workspace_create_out.py deleted file mode 100644 index 5df05d8..0000000 --- a/sdk/python/agentdrive_sdk/models/workspace_create_out.py +++ /dev/null @@ -1,94 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List -from agentdrive_sdk.models.workspace_out import WorkspaceOut -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class WorkspaceCreateOut(BaseModel): - """ - POST /v0/workspaces response. Carries the new workspace + its starter drive's `ad_live_` key **once** (`starter_drive_api_key`) — reveal-once, store it now (mint more keys via `POST /v0/drives/{id}/keys`). - """ # noqa: E501 - starter_drive_api_key: StrictStr - starter_drive_id: StrictStr - workspace: WorkspaceOut - __properties: ClassVar[List[str]] = ["starter_drive_api_key", "starter_drive_id", "workspace"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of WorkspaceCreateOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of workspace - if self.workspace: - _dict['workspace'] = self.workspace.to_dict() - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of WorkspaceCreateOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "starter_drive_api_key": obj.get("starter_drive_api_key"), - "starter_drive_id": obj.get("starter_drive_id"), - "workspace": WorkspaceOut.from_dict(obj["workspace"]) if obj.get("workspace") is not None else None - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/workspace_list.py b/sdk/python/agentdrive_sdk/models/workspace_list.py deleted file mode 100644 index 13e46d8..0000000 --- a/sdk/python/agentdrive_sdk/models/workspace_list.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from agentdrive_sdk.models.workspace_out import WorkspaceOut -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class WorkspaceList(BaseModel): - """ - WorkspaceList - """ # noqa: E501 - items: List[WorkspaceOut] - next_cursor: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["items", "next_cursor"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of WorkspaceList from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in items (list) - _items = [] - if self.items: - for _item_items in self.items: - if _item_items: - _items.append(_item_items.to_dict()) - _dict['items'] = _items - # set to None if next_cursor (nullable) is None - # and model_fields_set contains the field - if self.next_cursor is None and "next_cursor" in self.model_fields_set: - _dict['next_cursor'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of WorkspaceList from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "items": [WorkspaceOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, - "next_cursor": obj.get("next_cursor") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/workspace_out.py b/sdk/python/agentdrive_sdk/models/workspace_out.py deleted file mode 100644 index 3e28de9..0000000 --- a/sdk/python/agentdrive_sdk/models/workspace_out.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictStr, field_validator -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class WorkspaceOut(BaseModel): - """ - One workspace in a listing — metadata only. `role` is the CALLER's role in it (admin/member), so a client can render management affordances without a second round-trip. - """ # noqa: E501 - created_at: datetime - id: StrictStr - name: StrictStr - role: StrictStr - tier_id: StrictStr - __properties: ClassVar[List[str]] = ["created_at", "id", "name", "role", "tier_id"] - - @field_validator('role') - def role_validate_enum(cls, value): - """Validates the enum""" - if value not in set(['admin', 'member']): - raise ValueError("must be one of enum values ('admin', 'member')") - return value - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of WorkspaceOut from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of WorkspaceOut from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "created_at": obj.get("created_at"), - "id": obj.get("id"), - "name": obj.get("name"), - "role": obj.get("role"), - "tier_id": obj.get("tier_id") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/models/workspace_rename_in.py b/sdk/python/agentdrive_sdk/models/workspace_rename_in.py deleted file mode 100644 index d46a06f..0000000 --- a/sdk/python/agentdrive_sdk/models/workspace_rename_in.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self -from pydantic_core import to_jsonable_python - -class WorkspaceRenameIn(BaseModel): - """ - PATCH /v0/workspaces/{org} body — rename a workspace the caller administers. - """ # noqa: E501 - name: Annotated[str, Field(min_length=1, strict=True, max_length=120)] - __properties: ClassVar[List[str]] = ["name"] - - model_config = ConfigDict( - validate_by_name=True, - validate_by_alias=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - return json.dumps(to_jsonable_python(self.to_dict())) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of WorkspaceRenameIn from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of WorkspaceRenameIn from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name") - }) - return _obj diff --git a/sdk/python/agentdrive_sdk/rest.py b/sdk/python/agentdrive_sdk/rest.py deleted file mode 100644 index 1e49079..0000000 --- a/sdk/python/agentdrive_sdk/rest.py +++ /dev/null @@ -1,313 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import ipaddress -import io -import json -import re -import ssl -from urllib.parse import urlparse - -import urllib3 - -from agentdrive_sdk.exceptions import ApiException, ApiValueError - -SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} -RESTResponseType = urllib3.HTTPResponse - - -def is_socks_proxy_url(url): - if url is None: - return False - split_section = url.split("://") - if len(split_section) < 2: - return False - else: - return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES - - -def should_bypass_proxies(url: str, no_proxy: str) -> bool: - """Return whether ``url`` matches the comma-separated ``no_proxy`` rules.""" - parsed_url = urlparse(url) - if not parsed_url.hostname: - return True - - host = parsed_url.hostname.lower() - host_and_port = parsed_url.netloc.lower() - try: - host_ip = ipaddress.ip_address(host) - except ValueError: - host_ip = None - - for entry in (entry.strip().lower() for entry in no_proxy.split(',')): - if not entry: - continue - if entry == '*': - return True - - if host_ip is not None: - try: - if host_ip in ipaddress.ip_network(entry, strict=False): - return True - except ValueError: - pass - - entry = entry.lstrip('.') - if ( - host == entry - or host.endswith('.' + entry) - or host_and_port == entry - or host_and_port.endswith('.' + entry) - ): - return True - - return False - - -class RESTResponse(io.IOBase): - - def __init__(self, resp) -> None: - self.response = resp - self.status = resp.status - self.reason = resp.reason - self.data = None - - def read(self): - if self.data is None: - self.data = self.response.data - return self.data - - @property - def headers(self): - """Returns a dictionary of response headers.""" - return self.response.headers - - def getheaders(self): - """Returns a dictionary of the response headers; use ``headers`` instead.""" - return self.response.headers - - def getheader(self, name, default=None): - """Returns a given response header; use ``headers.get()`` instead.""" - return self.response.headers.get(name, default) - - -class RESTClientObject: - - def __init__(self, configuration) -> None: - # urllib3.PoolManager will pass all kw parameters to connectionpool - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 - # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 - # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 - - # cert_reqs - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - pool_args = { - "cert_reqs": cert_reqs, - "ca_certs": configuration.ssl_ca_cert, - "cert_file": configuration.cert_file, - "key_file": configuration.key_file, - "ca_cert_data": configuration.ca_cert_data, - } - if configuration.assert_hostname is not None: - pool_args['assert_hostname'] = ( - configuration.assert_hostname - ) - - if configuration.retries is not None: - pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - pool_args['server_hostname'] = configuration.tls_server_name - - - if configuration.socket_options is not None: - pool_args['socket_options'] = configuration.socket_options - - if configuration.connection_pool_maxsize is not None: - pool_args['maxsize'] = configuration.connection_pool_maxsize - - # https pool manager - self.pool_manager: urllib3.PoolManager - - if configuration.proxy and not should_bypass_proxies( - configuration.host, configuration.no_proxy or '' - ): - if is_socks_proxy_url(configuration.proxy): - from urllib3.contrib.socks import SOCKSProxyManager - pool_args["proxy_url"] = configuration.proxy - pool_args["headers"] = configuration.proxy_headers - self.pool_manager = SOCKSProxyManager(**pool_args) - else: - pool_args["proxy_url"] = configuration.proxy - pool_args["proxy_headers"] = configuration.proxy_headers - self.pool_manager = urllib3.ProxyManager(**pool_args) - else: - self.pool_manager = urllib3.PoolManager(**pool_args) - - def request( - self, - method, - url, - headers=None, - body=None, - post_params=None, - _request_timeout=None - ): - """Perform requests. - - :param method: http request method - :param url: http request url - :param headers: http request headers - :param body: request json body, for `application/json` - :param post_params: request post parameters, - `application/x-www-form-urlencoded` - and `multipart/form-data` - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - """ - method = method.upper() - assert method in [ - 'GET', - 'HEAD', - 'DELETE', - 'POST', - 'PUT', - 'PATCH', - 'OPTIONS' - ] - - if post_params and body: - raise ApiValueError( - "body parameter cannot be used with post_params parameter." - ) - - post_params = post_params or {} - headers = headers or {} - - timeout = None - if _request_timeout: - if isinstance(_request_timeout, (int, float)): - timeout = urllib3.Timeout(total=_request_timeout) - elif ( - isinstance(_request_timeout, tuple) - and len(_request_timeout) == 2 - ): - timeout = urllib3.Timeout( - connect=_request_timeout[0], - read=_request_timeout[1] - ) - - try: - # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` - if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: - - content_type = headers.get('Content-Type') - is_json = ( - not content_type - or re.search('json', content_type, re.IGNORECASE) - ) - # JSON is valid YAML 1.2, so structured YAML bodies can use - # the existing JSON serializer: - # https://yaml.org/spec/1.2.2/#13-relation-to-json - is_structured_yaml = ( - content_type - and re.search('yaml', content_type, re.IGNORECASE) - and not isinstance(body, (str, bytes)) - ) - if is_json or is_structured_yaml: - request_body = None - if body is not None: - request_body = json.dumps(body) - r = self.pool_manager.request( - method, - url, - body=request_body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'application/x-www-form-urlencoded': - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=False, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif content_type == 'multipart/form-data': - # must del headers['Content-Type'], or the correct - # Content-Type which generated by urllib3 will be - # overwritten. - del headers['Content-Type'] - # Ensures that dict objects are serialized - post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] - r = self.pool_manager.request( - method, - url, - fields=post_params, - encode_multipart=True, - timeout=timeout, - headers=headers, - preload_content=False - ) - # Pass a `string` parameter directly in the body to support - # other content types than JSON when `body` argument is - # provided in serialized form. - elif isinstance(body, str) or isinstance(body, bytes): - r = self.pool_manager.request( - method, - url, - body=body, - timeout=timeout, - headers=headers, - preload_content=False - ) - elif headers['Content-Type'].startswith('text/') and isinstance(body, bool): - request_body = "true" if body else "false" - r = self.pool_manager.request( - method, - url, - body=request_body, - preload_content=False, - timeout=timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request( - method, - url, - fields={}, - timeout=timeout, - headers=headers, - preload_content=False - ) - except urllib3.exceptions.SSLError as e: - msg = "\n".join([type(e).__name__, str(e)]) - raise ApiException(status=0, reason=msg) - - return RESTResponse(r) diff --git a/sdk/python/docs/AgentAuthApi.md b/sdk/python/docs/AgentAuthApi.md deleted file mode 100644 index 13ca036..0000000 --- a/sdk/python/docs/AgentAuthApi.md +++ /dev/null @@ -1,565 +0,0 @@ -# agentdrive_sdk.AgentAuthApi - -All URIs are relative to *https://api.agentdrive.run* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**extension_exchange_v0_auth_extension_exchange_post**](AgentAuthApi.md#extension_exchange_v0_auth_extension_exchange_post) | **POST** /v0/auth/extension/exchange | Redeem an extension OAuth ticket for a JWT pair -[**initiate_claim_agent_identity_claim_post**](AgentAuthApi.md#initiate_claim_agent_identity_claim_post) | **POST** /agent/identity/claim | Initiate the human-claim ceremony for an agent identity -[**jwks_well_known_jwks_json_get**](AgentAuthApi.md#jwks_well_known_jwks_json_get) | **GET** /.well-known/jwks.json | JSON Web Key Set — public keys for verifying AgentDrive JWTs -[**oauth2_token_oauth2_token_post**](AgentAuthApi.md#oauth2_token_oauth2_token_post) | **POST** /oauth2/token | Exchange a credential for an access_token -[**oauth_authorization_server_well_known_oauth_authorization_server_get**](AgentAuthApi.md#oauth_authorization_server_well_known_oauth_authorization_server_get) | **GET** /.well-known/oauth-authorization-server | Authorization-server metadata (RFC 8414 + auth.md agent_auth block) -[**oauth_protected_resource_mcp_well_known_oauth_protected_resource_mcp_get**](AgentAuthApi.md#oauth_protected_resource_mcp_well_known_oauth_protected_resource_mcp_get) | **GET** /.well-known/oauth-protected-resource/mcp | Protected-resource metadata for the MCP endpoint (RFC 9728 §3.1) -[**oauth_protected_resource_well_known_oauth_protected_resource_get**](AgentAuthApi.md#oauth_protected_resource_well_known_oauth_protected_resource_get) | **GET** /.well-known/oauth-protected-resource | Protected-resource metadata (auth.md / RFC 9728-like discovery) -[**register_agent_identity_agent_identity_post**](AgentAuthApi.md#register_agent_identity_agent_identity_post) | **POST** /agent/identity | Register an agent identity (anonymous or ID-JAG) - - -# **extension_exchange_v0_auth_extension_exchange_post** -> ExtensionExchangeResponse extension_exchange_v0_auth_extension_exchange_post(extension_exchange_request) - -Redeem an extension OAuth ticket for a JWT pair - -Single-use opaque ticket → JWT pair. Called once by an extension's auth-complete.html after the OAuth handoff lands. Returns a 15-minute `access_token` (scope=extension) and a 90-day `identity_assertion` the extension stores and refreshes via POST /oauth2/token. - -### Example - - -```python -import agentdrive_sdk -from agentdrive_sdk.models.extension_exchange_request import ExtensionExchangeRequest -from agentdrive_sdk.models.extension_exchange_response import ExtensionExchangeResponse -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.AgentAuthApi(api_client) - extension_exchange_request = agentdrive_sdk.ExtensionExchangeRequest() # ExtensionExchangeRequest | - - try: - # Redeem an extension OAuth ticket for a JWT pair - api_response = api_instance.extension_exchange_v0_auth_extension_exchange_post(extension_exchange_request) - print("The response of AgentAuthApi->extension_exchange_v0_auth_extension_exchange_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AgentAuthApi->extension_exchange_v0_auth_extension_exchange_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **extension_exchange_request** | [**ExtensionExchangeRequest**](ExtensionExchangeRequest.md)| | - -### Return type - -[**ExtensionExchangeResponse**](ExtensionExchangeResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**400** | The extension ID or ticket is invalid. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | Too many extension sign-in attempts. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| -**503** | Extension authentication or token signing is unavailable. | * X-Request-Id - Request correlation identifier.
| - -[[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) - -# **initiate_claim_agent_identity_claim_post** -> ClaimInitResponse initiate_claim_agent_identity_claim_post(claim_init_request) - -Initiate the human-claim ceremony for an agent identity - -Returns a `user_code` and `verification_uri` (RFC 8628 device-code idiom). The agent surfaces these to the human, who visits the URI, signs in, and approves the claim. The agent then polls POST /oauth2/token (grant_type=claim) with the same `claim_token` to learn when the claim completes. - -### Example - - -```python -import agentdrive_sdk -from agentdrive_sdk.models.claim_init_request import ClaimInitRequest -from agentdrive_sdk.models.claim_init_response import ClaimInitResponse -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.AgentAuthApi(api_client) - claim_init_request = agentdrive_sdk.ClaimInitRequest() # ClaimInitRequest | - - try: - # Initiate the human-claim ceremony for an agent identity - api_response = api_instance.initiate_claim_agent_identity_claim_post(claim_init_request) - print("The response of AgentAuthApi->initiate_claim_agent_identity_claim_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AgentAuthApi->initiate_claim_agent_identity_claim_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **claim_init_request** | [**ClaimInitRequest**](ClaimInitRequest.md)| | - -### Return type - -[**ClaimInitResponse**](ClaimInitResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| - -[[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) - -# **jwks_well_known_jwks_json_get** -> JwksOut jwks_well_known_jwks_json_get() - -JSON Web Key Set — public keys for verifying AgentDrive JWTs - -Public half of the RSA signing key for identity_assertion + access_token JWTs issued by AgentDrive. RFC 7517 shape. Cache-friendly; key rotation publishes both kids during the overlap window. - -### Example - - -```python -import agentdrive_sdk -from agentdrive_sdk.models.jwks_out import JwksOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.AgentAuthApi(api_client) - - try: - # JSON Web Key Set — public keys for verifying AgentDrive JWTs - api_response = api_instance.jwks_well_known_jwks_json_get() - print("The response of AgentAuthApi->jwks_well_known_jwks_json_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AgentAuthApi->jwks_well_known_jwks_json_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**JwksOut**](JwksOut.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| - -[[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) - -# **oauth2_token_oauth2_token_post** -> TokenResponse oauth2_token_oauth2_token_post(grant_type, assertion=assertion, claim_token=claim_token) - -Exchange a credential for an access_token - -Two grant types: - -**`urn:ietf:params:oauth:grant-type:jwt-bearer`** (RFC 7523) — body `assertion=`. Returns a fresh 15-minute access_token with the same scope as the assertion. - -**`claim`** (custom) — body `claim_token=`. Polling endpoint for the claim ceremony. Returns one of: `authorization_pending` (400), `expired_token` (400), `access_denied` (400), or access_token + new identity_assertion + scope=full (200). - -### Example - - -```python -import agentdrive_sdk -from agentdrive_sdk.models.token_response import TokenResponse -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.AgentAuthApi(api_client) - grant_type = 'grant_type_example' # str | - assertion = 'assertion_example' # str | (optional) - claim_token = 'claim_token_example' # str | (optional) - - try: - # Exchange a credential for an access_token - api_response = api_instance.oauth2_token_oauth2_token_post(grant_type, assertion=assertion, claim_token=claim_token) - print("The response of AgentAuthApi->oauth2_token_oauth2_token_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AgentAuthApi->oauth2_token_oauth2_token_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **grant_type** | **str**| | - **assertion** | **str**| | [optional] - **claim_token** | **str**| | [optional] - -### Return type - -[**TokenResponse**](TokenResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| - -[[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) - -# **oauth_authorization_server_well_known_oauth_authorization_server_get** -> AuthorizationServerMetadataOut oauth_authorization_server_well_known_oauth_authorization_server_get() - -Authorization-server metadata (RFC 8414 + auth.md agent_auth block) - -Discovery document for the auth.md protocol. Carries the standard RFC 8414 fields plus an `agent_auth` block per the auth.md spec — the latter is what an agent runtime keys off to find the identity + claim endpoints. - -### Example - - -```python -import agentdrive_sdk -from agentdrive_sdk.models.authorization_server_metadata_out import AuthorizationServerMetadataOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.AgentAuthApi(api_client) - - try: - # Authorization-server metadata (RFC 8414 + auth.md agent_auth block) - api_response = api_instance.oauth_authorization_server_well_known_oauth_authorization_server_get() - print("The response of AgentAuthApi->oauth_authorization_server_well_known_oauth_authorization_server_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AgentAuthApi->oauth_authorization_server_well_known_oauth_authorization_server_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**AuthorizationServerMetadataOut**](AuthorizationServerMetadataOut.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| - -[[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) - -# **oauth_protected_resource_mcp_well_known_oauth_protected_resource_mcp_get** -> ProtectedResourceMetadataOut oauth_protected_resource_mcp_well_known_oauth_protected_resource_mcp_get() - -Protected-resource metadata for the MCP endpoint (RFC 9728 §3.1) - -Path-inserted variant of the protected-resource document. MCP clients derive this URL from the resource URL `{origin}/mcp` (RFC 9728 §3.1: insert the well-known segment between host and path) after reading the WWW-Authenticate challenge on a 401 — it is the first hop of the client-side OAuth flow. - -### Example - - -```python -import agentdrive_sdk -from agentdrive_sdk.models.protected_resource_metadata_out import ProtectedResourceMetadataOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.AgentAuthApi(api_client) - - try: - # Protected-resource metadata for the MCP endpoint (RFC 9728 §3.1) - api_response = api_instance.oauth_protected_resource_mcp_well_known_oauth_protected_resource_mcp_get() - print("The response of AgentAuthApi->oauth_protected_resource_mcp_well_known_oauth_protected_resource_mcp_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AgentAuthApi->oauth_protected_resource_mcp_well_known_oauth_protected_resource_mcp_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**ProtectedResourceMetadataOut**](ProtectedResourceMetadataOut.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| - -[[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) - -# **oauth_protected_resource_well_known_oauth_protected_resource_get** -> ProtectedResourceMetadataOut oauth_protected_resource_well_known_oauth_protected_resource_get() - -Protected-resource metadata (auth.md / RFC 9728-like discovery) - -Names this server as a protected resource and points clients at the authorization server they should obtain tokens from. In this design the resource server and authorization server are the same host. - -### Example - - -```python -import agentdrive_sdk -from agentdrive_sdk.models.protected_resource_metadata_out import ProtectedResourceMetadataOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.AgentAuthApi(api_client) - - try: - # Protected-resource metadata (auth.md / RFC 9728-like discovery) - api_response = api_instance.oauth_protected_resource_well_known_oauth_protected_resource_get() - print("The response of AgentAuthApi->oauth_protected_resource_well_known_oauth_protected_resource_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AgentAuthApi->oauth_protected_resource_well_known_oauth_protected_resource_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**ProtectedResourceMetadataOut**](ProtectedResourceMetadataOut.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| - -[[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) - -# **register_agent_identity_agent_identity_post** -> AnonymousIdentityResponse register_agent_identity_agent_identity_post(request_body) - -Register an agent identity (anonymous or ID-JAG) - -Two registration modes: - -**`type=anonymous`** — Provisions a brand-new agent identity bound to a fresh shadow-org drive. No human involved; returned `identity_assertion` carries `scope=pre_claim`. A human completes the claim ceremony later via /claim. - -**`type=identity_assertion`** — Agent provider (e.g. WorkOS) has already minted an ID-JAG asserting a user identity binding. We verify it against the provider's JWKS and provision a **claimed** identity immediately: scope=full, drive bound to the user, no claim ceremony needed. - -### Example - - -```python -import agentdrive_sdk -from agentdrive_sdk.models.anonymous_identity_response import AnonymousIdentityResponse -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.AgentAuthApi(api_client) - request_body = None # Dict[str, Optional[object]] | - - try: - # Register an agent identity (anonymous or ID-JAG) - api_response = api_instance.register_agent_identity_agent_identity_post(request_body) - print("The response of AgentAuthApi->register_agent_identity_agent_identity_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling AgentAuthApi->register_agent_identity_agent_identity_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **request_body** | [**Dict[str, Optional[object]]**](object.md)| | - -### Return type - -[**AnonymousIdentityResponse**](AnonymousIdentityResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**503** | Agent identity signing is not configured. | * X-Request-Id - Request correlation identifier.
| - -[[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/sdk/python/docs/AgentAuthMetadataOut.md b/sdk/python/docs/AgentAuthMetadataOut.md deleted file mode 100644 index e566be5..0000000 --- a/sdk/python/docs/AgentAuthMetadataOut.md +++ /dev/null @@ -1,33 +0,0 @@ -# AgentAuthMetadataOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**claim_endpoint** | **str** | | -**events_endpoint** | **str** | | -**identity_assertion** | [**IdentityAssertionMetadataOut**](IdentityAssertionMetadataOut.md) | | -**identity_endpoint** | **str** | | -**identity_types_supported** | **List[str]** | | -**skill** | **str** | | -**spec_version** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.agent_auth_metadata_out import AgentAuthMetadataOut - -# TODO update the JSON string below -json = "{}" -# create an instance of AgentAuthMetadataOut from a JSON string -agent_auth_metadata_out_instance = AgentAuthMetadataOut.from_json(json) -# print the JSON string representation of the object -print(AgentAuthMetadataOut.to_json()) - -# convert the object into a dict -agent_auth_metadata_out_dict = agent_auth_metadata_out_instance.to_dict() -# create an instance of AgentAuthMetadataOut from a dict -agent_auth_metadata_out_from_dict = AgentAuthMetadataOut.from_dict(agent_auth_metadata_out_dict) -``` -[[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/sdk/python/docs/AnonymousIdentityResponse.md b/sdk/python/docs/AnonymousIdentityResponse.md deleted file mode 100644 index 1a6cbcc..0000000 --- a/sdk/python/docs/AnonymousIdentityResponse.md +++ /dev/null @@ -1,33 +0,0 @@ -# AnonymousIdentityResponse - -`POST /agent/identity` response on the anonymous path. The agent stores `identity_assertion` as its long-lived credential and uses `claim_token` to initiate the claim ceremony when the human is ready. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agent_identity_id** | **str** | | -**claim_metadata** | [**ClaimMetadata**](ClaimMetadata.md) | | -**claim_token** | **str** | Opaque server-issued secret. Present at POST /agent/identity/claim and at POST /oauth2/token (grant_type=claim). | -**drive_id** | **str** | | -**expires_at** | **datetime** | | -**identity_assertion** | **str** | JWT signed by AgentDrive, scope=pre_claim. 30-day TTL. | - -## Example - -```python -from agentdrive_sdk.models.anonymous_identity_response import AnonymousIdentityResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of AnonymousIdentityResponse from a JSON string -anonymous_identity_response_instance = AnonymousIdentityResponse.from_json(json) -# print the JSON string representation of the object -print(AnonymousIdentityResponse.to_json()) - -# convert the object into a dict -anonymous_identity_response_dict = anonymous_identity_response_instance.to_dict() -# create an instance of AnonymousIdentityResponse from a dict -anonymous_identity_response_from_dict = AnonymousIdentityResponse.from_dict(anonymous_identity_response_dict) -``` -[[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/sdk/python/docs/ArtifactDeleteOut.md b/sdk/python/docs/ArtifactDeleteOut.md deleted file mode 100644 index bba3b29..0000000 --- a/sdk/python/docs/ArtifactDeleteOut.md +++ /dev/null @@ -1,33 +0,0 @@ -# ArtifactDeleteOut - -DELETE /v0/artifacts/{art_id} response — the soft-delete receipt. Reversible until the GC cron hard-deletes at `purge_at`; `restore_url` points at the by-id restore endpoint (deletion-design.md §5.3). - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**deleted_at** | **datetime** | | -**id** | **str** | | -**ok** | **bool** | | [optional] [default to True] -**path** | **str** | | -**purge_at** | **datetime** | | -**restore_url** | **str** | | [optional] - -## Example - -```python -from agentdrive_sdk.models.artifact_delete_out import ArtifactDeleteOut - -# TODO update the JSON string below -json = "{}" -# create an instance of ArtifactDeleteOut from a JSON string -artifact_delete_out_instance = ArtifactDeleteOut.from_json(json) -# print the JSON string representation of the object -print(ArtifactDeleteOut.to_json()) - -# convert the object into a dict -artifact_delete_out_dict = artifact_delete_out_instance.to_dict() -# create an instance of ArtifactDeleteOut from a dict -artifact_delete_out_from_dict = ArtifactDeleteOut.from_dict(artifact_delete_out_dict) -``` -[[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/sdk/python/docs/ArtifactHeadOut.md b/sdk/python/docs/ArtifactHeadOut.md deleted file mode 100644 index 1aac8e4..0000000 --- a/sdk/python/docs/ArtifactHeadOut.md +++ /dev/null @@ -1,27 +0,0 @@ -# ArtifactHeadOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**version** | **int** | | - -## Example - -```python -from agentdrive_sdk.models.artifact_head_out import ArtifactHeadOut - -# TODO update the JSON string below -json = "{}" -# create an instance of ArtifactHeadOut from a JSON string -artifact_head_out_instance = ArtifactHeadOut.from_json(json) -# print the JSON string representation of the object -print(ArtifactHeadOut.to_json()) - -# convert the object into a dict -artifact_head_out_dict = artifact_head_out_instance.to_dict() -# create an instance of ArtifactHeadOut from a dict -artifact_head_out_from_dict = ArtifactHeadOut.from_dict(artifact_head_out_dict) -``` -[[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/sdk/python/docs/ArtifactMoveIn.md b/sdk/python/docs/ArtifactMoveIn.md deleted file mode 100644 index e246d59..0000000 --- a/sdk/python/docs/ArtifactMoveIn.md +++ /dev/null @@ -1,28 +0,0 @@ -# ArtifactMoveIn - -POST /v0/artifacts/{art_id}/move body — rename / move to a new path on the same drive. Mirrors `FolderMoveIn`; its own schema (vs. reusing another body) keeps the move surface self-documenting in the OpenAPI spec. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**path** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.artifact_move_in import ArtifactMoveIn - -# TODO update the JSON string below -json = "{}" -# create an instance of ArtifactMoveIn from a JSON string -artifact_move_in_instance = ArtifactMoveIn.from_json(json) -# print the JSON string representation of the object -print(ArtifactMoveIn.to_json()) - -# convert the object into a dict -artifact_move_in_dict = artifact_move_in_instance.to_dict() -# create an instance of ArtifactMoveIn from a dict -artifact_move_in_from_dict = ArtifactMoveIn.from_dict(artifact_move_in_dict) -``` -[[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/sdk/python/docs/ArtifactOut.md b/sdk/python/docs/ArtifactOut.md deleted file mode 100644 index 5b3ac61..0000000 --- a/sdk/python/docs/ArtifactOut.md +++ /dev/null @@ -1,46 +0,0 @@ -# ArtifactOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**content_type** | **str** | | -**created_at** | **datetime** | | -**drive_id** | **str** | | -**embedded_at** | **datetime** | | [optional] -**etag** | **str** | | -**file_type** | **str** | | -**hash** | **str** | | -**id** | **str** | | -**indexed_at** | **datetime** | | [optional] -**labels** | **List[str]** | | [optional] -**llm_index** | **Dict[str, object]** | | [optional] -**metadata** | **Dict[str, object]** | | [optional] -**metageneration** | **int** | | [optional] [default to 1] -**path** | **str** | | -**permalink** | **str** | | -**size_bytes** | **int** | | -**source** | [**ArtifactSource**](ArtifactSource.md) | | [optional] -**updated_at** | **datetime** | | -**url** | **str** | | -**version_number** | **int** | | [optional] [default to 1] - -## Example - -```python -from agentdrive_sdk.models.artifact_out import ArtifactOut - -# TODO update the JSON string below -json = "{}" -# create an instance of ArtifactOut from a JSON string -artifact_out_instance = ArtifactOut.from_json(json) -# print the JSON string representation of the object -print(ArtifactOut.to_json()) - -# convert the object into a dict -artifact_out_dict = artifact_out_instance.to_dict() -# create an instance of ArtifactOut from a dict -artifact_out_from_dict = ArtifactOut.from_dict(artifact_out_dict) -``` -[[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/sdk/python/docs/ArtifactPatchIn.md b/sdk/python/docs/ArtifactPatchIn.md deleted file mode 100644 index fff3df5..0000000 --- a/sdk/python/docs/ArtifactPatchIn.md +++ /dev/null @@ -1,30 +0,0 @@ -# ArtifactPatchIn - -PATCH /v0/artifacts/{art_id} body — metadata-only partial (JSON-merge-patch) update. Every field is optional. Presence is what matters, not the value: a field left out of the body (per Pydantic `model_fields_set`) is left unchanged; a field that IS present is applied — with an explicit `null` / `[]` / `{}` meaning \"clear it\". This mirrors the MCP `set_metadata` tool and the core `patch_artifact_metadata` sentinel semantics (omitted = preserve, present = replace/clear). * `labels` — replace the label set; `[]` or `null` clears it. * `metadata` — replace the free-form metadata object; `{}` or `null` clears it. * `source` — replace provenance refs; `null` (or `{\"refs\": []}`) clears them. PATCH is metadata-only: to move/rename an artifact, use `POST /v0/artifacts/{art_id}/move`. `extra=\"forbid\"` makes a stray field (notably a legacy `path`) a hard 422 rather than a silent no-op — a clean-break signal to migrate to the move verb. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**labels** | **List[str]** | | [optional] -**metadata** | **Dict[str, object]** | | [optional] -**source** | [**ArtifactSource**](ArtifactSource.md) | | [optional] - -## Example - -```python -from agentdrive_sdk.models.artifact_patch_in import ArtifactPatchIn - -# TODO update the JSON string below -json = "{}" -# create an instance of ArtifactPatchIn from a JSON string -artifact_patch_in_instance = ArtifactPatchIn.from_json(json) -# print the JSON string representation of the object -print(ArtifactPatchIn.to_json()) - -# convert the object into a dict -artifact_patch_in_dict = artifact_patch_in_instance.to_dict() -# create an instance of ArtifactPatchIn from a dict -artifact_patch_in_from_dict = ArtifactPatchIn.from_dict(artifact_patch_in_dict) -``` -[[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/sdk/python/docs/ArtifactSource.md b/sdk/python/docs/ArtifactSource.md deleted file mode 100644 index 9f649d8..0000000 --- a/sdk/python/docs/ArtifactSource.md +++ /dev/null @@ -1,28 +0,0 @@ -# ArtifactSource - -Caller-supplied provenance metadata, attached to an artifact. v0.6 model: a list of typed refs. The legacy v0.5 fields (`agent_id`, `run_id`, `prompt_hash`) were never validated and are superseded by the `refs` shape (an agent-id ref would be `{\"type\": \"agent\", \"id\": \"...\"}` in v0.6 vocabulary). - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**refs** | [**List[SourceRef]**](SourceRef.md) | | [optional] - -## Example - -```python -from agentdrive_sdk.models.artifact_source import ArtifactSource - -# TODO update the JSON string below -json = "{}" -# create an instance of ArtifactSource from a JSON string -artifact_source_instance = ArtifactSource.from_json(json) -# print the JSON string representation of the object -print(ArtifactSource.to_json()) - -# convert the object into a dict -artifact_source_dict = artifact_source_instance.to_dict() -# create an instance of ArtifactSource from a dict -artifact_source_from_dict = ArtifactSource.from_dict(artifact_source_dict) -``` -[[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/sdk/python/docs/AuthorizationServerMetadataOut.md b/sdk/python/docs/AuthorizationServerMetadataOut.md deleted file mode 100644 index 34aa81d..0000000 --- a/sdk/python/docs/AuthorizationServerMetadataOut.md +++ /dev/null @@ -1,41 +0,0 @@ -# AuthorizationServerMetadataOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**agent_auth** | [**AgentAuthMetadataOut**](AgentAuthMetadataOut.md) | | -**authorization_endpoint** | **str** | | -**authorization_response_iss_parameter_supported** | **bool** | | -**code_challenge_methods_supported** | **List[str]** | | -**grant_types_supported** | **List[str]** | | -**issuer** | **str** | | -**jwks_uri** | **str** | | -**registration_endpoint** | **str** | | -**response_modes_supported** | **List[str]** | | -**response_types_supported** | **List[str]** | | -**revocation_endpoint** | **str** | | -**revocation_endpoint_auth_methods_supported** | **List[str]** | | -**scopes_supported** | **List[str]** | | -**token_endpoint** | **str** | | -**token_endpoint_auth_methods_supported** | **List[str]** | | - -## Example - -```python -from agentdrive_sdk.models.authorization_server_metadata_out import AuthorizationServerMetadataOut - -# TODO update the JSON string below -json = "{}" -# create an instance of AuthorizationServerMetadataOut from a JSON string -authorization_server_metadata_out_instance = AuthorizationServerMetadataOut.from_json(json) -# print the JSON string representation of the object -print(AuthorizationServerMetadataOut.to_json()) - -# convert the object into a dict -authorization_server_metadata_out_dict = authorization_server_metadata_out_instance.to_dict() -# create an instance of AuthorizationServerMetadataOut from a dict -authorization_server_metadata_out_from_dict = AuthorizationServerMetadataOut.from_dict(authorization_server_metadata_out_dict) -``` -[[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/sdk/python/docs/AuthorizeDecisionOauth2AuthorizePost403Response.md b/sdk/python/docs/AuthorizeDecisionOauth2AuthorizePost403Response.md deleted file mode 100644 index 31ab148..0000000 --- a/sdk/python/docs/AuthorizeDecisionOauth2AuthorizePost403Response.md +++ /dev/null @@ -1,29 +0,0 @@ -# AuthorizeDecisionOauth2AuthorizePost403Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **str** | | -**error_description** | **str** | | [optional] -**detail** | [**ErrorDetail**](ErrorDetail.md) | | - -## Example - -```python -from agentdrive_sdk.models.authorize_decision_oauth2_authorize_post403_response import AuthorizeDecisionOauth2AuthorizePost403Response - -# TODO update the JSON string below -json = "{}" -# create an instance of AuthorizeDecisionOauth2AuthorizePost403Response from a JSON string -authorize_decision_oauth2_authorize_post403_response_instance = AuthorizeDecisionOauth2AuthorizePost403Response.from_json(json) -# print the JSON string representation of the object -print(AuthorizeDecisionOauth2AuthorizePost403Response.to_json()) - -# convert the object into a dict -authorize_decision_oauth2_authorize_post403_response_dict = authorize_decision_oauth2_authorize_post403_response_instance.to_dict() -# create an instance of AuthorizeDecisionOauth2AuthorizePost403Response from a dict -authorize_decision_oauth2_authorize_post403_response_from_dict = AuthorizeDecisionOauth2AuthorizePost403Response.from_dict(authorize_decision_oauth2_authorize_post403_response_dict) -``` -[[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/sdk/python/docs/ClaimInitRequest.md b/sdk/python/docs/ClaimInitRequest.md deleted file mode 100644 index 050fd2b..0000000 --- a/sdk/python/docs/ClaimInitRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# ClaimInitRequest - -`POST /agent/identity/claim` body. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**claim_token** | **str** | The per-identity claim_token returned by POST /agent/identity. | -**email** | **str** | Optional hint to display on the /claim page so the human knows which account the agent expected. Not enforced (design §14 question #3). | [optional] - -## Example - -```python -from agentdrive_sdk.models.claim_init_request import ClaimInitRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of ClaimInitRequest from a JSON string -claim_init_request_instance = ClaimInitRequest.from_json(json) -# print the JSON string representation of the object -print(ClaimInitRequest.to_json()) - -# convert the object into a dict -claim_init_request_dict = claim_init_request_instance.to_dict() -# create an instance of ClaimInitRequest from a dict -claim_init_request_from_dict = ClaimInitRequest.from_dict(claim_init_request_dict) -``` -[[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/sdk/python/docs/ClaimInitResponse.md b/sdk/python/docs/ClaimInitResponse.md deleted file mode 100644 index c90b9dd..0000000 --- a/sdk/python/docs/ClaimInitResponse.md +++ /dev/null @@ -1,31 +0,0 @@ -# ClaimInitResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**claim_attempt_token** | **str** | Per-attempt opaque token; the agent does not need to present it. | -**expires_at** | **datetime** | | -**user_code** | **str** | Human-readable code the user types/sees on /claim. | -**verification_uri** | **str** | URL to direct the human to. | -**verification_uri_complete** | **str** | Convenience: same as `verification_uri` but with the user_code pre-baked so the human doesn't have to type it. RFC 8628 idiom. | - -## Example - -```python -from agentdrive_sdk.models.claim_init_response import ClaimInitResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of ClaimInitResponse from a JSON string -claim_init_response_instance = ClaimInitResponse.from_json(json) -# print the JSON string representation of the object -print(ClaimInitResponse.to_json()) - -# convert the object into a dict -claim_init_response_dict = claim_init_response_instance.to_dict() -# create an instance of ClaimInitResponse from a dict -claim_init_response_from_dict = ClaimInitResponse.from_dict(claim_init_response_dict) -``` -[[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/sdk/python/docs/ClaimMetadata.md b/sdk/python/docs/ClaimMetadata.md deleted file mode 100644 index f3bb97d..0000000 --- a/sdk/python/docs/ClaimMetadata.md +++ /dev/null @@ -1,29 +0,0 @@ -# ClaimMetadata - -Hints the agent's UI/CLI can use when initiating the claim ceremony. Decoupled from the `claim_token` itself so future additions don't change the token's shape. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**claim_endpoint** | **str** | | -**supported_email_hints** | **bool** | | [optional] [default to True] - -## Example - -```python -from agentdrive_sdk.models.claim_metadata import ClaimMetadata - -# TODO update the JSON string below -json = "{}" -# create an instance of ClaimMetadata from a JSON string -claim_metadata_instance = ClaimMetadata.from_json(json) -# print the JSON string representation of the object -print(ClaimMetadata.to_json()) - -# convert the object into a dict -claim_metadata_dict = claim_metadata_instance.to_dict() -# create an instance of ClaimMetadata from a dict -claim_metadata_from_dict = ClaimMetadata.from_dict(claim_metadata_dict) -``` -[[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/sdk/python/docs/ClientRegistrationOut.md b/sdk/python/docs/ClientRegistrationOut.md deleted file mode 100644 index 7ecef74..0000000 --- a/sdk/python/docs/ClientRegistrationOut.md +++ /dev/null @@ -1,34 +0,0 @@ -# ClientRegistrationOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client_id** | **str** | | -**client_id_issued_at** | **int** | | -**client_name** | **str** | | -**grant_types** | **List[str]** | | -**redirect_uris** | **List[str]** | | -**response_types** | **List[str]** | | -**scope** | **str** | | -**token_endpoint_auth_method** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.client_registration_out import ClientRegistrationOut - -# TODO update the JSON string below -json = "{}" -# create an instance of ClientRegistrationOut from a JSON string -client_registration_out_instance = ClientRegistrationOut.from_json(json) -# print the JSON string representation of the object -print(ClientRegistrationOut.to_json()) - -# convert the object into a dict -client_registration_out_dict = client_registration_out_instance.to_dict() -# create an instance of ClientRegistrationOut from a dict -client_registration_out_from_dict = ClientRegistrationOut.from_dict(client_registration_out_dict) -``` -[[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/sdk/python/docs/CompileDiagnosticOut.md b/sdk/python/docs/CompileDiagnosticOut.md deleted file mode 100644 index c497975..0000000 --- a/sdk/python/docs/CompileDiagnosticOut.md +++ /dev/null @@ -1,32 +0,0 @@ -# CompileDiagnosticOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**category** | **str** | | [optional] -**file** | **str** | | [optional] -**line** | **int** | | [optional] -**message** | **str** | | -**severity** | **str** | | -**suggestion** | **str** | | [optional] - -## Example - -```python -from agentdrive_sdk.models.compile_diagnostic_out import CompileDiagnosticOut - -# TODO update the JSON string below -json = "{}" -# create an instance of CompileDiagnosticOut from a JSON string -compile_diagnostic_out_instance = CompileDiagnosticOut.from_json(json) -# print the JSON string representation of the object -print(CompileDiagnosticOut.to_json()) - -# convert the object into a dict -compile_diagnostic_out_dict = compile_diagnostic_out_instance.to_dict() -# create an instance of CompileDiagnosticOut from a dict -compile_diagnostic_out_from_dict = CompileDiagnosticOut.from_dict(compile_diagnostic_out_dict) -``` -[[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/sdk/python/docs/CompileJobIn.md b/sdk/python/docs/CompileJobIn.md deleted file mode 100644 index 0e9ab4c..0000000 --- a/sdk/python/docs/CompileJobIn.md +++ /dev/null @@ -1,28 +0,0 @@ -# CompileJobIn - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**options** | [**CompileOptions**](CompileOptions.md) | | [optional] -**task** | **str** | | [optional] [default to 'latex.compile'] - -## Example - -```python -from agentdrive_sdk.models.compile_job_in import CompileJobIn - -# TODO update the JSON string below -json = "{}" -# create an instance of CompileJobIn from a JSON string -compile_job_in_instance = CompileJobIn.from_json(json) -# print the JSON string representation of the object -print(CompileJobIn.to_json()) - -# convert the object into a dict -compile_job_in_dict = compile_job_in_instance.to_dict() -# create an instance of CompileJobIn from a dict -compile_job_in_from_dict = CompileJobIn.from_dict(compile_job_in_dict) -``` -[[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/sdk/python/docs/CompileJobListOut.md b/sdk/python/docs/CompileJobListOut.md deleted file mode 100644 index 3127b0a..0000000 --- a/sdk/python/docs/CompileJobListOut.md +++ /dev/null @@ -1,29 +0,0 @@ -# CompileJobListOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**items** | [**List[CompileJobOut]**](CompileJobOut.md) | | -**jobs** | [**List[CompileJobOut]**](CompileJobOut.md) | Deprecated same-value alias for `items`; retained for compatibility. | -**next_cursor** | **str** | Opaque continuation token, or null when the listing is complete. | [optional] - -## Example - -```python -from agentdrive_sdk.models.compile_job_list_out import CompileJobListOut - -# TODO update the JSON string below -json = "{}" -# create an instance of CompileJobListOut from a JSON string -compile_job_list_out_instance = CompileJobListOut.from_json(json) -# print the JSON string representation of the object -print(CompileJobListOut.to_json()) - -# convert the object into a dict -compile_job_list_out_dict = compile_job_list_out_instance.to_dict() -# create an instance of CompileJobListOut from a dict -compile_job_list_out_from_dict = CompileJobListOut.from_dict(compile_job_list_out_dict) -``` -[[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/sdk/python/docs/CompileJobOut.md b/sdk/python/docs/CompileJobOut.md deleted file mode 100644 index a62ba87..0000000 --- a/sdk/python/docs/CompileJobOut.md +++ /dev/null @@ -1,35 +0,0 @@ -# CompileJobOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**cache_hit** | **bool** | | -**diagnostics** | [**List[CompileDiagnosticOut]**](CompileDiagnosticOut.md) | | [optional] -**duration_ms** | **int** | | [optional] -**engine** | **str** | | -**job_id** | **str** | | -**logs_url** | **str** | | [optional] -**output** | **Dict[str, object]** | | [optional] -**status** | **str** | | -**task** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.compile_job_out import CompileJobOut - -# TODO update the JSON string below -json = "{}" -# create an instance of CompileJobOut from a JSON string -compile_job_out_instance = CompileJobOut.from_json(json) -# print the JSON string representation of the object -print(CompileJobOut.to_json()) - -# convert the object into a dict -compile_job_out_dict = compile_job_out_instance.to_dict() -# create an instance of CompileJobOut from a dict -compile_job_out_from_dict = CompileJobOut.from_dict(compile_job_out_dict) -``` -[[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/sdk/python/docs/CompileOptions.md b/sdk/python/docs/CompileOptions.md deleted file mode 100644 index 366bc22..0000000 --- a/sdk/python/docs/CompileOptions.md +++ /dev/null @@ -1,29 +0,0 @@ -# CompileOptions - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**engine** | **str** | | [optional] -**entrypoint** | **str** | | [optional] -**wait** | **bool** | | [optional] [default to False] - -## Example - -```python -from agentdrive_sdk.models.compile_options import CompileOptions - -# TODO update the JSON string below -json = "{}" -# create an instance of CompileOptions from a JSON string -compile_options_instance = CompileOptions.from_json(json) -# print the JSON string representation of the object -print(CompileOptions.to_json()) - -# convert the object into a dict -compile_options_dict = compile_options_instance.to_dict() -# create an instance of CompileOptions from a dict -compile_options_from_dict = CompileOptions.from_dict(compile_options_dict) -``` -[[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/sdk/python/docs/CompileProjectOut.md b/sdk/python/docs/CompileProjectOut.md deleted file mode 100644 index 3540b41..0000000 --- a/sdk/python/docs/CompileProjectOut.md +++ /dev/null @@ -1,30 +0,0 @@ -# CompileProjectOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**auto_compile** | **bool** | | -**engine** | **str** | | -**entrypoint** | **str** | | -**fld_id** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.compile_project_out import CompileProjectOut - -# TODO update the JSON string below -json = "{}" -# create an instance of CompileProjectOut from a JSON string -compile_project_out_instance = CompileProjectOut.from_json(json) -# print the JSON string representation of the object -print(CompileProjectOut.to_json()) - -# convert the object into a dict -compile_project_out_dict = compile_project_out_instance.to_dict() -# create an instance of CompileProjectOut from a dict -compile_project_out_from_dict = CompileProjectOut.from_dict(compile_project_out_dict) -``` -[[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/sdk/python/docs/CopyIn.md b/sdk/python/docs/CopyIn.md deleted file mode 100644 index 6441c9a..0000000 --- a/sdk/python/docs/CopyIn.md +++ /dev/null @@ -1,30 +0,0 @@ -# CopyIn - -POST /v0/artifacts/{art_id}/copy body — duplicate to new path. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**from_generation** | **int** | | [optional] -**path** | **str** | | -**source** | [**ArtifactSource**](ArtifactSource.md) | | [optional] - -## Example - -```python -from agentdrive_sdk.models.copy_in import CopyIn - -# TODO update the JSON string below -json = "{}" -# create an instance of CopyIn from a JSON string -copy_in_instance = CopyIn.from_json(json) -# print the JSON string representation of the object -print(CopyIn.to_json()) - -# convert the object into a dict -copy_in_dict = copy_in_instance.to_dict() -# create an instance of CopyIn from a dict -copy_in_from_dict = CopyIn.from_dict(copy_in_dict) -``` -[[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/sdk/python/docs/DatasetDescriptionOut.md b/sdk/python/docs/DatasetDescriptionOut.md deleted file mode 100644 index 36d2d70..0000000 --- a/sdk/python/docs/DatasetDescriptionOut.md +++ /dev/null @@ -1,28 +0,0 @@ -# DatasetDescriptionOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**columns** | [**List[QueryColumnOut]**](QueryColumnOut.md) | | -**dataset** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.dataset_description_out import DatasetDescriptionOut - -# TODO update the JSON string below -json = "{}" -# create an instance of DatasetDescriptionOut from a JSON string -dataset_description_out_instance = DatasetDescriptionOut.from_json(json) -# print the JSON string representation of the object -print(DatasetDescriptionOut.to_json()) - -# convert the object into a dict -dataset_description_out_dict = dataset_description_out_instance.to_dict() -# create an instance of DatasetDescriptionOut from a dict -dataset_description_out_from_dict = DatasetDescriptionOut.from_dict(dataset_description_out_dict) -``` -[[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/sdk/python/docs/DefaultApi.md b/sdk/python/docs/DefaultApi.md deleted file mode 100644 index 4566836..0000000 --- a/sdk/python/docs/DefaultApi.md +++ /dev/null @@ -1,7020 +0,0 @@ -# agentdrive_sdk.DefaultApi - -All URIs are relative to *https://api.agentdrive.run* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**abort_upload_v0_uploads_upload_id_delete**](DefaultApi.md#abort_upload_v0_uploads_upload_id_delete) | **DELETE** /v0/uploads/{upload_id} | Abort a large (direct-to-GCS) upload session -[**begin_upload_v0_uploads_post**](DefaultApi.md#begin_upload_v0_uploads_post) | **POST** /v0/uploads | Begin a large (direct-to-GCS) upload -[**callback_auth_callback_get**](DefaultApi.md#callback_auth_callback_get) | **GET** /auth/callback | Callback -[**cancel_job_v0_jobs_job_id_cancel_post**](DefaultApi.md#cancel_job_v0_jobs_job_id_cancel_post) | **POST** /v0/jobs/{job_id}/cancel | Cancel a queued/running job -[**commit_upload_v0_uploads_upload_id_commit_post**](DefaultApi.md#commit_upload_v0_uploads_upload_id_commit_post) | **POST** /v0/uploads/{upload_id}/commit | Commit a large (direct-to-GCS) upload -[**copy_artifact_route_v0_artifacts_art_id_copy_post**](DefaultApi.md#copy_artifact_route_v0_artifacts_art_id_copy_post) | **POST** /v0/artifacts/{art_id}/copy | Duplicate an artifact to a new path (CAS-shared, new ID) -[**copy_folder_by_id_v0_folders_fld_id_copy_post**](DefaultApi.md#copy_folder_by_id_v0_folders_fld_id_copy_post) | **POST** /v0/folders/{fld_id}/copy | Duplicate a folder subtree to a new path (CAS-shared, new IDs) -[**create_folder_by_path_v0_folders_path_put**](DefaultApi.md#create_folder_by_path_v0_folders_path_put) | **PUT** /v0/folders/{path} | Create a folder (idempotent) -[**create_grant_route_v0_grants_post**](DefaultApi.md#create_grant_route_v0_grants_post) | **POST** /v0/grants | Create (or fetch) a per-principal grant on a resource -[**create_share_route_v0_shares_post**](DefaultApi.md#create_share_route_v0_shares_post) | **POST** /v0/shares | Mint a share link (returns the share_key once) -[**delete_artifact_by_id_route_v0_artifacts_art_id_delete**](DefaultApi.md#delete_artifact_by_id_route_v0_artifacts_art_id_delete) | **DELETE** /v0/artifacts/{art_id} | Soft-delete an artifact by its stable ID -[**delete_artifact_v0_artifacts_path_delete**](DefaultApi.md#delete_artifact_v0_artifacts_path_delete) | **DELETE** /v0/artifacts/{path} | Delete Artifact -[**delete_drive_route_v0_drives_drive_id_delete**](DefaultApi.md#delete_drive_route_v0_drives_drive_id_delete) | **DELETE** /v0/drives/{drive_id} | Soft-delete a drive -[**delete_folder_by_id_v0_folders_fld_id_delete**](DefaultApi.md#delete_folder_by_id_v0_folders_fld_id_delete) | **DELETE** /v0/folders/{fld_id} | Soft-delete a folder by stable ID (cascade with ?recursive=true) -[**delete_folder_by_path_v0_folders_path_delete**](DefaultApi.md#delete_folder_by_path_v0_folders_path_delete) | **DELETE** /v0/folders/{path} | Soft-delete a folder (cascade with ?recursive=true) -[**delete_grant_route_v0_grants_grn_id_delete**](DefaultApi.md#delete_grant_route_v0_grants_grn_id_delete) | **DELETE** /v0/grants/{grn_id} | Revoke a grant (can_manage, or self-revoke own grant) -[**delete_share_route_v0_shares_shr_id_delete**](DefaultApi.md#delete_share_route_v0_shares_shr_id_delete) | **DELETE** /v0/shares/{shr_id} | Revoke a share link (requires can_manage) -[**download_artifact_by_id_v0_artifacts_art_id_download_get**](DefaultApi.md#download_artifact_by_id_v0_artifacts_art_id_download_get) | **GET** /v0/artifacts/{art_id}/download | Stream the artifact bytes by stable ID (never rendered HTML) -[**download_artifact_by_path_v0_artifacts_path_download_get**](DefaultApi.md#download_artifact_by_path_v0_artifacts_path_download_get) | **GET** /v0/artifacts/{path}/download | Stream the artifact bytes by path (never rendered HTML) -[**download_artifact_version_v0_artifacts_art_id_versions_version_number_download_get**](DefaultApi.md#download_artifact_version_v0_artifacts_art_id_versions_version_number_download_get) | **GET** /v0/artifacts/{art_id}/versions/{version_number}/download | Stream bytes for a specific version (machine surface) -[**download_url_by_id_v0_artifacts_art_id_download_url_get**](DefaultApi.md#download_url_by_id_v0_artifacts_art_id_download_url_get) | **GET** /v0/artifacts/{art_id}/download-url | Signed direct-from-GCS download URL by stable ID -[**download_url_by_path_v0_artifacts_path_download_url_get**](DefaultApi.md#download_url_by_path_v0_artifacts_path_download_url_get) | **GET** /v0/artifacts/{path}/download-url | Signed direct-from-GCS download URL by path -[**download_url_version_v0_artifacts_art_id_versions_version_number_download_url_get**](DefaultApi.md#download_url_version_v0_artifacts_art_id_versions_version_number_download_url_get) | **GET** /v0/artifacts/{art_id}/versions/{version_number}/download-url | Signed direct-from-GCS download URL for a specific version -[**enqueue_job_v0_projects_fld_id_jobs_post**](DefaultApi.md#enqueue_job_v0_projects_fld_id_jobs_post) | **POST** /v0/projects/{fld_id}/jobs | Enqueue a compile job for a project (folder) -[**extension_start_auth_extension_start_get**](DefaultApi.md#extension_start_auth_extension_start_get) | **GET** /auth/extension/start | Extension Start -[**find_v0_find_get**](DefaultApi.md#find_v0_find_get) | **GET** /v0/find | Hybrid passage retrieval over the full file body -[**get_artifact_by_id_meta_v0_artifacts_art_id_meta_get**](DefaultApi.md#get_artifact_by_id_meta_v0_artifacts_art_id_meta_get) | **GET** /v0/artifacts/{art_id}/meta | Artifact metadata by stable ID (same shape as path /meta) -[**get_artifact_by_id_v0_artifacts_art_id_get**](DefaultApi.md#get_artifact_by_id_v0_artifacts_art_id_get) | **GET** /v0/artifacts/{art_id} | Canonical lookup of an artifact by its stable ID -[**get_artifact_meta_v0_artifacts_path_meta_get**](DefaultApi.md#get_artifact_meta_v0_artifacts_path_meta_get) | **GET** /v0/artifacts/{path}/meta | Get Artifact Meta -[**get_artifact_version_v0_artifacts_art_id_versions_version_number_get**](DefaultApi.md#get_artifact_version_v0_artifacts_art_id_versions_version_number_get) | **GET** /v0/artifacts/{art_id}/versions/{version_number} | Metadata for a specific version of an artifact -[**get_drive_route_v0_drives_drive_id_get**](DefaultApi.md#get_drive_route_v0_drives_drive_id_get) | **GET** /v0/drives/{drive_id} | Drive overview by id (same shape as /drives/me) -[**get_feedback_status_v0_feedback_fbk_id_get**](DefaultApi.md#get_feedback_status_v0_feedback_fbk_id_get) | **GET** /v0/feedback/{fbk_id} | Get Feedback Status -[**get_folder_by_id_meta_v0_folders_fld_id_meta_get**](DefaultApi.md#get_folder_by_id_meta_v0_folders_fld_id_meta_get) | **GET** /v0/folders/{fld_id}/meta | Folder metadata by stable ID (same shape as the bare id route) -[**get_folder_by_id_v0_folders_fld_id_get**](DefaultApi.md#get_folder_by_id_v0_folders_fld_id_get) | **GET** /v0/folders/{fld_id} | Canonical lookup of a folder by its stable ID -[**get_folder_by_path_meta_v0_folders_path_meta_get**](DefaultApi.md#get_folder_by_path_meta_v0_folders_path_meta_get) | **GET** /v0/folders/{path}/meta | Folder metadata by path (same shape as the bare path route) -[**get_folder_by_path_v0_folders_path_get**](DefaultApi.md#get_folder_by_path_v0_folders_path_get) | **GET** /v0/folders/{path} | Read folder metadata by path -[**get_grant_route_v0_grants_grn_id_get**](DefaultApi.md#get_grant_route_v0_grants_grn_id_get) | **GET** /v0/grants/{grn_id} | Read a single grant (can_manage, or the grant's own principal) -[**get_job_logs_v0_jobs_job_id_logs_get**](DefaultApi.md#get_job_logs_v0_jobs_job_id_logs_get) | **GET** /v0/jobs/{job_id}/logs | Raw compile log (text/plain) -[**get_job_v0_jobs_job_id_get**](DefaultApi.md#get_job_v0_jobs_job_id_get) | **GET** /v0/jobs/{job_id} | Poll a job -[**get_project_v0_projects_fld_id_get**](DefaultApi.md#get_project_v0_projects_fld_id_get) | **GET** /v0/projects/{fld_id} | Get a project's compile config -[**get_share_route_v0_shares_shr_id_get**](DefaultApi.md#get_share_route_v0_shares_shr_id_get) | **GET** /v0/shares/{shr_id} | Read a single share link's metadata (requires can_manage) -[**get_upload_status_v0_uploads_upload_id_get**](DefaultApi.md#get_upload_status_v0_uploads_upload_id_get) | **GET** /v0/uploads/{upload_id} | Get the status of a large (direct-to-GCS) upload session -[**health_health_get**](DefaultApi.md#health_health_get) | **GET** /health | Health -[**list_artifact_versions_v0_artifacts_art_id_versions_get**](DefaultApi.md#list_artifact_versions_v0_artifacts_art_id_versions_get) | **GET** /v0/artifacts/{art_id}/versions | List versions of an artifact, newest first -[**list_artifacts_v0_artifacts_get**](DefaultApi.md#list_artifacts_v0_artifacts_get) | **GET** /v0/artifacts | List artifacts in the drive -[**list_events_route_v0_events_get**](DefaultApi.md#list_events_route_v0_events_get) | **GET** /v0/events | Read the append-only event log for the authenticated drive -[**list_grants_route_v0_grants_get**](DefaultApi.md#list_grants_route_v0_grants_get) | **GET** /v0/grants | List live grants on a resource (requires can_manage) -[**list_project_jobs_v0_projects_fld_id_jobs_get**](DefaultApi.md#list_project_jobs_v0_projects_fld_id_jobs_get) | **GET** /v0/projects/{fld_id}/jobs | List a project's jobs -[**list_shares_route_v0_shares_get**](DefaultApi.md#list_shares_route_v0_shares_get) | **GET** /v0/shares | List live share links on a resource (requires can_manage) -[**list_trash_route_v0_drives_drive_id_trash_get**](DefaultApi.md#list_trash_route_v0_drives_drive_id_trash_get) | **GET** /v0/drives/{drive_id}/trash | List the authenticated drive's trash -[**login_auth_login_get**](DefaultApi.md#login_auth_login_get) | **GET** /auth/login | Login -[**logout_auth_logout_post**](DefaultApi.md#logout_auth_logout_post) | **POST** /auth/logout | Logout -[**me_usage_v0_drives_me_usage_get**](DefaultApi.md#me_usage_v0_drives_me_usage_get) | **GET** /v0/drives/me/usage | Current-period usage + caps for the authenticated drive -[**me_v0_drives_me_get**](DefaultApi.md#me_v0_drives_me_get) | **GET** /v0/drives/me | Me -[**move_artifact_route_v0_artifacts_art_id_move_post**](DefaultApi.md#move_artifact_route_v0_artifacts_art_id_move_post) | **POST** /v0/artifacts/{art_id}/move | Rename / move an artifact to a new path -[**move_folder_by_id_v0_folders_fld_id_move_post**](DefaultApi.md#move_folder_by_id_v0_folders_fld_id_move_post) | **POST** /v0/folders/{fld_id}/move | Rename / move a folder by stable ID (cascade descendants) -[**move_folder_by_path_v0_folders_path_move_post**](DefaultApi.md#move_folder_by_path_v0_folders_path_move_post) | **POST** /v0/folders/{path}/move | Rename / move a folder (cascade-update descendants) -[**patch_artifact_route_v0_artifacts_art_id_patch**](DefaultApi.md#patch_artifact_route_v0_artifacts_art_id_patch) | **PATCH** /v0/artifacts/{art_id} | Edit artifact metadata (labels / metadata / source) -[**patch_folder_by_id_v0_folders_fld_id_patch**](DefaultApi.md#patch_folder_by_id_v0_folders_fld_id_patch) | **PATCH** /v0/folders/{fld_id} | Update folder metadata by stable ID -[**patch_folder_by_path_v0_folders_path_patch**](DefaultApi.md#patch_folder_by_path_v0_folders_path_patch) | **PATCH** /v0/folders/{path} | Update folder metadata by path -[**patch_grant_route_v0_grants_grn_id_patch**](DefaultApi.md#patch_grant_route_v0_grants_grn_id_patch) | **PATCH** /v0/grants/{grn_id} | Update a grant's role and/or expiry (requires can_manage) -[**post_describe_v0_query_describe_post**](DefaultApi.md#post_describe_v0_query_describe_post) | **POST** /v0/query/describe | Describe a dataset's column schema -[**post_feedback_v0_feedback_post**](DefaultApi.md#post_feedback_v0_feedback_post) | **POST** /v0/feedback | Post Feedback -[**post_lookup_values_v0_query_lookup_values_post**](DefaultApi.md#post_lookup_values_v0_query_lookup_values_post) | **POST** /v0/query/lookup-values | List distinct values of a dataset column -[**post_query_v0_query_post**](DefaultApi.md#post_query_v0_query_post) | **POST** /v0/query | Run a read-only SQL query over authorized datasets -[**put_artifact_v0_artifacts_path_put**](DefaultApi.md#put_artifact_v0_artifacts_path_put) | **PUT** /v0/artifacts/{path} | Upload (or overwrite) an artifact -[**put_project_v0_projects_fld_id_put**](DefaultApi.md#put_project_v0_projects_fld_id_put) | **PUT** /v0/projects/{fld_id} | Set a project's compile config (entrypoint/engine/auto_compile) -[**redeem_share_s_share_key_get**](DefaultApi.md#redeem_share_s_share_key_get) | **GET** /s/{share_key} | Redeem Share -[**redeem_share_with_password_s_share_key_post**](DefaultApi.md#redeem_share_with_password_s_share_key_post) | **POST** /s/{share_key} | Redeem Share With Password -[**restore_artifact_v0_artifacts_art_id_restore_post**](DefaultApi.md#restore_artifact_v0_artifacts_art_id_restore_post) | **POST** /v0/artifacts/{art_id}/restore | Restore a soft-deleted artifact -[**restore_artifact_version_v0_artifacts_art_id_versions_version_number_restore_post**](DefaultApi.md#restore_artifact_version_v0_artifacts_art_id_versions_version_number_restore_post) | **POST** /v0/artifacts/{art_id}/versions/{version_number}/restore | Restore a previous version as a new head version -[**restore_drive_route_v0_drives_drive_id_restore_post**](DefaultApi.md#restore_drive_route_v0_drives_drive_id_restore_post) | **POST** /v0/drives/{drive_id}/restore | Restore a soft-deleted drive -[**restore_folder_by_id_v0_folders_fld_id_restore_post**](DefaultApi.md#restore_folder_by_id_v0_folders_fld_id_restore_post) | **POST** /v0/folders/{fld_id}/restore | Restore a soft-deleted folder (cascade) -[**rotate_share_route_v0_shares_shr_id_rotate_post**](DefaultApi.md#rotate_share_route_v0_shares_shr_id_rotate_post) | **POST** /v0/shares/{shr_id}/rotate | Revoke + reissue a share link's key (requires can_share) -[**search_v0_search_get**](DefaultApi.md#search_v0_search_get) | **GET** /v0/search | Full-text search over artifacts in the drive -[**view_artifact_head_a_art_id_head_get**](DefaultApi.md#view_artifact_head_a_art_id_head_get) | **GET** /a/{art_id}/head | View Artifact Head -[**view_artifact_version_v_art_id_version_get**](DefaultApi.md#view_artifact_version_v_art_id_version_get) | **GET** /v/{art_id}/{version} | View Artifact Version -[**view_file_drive_id_path_get**](DefaultApi.md#view_file_drive_id_path_get) | **GET** /{drive_id}/{path} | View File -[**view_permalink_artifact_a_art_id_get**](DefaultApi.md#view_permalink_artifact_a_art_id_get) | **GET** /a/{art_id} | View Permalink Artifact -[**view_permalink_folder_f_fld_id_get**](DefaultApi.md#view_permalink_folder_f_fld_id_get) | **GET** /f/{fld_id} | View Permalink Folder - - -# **abort_upload_v0_uploads_upload_id_delete** -> UploadAbortOut abort_upload_v0_uploads_upload_id_delete(upload_id) - -Abort a large (direct-to-GCS) upload session - -Release an open upload session: return its reserved quota to the drive and mark it aborted. Idempotent — aborting an already-aborted or already-expired session succeeds with `released_bytes: 0`. A committed session cannot be aborted (409 ALREADY_COMMITTED). No write budget is charged — this frees resources rather than consuming them. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.upload_abort_out import UploadAbortOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - upload_id = 'upload_id_example' # str | - - try: - # Abort a large (direct-to-GCS) upload session - api_response = api_instance.abort_upload_v0_uploads_upload_id_delete(upload_id) - print("The response of DefaultApi->abort_upload_v0_uploads_upload_id_delete:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->abort_upload_v0_uploads_upload_id_delete: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **upload_id** | **str**| | - -### Return type - -[**UploadAbortOut**](UploadAbortOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | No such upload for this drive. | * X-Request-Id - Request correlation identifier.
| -**409** | Upload already committed and cannot be aborted. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **begin_upload_v0_uploads_post** -> UploadBeginOut begin_upload_v0_uploads_post(upload_begin_in) - -Begin a large (direct-to-GCS) upload - -Reserve quota and open a resumable upload session for a file larger than the buffered-upload limit. Returns a `upload_url` to PUT the raw bytes to DIRECTLY (no Authorization header — the URL is the credential), then call `/v0/uploads/{upload_id}/commit`. All artifact decisions (path, labels, metadata, source, if_match) are frozen here. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.upload_begin_in import UploadBeginIn -from agentdrive_sdk.models.upload_begin_out import UploadBeginOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - upload_begin_in = agentdrive_sdk.UploadBeginIn() # UploadBeginIn | - - try: - # Begin a large (direct-to-GCS) upload - api_response = api_instance.begin_upload_v0_uploads_post(upload_begin_in) - print("The response of DefaultApi->begin_upload_v0_uploads_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->begin_upload_v0_uploads_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **upload_begin_in** | [**UploadBeginIn**](UploadBeginIn.md)| | - -### Return type - -[**UploadBeginOut**](UploadBeginOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**400** | Invalid path, labels, metadata, or source. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | Path reserved for the system (WIKI_RESERVED). | * X-Request-Id - Request correlation identifier.
| -**413** | size_bytes exceeds the per-artifact cap or storage quota. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | Drive's per-hour write budget exhausted. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **callback_auth_callback_get** -> str callback_auth_callback_get(code=code, state=state, error=error) - -Callback - -Complete a sign-in. - -Handles the auth provider's OAuth callback and shapes failures into -user-readable errors: - * an invalid or expired login flow — LOGIN_FLOW_INVALID (400); - * an invalid or already-used authorization code — AUTH_CODE_INVALID (400); - * the upstream auth provider being unavailable — WORKOS_UNAVAILABLE (502), - returned with Retry-After. - -### Example - - -```python -import agentdrive_sdk -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - code = 'code_example' # str | (optional) - state = 'state_example' # str | (optional) - error = 'error_example' # str | (optional) - - try: - # Callback - api_response = api_instance.callback_auth_callback_get(code=code, state=state, error=error) - print("The response of DefaultApi->callback_auth_callback_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->callback_auth_callback_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **code** | **str**| | [optional] - **state** | **str**| | [optional] - **error** | **str**| | [optional] - -### Return type - -**str** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: text/html, application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Extension authentication handoff page. | * X-Request-Id - Request correlation identifier.
| -**302** | Redirect to the canonical or authentication URL. | * Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -**400** | The login flow or authorization code is invalid. | * X-Request-Id - Request correlation identifier.
| -**409** | Account recovery is required or the Hub principal conflicts with the existing account link. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**502** | The upstream identity provider is temporarily unavailable. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| -**503** | Extension authentication is temporarily disabled. | * X-Request-Id - Request correlation identifier.
| - -[[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) - -# **cancel_job_v0_jobs_job_id_cancel_post** -> CompileJobOut cancel_job_v0_jobs_job_id_cancel_post(job_id) - -Cancel a queued/running job - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.compile_job_out import CompileJobOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - job_id = 'job_id_example' # str | - - try: - # Cancel a queued/running job - api_response = api_instance.cancel_job_v0_jobs_job_id_cancel_post(job_id) - print("The response of DefaultApi->cancel_job_v0_jobs_job_id_cancel_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->cancel_job_v0_jobs_job_id_cancel_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **job_id** | **str**| | - -### Return type - -[**CompileJobOut**](CompileJobOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | No such compile job exists in this drive. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **commit_upload_v0_uploads_upload_id_commit_post** -> ArtifactOut commit_upload_v0_uploads_upload_id_commit_post(upload_id) - -Commit a large (direct-to-GCS) upload - -Finalize the upload begun at `/v0/uploads`: AgentDrive verifies the object that landed in GCS (size + checksum) and creates the artifact. Idempotent — a retry after a successful commit returns the same artifact. The write budget is charged when the upload session is created; commit retries are not charged again. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.artifact_out import ArtifactOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - upload_id = 'upload_id_example' # str | - - try: - # Commit a large (direct-to-GCS) upload - api_response = api_instance.commit_upload_v0_uploads_upload_id_commit_post(upload_id) - print("The response of DefaultApi->commit_upload_v0_uploads_upload_id_commit_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->commit_upload_v0_uploads_upload_id_commit_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **upload_id** | **str**| | - -### Return type - -[**ArtifactOut**](ArtifactOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | No such upload for this drive. | * X-Request-Id - Request correlation identifier.
| -**409** | Uploaded object size differs from declared size_bytes. | * X-Request-Id - Request correlation identifier.
| -**410** | Upload session expired. | * X-Request-Id - Request correlation identifier.
| -**412** | If-Match precondition failed or create-only conflict. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**413** | Committing the upload would exceed the storage quota. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | Drive's per-hour write budget exhausted. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **copy_artifact_route_v0_artifacts_art_id_copy_post** -> ArtifactOut copy_artifact_route_v0_artifacts_art_id_copy_post(art_id, copy_in, x_agentdrive_actor=x_agentdrive_actor, if_none_match=if_none_match) - -Duplicate an artifact to a new path (CAS-shared, new ID) - -Create a new artifact at `path` whose bytes are identical to the source artifact's. The copy reuses the source's CAS object (zero new storage) but gets a fresh `art_…` ID, a fresh version 1, and — by default — `source.refs = [{type: 'artifact', id: ''}]` so provenance is preserved. - -Quota: the copy's `size_bytes` is added to the drive's `storage_bytes` even though physical bytes are shared. - -Source-version pin: pass `from_generation` in the body to require the source's current content generation (`version_number`) to equal it (→ 412 SOURCE_VERSION_MISMATCH); a concurrent source *metadata* edit does NOT fail the copy. Destination create-only: `If-None-Match: *` returns 412 CREATE_CONFLICT (instead of 409 PATH_CONFLICT) when the target path is occupied. - -Returns 409 PATH_CONFLICT if the target path is already taken; 413 STORAGE_QUOTA_EXCEEDED if the copy would push the drive over its limit. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.artifact_out import ArtifactOut -from agentdrive_sdk.models.copy_in import CopyIn -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - art_id = 'art_id_example' # str | - copy_in = agentdrive_sdk.CopyIn() # CopyIn | - x_agentdrive_actor = 'x_agentdrive_actor_example' # str | (optional) - if_none_match = 'if_none_match_example' # str | (optional) - - try: - # Duplicate an artifact to a new path (CAS-shared, new ID) - api_response = api_instance.copy_artifact_route_v0_artifacts_art_id_copy_post(art_id, copy_in, x_agentdrive_actor=x_agentdrive_actor, if_none_match=if_none_match) - print("The response of DefaultApi->copy_artifact_route_v0_artifacts_art_id_copy_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->copy_artifact_route_v0_artifacts_art_id_copy_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **art_id** | **str**| | - **copy_in** | [**CopyIn**](CopyIn.md)| | - **x_agentdrive_actor** | **str**| | [optional] - **if_none_match** | **str**| | [optional] - -### Return type - -[**ArtifactOut**](ArtifactOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Successful Response | * ETag - Current strong entity tag.
* Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -**400** | The destination path or source metadata is invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The source artifact does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**409** | The destination path is already occupied. | * X-Request-Id - Request correlation identifier.
| -**412** | A request precondition did not match. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**413** | The copy would exceed the drive storage limit. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **copy_folder_by_id_v0_folders_fld_id_copy_post** -> FolderCopyOut copy_folder_by_id_v0_folders_fld_id_copy_post(fld_id, folder_copy_in, x_agentdrive_actor=x_agentdrive_actor, if_none_match=if_none_match) - -Duplicate a folder subtree to a new path (CAS-shared, new IDs) - -Clone the folder identified by URL id — and every descendant folder + artifact — under the body's `path` (canonical, trailing slash). Each copied artifact reuses the source's CAS object (zero new storage) but gets a fresh `art_…` ID, a fresh version 1, and `source.refs = [{type: 'artifact', id: ''}]` provenance. The new folder gets a fresh `fld_…` ID and the source's description. - -The entire subtree is copied in a SINGLE transaction — either every row lands or none does. - -Quota: each copy's `size_bytes` counts against the drive's `storage_bytes` even though physical bytes are shared. - -Source-version pin: pass `from_metageneration` in the body to require the source folder's current `metageneration` to equal it (→ 412 SOURCE_VERSION_MISMATCH). Destination create-only: `If-None-Match: *` returns 412 CREATE_CONFLICT (instead of 409 FOLDER_PATH_CONFLICT) when the destination folder is occupied. - -Returns 409 `FOLDER_PATH_CONFLICT` if the destination collides with a live folder or artifact; 400 `FOLDER_PATH_INVALID` if `path` is non-canonical; 413 `SUBTREE_TOO_LARGE` if the source holds more than 5000 artifacts; 413 `STORAGE_QUOTA_EXCEEDED` if the copy would push the drive over its limit. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.folder_copy_in import FolderCopyIn -from agentdrive_sdk.models.folder_copy_out import FolderCopyOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - fld_id = 'fld_id_example' # str | - folder_copy_in = agentdrive_sdk.FolderCopyIn() # FolderCopyIn | - x_agentdrive_actor = 'x_agentdrive_actor_example' # str | (optional) - if_none_match = 'if_none_match_example' # str | (optional) - - try: - # Duplicate a folder subtree to a new path (CAS-shared, new IDs) - api_response = api_instance.copy_folder_by_id_v0_folders_fld_id_copy_post(fld_id, folder_copy_in, x_agentdrive_actor=x_agentdrive_actor, if_none_match=if_none_match) - print("The response of DefaultApi->copy_folder_by_id_v0_folders_fld_id_copy_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->copy_folder_by_id_v0_folders_fld_id_copy_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fld_id** | **str**| | - **folder_copy_in** | [**FolderCopyIn**](FolderCopyIn.md)| | - **x_agentdrive_actor** | **str**| | [optional] - **if_none_match** | **str**| | [optional] - -### Return type - -[**FolderCopyOut**](FolderCopyOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Successful Response | * ETag - Current strong entity tag.
* Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -**400** | The destination path is invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The folder does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**409** | The destination path is already occupied. | * X-Request-Id - Request correlation identifier.
| -**412** | A request precondition did not match. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**413** | The copied subtree would exceed the drive storage limit. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **create_folder_by_path_v0_folders_path_put** -> FolderOut create_folder_by_path_v0_folders_path_put(path, x_agentdrive_actor=x_agentdrive_actor, if_none_match=if_none_match, folder_create_in=folder_create_in) - -Create a folder (idempotent) - -Create a folder at the URL path. Idempotent create-at-known-URI (mirrors `PUT /v0/artifacts/{path}`) — a second call for the same live path returns the existing row unchanged (metadata updates require PATCH). Returns 201 on create, 200 when the folder already exists. - -Send `If-None-Match: *` to make it strictly create-only: an existing folder then returns 412 CREATE_CONFLICT instead of the idempotent 200. - -Returns 409 `FOLDER_PATH_CONFLICT` if a live artifact occupies the file form of the path (e.g. mkdir `/foo/` when an artifact lives at `/foo`). - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.folder_create_in import FolderCreateIn -from agentdrive_sdk.models.folder_out import FolderOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - path = 'path_example' # str | - x_agentdrive_actor = 'x_agentdrive_actor_example' # str | (optional) - if_none_match = 'if_none_match_example' # str | (optional) - folder_create_in = agentdrive_sdk.FolderCreateIn() # FolderCreateIn | (optional) - - try: - # Create a folder (idempotent) - api_response = api_instance.create_folder_by_path_v0_folders_path_put(path, x_agentdrive_actor=x_agentdrive_actor, if_none_match=if_none_match, folder_create_in=folder_create_in) - print("The response of DefaultApi->create_folder_by_path_v0_folders_path_put:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->create_folder_by_path_v0_folders_path_put: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **path** | **str**| | - **x_agentdrive_actor** | **str**| | [optional] - **if_none_match** | **str**| | [optional] - **folder_create_in** | [**FolderCreateIn**](FolderCreateIn.md)| | [optional] - -### Return type - -[**FolderOut**](FolderOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | The existing folder was returned unchanged. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**201** | Successful Response | * ETag - Current strong entity tag.
* Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -**400** | The folder path is invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**409** | The folder conflicts with an existing path. | * X-Request-Id - Request correlation identifier.
| -**412** | A request precondition did not match. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **create_grant_route_v0_grants_post** -> GrantOut create_grant_route_v0_grants_post(grant_create_in, x_agentdrive_actor=x_agentdrive_actor) - -Create (or fetch) a per-principal grant on a resource - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.grant_create_in import GrantCreateIn -from agentdrive_sdk.models.grant_out import GrantOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - grant_create_in = agentdrive_sdk.GrantCreateIn() # GrantCreateIn | - x_agentdrive_actor = 'x_agentdrive_actor_example' # str | (optional) - - try: - # Create (or fetch) a per-principal grant on a resource - api_response = api_instance.create_grant_route_v0_grants_post(grant_create_in, x_agentdrive_actor=x_agentdrive_actor) - print("The response of DefaultApi->create_grant_route_v0_grants_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->create_grant_route_v0_grants_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **grant_create_in** | [**GrantCreateIn**](GrantCreateIn.md)| | - **x_agentdrive_actor** | **str**| | [optional] - -### Return type - -[**GrantOut**](GrantOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Successful Response | * Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -**400** | The grant or expiry is invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The target resource does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **create_share_route_v0_shares_post** -> ShareMintOut create_share_route_v0_shares_post(share_create_in, x_agentdrive_actor=x_agentdrive_actor) - -Mint a share link (returns the share_key once) - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.share_create_in import ShareCreateIn -from agentdrive_sdk.models.share_mint_out import ShareMintOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - share_create_in = agentdrive_sdk.ShareCreateIn() # ShareCreateIn | - x_agentdrive_actor = 'x_agentdrive_actor_example' # str | (optional) - - try: - # Mint a share link (returns the share_key once) - api_response = api_instance.create_share_route_v0_shares_post(share_create_in, x_agentdrive_actor=x_agentdrive_actor) - print("The response of DefaultApi->create_share_route_v0_shares_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->create_share_route_v0_shares_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **share_create_in** | [**ShareCreateIn**](ShareCreateIn.md)| | - **x_agentdrive_actor** | **str**| | [optional] - -### Return type - -[**ShareMintOut**](ShareMintOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Successful Response | * Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -**400** | The share settings or expiry are invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The target resource does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **delete_artifact_by_id_route_v0_artifacts_art_id_delete** -> ArtifactDeleteOut delete_artifact_by_id_route_v0_artifacts_art_id_delete(art_id, if_match=if_match, x_agentdrive_actor=x_agentdrive_actor) - -Soft-delete an artifact by its stable ID - -Soft-delete the artifact with this `art_…` ID. Same semantics + response shape as the path-based `DELETE /v0/artifacts/{path}` (reversible until the GC cron hard-deletes at `purge_at`; `restore_url` points at the by-id restore), but keys on the immutable id so a concurrent rename can't change the target. - -Returns 404 ARTIFACT_NOT_FOUND if no live artifact has this id; 403 WIKI_RESERVED for `_wiki/` artifacts (system-managed); 412 if `If-Match` doesn't match the current version. Declared before the `{path:path}` family so the id convertor wins for DELETEs. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.artifact_delete_out import ArtifactDeleteOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - art_id = 'art_id_example' # str | - if_match = 'if_match_example' # str | (optional) - x_agentdrive_actor = 'x_agentdrive_actor_example' # str | (optional) - - try: - # Soft-delete an artifact by its stable ID - api_response = api_instance.delete_artifact_by_id_route_v0_artifacts_art_id_delete(art_id, if_match=if_match, x_agentdrive_actor=x_agentdrive_actor) - print("The response of DefaultApi->delete_artifact_by_id_route_v0_artifacts_art_id_delete:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->delete_artifact_by_id_route_v0_artifacts_art_id_delete: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **art_id** | **str**| | - **if_match** | **str**| | [optional] - **x_agentdrive_actor** | **str**| | [optional] - -### Return type - -[**ArtifactDeleteOut**](ArtifactDeleteOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | No live artifact with this ID exists. | * X-Request-Id - Request correlation identifier.
| -**412** | If-Match does not match the current artifact. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **delete_artifact_v0_artifacts_path_delete** -> ArtifactDeleteOut delete_artifact_v0_artifacts_path_delete(path, if_match=if_match, x_agentdrive_actor=x_agentdrive_actor) - -Delete Artifact - -Soft-delete the artifact at the given path. - -A delete WITHOUT an `If-Match` precondition is last-writer-wins and will -silently remove a concurrently-modified artifact. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.artifact_delete_out import ArtifactDeleteOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - path = 'path_example' # str | - if_match = 'if_match_example' # str | (optional) - x_agentdrive_actor = 'x_agentdrive_actor_example' # str | (optional) - - try: - # Delete Artifact - api_response = api_instance.delete_artifact_v0_artifacts_path_delete(path, if_match=if_match, x_agentdrive_actor=x_agentdrive_actor) - print("The response of DefaultApi->delete_artifact_v0_artifacts_path_delete:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->delete_artifact_v0_artifacts_path_delete: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **path** | **str**| | - **if_match** | **str**| | [optional] - **x_agentdrive_actor** | **str**| | [optional] - -### Return type - -[**ArtifactDeleteOut**](ArtifactDeleteOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | No such live artifact exists in this drive. | * X-Request-Id - Request correlation identifier.
| -**412** | A request precondition did not match. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **delete_drive_route_v0_drives_drive_id_delete** -> DriveDeleteOut delete_drive_route_v0_drives_drive_id_delete(drive_id, confirm=confirm, x_agentdrive_actor=x_agentdrive_actor, if_match=if_match) - -Soft-delete a drive - -Mark the drive for cleanup. All tenant data (artifacts, versions, wiki, embeddings, events) is hidden via the `live_*` views and CASCADE-removed by the GC cleanup cron at `purge_at`. Restore via `POST /v0/drives/{id}/restore` while the row is still in trash. The path-param `drive_id` MUST match the authenticated drive. - -Accepts either an `ad_live_` per-drive key (deletes that key's drive) or an `ad_user_` user token selecting an owned drive (workspaces-design §5.3); a `read`-scope user token is rejected with 403 `INSUFFICIENT_SCOPE`. **Guard (§8):** a workspace must retain at least one live drive — deleting the workspace's last live drive returns 409 `LAST_DRIVE`. - -**Explicit confirmation required:** pass `?confirm=DELETE` or the request is rejected with 400 `CONFIRM_REQUIRED`. Tenant-level deletion is the largest-blast-radius operation on the API; the static token forces a deliberate act (soft-delete still gives a restore window on top). - -**Optimistic concurrency:** send `If-Match` with the drive's composite ETag (`".0."`, from a drive read) to make the delete conditional — a stale token returns 412 PRECONDITION_FAILED. A delete WITHOUT an `If-Match` precondition is last-writer-wins and will silently trash a concurrently-modified drive. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.drive_delete_out import DriveDeleteOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - drive_id = 'drive_id_example' # str | - confirm = 'confirm_example' # str | (optional) - x_agentdrive_actor = 'x_agentdrive_actor_example' # str | (optional) - if_match = 'if_match_example' # str | (optional) - - try: - # Soft-delete a drive - api_response = api_instance.delete_drive_route_v0_drives_drive_id_delete(drive_id, confirm=confirm, x_agentdrive_actor=x_agentdrive_actor, if_match=if_match) - print("The response of DefaultApi->delete_drive_route_v0_drives_drive_id_delete:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->delete_drive_route_v0_drives_drive_id_delete: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **drive_id** | **str**| | - **confirm** | **str**| | [optional] - **x_agentdrive_actor** | **str**| | [optional] - **if_match** | **str**| | [optional] - -### Return type - -[**DriveDeleteOut**](DriveDeleteOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**400** | The explicit DELETE confirmation is missing. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | No such drive exists for this principal. | * X-Request-Id - Request correlation identifier.
| -**409** | The workspace must retain at least one live drive. | * X-Request-Id - Request correlation identifier.
| -**412** | A request precondition did not match. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **delete_folder_by_id_v0_folders_fld_id_delete** -> FolderDeleteOut delete_folder_by_id_v0_folders_fld_id_delete(fld_id, recursive=recursive, x_agentdrive_actor=x_agentdrive_actor, if_match=if_match) - -Soft-delete a folder by stable ID (cascade with ?recursive=true) - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.folder_delete_out import FolderDeleteOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - fld_id = 'fld_id_example' # str | - recursive = False # bool | (optional) (default to False) - x_agentdrive_actor = 'x_agentdrive_actor_example' # str | (optional) - if_match = 'if_match_example' # str | (optional) - - try: - # Soft-delete a folder by stable ID (cascade with ?recursive=true) - api_response = api_instance.delete_folder_by_id_v0_folders_fld_id_delete(fld_id, recursive=recursive, x_agentdrive_actor=x_agentdrive_actor, if_match=if_match) - print("The response of DefaultApi->delete_folder_by_id_v0_folders_fld_id_delete:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->delete_folder_by_id_v0_folders_fld_id_delete: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fld_id** | **str**| | - **recursive** | **bool**| | [optional] [default to False] - **x_agentdrive_actor** | **str**| | [optional] - **if_match** | **str**| | [optional] - -### Return type - -[**FolderDeleteOut**](FolderDeleteOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The folder does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**412** | A request precondition did not match. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **delete_folder_by_path_v0_folders_path_delete** -> FolderDeleteOut delete_folder_by_path_v0_folders_path_delete(path, recursive=recursive, x_agentdrive_actor=x_agentdrive_actor, if_match=if_match) - -Soft-delete a folder (cascade with ?recursive=true) - -Soft-delete the folder. Refuses if the folder has live descendants unless `?recursive=true` is set, in which case ALL descendant folders + artifacts are soft-deleted in the same transaction. - -Returns 409 `FOLDER_RECURSIVE_REQUIRED` (with descendant counts in `colliding_path`) when recursion is needed but the flag isn't set. Retention window is frozen on `purge_at` per deletion-design.md §5.1; mid-retention tier changes don't shift it. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.folder_delete_out import FolderDeleteOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - path = 'path_example' # str | - recursive = False # bool | (optional) (default to False) - x_agentdrive_actor = 'x_agentdrive_actor_example' # str | (optional) - if_match = 'if_match_example' # str | (optional) - - try: - # Soft-delete a folder (cascade with ?recursive=true) - api_response = api_instance.delete_folder_by_path_v0_folders_path_delete(path, recursive=recursive, x_agentdrive_actor=x_agentdrive_actor, if_match=if_match) - print("The response of DefaultApi->delete_folder_by_path_v0_folders_path_delete:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->delete_folder_by_path_v0_folders_path_delete: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **path** | **str**| | - **recursive** | **bool**| | [optional] [default to False] - **x_agentdrive_actor** | **str**| | [optional] - **if_match** | **str**| | [optional] - -### Return type - -[**FolderDeleteOut**](FolderDeleteOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The folder does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**412** | A request precondition did not match. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **delete_grant_route_v0_grants_grn_id_delete** -> RevokeOut delete_grant_route_v0_grants_grn_id_delete(grn_id, x_agentdrive_actor=x_agentdrive_actor) - -Revoke a grant (can_manage, or self-revoke own grant) - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.revoke_out import RevokeOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - grn_id = 'grn_id_example' # str | - x_agentdrive_actor = 'x_agentdrive_actor_example' # str | (optional) - - try: - # Revoke a grant (can_manage, or self-revoke own grant) - api_response = api_instance.delete_grant_route_v0_grants_grn_id_delete(grn_id, x_agentdrive_actor=x_agentdrive_actor) - print("The response of DefaultApi->delete_grant_route_v0_grants_grn_id_delete:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->delete_grant_route_v0_grants_grn_id_delete: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **grn_id** | **str**| | - **x_agentdrive_actor** | **str**| | [optional] - -### Return type - -[**RevokeOut**](RevokeOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The grant does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **delete_share_route_v0_shares_shr_id_delete** -> RevokeOut delete_share_route_v0_shares_shr_id_delete(shr_id, x_agentdrive_actor=x_agentdrive_actor) - -Revoke a share link (requires can_manage) - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.revoke_out import RevokeOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - shr_id = 'shr_id_example' # str | - x_agentdrive_actor = 'x_agentdrive_actor_example' # str | (optional) - - try: - # Revoke a share link (requires can_manage) - api_response = api_instance.delete_share_route_v0_shares_shr_id_delete(shr_id, x_agentdrive_actor=x_agentdrive_actor) - print("The response of DefaultApi->delete_share_route_v0_shares_shr_id_delete:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->delete_share_route_v0_shares_shr_id_delete: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **shr_id** | **str**| | - **x_agentdrive_actor** | **str**| | [optional] - -### Return type - -[**RevokeOut**](RevokeOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The share does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **download_artifact_by_id_v0_artifacts_art_id_download_get** -> bytes download_artifact_by_id_v0_artifacts_art_id_download_get(art_id) - -Stream the artifact bytes by stable ID (never rendered HTML) - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - art_id = 'art_id_example' # str | - - try: - # Stream the artifact bytes by stable ID (never rendered HTML) - api_response = api_instance.download_artifact_by_id_v0_artifacts_art_id_download_get(art_id) - print("The response of DefaultApi->download_artifact_by_id_v0_artifacts_art_id_download_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->download_artifact_by_id_v0_artifacts_art_id_download_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **art_id** | **str**| | - -### Return type - -**bytes** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/octet-stream, application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Raw artifact bytes. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | No live artifact with this ID exists. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **download_artifact_by_path_v0_artifacts_path_download_get** -> bytes download_artifact_by_path_v0_artifacts_path_download_get(path) - -Stream the artifact bytes by path (never rendered HTML) - -Same bytes-only machine surface as `/{art_id}/download` but resolves the artifact by path, so callers don't have to resolve path→id first. Applies the identical CSP `sandbox` + `nosniff` posture (never serves HTML inline as active content). - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - path = 'path_example' # str | - - try: - # Stream the artifact bytes by path (never rendered HTML) - api_response = api_instance.download_artifact_by_path_v0_artifacts_path_download_get(path) - print("The response of DefaultApi->download_artifact_by_path_v0_artifacts_path_download_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->download_artifact_by_path_v0_artifacts_path_download_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **path** | **str**| | - -### Return type - -**bytes** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/octet-stream, application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Raw artifact bytes. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | No live artifact exists at this path. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **download_artifact_version_v0_artifacts_art_id_versions_version_number_download_get** -> bytes download_artifact_version_v0_artifacts_art_id_versions_version_number_download_get(art_id, version_number) - -Stream bytes for a specific version (machine surface) - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - art_id = 'art_id_example' # str | - version_number = 56 # int | - - try: - # Stream bytes for a specific version (machine surface) - api_response = api_instance.download_artifact_version_v0_artifacts_art_id_versions_version_number_download_get(art_id, version_number) - print("The response of DefaultApi->download_artifact_version_v0_artifacts_art_id_versions_version_number_download_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->download_artifact_version_v0_artifacts_art_id_versions_version_number_download_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **art_id** | **str**| | - **version_number** | **int**| | - -### Return type - -**bytes** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/octet-stream, application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Raw artifact bytes. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The artifact or version does not exist. | * X-Request-Id - Request correlation identifier.
| -**410** | The requested version has been pruned. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **download_url_by_id_v0_artifacts_art_id_download_url_get** -> DownloadUrlOut download_url_by_id_v0_artifacts_art_id_download_url_get(art_id) - -Signed direct-from-GCS download URL by stable ID - -Returns a URL for the artifact's bytes. For large artifacts (>= the signed-download threshold) when signing is available, it's a short-lived **signed GCS URL** the client fetches directly (`direct:true`, `expires_at` set); otherwise the **proxy** `/download` URL (`direct:false`). Treat the URL as opaque. large-download-design.md §5.1. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.download_url_out import DownloadUrlOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - art_id = 'art_id_example' # str | - - try: - # Signed direct-from-GCS download URL by stable ID - api_response = api_instance.download_url_by_id_v0_artifacts_art_id_download_url_get(art_id) - print("The response of DefaultApi->download_url_by_id_v0_artifacts_art_id_download_url_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->download_url_by_id_v0_artifacts_art_id_download_url_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **art_id** | **str**| | - -### Return type - -[**DownloadUrlOut**](DownloadUrlOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The artifact does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **download_url_by_path_v0_artifacts_path_download_url_get** -> DownloadUrlOut download_url_by_path_v0_artifacts_path_download_url_get(path) - -Signed direct-from-GCS download URL by path - -Same as `/{art_id}/download-url` but resolves the artifact by path. The returned proxy URL (when `direct:false`) still points at the by-id `/download` endpoint. large-download-design.md §5.1. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.download_url_out import DownloadUrlOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - path = 'path_example' # str | - - try: - # Signed direct-from-GCS download URL by path - api_response = api_instance.download_url_by_path_v0_artifacts_path_download_url_get(path) - print("The response of DefaultApi->download_url_by_path_v0_artifacts_path_download_url_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->download_url_by_path_v0_artifacts_path_download_url_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **path** | **str**| | - -### Return type - -[**DownloadUrlOut**](DownloadUrlOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The artifact does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **download_url_version_v0_artifacts_art_id_versions_version_number_download_url_get** -> DownloadUrlOut download_url_version_v0_artifacts_art_id_versions_version_number_download_url_get(art_id, version_number) - -Signed direct-from-GCS download URL for a specific version - -Same as `/{art_id}/download-url` but for a specific version's bytes (`direct:true` signed GCS URL when large + signing available, else the proxy `/versions/{n}/download` URL). large-download-design.md §5.1. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.download_url_out import DownloadUrlOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - art_id = 'art_id_example' # str | - version_number = 56 # int | - - try: - # Signed direct-from-GCS download URL for a specific version - api_response = api_instance.download_url_version_v0_artifacts_art_id_versions_version_number_download_url_get(art_id, version_number) - print("The response of DefaultApi->download_url_version_v0_artifacts_art_id_versions_version_number_download_url_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->download_url_version_v0_artifacts_art_id_versions_version_number_download_url_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **art_id** | **str**| | - **version_number** | **int**| | - -### Return type - -[**DownloadUrlOut**](DownloadUrlOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The artifact or version does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**410** | The requested version was pruned by retention. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **enqueue_job_v0_projects_fld_id_jobs_post** -> CompileJobOut enqueue_job_v0_projects_fld_id_jobs_post(fld_id, compile_job_in, x_agentdrive_actor=x_agentdrive_actor) - -Enqueue a compile job for a project (folder) - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.compile_job_in import CompileJobIn -from agentdrive_sdk.models.compile_job_out import CompileJobOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - fld_id = 'fld_id_example' # str | - compile_job_in = agentdrive_sdk.CompileJobIn() # CompileJobIn | - x_agentdrive_actor = 'x_agentdrive_actor_example' # str | (optional) - - try: - # Enqueue a compile job for a project (folder) - api_response = api_instance.enqueue_job_v0_projects_fld_id_jobs_post(fld_id, compile_job_in, x_agentdrive_actor=x_agentdrive_actor) - print("The response of DefaultApi->enqueue_job_v0_projects_fld_id_jobs_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->enqueue_job_v0_projects_fld_id_jobs_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fld_id** | **str**| | - **compile_job_in** | [**CompileJobIn**](CompileJobIn.md)| | - **x_agentdrive_actor** | **str**| | [optional] - -### Return type - -[**CompileJobOut**](CompileJobOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**202** | Compile accepted and queued or running. | * X-Request-Id - Request correlation identifier.
| -**400** | The task, engine, entrypoint, or project is invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**402** | The current plan does not permit this compile. | * X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The project folder does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**413** | The compile project exceeds an input or storage limit. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **extension_start_auth_extension_start_get** -> extension_start_auth_extension_start_get(ext_id=ext_id) - -Extension Start - -Begin a sign-in flow on behalf of a Chrome extension. - -Provider follows AUTH_MODE (WorkOS AuthKit or the TokenCanopy hub), -exactly like /auth/login. Stamps `for=ext` + `ext_id` into the -signed OAuth state so the callback handler knows to render the -extension handoff page instead of setting a session cookie. - -Three short-circuits, all surface as actionable errors: - * EXTENSION_AUTH_DISABLED (503): kill switch flipped off. - * UNKNOWN_EXTENSION (400): `ext_id` not on the allow-list. - * Missing `ext_id` query string (400 INVALID_REQUEST). - -### Example - - -```python -import agentdrive_sdk -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - ext_id = 'ext_id_example' # str | (optional) - - try: - # Extension Start - api_instance.extension_start_auth_extension_start_get(ext_id=ext_id) - except Exception as e: - print("Exception when calling DefaultApi->extension_start_auth_extension_start_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **ext_id** | **str**| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**302** | Redirect to the canonical or authentication URL. | * Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -**400** | The extension ID is missing or not allowed. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**503** | Extension authentication is temporarily disabled. | * X-Request-Id - Request correlation identifier.
| - -[[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) - -# **find_v0_find_get** -> FindPage find_v0_find_get(q, mode=mode, label=label, file_type=file_type, prefix=prefix, modality=modality, updated_after=updated_after, updated_before=updated_before, limit=limit) - -Hybrid passage retrieval over the full file body - -Passage-level chunk RAG over `embed_chunks`. Lexical (`chunk_tsv`, GIN) + semantic (HNSW over `embedding`) are run in parallel and fused via Reciprocal Rank Fusion (k=60). Unlike `/v0/search`, which only sees the first ~16 KB preview of each artifact, `/v0/find` reaches the full file body. - -**Modes:** -- `hybrid` (default) — lexical + semantic, RRF-fused. -- `lexical` — `chunk_tsv` only. Best for exact tokens, identifiers, code snippets. -- `semantic` — embedding only. Best for conceptual queries where the surface terms differ from the query phrasing. - -**Granularity:** results are passages, not files. A long document with multiple matching regions returns multiple hits with distinct `ord` values; consecutive `ord`s overlap by ~400 tokens. Dedupe by `art_id` if you want one row per file. - -**Span citations:** `char_start`/`char_end` for text & code, `page_start`/`page_end` for PDFs, `time_start_ms`/`time_end_ms` for audio & video. Only the modality-relevant pair is populated. - -**Filters:** `label`, `file_type`, `prefix`, `modality` (repeatable), `updated_after` / `updated_before` (RFC 3339 timestamps, inclusive bounds on `updated_at`, applied to both legs). - -**Wiki coverage:** `/v0/find` excludes `_wiki/` paths by default and — importantly — does NOT cover them even when the caller passes `prefix=_wiki/...`. Wiki pages are not embedded by the pipeline (they're system-generated output, not user input), so `embed_chunks` has no rows for them and the join returns empty. Use `wiki_search` (or `list`/`grep` with a `_wiki/` prefix) for the wiki layer. - -**Embedding availability:** when `GEMINI_API_KEY` is not configured, `mode=semantic` returns 503; `mode=hybrid` logs a warning and falls back to lexical-only; `mode=lexical` is unaffected. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.find_page import FindPage -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - q = 'q_example' # str | - mode = 'hybrid' # str | (optional) (default to 'hybrid') - label = ['label_example'] # List[str] | (optional) - file_type = 'file_type_example' # str | (optional) - prefix = 'prefix_example' # str | (optional) - modality = ['modality_example'] # List[Optional[str]] | (optional) - updated_after = '2013-10-20T19:20:30+01:00' # datetime | (optional) - updated_before = '2013-10-20T19:20:30+01:00' # datetime | (optional) - limit = 20 # int | (optional) (default to 20) - - try: - # Hybrid passage retrieval over the full file body - api_response = api_instance.find_v0_find_get(q, mode=mode, label=label, file_type=file_type, prefix=prefix, modality=modality, updated_after=updated_after, updated_before=updated_before, limit=limit) - print("The response of DefaultApi->find_v0_find_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->find_v0_find_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **q** | **str**| | - **mode** | **str**| | [optional] [default to 'hybrid'] - **label** | [**List[str]**](str.md)| | [optional] - **file_type** | **str**| | [optional] - **prefix** | **str**| | [optional] - **modality** | [**List[Optional[str]]**](str.md)| | [optional] - **updated_after** | **datetime**| | [optional] - **updated_before** | **datetime**| | [optional] - **limit** | **int**| | [optional] [default to 20] - -### Return type - -[**FindPage**](FindPage.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| -**503** | Semantic embeddings are unavailable; use lexical or hybrid mode. | * X-Request-Id - Request correlation identifier.
| - -[[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_artifact_by_id_meta_v0_artifacts_art_id_meta_get** -> ArtifactOut get_artifact_by_id_meta_v0_artifacts_art_id_meta_get(art_id) - -Artifact metadata by stable ID (same shape as path /meta) - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.artifact_out import ArtifactOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - art_id = 'art_id_example' # str | - - try: - # Artifact metadata by stable ID (same shape as path /meta) - api_response = api_instance.get_artifact_by_id_meta_v0_artifacts_art_id_meta_get(art_id) - print("The response of DefaultApi->get_artifact_by_id_meta_v0_artifacts_art_id_meta_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->get_artifact_by_id_meta_v0_artifacts_art_id_meta_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **art_id** | **str**| | - -### Return type - -[**ArtifactOut**](ArtifactOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**304** | The current entity tag or modification date matched. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | No such artifact exists in this drive. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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_artifact_by_id_v0_artifacts_art_id_get** -> ArtifactOut get_artifact_by_id_v0_artifacts_art_id_get(art_id) - -Canonical lookup of an artifact by its stable ID - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.artifact_out import ArtifactOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - art_id = 'art_id_example' # str | - - try: - # Canonical lookup of an artifact by its stable ID - api_response = api_instance.get_artifact_by_id_v0_artifacts_art_id_get(art_id) - print("The response of DefaultApi->get_artifact_by_id_v0_artifacts_art_id_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->get_artifact_by_id_v0_artifacts_art_id_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **art_id** | **str**| | - -### Return type - -[**ArtifactOut**](ArtifactOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**304** | The current entity tag or modification date matched. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | No such artifact exists in this drive. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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_artifact_meta_v0_artifacts_path_meta_get** -> ArtifactOut get_artifact_meta_v0_artifacts_path_meta_get(path) - -Get Artifact Meta - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.artifact_out import ArtifactOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - path = 'path_example' # str | - - try: - # Get Artifact Meta - api_response = api_instance.get_artifact_meta_v0_artifacts_path_meta_get(path) - print("The response of DefaultApi->get_artifact_meta_v0_artifacts_path_meta_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->get_artifact_meta_v0_artifacts_path_meta_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **path** | **str**| | - -### Return type - -[**ArtifactOut**](ArtifactOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**304** | The current entity tag or modification date matched. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The artifact does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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_artifact_version_v0_artifacts_art_id_versions_version_number_get** -> VersionOut get_artifact_version_v0_artifacts_art_id_versions_version_number_get(art_id, version_number) - -Metadata for a specific version of an artifact - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.version_out import VersionOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - art_id = 'art_id_example' # str | - version_number = 56 # int | - - try: - # Metadata for a specific version of an artifact - api_response = api_instance.get_artifact_version_v0_artifacts_art_id_versions_version_number_get(art_id, version_number) - print("The response of DefaultApi->get_artifact_version_v0_artifacts_art_id_versions_version_number_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->get_artifact_version_v0_artifacts_art_id_versions_version_number_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **art_id** | **str**| | - **version_number** | **int**| | - -### Return type - -[**VersionOut**](VersionOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The artifact or version does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**410** | The requested version was pruned by retention. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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_drive_route_v0_drives_drive_id_get** -> DriveReadOut get_drive_route_v0_drives_drive_id_get(drive_id) - -Drive overview by id (same shape as /drives/me) - -Identical to `GET /v0/drives/me` — the by-id singleton so `Location`-style URLs and scripted clients can address the drive canonically. The path-param `drive_id` MUST match the authenticated drive (mirrors the delete/trash routes' no-leak 404). Emits the drive's composite `ETag` header (`".0."`). - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.drive_read_out import DriveReadOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - drive_id = 'drive_id_example' # str | - - try: - # Drive overview by id (same shape as /drives/me) - api_response = api_instance.get_drive_route_v0_drives_drive_id_get(drive_id) - print("The response of DefaultApi->get_drive_route_v0_drives_drive_id_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->get_drive_route_v0_drives_drive_id_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **drive_id** | **str**| | - -### Return type - -[**DriveReadOut**](DriveReadOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | No matching authenticated drive exists. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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_feedback_status_v0_feedback_fbk_id_get** -> FeedbackStatusOut get_feedback_status_v0_feedback_fbk_id_get(fbk_id) - -Get Feedback Status - -Lifecycle status of feedback THIS drive filed. Foreign tickets -read as 404 — indistinguishable from absent. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.feedback_status_out import FeedbackStatusOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - fbk_id = 'fbk_id_example' # str | - - try: - # Get Feedback Status - api_response = api_instance.get_feedback_status_v0_feedback_fbk_id_get(fbk_id) - print("The response of DefaultApi->get_feedback_status_v0_feedback_fbk_id_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->get_feedback_status_v0_feedback_fbk_id_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fbk_id** | **str**| | - -### Return type - -[**FeedbackStatusOut**](FeedbackStatusOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The feedback ticket does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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_folder_by_id_meta_v0_folders_fld_id_meta_get** -> FolderOut get_folder_by_id_meta_v0_folders_fld_id_meta_get(fld_id) - -Folder metadata by stable ID (same shape as the bare id route) - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.folder_out import FolderOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - fld_id = 'fld_id_example' # str | - - try: - # Folder metadata by stable ID (same shape as the bare id route) - api_response = api_instance.get_folder_by_id_meta_v0_folders_fld_id_meta_get(fld_id) - print("The response of DefaultApi->get_folder_by_id_meta_v0_folders_fld_id_meta_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->get_folder_by_id_meta_v0_folders_fld_id_meta_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fld_id** | **str**| | - -### Return type - -[**FolderOut**](FolderOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**304** | The current entity tag or modification date matched. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The folder does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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_folder_by_id_v0_folders_fld_id_get** -> FolderOut get_folder_by_id_v0_folders_fld_id_get(fld_id) - -Canonical lookup of a folder by its stable ID - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.folder_out import FolderOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - fld_id = 'fld_id_example' # str | - - try: - # Canonical lookup of a folder by its stable ID - api_response = api_instance.get_folder_by_id_v0_folders_fld_id_get(fld_id) - print("The response of DefaultApi->get_folder_by_id_v0_folders_fld_id_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->get_folder_by_id_v0_folders_fld_id_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fld_id** | **str**| | - -### Return type - -[**FolderOut**](FolderOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**304** | The current entity tag or modification date matched. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The folder does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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_folder_by_path_meta_v0_folders_path_meta_get** -> FolderOut get_folder_by_path_meta_v0_folders_path_meta_get(path) - -Folder metadata by path (same shape as the bare path route) - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.folder_out import FolderOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - path = 'path_example' # str | - - try: - # Folder metadata by path (same shape as the bare path route) - api_response = api_instance.get_folder_by_path_meta_v0_folders_path_meta_get(path) - print("The response of DefaultApi->get_folder_by_path_meta_v0_folders_path_meta_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->get_folder_by_path_meta_v0_folders_path_meta_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **path** | **str**| | - -### Return type - -[**FolderOut**](FolderOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**304** | The current entity tag or modification date matched. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The folder does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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_folder_by_path_v0_folders_path_get** -> FolderOut get_folder_by_path_v0_folders_path_get(path) - -Read folder metadata by path - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.folder_out import FolderOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - path = 'path_example' # str | - - try: - # Read folder metadata by path - api_response = api_instance.get_folder_by_path_v0_folders_path_get(path) - print("The response of DefaultApi->get_folder_by_path_v0_folders_path_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->get_folder_by_path_v0_folders_path_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **path** | **str**| | - -### Return type - -[**FolderOut**](FolderOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**304** | The current entity tag or modification date matched. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The folder does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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_grant_route_v0_grants_grn_id_get** -> GrantOut get_grant_route_v0_grants_grn_id_get(grn_id) - -Read a single grant (can_manage, or the grant's own principal) - -The `Location` target of `POST /v0/grants`. Authorization mirrors -DELETE: `can_manage` on the granted resource, or the caller IS the -grant's own principal (a grantee may read — like revoke — their own -grant). A revoked grant reads as 404 (same no-leak shape as a -foreign/absent id); DELETE stays idempotent on it. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.grant_out import GrantOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - grn_id = 'grn_id_example' # str | - - try: - # Read a single grant (can_manage, or the grant's own principal) - api_response = api_instance.get_grant_route_v0_grants_grn_id_get(grn_id) - print("The response of DefaultApi->get_grant_route_v0_grants_grn_id_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->get_grant_route_v0_grants_grn_id_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **grn_id** | **str**| | - -### Return type - -[**GrantOut**](GrantOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The grant does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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_job_logs_v0_jobs_job_id_logs_get** -> str get_job_logs_v0_jobs_job_id_logs_get(job_id) - -Raw compile log (text/plain) - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - job_id = 'job_id_example' # str | - - try: - # Raw compile log (text/plain) - api_response = api_instance.get_job_logs_v0_jobs_job_id_logs_get(job_id) - print("The response of DefaultApi->get_job_logs_v0_jobs_job_id_logs_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->get_job_logs_v0_jobs_job_id_logs_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **job_id** | **str**| | - -### Return type - -**str** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: text/plain, application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Raw compile log. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The job or its captured log does not exist. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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_job_v0_jobs_job_id_get** -> CompileJobOut get_job_v0_jobs_job_id_get(job_id) - -Poll a job - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.compile_job_out import CompileJobOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - job_id = 'job_id_example' # str | - - try: - # Poll a job - api_response = api_instance.get_job_v0_jobs_job_id_get(job_id) - print("The response of DefaultApi->get_job_v0_jobs_job_id_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->get_job_v0_jobs_job_id_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **job_id** | **str**| | - -### Return type - -[**CompileJobOut**](CompileJobOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | No such compile job exists in this drive. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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_project_v0_projects_fld_id_get** -> CompileProjectOut get_project_v0_projects_fld_id_get(fld_id) - -Get a project's compile config - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.compile_project_out import CompileProjectOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - fld_id = 'fld_id_example' # str | - - try: - # Get a project's compile config - api_response = api_instance.get_project_v0_projects_fld_id_get(fld_id) - print("The response of DefaultApi->get_project_v0_projects_fld_id_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->get_project_v0_projects_fld_id_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fld_id** | **str**| | - -### Return type - -[**CompileProjectOut**](CompileProjectOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The project folder does not exist or has no compile configuration. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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_share_route_v0_shares_shr_id_get** -> ShareOut get_share_route_v0_shares_shr_id_get(shr_id) - -Read a single share link's metadata (requires can_manage) - -The `Location` target of `POST /v0/shares`. Metadata ONLY — -`ShareOut` never carries the raw `share_key`/URL (returned exactly -once at mint/rotate, §4.5). Authorization mirrors DELETE: -`can_manage` on the shared resource. A revoked share reads as 404 -(same no-leak shape as a foreign/absent id). - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.share_out import ShareOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - shr_id = 'shr_id_example' # str | - - try: - # Read a single share link's metadata (requires can_manage) - api_response = api_instance.get_share_route_v0_shares_shr_id_get(shr_id) - print("The response of DefaultApi->get_share_route_v0_shares_shr_id_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->get_share_route_v0_shares_shr_id_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **shr_id** | **str**| | - -### Return type - -[**ShareOut**](ShareOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The share does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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_upload_status_v0_uploads_upload_id_get** -> UploadStatusOut get_upload_status_v0_uploads_upload_id_get(upload_id) - -Get the status of a large (direct-to-GCS) upload session - -Report the live state of an upload session begun at `/v0/uploads`. `state` is derived: `initiated` (open — PUT the bytes then commit), `committed` (artifact created), `aborted` (released via DELETE), or `expired` (past `expires_at` without a commit). Read-only; charges the read budget. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.upload_status_out import UploadStatusOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - upload_id = 'upload_id_example' # str | - - try: - # Get the status of a large (direct-to-GCS) upload session - api_response = api_instance.get_upload_status_v0_uploads_upload_id_get(upload_id) - print("The response of DefaultApi->get_upload_status_v0_uploads_upload_id_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->get_upload_status_v0_uploads_upload_id_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **upload_id** | **str**| | - -### Return type - -[**UploadStatusOut**](UploadStatusOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | No such upload for this drive. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **health_health_get** -> HealthOut health_health_get() - -Health - -Liveness + DB-reachability probe. Used by Cloud Run / k8s healthchecks -and any uptime monitor. Returns 200 only if the DB pool can serve a -trivial query; 503 otherwise so the orchestrator can pull the instance -out of rotation. - -NOTE: route is `/health`, NOT `/healthz`. Google's edge infrastructure -intercepts `/healthz` (legacy kubernetes-reserved path) and returns a -generic 404 before traffic reaches Cloud Run — discovered the hard way -during the first prod deploy. Don't rename back. - -### Example - - -```python -import agentdrive_sdk -from agentdrive_sdk.models.health_out import HealthOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - - try: - # Health - api_response = api_instance.health_health_get() - print("The response of DefaultApi->health_health_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->health_health_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**HealthOut**](HealthOut.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**503** | The database reachability probe failed. | * X-Request-Id - Request correlation identifier.
| - -[[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_artifact_versions_v0_artifacts_art_id_versions_get** -> VersionPage list_artifact_versions_v0_artifacts_art_id_versions_get(art_id, cursor=cursor, limit=limit) - -List versions of an artifact, newest first - -Returns versions in descending `version_number` order. Cursor pagination via `?cursor=`; `next_cursor` is non-null when the page is full and more older versions may exist. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.version_page import VersionPage -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - art_id = 'art_id_example' # str | - cursor = 'cursor_example' # str | (optional) - limit = 50 # int | (optional) (default to 50) - - try: - # List versions of an artifact, newest first - api_response = api_instance.list_artifact_versions_v0_artifacts_art_id_versions_get(art_id, cursor=cursor, limit=limit) - print("The response of DefaultApi->list_artifact_versions_v0_artifacts_art_id_versions_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->list_artifact_versions_v0_artifacts_art_id_versions_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **art_id** | **str**| | - **cursor** | **str**| | [optional] - **limit** | **int**| | [optional] [default to 50] - -### Return type - -[**VersionPage**](VersionPage.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**400** | The pagination cursor is invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The artifact does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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_artifacts_v0_artifacts_get** -> Page list_artifacts_v0_artifacts_get(prefix=prefix, label=label, file_type=file_type, cursor=cursor, limit=limit) - -List artifacts in the drive - -Returns artifacts sorted by path. Filter by `prefix`, `label` (repeatable + AND-combined), and `file_type`. - -**Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page. `next_cursor` is `null` on the final page. Filters MUST stay consistent across pages — the cursor encodes only the keyset position, not the filter set, so the client is responsible for re-sending the same filter on each page. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.page import Page -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - prefix = '' # str | (optional) (default to '') - label = ['label_example'] # List[Optional[str]] | (optional) - file_type = 'file_type_example' # str | (optional) - cursor = 'cursor_example' # str | (optional) - limit = 50 # int | (optional) (default to 50) - - try: - # List artifacts in the drive - api_response = api_instance.list_artifacts_v0_artifacts_get(prefix=prefix, label=label, file_type=file_type, cursor=cursor, limit=limit) - print("The response of DefaultApi->list_artifacts_v0_artifacts_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->list_artifacts_v0_artifacts_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **prefix** | **str**| | [optional] [default to ''] - **label** | [**List[Optional[str]]**](str.md)| | [optional] - **file_type** | **str**| | [optional] - **cursor** | **str**| | [optional] - **limit** | **int**| | [optional] [default to 50] - -### Return type - -[**Page**](Page.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**400** | The pagination cursor is invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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_events_route_v0_events_get** -> EventPage list_events_route_v0_events_get(art_id=art_id, action=action, since=since, before=before, cursor=cursor, limit=limit) - -Read the append-only event log for the authenticated drive - -Returns events newest-first. Filters compose with AND. - -**Cursor pagination:** pass the oldest event's `created_at` from the previous page as `before` to fetch the next page back in time. Combine `since` + `before` to bound a window. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.event_page import EventPage -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - art_id = 'art_id_example' # str | (optional) - action = 'action_example' # str | (optional) - since = '2013-10-20T19:20:30+01:00' # datetime | (optional) - before = '2013-10-20T19:20:30+01:00' # datetime | (optional) - cursor = 'cursor_example' # str | (optional) - limit = 50 # int | (optional) (default to 50) - - try: - # Read the append-only event log for the authenticated drive - api_response = api_instance.list_events_route_v0_events_get(art_id=art_id, action=action, since=since, before=before, cursor=cursor, limit=limit) - print("The response of DefaultApi->list_events_route_v0_events_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->list_events_route_v0_events_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **art_id** | **str**| | [optional] - **action** | **str**| | [optional] - **since** | **datetime**| | [optional] - **before** | **datetime**| | [optional] - **cursor** | **str**| | [optional] - **limit** | **int**| | [optional] [default to 50] - -### Return type - -[**EventPage**](EventPage.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**400** | The pagination cursor is invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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_grants_route_v0_grants_get** -> GrantList list_grants_route_v0_grants_get(resource, cursor=cursor, limit=limit) - -List live grants on a resource (requires can_manage) - -**Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. The `resource` filter must be re-sent on every page — the cursor encodes only the keyset position. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.grant_list import GrantList -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - resource = 'resource_example' # str | art_*/fld_* id or a path - cursor = 'cursor_example' # str | (optional) - limit = 56 # int | (optional) - - try: - # List live grants on a resource (requires can_manage) - api_response = api_instance.list_grants_route_v0_grants_get(resource, cursor=cursor, limit=limit) - print("The response of DefaultApi->list_grants_route_v0_grants_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->list_grants_route_v0_grants_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **resource** | **str**| art_*/fld_* id or a path | - **cursor** | **str**| | [optional] - **limit** | **int**| | [optional] - -### Return type - -[**GrantList**](GrantList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**400** | The cursor or resource reference is invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The target resource does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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_project_jobs_v0_projects_fld_id_jobs_get** -> CompileJobListOut list_project_jobs_v0_projects_fld_id_jobs_get(fld_id, status=status, limit=limit, cursor=cursor) - -List a project's jobs - -List compile jobs newest first in stable `(created_at, job_id)` descending order. Pass a non-null `next_cursor` back as `cursor` to continue; malformed cursors return `400 BAD_CURSOR`. The cursor contains only the keyset position, so a `status` filter must be re-sent unchanged on every page. `limit` retains its existing default of 50 and validated range of 1 through 200. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.compile_job_list_out import CompileJobListOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - fld_id = 'fld_id_example' # str | - status = 'status_example' # str | (optional) - limit = 50 # int | (optional) (default to 50) - cursor = 'cursor_example' # str | (optional) - - try: - # List a project's jobs - api_response = api_instance.list_project_jobs_v0_projects_fld_id_jobs_get(fld_id, status=status, limit=limit, cursor=cursor) - print("The response of DefaultApi->list_project_jobs_v0_projects_fld_id_jobs_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->list_project_jobs_v0_projects_fld_id_jobs_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fld_id** | **str**| | - **status** | **str**| | [optional] - **limit** | **int**| | [optional] [default to 50] - **cursor** | **str**| | [optional] - -### Return type - -[**CompileJobListOut**](CompileJobListOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**400** | The status filter is invalid, or the cursor is malformed (`BAD_CURSOR`). | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The project folder does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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_shares_route_v0_shares_get** -> ShareList list_shares_route_v0_shares_get(resource, cursor=cursor, limit=limit) - -List live share links on a resource (requires can_manage) - -**Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. The `resource` filter must be re-sent on every page — the cursor encodes only the keyset position. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.share_list import ShareList -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - resource = 'resource_example' # str | art_*/fld_* id or a path - cursor = 'cursor_example' # str | (optional) - limit = 56 # int | (optional) - - try: - # List live share links on a resource (requires can_manage) - api_response = api_instance.list_shares_route_v0_shares_get(resource, cursor=cursor, limit=limit) - print("The response of DefaultApi->list_shares_route_v0_shares_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->list_shares_route_v0_shares_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **resource** | **str**| art_*/fld_* id or a path | - **cursor** | **str**| | [optional] - **limit** | **int**| | [optional] - -### Return type - -[**ShareList**](ShareList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**400** | The cursor or resource reference is invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The target resource does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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_trash_route_v0_drives_drive_id_trash_get** -> TrashOut list_trash_route_v0_drives_drive_id_trash_get(drive_id, cursor=cursor, limit=limit) - -List the authenticated drive's trash - -Returns soft-deleted artifacts on the drive plus the drive's own soft-delete state (if applicable). The path-param `drive_id` MUST match the authenticated drive. - -**Compatibility window:** `limit` or `cursor` opts into cursor pagination. Unadorned requests retain the legacy complete result during the migration window. Paginated requests are clamped to 1–100 items (default 50 when only `cursor` is supplied). `items` is canonical; `artifacts` is a deprecated same-value alias. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.trash_out import TrashOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - drive_id = 'drive_id_example' # str | - cursor = 'cursor_example' # str | (optional) - limit = 56 # int | (optional) - - try: - # List the authenticated drive's trash - api_response = api_instance.list_trash_route_v0_drives_drive_id_trash_get(drive_id, cursor=cursor, limit=limit) - print("The response of DefaultApi->list_trash_route_v0_drives_drive_id_trash_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->list_trash_route_v0_drives_drive_id_trash_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **drive_id** | **str**| | - **cursor** | **str**| | [optional] - **limit** | **int**| | [optional] - -### Return type - -[**TrashOut**](TrashOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**400** | The cursor is malformed (`BAD_CURSOR`). | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | No matching authenticated drive exists. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **login_auth_login_get** -> login_auth_login_get(return_to=return_to) - -Login - -Begin a WorkOS sign-in flow. - -Mints a pre-login state cookie (binds the OAuth flow to this -browser — defense-in-depth against login-CSRF), signs a state -payload, and redirects to AuthKit. The hosted AuthKit page lets -the user pick Google OAuth, Microsoft OAuth, magic-link, -password, or passkey; we don't care which — they all funnel -back to /auth/callback with a `code` we exchange in D2. - -### Example - - -```python -import agentdrive_sdk -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - return_to = 'return_to_example' # str | (optional) - - try: - # Login - api_instance.login_auth_login_get(return_to=return_to) - except Exception as e: - print("Exception when calling DefaultApi->login_auth_login_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **return_to** | **str**| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**302** | Redirect to the canonical or authentication URL. | * Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| - -[[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) - -# **logout_auth_logout_post** -> logout_auth_logout_post(csrf) - -Logout - -Terminate both the local session AND the upstream WorkOS session. - -Without the WorkOS-side termination, the next `/auth/login` flow -silently re-authenticates the user through AuthKit's still-valid -session cookie on `api.workos.com` — "Sign out" feels broken and -a shared-browser user can't switch accounts. The recommended -pattern (per https://workos.com/docs/authkit/sessions) is to -redirect to the WorkOS logout endpoint with the `sid` we stashed -during the callback; WorkOS clears its own session and returns -the browser to our `return_to`. - -Failure modes handled: - * No `workos_session_id` in the session (legacy v2 cookie issued - before this slice landed): fall back to local-only logout. The - upstream session lingers but the user's local state is cleared - — same UX as before this slice; cookie rotation on next sign-in - eventually overwrites it. - * SDK raises during `get_logout_url`: pure string formatting at - WorkOS's end, so the only realistic failure is a misconfigured - WorkOS dashboard (no Sign-out redirect registered). We catch - and fall back to local-only logout rather than 500ing — the - user clicked "Sign out", they should land somewhere, not on an - error page. - -### Example - - -```python -import agentdrive_sdk -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - csrf = 'csrf_example' # str | - - try: - # Logout - api_instance.logout_auth_logout_post(csrf) - except Exception as e: - print("Exception when calling DefaultApi->logout_auth_logout_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **csrf** | **str**| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**302** | Redirect to the canonical or authentication URL. | * Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -**403** | The browser CSRF check failed. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| - -[[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) - -# **me_usage_v0_drives_me_usage_get** -> DriveUsageOut me_usage_v0_drives_me_usage_get() - -Current-period usage + caps for the authenticated drive - -Unified view of every metered dimension: storage (snapshot), writes (current hour), indexing ops + retrieval queries (current calendar month UTC). Each row carries `used` and `limit`; `limit: 0` means unlimited (the v0 free-tier default for the two monthly counters). Reads are de-throttled — there is no hourly read budget; the monthly read count appears under `ops_this_month.reads`. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.drive_usage_out import DriveUsageOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - - try: - # Current-period usage + caps for the authenticated drive - api_response = api_instance.me_usage_v0_drives_me_usage_get() - print("The response of DefaultApi->me_usage_v0_drives_me_usage_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->me_usage_v0_drives_me_usage_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**DriveUsageOut**](DriveUsageOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **me_v0_drives_me_get** -> DriveReadOut me_v0_drives_me_get() - -Me - -Drive overview for the authenticated bearer token. - -Wire-protocol preservation (WorkOS integration §6): the `email` field -is preserved in the response shape; its meaning is now "the drive's -owner's email" (via `drives.owner_user_id` → `users.email`, joined -in `auth.resolve_drive`). For solo signups this equals v0 behavior — -the email the user signed up with. Returns null if the owner has -been hard-purged. `organization_id` is a new additive field, as are -`metageneration` / `etag` (also emitted as the `ETag` header). - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.drive_read_out import DriveReadOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - - try: - # Me - api_response = api_instance.me_v0_drives_me_get() - print("The response of DefaultApi->me_v0_drives_me_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->me_v0_drives_me_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**DriveReadOut**](DriveReadOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **move_artifact_route_v0_artifacts_art_id_move_post** -> ArtifactOut move_artifact_route_v0_artifacts_art_id_move_post(art_id, artifact_move_in, x_agentdrive_actor=x_agentdrive_actor, if_match=if_match) - -Rename / move an artifact to a new path - -Canonical artifact move/rename, keyed by the stable `art_…` ID (the artifact analogue of `POST /v0/folders/{fld_id}/move`). Moves the artifact to a new `path` on the same drive; ID, version history, source refs, labels, metadata, and the underlying CAS blob are all preserved — only `path` and `updated_at` change, and the move does NOT bump `version_number`. - -The row UPDATE and the emitted `artifact.renamed` event commit in a SINGLE transaction — a failure leaves the artifact fully unchanged. - -Returns 409 PATH_CONFLICT if the target `path` is already taken; 404 ARTIFACT_NOT_FOUND for an unknown id; 403 WIKI_RESERVED for a `_wiki/` / `_compiled/` target. Honors `If-Match` (→ 412 PRECONDITION_FAILED). Use `X-AgentDrive-Actor` to attach attribution to the emitted `artifact.renamed` event. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.artifact_move_in import ArtifactMoveIn -from agentdrive_sdk.models.artifact_out import ArtifactOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - art_id = 'art_id_example' # str | - artifact_move_in = agentdrive_sdk.ArtifactMoveIn() # ArtifactMoveIn | - x_agentdrive_actor = 'x_agentdrive_actor_example' # str | (optional) - if_match = 'if_match_example' # str | (optional) - - try: - # Rename / move an artifact to a new path - api_response = api_instance.move_artifact_route_v0_artifacts_art_id_move_post(art_id, artifact_move_in, x_agentdrive_actor=x_agentdrive_actor, if_match=if_match) - print("The response of DefaultApi->move_artifact_route_v0_artifacts_art_id_move_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->move_artifact_route_v0_artifacts_art_id_move_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **art_id** | **str**| | - **artifact_move_in** | [**ArtifactMoveIn**](ArtifactMoveIn.md)| | - **x_agentdrive_actor** | **str**| | [optional] - **if_match** | **str**| | [optional] - -### Return type - -[**ArtifactOut**](ArtifactOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | No such artifact exists in this drive. | * X-Request-Id - Request correlation identifier.
| -**409** | The destination path is already occupied. | * X-Request-Id - Request correlation identifier.
| -**412** | A request precondition did not match. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **move_folder_by_id_v0_folders_fld_id_move_post** -> FolderOut move_folder_by_id_v0_folders_fld_id_move_post(fld_id, folder_move_in, x_agentdrive_actor=x_agentdrive_actor, if_match=if_match) - -Rename / move a folder by stable ID (cascade descendants) - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.folder_move_in import FolderMoveIn -from agentdrive_sdk.models.folder_out import FolderOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - fld_id = 'fld_id_example' # str | - folder_move_in = agentdrive_sdk.FolderMoveIn() # FolderMoveIn | - x_agentdrive_actor = 'x_agentdrive_actor_example' # str | (optional) - if_match = 'if_match_example' # str | (optional) - - try: - # Rename / move a folder by stable ID (cascade descendants) - api_response = api_instance.move_folder_by_id_v0_folders_fld_id_move_post(fld_id, folder_move_in, x_agentdrive_actor=x_agentdrive_actor, if_match=if_match) - print("The response of DefaultApi->move_folder_by_id_v0_folders_fld_id_move_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->move_folder_by_id_v0_folders_fld_id_move_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fld_id** | **str**| | - **folder_move_in** | [**FolderMoveIn**](FolderMoveIn.md)| | - **x_agentdrive_actor** | **str**| | [optional] - **if_match** | **str**| | [optional] - -### Return type - -[**FolderOut**](FolderOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**400** | The destination path is invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The folder does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**409** | The destination path is already occupied. | * X-Request-Id - Request correlation identifier.
| -**412** | A request precondition did not match. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **move_folder_by_path_v0_folders_path_move_post** -> FolderOut move_folder_by_path_v0_folders_path_move_post(path, folder_move_in, x_agentdrive_actor=x_agentdrive_actor, if_match=if_match) - -Rename / move a folder (cascade-update descendants) - -Move the folder identified by URL path to the body's `path`. All descendant folders + artifacts are path-prefix-updated in the same transaction. The folder's `fld_*` ID stays stable. - -Returns 409 `FOLDER_PATH_CONFLICT` if the destination prefix collides with a live folder or artifact path. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.folder_move_in import FolderMoveIn -from agentdrive_sdk.models.folder_out import FolderOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - path = 'path_example' # str | - folder_move_in = agentdrive_sdk.FolderMoveIn() # FolderMoveIn | - x_agentdrive_actor = 'x_agentdrive_actor_example' # str | (optional) - if_match = 'if_match_example' # str | (optional) - - try: - # Rename / move a folder (cascade-update descendants) - api_response = api_instance.move_folder_by_path_v0_folders_path_move_post(path, folder_move_in, x_agentdrive_actor=x_agentdrive_actor, if_match=if_match) - print("The response of DefaultApi->move_folder_by_path_v0_folders_path_move_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->move_folder_by_path_v0_folders_path_move_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **path** | **str**| | - **folder_move_in** | [**FolderMoveIn**](FolderMoveIn.md)| | - **x_agentdrive_actor** | **str**| | [optional] - **if_match** | **str**| | [optional] - -### Return type - -[**FolderOut**](FolderOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**400** | The source or destination path is invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The source folder does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**409** | The destination path is already occupied. | * X-Request-Id - Request correlation identifier.
| -**412** | A request precondition did not match. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **patch_artifact_route_v0_artifacts_art_id_patch** -> ArtifactOut patch_artifact_route_v0_artifacts_art_id_patch(art_id, artifact_patch_in, x_agentdrive_actor=x_agentdrive_actor, if_match=if_match) - -Edit artifact metadata (labels / metadata / source) - -Metadata-only JSON-merge-patch update of a single artifact, keyed by its stable `art_…` ID. Every field in the body is optional; a field that is **omitted** is left unchanged, a field that is **present** is applied — with an explicit `null` / `[]` / `{}` meaning "clear". This mirrors the MCP `set_metadata` tool. - -Editable fields: - * `labels` — replace the label set (`[]`/`null` clears). - * `metadata` — replace the free-form metadata object (`{}`/`null` clears). - * `source` — replace provenance refs (`null` clears). - -**To move/rename an artifact, use `POST /v0/artifacts/{art_id}/move`** — PATCH no longer accepts `path`. The body is `extra="forbid"`, so a stray field (notably a legacy `path`) is rejected with 422 rather than silently ignored. - -Metadata edits do NOT create a new content version (no `version_number` / generation bump, no `artifact_versions` row) but DO bump the artifact's `metageneration` and `updated_at`. - -Returns 400 BAD_LABELS / BAD_SOURCE for invalid metadata; 404 ARTIFACT_NOT_FOUND for an unknown id. Honors `If-Match`, which takes the composite ETag `".."` and is compared as a whole tuple: ANY concurrent content **or** metadata change (a bumped generation OR metageneration) → 412 PRECONDITION_FAILED. There is no last-writer-wins gap for metadata-only edits. Use `X-AgentDrive-Actor` to attach attribution to the emitted `artifact.metadata_updated` event. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.artifact_out import ArtifactOut -from agentdrive_sdk.models.artifact_patch_in import ArtifactPatchIn -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - art_id = 'art_id_example' # str | - artifact_patch_in = agentdrive_sdk.ArtifactPatchIn() # ArtifactPatchIn | - x_agentdrive_actor = 'x_agentdrive_actor_example' # str | (optional) - if_match = 'if_match_example' # str | (optional) - - try: - # Edit artifact metadata (labels / metadata / source) - api_response = api_instance.patch_artifact_route_v0_artifacts_art_id_patch(art_id, artifact_patch_in, x_agentdrive_actor=x_agentdrive_actor, if_match=if_match) - print("The response of DefaultApi->patch_artifact_route_v0_artifacts_art_id_patch:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->patch_artifact_route_v0_artifacts_art_id_patch: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **art_id** | **str**| | - **artifact_patch_in** | [**ArtifactPatchIn**](ArtifactPatchIn.md)| | - **x_agentdrive_actor** | **str**| | [optional] - **if_match** | **str**| | [optional] - -### Return type - -[**ArtifactOut**](ArtifactOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**400** | The labels or source metadata are invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | No such live artifact exists in this drive. | * X-Request-Id - Request correlation identifier.
| -**412** | A request precondition did not match. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **patch_folder_by_id_v0_folders_fld_id_patch** -> FolderOut patch_folder_by_id_v0_folders_fld_id_patch(fld_id, folder_patch_in, x_agentdrive_actor=x_agentdrive_actor, if_match=if_match) - -Update folder metadata by stable ID - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.folder_out import FolderOut -from agentdrive_sdk.models.folder_patch_in import FolderPatchIn -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - fld_id = 'fld_id_example' # str | - folder_patch_in = agentdrive_sdk.FolderPatchIn() # FolderPatchIn | - x_agentdrive_actor = 'x_agentdrive_actor_example' # str | (optional) - if_match = 'if_match_example' # str | (optional) - - try: - # Update folder metadata by stable ID - api_response = api_instance.patch_folder_by_id_v0_folders_fld_id_patch(fld_id, folder_patch_in, x_agentdrive_actor=x_agentdrive_actor, if_match=if_match) - print("The response of DefaultApi->patch_folder_by_id_v0_folders_fld_id_patch:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->patch_folder_by_id_v0_folders_fld_id_patch: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fld_id** | **str**| | - **folder_patch_in** | [**FolderPatchIn**](FolderPatchIn.md)| | - **x_agentdrive_actor** | **str**| | [optional] - **if_match** | **str**| | [optional] - -### Return type - -[**FolderOut**](FolderOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**400** | The folder update is invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The folder does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**412** | A request precondition did not match. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **patch_folder_by_path_v0_folders_path_patch** -> FolderOut patch_folder_by_path_v0_folders_path_patch(path, folder_patch_in, x_agentdrive_actor=x_agentdrive_actor, if_match=if_match) - -Update folder metadata by path - -Partial update — field absence leaves the value unchanged; explicit `null` clears the field. Use the by-id endpoint (slice 2) when you need stable addressing across renames. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.folder_out import FolderOut -from agentdrive_sdk.models.folder_patch_in import FolderPatchIn -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - path = 'path_example' # str | - folder_patch_in = agentdrive_sdk.FolderPatchIn() # FolderPatchIn | - x_agentdrive_actor = 'x_agentdrive_actor_example' # str | (optional) - if_match = 'if_match_example' # str | (optional) - - try: - # Update folder metadata by path - api_response = api_instance.patch_folder_by_path_v0_folders_path_patch(path, folder_patch_in, x_agentdrive_actor=x_agentdrive_actor, if_match=if_match) - print("The response of DefaultApi->patch_folder_by_path_v0_folders_path_patch:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->patch_folder_by_path_v0_folders_path_patch: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **path** | **str**| | - **folder_patch_in** | [**FolderPatchIn**](FolderPatchIn.md)| | - **x_agentdrive_actor** | **str**| | [optional] - **if_match** | **str**| | [optional] - -### Return type - -[**FolderOut**](FolderOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**400** | The folder update is invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The folder does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**412** | A request precondition did not match. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **patch_grant_route_v0_grants_grn_id_patch** -> GrantOut patch_grant_route_v0_grants_grn_id_patch(grn_id, grant_patch_in, x_agentdrive_actor=x_agentdrive_actor) - -Update a grant's role and/or expiry (requires can_manage) - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.grant_out import GrantOut -from agentdrive_sdk.models.grant_patch_in import GrantPatchIn -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - grn_id = 'grn_id_example' # str | - grant_patch_in = agentdrive_sdk.GrantPatchIn() # GrantPatchIn | - x_agentdrive_actor = 'x_agentdrive_actor_example' # str | (optional) - - try: - # Update a grant's role and/or expiry (requires can_manage) - api_response = api_instance.patch_grant_route_v0_grants_grn_id_patch(grn_id, grant_patch_in, x_agentdrive_actor=x_agentdrive_actor) - print("The response of DefaultApi->patch_grant_route_v0_grants_grn_id_patch:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->patch_grant_route_v0_grants_grn_id_patch: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **grn_id** | **str**| | - **grant_patch_in** | [**GrantPatchIn**](GrantPatchIn.md)| | - **x_agentdrive_actor** | **str**| | [optional] - -### Return type - -[**GrantOut**](GrantOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**400** | The grant update or expiry is invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The grant does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **post_describe_v0_query_describe_post** -> DatasetDescriptionOut post_describe_v0_query_describe_post(describe_in) - -Describe a dataset's column schema - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.dataset_description_out import DatasetDescriptionOut -from agentdrive_sdk.models.describe_in import DescribeIn -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - describe_in = agentdrive_sdk.DescribeIn() # DescribeIn | - - try: - # Describe a dataset's column schema - api_response = api_instance.post_describe_v0_query_describe_post(describe_in) - print("The response of DefaultApi->post_describe_v0_query_describe_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->post_describe_v0_query_describe_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **describe_in** | [**DescribeIn**](DescribeIn.md)| | - -### Return type - -[**DatasetDescriptionOut**](DatasetDescriptionOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**400** | The referenced dataset is invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| -**503** | The configured query engine is unavailable. | * X-Request-Id - Request correlation identifier.
| - -[[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) - -# **post_feedback_v0_feedback_post** -> FeedbackCreateOut post_feedback_v0_feedback_post() - -Post Feedback - -File feedback. Body: `{kind, title, body, contact?, -attachments?: [art_id, ...]}` — attachments are snapshotted from -this drive's artifacts at submit time. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.feedback_create_out import FeedbackCreateOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - - try: - # Post Feedback - api_response = api_instance.post_feedback_v0_feedback_post() - print("The response of DefaultApi->post_feedback_v0_feedback_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->post_feedback_v0_feedback_post: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**FeedbackCreateOut**](FeedbackCreateOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Successful Response | * Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -**400** | The feedback body or attachment list is invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | An attached artifact does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **post_lookup_values_v0_query_lookup_values_post** -> LookupValuesOut post_lookup_values_v0_query_lookup_values_post(lookup_values_in) - -List distinct values of a dataset column - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.lookup_values_in import LookupValuesIn -from agentdrive_sdk.models.lookup_values_out import LookupValuesOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - lookup_values_in = agentdrive_sdk.LookupValuesIn() # LookupValuesIn | - - try: - # List distinct values of a dataset column - api_response = api_instance.post_lookup_values_v0_query_lookup_values_post(lookup_values_in) - print("The response of DefaultApi->post_lookup_values_v0_query_lookup_values_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->post_lookup_values_v0_query_lookup_values_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **lookup_values_in** | [**LookupValuesIn**](LookupValuesIn.md)| | - -### Return type - -[**LookupValuesOut**](LookupValuesOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**400** | The dataset, column, or limit is invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**402** | The current plan does not permit this query. | * X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| -**503** | The configured query engine is unavailable. | * X-Request-Id - Request correlation identifier.
| - -[[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) - -# **post_query_v0_query_post** -> ResponsePostQueryV0QueryPost post_query_v0_query_post(query_in) - -Run a read-only SQL query over authorized datasets - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.query_in import QueryIn -from agentdrive_sdk.models.response_post_query_v0_query_post import ResponsePostQueryV0QueryPost -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - query_in = agentdrive_sdk.QueryIn() # QueryIn | - - try: - # Run a read-only SQL query over authorized datasets - api_response = api_instance.post_query_v0_query_post(query_in) - print("The response of DefaultApi->post_query_v0_query_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->post_query_v0_query_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query_in** | [**QueryIn**](QueryIn.md)| | - -### Return type - -[**ResponsePostQueryV0QueryPost**](ResponsePostQueryV0QueryPost.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**400** | The SQL or referenced dataset is invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**402** | The current plan does not permit this query. | * X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| -**503** | The configured query engine is unavailable. | * X-Request-Id - Request correlation identifier.
| - -[[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) - -# **put_artifact_v0_artifacts_path_put** -> ArtifactOut put_artifact_v0_artifacts_path_put(path, content_type=content_type, x_agentdrive_labels=x_agentdrive_labels, x_agentdrive_metadata=x_agentdrive_metadata, x_agentdrive_source=x_agentdrive_source, x_agentdrive_actor=x_agentdrive_actor, x_agentdrive_change_summary=x_agentdrive_change_summary, x_agentdrive_checksum=x_agentdrive_checksum, content_md5=content_md5, if_match=if_match, if_none_match=if_none_match) - -Upload (or overwrite) an artifact - -Upload an artifact at the given path. The path is treated as the artifact's location in the drive — re-uploading the same path overwrites in place (idempotent). Returns 201 when the artifact is created (no prior live artifact at the path), 200 on overwrite — mirroring `PUT /v0/folders/{path}`. - -**Limits:** request body must not exceed **50 MB**. Path must be non-empty, ≤256 chars, only `[A-Za-z0-9_./-]`, no `..` segments, no leading/trailing slash. Per-token write rate limit: 100/hour. - -**Optional headers.** Each preserves the existing artifact's value when omitted on an overwrite, and takes the create-default on a new path; send the header to replace it: -- `X-AgentDrive-Labels`: comma-separated labels (e.g. `draft,report`); an empty value clears them. Each: lowercase `[a-z0-9_-]+`, ≤64 chars; ≤16 labels per artifact. -- `X-AgentDrive-Metadata`: JSON object of agent-attached fields. -- `X-AgentDrive-Source`: JSON `{"refs": [...]}` source provenance (present, including `{"refs": []}`, replaces). -- `X-AgentDrive-Actor`: caller-supplied actor name (≤64 chars) for event-log attribution. Untrusted; never used for authz. - -**Preconditions.** `If-Match: ".."` makes the write conditional on the current composite ETag (→ 412 PRECONDITION_FAILED). `If-None-Match: *` is create-only: it succeeds only if no live artifact occupies the path (→ 412 CREATE_CONFLICT if one does). The two are mutually exclusive (→ 400 BAD_PRECONDITION). - -**Integrity (optional).** `X-AgentDrive-Checksum: :` (`sha256:` or `crc32c:`) or the standard `Content-MD5` (base64 MD5) is verified against the received bytes before they land (→ 400 CHECKSUM_MISMATCH on mismatch); no artifact is created on failure. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.artifact_out import ArtifactOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - path = 'path_example' # str | - content_type = 'application/octet-stream' # str | (optional) (default to 'application/octet-stream') - x_agentdrive_labels = 'x_agentdrive_labels_example' # str | (optional) - x_agentdrive_metadata = 'x_agentdrive_metadata_example' # str | (optional) - x_agentdrive_source = 'x_agentdrive_source_example' # str | (optional) - x_agentdrive_actor = 'x_agentdrive_actor_example' # str | (optional) - x_agentdrive_change_summary = 'x_agentdrive_change_summary_example' # str | (optional) - x_agentdrive_checksum = 'x_agentdrive_checksum_example' # str | (optional) - content_md5 = 'content_md5_example' # str | (optional) - if_match = 'if_match_example' # str | (optional) - if_none_match = 'if_none_match_example' # str | (optional) - - try: - # Upload (or overwrite) an artifact - api_response = api_instance.put_artifact_v0_artifacts_path_put(path, content_type=content_type, x_agentdrive_labels=x_agentdrive_labels, x_agentdrive_metadata=x_agentdrive_metadata, x_agentdrive_source=x_agentdrive_source, x_agentdrive_actor=x_agentdrive_actor, x_agentdrive_change_summary=x_agentdrive_change_summary, x_agentdrive_checksum=x_agentdrive_checksum, content_md5=content_md5, if_match=if_match, if_none_match=if_none_match) - print("The response of DefaultApi->put_artifact_v0_artifacts_path_put:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->put_artifact_v0_artifacts_path_put: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **path** | **str**| | - **content_type** | **str**| | [optional] [default to 'application/octet-stream'] - **x_agentdrive_labels** | **str**| | [optional] - **x_agentdrive_metadata** | **str**| | [optional] - **x_agentdrive_source** | **str**| | [optional] - **x_agentdrive_actor** | **str**| | [optional] - **x_agentdrive_change_summary** | **str**| | [optional] - **x_agentdrive_checksum** | **str**| | [optional] - **content_md5** | **str**| | [optional] - **if_match** | **str**| | [optional] - **if_none_match** | **str**| | [optional] - -### Return type - -[**ArtifactOut**](ArtifactOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**201** | Artifact created at a previously unused path. | * ETag - Current strong entity tag.
* Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -**400** | The path, metadata, source, or conditional headers are invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**409** | The path is occupied and overwrite semantics do not permit replacement. | * X-Request-Id - Request correlation identifier.
| -**412** | A request precondition did not match. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**413** | The artifact or resulting drive storage exceeds its limit. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **put_project_v0_projects_fld_id_put** -> CompileProjectOut put_project_v0_projects_fld_id_put(fld_id, project_config_in) - -Set a project's compile config (entrypoint/engine/auto_compile) - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.compile_project_out import CompileProjectOut -from agentdrive_sdk.models.project_config_in import ProjectConfigIn -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - fld_id = 'fld_id_example' # str | - project_config_in = agentdrive_sdk.ProjectConfigIn() # ProjectConfigIn | - - try: - # Set a project's compile config (entrypoint/engine/auto_compile) - api_response = api_instance.put_project_v0_projects_fld_id_put(fld_id, project_config_in) - print("The response of DefaultApi->put_project_v0_projects_fld_id_put:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->put_project_v0_projects_fld_id_put: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fld_id** | **str**| | - **project_config_in** | [**ProjectConfigIn**](ProjectConfigIn.md)| | - -### Return type - -[**CompileProjectOut**](CompileProjectOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**400** | The compile engine or entrypoint is invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The project folder does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **redeem_share_s_share_key_get** -> ShareRedeemOut redeem_share_s_share_key_get(share_key) - -Redeem Share - -### Example - - -```python -import agentdrive_sdk -from agentdrive_sdk.models.share_redeem_out import ShareRedeemOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - share_key = 'share_key_example' # str | - - try: - # Redeem Share - api_response = api_instance.redeem_share_s_share_key_get(share_key) - print("The response of DefaultApi->redeem_share_s_share_key_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->redeem_share_s_share_key_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **share_key** | **str**| | - -### Return type - -[**ShareRedeemOut**](ShareRedeemOut.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json, text/html - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | JSON capability response or browser password form. | * X-Request-Id - Request correlation identifier.
| -**302** | Browser redemption succeeded; continue to the canonical URL. | * Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -**401** | A password is required or the supplied password is invalid. | * X-Request-Id - Request correlation identifier.
| -**404** | The share is invalid, expired, or no longer authorized. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| - -[[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) - -# **redeem_share_with_password_s_share_key_post** -> ShareRedeemOut redeem_share_with_password_s_share_key_post(share_key, password=password) - -Redeem Share With Password - -### Example - - -```python -import agentdrive_sdk -from agentdrive_sdk.models.share_redeem_out import ShareRedeemOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - share_key = 'share_key_example' # str | - password = '' # str | (optional) (default to '') - - try: - # Redeem Share With Password - api_response = api_instance.redeem_share_with_password_s_share_key_post(share_key, password=password) - print("The response of DefaultApi->redeem_share_with_password_s_share_key_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->redeem_share_with_password_s_share_key_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **share_key** | **str**| | - **password** | **str**| | [optional] [default to ''] - -### Return type - -[**ShareRedeemOut**](ShareRedeemOut.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json, text/html - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | JSON capability response or browser password form. | * X-Request-Id - Request correlation identifier.
| -**302** | Browser redemption succeeded; continue to the canonical URL. | * Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -**401** | A password is required or the supplied password is invalid. | * X-Request-Id - Request correlation identifier.
| -**404** | The share is invalid, expired, or no longer authorized. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| - -[[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) - -# **restore_artifact_v0_artifacts_art_id_restore_post** -> ArtifactOut restore_artifact_v0_artifacts_art_id_restore_post(art_id, rename=rename, overwrite=overwrite, x_agentdrive_actor=x_agentdrive_actor, if_match=if_match) - -Restore a soft-deleted artifact - -Clear `deleted_at` + `purge_at` on a soft-deleted artifact. Available only while the artifact is in trash (i.e. before the GC cleanup cron purges it). Returns 404 if the artifact is live or already hard-deleted; 409 PATH_CONFLICT if its path is now occupied by another live artifact. The 409 payload includes a `restore_options` block with `rename_to` and `force_overwrite` URLs the caller can follow to resolve the conflict — see deletion-design.md §5.4. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.artifact_out import ArtifactOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - art_id = 'art_id_example' # str | - rename = 'rename_example' # str | Restore at this path instead of the original. Soft-deletes the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. Mutually exclusive with `overwrite`. (optional) - overwrite = False # bool | Soft-delete the live occupant at the original path and restore there. Audit `metadata.cause='restore_conflict_overwrite'`. Mutually exclusive with `rename`. (optional) (default to False) - x_agentdrive_actor = 'x_agentdrive_actor_example' # str | (optional) - if_match = 'if_match_example' # str | (optional) - - try: - # Restore a soft-deleted artifact - api_response = api_instance.restore_artifact_v0_artifacts_art_id_restore_post(art_id, rename=rename, overwrite=overwrite, x_agentdrive_actor=x_agentdrive_actor, if_match=if_match) - print("The response of DefaultApi->restore_artifact_v0_artifacts_art_id_restore_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->restore_artifact_v0_artifacts_art_id_restore_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **art_id** | **str**| | - **rename** | **str**| Restore at this path instead of the original. Soft-deletes the live occupant at the original path with audit `metadata.cause='restore_conflict_rename'`. Mutually exclusive with `overwrite`. | [optional] - **overwrite** | **bool**| Soft-delete the live occupant at the original path and restore there. Audit `metadata.cause='restore_conflict_overwrite'`. Mutually exclusive with `rename`. | [optional] [default to False] - **x_agentdrive_actor** | **str**| | [optional] - **if_match** | **str**| | [optional] - -### Return type - -[**ArtifactOut**](ArtifactOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | No restorable artifact exists with this ID. | * X-Request-Id - Request correlation identifier.
| -**409** | The original or requested restore path is occupied. | * X-Request-Id - Request correlation identifier.
| -**412** | A request precondition did not match. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **restore_artifact_version_v0_artifacts_art_id_versions_version_number_restore_post** -> ArtifactOut restore_artifact_version_v0_artifacts_art_id_versions_version_number_restore_post(art_id, version_number, x_agentdrive_actor=x_agentdrive_actor, if_match=if_match) - -Restore a previous version as a new head version - -Roll the artifact forward to the content of version `version_number` by creating a **new head version** with identical bytes. History is preserved — this never rewrites or deletes past versions. The prior version's content-addressed blob is reused, so no bytes are re-uploaded. A change summary of `Restored version N` is recorded on the new version; `X-AgentDrive-Actor` attributes it. - -Restoring a version whose content already matches the current head (including the head itself) is a **no-op**: it returns the current artifact unchanged, with no new version created. - -Honors `If-Match` on the current head (roll forward only if the head is unchanged → 412 PRECONDITION_FAILED). - -Errors: `404 ARTIFACT_NOT_FOUND`, `404 VERSION_NOT_FOUND`, and `410 VERSION_PRUNED` when the version existed but its bytes were retained out of existence. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.artifact_out import ArtifactOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - art_id = 'art_id_example' # str | - version_number = 56 # int | - x_agentdrive_actor = 'x_agentdrive_actor_example' # str | (optional) - if_match = 'if_match_example' # str | (optional) - - try: - # Restore a previous version as a new head version - api_response = api_instance.restore_artifact_version_v0_artifacts_art_id_versions_version_number_restore_post(art_id, version_number, x_agentdrive_actor=x_agentdrive_actor, if_match=if_match) - print("The response of DefaultApi->restore_artifact_version_v0_artifacts_art_id_versions_version_number_restore_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->restore_artifact_version_v0_artifacts_art_id_versions_version_number_restore_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **art_id** | **str**| | - **version_number** | **int**| | - **x_agentdrive_actor** | **str**| | [optional] - **if_match** | **str**| | [optional] - -### Return type - -[**ArtifactOut**](ArtifactOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The artifact or version does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**410** | The requested version was pruned by retention. | * X-Request-Id - Request correlation identifier.
| -**412** | A request precondition did not match. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **restore_drive_route_v0_drives_drive_id_restore_post** -> DriveRestoreOut restore_drive_route_v0_drives_drive_id_restore_post(drive_id, x_agentdrive_actor=x_agentdrive_actor, if_match=if_match) - -Restore a soft-deleted drive - -Clear `deleted_at` + `purge_at` on a soft-deleted drive. Soft-deleted child artifacts get their retention window rebased to the drive-restore moment (see deletion-design.md §5.2). Available only while the drive is in trash. Returns 404 if the drive is live or already hard-deleted. - -**Optimistic concurrency:** send `If-Match` with the trashed drive's composite ETag (`".0."`, e.g. from the delete response's `ETag` header) to make the restore conditional — a stale token returns 412 PRECONDITION_FAILED. A restore WITHOUT an `If-Match` precondition is last-writer-wins. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.drive_restore_out import DriveRestoreOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - drive_id = 'drive_id_example' # str | - x_agentdrive_actor = 'x_agentdrive_actor_example' # str | (optional) - if_match = 'if_match_example' # str | (optional) - - try: - # Restore a soft-deleted drive - api_response = api_instance.restore_drive_route_v0_drives_drive_id_restore_post(drive_id, x_agentdrive_actor=x_agentdrive_actor, if_match=if_match) - print("The response of DefaultApi->restore_drive_route_v0_drives_drive_id_restore_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->restore_drive_route_v0_drives_drive_id_restore_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **drive_id** | **str**| | - **x_agentdrive_actor** | **str**| | [optional] - **if_match** | **str**| | [optional] - -### Return type - -[**DriveRestoreOut**](DriveRestoreOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The drive does not exist or is not in trash. | * X-Request-Id - Request correlation identifier.
| -**409** | The drive cannot be restored into its current workspace state. | * X-Request-Id - Request correlation identifier.
| -**412** | If-Match does not match the current drive. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **restore_folder_by_id_v0_folders_fld_id_restore_post** -> FolderRestoreOut restore_folder_by_id_v0_folders_fld_id_restore_post(fld_id, x_agentdrive_actor=x_agentdrive_actor, if_match=if_match) - -Restore a soft-deleted folder (cascade) - -Mirrors `POST /v0/artifacts/{art_id}/restore` for folders: clear `deleted_at` + `purge_at` on a soft-deleted folder AND exactly the descendants soft-deleted in the same cascade (descendants trashed separately keep their trash state; restore those individually — the per-artifact restore remains for cherry-picking). Available only while the folder is in trash; returns 404 if it is live or already hard-purged. - -Returns 409 `PATH_CONFLICT` when a live folder/artifact now occupies a path this restore would reinstate (`colliding_path` + `kind` identify it). Unlike artifact restore there are NO `rename`/`overwrite` escape hatches — the whole cascade aborts; free the colliding path (or cherry-pick artifacts) and retry. - -`If-Match` (the trashed folder's composite ETag) makes the restore conditional → 412 PRECONDITION_FAILED on a stale token; omitted, the restore is last-writer-wins. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.folder_restore_out import FolderRestoreOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - fld_id = 'fld_id_example' # str | - x_agentdrive_actor = 'x_agentdrive_actor_example' # str | (optional) - if_match = 'if_match_example' # str | (optional) - - try: - # Restore a soft-deleted folder (cascade) - api_response = api_instance.restore_folder_by_id_v0_folders_fld_id_restore_post(fld_id, x_agentdrive_actor=x_agentdrive_actor, if_match=if_match) - print("The response of DefaultApi->restore_folder_by_id_v0_folders_fld_id_restore_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->restore_folder_by_id_v0_folders_fld_id_restore_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fld_id** | **str**| | - **x_agentdrive_actor** | **str**| | [optional] - **if_match** | **str**| | [optional] - -### Return type - -[**FolderRestoreOut**](FolderRestoreOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | No restorable folder exists with this ID. | * X-Request-Id - Request correlation identifier.
| -**409** | The restore destination is already occupied. | * X-Request-Id - Request correlation identifier.
| -**412** | A request precondition did not match. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **rotate_share_route_v0_shares_shr_id_rotate_post** -> ShareMintOut rotate_share_route_v0_shares_shr_id_rotate_post(shr_id, x_agentdrive_actor=x_agentdrive_actor) - -Revoke + reissue a share link's key (requires can_share) - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.share_mint_out import ShareMintOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - shr_id = 'shr_id_example' # str | - x_agentdrive_actor = 'x_agentdrive_actor_example' # str | (optional) - - try: - # Revoke + reissue a share link's key (requires can_share) - api_response = api_instance.rotate_share_route_v0_shares_shr_id_rotate_post(shr_id, x_agentdrive_actor=x_agentdrive_actor) - print("The response of DefaultApi->rotate_share_route_v0_shares_shr_id_rotate_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->rotate_share_route_v0_shares_shr_id_rotate_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **shr_id** | **str**| | - **x_agentdrive_actor** | **str**| | [optional] - -### Return type - -[**ShareMintOut**](ShareMintOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**400** | The replacement password is invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The share does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **search_v0_search_get** -> SearchPage search_v0_search_get(q, label=label, file_type=file_type, prefix=prefix, updated_after=updated_after, updated_before=updated_before, limit=limit) - -Full-text search over artifacts in the drive - -Lexical (not semantic) full-text search powered by Postgres `websearch_to_tsquery`. Results are ranked by `ts_rank` over a weighted tsvector (path > content > metadata > labels). - -**Supported query syntax:** -- Words: `kangaroo` (English stemming) -- Phrases: `"exact phrase"` -- Negation: `kangaroo -secret` -- AND (implicit): `kangaroo secret` -- OR: `kangaroo OR koala` -- Paths & filenames: `reports/q3-summary.md` or `q3-summary.md` match by their path words (`/ . _ -` are word boundaries) - -**Not supported (v0):** -- Semantic / embedding similarity -- PDF and image content (only the path + metadata are searchable) -- Non-English stemming -- Fuzzy matching, regex -- Boolean operator parentheses - -**Filters:** `label` (repeatable, AND), `file_type` (enum), `prefix` (path prefix), `updated_after` / `updated_before` (RFC 3339 timestamps, inclusive bounds on `updated_at`). - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.search_page import SearchPage -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - q = 'q_example' # str | - label = ['label_example'] # List[str] | (optional) - file_type = 'file_type_example' # str | (optional) - prefix = 'prefix_example' # str | (optional) - updated_after = '2013-10-20T19:20:30+01:00' # datetime | (optional) - updated_before = '2013-10-20T19:20:30+01:00' # datetime | (optional) - limit = 20 # int | (optional) (default to 20) - - try: - # Full-text search over artifacts in the drive - api_response = api_instance.search_v0_search_get(q, label=label, file_type=file_type, prefix=prefix, updated_after=updated_after, updated_before=updated_before, limit=limit) - print("The response of DefaultApi->search_v0_search_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->search_v0_search_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **q** | **str**| | - **label** | [**List[str]**](str.md)| | [optional] - **file_type** | **str**| | [optional] - **prefix** | **str**| | [optional] - **updated_after** | **datetime**| | [optional] - **updated_before** | **datetime**| | [optional] - **limit** | **int**| | [optional] [default to 20] - -### Return type - -[**SearchPage**](SearchPage.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**400** | The search query or filter is invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **view_artifact_head_a_art_id_head_get** -> ArtifactHeadOut view_artifact_head_a_art_id_head_get(art_id) - -View Artifact Head - -Return `{"version": }` for a readable artifact. - -Auth mirrors the permalink/viewer: the owner, or an `anyone:viewer` -grant (a published artifact), reads. Two deliberate differences from -the HTML viewer: - - * Never redirect to login. A poll is a background `fetch`, not a - navigation — an HTML login page would be a useless body and a - same-origin redirect the client can't act on. Anonymous callers - on a private/absent artifact get a flat 404. - * "Doesn't exist" and "exists but not readable" collapse to the - same 404, so an anonymous poller can't use this as an existence - oracle (matches the permalink/viewer leak guard). - -### Example - - -```python -import agentdrive_sdk -from agentdrive_sdk.models.artifact_head_out import ArtifactHeadOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - art_id = 'art_id_example' # str | - - try: - # View Artifact Head - api_response = api_instance.view_artifact_head_a_art_id_head_get(art_id) - print("The response of DefaultApi->view_artifact_head_a_art_id_head_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->view_artifact_head_a_art_id_head_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **art_id** | **str**| | - -### Return type - -[**ArtifactHeadOut**](ArtifactHeadOut.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| - -[[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) - -# **view_artifact_version_v_art_id_version_get** -> bytes view_artifact_version_v_art_id_version_get(art_id, version, raw=raw, download=download) - -View Artifact Version - -Render version `version` of an artifact, read-only. - -Version history is owner-only. The drive-blind `can_read` gate still -provides the same sign-in-or-404 masking as `/a/{art_id}`, but readable -non-owners cannot browse snapshots. A pruned or never-existed version -renders a friendly unavailable state, never a 500. -`?raw=1` / `?download=1` stream the version's bytes (powering the bar's -Raw / Download buttons) with the same sandbox+nosniff headers as the -head raw path. - -### Example - - -```python -import agentdrive_sdk -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - art_id = 'art_id_example' # str | - version = 56 # int | - raw = 0 # int | (optional) (default to 0) - download = 0 # int | (optional) (default to 0) - - try: - # View Artifact Version - api_response = api_instance.view_artifact_version_v_art_id_version_get(art_id, version, raw=raw, download=download) - print("The response of DefaultApi->view_artifact_version_v_art_id_version_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->view_artifact_version_v_art_id_version_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **art_id** | **str**| | - **version** | **int**| | - **raw** | **int**| | [optional] [default to 0] - **download** | **int**| | [optional] [default to 0] - -### Return type - -**bytes** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/octet-stream, text/html, application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Rendered HTML or raw artifact bytes. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| - -[[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) - -# **view_file_drive_id_path_get** -> bytes view_file_drive_id_path_get(drive_id, path, raw=raw, download=download) - -View File - -### Example - - -```python -import agentdrive_sdk -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - drive_id = 'drive_id_example' # str | - path = 'path_example' # str | - raw = 0 # int | (optional) (default to 0) - download = 0 # int | (optional) (default to 0) - - try: - # View File - api_response = api_instance.view_file_drive_id_path_get(drive_id, path, raw=raw, download=download) - print("The response of DefaultApi->view_file_drive_id_path_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DefaultApi->view_file_drive_id_path_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **drive_id** | **str**| | - **path** | **str**| | - **raw** | **int**| | [optional] [default to 0] - **download** | **int**| | [optional] [default to 0] - -### Return type - -**bytes** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/octet-stream, text/html, application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Rendered HTML or raw artifact bytes. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| - -[[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) - -# **view_permalink_artifact_a_art_id_get** -> view_permalink_artifact_a_art_id_get(art_id) - -View Permalink Artifact - -Resolve a stable artifact ID to its path-URL and 302 there. - -Auth model matches the path URL: public artifacts redirect for -anyone; private artifacts redirect only for the owner. Non-owners -on private artifacts get 404 — same response as "doesn't exist", -so the ID's existence isn't leaked. The forwarded query-param -allowlist is `raw`, `download` (see _PERMALINK_FORWARDED_PARAMS). - -### Example - - -```python -import agentdrive_sdk -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - art_id = 'art_id_example' # str | - - try: - # View Permalink Artifact - api_instance.view_permalink_artifact_a_art_id_get(art_id) - except Exception as e: - print("Exception when calling DefaultApi->view_permalink_artifact_a_art_id_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **art_id** | **str**| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**302** | Redirect to the canonical or authentication URL. | * Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -**404** | The artifact does not exist or is not readable. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| - -[[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) - -# **view_permalink_folder_f_fld_id_get** -> view_permalink_folder_f_fld_id_get(fld_id) - -View Permalink Folder - -Resolve a stable folder ID to its current path-URL and 302. - -Auth model mirrors the artifact permalink: public folder = anon -OK; private folder = owner only, otherwise 404 (no existence -leak). "Public" is an `anyone:viewer` grant on the `fld_*` id -resolved through `can_read` (§4.4); folders carry no visibility -flag of their own. - -### Example - - -```python -import agentdrive_sdk -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DefaultApi(api_client) - fld_id = 'fld_id_example' # str | - - try: - # View Permalink Folder - api_instance.view_permalink_folder_f_fld_id_get(fld_id) - except Exception as e: - print("Exception when calling DefaultApi->view_permalink_folder_f_fld_id_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fld_id** | **str**| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**302** | Redirect to the canonical or authentication URL. | * Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -**404** | The folder does not exist or is not readable. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| - -[[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/sdk/python/docs/DescribeIn.md b/sdk/python/docs/DescribeIn.md deleted file mode 100644 index 5b0da6c..0000000 --- a/sdk/python/docs/DescribeIn.md +++ /dev/null @@ -1,27 +0,0 @@ -# DescribeIn - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**dataset** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.describe_in import DescribeIn - -# TODO update the JSON string below -json = "{}" -# create an instance of DescribeIn from a JSON string -describe_in_instance = DescribeIn.from_json(json) -# print the JSON string representation of the object -print(DescribeIn.to_json()) - -# convert the object into a dict -describe_in_dict = describe_in_instance.to_dict() -# create an instance of DescribeIn from a dict -describe_in_from_dict = DescribeIn.from_dict(describe_in_dict) -``` -[[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/sdk/python/docs/DownloadUrlOut.md b/sdk/python/docs/DownloadUrlOut.md deleted file mode 100644 index 2d69e24..0000000 --- a/sdk/python/docs/DownloadUrlOut.md +++ /dev/null @@ -1,33 +0,0 @@ -# DownloadUrlOut - -A URL the caller can GET to fetch the artifact's bytes. `direct=True` ⇒ a short-lived signed GCS URL on `storage.googleapis.com` (client downloads straight from GCS; `expires_at` is set). `direct=False` ⇒ the proxy `/download` endpoint on the API host (no expiry) — returned for sub-threshold artifacts or when signing is unavailable. The URL is opaque: callers should not parse it. See large-download-design.md §5.1. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**content_type** | **str** | | -**direct** | **bool** | | -**download_url** | **str** | | -**expires_at** | **datetime** | | [optional] -**filename** | **str** | | -**size_bytes** | **int** | | - -## Example - -```python -from agentdrive_sdk.models.download_url_out import DownloadUrlOut - -# TODO update the JSON string below -json = "{}" -# create an instance of DownloadUrlOut from a JSON string -download_url_out_instance = DownloadUrlOut.from_json(json) -# print the JSON string representation of the object -print(DownloadUrlOut.to_json()) - -# convert the object into a dict -download_url_out_dict = download_url_out_instance.to_dict() -# create an instance of DownloadUrlOut from a dict -download_url_out_from_dict = DownloadUrlOut.from_dict(download_url_out_dict) -``` -[[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/sdk/python/docs/DriveApiKeyCreateIn.md b/sdk/python/docs/DriveApiKeyCreateIn.md deleted file mode 100644 index 80d70d5..0000000 --- a/sdk/python/docs/DriveApiKeyCreateIn.md +++ /dev/null @@ -1,28 +0,0 @@ -# DriveApiKeyCreateIn - -`POST /v0/drives/{id}/keys` body — a required human label (a name for the key, e.g. the agent/integration it's for). - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**label** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.drive_api_key_create_in import DriveApiKeyCreateIn - -# TODO update the JSON string below -json = "{}" -# create an instance of DriveApiKeyCreateIn from a JSON string -drive_api_key_create_in_instance = DriveApiKeyCreateIn.from_json(json) -# print the JSON string representation of the object -print(DriveApiKeyCreateIn.to_json()) - -# convert the object into a dict -drive_api_key_create_in_dict = drive_api_key_create_in_instance.to_dict() -# create an instance of DriveApiKeyCreateIn from a dict -drive_api_key_create_in_from_dict = DriveApiKeyCreateIn.from_dict(drive_api_key_create_in_dict) -``` -[[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/sdk/python/docs/DriveApiKeyCreateOut.md b/sdk/python/docs/DriveApiKeyCreateOut.md deleted file mode 100644 index ed6c72f..0000000 --- a/sdk/python/docs/DriveApiKeyCreateOut.md +++ /dev/null @@ -1,32 +0,0 @@ -# DriveApiKeyCreateOut - -`POST /v0/drives/{id}/keys` response — the new key's metadata PLUS the raw `ad_live_` value, returned **once**. Store `api_key` now; only its hash is persisted. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**api_key** | **str** | | -**created_at** | **datetime** | | -**id** | **str** | | -**label** | **str** | | [optional] -**prefix** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.drive_api_key_create_out import DriveApiKeyCreateOut - -# TODO update the JSON string below -json = "{}" -# create an instance of DriveApiKeyCreateOut from a JSON string -drive_api_key_create_out_instance = DriveApiKeyCreateOut.from_json(json) -# print the JSON string representation of the object -print(DriveApiKeyCreateOut.to_json()) - -# convert the object into a dict -drive_api_key_create_out_dict = drive_api_key_create_out_instance.to_dict() -# create an instance of DriveApiKeyCreateOut from a dict -drive_api_key_create_out_from_dict = DriveApiKeyCreateOut.from_dict(drive_api_key_create_out_dict) -``` -[[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/sdk/python/docs/DriveApiKeyListOut.md b/sdk/python/docs/DriveApiKeyListOut.md deleted file mode 100644 index b5cfb66..0000000 --- a/sdk/python/docs/DriveApiKeyListOut.md +++ /dev/null @@ -1,30 +0,0 @@ -# DriveApiKeyListOut - -`GET /v0/drives/{id}/keys` response — the drive's keys, oldest first (keyset order, design §3), including recently-revoked rows (filter on `revoked_at` for live only). `items` is the canonical list field (B-3: one envelope key everywhere); `keys` is a deprecated same-value alias kept for one release — the REST twin of the grep `matches` / compile `jobs` aliases. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**items** | [**List[DriveApiKeyOut]**](DriveApiKeyOut.md) | | -**keys** | [**List[DriveApiKeyOut]**](DriveApiKeyOut.md) | | -**next_cursor** | **str** | | [optional] - -## Example - -```python -from agentdrive_sdk.models.drive_api_key_list_out import DriveApiKeyListOut - -# TODO update the JSON string below -json = "{}" -# create an instance of DriveApiKeyListOut from a JSON string -drive_api_key_list_out_instance = DriveApiKeyListOut.from_json(json) -# print the JSON string representation of the object -print(DriveApiKeyListOut.to_json()) - -# convert the object into a dict -drive_api_key_list_out_dict = drive_api_key_list_out_instance.to_dict() -# create an instance of DriveApiKeyListOut from a dict -drive_api_key_list_out_from_dict = DriveApiKeyListOut.from_dict(drive_api_key_list_out_dict) -``` -[[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/sdk/python/docs/DriveApiKeyOut.md b/sdk/python/docs/DriveApiKeyOut.md deleted file mode 100644 index ceada37..0000000 --- a/sdk/python/docs/DriveApiKeyOut.md +++ /dev/null @@ -1,33 +0,0 @@ -# DriveApiKeyOut - -One per-drive `ad_live_` key — metadata only (never the raw key or hash). Item shape for `GET /v0/drives/{id}/keys`. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | **datetime** | | -**id** | **str** | | -**label** | **str** | | [optional] -**last_used_at** | **datetime** | | [optional] -**prefix** | **str** | | -**revoked_at** | **datetime** | | [optional] - -## Example - -```python -from agentdrive_sdk.models.drive_api_key_out import DriveApiKeyOut - -# TODO update the JSON string below -json = "{}" -# create an instance of DriveApiKeyOut from a JSON string -drive_api_key_out_instance = DriveApiKeyOut.from_json(json) -# print the JSON string representation of the object -print(DriveApiKeyOut.to_json()) - -# convert the object into a dict -drive_api_key_out_dict = drive_api_key_out_instance.to_dict() -# create an instance of DriveApiKeyOut from a dict -drive_api_key_out_from_dict = DriveApiKeyOut.from_dict(drive_api_key_out_dict) -``` -[[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/sdk/python/docs/DriveCreateIn.md b/sdk/python/docs/DriveCreateIn.md deleted file mode 100644 index 31a68de..0000000 --- a/sdk/python/docs/DriveCreateIn.md +++ /dev/null @@ -1,28 +0,0 @@ -# DriveCreateIn - -POST /v0/drives body. `name` is the user-facing drive label; the creator becomes the owner. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.drive_create_in import DriveCreateIn - -# TODO update the JSON string below -json = "{}" -# create an instance of DriveCreateIn from a JSON string -drive_create_in_instance = DriveCreateIn.from_json(json) -# print the JSON string representation of the object -print(DriveCreateIn.to_json()) - -# convert the object into a dict -drive_create_in_dict = drive_create_in_instance.to_dict() -# create an instance of DriveCreateIn from a dict -drive_create_in_from_dict = DriveCreateIn.from_dict(drive_create_in_dict) -``` -[[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/sdk/python/docs/DriveCreateOut.md b/sdk/python/docs/DriveCreateOut.md deleted file mode 100644 index adc0e6f..0000000 --- a/sdk/python/docs/DriveCreateOut.md +++ /dev/null @@ -1,35 +0,0 @@ -# DriveCreateOut - -The create response — the ONLY place (besides key-rotate) a raw `ad_live_` key is returned, reveal-once. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**api_key** | **str** | | -**created_at** | **datetime** | | -**id** | **str** | | -**name** | **str** | | -**organization_id** | **str** | | -**owner_email** | **str** | | [optional] -**owner_user_id** | **str** | | [optional] -**storage_bytes** | **int** | | - -## Example - -```python -from agentdrive_sdk.models.drive_create_out import DriveCreateOut - -# TODO update the JSON string below -json = "{}" -# create an instance of DriveCreateOut from a JSON string -drive_create_out_instance = DriveCreateOut.from_json(json) -# print the JSON string representation of the object -print(DriveCreateOut.to_json()) - -# convert the object into a dict -drive_create_out_dict = drive_create_out_instance.to_dict() -# create an instance of DriveCreateOut from a dict -drive_create_out_from_dict = DriveCreateOut.from_dict(drive_create_out_dict) -``` -[[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/sdk/python/docs/DriveDeleteOut.md b/sdk/python/docs/DriveDeleteOut.md deleted file mode 100644 index fa6e840..0000000 --- a/sdk/python/docs/DriveDeleteOut.md +++ /dev/null @@ -1,32 +0,0 @@ -# DriveDeleteOut - -DELETE /v0/drives/{drive_id} response — the drive soft-delete receipt. Reversible until the GC cron hard-deletes at `purge_at`; `restore_url` points at the drive restore endpoint (deletion-design.md §5.2). - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**deleted_at** | **datetime** | | -**id** | **str** | | -**ok** | **bool** | | [optional] [default to True] -**purge_at** | **datetime** | | -**restore_url** | **str** | | [optional] - -## Example - -```python -from agentdrive_sdk.models.drive_delete_out import DriveDeleteOut - -# TODO update the JSON string below -json = "{}" -# create an instance of DriveDeleteOut from a JSON string -drive_delete_out_instance = DriveDeleteOut.from_json(json) -# print the JSON string representation of the object -print(DriveDeleteOut.to_json()) - -# convert the object into a dict -drive_delete_out_dict = drive_delete_out_instance.to_dict() -# create an instance of DriveDeleteOut from a dict -drive_delete_out_from_dict = DriveDeleteOut.from_dict(drive_delete_out_dict) -``` -[[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/sdk/python/docs/DriveList.md b/sdk/python/docs/DriveList.md deleted file mode 100644 index 1538675..0000000 --- a/sdk/python/docs/DriveList.md +++ /dev/null @@ -1,28 +0,0 @@ -# DriveList - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**items** | [**List[DriveOut]**](DriveOut.md) | | -**next_cursor** | **str** | | [optional] - -## Example - -```python -from agentdrive_sdk.models.drive_list import DriveList - -# TODO update the JSON string below -json = "{}" -# create an instance of DriveList from a JSON string -drive_list_instance = DriveList.from_json(json) -# print the JSON string representation of the object -print(DriveList.to_json()) - -# convert the object into a dict -drive_list_dict = drive_list_instance.to_dict() -# create an instance of DriveList from a dict -drive_list_from_dict = DriveList.from_dict(drive_list_dict) -``` -[[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/sdk/python/docs/DriveOut.md b/sdk/python/docs/DriveOut.md deleted file mode 100644 index cdfe586..0000000 --- a/sdk/python/docs/DriveOut.md +++ /dev/null @@ -1,34 +0,0 @@ -# DriveOut - -One drive in a listing — metadata only (workspaces-design §4.2). Carries NO capability and NEVER a raw key. An admin's inventory and a member's owned list both serialize to this shape; `owner_email` is the only owner-identifying field surfaced. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | **datetime** | | -**id** | **str** | | -**name** | **str** | | -**organization_id** | **str** | | -**owner_email** | **str** | | [optional] -**owner_user_id** | **str** | | [optional] -**storage_bytes** | **int** | | - -## Example - -```python -from agentdrive_sdk.models.drive_out import DriveOut - -# TODO update the JSON string below -json = "{}" -# create an instance of DriveOut from a JSON string -drive_out_instance = DriveOut.from_json(json) -# print the JSON string representation of the object -print(DriveOut.to_json()) - -# convert the object into a dict -drive_out_dict = drive_out_instance.to_dict() -# create an instance of DriveOut from a dict -drive_out_from_dict = DriveOut.from_dict(drive_out_dict) -``` -[[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/sdk/python/docs/DriveReadOut.md b/sdk/python/docs/DriveReadOut.md deleted file mode 100644 index 3f23886..0000000 --- a/sdk/python/docs/DriveReadOut.md +++ /dev/null @@ -1,35 +0,0 @@ -# DriveReadOut - -Drive singleton shape returned by both data-plane read routes. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | **datetime** | | -**email** | **str** | | [optional] -**etag** | **str** | | -**id** | **str** | | -**metageneration** | **int** | | -**organization_id** | **str** | | -**storage_bytes** | **int** | | -**storage_limit** | **int** | | - -## Example - -```python -from agentdrive_sdk.models.drive_read_out import DriveReadOut - -# TODO update the JSON string below -json = "{}" -# create an instance of DriveReadOut from a JSON string -drive_read_out_instance = DriveReadOut.from_json(json) -# print the JSON string representation of the object -print(DriveReadOut.to_json()) - -# convert the object into a dict -drive_read_out_dict = drive_read_out_instance.to_dict() -# create an instance of DriveReadOut from a dict -drive_read_out_from_dict = DriveReadOut.from_dict(drive_read_out_dict) -``` -[[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/sdk/python/docs/DriveRenameIn.md b/sdk/python/docs/DriveRenameIn.md deleted file mode 100644 index 92e0321..0000000 --- a/sdk/python/docs/DriveRenameIn.md +++ /dev/null @@ -1,28 +0,0 @@ -# DriveRenameIn - -PATCH /v0/drives/{id} body — rename a drive the caller owns. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.drive_rename_in import DriveRenameIn - -# TODO update the JSON string below -json = "{}" -# create an instance of DriveRenameIn from a JSON string -drive_rename_in_instance = DriveRenameIn.from_json(json) -# print the JSON string representation of the object -print(DriveRenameIn.to_json()) - -# convert the object into a dict -drive_rename_in_dict = drive_rename_in_instance.to_dict() -# create an instance of DriveRenameIn from a dict -drive_rename_in_from_dict = DriveRenameIn.from_dict(drive_rename_in_dict) -``` -[[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/sdk/python/docs/DriveRestoreOut.md b/sdk/python/docs/DriveRestoreOut.md deleted file mode 100644 index 7e7e63a..0000000 --- a/sdk/python/docs/DriveRestoreOut.md +++ /dev/null @@ -1,29 +0,0 @@ -# DriveRestoreOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | | -**rebased_artifact_count** | **int** | | -**restored_at** | **datetime** | | - -## Example - -```python -from agentdrive_sdk.models.drive_restore_out import DriveRestoreOut - -# TODO update the JSON string below -json = "{}" -# create an instance of DriveRestoreOut from a JSON string -drive_restore_out_instance = DriveRestoreOut.from_json(json) -# print the JSON string representation of the object -print(DriveRestoreOut.to_json()) - -# convert the object into a dict -drive_restore_out_dict = drive_restore_out_instance.to_dict() -# create an instance of DriveRestoreOut from a dict -drive_restore_out_from_dict = DriveRestoreOut.from_dict(drive_restore_out_dict) -``` -[[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/sdk/python/docs/DriveUsageOut.md b/sdk/python/docs/DriveUsageOut.md deleted file mode 100644 index 220e2e2..0000000 --- a/sdk/python/docs/DriveUsageOut.md +++ /dev/null @@ -1,39 +0,0 @@ -# DriveUsageOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**account_footprint** | [**StorageFootprintOut**](StorageFootprintOut.md) | | -**egress_bytes** | [**UsageCounterOut**](UsageCounterOut.md) | | -**footprint** | [**StorageFootprintOut**](StorageFootprintOut.md) | | -**indexed_bytes** | [**UsageCounterOut**](UsageCounterOut.md) | | -**indexing_ops** | [**UsageCounterOut**](UsageCounterOut.md) | | -**ops_this_month** | [**OperationUsageOut**](OperationUsageOut.md) | | -**period** | [**UsagePeriodOut**](UsagePeriodOut.md) | | -**retrieval_queries** | [**UsageCounterOut**](UsageCounterOut.md) | | -**storage** | [**UsageCounterOut**](UsageCounterOut.md) | | -**storage_breakdown** | [**StorageBreakdownOut**](StorageBreakdownOut.md) | | [optional] -**tokens_this_month** | [**TokenUsageOut**](TokenUsageOut.md) | | -**version_retention** | [**VersionRetentionOut**](VersionRetentionOut.md) | | -**writes_this_hour** | [**HourlyUsageCounterOut**](HourlyUsageCounterOut.md) | | - -## Example - -```python -from agentdrive_sdk.models.drive_usage_out import DriveUsageOut - -# TODO update the JSON string below -json = "{}" -# create an instance of DriveUsageOut from a JSON string -drive_usage_out_instance = DriveUsageOut.from_json(json) -# print the JSON string representation of the object -print(DriveUsageOut.to_json()) - -# convert the object into a dict -drive_usage_out_dict = drive_usage_out_instance.to_dict() -# create an instance of DriveUsageOut from a dict -drive_usage_out_from_dict = DriveUsageOut.from_dict(drive_usage_out_dict) -``` -[[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/sdk/python/docs/DrivesApi.md b/sdk/python/docs/DrivesApi.md deleted file mode 100644 index 74d4c1b..0000000 --- a/sdk/python/docs/DrivesApi.md +++ /dev/null @@ -1,618 +0,0 @@ -# agentdrive_sdk.DrivesApi - -All URIs are relative to *https://api.agentdrive.run* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_drive_key_route_v0_drives_drive_id_keys_post**](DrivesApi.md#create_drive_key_route_v0_drives_drive_id_keys_post) | **POST** /v0/drives/{drive_id}/keys | Create a drive API key -[**create_drive_route_v0_drives_post**](DrivesApi.md#create_drive_route_v0_drives_post) | **POST** /v0/drives | Create a drive in your active space -[**list_drive_keys_route_v0_drives_drive_id_keys_get**](DrivesApi.md#list_drive_keys_route_v0_drives_drive_id_keys_get) | **GET** /v0/drives/{drive_id}/keys | List a drive's API keys -[**list_drives_route_v0_drives_get**](DrivesApi.md#list_drives_route_v0_drives_get) | **GET** /v0/drives | List the drives you can see -[**rename_drive_route_v0_drives_drive_id_patch**](DrivesApi.md#rename_drive_route_v0_drives_drive_id_patch) | **PATCH** /v0/drives/{drive_id} | Rename a drive you own -[**revoke_drive_key_route_v0_drives_drive_id_keys_key_id_revoke_post**](DrivesApi.md#revoke_drive_key_route_v0_drives_drive_id_keys_key_id_revoke_post) | **POST** /v0/drives/{drive_id}/keys/{key_id}/revoke | Revoke a drive API key -[**rotate_one_key_route_v0_drives_drive_id_keys_key_id_rotate_post**](DrivesApi.md#rotate_one_key_route_v0_drives_drive_id_keys_key_id_rotate_post) | **POST** /v0/drives/{drive_id}/keys/{key_id}/rotate | Rotate one API key - - -# **create_drive_key_route_v0_drives_drive_id_keys_post** -> DriveApiKeyCreateOut create_drive_key_route_v0_drives_drive_id_keys_post(drive_id, drive_api_key_create_in) - -Create a drive API key - -Mint a new `ad_live_` key for a drive you manage — a drive may hold several (one per agent/integration). A `label` (a name for the key) is **required**. **Manager only** (404 no-leak otherwise), `full`-scope user token. The raw key is returned **once** — store it now. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.drive_api_key_create_in import DriveApiKeyCreateIn -from agentdrive_sdk.models.drive_api_key_create_out import DriveApiKeyCreateOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DrivesApi(api_client) - drive_id = 'drive_id_example' # str | - drive_api_key_create_in = agentdrive_sdk.DriveApiKeyCreateIn() # DriveApiKeyCreateIn | - - try: - # Create a drive API key - api_response = api_instance.create_drive_key_route_v0_drives_drive_id_keys_post(drive_id, drive_api_key_create_in) - print("The response of DrivesApi->create_drive_key_route_v0_drives_drive_id_keys_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DrivesApi->create_drive_key_route_v0_drives_drive_id_keys_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **drive_id** | **str**| | - **drive_api_key_create_in** | [**DriveApiKeyCreateIn**](DriveApiKeyCreateIn.md)| | - -### Return type - -[**DriveApiKeyCreateOut**](DriveApiKeyCreateOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**400** | The key label or scope is invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The drive does not exist for this user. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **create_drive_route_v0_drives_post** -> DriveCreateOut create_drive_route_v0_drives_post(drive_create_in) - -Create a drive in your active space - -Create a named drive. Any **member** of the space may create one; the creator becomes its **owner**. Requires a `full`-scope user token. The response carries the drive's `ad_live_` API key **once** (`api_key`) — store it now, it is never returned again (mint more keys via `POST /v0/drives/{id}/keys`). - -The target workspace is the user's active organization (`users.default_org`); cross-workspace creation names no other workspace in v0. - -A space may hold up to its plan's drive limit (workspaces-v2 §4.6; seat-aware for shared drives). A caller at the limit is blocked with `403 DRIVE_LIMIT_REACHED`; the limit is tier-governed, not a hard cap. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.drive_create_in import DriveCreateIn -from agentdrive_sdk.models.drive_create_out import DriveCreateOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DrivesApi(api_client) - drive_create_in = agentdrive_sdk.DriveCreateIn() # DriveCreateIn | - - try: - # Create a drive in your active space - api_response = api_instance.create_drive_route_v0_drives_post(drive_create_in) - print("The response of DrivesApi->create_drive_route_v0_drives_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DrivesApi->create_drive_route_v0_drives_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **drive_create_in** | [**DriveCreateIn**](DriveCreateIn.md)| | - -### Return type - -[**DriveCreateOut**](DriveCreateOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Successful Response | * Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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_drive_keys_route_v0_drives_drive_id_keys_get** -> DriveApiKeyListOut list_drive_keys_route_v0_drives_drive_id_keys_get(drive_id, cursor=cursor, limit=limit) - -List a drive's API keys - -List the `ad_live_` keys for a drive you manage (oldest first, including recently-revoked rows — filter on `revoked_at` for live only). **Manager only** (404 no-leak otherwise). A `read`-scope user token may list (metadata reveals no secret), mirroring `GET /v0/drives`. Metadata only — the raw key is never returned after mint. - -**Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.drive_api_key_list_out import DriveApiKeyListOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DrivesApi(api_client) - drive_id = 'drive_id_example' # str | - cursor = 'cursor_example' # str | (optional) - limit = 56 # int | (optional) - - try: - # List a drive's API keys - api_response = api_instance.list_drive_keys_route_v0_drives_drive_id_keys_get(drive_id, cursor=cursor, limit=limit) - print("The response of DrivesApi->list_drive_keys_route_v0_drives_drive_id_keys_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DrivesApi->list_drive_keys_route_v0_drives_drive_id_keys_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **drive_id** | **str**| | - **cursor** | **str**| | [optional] - **limit** | **int**| | [optional] - -### Return type - -[**DriveApiKeyListOut**](DriveApiKeyListOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The drive does not exist for this user. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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_drives_route_v0_drives_get** -> DriveList list_drives_route_v0_drives_get(cursor=cursor, limit=limit) - -List the drives you can see - -Returns drive **metadata** (workspaces-design §4.2): an **admin** sees the whole active workspace's drive inventory (every owner); a **member** sees only the drives they own. Metadata only — owner, size, timestamps — never a raw API key, and never an authorization to read a drive's contents. A `read`-scope token may call this; mutations require `full`. - -**Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.drive_list import DriveList -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DrivesApi(api_client) - cursor = 'cursor_example' # str | (optional) - limit = 56 # int | (optional) - - try: - # List the drives you can see - api_response = api_instance.list_drives_route_v0_drives_get(cursor=cursor, limit=limit) - print("The response of DrivesApi->list_drives_route_v0_drives_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DrivesApi->list_drives_route_v0_drives_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **cursor** | **str**| | [optional] - **limit** | **int**| | [optional] - -### Return type - -[**DriveList**](DriveList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **rename_drive_route_v0_drives_drive_id_patch** -> DriveOut rename_drive_route_v0_drives_drive_id_patch(drive_id, drive_rename_in) - -Rename a drive you own - -Rename a drive. **Owner only** — a drive id that isn't yours returns 404 (no-leak). Requires a `full`-scope user token. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.drive_out import DriveOut -from agentdrive_sdk.models.drive_rename_in import DriveRenameIn -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DrivesApi(api_client) - drive_id = 'drive_id_example' # str | - drive_rename_in = agentdrive_sdk.DriveRenameIn() # DriveRenameIn | - - try: - # Rename a drive you own - api_response = api_instance.rename_drive_route_v0_drives_drive_id_patch(drive_id, drive_rename_in) - print("The response of DrivesApi->rename_drive_route_v0_drives_drive_id_patch:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DrivesApi->rename_drive_route_v0_drives_drive_id_patch: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **drive_id** | **str**| | - **drive_rename_in** | [**DriveRenameIn**](DriveRenameIn.md)| | - -### Return type - -[**DriveOut**](DriveOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**400** | The drive update is invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | No such drive exists for this principal. | * X-Request-Id - Request correlation identifier.
| -**409** | The drive update conflicts with current workspace state. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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_drive_key_route_v0_drives_drive_id_keys_key_id_revoke_post** -> revoke_drive_key_route_v0_drives_drive_id_keys_key_id_revoke_post(drive_id, key_id) - -Revoke a drive API key - -Revoke one `ad_live_` key of a drive you manage — anything using it loses access immediately. **Manager only** (404 no-leak otherwise), `full`-scope user token. Idempotent: revoking an unknown/already-revoked key returns 204 too (no existence oracle). - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DrivesApi(api_client) - drive_id = 'drive_id_example' # str | - key_id = 'key_id_example' # str | - - try: - # Revoke a drive API key - api_instance.revoke_drive_key_route_v0_drives_drive_id_keys_key_id_revoke_post(drive_id, key_id) - except Exception as e: - print("Exception when calling DrivesApi->revoke_drive_key_route_v0_drives_drive_id_keys_key_id_revoke_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **drive_id** | **str**| | - **key_id** | **str**| | - -### Return type - -void (empty response body) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The drive or key does not exist for this user. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **rotate_one_key_route_v0_drives_drive_id_keys_key_id_rotate_post** -> DriveApiKeyCreateOut rotate_one_key_route_v0_drives_drive_id_keys_key_id_rotate_post(drive_id, key_id) - -Rotate one API key - -Rotate a single `ad_live_` key: revoke `key_id` and mint a replacement that inherits its label. **Only that key** is affected — the drive's other keys keep working. **Manager only** (404 no-leak otherwise), `full`-scope user token. The new key is returned **once** — store it now. A `key_id` that isn't a live key of this drive is a 404. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.drive_api_key_create_out import DriveApiKeyCreateOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.DrivesApi(api_client) - drive_id = 'drive_id_example' # str | - key_id = 'key_id_example' # str | - - try: - # Rotate one API key - api_response = api_instance.rotate_one_key_route_v0_drives_drive_id_keys_key_id_rotate_post(drive_id, key_id) - print("The response of DrivesApi->rotate_one_key_route_v0_drives_drive_id_keys_key_id_rotate_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling DrivesApi->rotate_one_key_route_v0_drives_drive_id_keys_key_id_rotate_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **drive_id** | **str**| | - **key_id** | **str**| | - -### Return type - -[**DriveApiKeyCreateOut**](DriveApiKeyCreateOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The drive or key does not exist for this user. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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/sdk/python/docs/ErrorBody.md b/sdk/python/docs/ErrorBody.md deleted file mode 100644 index 3de235f..0000000 --- a/sdk/python/docs/ErrorBody.md +++ /dev/null @@ -1,29 +0,0 @@ -# ErrorBody - -Machine-readable API error. Error-code-specific context (for example `limit`, `current_etag`, or `retry_after_s`) is intentionally additive. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **str** | | -**message** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.error_body import ErrorBody - -# TODO update the JSON string below -json = "{}" -# create an instance of ErrorBody from a JSON string -error_body_instance = ErrorBody.from_json(json) -# print the JSON string representation of the object -print(ErrorBody.to_json()) - -# convert the object into a dict -error_body_dict = error_body_instance.to_dict() -# create an instance of ErrorBody from a dict -error_body_from_dict = ErrorBody.from_dict(error_body_dict) -``` -[[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/sdk/python/docs/ErrorDetail.md b/sdk/python/docs/ErrorDetail.md deleted file mode 100644 index ee26bb9..0000000 --- a/sdk/python/docs/ErrorDetail.md +++ /dev/null @@ -1,27 +0,0 @@ -# ErrorDetail - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | [**ErrorBody**](ErrorBody.md) | | - -## Example - -```python -from agentdrive_sdk.models.error_detail import ErrorDetail - -# TODO update the JSON string below -json = "{}" -# create an instance of ErrorDetail from a JSON string -error_detail_instance = ErrorDetail.from_json(json) -# print the JSON string representation of the object -print(ErrorDetail.to_json()) - -# convert the object into a dict -error_detail_dict = error_detail_instance.to_dict() -# create an instance of ErrorDetail from a dict -error_detail_from_dict = ErrorDetail.from_dict(error_detail_dict) -``` -[[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/sdk/python/docs/ErrorResponse.md b/sdk/python/docs/ErrorResponse.md deleted file mode 100644 index 58d2563..0000000 --- a/sdk/python/docs/ErrorResponse.md +++ /dev/null @@ -1,28 +0,0 @@ -# ErrorResponse - -Canonical non-validation error envelope emitted by AgentDrive. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**detail** | [**ErrorDetail**](ErrorDetail.md) | | - -## Example - -```python -from agentdrive_sdk.models.error_response import ErrorResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of ErrorResponse from a JSON string -error_response_instance = ErrorResponse.from_json(json) -# print the JSON string representation of the object -print(ErrorResponse.to_json()) - -# convert the object into a dict -error_response_dict = error_response_instance.to_dict() -# create an instance of ErrorResponse from a dict -error_response_from_dict = ErrorResponse.from_dict(error_response_dict) -``` -[[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/sdk/python/docs/EventOut.md b/sdk/python/docs/EventOut.md deleted file mode 100644 index 5704fcc..0000000 --- a/sdk/python/docs/EventOut.md +++ /dev/null @@ -1,33 +0,0 @@ -# EventOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**action** | **str** | | -**actor_name** | **str** | | [optional] -**art_id** | **str** | | [optional] -**created_at** | **datetime** | | -**drive_id** | **str** | | -**id** | **str** | | -**metadata** | **Dict[str, object]** | | [optional] - -## Example - -```python -from agentdrive_sdk.models.event_out import EventOut - -# TODO update the JSON string below -json = "{}" -# create an instance of EventOut from a JSON string -event_out_instance = EventOut.from_json(json) -# print the JSON string representation of the object -print(EventOut.to_json()) - -# convert the object into a dict -event_out_dict = event_out_instance.to_dict() -# create an instance of EventOut from a dict -event_out_from_dict = EventOut.from_dict(event_out_dict) -``` -[[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/sdk/python/docs/EventPage.md b/sdk/python/docs/EventPage.md deleted file mode 100644 index 6aee165..0000000 --- a/sdk/python/docs/EventPage.md +++ /dev/null @@ -1,28 +0,0 @@ -# EventPage - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**items** | [**List[EventOut]**](EventOut.md) | | -**next_cursor** | **str** | | [optional] - -## Example - -```python -from agentdrive_sdk.models.event_page import EventPage - -# TODO update the JSON string below -json = "{}" -# create an instance of EventPage from a JSON string -event_page_instance = EventPage.from_json(json) -# print the JSON string representation of the object -print(EventPage.to_json()) - -# convert the object into a dict -event_page_dict = event_page_instance.to_dict() -# create an instance of EventPage from a dict -event_page_from_dict = EventPage.from_dict(event_page_dict) -``` -[[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/sdk/python/docs/ExtensionExchangeRequest.md b/sdk/python/docs/ExtensionExchangeRequest.md deleted file mode 100644 index f1fd1dc..0000000 --- a/sdk/python/docs/ExtensionExchangeRequest.md +++ /dev/null @@ -1,29 +0,0 @@ -# ExtensionExchangeRequest - -Single-use ticket → JWT pair. Called by `auth-complete.html` inside the SnipIt extension. No `Authorization` header — the ticket itself is the credential. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ext_id** | **str** | The extension's ID (Chrome Web Store ID or unpacked dev ID). | -**ticket** | **str** | The opaque ticket from the /auth/callback handoff. | - -## Example - -```python -from agentdrive_sdk.models.extension_exchange_request import ExtensionExchangeRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of ExtensionExchangeRequest from a JSON string -extension_exchange_request_instance = ExtensionExchangeRequest.from_json(json) -# print the JSON string representation of the object -print(ExtensionExchangeRequest.to_json()) - -# convert the object into a dict -extension_exchange_request_dict = extension_exchange_request_instance.to_dict() -# create an instance of ExtensionExchangeRequest from a dict -extension_exchange_request_from_dict = ExtensionExchangeRequest.from_dict(extension_exchange_request_dict) -``` -[[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/sdk/python/docs/ExtensionExchangeResponse.md b/sdk/python/docs/ExtensionExchangeResponse.md deleted file mode 100644 index 6658ae3..0000000 --- a/sdk/python/docs/ExtensionExchangeResponse.md +++ /dev/null @@ -1,32 +0,0 @@ -# ExtensionExchangeResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**access_token** | **str** | 15-minute access_token (scope=extension). | -**drive_id** | **str** | The drive these credentials are scoped to. | -**expires_in** | **int** | Seconds until access_token expiry. | -**identity_assertion** | **str** | 90-day identity_assertion. Refresh via POST /oauth2/token. | -**scope** | **str** | | [optional] [default to 'extension'] -**token_type** | **str** | | [optional] [default to 'Bearer'] - -## Example - -```python -from agentdrive_sdk.models.extension_exchange_response import ExtensionExchangeResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of ExtensionExchangeResponse from a JSON string -extension_exchange_response_instance = ExtensionExchangeResponse.from_json(json) -# print the JSON string representation of the object -print(ExtensionExchangeResponse.to_json()) - -# convert the object into a dict -extension_exchange_response_dict = extension_exchange_response_instance.to_dict() -# create an instance of ExtensionExchangeResponse from a dict -extension_exchange_response_from_dict = ExtensionExchangeResponse.from_dict(extension_exchange_response_dict) -``` -[[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/sdk/python/docs/FeedbackCreateOut.md b/sdk/python/docs/FeedbackCreateOut.md deleted file mode 100644 index 6adcff0..0000000 --- a/sdk/python/docs/FeedbackCreateOut.md +++ /dev/null @@ -1,30 +0,0 @@ -# FeedbackCreateOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**contact** | **bool** | | -**id** | **str** | | -**note** | **str** | | [optional] -**status** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.feedback_create_out import FeedbackCreateOut - -# TODO update the JSON string below -json = "{}" -# create an instance of FeedbackCreateOut from a JSON string -feedback_create_out_instance = FeedbackCreateOut.from_json(json) -# print the JSON string representation of the object -print(FeedbackCreateOut.to_json()) - -# convert the object into a dict -feedback_create_out_dict = feedback_create_out_instance.to_dict() -# create an instance of FeedbackCreateOut from a dict -feedback_create_out_from_dict = FeedbackCreateOut.from_dict(feedback_create_out_dict) -``` -[[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/sdk/python/docs/FeedbackStatusOut.md b/sdk/python/docs/FeedbackStatusOut.md deleted file mode 100644 index 3cba99f..0000000 --- a/sdk/python/docs/FeedbackStatusOut.md +++ /dev/null @@ -1,35 +0,0 @@ -# FeedbackStatusOut - -GET /v0/feedback/{fbk_id} response — lifecycle status of feedback THIS drive filed. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**contact** | **bool** | | -**created_at** | **datetime** | | -**duplicate_of** | **str** | | [optional] -**id** | **str** | | -**kind** | **str** | | -**status** | **str** | | -**status_changed_at** | **datetime** | | -**title** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.feedback_status_out import FeedbackStatusOut - -# TODO update the JSON string below -json = "{}" -# create an instance of FeedbackStatusOut from a JSON string -feedback_status_out_instance = FeedbackStatusOut.from_json(json) -# print the JSON string representation of the object -print(FeedbackStatusOut.to_json()) - -# convert the object into a dict -feedback_status_out_dict = feedback_status_out_instance.to_dict() -# create an instance of FeedbackStatusOut from a dict -feedback_status_out_from_dict = FeedbackStatusOut.from_dict(feedback_status_out_dict) -``` -[[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/sdk/python/docs/FindHitOut.md b/sdk/python/docs/FindHitOut.md deleted file mode 100644 index fdec257..0000000 --- a/sdk/python/docs/FindHitOut.md +++ /dev/null @@ -1,49 +0,0 @@ -# FindHitOut - -One passage-level hit from `/v0/find` (hybrid chunk RAG over `embed_chunks`). The unit is a passage, not a file — consecutive `ord` values from the same `art_id` are normal because chunks overlap by ~400 tokens. Span fields are modality-aware: only the pair matching `modality` is populated, the others stay None. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**art_id** | **str** | | -**char_end** | **int** | | [optional] -**char_start** | **int** | | [optional] -**content_type** | **str** | | -**drive_id** | **str** | | -**file_type** | **str** | | -**labels** | **List[str]** | | [optional] -**modality** | **str** | | -**ord** | **int** | | -**page_end** | **int** | | [optional] -**page_start** | **int** | | [optional] -**path** | **str** | | -**rank_lexical** | **int** | | [optional] -**rank_semantic** | **int** | | [optional] -**score** | **float** | | -**snippet** | **str** | | -**text** | **str** | | -**time_end_ms** | **int** | | [optional] -**time_start_ms** | **int** | | [optional] -**updated_at** | **datetime** | | -**url** | **str** | | -**version_number** | **int** | | - -## Example - -```python -from agentdrive_sdk.models.find_hit_out import FindHitOut - -# TODO update the JSON string below -json = "{}" -# create an instance of FindHitOut from a JSON string -find_hit_out_instance = FindHitOut.from_json(json) -# print the JSON string representation of the object -print(FindHitOut.to_json()) - -# convert the object into a dict -find_hit_out_dict = find_hit_out_instance.to_dict() -# create an instance of FindHitOut from a dict -find_hit_out_from_dict = FindHitOut.from_dict(find_hit_out_dict) -``` -[[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/sdk/python/docs/FindPage.md b/sdk/python/docs/FindPage.md deleted file mode 100644 index 98f3ed5..0000000 --- a/sdk/python/docs/FindPage.md +++ /dev/null @@ -1,28 +0,0 @@ -# FindPage - -`/v0/find` response — single-shot top-N, deliberately unpaginated (same contract + rationale as `SearchPage`). - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**items** | [**List[FindHitOut]**](FindHitOut.md) | | - -## Example - -```python -from agentdrive_sdk.models.find_page import FindPage - -# TODO update the JSON string below -json = "{}" -# create an instance of FindPage from a JSON string -find_page_instance = FindPage.from_json(json) -# print the JSON string representation of the object -print(FindPage.to_json()) - -# convert the object into a dict -find_page_dict = find_page_instance.to_dict() -# create an instance of FindPage from a dict -find_page_from_dict = FindPage.from_dict(find_page_dict) -``` -[[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/sdk/python/docs/FolderCopyIn.md b/sdk/python/docs/FolderCopyIn.md deleted file mode 100644 index 621e147..0000000 --- a/sdk/python/docs/FolderCopyIn.md +++ /dev/null @@ -1,29 +0,0 @@ -# FolderCopyIn - -POST /v0/folders/{fld_id}/copy body — duplicate the subtree to a new path. `path` is the target folder path (canonical, trailing slash). Its own schema (vs. reusing `FolderMoveIn`) keeps the copy surface self-documenting in the OpenAPI spec. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**from_metageneration** | **int** | | [optional] -**path** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.folder_copy_in import FolderCopyIn - -# TODO update the JSON string below -json = "{}" -# create an instance of FolderCopyIn from a JSON string -folder_copy_in_instance = FolderCopyIn.from_json(json) -# print the JSON string representation of the object -print(FolderCopyIn.to_json()) - -# convert the object into a dict -folder_copy_in_dict = folder_copy_in_instance.to_dict() -# create an instance of FolderCopyIn from a dict -folder_copy_in_from_dict = FolderCopyIn.from_dict(folder_copy_in_dict) -``` -[[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/sdk/python/docs/FolderCopyOut.md b/sdk/python/docs/FolderCopyOut.md deleted file mode 100644 index a593067..0000000 --- a/sdk/python/docs/FolderCopyOut.md +++ /dev/null @@ -1,40 +0,0 @@ -# FolderCopyOut - -POST /v0/folders/{fld_id}/copy response — the newly-created folder resource (same shape as `FolderOut`) plus copy-provenance fields: `from_fld_id` is the source folder and `n_artifacts_copied` is the number of descendant artifacts cloned into the new subtree. Mirrors the MCP `copy` folder route's conceptual shape. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | **datetime** | | -**deleted_at** | **datetime** | | [optional] -**description** | **str** | | [optional] -**drive_id** | **str** | | -**etag** | **str** | | -**from_fld_id** | **str** | | -**id** | **str** | | -**inherit_grants** | **bool** | | [optional] [default to True] -**metageneration** | **int** | | [optional] [default to 1] -**n_artifacts_copied** | **int** | | -**path** | **str** | | -**purge_at** | **datetime** | | [optional] -**updated_at** | **datetime** | | - -## Example - -```python -from agentdrive_sdk.models.folder_copy_out import FolderCopyOut - -# TODO update the JSON string below -json = "{}" -# create an instance of FolderCopyOut from a JSON string -folder_copy_out_instance = FolderCopyOut.from_json(json) -# print the JSON string representation of the object -print(FolderCopyOut.to_json()) - -# convert the object into a dict -folder_copy_out_dict = folder_copy_out_instance.to_dict() -# create an instance of FolderCopyOut from a dict -folder_copy_out_from_dict = FolderCopyOut.from_dict(folder_copy_out_dict) -``` -[[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/sdk/python/docs/FolderCreateIn.md b/sdk/python/docs/FolderCreateIn.md deleted file mode 100644 index 3da195a..0000000 --- a/sdk/python/docs/FolderCreateIn.md +++ /dev/null @@ -1,28 +0,0 @@ -# FolderCreateIn - -PUT /v0/folders/{path} body for the optional metadata params. Empty body is fine — `mkdir` with no description just creates the folder row. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **str** | | [optional] - -## Example - -```python -from agentdrive_sdk.models.folder_create_in import FolderCreateIn - -# TODO update the JSON string below -json = "{}" -# create an instance of FolderCreateIn from a JSON string -folder_create_in_instance = FolderCreateIn.from_json(json) -# print the JSON string representation of the object -print(FolderCreateIn.to_json()) - -# convert the object into a dict -folder_create_in_dict = folder_create_in_instance.to_dict() -# create an instance of FolderCreateIn from a dict -folder_create_in_from_dict = FolderCreateIn.from_dict(folder_create_in_dict) -``` -[[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/sdk/python/docs/FolderDeleteOut.md b/sdk/python/docs/FolderDeleteOut.md deleted file mode 100644 index dacd4e3..0000000 --- a/sdk/python/docs/FolderDeleteOut.md +++ /dev/null @@ -1,35 +0,0 @@ -# FolderDeleteOut - -DELETE response — surfaces cascade counts so the caller can confirm scope of an rmdir before the client retries with `?recursive=true`. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**deleted_at** | **datetime** | | -**id** | **str** | | -**n_artifacts_deleted** | **int** | | -**n_subfolders_deleted** | **int** | | -**ok** | **bool** | | [optional] [default to True] -**path** | **str** | | -**purge_at** | **datetime** | | -**retention_days** | **int** | | - -## Example - -```python -from agentdrive_sdk.models.folder_delete_out import FolderDeleteOut - -# TODO update the JSON string below -json = "{}" -# create an instance of FolderDeleteOut from a JSON string -folder_delete_out_instance = FolderDeleteOut.from_json(json) -# print the JSON string representation of the object -print(FolderDeleteOut.to_json()) - -# convert the object into a dict -folder_delete_out_dict = folder_delete_out_instance.to_dict() -# create an instance of FolderDeleteOut from a dict -folder_delete_out_from_dict = FolderDeleteOut.from_dict(folder_delete_out_dict) -``` -[[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/sdk/python/docs/FolderMoveIn.md b/sdk/python/docs/FolderMoveIn.md deleted file mode 100644 index b8c285c..0000000 --- a/sdk/python/docs/FolderMoveIn.md +++ /dev/null @@ -1,28 +0,0 @@ -# FolderMoveIn - -POST /v0/folders/{fld_id}/move body — rename / move. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**path** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.folder_move_in import FolderMoveIn - -# TODO update the JSON string below -json = "{}" -# create an instance of FolderMoveIn from a JSON string -folder_move_in_instance = FolderMoveIn.from_json(json) -# print the JSON string representation of the object -print(FolderMoveIn.to_json()) - -# convert the object into a dict -folder_move_in_dict = folder_move_in_instance.to_dict() -# create an instance of FolderMoveIn from a dict -folder_move_in_from_dict = FolderMoveIn.from_dict(folder_move_in_dict) -``` -[[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/sdk/python/docs/FolderOut.md b/sdk/python/docs/FolderOut.md deleted file mode 100644 index 4c94c30..0000000 --- a/sdk/python/docs/FolderOut.md +++ /dev/null @@ -1,38 +0,0 @@ -# FolderOut - -Folder resource (folders+permalinks design §13). `path` is the canonical leading+trailing-slash form. Access is expressed through grants (permission-sharing-design §4.4), not a folder-level flag. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | **datetime** | | -**deleted_at** | **datetime** | | [optional] -**description** | **str** | | [optional] -**drive_id** | **str** | | -**etag** | **str** | | -**id** | **str** | | -**inherit_grants** | **bool** | | [optional] [default to True] -**metageneration** | **int** | | [optional] [default to 1] -**path** | **str** | | -**purge_at** | **datetime** | | [optional] -**updated_at** | **datetime** | | - -## Example - -```python -from agentdrive_sdk.models.folder_out import FolderOut - -# TODO update the JSON string below -json = "{}" -# create an instance of FolderOut from a JSON string -folder_out_instance = FolderOut.from_json(json) -# print the JSON string representation of the object -print(FolderOut.to_json()) - -# convert the object into a dict -folder_out_dict = folder_out_instance.to_dict() -# create an instance of FolderOut from a dict -folder_out_from_dict = FolderOut.from_dict(folder_out_dict) -``` -[[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/sdk/python/docs/FolderPatchIn.md b/sdk/python/docs/FolderPatchIn.md deleted file mode 100644 index 79171e6..0000000 --- a/sdk/python/docs/FolderPatchIn.md +++ /dev/null @@ -1,29 +0,0 @@ -# FolderPatchIn - -PATCH /v0/folders/{fld_id} body — partial update. Field absence = unchanged. `description`: explicit null = clear. `inherit_grants`: non-nullable — null/absent = unchanged (it cannot be cleared, only flipped true/false). - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**description** | **str** | | [optional] -**inherit_grants** | **bool** | | [optional] - -## Example - -```python -from agentdrive_sdk.models.folder_patch_in import FolderPatchIn - -# TODO update the JSON string below -json = "{}" -# create an instance of FolderPatchIn from a JSON string -folder_patch_in_instance = FolderPatchIn.from_json(json) -# print the JSON string representation of the object -print(FolderPatchIn.to_json()) - -# convert the object into a dict -folder_patch_in_dict = folder_patch_in_instance.to_dict() -# create an instance of FolderPatchIn from a dict -folder_patch_in_from_dict = FolderPatchIn.from_dict(folder_patch_in_dict) -``` -[[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/sdk/python/docs/FolderRestoreOut.md b/sdk/python/docs/FolderRestoreOut.md deleted file mode 100644 index fe79c30..0000000 --- a/sdk/python/docs/FolderRestoreOut.md +++ /dev/null @@ -1,40 +0,0 @@ -# FolderRestoreOut - -POST /v0/folders/{fld_id}/restore response — the restored (live) folder resource (same shape as `FolderOut`) plus the cascade counts from `core.folders.restore_cascade` (dashboard-file-operations-design §4.5), so the caller can confirm the scope of what came back with the root. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | **datetime** | | -**deleted_at** | **datetime** | | [optional] -**description** | **str** | | [optional] -**drive_id** | **str** | | -**etag** | **str** | | -**id** | **str** | | -**inherit_grants** | **bool** | | [optional] [default to True] -**metageneration** | **int** | | [optional] [default to 1] -**n_artifacts_restored** | **int** | | -**n_subfolders_restored** | **int** | | -**path** | **str** | | -**purge_at** | **datetime** | | [optional] -**updated_at** | **datetime** | | - -## Example - -```python -from agentdrive_sdk.models.folder_restore_out import FolderRestoreOut - -# TODO update the JSON string below -json = "{}" -# create an instance of FolderRestoreOut from a JSON string -folder_restore_out_instance = FolderRestoreOut.from_json(json) -# print the JSON string representation of the object -print(FolderRestoreOut.to_json()) - -# convert the object into a dict -folder_restore_out_dict = folder_restore_out_instance.to_dict() -# create an instance of FolderRestoreOut from a dict -folder_restore_out_from_dict = FolderRestoreOut.from_dict(folder_restore_out_dict) -``` -[[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/sdk/python/docs/GrantCreateIn.md b/sdk/python/docs/GrantCreateIn.md deleted file mode 100644 index 40d322c..0000000 --- a/sdk/python/docs/GrantCreateIn.md +++ /dev/null @@ -1,31 +0,0 @@ -# GrantCreateIn - -POST /v0/grants body. `resource` is an `art_*`/`fld_*` id or a path (resolved within the caller's drive). `expires_in` is seconds from now (omit for a permanent grant). - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**expires_in** | **int** | | [optional] -**principal** | [**GrantPrincipalIn**](GrantPrincipalIn.md) | | -**resource** | **str** | | -**role** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.grant_create_in import GrantCreateIn - -# TODO update the JSON string below -json = "{}" -# create an instance of GrantCreateIn from a JSON string -grant_create_in_instance = GrantCreateIn.from_json(json) -# print the JSON string representation of the object -print(GrantCreateIn.to_json()) - -# convert the object into a dict -grant_create_in_dict = grant_create_in_instance.to_dict() -# create an instance of GrantCreateIn from a dict -grant_create_in_from_dict = GrantCreateIn.from_dict(grant_create_in_dict) -``` -[[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/sdk/python/docs/GrantList.md b/sdk/python/docs/GrantList.md deleted file mode 100644 index 84ee990..0000000 --- a/sdk/python/docs/GrantList.md +++ /dev/null @@ -1,28 +0,0 @@ -# GrantList - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**items** | [**List[GrantOut]**](GrantOut.md) | | -**next_cursor** | **str** | | [optional] - -## Example - -```python -from agentdrive_sdk.models.grant_list import GrantList - -# TODO update the JSON string below -json = "{}" -# create an instance of GrantList from a JSON string -grant_list_instance = GrantList.from_json(json) -# print the JSON string representation of the object -print(GrantList.to_json()) - -# convert the object into a dict -grant_list_dict = grant_list_instance.to_dict() -# create an instance of GrantList from a dict -grant_list_from_dict = GrantList.from_dict(grant_list_dict) -``` -[[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/sdk/python/docs/GrantOut.md b/sdk/python/docs/GrantOut.md deleted file mode 100644 index 70bcb06..0000000 --- a/sdk/python/docs/GrantOut.md +++ /dev/null @@ -1,40 +0,0 @@ -# GrantOut - -A live grant. Audit fields (`granted_by_*`, `on_behalf_of`) are surfaced so a manager can see who shared what. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**artifacts_affected** | **int** | | [optional] -**created_at** | **datetime** | | -**expires_at** | **datetime** | | [optional] -**granted_by_id** | **str** | | -**granted_by_type** | **str** | | -**id** | **str** | | -**on_behalf_of** | **str** | | [optional] -**principal_email** | **str** | | [optional] -**principal_id** | **str** | | [optional] -**principal_type** | **str** | | -**resource_id** | **str** | | -**resource_type** | **str** | | -**role** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.grant_out import GrantOut - -# TODO update the JSON string below -json = "{}" -# create an instance of GrantOut from a JSON string -grant_out_instance = GrantOut.from_json(json) -# print the JSON string representation of the object -print(GrantOut.to_json()) - -# convert the object into a dict -grant_out_dict = grant_out_instance.to_dict() -# create an instance of GrantOut from a dict -grant_out_from_dict = GrantOut.from_dict(grant_out_dict) -``` -[[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/sdk/python/docs/GrantPatchIn.md b/sdk/python/docs/GrantPatchIn.md deleted file mode 100644 index 7eb128c..0000000 --- a/sdk/python/docs/GrantPatchIn.md +++ /dev/null @@ -1,29 +0,0 @@ -# GrantPatchIn - -PATCH /v0/grants/{grn_id} body. Field absence = unchanged; explicit `expires_in: null` clears the expiry (makes the grant permanent). - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**expires_in** | **int** | | [optional] -**role** | **str** | | [optional] - -## Example - -```python -from agentdrive_sdk.models.grant_patch_in import GrantPatchIn - -# TODO update the JSON string below -json = "{}" -# create an instance of GrantPatchIn from a JSON string -grant_patch_in_instance = GrantPatchIn.from_json(json) -# print the JSON string representation of the object -print(GrantPatchIn.to_json()) - -# convert the object into a dict -grant_patch_in_dict = grant_patch_in_instance.to_dict() -# create an instance of GrantPatchIn from a dict -grant_patch_in_from_dict = GrantPatchIn.from_dict(grant_patch_in_dict) -``` -[[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/sdk/python/docs/GrantPrincipalIn.md b/sdk/python/docs/GrantPrincipalIn.md deleted file mode 100644 index 758a1b9..0000000 --- a/sdk/python/docs/GrantPrincipalIn.md +++ /dev/null @@ -1,30 +0,0 @@ -# GrantPrincipalIn - -Who a grant is for. `anyone` carries no id/email; `org`/`agent` require `id`; `user` requires exactly one of `id` / `email` (an email with no account becomes a pending-email invite resolved on sign-in). - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | [optional] -**id** | **str** | | [optional] -**type** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.grant_principal_in import GrantPrincipalIn - -# TODO update the JSON string below -json = "{}" -# create an instance of GrantPrincipalIn from a JSON string -grant_principal_in_instance = GrantPrincipalIn.from_json(json) -# print the JSON string representation of the object -print(GrantPrincipalIn.to_json()) - -# convert the object into a dict -grant_principal_in_dict = grant_principal_in_instance.to_dict() -# create an instance of GrantPrincipalIn from a dict -grant_principal_in_from_dict = GrantPrincipalIn.from_dict(grant_principal_in_dict) -``` -[[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/sdk/python/docs/HealthDegradedDetail.md b/sdk/python/docs/HealthDegradedDetail.md deleted file mode 100644 index 378b1fd..0000000 --- a/sdk/python/docs/HealthDegradedDetail.md +++ /dev/null @@ -1,28 +0,0 @@ -# HealthDegradedDetail - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **str** | | -**status** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.health_degraded_detail import HealthDegradedDetail - -# TODO update the JSON string below -json = "{}" -# create an instance of HealthDegradedDetail from a JSON string -health_degraded_detail_instance = HealthDegradedDetail.from_json(json) -# print the JSON string representation of the object -print(HealthDegradedDetail.to_json()) - -# convert the object into a dict -health_degraded_detail_dict = health_degraded_detail_instance.to_dict() -# create an instance of HealthDegradedDetail from a dict -health_degraded_detail_from_dict = HealthDegradedDetail.from_dict(health_degraded_detail_dict) -``` -[[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/sdk/python/docs/HealthDegradedResponse.md b/sdk/python/docs/HealthDegradedResponse.md deleted file mode 100644 index ef6c358..0000000 --- a/sdk/python/docs/HealthDegradedResponse.md +++ /dev/null @@ -1,28 +0,0 @@ -# HealthDegradedResponse - -Legacy health-probe failure shape. Health predates the `/v0` error envelope and is consumed by load balancers. PR 1 documents the wire shape without changing it; convergence on the canonical API envelope is a separately reviewed compatibility decision. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**detail** | [**HealthDegradedDetail**](HealthDegradedDetail.md) | | - -## Example - -```python -from agentdrive_sdk.models.health_degraded_response import HealthDegradedResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of HealthDegradedResponse from a JSON string -health_degraded_response_instance = HealthDegradedResponse.from_json(json) -# print the JSON string representation of the object -print(HealthDegradedResponse.to_json()) - -# convert the object into a dict -health_degraded_response_dict = health_degraded_response_instance.to_dict() -# create an instance of HealthDegradedResponse from a dict -health_degraded_response_from_dict = HealthDegradedResponse.from_dict(health_degraded_response_dict) -``` -[[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/sdk/python/docs/HealthOut.md b/sdk/python/docs/HealthOut.md deleted file mode 100644 index 67f07a9..0000000 --- a/sdk/python/docs/HealthOut.md +++ /dev/null @@ -1,27 +0,0 @@ -# HealthOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.health_out import HealthOut - -# TODO update the JSON string below -json = "{}" -# create an instance of HealthOut from a JSON string -health_out_instance = HealthOut.from_json(json) -# print the JSON string representation of the object -print(HealthOut.to_json()) - -# convert the object into a dict -health_out_dict = health_out_instance.to_dict() -# create an instance of HealthOut from a dict -health_out_from_dict = HealthOut.from_dict(health_out_dict) -``` -[[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/sdk/python/docs/HourlyUsageCounterOut.md b/sdk/python/docs/HourlyUsageCounterOut.md deleted file mode 100644 index 4123e0b..0000000 --- a/sdk/python/docs/HourlyUsageCounterOut.md +++ /dev/null @@ -1,29 +0,0 @@ -# HourlyUsageCounterOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**limit** | **int** | | -**reset_at** | **datetime** | | -**used** | **int** | | - -## Example - -```python -from agentdrive_sdk.models.hourly_usage_counter_out import HourlyUsageCounterOut - -# TODO update the JSON string below -json = "{}" -# create an instance of HourlyUsageCounterOut from a JSON string -hourly_usage_counter_out_instance = HourlyUsageCounterOut.from_json(json) -# print the JSON string representation of the object -print(HourlyUsageCounterOut.to_json()) - -# convert the object into a dict -hourly_usage_counter_out_dict = hourly_usage_counter_out_instance.to_dict() -# create an instance of HourlyUsageCounterOut from a dict -hourly_usage_counter_out_from_dict = HourlyUsageCounterOut.from_dict(hourly_usage_counter_out_dict) -``` -[[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/sdk/python/docs/IdentityAssertionMetadataOut.md b/sdk/python/docs/IdentityAssertionMetadataOut.md deleted file mode 100644 index 3796373..0000000 --- a/sdk/python/docs/IdentityAssertionMetadataOut.md +++ /dev/null @@ -1,29 +0,0 @@ -# IdentityAssertionMetadataOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**alg** | **str** | | -**iss** | **str** | | -**version** | **int** | | - -## Example - -```python -from agentdrive_sdk.models.identity_assertion_metadata_out import IdentityAssertionMetadataOut - -# TODO update the JSON string below -json = "{}" -# create an instance of IdentityAssertionMetadataOut from a JSON string -identity_assertion_metadata_out_instance = IdentityAssertionMetadataOut.from_json(json) -# print the JSON string representation of the object -print(IdentityAssertionMetadataOut.to_json()) - -# convert the object into a dict -identity_assertion_metadata_out_dict = identity_assertion_metadata_out_instance.to_dict() -# create an instance of IdentityAssertionMetadataOut from a dict -identity_assertion_metadata_out_from_dict = IdentityAssertionMetadataOut.from_dict(identity_assertion_metadata_out_dict) -``` -[[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/sdk/python/docs/InvitationList.md b/sdk/python/docs/InvitationList.md deleted file mode 100644 index ae09ae0..0000000 --- a/sdk/python/docs/InvitationList.md +++ /dev/null @@ -1,28 +0,0 @@ -# InvitationList - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**items** | [**List[InvitationOut]**](InvitationOut.md) | | -**next_cursor** | **str** | | [optional] - -## Example - -```python -from agentdrive_sdk.models.invitation_list import InvitationList - -# TODO update the JSON string below -json = "{}" -# create an instance of InvitationList from a JSON string -invitation_list_instance = InvitationList.from_json(json) -# print the JSON string representation of the object -print(InvitationList.to_json()) - -# convert the object into a dict -invitation_list_dict = invitation_list_instance.to_dict() -# create an instance of InvitationList from a dict -invitation_list_from_dict = InvitationList.from_dict(invitation_list_dict) -``` -[[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/sdk/python/docs/InvitationOut.md b/sdk/python/docs/InvitationOut.md deleted file mode 100644 index 5a8e9df..0000000 --- a/sdk/python/docs/InvitationOut.md +++ /dev/null @@ -1,35 +0,0 @@ -# InvitationOut - -One workspace invitation — metadata only; the raw token is never surfaced over the API (it lives only in the invite email). - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | **datetime** | | -**email** | **str** | | -**expires_at** | **datetime** | | -**id** | **str** | | -**invited_by** | **str** | | [optional] -**organization_id** | **str** | | -**role** | **str** | | -**status** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.invitation_out import InvitationOut - -# TODO update the JSON string below -json = "{}" -# create an instance of InvitationOut from a JSON string -invitation_out_instance = InvitationOut.from_json(json) -# print the JSON string representation of the object -print(InvitationOut.to_json()) - -# convert the object into a dict -invitation_out_dict = invitation_out_instance.to_dict() -# create an instance of InvitationOut from a dict -invitation_out_from_dict = InvitationOut.from_dict(invitation_out_dict) -``` -[[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/sdk/python/docs/InviteCreateOut.md b/sdk/python/docs/InviteCreateOut.md deleted file mode 100644 index 5290ea6..0000000 --- a/sdk/python/docs/InviteCreateOut.md +++ /dev/null @@ -1,30 +0,0 @@ -# InviteCreateOut - -POST /v0/members/invite response. `already_member` is True when the email was already a live member (no invite created — a no-op success). `email_delivered` is False when the invite row was created but the notification email failed to send — the invite is still valid and can be resent, but the invitee has not yet received a link. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**already_member** | **bool** | | [optional] [default to False] -**email_delivered** | **bool** | | [optional] [default to True] -**invitation** | [**InvitationOut**](InvitationOut.md) | | [optional] - -## Example - -```python -from agentdrive_sdk.models.invite_create_out import InviteCreateOut - -# TODO update the JSON string below -json = "{}" -# create an instance of InviteCreateOut from a JSON string -invite_create_out_instance = InviteCreateOut.from_json(json) -# print the JSON string representation of the object -print(InviteCreateOut.to_json()) - -# convert the object into a dict -invite_create_out_dict = invite_create_out_instance.to_dict() -# create an instance of InviteCreateOut from a dict -invite_create_out_from_dict = InviteCreateOut.from_dict(invite_create_out_dict) -``` -[[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/sdk/python/docs/JwkOut.md b/sdk/python/docs/JwkOut.md deleted file mode 100644 index 2d4718b..0000000 --- a/sdk/python/docs/JwkOut.md +++ /dev/null @@ -1,32 +0,0 @@ -# JwkOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**alg** | **str** | | -**e** | **str** | | -**kid** | **str** | | -**kty** | **str** | | -**n** | **str** | | -**use** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.jwk_out import JwkOut - -# TODO update the JSON string below -json = "{}" -# create an instance of JwkOut from a JSON string -jwk_out_instance = JwkOut.from_json(json) -# print the JSON string representation of the object -print(JwkOut.to_json()) - -# convert the object into a dict -jwk_out_dict = jwk_out_instance.to_dict() -# create an instance of JwkOut from a dict -jwk_out_from_dict = JwkOut.from_dict(jwk_out_dict) -``` -[[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/sdk/python/docs/JwksOut.md b/sdk/python/docs/JwksOut.md deleted file mode 100644 index 5824ddf..0000000 --- a/sdk/python/docs/JwksOut.md +++ /dev/null @@ -1,27 +0,0 @@ -# JwksOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**keys** | [**List[JwkOut]**](JwkOut.md) | | - -## Example - -```python -from agentdrive_sdk.models.jwks_out import JwksOut - -# TODO update the JSON string below -json = "{}" -# create an instance of JwksOut from a JSON string -jwks_out_instance = JwksOut.from_json(json) -# print the JSON string representation of the object -print(JwksOut.to_json()) - -# convert the object into a dict -jwks_out_dict = jwks_out_instance.to_dict() -# create an instance of JwksOut from a dict -jwks_out_from_dict = JwksOut.from_dict(jwks_out_dict) -``` -[[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/sdk/python/docs/LocInner.md b/sdk/python/docs/LocInner.md deleted file mode 100644 index 3b66735..0000000 --- a/sdk/python/docs/LocInner.md +++ /dev/null @@ -1,26 +0,0 @@ -# LocInner - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -## Example - -```python -from agentdrive_sdk.models.loc_inner import LocInner - -# TODO update the JSON string below -json = "{}" -# create an instance of LocInner from a JSON string -loc_inner_instance = LocInner.from_json(json) -# print the JSON string representation of the object -print(LocInner.to_json()) - -# convert the object into a dict -loc_inner_dict = loc_inner_instance.to_dict() -# create an instance of LocInner from a dict -loc_inner_from_dict = LocInner.from_dict(loc_inner_dict) -``` -[[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/sdk/python/docs/LookupValuesIn.md b/sdk/python/docs/LookupValuesIn.md deleted file mode 100644 index cb9dd8b..0000000 --- a/sdk/python/docs/LookupValuesIn.md +++ /dev/null @@ -1,29 +0,0 @@ -# LookupValuesIn - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**column** | **str** | | -**dataset** | **str** | | -**limit** | **int** | | [optional] [default to 50] - -## Example - -```python -from agentdrive_sdk.models.lookup_values_in import LookupValuesIn - -# TODO update the JSON string below -json = "{}" -# create an instance of LookupValuesIn from a JSON string -lookup_values_in_instance = LookupValuesIn.from_json(json) -# print the JSON string representation of the object -print(LookupValuesIn.to_json()) - -# convert the object into a dict -lookup_values_in_dict = lookup_values_in_instance.to_dict() -# create an instance of LookupValuesIn from a dict -lookup_values_in_from_dict = LookupValuesIn.from_dict(lookup_values_in_dict) -``` -[[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/sdk/python/docs/LookupValuesOut.md b/sdk/python/docs/LookupValuesOut.md deleted file mode 100644 index 68a93e9..0000000 --- a/sdk/python/docs/LookupValuesOut.md +++ /dev/null @@ -1,29 +0,0 @@ -# LookupValuesOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**column** | **str** | | -**dataset** | **str** | | -**values** | **List[object]** | | - -## Example - -```python -from agentdrive_sdk.models.lookup_values_out import LookupValuesOut - -# TODO update the JSON string below -json = "{}" -# create an instance of LookupValuesOut from a JSON string -lookup_values_out_instance = LookupValuesOut.from_json(json) -# print the JSON string representation of the object -print(LookupValuesOut.to_json()) - -# convert the object into a dict -lookup_values_out_dict = lookup_values_out_instance.to_dict() -# create an instance of LookupValuesOut from a dict -lookup_values_out_from_dict = LookupValuesOut.from_dict(lookup_values_out_dict) -``` -[[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/sdk/python/docs/McpOauthApi.md b/sdk/python/docs/McpOauthApi.md deleted file mode 100644 index 87b6eba..0000000 --- a/sdk/python/docs/McpOauthApi.md +++ /dev/null @@ -1,142 +0,0 @@ -# agentdrive_sdk.McpOauthApi - -All URIs are relative to *https://api.agentdrive.run* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**oauth2_register_oauth2_register_post**](McpOauthApi.md#oauth2_register_oauth2_register_post) | **POST** /oauth2/register | Dynamic Client Registration (RFC 7591) -[**oauth2_revoke_oauth2_revoke_post**](McpOauthApi.md#oauth2_revoke_oauth2_revoke_post) | **POST** /oauth2/revoke | Token revocation (RFC 7009) - - -# **oauth2_register_oauth2_register_post** -> ClientRegistrationOut oauth2_register_oauth2_register_post() - -Dynamic Client Registration (RFC 7591) - -Anonymous registration endpoint for MCP clients. Public clients only (PKCE, no client_secret). Returns the registered metadata plus the assigned `client_id`. Registration grants nothing by itself — every token still requires a user consent ceremony at /oauth2/authorize. - -### Example - - -```python -import agentdrive_sdk -from agentdrive_sdk.models.client_registration_out import ClientRegistrationOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.McpOauthApi(api_client) - - try: - # Dynamic Client Registration (RFC 7591) - api_response = api_instance.oauth2_register_oauth2_register_post() - print("The response of McpOauthApi->oauth2_register_oauth2_register_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling McpOauthApi->oauth2_register_oauth2_register_post: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**ClientRegistrationOut**](ClientRegistrationOut.md) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**400** | Invalid client metadata. | * X-Request-Id - Request correlation identifier.
| -**429** | Registration rate limit exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **oauth2_revoke_oauth2_revoke_post** -> object oauth2_revoke_oauth2_revoke_post() - -Token revocation (RFC 7009) - -Revokes an `adat_` access token (that token only) or an `adrt_` refresh token (the whole rotation chain). Unknown tokens return 200 per RFC 7009 §2.2 — existence is not revealed. Public-client endpoint auth (`client_id` form param, no secret). - -### Example - - -```python -import agentdrive_sdk -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.McpOauthApi(api_client) - - try: - # Token revocation (RFC 7009) - api_response = api_instance.oauth2_revoke_oauth2_revoke_post() - print("The response of McpOauthApi->oauth2_revoke_oauth2_revoke_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling McpOauthApi->oauth2_revoke_oauth2_revoke_post: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -**object** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**400** | Invalid revocation request. | * X-Request-Id - Request correlation identifier.
| -**401** | Client authentication failed. | * X-Request-Id - Request correlation identifier.
| -**403** | Token type is unsupported. | * X-Request-Id - Request correlation identifier.
| -**429** | Revocation rate limit exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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/sdk/python/docs/McpOauthUiApi.md b/sdk/python/docs/McpOauthUiApi.md deleted file mode 100644 index 6f70623..0000000 --- a/sdk/python/docs/McpOauthUiApi.md +++ /dev/null @@ -1,141 +0,0 @@ -# agentdrive_sdk.McpOauthUiApi - -All URIs are relative to *https://api.agentdrive.run* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**authorize_decision_oauth2_authorize_post**](McpOauthUiApi.md#authorize_decision_oauth2_authorize_post) | **POST** /oauth2/authorize | Authorize Decision -[**authorize_page_oauth2_authorize_get**](McpOauthUiApi.md#authorize_page_oauth2_authorize_get) | **GET** /oauth2/authorize | Authorize Page - - -# **authorize_decision_oauth2_authorize_post** -> authorize_decision_oauth2_authorize_post(csrf) - -Authorize Decision - -### Example - - -```python -import agentdrive_sdk -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.McpOauthUiApi(api_client) - csrf = 'csrf_example' # str | - - try: - # Authorize Decision - api_instance.authorize_decision_oauth2_authorize_post(csrf) - except Exception as e: - print("Exception when calling McpOauthUiApi->authorize_decision_oauth2_authorize_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **csrf** | **str**| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: application/x-www-form-urlencoded - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**302** | Redirect to the canonical or authentication URL. | * Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -**303** | Continue after the form submission at the redirect target. | * Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -**400** | The authorization decision or request is invalid. | * X-Request-Id - Request correlation identifier.
| -**403** | The selected drive is unavailable or the browser CSRF check failed. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | Authorization rate limit exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **authorize_page_oauth2_authorize_get** -> str authorize_page_oauth2_authorize_get() - -Authorize Page - -### Example - - -```python -import agentdrive_sdk -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.McpOauthUiApi(api_client) - - try: - # Authorize Page - api_response = api_instance.authorize_page_oauth2_authorize_get() - print("The response of McpOauthUiApi->authorize_page_oauth2_authorize_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling McpOauthUiApi->authorize_page_oauth2_authorize_get: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -**str** - -### Authorization - -No authorization required - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: text/html, application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**302** | Redirect to the canonical or authentication URL. | * Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -**400** | The authorization request is invalid. | * X-Request-Id - Request correlation identifier.
| -**429** | Authorization rate limit exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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/sdk/python/docs/MemberInviteIn.md b/sdk/python/docs/MemberInviteIn.md deleted file mode 100644 index 8fc3ed4..0000000 --- a/sdk/python/docs/MemberInviteIn.md +++ /dev/null @@ -1,29 +0,0 @@ -# MemberInviteIn - -POST /v0/members/invite body — invite a person by email. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**email** | **str** | | -**role** | **str** | | [optional] [default to 'member'] - -## Example - -```python -from agentdrive_sdk.models.member_invite_in import MemberInviteIn - -# TODO update the JSON string below -json = "{}" -# create an instance of MemberInviteIn from a JSON string -member_invite_in_instance = MemberInviteIn.from_json(json) -# print the JSON string representation of the object -print(MemberInviteIn.to_json()) - -# convert the object into a dict -member_invite_in_dict = member_invite_in_instance.to_dict() -# create an instance of MemberInviteIn from a dict -member_invite_in_from_dict = MemberInviteIn.from_dict(member_invite_in_dict) -``` -[[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/sdk/python/docs/MemberList.md b/sdk/python/docs/MemberList.md deleted file mode 100644 index db1a23d..0000000 --- a/sdk/python/docs/MemberList.md +++ /dev/null @@ -1,28 +0,0 @@ -# MemberList - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**items** | [**List[MemberOut]**](MemberOut.md) | | -**next_cursor** | **str** | | [optional] - -## Example - -```python -from agentdrive_sdk.models.member_list import MemberList - -# TODO update the JSON string below -json = "{}" -# create an instance of MemberList from a JSON string -member_list_instance = MemberList.from_json(json) -# print the JSON string representation of the object -print(MemberList.to_json()) - -# convert the object into a dict -member_list_dict = member_list_instance.to_dict() -# create an instance of MemberList from a dict -member_list_from_dict = MemberList.from_dict(member_list_dict) -``` -[[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/sdk/python/docs/MemberOut.md b/sdk/python/docs/MemberOut.md deleted file mode 100644 index cca8b42..0000000 --- a/sdk/python/docs/MemberOut.md +++ /dev/null @@ -1,33 +0,0 @@ -# MemberOut - -One live member of a workspace — metadata for the members page / `GET /v0/members`. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | **datetime** | | -**email** | **str** | | -**first_name** | **str** | | [optional] -**last_name** | **str** | | [optional] -**role** | **str** | | -**user_id** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.member_out import MemberOut - -# TODO update the JSON string below -json = "{}" -# create an instance of MemberOut from a JSON string -member_out_instance = MemberOut.from_json(json) -# print the JSON string representation of the object -print(MemberOut.to_json()) - -# convert the object into a dict -member_out_dict = member_out_instance.to_dict() -# create an instance of MemberOut from a dict -member_out_from_dict = MemberOut.from_dict(member_out_dict) -``` -[[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/sdk/python/docs/MemberRemoveOut.md b/sdk/python/docs/MemberRemoveOut.md deleted file mode 100644 index 0986b23..0000000 --- a/sdk/python/docs/MemberRemoveOut.md +++ /dev/null @@ -1,30 +0,0 @@ -# MemberRemoveOut - -DELETE /v0/members/{user_id} response — the member-removal receipt. `id` is the removed user's id (replaces the ad-hoc `removed` key). - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | | -**ok** | **bool** | | [optional] [default to True] -**organization_id** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.member_remove_out import MemberRemoveOut - -# TODO update the JSON string below -json = "{}" -# create an instance of MemberRemoveOut from a JSON string -member_remove_out_instance = MemberRemoveOut.from_json(json) -# print the JSON string representation of the object -print(MemberRemoveOut.to_json()) - -# convert the object into a dict -member_remove_out_dict = member_remove_out_instance.to_dict() -# create an instance of MemberRemoveOut from a dict -member_remove_out_from_dict = MemberRemoveOut.from_dict(member_remove_out_dict) -``` -[[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/sdk/python/docs/MemberRoleIn.md b/sdk/python/docs/MemberRoleIn.md deleted file mode 100644 index 09493dd..0000000 --- a/sdk/python/docs/MemberRoleIn.md +++ /dev/null @@ -1,28 +0,0 @@ -# MemberRoleIn - -PATCH /v0/members/{user} body — promote/demote a member. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**role** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.member_role_in import MemberRoleIn - -# TODO update the JSON string below -json = "{}" -# create an instance of MemberRoleIn from a JSON string -member_role_in_instance = MemberRoleIn.from_json(json) -# print the JSON string representation of the object -print(MemberRoleIn.to_json()) - -# convert the object into a dict -member_role_in_dict = member_role_in_instance.to_dict() -# create an instance of MemberRoleIn from a dict -member_role_in_from_dict = MemberRoleIn.from_dict(member_role_in_dict) -``` -[[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/sdk/python/docs/MembersApi.md b/sdk/python/docs/MembersApi.md deleted file mode 100644 index 0962a45..0000000 --- a/sdk/python/docs/MembersApi.md +++ /dev/null @@ -1,531 +0,0 @@ -# agentdrive_sdk.MembersApi - -All URIs are relative to *https://api.agentdrive.run* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**invite_member_v0_members_invite_post**](MembersApi.md#invite_member_v0_members_invite_post) | **POST** /v0/members/invite | Invite a person to your workspace by email -[**list_invitations_v0_invitations_get**](MembersApi.md#list_invitations_v0_invitations_get) | **GET** /v0/invitations | List pending invitations -[**list_members_v0_members_get**](MembersApi.md#list_members_v0_members_get) | **GET** /v0/members | List the members of your active workspace -[**remove_member_v0_members_target_user_id_delete**](MembersApi.md#remove_member_v0_members_target_user_id_delete) | **DELETE** /v0/members/{target_user_id} | Remove a member (or leave) -[**revoke_invitation_v0_invitations_invitation_id_delete**](MembersApi.md#revoke_invitation_v0_invitations_invitation_id_delete) | **DELETE** /v0/invitations/{invitation_id} | Revoke a pending invitation -[**set_member_role_v0_members_target_user_id_patch**](MembersApi.md#set_member_role_v0_members_target_user_id_patch) | **PATCH** /v0/members/{target_user_id} | Change a member's role - - -# **invite_member_v0_members_invite_post** -> InviteCreateOut invite_member_v0_members_invite_post(member_invite_in) - -Invite a person to your workspace by email - -Create a pending invitation in the caller's active workspace and enqueue the invite email. **Admin only**, `full` scope. Inviting an existing member is a no-op success (`already_member: true`). A duplicate pending invite for the same email returns 409 `INVITE_PENDING` (resend it from the members page). The raw invite token is delivered only by email — never in this response. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.invite_create_out import InviteCreateOut -from agentdrive_sdk.models.member_invite_in import MemberInviteIn -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.MembersApi(api_client) - member_invite_in = agentdrive_sdk.MemberInviteIn() # MemberInviteIn | - - try: - # Invite a person to your workspace by email - api_response = api_instance.invite_member_v0_members_invite_post(member_invite_in) - print("The response of MembersApi->invite_member_v0_members_invite_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MembersApi->invite_member_v0_members_invite_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **member_invite_in** | [**MemberInviteIn**](MemberInviteIn.md)| | - -### Return type - -[**InviteCreateOut**](InviteCreateOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Successful Response | * Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -**400** | The email or role is invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**409** | The user is already a member or has a pending invitation. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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_invitations_v0_invitations_get** -> InvitationList list_invitations_v0_invitations_get(cursor=cursor, limit=limit) - -List pending invitations - -List the pending invitations for the caller's active workspace. **Admin only.** Metadata only — the raw invite token is never surfaced. - -Newest first (`created_at` descending, tie-broken by `id`). Paginated: `limit` is clamped to [1, 100] (default 50, never a 422); pass the response's `next_cursor` back as `cursor` for the next page (`null` when the listing is complete). - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.invitation_list import InvitationList -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.MembersApi(api_client) - cursor = 'cursor_example' # str | (optional) - limit = 56 # int | (optional) - - try: - # List pending invitations - api_response = api_instance.list_invitations_v0_invitations_get(cursor=cursor, limit=limit) - print("The response of MembersApi->list_invitations_v0_invitations_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MembersApi->list_invitations_v0_invitations_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **cursor** | **str**| | [optional] - **limit** | **int**| | [optional] - -### Return type - -[**InvitationList**](InvitationList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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_members_v0_members_get** -> MemberList list_members_v0_members_get(cursor=cursor, limit=limit) - -List the members of your active workspace - -List live members (email, role, joined-at) of the caller's active workspace. Any **member** may list; a `read`-scope token is sufficient. - -Ordered by join time (`created_at`, tie-broken by `user_id`) — **no role grouping is promised**; a dashboard that wants admins-first sorts client-side. Paginated: `limit` is clamped to [1, 100] (default 50, never a 422); pass the response's `next_cursor` back as `cursor` for the next page (`null` when the listing is complete). - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.member_list import MemberList -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.MembersApi(api_client) - cursor = 'cursor_example' # str | (optional) - limit = 56 # int | (optional) - - try: - # List the members of your active workspace - api_response = api_instance.list_members_v0_members_get(cursor=cursor, limit=limit) - print("The response of MembersApi->list_members_v0_members_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MembersApi->list_members_v0_members_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **cursor** | **str**| | [optional] - **limit** | **int**| | [optional] - -### Return type - -[**MemberList**](MemberList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **remove_member_v0_members_target_user_id_delete** -> MemberRemoveOut remove_member_v0_members_target_user_id_delete(target_user_id, confirm=confirm) - -Remove a member (or leave) - -Remove a member from the caller's active workspace, soft-deleting every drive that member owns there (workspaces-design §4.4 — no ownership transfer in v0; their `ad_live_` keys then stop working). **Admin** may remove anyone; **any member** may remove themselves (self-leave). `full` scope. Removing the **last/sole admin** is rejected with 409 `LAST_ADMIN` (promote someone first, or delete the workspace). - -**Explicit confirmation required:** pass `?confirm=DELETE` or the request is rejected with 400 `CONFIRM_REQUIRED` — removal cascades a soft-delete of every drive the member owns, so it carries tenant-level blast radius (uniform with `DELETE /v0/drives/{id}`). - -Deliberately takes NO `If-Match`: membership rows carry no generation/metageneration axis to pin (there is no ETag to echo), so `?confirm=DELETE` is the sole mutation guard here. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.member_remove_out import MemberRemoveOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.MembersApi(api_client) - target_user_id = 'target_user_id_example' # str | - confirm = 'confirm_example' # str | (optional) - - try: - # Remove a member (or leave) - api_response = api_instance.remove_member_v0_members_target_user_id_delete(target_user_id, confirm=confirm) - print("The response of MembersApi->remove_member_v0_members_target_user_id_delete:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MembersApi->remove_member_v0_members_target_user_id_delete: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **target_user_id** | **str**| | - **confirm** | **str**| | [optional] - -### Return type - -[**MemberRemoveOut**](MemberRemoveOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The member does not exist in this workspace. | * X-Request-Id - Request correlation identifier.
| -**409** | The removal would violate workspace ownership requirements. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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_invitation_v0_invitations_invitation_id_delete** -> RevokeOut revoke_invitation_v0_invitations_invitation_id_delete(invitation_id) - -Revoke a pending invitation - -Revoke a pending invitation in the caller's active workspace. **Admin only**, `full` scope. Org-scoped + idempotent: `revoked` is a COUNT — 1 when a live invite was revoked, 0 when it was already gone (a forged id, an invite from another workspace, or an already-consumed invite all return `revoked: 0`, no-leak). - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.revoke_out import RevokeOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.MembersApi(api_client) - invitation_id = 'invitation_id_example' # str | - - try: - # Revoke a pending invitation - api_response = api_instance.revoke_invitation_v0_invitations_invitation_id_delete(invitation_id) - print("The response of MembersApi->revoke_invitation_v0_invitations_invitation_id_delete:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MembersApi->revoke_invitation_v0_invitations_invitation_id_delete: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **invitation_id** | **str**| | - -### Return type - -[**RevokeOut**](RevokeOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The invitation does not exist in this workspace. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **set_member_role_v0_members_target_user_id_patch** -> MemberOut set_member_role_v0_members_target_user_id_patch(target_user_id, member_role_in) - -Change a member's role - -Promote/demote a member in the caller's active workspace. **Admin only**, `full` scope. Demoting the workspace's **last admin** is rejected with 409 `LAST_ADMIN` (promote someone first). - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.member_out import MemberOut -from agentdrive_sdk.models.member_role_in import MemberRoleIn -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.MembersApi(api_client) - target_user_id = 'target_user_id_example' # str | - member_role_in = agentdrive_sdk.MemberRoleIn() # MemberRoleIn | - - try: - # Change a member's role - api_response = api_instance.set_member_role_v0_members_target_user_id_patch(target_user_id, member_role_in) - print("The response of MembersApi->set_member_role_v0_members_target_user_id_patch:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling MembersApi->set_member_role_v0_members_target_user_id_patch: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **target_user_id** | **str**| | - **member_role_in** | [**MemberRoleIn**](MemberRoleIn.md)| | - -### Return type - -[**MemberOut**](MemberOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**400** | The membership update is invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The member does not exist in this workspace. | * X-Request-Id - Request correlation identifier.
| -**409** | The update would violate workspace ownership requirements. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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/sdk/python/docs/OAuthProtocolErrorOut.md b/sdk/python/docs/OAuthProtocolErrorOut.md deleted file mode 100644 index d1548f8..0000000 --- a/sdk/python/docs/OAuthProtocolErrorOut.md +++ /dev/null @@ -1,29 +0,0 @@ -# OAuthProtocolErrorOut - -RFC OAuth error shape used by public protocol endpoints. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **str** | | -**error_description** | **str** | | [optional] - -## Example - -```python -from agentdrive_sdk.models.o_auth_protocol_error_out import OAuthProtocolErrorOut - -# TODO update the JSON string below -json = "{}" -# create an instance of OAuthProtocolErrorOut from a JSON string -o_auth_protocol_error_out_instance = OAuthProtocolErrorOut.from_json(json) -# print the JSON string representation of the object -print(OAuthProtocolErrorOut.to_json()) - -# convert the object into a dict -o_auth_protocol_error_out_dict = o_auth_protocol_error_out_instance.to_dict() -# create an instance of OAuthProtocolErrorOut from a dict -o_auth_protocol_error_out_from_dict = OAuthProtocolErrorOut.from_dict(o_auth_protocol_error_out_dict) -``` -[[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/sdk/python/docs/OperationUsageOut.md b/sdk/python/docs/OperationUsageOut.md deleted file mode 100644 index 5829fac..0000000 --- a/sdk/python/docs/OperationUsageOut.md +++ /dev/null @@ -1,28 +0,0 @@ -# OperationUsageOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**reads** | **int** | | -**writes** | **int** | | - -## Example - -```python -from agentdrive_sdk.models.operation_usage_out import OperationUsageOut - -# TODO update the JSON string below -json = "{}" -# create an instance of OperationUsageOut from a JSON string -operation_usage_out_instance = OperationUsageOut.from_json(json) -# print the JSON string representation of the object -print(OperationUsageOut.to_json()) - -# convert the object into a dict -operation_usage_out_dict = operation_usage_out_instance.to_dict() -# create an instance of OperationUsageOut from a dict -operation_usage_out_from_dict = OperationUsageOut.from_dict(operation_usage_out_dict) -``` -[[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/sdk/python/docs/Page.md b/sdk/python/docs/Page.md deleted file mode 100644 index 508dde3..0000000 --- a/sdk/python/docs/Page.md +++ /dev/null @@ -1,28 +0,0 @@ -# Page - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**items** | [**List[ArtifactOut]**](ArtifactOut.md) | | -**next_cursor** | **str** | | [optional] - -## Example - -```python -from agentdrive_sdk.models.page import Page - -# TODO update the JSON string below -json = "{}" -# create an instance of Page from a JSON string -page_instance = Page.from_json(json) -# print the JSON string representation of the object -print(Page.to_json()) - -# convert the object into a dict -page_dict = page_instance.to_dict() -# create an instance of Page from a dict -page_from_dict = Page.from_dict(page_dict) -``` -[[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/sdk/python/docs/ProjectConfigIn.md b/sdk/python/docs/ProjectConfigIn.md deleted file mode 100644 index ee8345f..0000000 --- a/sdk/python/docs/ProjectConfigIn.md +++ /dev/null @@ -1,29 +0,0 @@ -# ProjectConfigIn - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**auto_compile** | **bool** | | [optional] [default to False] -**engine** | **str** | | [optional] -**entrypoint** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.project_config_in import ProjectConfigIn - -# TODO update the JSON string below -json = "{}" -# create an instance of ProjectConfigIn from a JSON string -project_config_in_instance = ProjectConfigIn.from_json(json) -# print the JSON string representation of the object -print(ProjectConfigIn.to_json()) - -# convert the object into a dict -project_config_in_dict = project_config_in_instance.to_dict() -# create an instance of ProjectConfigIn from a dict -project_config_in_from_dict = ProjectConfigIn.from_dict(project_config_in_dict) -``` -[[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/sdk/python/docs/ProtectedResourceMetadataOut.md b/sdk/python/docs/ProtectedResourceMetadataOut.md deleted file mode 100644 index 873721f..0000000 --- a/sdk/python/docs/ProtectedResourceMetadataOut.md +++ /dev/null @@ -1,30 +0,0 @@ -# ProtectedResourceMetadataOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**authorization_servers** | **List[str]** | | -**bearer_methods_supported** | **List[str]** | | -**resource** | **str** | | -**scopes_supported** | **List[str]** | | - -## Example - -```python -from agentdrive_sdk.models.protected_resource_metadata_out import ProtectedResourceMetadataOut - -# TODO update the JSON string below -json = "{}" -# create an instance of ProtectedResourceMetadataOut from a JSON string -protected_resource_metadata_out_instance = ProtectedResourceMetadataOut.from_json(json) -# print the JSON string representation of the object -print(ProtectedResourceMetadataOut.to_json()) - -# convert the object into a dict -protected_resource_metadata_out_dict = protected_resource_metadata_out_instance.to_dict() -# create an instance of ProtectedResourceMetadataOut from a dict -protected_resource_metadata_out_from_dict = ProtectedResourceMetadataOut.from_dict(protected_resource_metadata_out_dict) -``` -[[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/sdk/python/docs/QueryColumnOut.md b/sdk/python/docs/QueryColumnOut.md deleted file mode 100644 index 8edb635..0000000 --- a/sdk/python/docs/QueryColumnOut.md +++ /dev/null @@ -1,28 +0,0 @@ -# QueryColumnOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | -**type** | **str** | | [optional] - -## Example - -```python -from agentdrive_sdk.models.query_column_out import QueryColumnOut - -# TODO update the JSON string below -json = "{}" -# create an instance of QueryColumnOut from a JSON string -query_column_out_instance = QueryColumnOut.from_json(json) -# print the JSON string representation of the object -print(QueryColumnOut.to_json()) - -# convert the object into a dict -query_column_out_dict = query_column_out_instance.to_dict() -# create an instance of QueryColumnOut from a dict -query_column_out_from_dict = QueryColumnOut.from_dict(query_column_out_dict) -``` -[[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/sdk/python/docs/QueryDryRunOut.md b/sdk/python/docs/QueryDryRunOut.md deleted file mode 100644 index 542fa7e..0000000 --- a/sdk/python/docs/QueryDryRunOut.md +++ /dev/null @@ -1,31 +0,0 @@ -# QueryDryRunOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**dry_run** | **bool** | | -**engine** | **str** | | -**estimated_bytes_processed** | **int** | | -**result_schema** | [**List[QueryColumnOut]**](QueryColumnOut.md) | | -**valid** | **bool** | | - -## Example - -```python -from agentdrive_sdk.models.query_dry_run_out import QueryDryRunOut - -# TODO update the JSON string below -json = "{}" -# create an instance of QueryDryRunOut from a JSON string -query_dry_run_out_instance = QueryDryRunOut.from_json(json) -# print the JSON string representation of the object -print(QueryDryRunOut.to_json()) - -# convert the object into a dict -query_dry_run_out_dict = query_dry_run_out_instance.to_dict() -# create an instance of QueryDryRunOut from a dict -query_dry_run_out_from_dict = QueryDryRunOut.from_dict(query_dry_run_out_dict) -``` -[[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/sdk/python/docs/QueryIn.md b/sdk/python/docs/QueryIn.md deleted file mode 100644 index 37b6e80..0000000 --- a/sdk/python/docs/QueryIn.md +++ /dev/null @@ -1,29 +0,0 @@ -# QueryIn - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**dry_run** | **bool** | | [optional] [default to False] -**inputs** | **Dict[str, str]** | | [optional] -**sql** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.query_in import QueryIn - -# TODO update the JSON string below -json = "{}" -# create an instance of QueryIn from a JSON string -query_in_instance = QueryIn.from_json(json) -# print the JSON string representation of the object -print(QueryIn.to_json()) - -# convert the object into a dict -query_in_dict = query_in_instance.to_dict() -# create an instance of QueryIn from a dict -query_in_from_dict = QueryIn.from_dict(query_in_dict) -``` -[[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/sdk/python/docs/QueryResultOut.md b/sdk/python/docs/QueryResultOut.md deleted file mode 100644 index ebd265d..0000000 --- a/sdk/python/docs/QueryResultOut.md +++ /dev/null @@ -1,33 +0,0 @@ -# QueryResultOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**bytes_processed** | **int** | | -**cache_hit** | **bool** | | -**engine** | **str** | | -**preview** | **List[Optional[Dict[str, object]]]** | | -**result_art_id** | **str** | | -**result_schema** | [**List[QueryColumnOut]**](QueryColumnOut.md) | | -**row_count** | **int** | | - -## Example - -```python -from agentdrive_sdk.models.query_result_out import QueryResultOut - -# TODO update the JSON string below -json = "{}" -# create an instance of QueryResultOut from a JSON string -query_result_out_instance = QueryResultOut.from_json(json) -# print the JSON string representation of the object -print(QueryResultOut.to_json()) - -# convert the object into a dict -query_result_out_dict = query_result_out_instance.to_dict() -# create an instance of QueryResultOut from a dict -query_result_out_from_dict = QueryResultOut.from_dict(query_result_out_dict) -``` -[[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/sdk/python/docs/RegisterAgentIdentityAgentIdentityPost422Response.md b/sdk/python/docs/RegisterAgentIdentityAgentIdentityPost422Response.md deleted file mode 100644 index 1cc04fe..0000000 --- a/sdk/python/docs/RegisterAgentIdentityAgentIdentityPost422Response.md +++ /dev/null @@ -1,27 +0,0 @@ -# RegisterAgentIdentityAgentIdentityPost422Response - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**detail** | [**ErrorDetail**](ErrorDetail.md) | | - -## Example - -```python -from agentdrive_sdk.models.register_agent_identity_agent_identity_post422_response import RegisterAgentIdentityAgentIdentityPost422Response - -# TODO update the JSON string below -json = "{}" -# create an instance of RegisterAgentIdentityAgentIdentityPost422Response from a JSON string -register_agent_identity_agent_identity_post422_response_instance = RegisterAgentIdentityAgentIdentityPost422Response.from_json(json) -# print the JSON string representation of the object -print(RegisterAgentIdentityAgentIdentityPost422Response.to_json()) - -# convert the object into a dict -register_agent_identity_agent_identity_post422_response_dict = register_agent_identity_agent_identity_post422_response_instance.to_dict() -# create an instance of RegisterAgentIdentityAgentIdentityPost422Response from a dict -register_agent_identity_agent_identity_post422_response_from_dict = RegisterAgentIdentityAgentIdentityPost422Response.from_dict(register_agent_identity_agent_identity_post422_response_dict) -``` -[[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/sdk/python/docs/ResponsePostQueryV0QueryPost.md b/sdk/python/docs/ResponsePostQueryV0QueryPost.md deleted file mode 100644 index 52d5ecb..0000000 --- a/sdk/python/docs/ResponsePostQueryV0QueryPost.md +++ /dev/null @@ -1,36 +0,0 @@ -# ResponsePostQueryV0QueryPost - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**dry_run** | **bool** | | -**engine** | **str** | | -**estimated_bytes_processed** | **int** | | -**result_schema** | [**List[QueryColumnOut]**](QueryColumnOut.md) | | -**valid** | **bool** | | -**bytes_processed** | **int** | | -**cache_hit** | **bool** | | -**preview** | **List[Dict[str, object]]** | | -**result_art_id** | **str** | | -**row_count** | **int** | | - -## Example - -```python -from agentdrive_sdk.models.response_post_query_v0_query_post import ResponsePostQueryV0QueryPost - -# TODO update the JSON string below -json = "{}" -# create an instance of ResponsePostQueryV0QueryPost from a JSON string -response_post_query_v0_query_post_instance = ResponsePostQueryV0QueryPost.from_json(json) -# print the JSON string representation of the object -print(ResponsePostQueryV0QueryPost.to_json()) - -# convert the object into a dict -response_post_query_v0_query_post_dict = response_post_query_v0_query_post_instance.to_dict() -# create an instance of ResponsePostQueryV0QueryPost from a dict -response_post_query_v0_query_post_from_dict = ResponsePostQueryV0QueryPost.from_dict(response_post_query_v0_query_post_dict) -``` -[[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/sdk/python/docs/RevokeOut.md b/sdk/python/docs/RevokeOut.md deleted file mode 100644 index 5048eb8..0000000 --- a/sdk/python/docs/RevokeOut.md +++ /dev/null @@ -1,30 +0,0 @@ -# RevokeOut - -DELETE /v0/grants/{grn_id}, DELETE /v0/shares/{shr_id}, DELETE /v0/invitations/{invitation_id} response — the unified revoke receipt. `revoked` is a COUNT: 1 when a live row was revoked, 0 when it was already gone (DELETE is idempotent). - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | | -**ok** | **bool** | | [optional] [default to True] -**revoked** | **int** | | - -## Example - -```python -from agentdrive_sdk.models.revoke_out import RevokeOut - -# TODO update the JSON string below -json = "{}" -# create an instance of RevokeOut from a JSON string -revoke_out_instance = RevokeOut.from_json(json) -# print the JSON string representation of the object -print(RevokeOut.to_json()) - -# convert the object into a dict -revoke_out_dict = revoke_out_instance.to_dict() -# create an instance of RevokeOut from a dict -revoke_out_from_dict = RevokeOut.from_dict(revoke_out_dict) -``` -[[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/sdk/python/docs/SearchHitOut.md b/sdk/python/docs/SearchHitOut.md deleted file mode 100644 index 9a58c8e..0000000 --- a/sdk/python/docs/SearchHitOut.md +++ /dev/null @@ -1,37 +0,0 @@ -# SearchHitOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**art_id** | **str** | | -**content_type** | **str** | | -**drive_id** | **str** | | -**file_type** | **str** | | -**labels** | **List[str]** | | [optional] -**path** | **str** | | -**score** | **float** | | -**snippet** | **str** | | -**updated_at** | **datetime** | | -**url** | **str** | | -**version_number** | **int** | | - -## Example - -```python -from agentdrive_sdk.models.search_hit_out import SearchHitOut - -# TODO update the JSON string below -json = "{}" -# create an instance of SearchHitOut from a JSON string -search_hit_out_instance = SearchHitOut.from_json(json) -# print the JSON string representation of the object -print(SearchHitOut.to_json()) - -# convert the object into a dict -search_hit_out_dict = search_hit_out_instance.to_dict() -# create an instance of SearchHitOut from a dict -search_hit_out_from_dict = SearchHitOut.from_dict(search_hit_out_dict) -``` -[[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/sdk/python/docs/SearchPage.md b/sdk/python/docs/SearchPage.md deleted file mode 100644 index 69762a8..0000000 --- a/sdk/python/docs/SearchPage.md +++ /dev/null @@ -1,28 +0,0 @@ -# SearchPage - -`/v0/search` response — single-shot top-N, deliberately unpaginated. Ranked retrieval doesn't paginate meaningfully (the industry norm: vector/RAG APIs are pure top-K; Algolia/GitHub cap ranked results outright) — the correct \"next page\" of a relevance-ranked list is a narrower query. Raise `limit` (≤100) for more hits. A `next_cursor` field advertised here in the past was structurally always null and was dropped; if deep retrieval is ever needed, an ES-`search_after` style `(score, id)` keyset can be re-added additively. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**items** | [**List[SearchHitOut]**](SearchHitOut.md) | | - -## Example - -```python -from agentdrive_sdk.models.search_page import SearchPage - -# TODO update the JSON string below -json = "{}" -# create an instance of SearchPage from a JSON string -search_page_instance = SearchPage.from_json(json) -# print the JSON string representation of the object -print(SearchPage.to_json()) - -# convert the object into a dict -search_page_dict = search_page_instance.to_dict() -# create an instance of SearchPage from a dict -search_page_from_dict = SearchPage.from_dict(search_page_dict) -``` -[[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/sdk/python/docs/ShareCreateIn.md b/sdk/python/docs/ShareCreateIn.md deleted file mode 100644 index b014dff..0000000 --- a/sdk/python/docs/ShareCreateIn.md +++ /dev/null @@ -1,31 +0,0 @@ -# ShareCreateIn - -POST /v0/shares body. `resource` is an `art_*`/`fld_*` id or a path. `expires_in` is seconds from now (omit for the default: none for a human creator, a short TTL for an agent). `password` (optional) gates redemption. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**expires_in** | **int** | | [optional] -**password** | **str** | | [optional] -**resource** | **str** | | -**role** | **str** | | [optional] [default to 'viewer'] - -## Example - -```python -from agentdrive_sdk.models.share_create_in import ShareCreateIn - -# TODO update the JSON string below -json = "{}" -# create an instance of ShareCreateIn from a JSON string -share_create_in_instance = ShareCreateIn.from_json(json) -# print the JSON string representation of the object -print(ShareCreateIn.to_json()) - -# convert the object into a dict -share_create_in_dict = share_create_in_instance.to_dict() -# create an instance of ShareCreateIn from a dict -share_create_in_from_dict = ShareCreateIn.from_dict(share_create_in_dict) -``` -[[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/sdk/python/docs/ShareErrorOut.md b/sdk/python/docs/ShareErrorOut.md deleted file mode 100644 index 69e3df8..0000000 --- a/sdk/python/docs/ShareErrorOut.md +++ /dev/null @@ -1,28 +0,0 @@ -# ShareErrorOut - -Negotiated JSON error shape for the public share protocol. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | [**ErrorBody**](ErrorBody.md) | | - -## Example - -```python -from agentdrive_sdk.models.share_error_out import ShareErrorOut - -# TODO update the JSON string below -json = "{}" -# create an instance of ShareErrorOut from a JSON string -share_error_out_instance = ShareErrorOut.from_json(json) -# print the JSON string representation of the object -print(ShareErrorOut.to_json()) - -# convert the object into a dict -share_error_out_dict = share_error_out_instance.to_dict() -# create an instance of ShareErrorOut from a dict -share_error_out_from_dict = ShareErrorOut.from_dict(share_error_out_dict) -``` -[[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/sdk/python/docs/ShareList.md b/sdk/python/docs/ShareList.md deleted file mode 100644 index ad296df..0000000 --- a/sdk/python/docs/ShareList.md +++ /dev/null @@ -1,28 +0,0 @@ -# ShareList - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**items** | [**List[ShareOut]**](ShareOut.md) | | -**next_cursor** | **str** | | [optional] - -## Example - -```python -from agentdrive_sdk.models.share_list import ShareList - -# TODO update the JSON string below -json = "{}" -# create an instance of ShareList from a JSON string -share_list_instance = ShareList.from_json(json) -# print the JSON string representation of the object -print(ShareList.to_json()) - -# convert the object into a dict -share_list_dict = share_list_instance.to_dict() -# create an instance of ShareList from a dict -share_list_from_dict = ShareList.from_dict(share_list_dict) -``` -[[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/sdk/python/docs/ShareMintOut.md b/sdk/python/docs/ShareMintOut.md deleted file mode 100644 index 23cbf80..0000000 --- a/sdk/python/docs/ShareMintOut.md +++ /dev/null @@ -1,39 +0,0 @@ -# ShareMintOut - -The create/rotate response — the ONLY place the `share_key` and its redemption `url` are exposed. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**access_count** | **int** | | [optional] [default to 0] -**audience** | **str** | | -**created_at** | **datetime** | | -**expires_at** | **datetime** | | [optional] -**has_password** | **bool** | | -**id** | **str** | | -**last_accessed_at** | **datetime** | | [optional] -**resource_id** | **str** | | -**resource_type** | **str** | | -**role** | **str** | | -**share_key** | **str** | | -**url** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.share_mint_out import ShareMintOut - -# TODO update the JSON string below -json = "{}" -# create an instance of ShareMintOut from a JSON string -share_mint_out_instance = ShareMintOut.from_json(json) -# print the JSON string representation of the object -print(ShareMintOut.to_json()) - -# convert the object into a dict -share_mint_out_dict = share_mint_out_instance.to_dict() -# create an instance of ShareMintOut from a dict -share_mint_out_from_dict = ShareMintOut.from_dict(share_mint_out_dict) -``` -[[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/sdk/python/docs/ShareOut.md b/sdk/python/docs/ShareOut.md deleted file mode 100644 index 0208a83..0000000 --- a/sdk/python/docs/ShareOut.md +++ /dev/null @@ -1,37 +0,0 @@ -# ShareOut - -A live share link as seen on list/management — NEVER carries the `share_key` (that is the credential, returned only at mint/rotate). - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**access_count** | **int** | | [optional] [default to 0] -**audience** | **str** | | -**created_at** | **datetime** | | -**expires_at** | **datetime** | | [optional] -**has_password** | **bool** | | -**id** | **str** | | -**last_accessed_at** | **datetime** | | [optional] -**resource_id** | **str** | | -**resource_type** | **str** | | -**role** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.share_out import ShareOut - -# TODO update the JSON string below -json = "{}" -# create an instance of ShareOut from a JSON string -share_out_instance = ShareOut.from_json(json) -# print the JSON string representation of the object -print(ShareOut.to_json()) - -# convert the object into a dict -share_out_dict = share_out_instance.to_dict() -# create an instance of ShareOut from a dict -share_out_from_dict = ShareOut.from_dict(share_out_dict) -``` -[[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/sdk/python/docs/ShareRedeemOut.md b/sdk/python/docs/ShareRedeemOut.md deleted file mode 100644 index e3dc244..0000000 --- a/sdk/python/docs/ShareRedeemOut.md +++ /dev/null @@ -1,30 +0,0 @@ -# ShareRedeemOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**expires_at** | **datetime** | | -**role** | **str** | | -**token** | **str** | | -**url** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.share_redeem_out import ShareRedeemOut - -# TODO update the JSON string below -json = "{}" -# create an instance of ShareRedeemOut from a JSON string -share_redeem_out_instance = ShareRedeemOut.from_json(json) -# print the JSON string representation of the object -print(ShareRedeemOut.to_json()) - -# convert the object into a dict -share_redeem_out_dict = share_redeem_out_instance.to_dict() -# create an instance of ShareRedeemOut from a dict -share_redeem_out_from_dict = ShareRedeemOut.from_dict(share_redeem_out_dict) -``` -[[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/sdk/python/docs/SourceRef.md b/sdk/python/docs/SourceRef.md deleted file mode 100644 index e9a82a6..0000000 --- a/sdk/python/docs/SourceRef.md +++ /dev/null @@ -1,30 +0,0 @@ -# SourceRef - -One typed provenance ref. `type` is open-vocabulary (server validates only length, not the value), so callers can declare new types as their integrations evolve. `id` is the type-specific identifier — for `type='artifact'` this is an `art_…` ID. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**id** | **str** | | -**metadata** | **Dict[str, object]** | | [optional] -**type** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.source_ref import SourceRef - -# TODO update the JSON string below -json = "{}" -# create an instance of SourceRef from a JSON string -source_ref_instance = SourceRef.from_json(json) -# print the JSON string representation of the object -print(SourceRef.to_json()) - -# convert the object into a dict -source_ref_dict = source_ref_instance.to_dict() -# create an instance of SourceRef from a dict -source_ref_from_dict = SourceRef.from_dict(source_ref_dict) -``` -[[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/sdk/python/docs/StorageBreakdownOut.md b/sdk/python/docs/StorageBreakdownOut.md deleted file mode 100644 index d4bb8eb..0000000 --- a/sdk/python/docs/StorageBreakdownOut.md +++ /dev/null @@ -1,30 +0,0 @@ -# StorageBreakdownOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**as_of** | **date** | | -**live_bytes** | **int** | | -**trash_bytes** | **int** | | -**version_bytes** | **int** | | - -## Example - -```python -from agentdrive_sdk.models.storage_breakdown_out import StorageBreakdownOut - -# TODO update the JSON string below -json = "{}" -# create an instance of StorageBreakdownOut from a JSON string -storage_breakdown_out_instance = StorageBreakdownOut.from_json(json) -# print the JSON string representation of the object -print(StorageBreakdownOut.to_json()) - -# convert the object into a dict -storage_breakdown_out_dict = storage_breakdown_out_instance.to_dict() -# create an instance of StorageBreakdownOut from a dict -storage_breakdown_out_from_dict = StorageBreakdownOut.from_dict(storage_breakdown_out_dict) -``` -[[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/sdk/python/docs/StorageFootprintOut.md b/sdk/python/docs/StorageFootprintOut.md deleted file mode 100644 index f5b1074..0000000 --- a/sdk/python/docs/StorageFootprintOut.md +++ /dev/null @@ -1,31 +0,0 @@ -# StorageFootprintOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**as_of** | **date** | | [optional] -**live_bytes** | **int** | | -**total_bytes** | **int** | | -**trash_bytes** | **int** | | -**version_bytes** | **int** | | - -## Example - -```python -from agentdrive_sdk.models.storage_footprint_out import StorageFootprintOut - -# TODO update the JSON string below -json = "{}" -# create an instance of StorageFootprintOut from a JSON string -storage_footprint_out_instance = StorageFootprintOut.from_json(json) -# print the JSON string representation of the object -print(StorageFootprintOut.to_json()) - -# convert the object into a dict -storage_footprint_out_dict = storage_footprint_out_instance.to_dict() -# create an instance of StorageFootprintOut from a dict -storage_footprint_out_from_dict = StorageFootprintOut.from_dict(storage_footprint_out_dict) -``` -[[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/sdk/python/docs/TokenResponse.md b/sdk/python/docs/TokenResponse.md deleted file mode 100644 index 4a04192..0000000 --- a/sdk/python/docs/TokenResponse.md +++ /dev/null @@ -1,32 +0,0 @@ -# TokenResponse - -`POST /oauth2/token` success response. Mirrors RFC 6749 with an optional `identity_assertion` field for the claim grant path (where a fresh post-claim assertion supersedes the pre-claim one). - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**access_token** | **str** | | -**expires_in** | **int** | Seconds until access_token expiry. | -**identity_assertion** | **str** | | [optional] -**scope** | **str** | | -**token_type** | **str** | | [optional] [default to 'Bearer'] - -## Example - -```python -from agentdrive_sdk.models.token_response import TokenResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of TokenResponse from a JSON string -token_response_instance = TokenResponse.from_json(json) -# print the JSON string representation of the object -print(TokenResponse.to_json()) - -# convert the object into a dict -token_response_dict = token_response_instance.to_dict() -# create an instance of TokenResponse from a dict -token_response_from_dict = TokenResponse.from_dict(token_response_dict) -``` -[[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/sdk/python/docs/TokenUsageOut.md b/sdk/python/docs/TokenUsageOut.md deleted file mode 100644 index d8809e5..0000000 --- a/sdk/python/docs/TokenUsageOut.md +++ /dev/null @@ -1,30 +0,0 @@ -# TokenUsageOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**embed** | **int** | | -**llm_cached** | **int** | | -**llm_input** | **int** | | -**llm_output** | **int** | | - -## Example - -```python -from agentdrive_sdk.models.token_usage_out import TokenUsageOut - -# TODO update the JSON string below -json = "{}" -# create an instance of TokenUsageOut from a JSON string -token_usage_out_instance = TokenUsageOut.from_json(json) -# print the JSON string representation of the object -print(TokenUsageOut.to_json()) - -# convert the object into a dict -token_usage_out_dict = token_usage_out_instance.to_dict() -# create an instance of TokenUsageOut from a dict -token_usage_out_from_dict = TokenUsageOut.from_dict(token_usage_out_dict) -``` -[[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/sdk/python/docs/TokensApi.md b/sdk/python/docs/TokensApi.md deleted file mode 100644 index b10b8ae..0000000 --- a/sdk/python/docs/TokensApi.md +++ /dev/null @@ -1,178 +0,0 @@ -# agentdrive_sdk.TokensApi - -All URIs are relative to *https://api.agentdrive.run* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**list_tokens_v0_tokens_get**](TokensApi.md#list_tokens_v0_tokens_get) | **GET** /v0/tokens | List your user-identity tokens -[**revoke_token_v0_tokens_token_id_revoke_post**](TokensApi.md#revoke_token_v0_tokens_token_id_revoke_post) | **POST** /v0/tokens/{token_id}/revoke | Revoke one of your user-identity tokens - - -# **list_tokens_v0_tokens_get** -> UserTokenList list_tokens_v0_tokens_get(cursor=cursor, limit=limit) - -List your user-identity tokens - -List the `ad_user_` tokens belonging to the authenticated user. Metadata only — the raw token is shown once at mint (web only) and is never returned here. Includes recently-revoked tokens (with `revoked_at` set) so the caller can audit them; newest first. - -**Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.user_token_list import UserTokenList -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.TokensApi(api_client) - cursor = 'cursor_example' # str | (optional) - limit = 56 # int | (optional) - - try: - # List your user-identity tokens - api_response = api_instance.list_tokens_v0_tokens_get(cursor=cursor, limit=limit) - print("The response of TokensApi->list_tokens_v0_tokens_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling TokensApi->list_tokens_v0_tokens_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **cursor** | **str**| | [optional] - **limit** | **int**| | [optional] - -### Return type - -[**UserTokenList**](UserTokenList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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_token_v0_tokens_token_id_revoke_post** -> UserTokenOut revoke_token_v0_tokens_token_id_revoke_post(token_id) - -Revoke one of your user-identity tokens - -Revoke a single `ad_user_` token by id. Scoped to the authenticated user: a token id that isn't yours returns 404 (no-leak). Idempotent — revoking an already-revoked token also returns 404 (it is no longer a live token of yours to revoke). On success the revoked token's metadata is returned with `revoked_at` set. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.user_token_out import UserTokenOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.TokensApi(api_client) - token_id = 'token_id_example' # str | - - try: - # Revoke one of your user-identity tokens - api_response = api_instance.revoke_token_v0_tokens_token_id_revoke_post(token_id) - print("The response of TokensApi->revoke_token_v0_tokens_token_id_revoke_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling TokensApi->revoke_token_v0_tokens_token_id_revoke_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **token_id** | **str**| | - -### Return type - -[**UserTokenOut**](UserTokenOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The token does not exist for this user. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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/sdk/python/docs/TrashArtifactOut.md b/sdk/python/docs/TrashArtifactOut.md deleted file mode 100644 index 1cc3311..0000000 --- a/sdk/python/docs/TrashArtifactOut.md +++ /dev/null @@ -1,32 +0,0 @@ -# TrashArtifactOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**deleted_at** | **datetime** | | [optional] -**id** | **str** | | -**path** | **str** | | -**purge_at** | **datetime** | | [optional] -**restore_url** | **str** | | -**size_bytes** | **int** | | - -## Example - -```python -from agentdrive_sdk.models.trash_artifact_out import TrashArtifactOut - -# TODO update the JSON string below -json = "{}" -# create an instance of TrashArtifactOut from a JSON string -trash_artifact_out_instance = TrashArtifactOut.from_json(json) -# print the JSON string representation of the object -print(TrashArtifactOut.to_json()) - -# convert the object into a dict -trash_artifact_out_dict = trash_artifact_out_instance.to_dict() -# create an instance of TrashArtifactOut from a dict -trash_artifact_out_from_dict = TrashArtifactOut.from_dict(trash_artifact_out_dict) -``` -[[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/sdk/python/docs/TrashDriveOut.md b/sdk/python/docs/TrashDriveOut.md deleted file mode 100644 index 9b07668..0000000 --- a/sdk/python/docs/TrashDriveOut.md +++ /dev/null @@ -1,28 +0,0 @@ -# TrashDriveOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**deleted_at** | **datetime** | | [optional] -**id** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.trash_drive_out import TrashDriveOut - -# TODO update the JSON string below -json = "{}" -# create an instance of TrashDriveOut from a JSON string -trash_drive_out_instance = TrashDriveOut.from_json(json) -# print the JSON string representation of the object -print(TrashDriveOut.to_json()) - -# convert the object into a dict -trash_drive_out_dict = trash_drive_out_instance.to_dict() -# create an instance of TrashDriveOut from a dict -trash_drive_out_from_dict = TrashDriveOut.from_dict(trash_drive_out_dict) -``` -[[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/sdk/python/docs/TrashOut.md b/sdk/python/docs/TrashOut.md deleted file mode 100644 index 173453d..0000000 --- a/sdk/python/docs/TrashOut.md +++ /dev/null @@ -1,31 +0,0 @@ -# TrashOut - -Trash collection with a compatibility-preserving pagination opt-in. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**artifacts** | [**List[TrashArtifactOut]**](TrashArtifactOut.md) | Deprecated alias of items. | -**drive** | [**TrashDriveOut**](TrashDriveOut.md) | | -**items** | [**List[TrashArtifactOut]**](TrashArtifactOut.md) | | -**next_cursor** | **str** | | [optional] - -## Example - -```python -from agentdrive_sdk.models.trash_out import TrashOut - -# TODO update the JSON string below -json = "{}" -# create an instance of TrashOut from a JSON string -trash_out_instance = TrashOut.from_json(json) -# print the JSON string representation of the object -print(TrashOut.to_json()) - -# convert the object into a dict -trash_out_dict = trash_out_instance.to_dict() -# create an instance of TrashOut from a dict -trash_out_from_dict = TrashOut.from_dict(trash_out_dict) -``` -[[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/sdk/python/docs/UploadAbortOut.md b/sdk/python/docs/UploadAbortOut.md deleted file mode 100644 index 94f00e9..0000000 --- a/sdk/python/docs/UploadAbortOut.md +++ /dev/null @@ -1,30 +0,0 @@ -# UploadAbortOut - -Response of `DELETE /v0/uploads/{upload_id}` — the session is released. `released_bytes` is the reservation returned to the drive's quota (the session's `size_bytes` for a live `initiated` session; `0` when the session was already aborted or already expired — the GC sweep owns an expired session's release). - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**released_bytes** | **int** | | -**state** | **str** | | [optional] [default to 'aborted'] -**upload_id** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.upload_abort_out import UploadAbortOut - -# TODO update the JSON string below -json = "{}" -# create an instance of UploadAbortOut from a JSON string -upload_abort_out_instance = UploadAbortOut.from_json(json) -# print the JSON string representation of the object -print(UploadAbortOut.to_json()) - -# convert the object into a dict -upload_abort_out_dict = upload_abort_out_instance.to_dict() -# create an instance of UploadAbortOut from a dict -upload_abort_out_from_dict = UploadAbortOut.from_dict(upload_abort_out_dict) -``` -[[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/sdk/python/docs/UploadBeginIn.md b/sdk/python/docs/UploadBeginIn.md deleted file mode 100644 index 705a9a8..0000000 --- a/sdk/python/docs/UploadBeginIn.md +++ /dev/null @@ -1,39 +0,0 @@ -# UploadBeginIn - -Body of `POST /v0/uploads` — the large-upload begin call (large-upload- design.md §5.1). All artifact decisions are frozen here; the subsequent GCS PUT carries only bytes, and `commit` carries only the `upload_id`. `labels`/`metadata`/`source` omitted (null) ⇒ preserve the existing artifact's value at commit; present (incl. empty) ⇒ replace. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**actor_name** | **str** | | [optional] -**change_summary** | **str** | | [optional] -**content_type** | **str** | | [optional] [default to 'application/octet-stream'] -**cors_origin** | **str** | Web origin (scheme://host[:port]) of the browser that will PUT the bytes, e.g. `https://app.example.com`. Set this when the `upload_url` is handed to browser code: GCS binds CORS at session initiate, so the returned session only echoes `Access-Control-Allow-Origin` (and is thus PUT-able from a browser) when opened with the caller's origin. A trusted backend relaying a browser upload forwards the browser's `Origin` here. Omit for server/desktop uploads (no CORS enforcement). | [optional] -**crc32c** | **str** | | [optional] -**if_match** | **int** | | [optional] -**if_none_match** | **bool** | | [optional] [default to False] -**labels** | **List[str]** | | [optional] -**metadata** | **Dict[str, object]** | | [optional] -**path** | **str** | | -**size_bytes** | **int** | | -**source** | [**ArtifactSource**](ArtifactSource.md) | | [optional] - -## Example - -```python -from agentdrive_sdk.models.upload_begin_in import UploadBeginIn - -# TODO update the JSON string below -json = "{}" -# create an instance of UploadBeginIn from a JSON string -upload_begin_in_instance = UploadBeginIn.from_json(json) -# print the JSON string representation of the object -print(UploadBeginIn.to_json()) - -# convert the object into a dict -upload_begin_in_dict = upload_begin_in_instance.to_dict() -# create an instance of UploadBeginIn from a dict -upload_begin_in_from_dict = UploadBeginIn.from_dict(upload_begin_in_dict) -``` -[[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/sdk/python/docs/UploadBeginOut.md b/sdk/python/docs/UploadBeginOut.md deleted file mode 100644 index 005af33..0000000 --- a/sdk/python/docs/UploadBeginOut.md +++ /dev/null @@ -1,33 +0,0 @@ -# UploadBeginOut - -Response of `POST /v0/uploads`. PUT the bytes to `upload_url` (no auth header — the URL is the credential), then `POST .../commit`. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**expires_at** | **datetime** | | -**headers** | **Dict[str, str]** | | -**max_bytes** | **int** | | -**method** | **str** | | [optional] [default to 'PUT'] -**upload_id** | **str** | | -**upload_url** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.upload_begin_out import UploadBeginOut - -# TODO update the JSON string below -json = "{}" -# create an instance of UploadBeginOut from a JSON string -upload_begin_out_instance = UploadBeginOut.from_json(json) -# print the JSON string representation of the object -print(UploadBeginOut.to_json()) - -# convert the object into a dict -upload_begin_out_dict = upload_begin_out_instance.to_dict() -# create an instance of UploadBeginOut from a dict -upload_begin_out_from_dict = UploadBeginOut.from_dict(upload_begin_out_dict) -``` -[[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/sdk/python/docs/UploadStatusOut.md b/sdk/python/docs/UploadStatusOut.md deleted file mode 100644 index aeb9a80..0000000 --- a/sdk/python/docs/UploadStatusOut.md +++ /dev/null @@ -1,36 +0,0 @@ -# UploadStatusOut - -Response of `GET /v0/uploads/{upload_id}` — the live state of a direct-to-GCS upload session (large-upload-design.md §5). `state` is derived, not a stored column: * `initiated` — session open; PUT the bytes to the `upload_url`, then `POST /v0/uploads/{upload_id}/commit`. * `committed` — the bytes landed and the artifact was created (`committed_at` is set). * `aborted` — released via `DELETE /v0/uploads/{upload_id}`. * `expired` — past `expires_at` without a commit; the reservation is reclaimed by the GC sweep. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**committed_at** | **datetime** | | [optional] -**content_type** | **str** | | -**created_at** | **datetime** | | -**expires_at** | **datetime** | | -**max_bytes** | **int** | | -**path** | **str** | | -**size_bytes** | **int** | | -**state** | **str** | | -**upload_id** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.upload_status_out import UploadStatusOut - -# TODO update the JSON string below -json = "{}" -# create an instance of UploadStatusOut from a JSON string -upload_status_out_instance = UploadStatusOut.from_json(json) -# print the JSON string representation of the object -print(UploadStatusOut.to_json()) - -# convert the object into a dict -upload_status_out_dict = upload_status_out_instance.to_dict() -# create an instance of UploadStatusOut from a dict -upload_status_out_from_dict = UploadStatusOut.from_dict(upload_status_out_dict) -``` -[[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/sdk/python/docs/UsageCounterOut.md b/sdk/python/docs/UsageCounterOut.md deleted file mode 100644 index ece694e..0000000 --- a/sdk/python/docs/UsageCounterOut.md +++ /dev/null @@ -1,28 +0,0 @@ -# UsageCounterOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**limit** | **int** | | -**used** | **int** | | - -## Example - -```python -from agentdrive_sdk.models.usage_counter_out import UsageCounterOut - -# TODO update the JSON string below -json = "{}" -# create an instance of UsageCounterOut from a JSON string -usage_counter_out_instance = UsageCounterOut.from_json(json) -# print the JSON string representation of the object -print(UsageCounterOut.to_json()) - -# convert the object into a dict -usage_counter_out_dict = usage_counter_out_instance.to_dict() -# create an instance of UsageCounterOut from a dict -usage_counter_out_from_dict = UsageCounterOut.from_dict(usage_counter_out_dict) -``` -[[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/sdk/python/docs/UsagePeriodOut.md b/sdk/python/docs/UsagePeriodOut.md deleted file mode 100644 index 2503122..0000000 --- a/sdk/python/docs/UsagePeriodOut.md +++ /dev/null @@ -1,29 +0,0 @@ -# UsagePeriodOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ends** | **datetime** | | -**starts** | **datetime** | | -**year_month** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.usage_period_out import UsagePeriodOut - -# TODO update the JSON string below -json = "{}" -# create an instance of UsagePeriodOut from a JSON string -usage_period_out_instance = UsagePeriodOut.from_json(json) -# print the JSON string representation of the object -print(UsagePeriodOut.to_json()) - -# convert the object into a dict -usage_period_out_dict = usage_period_out_instance.to_dict() -# create an instance of UsagePeriodOut from a dict -usage_period_out_from_dict = UsagePeriodOut.from_dict(usage_period_out_dict) -``` -[[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/sdk/python/docs/UserTokenList.md b/sdk/python/docs/UserTokenList.md deleted file mode 100644 index 53bb076..0000000 --- a/sdk/python/docs/UserTokenList.md +++ /dev/null @@ -1,28 +0,0 @@ -# UserTokenList - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**items** | [**List[UserTokenOut]**](UserTokenOut.md) | | -**next_cursor** | **str** | | [optional] - -## Example - -```python -from agentdrive_sdk.models.user_token_list import UserTokenList - -# TODO update the JSON string below -json = "{}" -# create an instance of UserTokenList from a JSON string -user_token_list_instance = UserTokenList.from_json(json) -# print the JSON string representation of the object -print(UserTokenList.to_json()) - -# convert the object into a dict -user_token_list_dict = user_token_list_instance.to_dict() -# create an instance of UserTokenList from a dict -user_token_list_from_dict = UserTokenList.from_dict(user_token_list_dict) -``` -[[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/sdk/python/docs/UserTokenOut.md b/sdk/python/docs/UserTokenOut.md deleted file mode 100644 index 26abc52..0000000 --- a/sdk/python/docs/UserTokenOut.md +++ /dev/null @@ -1,36 +0,0 @@ -# UserTokenOut - -One `ad_user_` token — metadata only. The raw token is NEVER exposed over the API (minting is web-only, reveal-once); this shape omits both the raw value and the stored hash by construction. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | **datetime** | | -**default_drive_id** | **str** | | [optional] -**expires_at** | **datetime** | | [optional] -**id** | **str** | | -**label** | **str** | | [optional] -**last_used_at** | **datetime** | | [optional] -**prefix** | **str** | | -**revoked_at** | **datetime** | | [optional] -**scope** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.user_token_out import UserTokenOut - -# TODO update the JSON string below -json = "{}" -# create an instance of UserTokenOut from a JSON string -user_token_out_instance = UserTokenOut.from_json(json) -# print the JSON string representation of the object -print(UserTokenOut.to_json()) - -# convert the object into a dict -user_token_out_dict = user_token_out_instance.to_dict() -# create an instance of UserTokenOut from a dict -user_token_out_from_dict = UserTokenOut.from_dict(user_token_out_dict) -``` -[[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/sdk/python/docs/ValidationErrorBody.md b/sdk/python/docs/ValidationErrorBody.md deleted file mode 100644 index e071fb9..0000000 --- a/sdk/python/docs/ValidationErrorBody.md +++ /dev/null @@ -1,29 +0,0 @@ -# ValidationErrorBody - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | **str** | | -**fields** | [**List[ValidationIssue]**](ValidationIssue.md) | | -**message** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.validation_error_body import ValidationErrorBody - -# TODO update the JSON string below -json = "{}" -# create an instance of ValidationErrorBody from a JSON string -validation_error_body_instance = ValidationErrorBody.from_json(json) -# print the JSON string representation of the object -print(ValidationErrorBody.to_json()) - -# convert the object into a dict -validation_error_body_dict = validation_error_body_instance.to_dict() -# create an instance of ValidationErrorBody from a dict -validation_error_body_from_dict = ValidationErrorBody.from_dict(validation_error_body_dict) -``` -[[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/sdk/python/docs/ValidationErrorDetail.md b/sdk/python/docs/ValidationErrorDetail.md deleted file mode 100644 index a1d844f..0000000 --- a/sdk/python/docs/ValidationErrorDetail.md +++ /dev/null @@ -1,27 +0,0 @@ -# ValidationErrorDetail - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | [**ValidationErrorBody**](ValidationErrorBody.md) | | - -## Example - -```python -from agentdrive_sdk.models.validation_error_detail import ValidationErrorDetail - -# TODO update the JSON string below -json = "{}" -# create an instance of ValidationErrorDetail from a JSON string -validation_error_detail_instance = ValidationErrorDetail.from_json(json) -# print the JSON string representation of the object -print(ValidationErrorDetail.to_json()) - -# convert the object into a dict -validation_error_detail_dict = validation_error_detail_instance.to_dict() -# create an instance of ValidationErrorDetail from a dict -validation_error_detail_from_dict = ValidationErrorDetail.from_dict(validation_error_detail_dict) -``` -[[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/sdk/python/docs/ValidationErrorResponse.md b/sdk/python/docs/ValidationErrorResponse.md deleted file mode 100644 index 810ea06..0000000 --- a/sdk/python/docs/ValidationErrorResponse.md +++ /dev/null @@ -1,28 +0,0 @@ -# ValidationErrorResponse - -The runtime `VALIDATION_ERROR` response for request parsing failures. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**detail** | [**ValidationErrorDetail**](ValidationErrorDetail.md) | | - -## Example - -```python -from agentdrive_sdk.models.validation_error_response import ValidationErrorResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of ValidationErrorResponse from a JSON string -validation_error_response_instance = ValidationErrorResponse.from_json(json) -# print the JSON string representation of the object -print(ValidationErrorResponse.to_json()) - -# convert the object into a dict -validation_error_response_dict = validation_error_response_instance.to_dict() -# create an instance of ValidationErrorResponse from a dict -validation_error_response_from_dict = ValidationErrorResponse.from_dict(validation_error_response_dict) -``` -[[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/sdk/python/docs/ValidationIssue.md b/sdk/python/docs/ValidationIssue.md deleted file mode 100644 index 18feb10..0000000 --- a/sdk/python/docs/ValidationIssue.md +++ /dev/null @@ -1,32 +0,0 @@ -# ValidationIssue - -One Pydantic/FastAPI validation issue. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ctx** | **Dict[str, object]** | | [optional] -**input** | [**AnyOf**](AnyOf.md) | | [optional] -**loc** | [**List[LocInner]**](LocInner.md) | | -**msg** | **str** | | -**type** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.validation_issue import ValidationIssue - -# TODO update the JSON string below -json = "{}" -# create an instance of ValidationIssue from a JSON string -validation_issue_instance = ValidationIssue.from_json(json) -# print the JSON string representation of the object -print(ValidationIssue.to_json()) - -# convert the object into a dict -validation_issue_dict = validation_issue_instance.to_dict() -# create an instance of ValidationIssue from a dict -validation_issue_from_dict = ValidationIssue.from_dict(validation_issue_dict) -``` -[[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/sdk/python/docs/VersionOut.md b/sdk/python/docs/VersionOut.md deleted file mode 100644 index 295146f..0000000 --- a/sdk/python/docs/VersionOut.md +++ /dev/null @@ -1,34 +0,0 @@ -# VersionOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**actor_name** | **str** | | [optional] -**art_id** | **str** | | -**change_summary** | **str** | | [optional] -**content_type** | **str** | | -**created_at** | **datetime** | | -**hash** | **str** | | -**size_bytes** | **int** | | -**version_number** | **int** | | - -## Example - -```python -from agentdrive_sdk.models.version_out import VersionOut - -# TODO update the JSON string below -json = "{}" -# create an instance of VersionOut from a JSON string -version_out_instance = VersionOut.from_json(json) -# print the JSON string representation of the object -print(VersionOut.to_json()) - -# convert the object into a dict -version_out_dict = version_out_instance.to_dict() -# create an instance of VersionOut from a dict -version_out_from_dict = VersionOut.from_dict(version_out_dict) -``` -[[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/sdk/python/docs/VersionPage.md b/sdk/python/docs/VersionPage.md deleted file mode 100644 index a642043..0000000 --- a/sdk/python/docs/VersionPage.md +++ /dev/null @@ -1,29 +0,0 @@ -# VersionPage - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**items** | [**List[VersionOut]**](VersionOut.md) | | -**next_cursor** | **str** | | [optional] -**pruned_before** | **int** | | [optional] - -## Example - -```python -from agentdrive_sdk.models.version_page import VersionPage - -# TODO update the JSON string below -json = "{}" -# create an instance of VersionPage from a JSON string -version_page_instance = VersionPage.from_json(json) -# print the JSON string representation of the object -print(VersionPage.to_json()) - -# convert the object into a dict -version_page_dict = version_page_instance.to_dict() -# create an instance of VersionPage from a dict -version_page_from_dict = VersionPage.from_dict(version_page_dict) -``` -[[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/sdk/python/docs/VersionRetentionOut.md b/sdk/python/docs/VersionRetentionOut.md deleted file mode 100644 index 62f7313..0000000 --- a/sdk/python/docs/VersionRetentionOut.md +++ /dev/null @@ -1,27 +0,0 @@ -# VersionRetentionOut - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**versions_max** | **int** | | - -## Example - -```python -from agentdrive_sdk.models.version_retention_out import VersionRetentionOut - -# TODO update the JSON string below -json = "{}" -# create an instance of VersionRetentionOut from a JSON string -version_retention_out_instance = VersionRetentionOut.from_json(json) -# print the JSON string representation of the object -print(VersionRetentionOut.to_json()) - -# convert the object into a dict -version_retention_out_dict = version_retention_out_instance.to_dict() -# create an instance of VersionRetentionOut from a dict -version_retention_out_from_dict = VersionRetentionOut.from_dict(version_retention_out_dict) -``` -[[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/sdk/python/docs/WorkspaceCreateIn.md b/sdk/python/docs/WorkspaceCreateIn.md deleted file mode 100644 index 27499d0..0000000 --- a/sdk/python/docs/WorkspaceCreateIn.md +++ /dev/null @@ -1,28 +0,0 @@ -# WorkspaceCreateIn - -POST /v0/workspaces body. `name` is the user-facing workspace label; the creator becomes its admin and gets a starter drive. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.workspace_create_in import WorkspaceCreateIn - -# TODO update the JSON string below -json = "{}" -# create an instance of WorkspaceCreateIn from a JSON string -workspace_create_in_instance = WorkspaceCreateIn.from_json(json) -# print the JSON string representation of the object -print(WorkspaceCreateIn.to_json()) - -# convert the object into a dict -workspace_create_in_dict = workspace_create_in_instance.to_dict() -# create an instance of WorkspaceCreateIn from a dict -workspace_create_in_from_dict = WorkspaceCreateIn.from_dict(workspace_create_in_dict) -``` -[[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/sdk/python/docs/WorkspaceCreateOut.md b/sdk/python/docs/WorkspaceCreateOut.md deleted file mode 100644 index 21112b6..0000000 --- a/sdk/python/docs/WorkspaceCreateOut.md +++ /dev/null @@ -1,30 +0,0 @@ -# WorkspaceCreateOut - -POST /v0/workspaces response. Carries the new workspace + its starter drive's `ad_live_` key **once** (`starter_drive_api_key`) — reveal-once, store it now (mint more keys via `POST /v0/drives/{id}/keys`). - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**starter_drive_api_key** | **str** | | -**starter_drive_id** | **str** | | -**workspace** | [**WorkspaceOut**](WorkspaceOut.md) | | - -## Example - -```python -from agentdrive_sdk.models.workspace_create_out import WorkspaceCreateOut - -# TODO update the JSON string below -json = "{}" -# create an instance of WorkspaceCreateOut from a JSON string -workspace_create_out_instance = WorkspaceCreateOut.from_json(json) -# print the JSON string representation of the object -print(WorkspaceCreateOut.to_json()) - -# convert the object into a dict -workspace_create_out_dict = workspace_create_out_instance.to_dict() -# create an instance of WorkspaceCreateOut from a dict -workspace_create_out_from_dict = WorkspaceCreateOut.from_dict(workspace_create_out_dict) -``` -[[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/sdk/python/docs/WorkspaceList.md b/sdk/python/docs/WorkspaceList.md deleted file mode 100644 index a518fb4..0000000 --- a/sdk/python/docs/WorkspaceList.md +++ /dev/null @@ -1,28 +0,0 @@ -# WorkspaceList - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**items** | [**List[WorkspaceOut]**](WorkspaceOut.md) | | -**next_cursor** | **str** | | [optional] - -## Example - -```python -from agentdrive_sdk.models.workspace_list import WorkspaceList - -# TODO update the JSON string below -json = "{}" -# create an instance of WorkspaceList from a JSON string -workspace_list_instance = WorkspaceList.from_json(json) -# print the JSON string representation of the object -print(WorkspaceList.to_json()) - -# convert the object into a dict -workspace_list_dict = workspace_list_instance.to_dict() -# create an instance of WorkspaceList from a dict -workspace_list_from_dict = WorkspaceList.from_dict(workspace_list_dict) -``` -[[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/sdk/python/docs/WorkspaceOut.md b/sdk/python/docs/WorkspaceOut.md deleted file mode 100644 index 30c812b..0000000 --- a/sdk/python/docs/WorkspaceOut.md +++ /dev/null @@ -1,32 +0,0 @@ -# WorkspaceOut - -One workspace in a listing — metadata only. `role` is the CALLER's role in it (admin/member), so a client can render management affordances without a second round-trip. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | **datetime** | | -**id** | **str** | | -**name** | **str** | | -**role** | **str** | | -**tier_id** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.workspace_out import WorkspaceOut - -# TODO update the JSON string below -json = "{}" -# create an instance of WorkspaceOut from a JSON string -workspace_out_instance = WorkspaceOut.from_json(json) -# print the JSON string representation of the object -print(WorkspaceOut.to_json()) - -# convert the object into a dict -workspace_out_dict = workspace_out_instance.to_dict() -# create an instance of WorkspaceOut from a dict -workspace_out_from_dict = WorkspaceOut.from_dict(workspace_out_dict) -``` -[[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/sdk/python/docs/WorkspaceRenameIn.md b/sdk/python/docs/WorkspaceRenameIn.md deleted file mode 100644 index eeb3c07..0000000 --- a/sdk/python/docs/WorkspaceRenameIn.md +++ /dev/null @@ -1,28 +0,0 @@ -# WorkspaceRenameIn - -PATCH /v0/workspaces/{org} body — rename a workspace the caller administers. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | - -## Example - -```python -from agentdrive_sdk.models.workspace_rename_in import WorkspaceRenameIn - -# TODO update the JSON string below -json = "{}" -# create an instance of WorkspaceRenameIn from a JSON string -workspace_rename_in_instance = WorkspaceRenameIn.from_json(json) -# print the JSON string representation of the object -print(WorkspaceRenameIn.to_json()) - -# convert the object into a dict -workspace_rename_in_dict = workspace_rename_in_instance.to_dict() -# create an instance of WorkspaceRenameIn from a dict -workspace_rename_in_from_dict = WorkspaceRenameIn.from_dict(workspace_rename_in_dict) -``` -[[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/sdk/python/docs/WorkspacesApi.md b/sdk/python/docs/WorkspacesApi.md deleted file mode 100644 index fbb8db4..0000000 --- a/sdk/python/docs/WorkspacesApi.md +++ /dev/null @@ -1,270 +0,0 @@ -# agentdrive_sdk.WorkspacesApi - -All URIs are relative to *https://api.agentdrive.run* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_workspace_route_v0_workspaces_post**](WorkspacesApi.md#create_workspace_route_v0_workspaces_post) | **POST** /v0/workspaces | Create a new shared drive -[**list_workspaces_route_v0_workspaces_get**](WorkspacesApi.md#list_workspaces_route_v0_workspaces_get) | **GET** /v0/workspaces | List the spaces you belong to -[**rename_workspace_route_v0_workspaces_org_id_patch**](WorkspacesApi.md#rename_workspace_route_v0_workspaces_org_id_patch) | **PATCH** /v0/workspaces/{org_id} | Rename a shared drive you administer - - -# **create_workspace_route_v0_workspaces_post** -> WorkspaceCreateOut create_workspace_route_v0_workspaces_post(workspace_create_in) - -Create a new shared drive - -Create a new **shared drive** — a shared, multi-member space (the `workspaces` path is retained for API stability). You become its **admin** and get a starter drive; the starter drive's `ad_live_` key is returned **once** (`starter_drive_api_key`). - -A user may administer up to their plan's number of shared drives (workspaces-v2 §4.6). A caller at the limit is blocked with `403 WORKSPACE_LIMIT_REACHED`. Requires a `full`-scope user token. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.workspace_create_in import WorkspaceCreateIn -from agentdrive_sdk.models.workspace_create_out import WorkspaceCreateOut -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.WorkspacesApi(api_client) - workspace_create_in = agentdrive_sdk.WorkspaceCreateIn() # WorkspaceCreateIn | - - try: - # Create a new shared drive - api_response = api_instance.create_workspace_route_v0_workspaces_post(workspace_create_in) - print("The response of WorkspacesApi->create_workspace_route_v0_workspaces_post:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling WorkspacesApi->create_workspace_route_v0_workspaces_post: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **workspace_create_in** | [**WorkspaceCreateIn**](WorkspaceCreateIn.md)| | - -### Return type - -[**WorkspaceCreateOut**](WorkspaceCreateOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Successful Response | * Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -**400** | The workspace name or request is invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**409** | The workspace conflicts with an existing organization. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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_workspaces_route_v0_workspaces_get** -> WorkspaceList list_workspaces_route_v0_workspaces_get(cursor=cursor, limit=limit) - -List the spaces you belong to - -Return every space the caller is a member of, each carrying the caller's `role` in it. Metadata only. A `read`-scope token is sufficient. - -**Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.workspace_list import WorkspaceList -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.WorkspacesApi(api_client) - cursor = 'cursor_example' # str | (optional) - limit = 56 # int | (optional) - - try: - # List the spaces you belong to - api_response = api_instance.list_workspaces_route_v0_workspaces_get(cursor=cursor, limit=limit) - print("The response of WorkspacesApi->list_workspaces_route_v0_workspaces_get:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling WorkspacesApi->list_workspaces_route_v0_workspaces_get: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **cursor** | **str**| | [optional] - **limit** | **int**| | [optional] - -### Return type - -[**WorkspaceList**](WorkspaceList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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) - -# **rename_workspace_route_v0_workspaces_org_id_patch** -> WorkspaceOut rename_workspace_route_v0_workspaces_org_id_patch(org_id, workspace_rename_in) - -Rename a shared drive you administer - -Rename a shared drive. **Admin only** — one you don't administer (or aren't a member of) returns 404 (no-leak). Requires a `full`-scope user token. - -### Example - -* Bearer (ad_live_ | ad_user_ | JWT) Authentication (BearerAuth): - -```python -import agentdrive_sdk -from agentdrive_sdk.models.workspace_out import WorkspaceOut -from agentdrive_sdk.models.workspace_rename_in import WorkspaceRenameIn -from agentdrive_sdk.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.agentdrive.run -# See configuration.py for a list of all supported configuration parameters. -configuration = agentdrive_sdk.Configuration( - host = "https://api.agentdrive.run" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure Bearer authorization (ad_live_ | ad_user_ | JWT): BearerAuth -configuration = agentdrive_sdk.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with agentdrive_sdk.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = agentdrive_sdk.WorkspacesApi(api_client) - org_id = 'org_id_example' # str | - workspace_rename_in = agentdrive_sdk.WorkspaceRenameIn() # WorkspaceRenameIn | - - try: - # Rename a shared drive you administer - api_response = api_instance.rename_workspace_route_v0_workspaces_org_id_patch(org_id, workspace_rename_in) - print("The response of WorkspacesApi->rename_workspace_route_v0_workspaces_org_id_patch:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling WorkspacesApi->rename_workspace_route_v0_workspaces_org_id_patch: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **org_id** | **str**| | - **workspace_rename_in** | [**WorkspaceRenameIn**](WorkspaceRenameIn.md)| | - -### Return type - -[**WorkspaceOut**](WorkspaceOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -**400** | The workspace update is invalid. | * X-Request-Id - Request correlation identifier.
| -**401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -**403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -**404** | The workspace does not exist for this user. | * X-Request-Id - Request correlation identifier.
| -**422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -**429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[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/sdk/python/generated-contract-shape.json b/sdk/python/generated-contract-shape.json new file mode 100644 index 0000000..d7cdfbe --- /dev/null +++ b/sdk/python/generated-contract-shape.json @@ -0,0 +1,7313 @@ +{ + "contract": { + "operations": { + "artifacts_content": { + "method": "GET", + "operation_shape_sha256": "6a3bdb1060fbe5148e07d823267030aec6db3e46bcda7a161ffb20814ae0f6b1", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "path", + "name": "artifact_id", + "required": true, + "shape_sha256": "4eaebaafc9f5ea0046af75b23ef07ae2d108efbe3c617628f55827c7cfb8ca11" + }, + { + "in": "header", + "name": "If-None-Match", + "required": false, + "shape_sha256": "bd665fedccb7fd766d01eea2cee00920f1ec6f565638aa1f7848f1bb0d5d1d72" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/artifacts/{artifact_id}/content", + "request_body": { + "required": false, + "shape_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "responses": { + "200": { + "content": { + "application/octet-stream": "2db098654a77dbd75ff3dd3bda2aa4fec4c1bb261ed413634b61832152672d3e" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "1fcd3b99c0aaebf9bdac5704c7949ce3d768f22a25cf6372adf3509d5f1b33e1" + }, + "304": { + "content": {}, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "70da380dcd520292c697935ae8fc63229d13642567cd1c01aae4427a0230792e" + }, + "307": { + "content": {}, + "headers": { + "Location": "2865023577e05b2b89784ff001dffe858d8ea9d12ef423f7ef3122cbcad3a237", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "5d9e8ba21b906e80f1bd371fea562ac4f9cb681fd09dbc2bdeb2f6d016ceb7fd" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "artifacts_copy": { + "method": "POST", + "operation_shape_sha256": "bcb303b03d4e1165b681440ccab96188d6f200263851cb886d0c5c473ca68d87", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "path", + "name": "artifact_id", + "required": true, + "shape_sha256": "4eaebaafc9f5ea0046af75b23ef07ae2d108efbe3c617628f55827c7cfb8ca11" + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, + "shape_sha256": "2745cd74a8ab78fa1b4ccafb300d886e0041768d06dcde4793f43c4ae3f89f91" + }, + { + "in": "header", + "name": "If-Match", + "required": false, + "shape_sha256": "27004e5c74086e9343c9acc987562294d970a103f4bf4146fefc1c9f7214caf8" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/artifacts/{artifact_id}/copy", + "request_body": { + "required": true, + "shape_sha256": "0c39a2e1fe39da283194cee138ae197d83c6157f1ed6ee7cba7a05f0ecacab6c" + }, + "responses": { + "201": { + "content": { + "application/json": "66df264b043207e4b25431f574cae0990aee6a167b35a61cc59355b8f05b2541" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "Location": "2865023577e05b2b89784ff001dffe858d8ea9d12ef423f7ef3122cbcad3a237", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "9fae2eae18f711b54307b2587aebc93993e2b087b7557c6fb59d2b05c2d6d852" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "409": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "412": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "f8e59f1a6ffe6152f55133f9be56c3da4e2fa369fba80cc1739a61bbdb64ee22" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "428": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "artifacts_create": { + "method": "POST", + "operation_shape_sha256": "cffe24c2d66dc1a1f3c3bd57ec8d5958d3e9f65e37367112f5a29f0b87ca229f", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, + "shape_sha256": "2745cd74a8ab78fa1b4ccafb300d886e0041768d06dcde4793f43c4ae3f89f91" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/artifacts", + "request_body": { + "required": true, + "shape_sha256": "90b9208e361eb3d74f11936678028c0db03c0ba562f7178e0045d0c40c15a3af" + }, + "responses": { + "201": { + "content": { + "application/json": "66df264b043207e4b25431f574cae0990aee6a167b35a61cc59355b8f05b2541" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "Location": "2865023577e05b2b89784ff001dffe858d8ea9d12ef423f7ef3122cbcad3a237", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "9fae2eae18f711b54307b2587aebc93993e2b087b7557c6fb59d2b05c2d6d852" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "409": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "412": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "f8e59f1a6ffe6152f55133f9be56c3da4e2fa369fba80cc1739a61bbdb64ee22" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "428": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "artifacts_delete": { + "method": "DELETE", + "operation_shape_sha256": "4b9607de48593a04690b57aaf52fbf494b542ed76057af98b7b812ffd4139d29", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "path", + "name": "artifact_id", + "required": true, + "shape_sha256": "4eaebaafc9f5ea0046af75b23ef07ae2d108efbe3c617628f55827c7cfb8ca11" + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, + "shape_sha256": "2745cd74a8ab78fa1b4ccafb300d886e0041768d06dcde4793f43c4ae3f89f91" + }, + { + "in": "header", + "name": "If-Match", + "required": true, + "shape_sha256": "bcd9d159a500e840170c07541534331e1f11ae5141ad4e5a6740797b81d47e6e" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/artifacts/{artifact_id}", + "request_body": { + "required": false, + "shape_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "responses": { + "200": { + "content": { + "application/json": "66df264b043207e4b25431f574cae0990aee6a167b35a61cc59355b8f05b2541" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "35b304144f94a1ee4f22bf1d9557bf6135e17845d4987dca4d66381ba701db67" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "409": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "412": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "f8e59f1a6ffe6152f55133f9be56c3da4e2fa369fba80cc1739a61bbdb64ee22" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "428": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "artifacts_list": { + "method": "GET", + "operation_shape_sha256": "8f661b2ff030e654c19e927534943ca42a0694a432de0cd70e2f81a37ca01984", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "query", + "name": "lifecycle", + "required": false, + "shape_sha256": "cc49ade78bfafb927bbbf5e3aeb0edb7f4a76ae6a1f7b9f083b4f5f94caf3ea5" + }, + { + "in": "query", + "name": "limit", + "required": false, + "shape_sha256": "37043ff4c745a9c847cb50fa900250c6261157f083f9b32535a2dc24619aba36" + }, + { + "in": "query", + "name": "cursor", + "required": false, + "shape_sha256": "c0bfda03de20fa8de04cabccefa0a4874a1d22bb2523c8592f2f0d0659bebfe9" + }, + { + "in": "query", + "name": "parent_id", + "required": false, + "shape_sha256": "f4c5a4eb62a51cd187ae9bcd775dbbbb57d3c1c3366c5f040a8fe375eab4fbd1" + }, + { + "in": "query", + "name": "name", + "required": false, + "shape_sha256": "169b53953bbfdf42c497d4c22d7bdfcb2971b6d97c4a10ca791d7857e8218978" + }, + { + "in": "query", + "name": "content_type", + "required": false, + "shape_sha256": "fd4adfb8f18a3c2d16eaa21277a3d16681debc30be48736a23765ea42a74a119" + }, + { + "in": "query", + "name": "label", + "required": false, + "shape_sha256": "5a1f6503757d6cf01ad4e822b470cb73ddc0f4cbe501943f31afa90e8f0fa37d" + }, + { + "in": "query", + "name": "updated_after", + "required": false, + "shape_sha256": "107c95f2d15909f57d4b2db7e27be19cf0b32bcf53041b5ab67a062e9a739ada" + }, + { + "in": "query", + "name": "updated_before", + "required": false, + "shape_sha256": "03ab6b59edeed4a3509bc68bf0543fabd491f4c913fc4d0bdc45fc6cd82c3f8f" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/artifacts", + "request_body": { + "required": false, + "shape_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "responses": { + "200": { + "content": { + "application/json": "8f86dc1dc1d5ff185f1dca661e2a5b9765aeb1a00eab5ae5cae6dd88dd82c03e" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "a1e16363b5acb29c10b667f0cc9949e1f78295d2e34134d26a1bd5b63773627a" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "artifacts_read": { + "method": "GET", + "operation_shape_sha256": "b1029e299d2c16a391a4122da4c247e5e8945556f8bcaf05a86b6ab672f69d70", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "path", + "name": "artifact_id", + "required": true, + "shape_sha256": "4eaebaafc9f5ea0046af75b23ef07ae2d108efbe3c617628f55827c7cfb8ca11" + }, + { + "in": "header", + "name": "If-None-Match", + "required": false, + "shape_sha256": "bd665fedccb7fd766d01eea2cee00920f1ec6f565638aa1f7848f1bb0d5d1d72" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/artifacts/{artifact_id}", + "request_body": { + "required": false, + "shape_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "responses": { + "200": { + "content": { + "application/json": "66df264b043207e4b25431f574cae0990aee6a167b35a61cc59355b8f05b2541" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "35b304144f94a1ee4f22bf1d9557bf6135e17845d4987dca4d66381ba701db67" + }, + "304": { + "content": {}, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "70da380dcd520292c697935ae8fc63229d13642567cd1c01aae4427a0230792e" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "artifacts_restore": { + "method": "POST", + "operation_shape_sha256": "7ab604e2cb70d29fd2ac36a33c1c8462d8a1daca570b621a92d080fde53b36e8", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "path", + "name": "artifact_id", + "required": true, + "shape_sha256": "4eaebaafc9f5ea0046af75b23ef07ae2d108efbe3c617628f55827c7cfb8ca11" + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, + "shape_sha256": "2745cd74a8ab78fa1b4ccafb300d886e0041768d06dcde4793f43c4ae3f89f91" + }, + { + "in": "header", + "name": "If-Match", + "required": true, + "shape_sha256": "bcd9d159a500e840170c07541534331e1f11ae5141ad4e5a6740797b81d47e6e" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/artifacts/{artifact_id}/restore", + "request_body": { + "required": false, + "shape_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "responses": { + "200": { + "content": { + "application/json": "66df264b043207e4b25431f574cae0990aee6a167b35a61cc59355b8f05b2541" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "35b304144f94a1ee4f22bf1d9557bf6135e17845d4987dca4d66381ba701db67" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "409": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "412": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "f8e59f1a6ffe6152f55133f9be56c3da4e2fa369fba80cc1739a61bbdb64ee22" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "428": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "artifacts_update": { + "method": "PATCH", + "operation_shape_sha256": "3ed69e516b3d37c7f685ec5111b50822d5defbd6bcf22fefa82a7bf50cf45c0b", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "path", + "name": "artifact_id", + "required": true, + "shape_sha256": "4eaebaafc9f5ea0046af75b23ef07ae2d108efbe3c617628f55827c7cfb8ca11" + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, + "shape_sha256": "2745cd74a8ab78fa1b4ccafb300d886e0041768d06dcde4793f43c4ae3f89f91" + }, + { + "in": "header", + "name": "If-Match", + "required": true, + "shape_sha256": "bcd9d159a500e840170c07541534331e1f11ae5141ad4e5a6740797b81d47e6e" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/artifacts/{artifact_id}", + "request_body": { + "required": true, + "shape_sha256": "e67dfbb7ea264dcca442fd212d8d88043e7ff0a7833d79ef9b15c2260310715f" + }, + "responses": { + "200": { + "content": { + "application/json": "66df264b043207e4b25431f574cae0990aee6a167b35a61cc59355b8f05b2541" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "35b304144f94a1ee4f22bf1d9557bf6135e17845d4987dca4d66381ba701db67" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "409": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "412": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "f8e59f1a6ffe6152f55133f9be56c3da4e2fa369fba80cc1739a61bbdb64ee22" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "428": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "changes_list": { + "method": "GET", + "operation_shape_sha256": "04c00ac6bd464e5f0746ddfa598e5b45304a842ea4621b08a6c1675989dd2f8e", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "query", + "name": "limit", + "required": false, + "shape_sha256": "37043ff4c745a9c847cb50fa900250c6261157f083f9b32535a2dc24619aba36" + }, + { + "in": "query", + "name": "start", + "required": false, + "shape_sha256": "4f907ddbf9b221864b15fcffbc3aad185514700f2ac884876a1129277ab13045" + }, + { + "in": "query", + "name": "cursor", + "required": false, + "shape_sha256": "c0bfda03de20fa8de04cabccefa0a4874a1d22bb2523c8592f2f0d0659bebfe9" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/changes", + "request_body": { + "required": false, + "shape_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "responses": { + "200": { + "content": { + "application/json": "953609d08a2343480163eff6a52b918dbad2693d74e6d8e8981fb6c474b9aab0" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "803ccaea63371721634269d788dec52d61a4908c80b046c8265e15d75e271626" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "410": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "drive_search": { + "method": "GET", + "operation_shape_sha256": "f8aff2df33a9e1286eeaedfa24d5e90e4eeab2a3816f74f6376167eb5b093362", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "query", + "name": "q", + "required": true, + "shape_sha256": "7e63444218372445ea1c5c1d975d353cd89eabc9daaf0d9108de81cd3cdcd316" + }, + { + "in": "query", + "name": "mode", + "required": false, + "shape_sha256": "5f9c7b946eac879abaef0ef3fe97f2a210bf10046a30585f0384347667ae40f6" + }, + { + "in": "query", + "name": "limit", + "required": false, + "shape_sha256": "37043ff4c745a9c847cb50fa900250c6261157f083f9b32535a2dc24619aba36" + }, + { + "in": "query", + "name": "cursor", + "required": false, + "shape_sha256": "c0bfda03de20fa8de04cabccefa0a4874a1d22bb2523c8592f2f0d0659bebfe9" + }, + { + "in": "query", + "name": "parent_id", + "required": false, + "shape_sha256": "f4c5a4eb62a51cd187ae9bcd775dbbbb57d3c1c3366c5f040a8fe375eab4fbd1" + }, + { + "in": "query", + "name": "content_type", + "required": false, + "shape_sha256": "fd4adfb8f18a3c2d16eaa21277a3d16681debc30be48736a23765ea42a74a119" + }, + { + "in": "query", + "name": "label", + "required": false, + "shape_sha256": "5a1f6503757d6cf01ad4e822b470cb73ddc0f4cbe501943f31afa90e8f0fa37d" + }, + { + "in": "query", + "name": "updated_after", + "required": false, + "shape_sha256": "107c95f2d15909f57d4b2db7e27be19cf0b32bcf53041b5ab67a062e9a739ada" + }, + { + "in": "query", + "name": "updated_before", + "required": false, + "shape_sha256": "03ab6b59edeed4a3509bc68bf0543fabd491f4c913fc4d0bdc45fc6cd82c3f8f" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/search", + "request_body": { + "required": false, + "shape_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "responses": { + "200": { + "content": { + "application/json": "69ef06f7cf0736b4bcd116bb6a993cf7947277c9f4048f064e514e47b7dff6f4" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "42b3f957f4800ad372348b58eca1be04b37f37cbc1db5e6f1b7c6e48502d604e" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "drives_create": { + "method": "POST", + "operation_shape_sha256": "1e03b4dc1847e38fb9f0e5b825f12403128f758a999abfaad570188a7fe2900a", + "parameters": [ + { + "in": "header", + "name": "Idempotency-Key", + "required": true, + "shape_sha256": "2745cd74a8ab78fa1b4ccafb300d886e0041768d06dcde4793f43c4ae3f89f91" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives", + "request_body": { + "required": true, + "shape_sha256": "400c411de9ce66bb7e1972d164f2e8766b99749c1ba685fc3deda3df35eb551f" + }, + "responses": { + "201": { + "content": { + "application/json": "c5c569f02b80da0a7de39f3ebfe4ea2ddcf6e724297be20f22ae528e18770f38" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "Location": "2865023577e05b2b89784ff001dffe858d8ea9d12ef423f7ef3122cbcad3a237", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "2c25130d0affd3d65ca9f9b48fc3ccad5609d93440c769730330e3a35aae4544" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "409": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "412": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "f8e59f1a6ffe6152f55133f9be56c3da4e2fa369fba80cc1739a61bbdb64ee22" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "428": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "drives_delete": { + "method": "DELETE", + "operation_shape_sha256": "d217c3ea9d20b0155b4c73ca58d9a5de52f2070d89ad8099347541deab185a46", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, + "shape_sha256": "2745cd74a8ab78fa1b4ccafb300d886e0041768d06dcde4793f43c4ae3f89f91" + }, + { + "in": "header", + "name": "If-Match", + "required": true, + "shape_sha256": "bcd9d159a500e840170c07541534331e1f11ae5141ad4e5a6740797b81d47e6e" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}", + "request_body": { + "required": false, + "shape_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "responses": { + "200": { + "content": { + "application/json": "c5c569f02b80da0a7de39f3ebfe4ea2ddcf6e724297be20f22ae528e18770f38" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "cca3032789fa60bc8f6be7ba16ccee2662ab561240415d5cac74c2e6cd4da5f6" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "409": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "412": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "f8e59f1a6ffe6152f55133f9be56c3da4e2fa369fba80cc1739a61bbdb64ee22" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "428": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "drives_list": { + "method": "GET", + "operation_shape_sha256": "86e22b2eeb07d264b87e6e5fa4afd5e000398d28269a9911fecef58bd83624b2", + "parameters": [ + { + "in": "query", + "name": "lifecycle", + "required": false, + "shape_sha256": "cc49ade78bfafb927bbbf5e3aeb0edb7f4a76ae6a1f7b9f083b4f5f94caf3ea5" + }, + { + "in": "query", + "name": "limit", + "required": false, + "shape_sha256": "37043ff4c745a9c847cb50fa900250c6261157f083f9b32535a2dc24619aba36" + }, + { + "in": "query", + "name": "cursor", + "required": false, + "shape_sha256": "c0bfda03de20fa8de04cabccefa0a4874a1d22bb2523c8592f2f0d0659bebfe9" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives", + "request_body": { + "required": false, + "shape_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "responses": { + "200": { + "content": { + "application/json": "23e6ae618d8cc1069739dc9e26a0e43c056c03ce722be1e28db814c7a17da6a8" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "47078820cebc4f3ac7102a5f7b048b7ad010b87105d910787bed5f6decd9bfb5" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "drives_read": { + "method": "GET", + "operation_shape_sha256": "827e130f0d3e5bb47c0ca75745d3ed47e9cc787dab412647f8b1f847149b47b9", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "header", + "name": "If-None-Match", + "required": false, + "shape_sha256": "bd665fedccb7fd766d01eea2cee00920f1ec6f565638aa1f7848f1bb0d5d1d72" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}", + "request_body": { + "required": false, + "shape_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "responses": { + "200": { + "content": { + "application/json": "c5c569f02b80da0a7de39f3ebfe4ea2ddcf6e724297be20f22ae528e18770f38" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "cca3032789fa60bc8f6be7ba16ccee2662ab561240415d5cac74c2e6cd4da5f6" + }, + "304": { + "content": {}, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "70da380dcd520292c697935ae8fc63229d13642567cd1c01aae4427a0230792e" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "drives_restore": { + "method": "POST", + "operation_shape_sha256": "9c7ec98f7a474b32302fbcdded46c7920f8e068e8adf72c7126bd2516c65a840", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, + "shape_sha256": "2745cd74a8ab78fa1b4ccafb300d886e0041768d06dcde4793f43c4ae3f89f91" + }, + { + "in": "header", + "name": "If-Match", + "required": true, + "shape_sha256": "bcd9d159a500e840170c07541534331e1f11ae5141ad4e5a6740797b81d47e6e" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/restore", + "request_body": { + "required": false, + "shape_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "responses": { + "200": { + "content": { + "application/json": "c5c569f02b80da0a7de39f3ebfe4ea2ddcf6e724297be20f22ae528e18770f38" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "cca3032789fa60bc8f6be7ba16ccee2662ab561240415d5cac74c2e6cd4da5f6" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "409": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "412": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "f8e59f1a6ffe6152f55133f9be56c3da4e2fa369fba80cc1739a61bbdb64ee22" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "428": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "drives_update": { + "method": "PATCH", + "operation_shape_sha256": "c319acd98439f0e33a0efadb160bbaa9553f3f9cf752899db32723c068dfa94a", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, + "shape_sha256": "2745cd74a8ab78fa1b4ccafb300d886e0041768d06dcde4793f43c4ae3f89f91" + }, + { + "in": "header", + "name": "If-Match", + "required": true, + "shape_sha256": "bcd9d159a500e840170c07541534331e1f11ae5141ad4e5a6740797b81d47e6e" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}", + "request_body": { + "required": true, + "shape_sha256": "0dae648810a8626c2d1ee59909b04ae94fb7aec18333df7de2f0bcc09d97d337" + }, + "responses": { + "200": { + "content": { + "application/json": "c5c569f02b80da0a7de39f3ebfe4ea2ddcf6e724297be20f22ae528e18770f38" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "cca3032789fa60bc8f6be7ba16ccee2662ab561240415d5cac74c2e6cd4da5f6" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "409": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "412": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "f8e59f1a6ffe6152f55133f9be56c3da4e2fa369fba80cc1739a61bbdb64ee22" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "428": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "drives_usage": { + "method": "GET", + "operation_shape_sha256": "1d5cc301039350ffc7f667e696ceb5613d8be0d8ab173c2ef551ddfb96ca0b51", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/usage", + "request_body": { + "required": false, + "shape_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "responses": { + "200": { + "content": { + "application/json": "44586371d74306c94129a12222813de9dbf025cc1b8dc142105997939cee237a" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "8e4dd6796af8bd77d781111622fc9b89af5b6f73c7ccc2f8cf4832ca7d60a388" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "folders_copy": { + "method": "POST", + "operation_shape_sha256": "d340a28fcd900c4a5f588124f517ee16aada336ac60a809bfae74d1cba342424", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "path", + "name": "folder_id", + "required": true, + "shape_sha256": "582c38ae44a651ae351c706f98d9a3a264e4bcf0d221e7406dbd3b58f72b4bbf" + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, + "shape_sha256": "2745cd74a8ab78fa1b4ccafb300d886e0041768d06dcde4793f43c4ae3f89f91" + }, + { + "in": "header", + "name": "If-Match", + "required": false, + "shape_sha256": "27004e5c74086e9343c9acc987562294d970a103f4bf4146fefc1c9f7214caf8" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/folders/{folder_id}/copy", + "request_body": { + "required": true, + "shape_sha256": "3adf38760d07267882443476bd364a0cb1b839a311f102bbee5c8c5a6ea80438" + }, + "responses": { + "201": { + "content": { + "application/json": "7a382d7cb8de91e4067c59b6893b69998deab918795124a92b6ad8647f0c26b8" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "Location": "2865023577e05b2b89784ff001dffe858d8ea9d12ef423f7ef3122cbcad3a237", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "09834c2e90e74a81a8171a294e371d0f9b0c0a16a330106006cc9fe83bd79f63" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "409": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "412": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "f8e59f1a6ffe6152f55133f9be56c3da4e2fa369fba80cc1739a61bbdb64ee22" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "428": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "folders_create": { + "method": "POST", + "operation_shape_sha256": "ff2ffbf955e82551a5f5a2f4e333bd4705a49b91e7e29ab4ad311292ba4a4d2c", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, + "shape_sha256": "2745cd74a8ab78fa1b4ccafb300d886e0041768d06dcde4793f43c4ae3f89f91" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/folders", + "request_body": { + "required": true, + "shape_sha256": "f31bfc144a64873d7f00d13c4712c56add2390911958e8c3399daaedeac1a173" + }, + "responses": { + "201": { + "content": { + "application/json": "7a382d7cb8de91e4067c59b6893b69998deab918795124a92b6ad8647f0c26b8" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "Location": "2865023577e05b2b89784ff001dffe858d8ea9d12ef423f7ef3122cbcad3a237", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "09834c2e90e74a81a8171a294e371d0f9b0c0a16a330106006cc9fe83bd79f63" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "409": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "412": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "f8e59f1a6ffe6152f55133f9be56c3da4e2fa369fba80cc1739a61bbdb64ee22" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "428": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "folders_delete": { + "method": "DELETE", + "operation_shape_sha256": "3777ae85eec240c5d6db0c7f49db18112f67a7d17f8e84325b4dc2925cd31ee2", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "path", + "name": "folder_id", + "required": true, + "shape_sha256": "582c38ae44a651ae351c706f98d9a3a264e4bcf0d221e7406dbd3b58f72b4bbf" + }, + { + "in": "query", + "name": "recursive", + "required": false, + "shape_sha256": "ef78158d8779ec0ffd581cbed0cc044909d5baf5f8f5cdfc77e32af9ff698c8e" + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, + "shape_sha256": "2745cd74a8ab78fa1b4ccafb300d886e0041768d06dcde4793f43c4ae3f89f91" + }, + { + "in": "header", + "name": "If-Match", + "required": true, + "shape_sha256": "bcd9d159a500e840170c07541534331e1f11ae5141ad4e5a6740797b81d47e6e" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/folders/{folder_id}", + "request_body": { + "required": false, + "shape_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "responses": { + "200": { + "content": { + "application/json": "ce0fabc2d8631b635719304e150f5c1001d3c4a0662d75c8e02b369db44ac73b" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "bebd0c9eb0d66ccff4de51a6f1c2a986465e1e4290f1902f9e1c7c53c9f27cd3" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "409": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "412": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "f8e59f1a6ffe6152f55133f9be56c3da4e2fa369fba80cc1739a61bbdb64ee22" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "428": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "folders_list": { + "method": "GET", + "operation_shape_sha256": "c4324dd4b4d092c4468d0e126a2e34f6dea252c71984476819ab8ada551e03cf", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "query", + "name": "lifecycle", + "required": false, + "shape_sha256": "cc49ade78bfafb927bbbf5e3aeb0edb7f4a76ae6a1f7b9f083b4f5f94caf3ea5" + }, + { + "in": "query", + "name": "limit", + "required": false, + "shape_sha256": "37043ff4c745a9c847cb50fa900250c6261157f083f9b32535a2dc24619aba36" + }, + { + "in": "query", + "name": "cursor", + "required": false, + "shape_sha256": "c0bfda03de20fa8de04cabccefa0a4874a1d22bb2523c8592f2f0d0659bebfe9" + }, + { + "in": "query", + "name": "parent_id", + "required": false, + "shape_sha256": "f4c5a4eb62a51cd187ae9bcd775dbbbb57d3c1c3366c5f040a8fe375eab4fbd1" + }, + { + "in": "query", + "name": "name", + "required": false, + "shape_sha256": "169b53953bbfdf42c497d4c22d7bdfcb2971b6d97c4a10ca791d7857e8218978" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/folders", + "request_body": { + "required": false, + "shape_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "responses": { + "200": { + "content": { + "application/json": "ed3d70e833684027b278f4776bb1d4ba764bc095b6fa3c7d852c356e7b80653f" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "8e03aa901c1ea03fcdba20c9fc409c871cd699302bb813ac60d5df1144046fa5" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "folders_read": { + "method": "GET", + "operation_shape_sha256": "ada02cdcdab442f3c6d5c89ed84a73081a1e9e497bd1eaee0d500b08e7eabcfa", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "path", + "name": "folder_id", + "required": true, + "shape_sha256": "582c38ae44a651ae351c706f98d9a3a264e4bcf0d221e7406dbd3b58f72b4bbf" + }, + { + "in": "header", + "name": "If-None-Match", + "required": false, + "shape_sha256": "bd665fedccb7fd766d01eea2cee00920f1ec6f565638aa1f7848f1bb0d5d1d72" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/folders/{folder_id}", + "request_body": { + "required": false, + "shape_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "responses": { + "200": { + "content": { + "application/json": "7a382d7cb8de91e4067c59b6893b69998deab918795124a92b6ad8647f0c26b8" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b08eee97ead8fd50f7dc9aaf19933d476bbcc1cf6f8c4329db7fb6d098a13102" + }, + "304": { + "content": {}, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "70da380dcd520292c697935ae8fc63229d13642567cd1c01aae4427a0230792e" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "folders_restore": { + "method": "POST", + "operation_shape_sha256": "0349ae135ea1273b3ab9eee558049fb79c955ac5fe057c1982aa957ef6526ae1", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "path", + "name": "folder_id", + "required": true, + "shape_sha256": "582c38ae44a651ae351c706f98d9a3a264e4bcf0d221e7406dbd3b58f72b4bbf" + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, + "shape_sha256": "2745cd74a8ab78fa1b4ccafb300d886e0041768d06dcde4793f43c4ae3f89f91" + }, + { + "in": "header", + "name": "If-Match", + "required": true, + "shape_sha256": "bcd9d159a500e840170c07541534331e1f11ae5141ad4e5a6740797b81d47e6e" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/folders/{folder_id}/restore", + "request_body": { + "required": false, + "shape_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "responses": { + "200": { + "content": { + "application/json": "ce0fabc2d8631b635719304e150f5c1001d3c4a0662d75c8e02b369db44ac73b" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "bebd0c9eb0d66ccff4de51a6f1c2a986465e1e4290f1902f9e1c7c53c9f27cd3" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "409": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "412": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "f8e59f1a6ffe6152f55133f9be56c3da4e2fa369fba80cc1739a61bbdb64ee22" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "428": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "folders_update": { + "method": "PATCH", + "operation_shape_sha256": "05018aacb79247f8286bf1baa1c2528329293b19f014f5f42bb1085ee0bd1f8f", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "path", + "name": "folder_id", + "required": true, + "shape_sha256": "582c38ae44a651ae351c706f98d9a3a264e4bcf0d221e7406dbd3b58f72b4bbf" + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, + "shape_sha256": "2745cd74a8ab78fa1b4ccafb300d886e0041768d06dcde4793f43c4ae3f89f91" + }, + { + "in": "header", + "name": "If-Match", + "required": true, + "shape_sha256": "bcd9d159a500e840170c07541534331e1f11ae5141ad4e5a6740797b81d47e6e" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/folders/{folder_id}", + "request_body": { + "required": true, + "shape_sha256": "3b0817512c96594e8e4b2ea21543041e5587d57ef94b7a57432b629d16129cc8" + }, + "responses": { + "200": { + "content": { + "application/json": "7a382d7cb8de91e4067c59b6893b69998deab918795124a92b6ad8647f0c26b8" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b08eee97ead8fd50f7dc9aaf19933d476bbcc1cf6f8c4329db7fb6d098a13102" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "409": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "412": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "f8e59f1a6ffe6152f55133f9be56c3da4e2fa369fba80cc1739a61bbdb64ee22" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "428": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "grants_create": { + "method": "POST", + "operation_shape_sha256": "af4508cecabbae64e69de3193b37116c5fe70b6dede16baf2fe0ea6e584aac23", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, + "shape_sha256": "2745cd74a8ab78fa1b4ccafb300d886e0041768d06dcde4793f43c4ae3f89f91" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/grants", + "request_body": { + "required": true, + "shape_sha256": "8ca929e75dc2dd6c3c5d8c76abdbbd41bbb348911d3d967654b40044a5c5d16e" + }, + "responses": { + "201": { + "content": { + "application/json": "b638bfea942eb84bcfc5cc13f2d8b4b1a717de9133a9a7027daa1e1bfd36a41d" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "Location": "2865023577e05b2b89784ff001dffe858d8ea9d12ef423f7ef3122cbcad3a237", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "3c9b8f77a625ad4caefa09d47243699a1c7926764254e5dcfff9933127790a54" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "409": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "412": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "f8e59f1a6ffe6152f55133f9be56c3da4e2fa369fba80cc1739a61bbdb64ee22" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "428": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "grants_list": { + "method": "GET", + "operation_shape_sha256": "8a1e523a3cb9afba51f857ce923bdc4f7c156883222868fb2323b5c8543b540d", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "query", + "name": "lifecycle", + "required": false, + "shape_sha256": "cc49ade78bfafb927bbbf5e3aeb0edb7f4a76ae6a1f7b9f083b4f5f94caf3ea5" + }, + { + "in": "query", + "name": "limit", + "required": false, + "shape_sha256": "37043ff4c745a9c847cb50fa900250c6261157f083f9b32535a2dc24619aba36" + }, + { + "in": "query", + "name": "cursor", + "required": false, + "shape_sha256": "c0bfda03de20fa8de04cabccefa0a4874a1d22bb2523c8592f2f0d0659bebfe9" + }, + { + "in": "query", + "name": "resource_type", + "required": false, + "shape_sha256": "ae0af18b0b1e8991b6d6bfa9aa92d1cf9732d08f4c3edbc8d85ab5fe2d94287c" + }, + { + "in": "query", + "name": "resource_id", + "required": false, + "shape_sha256": "d1e90169e8f5a8de4839fda9dfdc4c9fcfa8ff06a9595b84487314bc17ea52f8" + }, + { + "in": "query", + "name": "principal_type", + "required": false, + "shape_sha256": "da36cbe1b9894b26f9be75e2bd14660d42c027118ac7f42d682b306ca0f98e03" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/grants", + "request_body": { + "required": false, + "shape_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "responses": { + "200": { + "content": { + "application/json": "c388692ee2b902fd4d1426a06ae6f4c5083bfbe704c7765f59b3c6e6ab84166b" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "6ef2b55cd88ccb2816bdb6277b0b9fc03aec6e4ed8106f2fc58d686d42bcb8fa" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "grants_read": { + "method": "GET", + "operation_shape_sha256": "4c19b3e95683f230819c53d534f1c8775213a6c0cbe27f9903f2948443cf0575", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "path", + "name": "grant_id", + "required": true, + "shape_sha256": "28be56eaa8399c0901be5423bc9fbb796e3184e3f8dd190470554fd762ea0a5c" + }, + { + "in": "header", + "name": "If-None-Match", + "required": false, + "shape_sha256": "bd665fedccb7fd766d01eea2cee00920f1ec6f565638aa1f7848f1bb0d5d1d72" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/grants/{grant_id}", + "request_body": { + "required": false, + "shape_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "responses": { + "200": { + "content": { + "application/json": "b638bfea942eb84bcfc5cc13f2d8b4b1a717de9133a9a7027daa1e1bfd36a41d" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "f7f900d6ac4e4ad9c33ccf0f244acbdf2affd0c87480088ac3f17cc5021bba51" + }, + "304": { + "content": {}, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "70da380dcd520292c697935ae8fc63229d13642567cd1c01aae4427a0230792e" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "grants_revoke": { + "method": "DELETE", + "operation_shape_sha256": "24a013eda8dd7f50863b930fc8bb22ff46155e76cfae8f5699515169489574ff", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "path", + "name": "grant_id", + "required": true, + "shape_sha256": "28be56eaa8399c0901be5423bc9fbb796e3184e3f8dd190470554fd762ea0a5c" + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, + "shape_sha256": "2745cd74a8ab78fa1b4ccafb300d886e0041768d06dcde4793f43c4ae3f89f91" + }, + { + "in": "header", + "name": "If-Match", + "required": true, + "shape_sha256": "bcd9d159a500e840170c07541534331e1f11ae5141ad4e5a6740797b81d47e6e" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/grants/{grant_id}", + "request_body": { + "required": false, + "shape_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "responses": { + "200": { + "content": { + "application/json": "b638bfea942eb84bcfc5cc13f2d8b4b1a717de9133a9a7027daa1e1bfd36a41d" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "f7f900d6ac4e4ad9c33ccf0f244acbdf2affd0c87480088ac3f17cc5021bba51" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "409": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "412": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "f8e59f1a6ffe6152f55133f9be56c3da4e2fa369fba80cc1739a61bbdb64ee22" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "428": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "grants_update": { + "method": "PATCH", + "operation_shape_sha256": "488e491b37ae8a537063209092d8ed19fd036aa9ba60423f7c83becc23c6eb9f", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "path", + "name": "grant_id", + "required": true, + "shape_sha256": "28be56eaa8399c0901be5423bc9fbb796e3184e3f8dd190470554fd762ea0a5c" + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, + "shape_sha256": "2745cd74a8ab78fa1b4ccafb300d886e0041768d06dcde4793f43c4ae3f89f91" + }, + { + "in": "header", + "name": "If-Match", + "required": true, + "shape_sha256": "bcd9d159a500e840170c07541534331e1f11ae5141ad4e5a6740797b81d47e6e" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/grants/{grant_id}", + "request_body": { + "required": true, + "shape_sha256": "7864870ae413273a70fcbe3e5e3fb4a2db1eba7469ed57a03f8b21b1d08667a4" + }, + "responses": { + "200": { + "content": { + "application/json": "b638bfea942eb84bcfc5cc13f2d8b4b1a717de9133a9a7027daa1e1bfd36a41d" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "f7f900d6ac4e4ad9c33ccf0f244acbdf2affd0c87480088ac3f17cc5021bba51" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "409": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "412": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "f8e59f1a6ffe6152f55133f9be56c3da4e2fa369fba80cc1739a61bbdb64ee22" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "428": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "health": { + "method": "GET", + "operation_shape_sha256": "8b259ae387cc99a77c9d055e814cf8c01d92946e053921f3eaf6a257e46f9f69", + "parameters": [], + "path": "/health", + "request_body": { + "required": false, + "shape_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "responses": { + "200": { + "content": { + "application/json": "37c6901c103020afdc6c323a6291427240bf6ff5b71838e6036f08d57de193be" + }, + "headers": {}, + "shape_sha256": "8b62d3c3f067f7fc28ef352d595c20f3b2e7216f68feea412187ce8e3dce0ecf" + }, + "503": { + "content": { + "application/json": "ac33ad203992de834c38a31412c22d9d2ef97f4e3c1d668bdc9b7cb997c63e71" + }, + "headers": {}, + "shape_sha256": "286a1260e1addfcb173593d2d6e6b441bbeae592767cb351715cb303e801d9e7" + } + } + }, + "oauth_protected_resource": { + "method": "GET", + "operation_shape_sha256": "0cd26c7f730c1c5cee889847c59a493a3d9b603ab5aad5a8bb9af73261a0101a", + "parameters": [], + "path": "/.well-known/oauth-protected-resource", + "request_body": { + "required": false, + "shape_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "responses": { + "200": { + "content": { + "application/json": "82ef96cebaf5fbe16269fd18b0240d78f5b9b90a4155a17eb797115b09148ecf" + }, + "headers": {}, + "shape_sha256": "f69f1a0c3b629e43df0954521727bb4c4d1f31d6e0e2b8730c3e95758d989d87" + } + } + }, + "shares_create": { + "method": "POST", + "operation_shape_sha256": "a68aff782c44fd008449a0f2caf38828396d25f0981d045ab151df4ad6ebaaf3", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, + "shape_sha256": "2745cd74a8ab78fa1b4ccafb300d886e0041768d06dcde4793f43c4ae3f89f91" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/shares", + "request_body": { + "required": true, + "shape_sha256": "f852cb97116f98dfe28a6f7d71d99d2ae7671111307a54a7e22a749d697195a3" + }, + "responses": { + "201": { + "content": { + "application/json": "35d598e40b9ec6c5767dc2e6a42d710c86ca3e7b49025fd692b8f0765478ff07" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "Location": "2865023577e05b2b89784ff001dffe858d8ea9d12ef423f7ef3122cbcad3a237", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b703b78cd989bdb11d4148855bca600b94c2605dac10027a6f219e4bb536b1e6" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "409": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "412": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "f8e59f1a6ffe6152f55133f9be56c3da4e2fa369fba80cc1739a61bbdb64ee22" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "428": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "shares_list": { + "method": "GET", + "operation_shape_sha256": "1ef1017fb6e2618fcdaaaed17bb36b43c75448784dd4355af385f78387e06363", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "query", + "name": "lifecycle", + "required": false, + "shape_sha256": "cc49ade78bfafb927bbbf5e3aeb0edb7f4a76ae6a1f7b9f083b4f5f94caf3ea5" + }, + { + "in": "query", + "name": "limit", + "required": false, + "shape_sha256": "37043ff4c745a9c847cb50fa900250c6261157f083f9b32535a2dc24619aba36" + }, + { + "in": "query", + "name": "cursor", + "required": false, + "shape_sha256": "c0bfda03de20fa8de04cabccefa0a4874a1d22bb2523c8592f2f0d0659bebfe9" + }, + { + "in": "query", + "name": "resource_type", + "required": false, + "shape_sha256": "ae0af18b0b1e8991b6d6bfa9aa92d1cf9732d08f4c3edbc8d85ab5fe2d94287c" + }, + { + "in": "query", + "name": "resource_id", + "required": false, + "shape_sha256": "d1e90169e8f5a8de4839fda9dfdc4c9fcfa8ff06a9595b84487314bc17ea52f8" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/shares", + "request_body": { + "required": false, + "shape_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "responses": { + "200": { + "content": { + "application/json": "f5cff0545fa9001336fc8f36e9843aa437c0db6438af1a96f206458bf0e6b89e" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "eec6bacf7cf92b61e5dc480e8e37bf49c0e397b0fbb60c352a07604c6854b576" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "shares_read": { + "method": "GET", + "operation_shape_sha256": "e17766a0ee545619706c328035d593447361edd532ec2b55b0db5d94593366ac", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "path", + "name": "share_id", + "required": true, + "shape_sha256": "5c1078831d09ec84c96835460403f1dd2d9619b2df2a330185ec887af937713d" + }, + { + "in": "header", + "name": "If-None-Match", + "required": false, + "shape_sha256": "bd665fedccb7fd766d01eea2cee00920f1ec6f565638aa1f7848f1bb0d5d1d72" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/shares/{share_id}", + "request_body": { + "required": false, + "shape_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "responses": { + "200": { + "content": { + "application/json": "6671f3b61c088bb09e67cea4b535f4e6a6c1b53f9d667813e4dca01bf146a159" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "d760474fb15eae5c5fba4f985a52e6a21703c9ffdef2419fb7149befe5670984" + }, + "304": { + "content": {}, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "70da380dcd520292c697935ae8fc63229d13642567cd1c01aae4427a0230792e" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "shares_redeem": { + "method": "GET", + "operation_shape_sha256": "217b1f48e960b565ac026dc08d6163777a43fa5427d3e9394b7eda6202995e97", + "parameters": [ + { + "in": "path", + "name": "share_key", + "required": true, + "shape_sha256": "4e19922431756fc5a864d12881d4db273bde5edea28f3160b88a01609121421e" + } + ], + "path": "/s/{share_key}", + "request_body": { + "required": false, + "shape_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "responses": { + "200": { + "content": { + "application/json": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "headers": {}, + "shape_sha256": "e5755b3b8daf438825fb79206b3f2b693df97a564763aa84604d490032a31890" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + } + } + }, + "shares_revoke": { + "method": "DELETE", + "operation_shape_sha256": "f2f2f41ee929bc41eb73b3dc9fd997fe4460189e1ff44a58047226aac47e835e", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "path", + "name": "share_id", + "required": true, + "shape_sha256": "5c1078831d09ec84c96835460403f1dd2d9619b2df2a330185ec887af937713d" + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, + "shape_sha256": "2745cd74a8ab78fa1b4ccafb300d886e0041768d06dcde4793f43c4ae3f89f91" + }, + { + "in": "header", + "name": "If-Match", + "required": true, + "shape_sha256": "bcd9d159a500e840170c07541534331e1f11ae5141ad4e5a6740797b81d47e6e" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/shares/{share_id}", + "request_body": { + "required": false, + "shape_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "responses": { + "200": { + "content": { + "application/json": "6671f3b61c088bb09e67cea4b535f4e6a6c1b53f9d667813e4dca01bf146a159" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "d760474fb15eae5c5fba4f985a52e6a21703c9ffdef2419fb7149befe5670984" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "409": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "412": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "f8e59f1a6ffe6152f55133f9be56c3da4e2fa369fba80cc1739a61bbdb64ee22" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "428": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "shares_rotate": { + "method": "POST", + "operation_shape_sha256": "9679d62d6d370a1a9795496892f4161d29f300f167f5cd05c31b0e1e87af1650", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "path", + "name": "share_id", + "required": true, + "shape_sha256": "5c1078831d09ec84c96835460403f1dd2d9619b2df2a330185ec887af937713d" + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, + "shape_sha256": "2745cd74a8ab78fa1b4ccafb300d886e0041768d06dcde4793f43c4ae3f89f91" + }, + { + "in": "header", + "name": "If-Match", + "required": true, + "shape_sha256": "bcd9d159a500e840170c07541534331e1f11ae5141ad4e5a6740797b81d47e6e" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/shares/{share_id}/rotate", + "request_body": { + "required": false, + "shape_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "responses": { + "200": { + "content": { + "application/json": "35d598e40b9ec6c5767dc2e6a42d710c86ca3e7b49025fd692b8f0765478ff07" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "7a88a17c59189077208bf49cb278ebd0c33c5c40a4e1d92a123906ccdb2c1605" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "409": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "412": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "f8e59f1a6ffe6152f55133f9be56c3da4e2fa369fba80cc1739a61bbdb64ee22" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "428": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "versions_append": { + "method": "POST", + "operation_shape_sha256": "dfa59557cb5026bc15fd46c0103027dfab16e7991ccacac92a5020d5bfeebc4e", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "path", + "name": "artifact_id", + "required": true, + "shape_sha256": "4eaebaafc9f5ea0046af75b23ef07ae2d108efbe3c617628f55827c7cfb8ca11" + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, + "shape_sha256": "2745cd74a8ab78fa1b4ccafb300d886e0041768d06dcde4793f43c4ae3f89f91" + }, + { + "in": "header", + "name": "If-Match", + "required": true, + "shape_sha256": "bcd9d159a500e840170c07541534331e1f11ae5141ad4e5a6740797b81d47e6e" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/artifacts/{artifact_id}/versions", + "request_body": { + "required": true, + "shape_sha256": "8b95d14cb08c04ea46b1c71ebc671def4c90a60679ec3a8eb273d238999339e3" + }, + "responses": { + "201": { + "content": { + "application/json": "210c1926e6533fa4434a8cfe3222d110792d7c19a28224e56fc2270171c31f78" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "Location": "2865023577e05b2b89784ff001dffe858d8ea9d12ef423f7ef3122cbcad3a237", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "c7c9d55b94df6d8f9e5e9800c497717d77bbd567f4975bf03290277ec46e6d6c" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "409": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "412": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "f8e59f1a6ffe6152f55133f9be56c3da4e2fa369fba80cc1739a61bbdb64ee22" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "428": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "versions_content": { + "method": "GET", + "operation_shape_sha256": "1370604590e344a4b68e4b2ed98f8bba4fd2b0040896c197e2605b5454c7f241", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "path", + "name": "artifact_id", + "required": true, + "shape_sha256": "4eaebaafc9f5ea0046af75b23ef07ae2d108efbe3c617628f55827c7cfb8ca11" + }, + { + "in": "path", + "name": "version_id", + "required": true, + "shape_sha256": "4179bd4c1968cd22745fa0e8c77aa66ec33ff4734463371c508fbac704bfc4ee" + }, + { + "in": "header", + "name": "If-None-Match", + "required": false, + "shape_sha256": "bd665fedccb7fd766d01eea2cee00920f1ec6f565638aa1f7848f1bb0d5d1d72" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}/content", + "request_body": { + "required": false, + "shape_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "responses": { + "200": { + "content": { + "application/octet-stream": "2db098654a77dbd75ff3dd3bda2aa4fec4c1bb261ed413634b61832152672d3e" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "1fcd3b99c0aaebf9bdac5704c7949ce3d768f22a25cf6372adf3509d5f1b33e1" + }, + "304": { + "content": {}, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "70da380dcd520292c697935ae8fc63229d13642567cd1c01aae4427a0230792e" + }, + "307": { + "content": {}, + "headers": { + "Location": "2865023577e05b2b89784ff001dffe858d8ea9d12ef423f7ef3122cbcad3a237", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "5d9e8ba21b906e80f1bd371fea562ac4f9cb681fd09dbc2bdeb2f6d016ceb7fd" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "versions_list": { + "method": "GET", + "operation_shape_sha256": "301981eec3e2f4c80de832aab45d07bef17d823726116da7e1ee8366eaf5410c", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "path", + "name": "artifact_id", + "required": true, + "shape_sha256": "4eaebaafc9f5ea0046af75b23ef07ae2d108efbe3c617628f55827c7cfb8ca11" + }, + { + "in": "query", + "name": "limit", + "required": false, + "shape_sha256": "37043ff4c745a9c847cb50fa900250c6261157f083f9b32535a2dc24619aba36" + }, + { + "in": "query", + "name": "cursor", + "required": false, + "shape_sha256": "c0bfda03de20fa8de04cabccefa0a4874a1d22bb2523c8592f2f0d0659bebfe9" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/artifacts/{artifact_id}/versions", + "request_body": { + "required": false, + "shape_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "responses": { + "200": { + "content": { + "application/json": "31cc021be575561f4e4bffd68c503022bbdab24ea3d3da6036d917dfad5bd464" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "317b2f30064793684aa4e9455050effb75b84f2087c8069030d47fee67425eff" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "versions_read": { + "method": "GET", + "operation_shape_sha256": "a86baf3085787f3ce486ea9c95ee5edf548b2c384f8a9e4623ba8701d8935364", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "path", + "name": "artifact_id", + "required": true, + "shape_sha256": "4eaebaafc9f5ea0046af75b23ef07ae2d108efbe3c617628f55827c7cfb8ca11" + }, + { + "in": "path", + "name": "version_id", + "required": true, + "shape_sha256": "4179bd4c1968cd22745fa0e8c77aa66ec33ff4734463371c508fbac704bfc4ee" + }, + { + "in": "header", + "name": "If-None-Match", + "required": false, + "shape_sha256": "bd665fedccb7fd766d01eea2cee00920f1ec6f565638aa1f7848f1bb0d5d1d72" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}", + "request_body": { + "required": false, + "shape_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "responses": { + "200": { + "content": { + "application/json": "0b430da65b415d9178e641965323952d38ee4fa651f01b8b181dc8e43baa808e" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "04502be1d6a0a6c1a413dd9e33dcbd3ba57244618740387394e742d10b53c4a4" + }, + "304": { + "content": {}, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "70da380dcd520292c697935ae8fc63229d13642567cd1c01aae4427a0230792e" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + }, + "versions_restore": { + "method": "POST", + "operation_shape_sha256": "1a76cfcceac45ed2e0f1f39910cd09c3bd6212bba73dddd36b2617c5f71b1b70", + "parameters": [ + { + "in": "path", + "name": "drive_id", + "required": true, + "shape_sha256": "2e0a7fb5d8f192edc1959c4fbfe26b60327a41cb8cd5977068bf69c5b2f70f09" + }, + { + "in": "path", + "name": "artifact_id", + "required": true, + "shape_sha256": "4eaebaafc9f5ea0046af75b23ef07ae2d108efbe3c617628f55827c7cfb8ca11" + }, + { + "in": "path", + "name": "version_id", + "required": true, + "shape_sha256": "4179bd4c1968cd22745fa0e8c77aa66ec33ff4734463371c508fbac704bfc4ee" + }, + { + "in": "header", + "name": "Idempotency-Key", + "required": true, + "shape_sha256": "2745cd74a8ab78fa1b4ccafb300d886e0041768d06dcde4793f43c4ae3f89f91" + }, + { + "in": "header", + "name": "If-Match", + "required": true, + "shape_sha256": "bcd9d159a500e840170c07541534331e1f11ae5141ad4e5a6740797b81d47e6e" + }, + { + "in": "header", + "name": "authorization", + "required": false, + "shape_sha256": "9affb5bbefd0de7eb8ae266208871a695abe3ea6b4c4268a0539218e333b686b" + } + ], + "path": "/v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}/restore", + "request_body": { + "required": false, + "shape_sha256": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a" + }, + "responses": { + "201": { + "content": { + "application/json": "210c1926e6533fa4434a8cfe3222d110792d7c19a28224e56fc2270171c31f78" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "Location": "2865023577e05b2b89784ff001dffe858d8ea9d12ef423f7ef3122cbcad3a237", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "c7c9d55b94df6d8f9e5e9800c497717d77bbd567f4975bf03290277ec46e6d6c" + }, + "400": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "401": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "WWW-Authenticate": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "b84639b4de99520f50fa35c9935ebcbdc1f98071fe2b2c7feacb917deea8bad7" + }, + "403": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "404": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "409": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "412": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "ETag": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "f8e59f1a6ffe6152f55133f9be56c3da4e2fa369fba80cc1739a61bbdb64ee22" + }, + "422": { + "content": { + "application/json": "2ae93a5b5103a68a4459125adcf7501be63d7ced29496103ee89255000dbce19" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "45e9a75dfe19c79d685e62c1aacb287ea12d278def2cd2c2c59f9fbc2628e95c" + }, + "428": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "651db3c8cdbb26c3e16c47ea533bab6c9ec718483eb5a46e774f1225552a97f5" + }, + "429": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + }, + "503": { + "content": { + "application/json": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53" + }, + "headers": { + "Retry-After": "763fac7c3c316c74b988abc5cb5df64f1671a89e73718da670053eb7aec7540a", + "X-Request-Id": "837abf4aaadf55acbcef9f15890c8bda32c44fce2e7d1cb2702918cdc7239285" + }, + "shape_sha256": "49952c4dfe7d9a177eff45d9f86fd470b324af701b9690fe6a893dca886da41b" + } + } + } + }, + "schemas": { + "ArtifactCopyIn": "e888770f7a8087fa0a0e41c9ebc9d4240dec795d718ebbc01cd3dfdf600fefa8", + "ArtifactListOut": "3d28769b801eeb305b57290a1867f6231cebb5e07d567a12945e643aa0505b47", + "ArtifactOut": "4911e512d3b5507b1ec122d10ee82419ceb9c994aba4f6f48ed5995aa3fc5319", + "ArtifactUpdateIn": "352c9c6315a5598563be5709e800cc5b7c4c7906590a500d3306456a2af821d4", + "ChangeActorOut": "acb9c34e923dc0891fbd46d43c89bab116f96da1244c6ffc7af5e1d742386e53", + "ChangeOut": "8f5f4d644f9079d869471da8d395030d3f4efaa35fa854e15f1311c21ee095de", + "ChangePageOut": "0e242ac13ed3fd262ffed93c2e45e65d20de8be56054e2ad9569a4cdeee6b712", + "ChangeResourceOut": "dff71d8a60ceb718d5f5afdaf3133ba3ad79d4be4d4a7508247793d1618d4d6a", + "DriveCreateIn": "d307ba96bb8d7799ae41189fbd0a906702fab9827303ef3d4444ab5b27b3f06d", + "DriveListOut": "fe51a2c0126398631b4e818c0edf657168e9cacb44a16f17cbee3d91e3dd959e", + "DriveOut": "a392c80237b50d708451cd0a4ab3dcfff3575cefa7aac2503233b15a4a1bda74", + "DriveUpdateIn": "9f91389da13ffa25fa91e703952590a6f9286a5cd0a9a657350d88ccc4333675", + "DriveUsageOut": "ec74a91efc2ab85de4256341848e18a2e8e05de18b364b0d45a1ab53b4b72602", + "ErrorResponse": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53", + "FolderCascadeOut": "d6d3ed2883d5717b5f9afb731505303c83353fb6a3e1deb41d2bda2c7ac02438", + "FolderCopyIn": "8541b54472910f3cc9b3e09594171a8a6b196e14653099b3722f8b91ad811c49", + "FolderCreateIn": "1c7e03a09469c1e07e9a2d6a4de01e28673c07e7526d06b3e45aad26216dccfe", + "FolderListOut": "335091bdac760f7bd4d6b551fedad8eb927c83805039b67cedeced351615ddfa", + "FolderOut": "8434ea01736458573a9831467c070210d1506e1825179fa9854dbcd03303a015", + "FolderUpdateIn": "17c3380ab0f827cb76e98dad648dadaba596485b27d66035b78dcc1e14c6a92c", + "GrantCreateIn": "bf176add83899b80a0cf83d6e7ca9122539458c51106a67cba94d048462ca171", + "GrantListOut": "442c2c8cd2e52d7acb7df03b447c9f76e45384a39a8ab144a1b1bf32cce8f241", + "GrantOut": "ec99c485808491c7a0abf15d81aa8dfbda892cf88b96831e8751d1babd8ddf3d", + "GrantUpdateIn": "ed5bf79f6184a3c8a3afc34b6a6ce3e1433dc29b71ccc28dbffb170d1c624a17", + "HealthDegradedDetail": "d506952244c930568e3d1eecb9c560f4b1e599cfb8b06564005641ce347ad1bd", + "HealthDegradedResponse": "1faa244a8d193457f26cba03b440b0e340f67be2497ae88cdbc4685d9382e5cb", + "HealthOut": "d1a8e4894a5cb122c057b19eaf9a08aeb5c056473ae12aae8ab28725ed3ae196", + "SearchHitOut": "e731677f008a8403819dba78da073be68652adb91b45a5f5bbc446e90fe20fa0", + "SearchPageOut": "8ffe8b68d6da5c59a7d7e77ea2dcacc89dfed17e5c604b8b3f5e489cd5287315", + "ShareCreateIn": "ed2c1a0247694ebfd8f59b4d592c44e468be6c91df6e7a97fd3ab899254f313d", + "ShareCreateOut": "fca4b90e27839235a37042987afa7f7a19e73e4614f1c0bbc667ff33df264759", + "ShareListOut": "da02494d07a62b1a7faf739cf656f08c74bcb34bfce7e55d520637cecf07a151", + "ShareOut": "76a41dc44eafb1d89ab22881e2ad336d82a3f6c3539b0dff37a8e71535d2f092", + "V0ErrorEnvelope": "8b962e613b2d6f8c90c814e80c28928f12d1ccc1a630705a4b641b1c583f1f53", + "ValidationErrorResponse": "80b9812cdef641860d80f61136d4ffbdc09031ff0169c6080cc0cc92a906b046", + "VersionCreatedOut": "8db51695327cb5855eeb1d74b4e9d3fe8c65ed6b1212b2a95d1c291a7c15a3b9", + "VersionListOut": "cacf615774d6b086596622485d6c489cbbfce2c41130225c60f40f299948ffed", + "VersionOut": "ad19bf4f273534746b95015ca877f1b46c7adcb326a015d704bb2a43850e900a" + }, + "shape_sha256": "710d76b3202158d65559c1d03bff694ace9dd40728406e21cb3d7722f4cbb7be" + }, + "contract_sha256": "dd8145c12035f5827e9056d40c0ae9e56f1892c98580f81d5f005007ef7a0f6a", + "format": 1, + "generated": { + "async_operations": { + "artifacts_content": { + "api_class": "ArtifactsApi", + "primary_signature": "async def artifacts_content(drive_id: StrictStr, artifact_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> bytes", + "surface_sha256": "2909ed6ade787b1dbc61f30bdf2dcd0a472750e3fb81cf0ca0a1d9cc6a91b97b" + }, + "artifacts_copy": { + "api_class": "ArtifactsApi", + "primary_signature": "async def artifacts_copy(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], artifact_copy_in: ArtifactCopyIn, if_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ArtifactOut", + "surface_sha256": "ebf8c724e49056123d230a1162352846ade05a926f10bdf9bf3f462a2405790c" + }, + "artifacts_create": { + "api_class": "ArtifactsApi", + "primary_signature": "async def artifacts_create(drive_id: StrictStr, idempotency_key: Optional[StrictStr], content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description='The artifact bytes.')], name: Annotated[StrictStr, Field(description='Artifact name.')], parent_id: Annotated[StrictStr, Field(description='Destination folder id (fld_*).')], authorization: Optional[StrictStr] = None, content_type: Annotated[Optional[StrictStr], Field(description='Declared media type.')] = None, metadata: Annotated[Optional[Dict[str, Any]], Field(description='Free-form JSON metadata.')] = None, sha256: Annotated[Optional[StrictStr], Field(description='Optional content sha256 for verification.')] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ArtifactOut", + "surface_sha256": "3cf4c4817b98c524dd8473f457795bc157a689f1308e547fc1bbe53db217c46c" + }, + "artifacts_delete": { + "api_class": "ArtifactsApi", + "primary_signature": "async def artifacts_delete(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ArtifactOut", + "surface_sha256": "cbf1f0aa03ce315dc624f3f67342fb4f33f8fbb8d5c8ea6e1d890ce2456bcf28" + }, + "artifacts_list": { + "api_class": "ArtifactsApi", + "primary_signature": "async def artifacts_list(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, parent_id: Optional[StrictStr] = None, name: Optional[StrictStr] = None, content_type: Optional[StrictStr] = None, label: Optional[StrictStr] = None, updated_after: Optional[datetime] = None, updated_before: Optional[datetime] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ArtifactListOut", + "surface_sha256": "282b7da3e94c1d01290aa47ed66d250e22cff1257e3b9b3fb4c66ab5960d346e" + }, + "artifacts_read": { + "api_class": "ArtifactsApi", + "primary_signature": "async def artifacts_read(drive_id: StrictStr, artifact_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ArtifactOut", + "surface_sha256": "c9b83972c31bd314af2f55388b4d9bca119b8e9b4b9924d9a4b543f093dc1679" + }, + "artifacts_restore": { + "api_class": "ArtifactsApi", + "primary_signature": "async def artifacts_restore(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ArtifactOut", + "surface_sha256": "9c1d6e780b04e19c3a1606f51198505d0d5542ffa2a0091411c2501ac1ffa4b4" + }, + "artifacts_update": { + "api_class": "ArtifactsApi", + "primary_signature": "async def artifacts_update(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], artifact_update_in: ArtifactUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ArtifactOut", + "surface_sha256": "34efeb0b6de0c2ba21ad77282970c92da9b015f2392f3a0c0ae01decbd64ea54" + }, + "changes_list": { + "api_class": "ChangesApi", + "primary_signature": "async def changes_list(drive_id: StrictStr, limit: Optional[StrictInt] = None, start: Optional[StrictStr] = None, cursor: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ChangePageOut", + "surface_sha256": "9f4ef1f5c5632f61b89b506bc2ce51732342acdd6da01dae1f8b187c0518409e" + }, + "drive_search": { + "api_class": "SearchApi", + "primary_signature": "async def drive_search(drive_id: StrictStr, q: Annotated[str, Field(min_length=1, strict=True)], mode: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, parent_id: Optional[StrictStr] = None, content_type: Optional[StrictStr] = None, label: Optional[StrictStr] = None, updated_after: Optional[datetime] = None, updated_before: Optional[datetime] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> SearchPageOut", + "surface_sha256": "bd5a8470ca971f0061f47f10aecef7f8968e92c0ea44abf71fe818b572c3772e" + }, + "drives_create": { + "api_class": "DrivesApi", + "primary_signature": "async def drives_create(idempotency_key: Optional[StrictStr], drive_create_in: DriveCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> DriveOut", + "surface_sha256": "b4e043015aabdace75d2acbcf2605dd17b7831e46cc3e6abc563318e5ea22eb1" + }, + "drives_delete": { + "api_class": "DrivesApi", + "primary_signature": "async def drives_delete(drive_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> DriveOut", + "surface_sha256": "f10f016c0496f1bca226a71caa3129afcb03e6a04a1a22cc9de1c5cad5ac3ed4" + }, + "drives_list": { + "api_class": "DrivesApi", + "primary_signature": "async def drives_list(lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> DriveListOut", + "surface_sha256": "215d193e783aa5a45ba1d5731923eb01464dca49cc03b3567e32a5962b2e6f97" + }, + "drives_read": { + "api_class": "DrivesApi", + "primary_signature": "async def drives_read(drive_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> DriveOut", + "surface_sha256": "00d5729a80092730ba0c8a64a38a03c5a8766b29c421403a43c617e629918564" + }, + "drives_restore": { + "api_class": "DrivesApi", + "primary_signature": "async def drives_restore(drive_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> DriveOut", + "surface_sha256": "af0901cd6c0a1501ec4d13a092dbd4b5a5dc03b30f0caddbd24cdf53ef98a528" + }, + "drives_update": { + "api_class": "DrivesApi", + "primary_signature": "async def drives_update(drive_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], drive_update_in: DriveUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> DriveOut", + "surface_sha256": "fadbc6c02ff942384541b6bc0c2464ae70932ef220bcabb7455697a50208da7d" + }, + "drives_usage": { + "api_class": "DrivesApi", + "primary_signature": "async def drives_usage(drive_id: StrictStr, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> DriveUsageOut", + "surface_sha256": "5db31aebe51abb319e8633e9e2b24e3c776df346f79b86dd1fe35e53d0098eb9" + }, + "folders_copy": { + "api_class": "FoldersApi", + "primary_signature": "async def folders_copy(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], folder_copy_in: FolderCopyIn, if_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> FolderOut", + "surface_sha256": "53bd0f16770c5e49544257b9f71a5d164ffcd541c82685673735abc0cff3e3b4" + }, + "folders_create": { + "api_class": "FoldersApi", + "primary_signature": "async def folders_create(drive_id: StrictStr, idempotency_key: Optional[StrictStr], folder_create_in: FolderCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> FolderOut", + "surface_sha256": "cad9264521f6291b2443bc7cc4b2f1aaf4d2b2711ea95483031744959f5bdb6d" + }, + "folders_delete": { + "api_class": "FoldersApi", + "primary_signature": "async def folders_delete(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], recursive: Optional[StrictBool] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> FolderCascadeOut", + "surface_sha256": "46f901c4e9d04603aba0a3189638b75de48956a565b45bb31cb2cdcacf1ec274" + }, + "folders_list": { + "api_class": "FoldersApi", + "primary_signature": "async def folders_list(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, parent_id: Optional[StrictStr] = None, name: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> FolderListOut", + "surface_sha256": "6bd11654631b995ad76c1c6720737ebed7e98dc6ba86cad479a7668815fa5711" + }, + "folders_read": { + "api_class": "FoldersApi", + "primary_signature": "async def folders_read(drive_id: StrictStr, folder_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> FolderOut", + "surface_sha256": "132e10460ef1e8a43fd26c5de3a30523f25292d4d9ad0242307488c8b4479c83" + }, + "folders_restore": { + "api_class": "FoldersApi", + "primary_signature": "async def folders_restore(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> FolderCascadeOut", + "surface_sha256": "0ba2a21f669bf3c1de6ff4bee6ae332dc4bb2c169874ef0a1f60f485fa3c7e77" + }, + "folders_update": { + "api_class": "FoldersApi", + "primary_signature": "async def folders_update(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], folder_update_in: FolderUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> FolderOut", + "surface_sha256": "2fb902710b1d2c53a89fa22c1ac1ee202d7023331bd0baa6941666124dba5946" + }, + "grants_create": { + "api_class": "GrantsApi", + "primary_signature": "async def grants_create(drive_id: StrictStr, idempotency_key: Optional[StrictStr], grant_create_in: GrantCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> GrantOut", + "surface_sha256": "9ce737fa24502ea6e2c289ec7e0d0980ad9f3d8daa4301c32c2caab37ced8670" + }, + "grants_list": { + "api_class": "GrantsApi", + "primary_signature": "async def grants_list(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, resource_type: Optional[StrictStr] = None, resource_id: Optional[StrictStr] = None, principal_type: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> GrantListOut", + "surface_sha256": "08df22937a1fd71635799eb7b127207e6b8ef07e61d49b8e5f597b7ee4df16f3" + }, + "grants_read": { + "api_class": "GrantsApi", + "primary_signature": "async def grants_read(drive_id: StrictStr, grant_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> GrantOut", + "surface_sha256": "6789a1a7e1461c7ea3ca3920af328c0d8f98ff1117b7c5966eab79e0685ef280" + }, + "grants_revoke": { + "api_class": "GrantsApi", + "primary_signature": "async def grants_revoke(drive_id: StrictStr, grant_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> GrantOut", + "surface_sha256": "cbc0addaec9b937367db781c5930f40269b2a1ab472d25f672bb18e42122b264" + }, + "grants_update": { + "api_class": "GrantsApi", + "primary_signature": "async def grants_update(drive_id: StrictStr, grant_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], grant_update_in: GrantUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> GrantOut", + "surface_sha256": "2fac08dc6be4c865fde2cddd2c8fc6eb0f8e438b0de60af392990dcdeb763b0c" + }, + "health": { + "api_class": "DefaultApi", + "primary_signature": "async def health(_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> HealthOut", + "surface_sha256": "3136c7dcee618b3ca05e89e6f963f7ce86d4168fc5912c201bc3c94ed10563ef" + }, + "oauth_protected_resource": { + "api_class": "DiscoveryApi", + "primary_signature": "async def oauth_protected_resource(_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> Dict[str, Optional[object]]", + "surface_sha256": "f2d08e22215e357eabd36845cd481634476d1c2cb7f3db9411c22a9ceaad3362" + }, + "shares_create": { + "api_class": "SharesApi", + "primary_signature": "async def shares_create(drive_id: StrictStr, idempotency_key: Optional[StrictStr], share_create_in: ShareCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ShareCreateOut", + "surface_sha256": "a439bc81e89dd14ffc8e9889a06eb31c1ed938c47c91ff9fb7e959394716291e" + }, + "shares_list": { + "api_class": "SharesApi", + "primary_signature": "async def shares_list(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, resource_type: Optional[StrictStr] = None, resource_id: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ShareListOut", + "surface_sha256": "39e8407251939c203113a34602cc7de70c8fec083208b5543a417240e18dd547" + }, + "shares_read": { + "api_class": "SharesApi", + "primary_signature": "async def shares_read(drive_id: StrictStr, share_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ShareOut", + "surface_sha256": "8e5f6fbbac17949b55453c590513db12f69c1fcd03ff8c3ff0444f87cf7a10d1" + }, + "shares_redeem": { + "api_class": "SharesRedemptionApi", + "primary_signature": "async def shares_redeem(share_key: StrictStr, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> object", + "surface_sha256": "8024f03ad7138078ca2adc607c312a2f33ccae898e61b387f8d0612a1b4ecbe6" + }, + "shares_revoke": { + "api_class": "SharesApi", + "primary_signature": "async def shares_revoke(drive_id: StrictStr, share_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ShareOut", + "surface_sha256": "7293e3eb38fa7fca976d2dd3624a880ea8fe08d4ecaa4438c6e8382434256da4" + }, + "shares_rotate": { + "api_class": "SharesApi", + "primary_signature": "async def shares_rotate(drive_id: StrictStr, share_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ShareCreateOut", + "surface_sha256": "81c2d726a67c16f8ac0edc73729693b843afcae6dde6a3c29e81aa528d166913" + }, + "versions_append": { + "api_class": "VersionsApi", + "primary_signature": "async def versions_append(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description='The artifact bytes.')], authorization: Optional[StrictStr] = None, content_type: Annotated[Optional[StrictStr], Field(description='Declared media type.')] = None, sha256: Annotated[Optional[StrictStr], Field(description='Optional content sha256 for verification.')] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> VersionCreatedOut", + "surface_sha256": "4d6a0f6eff746e9774d393b91f80048b3d7e9130f85bac395b0f855309192618" + }, + "versions_content": { + "api_class": "VersionsApi", + "primary_signature": "async def versions_content(drive_id: StrictStr, artifact_id: StrictStr, version_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> bytes", + "surface_sha256": "3629ea67285b22b20b5d9eb6b5488b31b8f97f569b311e466c44050e76e57eec" + }, + "versions_list": { + "api_class": "VersionsApi", + "primary_signature": "async def versions_list(drive_id: StrictStr, artifact_id: StrictStr, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> VersionListOut", + "surface_sha256": "69d18523cfecc8a6faf024d9736aef6636fb2054f2251607577174593c47969a" + }, + "versions_read": { + "api_class": "VersionsApi", + "primary_signature": "async def versions_read(drive_id: StrictStr, artifact_id: StrictStr, version_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> VersionOut", + "surface_sha256": "3780707ef417cd2a8d792bff436621138d815a58af80054e3299fb09b12781f5" + }, + "versions_restore": { + "api_class": "VersionsApi", + "primary_signature": "async def versions_restore(drive_id: StrictStr, artifact_id: StrictStr, version_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> VersionCreatedOut", + "surface_sha256": "3309da985357ee55da0fb99e48fbf331443dd4496966bc2f87d79db7231c275b" + } + }, + "models": { + "ArtifactCopyIn": { + "class_ast_sha256": "b71d85f516a18720c5f96ccf9cf4bf44e039e613b55b0ed7bde4b1f5932530df", + "fields": { + "destination_drive_id": { + "annotation": "Optional[Annotated[str, Field(strict=True)]]", + "default": "None", + "required": false + }, + "destination_name": { + "annotation": "Annotated[str, Field(min_length=1, strict=True, max_length=255)]", + "default": null, + "required": true + }, + "destination_parent_id": { + "annotation": "Annotated[str, Field(strict=True)]", + "default": null, + "required": true + }, + "version_id": { + "annotation": "Optional[Annotated[str, Field(strict=True)]]", + "default": "None", + "required": false + } + }, + "validators": { + "destination_drive_id_validate_regular_expression": "96bc9a65803cd7e7866c9ce03b3a6666d6d964a00edabe1fe8116b4a5e29fe27", + "destination_parent_id_validate_regular_expression": "263482ba1a5d992e3f0b608f8ca53acfd5102a41bf16ccf229aa96aa30cb0487", + "from_dict": "59caf2dbdb98f0c83222d1d7b01078f8c1e31d517b55999af7ffd36aa3016611", + "from_json": "85e21fc574940d3548d40cf4e5afd9ba416ac8ac1d0270f78ca8c416b89117e5", + "version_id_validate_regular_expression": "35cf6c9ae76a36412faddb5b29ab0a62420ba23ab4207dc028a8950d2903fd2a" + } + }, + "ArtifactListOut": { + "class_ast_sha256": "f494a3655806b803a6483455af31c271af134ef08968a237e19be5ac8653dc0b", + "fields": { + "items": { + "annotation": "List[ArtifactOut]", + "default": null, + "required": true + }, + "next_cursor": { + "annotation": "Optional[StrictStr]", + "default": null, + "required": true + } + }, + "validators": { + "from_dict": "1e01044904ae375e4c971b7deee52e0550d488631cd9da2f6a09a2ebc31ac7df", + "from_json": "7ee4d77fda26ccb870106d3aa59d44a12effa456966c5db0226cad8d0565b56b" + } + }, + "ArtifactOut": { + "class_ast_sha256": "d96c81b600af337d06b914032cbf5df0399dbf32204709ce08931fd3f6d97f63", + "fields": { + "content_preview": { + "annotation": "Optional[StrictStr]", + "default": null, + "required": true + }, + "content_type": { + "annotation": "Optional[StrictStr]", + "default": null, + "required": true + }, + "created_at": { + "annotation": "datetime", + "default": null, + "required": true + }, + "deleted_at": { + "annotation": "Optional[datetime]", + "default": null, + "required": true + }, + "drive_id": { + "annotation": "Annotated[str, Field(strict=True)]", + "default": null, + "required": true + }, + "effective_visibility": { + "annotation": "StrictStr", + "default": "Field(description=\"Server-computed exposure summary, resolved over the artifact's live grants, its folder ancestry (bounded by the nearest sealed folder), and the drive. 'public' when any live grant has principal_type 'public'; otherwise 'shared' when a live grant names a principal other than the drive's creator; otherwise 'private'. Describes exposure, NOT the caller's own access.\")", + "required": true + }, + "head_version_id": { + "annotation": "Optional[StrictStr]", + "default": null, + "required": true + }, + "id": { + "annotation": "Annotated[str, Field(strict=True)]", + "default": null, + "required": true + }, + "labels": { + "annotation": "List[StrictStr]", + "default": null, + "required": true + }, + "metadata": { + "annotation": "Dict[str, Any]", + "default": null, + "required": true + }, + "name": { + "annotation": "StrictStr", + "default": null, + "required": true + }, + "parent_id": { + "annotation": "Annotated[str, Field(strict=True)]", + "default": null, + "required": true + }, + "revision": { + "annotation": "Annotated[str, Field(strict=True)]", + "default": null, + "required": true + }, + "state": { + "annotation": "StrictStr", + "default": null, + "required": true + }, + "updated_at": { + "annotation": "datetime", + "default": null, + "required": true + } + }, + "validators": { + "drive_id_validate_regular_expression": "7885f6c85fd6008d3dff9a64f8e5433feeca15f98a996b6513b0a269f8923e8f", + "from_dict": "adf7da7eddf60b028178c98a0a81ca1e7ec8fca1669f3aa669002106e63ec369", + "from_json": "213312c46fb2a9af4b2ca4268fa649ad89ccc069147e19891372d6f8d0eb2a64", + "id_validate_regular_expression": "b53449d29cd59cc9e092a9ad29e13e9db7021f7c23b2fa5165fba95712cb5177", + "parent_id_validate_regular_expression": "0584b5479f367e27a03047da96291ce2ed1f8f6d7f19cbf92cc09e471c07573f", + "revision_validate_regular_expression": "237580f3f1be93fcd8f003eac9f9f611e8c189ca83febf1b6cda12501420c9ea" + } + }, + "ArtifactUpdateIn": { + "class_ast_sha256": "36e1f982669cecb95df1f812c18e1ff344163cdc522d92719f5071b168f2eab8", + "fields": { + "labels": { + "annotation": "Optional[List[StrictStr]]", + "default": "None", + "required": false + }, + "metadata": { + "annotation": "Optional[Dict[str, Any]]", + "default": "None", + "required": false + }, + "name": { + "annotation": "Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]]", + "default": "None", + "required": false + }, + "parent_id": { + "annotation": "Optional[Annotated[str, Field(strict=True)]]", + "default": "None", + "required": false + } + }, + "validators": { + "from_dict": "59caf2dbdb98f0c83222d1d7b01078f8c1e31d517b55999af7ffd36aa3016611", + "from_json": "49024ed67cb583380631047efcbb45b2a3d306f7ef4c9daad2b9a66ce64a3bea", + "parent_id_validate_regular_expression": "77cda59612c726531ced93fc7bfcb5eb4265033785d0a4d09f9be736ca31abf0" + } + }, + "ChangeActorOut": { + "class_ast_sha256": "c7d24a65eaa2d702b3d97fc2cbb932ff44438b8b1eb25333fd7b50e82df729fe", + "fields": { + "id": { + "annotation": "Optional[StrictStr]", + "default": null, + "required": true + }, + "type": { + "annotation": "StrictStr", + "default": null, + "required": true + } + }, + "validators": { + "from_dict": "58ea161d5791ecc19a08adb9ffbadaf0d6034f66bfdbd2ecca15b649c2cf9af7", + "from_json": "34b6daa9f2da6313f6e78061e42deb7d3982baaf2391133bc25bc652f34abf13" + } + }, + "ChangeOut": { + "class_ast_sha256": "849ac3a091d15e4c7487a3beceb4149e5d3e14ab711ea9fae3bb2ee1eb9e64b2", + "fields": { + "actor": { + "annotation": "ChangeActorOut", + "default": null, + "required": true + }, + "change_set_id": { + "annotation": "StrictStr", + "default": null, + "required": true + }, + "data": { + "annotation": "Dict[str, Any]", + "default": null, + "required": true + }, + "drive_id": { + "annotation": "Annotated[str, Field(strict=True)]", + "default": null, + "required": true + }, + "id": { + "annotation": "Annotated[str, Field(strict=True)]", + "default": null, + "required": true + }, + "occurred_at": { + "annotation": "datetime", + "default": null, + "required": true + }, + "previous_revision": { + "annotation": "Optional[StrictStr]", + "default": null, + "required": true + }, + "resource": { + "annotation": "ChangeResourceOut", + "default": null, + "required": true + }, + "revision": { + "annotation": "Optional[StrictStr]", + "default": null, + "required": true + }, + "type": { + "annotation": "StrictStr", + "default": null, + "required": true + } + }, + "validators": { + "drive_id_validate_regular_expression": "7885f6c85fd6008d3dff9a64f8e5433feeca15f98a996b6513b0a269f8923e8f", + "from_dict": "3e52391fe1783bd55efb1015948e9b2d3d6ca19569c528085aba8c9bd8a1b600", + "from_json": "2392047dbdff46c84d1d8635d101972a5f6599c26b5b4cc350b3359b6091dc2b", + "id_validate_regular_expression": "6c26960fd8f960f747bbcc2ff52d0d60a8e0a9855a9aaa038244706b2547326d" + } + }, + "ChangePageOut": { + "class_ast_sha256": "3af9ddf8309151a7d25a56b6949193d4e631f97c7dfba8a6e9fdf2472150e7b4", + "fields": { + "has_more": { + "annotation": "StrictBool", + "default": null, + "required": true + }, + "items": { + "annotation": "List[ChangeOut]", + "default": null, + "required": true + }, + "next_cursor": { + "annotation": "StrictStr", + "default": null, + "required": true + } + }, + "validators": { + "from_dict": "7cf64e62e3a82acc550f34edff72c17f8df2ca34351953a6a216a557525e7007", + "from_json": "0e492a40ccb29d356f4e7aaba82210ca3a1f9faa3fd1650d2fed67bb7564a86d" + } + }, + "ChangeResourceOut": { + "class_ast_sha256": "094291efa5b8f0ab642457c5b6b65d2dcae82121550c7bcecad8083a8db14abd", + "fields": { + "id": { + "annotation": "StrictStr", + "default": null, + "required": true + }, + "type": { + "annotation": "StrictStr", + "default": null, + "required": true + } + }, + "validators": { + "from_dict": "045db9b77908e6188bb5c3e24912f95ac0411914f4e74f25252c63f6bff0dfbd", + "from_json": "b47eb2a9da862a22fb4b5d42a00addc45ec19d42e4ea24dfe30631d62a32edfd" + } + }, + "DriveCreateIn": { + "class_ast_sha256": "4243489cd1f2bf4d968f5f5ddcfebea726fcc469d0f0364737921493bbcca48c", + "fields": { + "metadata": { + "annotation": "Dict[str, Any]", + "default": "None", + "required": false + }, + "name": { + "annotation": "Annotated[str, Field(min_length=1, strict=True)]", + "default": null, + "required": true + } + }, + "validators": { + "from_dict": "59caf2dbdb98f0c83222d1d7b01078f8c1e31d517b55999af7ffd36aa3016611", + "from_json": "40b0d79307ff7960b74d16c8fe458daf2e6be5ba4f7715bff5d4e2fc39296102" + } + }, + "DriveListOut": { + "class_ast_sha256": "08df6ef8e530a37eeec6d22c73e201d419cd9887eaad305c42946d1b93537137", + "fields": { + "items": { + "annotation": "List[DriveOut]", + "default": null, + "required": true + }, + "next_cursor": { + "annotation": "Optional[StrictStr]", + "default": null, + "required": true + } + }, + "validators": { + "from_dict": "fdd4c82b4d5a09960a734d3cfd3c40f44e0fcd84fd56e1654ba4dbf41ba9990d", + "from_json": "df63f8efc9b948e6b65a749838949c3a6aa3f691c7c69cf857c5b18dcea9d12d" + } + }, + "DriveOut": { + "class_ast_sha256": "385685fbf91289608c54a1fb3f6d46a289893730aba74e1fb926861f608bd2de", + "fields": { + "created_at": { + "annotation": "datetime", + "default": null, + "required": true + }, + "created_by": { + "annotation": "Optional[StrictStr]", + "default": null, + "required": true + }, + "deleted_at": { + "annotation": "Optional[datetime]", + "default": null, + "required": true + }, + "id": { + "annotation": "Annotated[str, Field(strict=True)]", + "default": null, + "required": true + }, + "metadata": { + "annotation": "Dict[str, Any]", + "default": null, + "required": true + }, + "name": { + "annotation": "StrictStr", + "default": null, + "required": true + }, + "retrieval_bytes": { + "annotation": "StrictInt", + "default": null, + "required": true + }, + "revision": { + "annotation": "Annotated[str, Field(strict=True)]", + "default": null, + "required": true + }, + "root_folder_id": { + "annotation": "StrictStr", + "default": null, + "required": true + }, + "state": { + "annotation": "StrictStr", + "default": null, + "required": true + }, + "storage_bytes": { + "annotation": "StrictInt", + "default": null, + "required": true + }, + "updated_at": { + "annotation": "datetime", + "default": null, + "required": true + }, + "workspace_id": { + "annotation": "StrictStr", + "default": null, + "required": true + } + }, + "validators": { + "from_dict": "717a20bbd082de55dd1bf1f6c69616e8628d6b21feb8e453bcc50ec9e46258f0", + "from_json": "a901a700b5e0db0c81411ec644fc0d5bbf4fb02df07576deda23c2b690897e3d", + "id_validate_regular_expression": "80edba3e79f1c60a187ce887da76c050ccdadea89cf504d702ee7bf92d904934", + "revision_validate_regular_expression": "237580f3f1be93fcd8f003eac9f9f611e8c189ca83febf1b6cda12501420c9ea" + } + }, + "DriveUpdateIn": { + "class_ast_sha256": "8a14015cd6245b562c377c05838018f570044a8cccc2bd429a9ee40195dd013a", + "fields": { + "metadata": { + "annotation": "Optional[Dict[str, Any]]", + "default": "None", + "required": false + }, + "name": { + "annotation": "Optional[Annotated[str, Field(min_length=1, strict=True)]]", + "default": "None", + "required": false + } + }, + "validators": { + "from_dict": "59caf2dbdb98f0c83222d1d7b01078f8c1e31d517b55999af7ffd36aa3016611", + "from_json": "fd2928030909e7d47a98528aac115ff4e9760fdb21cae239cf05370e33e436e6" + } + }, + "DriveUsageOut": { + "class_ast_sha256": "dd0438d325fa3b526640b2d47ece36431b6c42136dfe154b64998c8aaf453a3c", + "fields": { + "retrieval_bytes": { + "annotation": "StrictInt", + "default": null, + "required": true + }, + "storage_bytes": { + "annotation": "StrictInt", + "default": null, + "required": true + } + }, + "validators": { + "from_dict": "6c18e956a8e9ff6f940bb8811c1b3ab7b1fd2ea1aa8d3b9e312d56980b888ff3", + "from_json": "4565a3176eba3a10f7a25f044285612c5bb82c50783563addef5cd5d379cf04d" + } + }, + "DrivesCreate400Response": { + "class_ast_sha256": "30e76ddf57703ebe9f72b165464feb35efb82c5a7e488af69ba12763407fbc75", + "fields": { + "error": { + "annotation": "DrivesCreate400ResponseError", + "default": null, + "required": true + } + }, + "validators": { + "from_dict": "c35a943d718aad91c9ba3544edb433a6801a9f89a302aa6da1cc3b74c5e86634", + "from_json": "770b862f3556ff1b4bc67a0a22c5ef20ecb281c4c154a244cbdca228b3ac5049" + } + }, + "DrivesCreate400ResponseError": { + "class_ast_sha256": "3ab3f99c2ccb847a370e7cbb30b7f4a1c162d278de1e7923ae26de7f50490f3a", + "fields": { + "additional_properties": { + "annotation": "Dict[str, Any]", + "default": "{}", + "required": false + }, + "code": { + "annotation": "StrictStr", + "default": "Field(description='Stable machine-readable error code (see the error-catalog).')", + "required": true + }, + "details": { + "annotation": "Optional[Dict[str, Any]]", + "default": "Field(default=None, description='Error-code-specific context (optional).')", + "required": false + }, + "message": { + "annotation": "StrictStr", + "default": null, + "required": true + } + }, + "validators": { + "from_dict": "5e76b2ec79eafc385473753a54410f455a399cc41dbf443d2df7f70cb266dba1", + "from_json": "9e524b72f04f8d34d51f64964395ed6ede40a3b66e9c708c62f2dc5c06403616" + } + }, + "DrivesList400Response": { + "class_ast_sha256": "c238761ddb23e2b97406911f0dda60ba80fd660a254f7587e149e1d3aa5f8443", + "fields": { + "error": { + "annotation": "DrivesList400ResponseError", + "default": null, + "required": true + } + }, + "validators": { + "from_dict": "1251383f1d079f8703cf38703b26876f5f1554dde3fdb597c0396433a608be47", + "from_json": "9a3e695e333dc66021dafd1e0b90dd993cc455a65d640b2ea32560b8367cb9ab" + } + }, + "DrivesList400ResponseError": { + "class_ast_sha256": "e036d49a5479718baa2c6bb3d622e7868ad3e9a754f03a4dcb7340b8c13ab6d2", + "fields": { + "additional_properties": { + "annotation": "Dict[str, Any]", + "default": "{}", + "required": false + }, + "code": { + "annotation": "StrictStr", + "default": "Field(description='Stable machine-readable error code (see the error-catalog).')", + "required": true + }, + "details": { + "annotation": "Optional[Dict[str, Any]]", + "default": "Field(default=None, description='Error-code-specific context (optional).')", + "required": false + }, + "message": { + "annotation": "Optional[StrictStr]", + "default": null, + "required": true + } + }, + "validators": { + "from_dict": "1e7c01d812bd25be745202751f810ef67cf7e063f65a64e765e6f0f5982b2461", + "from_json": "2415323a128b15421c2d1956bee4a20c51328959ca76d51f1e53b9260a4508c5" + } + }, + "ErrorResponse": { + "class_ast_sha256": "37f2d8d9c2a5c6fbb93496bb84440a51639a575c75275709b0c07422f0e17ed1", + "fields": { + "error": { + "annotation": "DrivesCreate400ResponseError", + "default": null, + "required": true + } + }, + "validators": { + "from_dict": "978daa91eaeeafcd7f911841913e06d264195843c886891d6cb5c7a8305a347d", + "from_json": "3db08658a77c5094ec1423d2766a24ca441ed84288032506965a8725c6865290" + } + }, + "FolderCascadeOut": { + "class_ast_sha256": "bbf2a8b58376bfd973801d98090eaf80ca6193d25652df466f67773c05121f7f", + "fields": { + "cascade": { + "annotation": "Dict[str, StrictInt]", + "default": null, + "required": true + }, + "folder": { + "annotation": "FolderOut", + "default": null, + "required": true + } + }, + "validators": { + "from_dict": "a830579ac5d55b74cb738485da791a6b656e2472e4adc42d7024be2dcb5b7794", + "from_json": "a32374569d2cac54cadb5bc4e676ae11f2a4d2620658e302777fb9f00f305f88" + } + }, + "FolderCopyIn": { + "class_ast_sha256": "4bdd6b54d64aaa27fd971ca8687cbdf71cd3099df91dc51c52fc4fff88b8b922", + "fields": { + "destination_drive_id": { + "annotation": "Optional[Annotated[str, Field(strict=True)]]", + "default": "None", + "required": false + }, + "destination_name": { + "annotation": "Annotated[str, Field(min_length=1, strict=True, max_length=255)]", + "default": null, + "required": true + }, + "destination_parent_id": { + "annotation": "Annotated[str, Field(strict=True)]", + "default": null, + "required": true + } + }, + "validators": { + "destination_drive_id_validate_regular_expression": "96bc9a65803cd7e7866c9ce03b3a6666d6d964a00edabe1fe8116b4a5e29fe27", + "destination_parent_id_validate_regular_expression": "263482ba1a5d992e3f0b608f8ca53acfd5102a41bf16ccf229aa96aa30cb0487", + "from_dict": "59caf2dbdb98f0c83222d1d7b01078f8c1e31d517b55999af7ffd36aa3016611", + "from_json": "f075e9e8157bd46fbc048dfa738c81ae042363362443ba7e76b7cad007cdb8b5" + } + }, + "FolderCreateIn": { + "class_ast_sha256": "7873d64c0ce2fd4db85051da312ff0afc9e6b414469e5d7044910f7f456b073d", + "fields": { + "grant_inheritance": { + "annotation": "StrictStr", + "default": "'inherit'", + "required": false + }, + "metadata": { + "annotation": "Dict[str, Any]", + "default": "None", + "required": false + }, + "name": { + "annotation": "Annotated[str, Field(min_length=1, strict=True, max_length=255)]", + "default": null, + "required": true + }, + "parent_id": { + "annotation": "Annotated[str, Field(strict=True)]", + "default": null, + "required": true + } + }, + "validators": { + "from_dict": "59caf2dbdb98f0c83222d1d7b01078f8c1e31d517b55999af7ffd36aa3016611", + "from_json": "a2b03a6326920e9f991752468f855f5d6e4e62897114aee53251f2a2e6e96dbe", + "grant_inheritance_validate_enum": "ded33ccebcfca03c1d7b69c504f702fb82074612f8fefb9c4a4a4381540f0c15", + "parent_id_validate_regular_expression": "0584b5479f367e27a03047da96291ce2ed1f8f6d7f19cbf92cc09e471c07573f" + } + }, + "FolderListOut": { + "class_ast_sha256": "dad6b365f00c208532d0eddf0170504c0d7da7a4ee3610c8ed608e378b23dd73", + "fields": { + "items": { + "annotation": "List[FolderOut]", + "default": null, + "required": true + }, + "next_cursor": { + "annotation": "Optional[StrictStr]", + "default": null, + "required": true + } + }, + "validators": { + "from_dict": "a0086c4f52994ca401d193a64b49ba04ed3d386f80adfdac1f46e84b685cdddf", + "from_json": "385b5e80e14e366c60d5066913442bc7a55feb3bb2e7e4646ddcec12a8bbda0f" + } + }, + "FolderOut": { + "class_ast_sha256": "0178b7122d9e796d5e7bfe8ef0c98551ca43d03adbc6c0502a58afff81eb323a", + "fields": { + "created_at": { + "annotation": "datetime", + "default": null, + "required": true + }, + "deleted_at": { + "annotation": "Optional[datetime]", + "default": null, + "required": true + }, + "drive_id": { + "annotation": "Annotated[str, Field(strict=True)]", + "default": null, + "required": true + }, + "grant_inheritance": { + "annotation": "StrictStr", + "default": null, + "required": true + }, + "id": { + "annotation": "Annotated[str, Field(strict=True)]", + "default": null, + "required": true + }, + "metadata": { + "annotation": "Dict[str, Any]", + "default": null, + "required": true + }, + "name": { + "annotation": "Optional[StrictStr]", + "default": null, + "required": true + }, + "parent_id": { + "annotation": "Optional[StrictStr]", + "default": null, + "required": true + }, + "revision": { + "annotation": "Annotated[str, Field(strict=True)]", + "default": null, + "required": true + }, + "state": { + "annotation": "StrictStr", + "default": null, + "required": true + }, + "updated_at": { + "annotation": "datetime", + "default": null, + "required": true + } + }, + "validators": { + "drive_id_validate_regular_expression": "7885f6c85fd6008d3dff9a64f8e5433feeca15f98a996b6513b0a269f8923e8f", + "from_dict": "f304106e23867bc0e30a7498d6e3d25f74cf4d37bf9f6846bd49a48cc795bba9", + "from_json": "c312adaec95713cc7894515181f6ee9708ab5ba7b602e09d94b12a78c882e5b5", + "id_validate_regular_expression": "6473c7b5f0820567817e7d08511bbeebcc2c99a3f207b532c7e9a4daeb8056bb", + "revision_validate_regular_expression": "237580f3f1be93fcd8f003eac9f9f611e8c189ca83febf1b6cda12501420c9ea" + } + }, + "FolderUpdateIn": { + "class_ast_sha256": "132554ccd868ef556c2842f6866245ce8f624f7e36e6bea0488cfdd5ac5f5e1b", + "fields": { + "grant_inheritance": { + "annotation": "Optional[StrictStr]", + "default": "None", + "required": false + }, + "metadata": { + "annotation": "Optional[Dict[str, Any]]", + "default": "None", + "required": false + }, + "name": { + "annotation": "Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]]", + "default": "None", + "required": false + }, + "parent_id": { + "annotation": "Optional[Annotated[str, Field(strict=True)]]", + "default": "None", + "required": false + } + }, + "validators": { + "from_dict": "59caf2dbdb98f0c83222d1d7b01078f8c1e31d517b55999af7ffd36aa3016611", + "from_json": "4c7a902c851d2e9eec5b5691f48788ab45f9c13d63e6d677359c2d8a5b2a3d25", + "grant_inheritance_validate_enum": "ded33ccebcfca03c1d7b69c504f702fb82074612f8fefb9c4a4a4381540f0c15", + "parent_id_validate_regular_expression": "77cda59612c726531ced93fc7bfcb5eb4265033785d0a4d09f9be736ca31abf0" + } + }, + "GrantCreateIn": { + "class_ast_sha256": "6b9a2e8272ea7da654a61cf4aab76c6feaa9d2188e292f4664f2102621b67f05", + "fields": { + "expires_at": { + "annotation": "Optional[datetime]", + "default": "None", + "required": false + }, + "principal_id": { + "annotation": "Optional[StrictStr]", + "default": "None", + "required": false + }, + "principal_type": { + "annotation": "StrictStr", + "default": null, + "required": true + }, + "resource_id": { + "annotation": "Annotated[str, Field(min_length=1, strict=True)]", + "default": null, + "required": true + }, + "resource_type": { + "annotation": "StrictStr", + "default": null, + "required": true + }, + "role": { + "annotation": "StrictStr", + "default": null, + "required": true + } + }, + "validators": { + "from_dict": "59caf2dbdb98f0c83222d1d7b01078f8c1e31d517b55999af7ffd36aa3016611", + "from_json": "83977d26836ee9fdc07c0fa42718c341066c6c5ecde694790bcea3c849baadd2", + "principal_type_validate_enum": "10d28453e7706cc8bf6bc918855701f89073ce1e7b200be2e3a27c6247d22b11", + "resource_type_validate_enum": "54bbdb88447cfcf51537a820b007ae0a5794e4342e8e4c84e11399c861e50346", + "role_validate_enum": "ab8926cb11a0ec1bb0a013f11489c9d39602cbeb6e381d40ac57dfbdcfbcfef3" + } + }, + "GrantListOut": { + "class_ast_sha256": "1c283be450b3764679ee75dae53e067200f0babab00201f9e1b25a5950cd809a", + "fields": { + "items": { + "annotation": "List[GrantOut]", + "default": null, + "required": true + }, + "next_cursor": { + "annotation": "Optional[StrictStr]", + "default": null, + "required": true + } + }, + "validators": { + "from_dict": "52788d1d013ae14f17de4b2296277cdbee81fdf9bdcb6f247fe8793e4c2a0ad6", + "from_json": "143a9e4c25f9787478f410c7a7ee710f320271883e5e97bf97802eb1d2af7cd1" + } + }, + "GrantOut": { + "class_ast_sha256": "b77caeff7d31a1f3bd9ea77978ab200a3663629059db1e49a784b2f83d6e20e3", + "fields": { + "created_at": { + "annotation": "datetime", + "default": null, + "required": true + }, + "drive_id": { + "annotation": "Annotated[str, Field(strict=True)]", + "default": null, + "required": true + }, + "expires_at": { + "annotation": "Optional[datetime]", + "default": null, + "required": true + }, + "id": { + "annotation": "Annotated[str, Field(strict=True)]", + "default": null, + "required": true + }, + "principal_id": { + "annotation": "Optional[StrictStr]", + "default": null, + "required": true + }, + "principal_type": { + "annotation": "StrictStr", + "default": null, + "required": true + }, + "resource_id": { + "annotation": "StrictStr", + "default": null, + "required": true + }, + "resource_type": { + "annotation": "StrictStr", + "default": null, + "required": true + }, + "revision": { + "annotation": "Annotated[str, Field(strict=True)]", + "default": null, + "required": true + }, + "revoked_at": { + "annotation": "Optional[datetime]", + "default": null, + "required": true + }, + "role": { + "annotation": "StrictStr", + "default": null, + "required": true + }, + "state": { + "annotation": "StrictStr", + "default": null, + "required": true + } + }, + "validators": { + "drive_id_validate_regular_expression": "7885f6c85fd6008d3dff9a64f8e5433feeca15f98a996b6513b0a269f8923e8f", + "from_dict": "d9e38fcac094badfc485418684bd7ef2a25998017356c91b4af6729fed884499", + "from_json": "248594f74d1d0389d830d666e4d58942c0e106915f021a3105d3d09e0516ffee", + "id_validate_regular_expression": "6a32356b717715bfbfafa7a7a80a0019f3b038e273337c1d54c6b690feb8e8a7", + "revision_validate_regular_expression": "237580f3f1be93fcd8f003eac9f9f611e8c189ca83febf1b6cda12501420c9ea" + } + }, + "GrantUpdateIn": { + "class_ast_sha256": "f95646e044882aa15ffe383933faf9d8ead82cef9612adfbc9ea3997fb30544b", + "fields": { + "expires_at": { + "annotation": "Optional[datetime]", + "default": "None", + "required": false + }, + "role": { + "annotation": "Optional[StrictStr]", + "default": "None", + "required": false + } + }, + "validators": { + "from_dict": "59caf2dbdb98f0c83222d1d7b01078f8c1e31d517b55999af7ffd36aa3016611", + "from_json": "c1d2a9a5c591e717fc7a976052b64d82c89c57907d01c782c7f293ea0ff4bbb8", + "role_validate_enum": "a500a69056bedd813e3d080f0f6c83cc707d7a70a04e2c819eb849771d239865" + } + }, + "HealthDegradedDetail": { + "class_ast_sha256": "46ce5eb58afc91470cd21f63f89d75e4b7f5272c6f8d37f2b1e76415f87617fe", + "fields": { + "error": { + "annotation": "StrictStr", + "default": null, + "required": true + }, + "status": { + "annotation": "StrictStr", + "default": null, + "required": true + } + }, + "validators": { + "from_dict": "28b91c70cc44f4a8a5293eea69165fd0fbfbfb4b39affe4f461cd9fb3f118ad5", + "from_json": "a8c62b5c8bf1c912ffd330d27208c8a85f201f1ba802454c5c24a4bd3c5ee4e2" + } + }, + "HealthDegradedResponse": { + "class_ast_sha256": "eecc7a48682227af758d9fadaed3a9fc25dae9a36817d1fa050644fe0514eef2", + "fields": { + "detail": { + "annotation": "HealthDegradedDetail", + "default": null, + "required": true + } + }, + "validators": { + "from_dict": "ef794303cd94013d05d43f620ad21dafe962f6775f97ae9fe58d1cf9ff46b3ba", + "from_json": "03ae4e44047f93a1bbe3470d007fc1ada5e9f9323ac5a4b9e27a5ade0135e21c" + } + }, + "HealthOut": { + "class_ast_sha256": "ddf14a51404c0d9d2e47006c114d3d6bef80010ec5327e48d8919f92f1c5b00e", + "fields": { + "status": { + "annotation": "StrictStr", + "default": null, + "required": true + } + }, + "validators": { + "from_dict": "7c30ee6ae1c9733a056891ca69f3c5358fd7dfc6c31b1376b749267d94e1e0d5", + "from_json": "1ce8b0c610c97476c2e078ca1a2a28643a6489fb6aa881123c66503268813d46" + } + }, + "SearchHitOut": { + "class_ast_sha256": "9964a9121be9d568fd11c5568c84198f499cfb88c934b2358c9a34535ec98086", + "fields": { + "content_type": { + "annotation": "Optional[StrictStr]", + "default": null, + "required": true + }, + "drive_id": { + "annotation": "Annotated[str, Field(strict=True)]", + "default": null, + "required": true + }, + "id": { + "annotation": "Annotated[str, Field(strict=True)]", + "default": null, + "required": true + }, + "name": { + "annotation": "StrictStr", + "default": null, + "required": true + }, + "parent_id": { + "annotation": "Optional[StrictStr]", + "default": null, + "required": true + }, + "rank": { + "annotation": "Union[StrictFloat, StrictInt]", + "default": null, + "required": true + }, + "snippet": { + "annotation": "StrictStr", + "default": "Field(description=\"HTML-safe highlighted excerpt. The ONLY markup it may contain is the server's own ... highlight pair; artifact content is entity-escaped, so this may be rendered as HTML.\")", + "required": true + }, + "updated_at": { + "annotation": "datetime", + "default": null, + "required": true + }, + "version_id": { + "annotation": "Optional[StrictStr]", + "default": null, + "required": true + } + }, + "validators": { + "drive_id_validate_regular_expression": "7885f6c85fd6008d3dff9a64f8e5433feeca15f98a996b6513b0a269f8923e8f", + "from_dict": "f6d15f90b057a9e946c7bc6796ae18c0b0c77c484d48868fafa5ba32134800bd", + "from_json": "7e7937175637c767d462a621f0efb97500bb9946b07c1d5a82baa01218d5858c", + "id_validate_regular_expression": "b53449d29cd59cc9e092a9ad29e13e9db7021f7c23b2fa5165fba95712cb5177" + } + }, + "SearchPageOut": { + "class_ast_sha256": "50212457302ffdc8dacc203d7a625c442d8cc264140541789d5f93e03057055a", + "fields": { + "items": { + "annotation": "List[SearchHitOut]", + "default": null, + "required": true + }, + "next_cursor": { + "annotation": "Optional[StrictStr]", + "default": null, + "required": true + } + }, + "validators": { + "from_dict": "ec5b9df26ffb28843351f23372346007ea3b5f79e9960e7a9cb2687b846f90b7", + "from_json": "2fb7ee6ac3908af62d6b423972f28c22693210904b4c187ff7d6fa6912777219" + } + }, + "ShareCreateIn": { + "class_ast_sha256": "9c6e934372df49cb10a3c2d6e25b4e3dcc1591e31d253463b4546033ba7d0960", + "fields": { + "expires_at": { + "annotation": "Optional[datetime]", + "default": "None", + "required": false + }, + "resource_id": { + "annotation": "Annotated[str, Field(min_length=1, strict=True)]", + "default": null, + "required": true + }, + "resource_type": { + "annotation": "StrictStr", + "default": null, + "required": true + } + }, + "validators": { + "from_dict": "59caf2dbdb98f0c83222d1d7b01078f8c1e31d517b55999af7ffd36aa3016611", + "from_json": "98b012833ff7074ecb57d2018585dc4902f60eca79a83bd37d76605a22e86a48", + "resource_type_validate_enum": "362eb7ec7d3ebd176dded961f17b4a68ef89bf2d2eaf065c1588968d7a21e5b8" + } + }, + "ShareCreateOut": { + "class_ast_sha256": "27f42cafea2b0bf71ed64c510a2285cf7847c26d1a4abe6469fbf042be1dc339", + "fields": { + "created_at": { + "annotation": "datetime", + "default": null, + "required": true + }, + "created_by": { + "annotation": "Optional[StrictStr]", + "default": null, + "required": true + }, + "drive_id": { + "annotation": "Annotated[str, Field(strict=True)]", + "default": null, + "required": true + }, + "expires_at": { + "annotation": "Optional[datetime]", + "default": null, + "required": true + }, + "id": { + "annotation": "Annotated[str, Field(strict=True)]", + "default": null, + "required": true + }, + "resource_id": { + "annotation": "StrictStr", + "default": null, + "required": true + }, + "resource_type": { + "annotation": "StrictStr", + "default": null, + "required": true + }, + "revision": { + "annotation": "Annotated[str, Field(strict=True)]", + "default": null, + "required": true + }, + "revoked_at": { + "annotation": "Optional[datetime]", + "default": null, + "required": true + }, + "rotated_at": { + "annotation": "Optional[datetime]", + "default": null, + "required": true + }, + "secret": { + "annotation": "Optional[StrictStr]", + "default": "Field(default=None, description='Plaintext share secret. Present only on first execution of a create or rotate; null on idempotent replay — rotate to obtain a new secret.')", + "required": false + }, + "state": { + "annotation": "StrictStr", + "default": null, + "required": true + } + }, + "validators": { + "drive_id_validate_regular_expression": "7885f6c85fd6008d3dff9a64f8e5433feeca15f98a996b6513b0a269f8923e8f", + "from_dict": "05a091a5e9b24005eafcb286fc59481fd7742a63882b5469c776b936e59a0081", + "from_json": "b99e60e3a9ec47eeb5c3829413cbdf8c46bfc1c0bbc860eb3cd2111f2109b569", + "id_validate_regular_expression": "11a70c0b8707a6070b52585dff13e1d54285b6c5a500f19f2cd6fba17aebb477", + "revision_validate_regular_expression": "237580f3f1be93fcd8f003eac9f9f611e8c189ca83febf1b6cda12501420c9ea" + } + }, + "ShareListOut": { + "class_ast_sha256": "eb83f65495ee1f4183ccaadda45d21f20ad6040e6cf14bddb753c0085ddee9e8", + "fields": { + "items": { + "annotation": "List[ShareOut]", + "default": null, + "required": true + }, + "next_cursor": { + "annotation": "Optional[StrictStr]", + "default": null, + "required": true + } + }, + "validators": { + "from_dict": "62875327f265eae87cd813cfed18ac6891daebc69756b389290c06c3e8b0f105", + "from_json": "e61599cf8a059d548d041203bc2659b5ca57520ebeac0667b8186ca710f8ddd7" + } + }, + "ShareOut": { + "class_ast_sha256": "21a1496a287b25e3c32d0b7496ff231904610347be6088d5024ed200c4346a04", + "fields": { + "created_at": { + "annotation": "datetime", + "default": null, + "required": true + }, + "created_by": { + "annotation": "Optional[StrictStr]", + "default": null, + "required": true + }, + "drive_id": { + "annotation": "Annotated[str, Field(strict=True)]", + "default": null, + "required": true + }, + "expires_at": { + "annotation": "Optional[datetime]", + "default": null, + "required": true + }, + "id": { + "annotation": "Annotated[str, Field(strict=True)]", + "default": null, + "required": true + }, + "resource_id": { + "annotation": "StrictStr", + "default": null, + "required": true + }, + "resource_type": { + "annotation": "StrictStr", + "default": null, + "required": true + }, + "revision": { + "annotation": "Annotated[str, Field(strict=True)]", + "default": null, + "required": true + }, + "revoked_at": { + "annotation": "Optional[datetime]", + "default": null, + "required": true + }, + "rotated_at": { + "annotation": "Optional[datetime]", + "default": null, + "required": true + }, + "state": { + "annotation": "StrictStr", + "default": null, + "required": true + } + }, + "validators": { + "drive_id_validate_regular_expression": "7885f6c85fd6008d3dff9a64f8e5433feeca15f98a996b6513b0a269f8923e8f", + "from_dict": "700942d215bdf15458af9991543558d45df1dd99645e7a53d6d4856910495c50", + "from_json": "79aedfd3f452ffe625a2f698f39067919be578f3dd4f4da2fff7df30ae2d6978", + "id_validate_regular_expression": "11a70c0b8707a6070b52585dff13e1d54285b6c5a500f19f2cd6fba17aebb477", + "revision_validate_regular_expression": "237580f3f1be93fcd8f003eac9f9f611e8c189ca83febf1b6cda12501420c9ea" + } + }, + "V0ErrorEnvelope": { + "class_ast_sha256": "3379d26d5fefba7f2340639a0cc172d07be2a7f68bfc00d33ce3c5acaa589f1a", + "fields": { + "error": { + "annotation": "DrivesCreate400ResponseError", + "default": null, + "required": true + } + }, + "validators": { + "from_dict": "fa53dafcf10afa8d66f248101a420ad6c7332dcc6a4e25605db412ac5bf5c579", + "from_json": "21cf2d5edd987827c17920136e9e662bd1d41d28b7b722ac88c18ea0bbba5764" + } + }, + "ValidationErrorResponse": { + "class_ast_sha256": "57ba1b25422825b6e01e69af4c8343ddd6905eb7d65239b0472c84c8b56d63a2", + "fields": { + "error": { + "annotation": "ValidationErrorResponseError", + "default": null, + "required": true + } + }, + "validators": { + "from_dict": "7a3953ced2195a846f10be3ac5b22f7003241e0eab26f191d8d53b531c96ceb7", + "from_json": "917e38772f8b6db0207ce2472176fe9439410b1c967d012cf3e5c6805359b6a4" + } + }, + "ValidationErrorResponseError": { + "class_ast_sha256": "0ae2a11808269d46ad9bcec7bb0c0c3e7bbd2944945ca8d0e04d6067a6634d49", + "fields": { + "additional_properties": { + "annotation": "Dict[str, Any]", + "default": "{}", + "required": false + }, + "code": { + "annotation": "Optional[StrictStr]", + "default": null, + "required": true + }, + "details": { + "annotation": "Optional[ValidationErrorResponseErrorDetails]", + "default": "None", + "required": false + }, + "message": { + "annotation": "Optional[StrictStr]", + "default": null, + "required": true + } + }, + "validators": { + "from_dict": "f7027bade16c9ffdf10e04bae9c06ab5e7848e4c5d4bdefbbd530be308a41bc3", + "from_json": "2f5d047425211240e3ca19c5dc63b3bb46efa0ebc404a57438f11f5cc5d7c523" + } + }, + "ValidationErrorResponseErrorDetails": { + "class_ast_sha256": "14367838c13991946fbfe49463c9784dfd9fdc71e6f70c3928084b509adadc50", + "fields": { + "fields": { + "annotation": "Optional[List[ValidationErrorResponseErrorDetailsFieldsInner]]", + "default": "None", + "required": false + } + }, + "validators": { + "from_dict": "68263efcd062abc937ee0e58c0d7ffa510731be3641888abe107376c708c5916", + "from_json": "878032a31590f19e00c0e33f9b32d2779c4eea0cff7c0eb554b293c7eb9bbd03" + } + }, + "ValidationErrorResponseErrorDetailsFieldsInner": { + "class_ast_sha256": "a34dfebd5cc1b67a2f67bbecff35a1cb19f9b9f044cc74aa553c1e705d91fb1a", + "fields": { + "location": { + "annotation": "Optional[StrictStr]", + "default": "None", + "required": false + }, + "reason": { + "annotation": "Optional[StrictStr]", + "default": "None", + "required": false + } + }, + "validators": { + "from_dict": "89a8a84a999eb91d668eb62650336bbad2ab2229122bacc11b5900c0809cddb5", + "from_json": "5a3c92d84fec59c147aae036c81459bd99167b665f79c8fcf59890c4ca479396" + } + }, + "VersionCreatedOut": { + "class_ast_sha256": "7bd5fa6bbb7006da9d9a4a0e9df6bb85fefba3b1a49a6f280ca4257e6cf432f9", + "fields": { + "artifact_id": { + "annotation": "Annotated[str, Field(strict=True)]", + "default": null, + "required": true + }, + "artifact_revision": { + "annotation": "Annotated[str, Field(strict=True)]", + "default": "Field(description=\"The artifact's revision after this version became head — the If-Match value for the next mutation.\")", + "required": true + }, + "content_type": { + "annotation": "StrictStr", + "default": null, + "required": true + }, + "created_at": { + "annotation": "datetime", + "default": null, + "required": true + }, + "created_by": { + "annotation": "Optional[StrictStr]", + "default": null, + "required": true + }, + "hash": { + "annotation": "StrictStr", + "default": null, + "required": true + }, + "id": { + "annotation": "Annotated[str, Field(strict=True)]", + "default": null, + "required": true + }, + "parent_version_id": { + "annotation": "Optional[StrictStr]", + "default": null, + "required": true + }, + "size_bytes": { + "annotation": "Annotated[int, Field(strict=True, ge=0)]", + "default": null, + "required": true + }, + "version_number": { + "annotation": "Annotated[int, Field(strict=True, ge=1)]", + "default": null, + "required": true + } + }, + "validators": { + "artifact_id_validate_regular_expression": "16d2239355f0e39dfd8c2bc6cabb481f6dd8c7bc76a64ad8bb8d68c4a70e05f9", + "artifact_revision_validate_regular_expression": "6fbb0de4986d2ed887c1ef2070be58c90944c055d9390d58c45992895c3b4c61", + "from_dict": "76130f064a55e10dddbab1d9ea11bb54d72e01653054c4d68f4d937de405de08", + "from_json": "647bee4c5164c99fbce7a18be06754b9304cd9070d2683987f0ed29d9dce86c6", + "id_validate_regular_expression": "fe7b591e99ff82af8dd4e793edc46d8327a20541a9160bdaea87a464d9f98241" + } + }, + "VersionListOut": { + "class_ast_sha256": "e7e77d5d93ceb00f3c1addb8b106739b0995781a1c8b4c5382c963c092182cc8", + "fields": { + "items": { + "annotation": "List[VersionOut]", + "default": null, + "required": true + }, + "next_cursor": { + "annotation": "Optional[StrictStr]", + "default": null, + "required": true + } + }, + "validators": { + "from_dict": "1e6184e7648f9e56c3008786623ffa6cbc5ff3c55e1826001e17343d9a641f69", + "from_json": "c22715ec4dd33374e17adf59efcdbcee6c78ecbfb2a30aeb8c4e2ee29ddb0294" + } + }, + "VersionOut": { + "class_ast_sha256": "aed0e7e97637257d2c53dc35577628e6cbfe5f2f74351845ea96205c795c237c", + "fields": { + "artifact_id": { + "annotation": "Annotated[str, Field(strict=True)]", + "default": null, + "required": true + }, + "content_type": { + "annotation": "StrictStr", + "default": null, + "required": true + }, + "created_at": { + "annotation": "datetime", + "default": null, + "required": true + }, + "created_by": { + "annotation": "Optional[StrictStr]", + "default": null, + "required": true + }, + "hash": { + "annotation": "StrictStr", + "default": null, + "required": true + }, + "id": { + "annotation": "Annotated[str, Field(strict=True)]", + "default": null, + "required": true + }, + "parent_version_id": { + "annotation": "Optional[StrictStr]", + "default": null, + "required": true + }, + "size_bytes": { + "annotation": "Annotated[int, Field(strict=True, ge=0)]", + "default": null, + "required": true + }, + "version_number": { + "annotation": "Annotated[int, Field(strict=True, ge=1)]", + "default": null, + "required": true + } + }, + "validators": { + "artifact_id_validate_regular_expression": "16d2239355f0e39dfd8c2bc6cabb481f6dd8c7bc76a64ad8bb8d68c4a70e05f9", + "from_dict": "bec47ba986785ada3955ba5fb89b788c680550e8e0093d9595f15852c4ef2b42", + "from_json": "294e25918ef5e4de249fd6c2dcf3f615850b1d9eaf0923535f65a530ebbdbff7", + "id_validate_regular_expression": "fe7b591e99ff82af8dd4e793edc46d8327a20541a9160bdaea87a464d9f98241" + } + } + }, + "response_header_transport": { + "async": { + "api_response_headers_annotation": [ + "Optional[Mapping[str, str]]" + ], + "response_deserialize_forwards_all_headers": true + }, + "sync": { + "api_response_headers_annotation": [ + "Optional[Mapping[str, str]]" + ], + "response_deserialize_forwards_all_headers": true + } + }, + "sync_operations": { + "artifacts_content": { + "api_class": "ArtifactsApi", + "primary_signature": "def artifacts_content(drive_id: StrictStr, artifact_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> bytes", + "surface_sha256": "03312a3bf0e3b71c9de2d67edeb278e7844355f649e6d9483d685b9e0bcd7e41" + }, + "artifacts_copy": { + "api_class": "ArtifactsApi", + "primary_signature": "def artifacts_copy(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], artifact_copy_in: ArtifactCopyIn, if_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ArtifactOut", + "surface_sha256": "f3a0b4f4eb54f148c89f4d298714f1a09557f06f5dc5f7b2b6a4e3a02ea48078" + }, + "artifacts_create": { + "api_class": "ArtifactsApi", + "primary_signature": "def artifacts_create(drive_id: StrictStr, idempotency_key: Optional[StrictStr], content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description='The artifact bytes.')], name: Annotated[StrictStr, Field(description='Artifact name.')], parent_id: Annotated[StrictStr, Field(description='Destination folder id (fld_*).')], authorization: Optional[StrictStr] = None, content_type: Annotated[Optional[StrictStr], Field(description='Declared media type.')] = None, metadata: Annotated[Optional[Dict[str, Any]], Field(description='Free-form JSON metadata.')] = None, sha256: Annotated[Optional[StrictStr], Field(description='Optional content sha256 for verification.')] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ArtifactOut", + "surface_sha256": "6c282c35145b913402ed228085895a594fc660ace5b5f660705b4b3560cacbad" + }, + "artifacts_delete": { + "api_class": "ArtifactsApi", + "primary_signature": "def artifacts_delete(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ArtifactOut", + "surface_sha256": "d5428f6a47af1747eb62161c0ca78ca5363a609dc0e3d5f77797c31e2b764db7" + }, + "artifacts_list": { + "api_class": "ArtifactsApi", + "primary_signature": "def artifacts_list(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, parent_id: Optional[StrictStr] = None, name: Optional[StrictStr] = None, content_type: Optional[StrictStr] = None, label: Optional[StrictStr] = None, updated_after: Optional[datetime] = None, updated_before: Optional[datetime] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ArtifactListOut", + "surface_sha256": "8a34c88bbe9560c7b53fc92e3d545474d7554fa73eb8ea1f1d329a5b91dfc6cc" + }, + "artifacts_read": { + "api_class": "ArtifactsApi", + "primary_signature": "def artifacts_read(drive_id: StrictStr, artifact_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ArtifactOut", + "surface_sha256": "e222c5e14ccc99d84433996a409fb48675791de8c8ee619de57c79c2067ec096" + }, + "artifacts_restore": { + "api_class": "ArtifactsApi", + "primary_signature": "def artifacts_restore(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ArtifactOut", + "surface_sha256": "37780ca7b487c7c61fce6a0bef81f2693c81a5e3c088ab31bba8cb1085753f23" + }, + "artifacts_update": { + "api_class": "ArtifactsApi", + "primary_signature": "def artifacts_update(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], artifact_update_in: ArtifactUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ArtifactOut", + "surface_sha256": "f5111d38de09df03b9b2b8dbf3e8e3e307a1ad2c3b8a0bb9557610cfea7947bd" + }, + "changes_list": { + "api_class": "ChangesApi", + "primary_signature": "def changes_list(drive_id: StrictStr, limit: Optional[StrictInt] = None, start: Optional[StrictStr] = None, cursor: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ChangePageOut", + "surface_sha256": "5f680ee3b6262f300a6ef5bd4792197ed442dfa965a01b8d6ba0df032ab4f265" + }, + "drive_search": { + "api_class": "SearchApi", + "primary_signature": "def drive_search(drive_id: StrictStr, q: Annotated[str, Field(min_length=1, strict=True)], mode: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, parent_id: Optional[StrictStr] = None, content_type: Optional[StrictStr] = None, label: Optional[StrictStr] = None, updated_after: Optional[datetime] = None, updated_before: Optional[datetime] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> SearchPageOut", + "surface_sha256": "0fdcf5d635f757ad7f46c5cf9eed3e92ef26b8bcba63b2c48c7e3a35c2a1325c" + }, + "drives_create": { + "api_class": "DrivesApi", + "primary_signature": "def drives_create(idempotency_key: Optional[StrictStr], drive_create_in: DriveCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> DriveOut", + "surface_sha256": "e85e3433b31f29f5521fde9d97d5fa39b32fd4e6395d0ce92d1ebbc639d7cd9b" + }, + "drives_delete": { + "api_class": "DrivesApi", + "primary_signature": "def drives_delete(drive_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> DriveOut", + "surface_sha256": "a1a6775c5baeabfadd18b93f4c993529b9f79f0332741027676a326eda174308" + }, + "drives_list": { + "api_class": "DrivesApi", + "primary_signature": "def drives_list(lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> DriveListOut", + "surface_sha256": "ba4147ed7f5d590341a77c0a06e3546768efc9471aa85618e1a15fb15bd45b16" + }, + "drives_read": { + "api_class": "DrivesApi", + "primary_signature": "def drives_read(drive_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> DriveOut", + "surface_sha256": "c08c4c9216fdd9d30fedbd1abf9d0ed675624ebdaa44c35652198ae1dbcd83fc" + }, + "drives_restore": { + "api_class": "DrivesApi", + "primary_signature": "def drives_restore(drive_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> DriveOut", + "surface_sha256": "d9e668ec323f16843d7966bf06c3155079895bc87d7c931348ac748a6057eb96" + }, + "drives_update": { + "api_class": "DrivesApi", + "primary_signature": "def drives_update(drive_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], drive_update_in: DriveUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> DriveOut", + "surface_sha256": "67eea5873f81ec3da4e8c85e09d1df9e2b6d888963adeb375b4ce2736fa645d7" + }, + "drives_usage": { + "api_class": "DrivesApi", + "primary_signature": "def drives_usage(drive_id: StrictStr, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> DriveUsageOut", + "surface_sha256": "84699708f6eef73fe7519ba4d08703cc6cc673c18e23a2b73c7f5a5259533c1a" + }, + "folders_copy": { + "api_class": "FoldersApi", + "primary_signature": "def folders_copy(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], folder_copy_in: FolderCopyIn, if_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> FolderOut", + "surface_sha256": "4c0b84dd6ddeaf22610fd439d045098283a813ee49931d9b2a97781a7381147d" + }, + "folders_create": { + "api_class": "FoldersApi", + "primary_signature": "def folders_create(drive_id: StrictStr, idempotency_key: Optional[StrictStr], folder_create_in: FolderCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> FolderOut", + "surface_sha256": "1e9ad58082255b18765aa5e118805a88d7ca072be2bf3781232d1fc7dc055ce9" + }, + "folders_delete": { + "api_class": "FoldersApi", + "primary_signature": "def folders_delete(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], recursive: Optional[StrictBool] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> FolderCascadeOut", + "surface_sha256": "b2a96060e9a283f8696feee3feb20a3b6d5cf54050470cdd6af8aaa6d43e542c" + }, + "folders_list": { + "api_class": "FoldersApi", + "primary_signature": "def folders_list(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, parent_id: Optional[StrictStr] = None, name: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> FolderListOut", + "surface_sha256": "67bbe3ee12a054ae8b9715503a35a97e2f92a114a4edad04511c956f431a889b" + }, + "folders_read": { + "api_class": "FoldersApi", + "primary_signature": "def folders_read(drive_id: StrictStr, folder_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> FolderOut", + "surface_sha256": "33768ba030ca714306ceaa05f08a1cdd98bf4ee2c06712bc0eed5bc6d9a41720" + }, + "folders_restore": { + "api_class": "FoldersApi", + "primary_signature": "def folders_restore(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> FolderCascadeOut", + "surface_sha256": "cb234bee9ca90a278377d08ddb174ab9e4209042cb3a6f5fd5b7eb87447312e9" + }, + "folders_update": { + "api_class": "FoldersApi", + "primary_signature": "def folders_update(drive_id: StrictStr, folder_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], folder_update_in: FolderUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> FolderOut", + "surface_sha256": "8983b453d18743f90371b312d0fd56a09a9c3050ac1c90d3de8deae82e00007c" + }, + "grants_create": { + "api_class": "GrantsApi", + "primary_signature": "def grants_create(drive_id: StrictStr, idempotency_key: Optional[StrictStr], grant_create_in: GrantCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> GrantOut", + "surface_sha256": "f5cd25d45fab92ac6222a23a934b82f4b2384701c7dc989487d66f7e88a890ff" + }, + "grants_list": { + "api_class": "GrantsApi", + "primary_signature": "def grants_list(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, resource_type: Optional[StrictStr] = None, resource_id: Optional[StrictStr] = None, principal_type: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> GrantListOut", + "surface_sha256": "029978258d9fa277098200f704b3af30ebc3f26264ad01fbca6135c390ef8405" + }, + "grants_read": { + "api_class": "GrantsApi", + "primary_signature": "def grants_read(drive_id: StrictStr, grant_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> GrantOut", + "surface_sha256": "f590d549f0f609fd5d63de1137eff5f72731da0eb0b3d73f948f5b21942b038d" + }, + "grants_revoke": { + "api_class": "GrantsApi", + "primary_signature": "def grants_revoke(drive_id: StrictStr, grant_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> GrantOut", + "surface_sha256": "609b7e6586e07e220a12089e3d1405cc6d1203af80ef7200d896e3ebe4ef9062" + }, + "grants_update": { + "api_class": "GrantsApi", + "primary_signature": "def grants_update(drive_id: StrictStr, grant_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], grant_update_in: GrantUpdateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> GrantOut", + "surface_sha256": "3997492beaf6cff6ce6af6d160c42188a183a91441994b280c2484edcc8f3220" + }, + "health": { + "api_class": "DefaultApi", + "primary_signature": "def health(_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> HealthOut", + "surface_sha256": "ce729b1d945b9d0f552520b7c423305af57a570cf17a180e4621b5b113e75c7a" + }, + "oauth_protected_resource": { + "api_class": "DiscoveryApi", + "primary_signature": "def oauth_protected_resource(_request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> Dict[str, Optional[object]]", + "surface_sha256": "48fbec5c39761916ec20227a55bc60db66eda9bb6f5437592a97cd87ca153ea6" + }, + "shares_create": { + "api_class": "SharesApi", + "primary_signature": "def shares_create(drive_id: StrictStr, idempotency_key: Optional[StrictStr], share_create_in: ShareCreateIn, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ShareCreateOut", + "surface_sha256": "7db410c19ec28b91bd7516fbe27448102ef47eb88ad38abdbf779836e3c92d3b" + }, + "shares_list": { + "api_class": "SharesApi", + "primary_signature": "def shares_list(drive_id: StrictStr, lifecycle: Optional[StrictStr] = None, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, resource_type: Optional[StrictStr] = None, resource_id: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ShareListOut", + "surface_sha256": "8de4ca4400f4acc0b51dbe825204c1a95ebbe0c29366932b20abce0ee75eea75" + }, + "shares_read": { + "api_class": "SharesApi", + "primary_signature": "def shares_read(drive_id: StrictStr, share_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ShareOut", + "surface_sha256": "dfddac34e0aa7de816a9448594bac435d14b23c211688554df90fa569b80cd2e" + }, + "shares_redeem": { + "api_class": "SharesRedemptionApi", + "primary_signature": "def shares_redeem(share_key: StrictStr, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> object", + "surface_sha256": "827990f2f7b8f700c37dfbd2b35c43ab5910488c4238294318693dffd1c50065" + }, + "shares_revoke": { + "api_class": "SharesApi", + "primary_signature": "def shares_revoke(drive_id: StrictStr, share_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ShareOut", + "surface_sha256": "f3617aeb551c1860353637f7ec34a4bfa3c76f7fbcc512a4f5f43d31b71c0da6" + }, + "shares_rotate": { + "api_class": "SharesApi", + "primary_signature": "def shares_rotate(drive_id: StrictStr, share_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> ShareCreateOut", + "surface_sha256": "9cff91235bc9dd59e887d74e029fadabb4cffca6899a0510b49056da28601f7d" + }, + "versions_append": { + "api_class": "VersionsApi", + "primary_signature": "def versions_append(drive_id: StrictStr, artifact_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description='The artifact bytes.')], authorization: Optional[StrictStr] = None, content_type: Annotated[Optional[StrictStr], Field(description='Declared media type.')] = None, sha256: Annotated[Optional[StrictStr], Field(description='Optional content sha256 for verification.')] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> VersionCreatedOut", + "surface_sha256": "01e9e8abebdc3e5c1edeb9992c0480c7625f7aedcb89bfdf47549d356b247ba0" + }, + "versions_content": { + "api_class": "VersionsApi", + "primary_signature": "def versions_content(drive_id: StrictStr, artifact_id: StrictStr, version_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> bytes", + "surface_sha256": "448e2758366a2bd0ffb38ebbc493a5b54ff533377a8cd89a8e1fdbd3c2677b41" + }, + "versions_list": { + "api_class": "VersionsApi", + "primary_signature": "def versions_list(drive_id: StrictStr, artifact_id: StrictStr, limit: Optional[StrictInt] = None, cursor: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> VersionListOut", + "surface_sha256": "f1a41a7370d6ee0531d56a240a4d0f836cb7a339e5cdf7b8ecd347e0acf42d4c" + }, + "versions_read": { + "api_class": "VersionsApi", + "primary_signature": "def versions_read(drive_id: StrictStr, artifact_id: StrictStr, version_id: StrictStr, if_none_match: Optional[StrictStr] = None, authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> VersionOut", + "surface_sha256": "41234beea457b2ea0858e2de435d2a8446b35e7fb9ca09807f5174a88bc8891c" + }, + "versions_restore": { + "api_class": "VersionsApi", + "primary_signature": "def versions_restore(drive_id: StrictStr, artifact_id: StrictStr, version_id: StrictStr, idempotency_key: Optional[StrictStr], if_match: Optional[StrictStr], authorization: Optional[StrictStr] = None, _request_timeout: Union[None, Annotated[StrictFloat, Field(gt=0)], Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]]] = None, _request_auth: Optional[Dict[StrictStr, Any]] = None, _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0) -> VersionCreatedOut", + "surface_sha256": "85ab52865f8c922a0b3bee88c0baaa1163b0f7e5098f88cc1c2df01ae7f0dd55" + } + } + } +} diff --git a/sdk/python/git_push.sh b/sdk/python/git_push.sh deleted file mode 100644 index 72834a1..0000000 --- a/sdk/python/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="Mnexa-AI" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="agentdrive-sdk" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/sdk/python/pyproject.toml b/sdk/python/pyproject.toml index c90173a..adb79ad 100644 --- a/sdk/python/pyproject.toml +++ b/sdk/python/pyproject.toml @@ -1,94 +1,57 @@ +[build-system] +requires = ["hatchling>=1.27,<2"] +build-backend = "hatchling.build" + [project] -name = "agentdrive_sdk" -version = "0.0.1" -description = "AgentDrive" +name = "agentdrive-sdk" +version = "0.1.0" +description = "Official Python SDK for the AgentDrive API" +readme = "README.md" +requires-python = ">=3.10" +license = { file = "LICENSE" } authors = [ - {name = "OpenAPI Generator Community",email = "team@openapitools.org"}, + { name = "Token Canopy" }, +] +keywords = ["agentdrive", "agents", "artifacts", "sdk"] +classifiers = [ + "Development Status :: 3 - Alpha", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", + "Typing :: Typed", ] -readme = "README.md" -keywords = ["OpenAPI", "OpenAPI-Generator", "AgentDrive"] -requires-python = ">=3.9" - dependencies = [ - "urllib3 (>=2.6.3,<3.0.0)", - "python-dateutil (>=2.8.2)", - "pydantic (>=2.11)", - "typing-extensions (>=4.7.1)", + "httpx>=0.28.1,<1", + "pydantic>=2.11,<3", + "python-dateutil>=2.8.2,<3", + "typing-extensions>=4.7.1", + "urllib3>=2.6.3,<3", ] -[project.urls] -Repository = "https://github.com/Mnexa-AI/agentdrive-sdk" - -[tool.poetry] -requires-poetry = ">=2.0" - -[tool.poetry.group.dev.dependencies] -pytest = ">= 8.4.2" -pytest-cov = ">= 2.8.1" -tox = ">= 3.9.0" -flake8 = ">= 4.0.0" -types-python-dateutil = ">= 2.8.19.14" -mypy = ">= 1.5" - - -[build-system] -requires = ["setuptools"] -build-backend = "setuptools.build_meta" - -[tool.pylint.'MESSAGES CONTROL'] -extension-pkg-whitelist = "pydantic" - -[tool.mypy] -files = [ - "agentdrive_sdk", - #"test", # auto-generated tests - "tests", # hand-written tests +[project.optional-dependencies] +dev = [ + "build>=1.2,<2", + "pytest>=8.4,<9", ] -# TODO: enable "strict" once all these individual checks are passing -# strict = true - -# List from: https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options -warn_unused_configs = true -warn_redundant_casts = true -warn_unused_ignores = true -## Getting these passing should be easy -strict_equality = true -extra_checks = true - -## Strongly recommend enabling this one as soon as you can -check_untyped_defs = true - -## These shouldn't be too much additional work, but may be tricky to -## get passing if you use a lot of untyped libraries -disallow_subclassing_any = true -disallow_untyped_decorators = true -disallow_any_generics = true - -### These next few are various gradations of forcing use of type annotations -#disallow_untyped_calls = true -#disallow_incomplete_defs = true -#disallow_untyped_defs = true -# -### This one isn't too hard to get passing, but return on investment is lower -#no_implicit_reexport = true -# -### This one can be tricky to get passing if you use a lot of untyped libraries -#warn_return_any = true - -[[tool.mypy.overrides]] -module = [ - "agentdrive_sdk.configuration", +[project.urls] +Homepage = "https://agentdrive.run" +Documentation = "https://github.com/tokencanopy/agentdrive-sdk/blob/main/docs/python-sdk-api-reference.md" +Repository = "https://github.com/tokencanopy/agentdrive-sdk" +Issues = "https://github.com/tokencanopy/agentdrive-sdk/issues" + +[tool.hatch.build.targets.wheel] +packages = ["src/agentdrive_sdk"] + +[tool.hatch.build.targets.sdist] +include = [ + "/LICENSE", + "/README.md", + "/pyproject.toml", + "/src/agentdrive_sdk", ] -warn_unused_ignores = true -strict_equality = true -extra_checks = true -check_untyped_defs = true -disallow_subclassing_any = true -disallow_untyped_decorators = true -disallow_any_generics = true -disallow_untyped_calls = true -disallow_incomplete_defs = true -disallow_untyped_defs = true -no_implicit_reexport = true -warn_return_any = true diff --git a/sdk/python/requirements.txt b/sdk/python/requirements.txt deleted file mode 100644 index 9af8f58..0000000 --- a/sdk/python/requirements.txt +++ /dev/null @@ -1,4 +0,0 @@ -urllib3 >= 2.6.3, < 3.0.0 -python_dateutil >= 2.8.2 -pydantic >= 2.11 -typing-extensions >= 4.7.1 diff --git a/sdk/python/setup.cfg b/sdk/python/setup.cfg deleted file mode 100644 index 11433ee..0000000 --- a/sdk/python/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -max-line-length=99 diff --git a/sdk/python/setup.py b/sdk/python/setup.py deleted file mode 100644 index 62e9488..0000000 --- a/sdk/python/setup.py +++ /dev/null @@ -1,47 +0,0 @@ -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from setuptools import setup, find_packages # noqa: H301 - -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools -NAME = "agentdrive-sdk" -VERSION = "0.0.1" -PYTHON_REQUIRES = ">= 3.10" -REQUIRES = [ - "urllib3 >= 2.6.3, < 3.0.0", - "python-dateutil >= 2.8.2", - "pydantic >= 2.11", - "typing-extensions >= 4.7.1", -] - -setup( - name=NAME, - version=VERSION, - description="AgentDrive", - author="OpenAPI Generator community", - author_email="team@openapitools.org", - url="", - keywords=["OpenAPI", "OpenAPI-Generator", "AgentDrive"], - install_requires=REQUIRES, - packages=find_packages(exclude=["test", "tests"]), - include_package_data=True, - long_description_content_type='text/markdown', - long_description="""\ - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - """, # noqa: E501 - package_data={"agentdrive_sdk": ["py.typed"]}, -) diff --git a/sdk/python/src/agentdrive_sdk/__init__.py b/sdk/python/src/agentdrive_sdk/__init__.py new file mode 100644 index 0000000..8ab71cb --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/__init__.py @@ -0,0 +1,10 @@ +"""AgentDrive Python SDK. + +The Phase 1 wire clients are available below :mod:`agentdrive_sdk.generated`. +""" + +from __future__ import annotations + +__version__ = "0.1.0" + +__all__ = ["__version__"] diff --git a/sdk/python/src/agentdrive_sdk/generated/__init__.py b/sdk/python/src/agentdrive_sdk/generated/__init__.py new file mode 100644 index 0000000..78073f5 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/__init__.py @@ -0,0 +1,5 @@ +"""Generated AgentDrive wire clients. + +Use :mod:`agentdrive_sdk.generated.sync` for urllib3 and +:mod:`agentdrive_sdk.generated.async_client` for HTTPX. +""" diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/__init__.py b/sdk/python/src/agentdrive_sdk/generated/async_client/__init__.py new file mode 100644 index 0000000..6a05122 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/__init__.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +# flake8: noqa + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +__version__ = "0.1.0" + +# Define package exports +__all__ = [ + "ArtifactsApi", + "ChangesApi", + "DefaultApi", + "DiscoveryApi", + "DrivesApi", + "FoldersApi", + "GrantsApi", + "SearchApi", + "SharesApi", + "SharesRedemptionApi", + "VersionsApi", + "ApiResponse", + "ApiClient", + "Configuration", + "OpenApiException", + "ApiTypeError", + "ApiValueError", + "ApiKeyError", + "ApiAttributeError", + "ApiException", + "ArtifactCopyIn", + "ArtifactListOut", + "ArtifactOut", + "ArtifactUpdateIn", + "ChangeActorOut", + "ChangeOut", + "ChangePageOut", + "ChangeResourceOut", + "DriveCreateIn", + "DriveListOut", + "DriveOut", + "DriveUpdateIn", + "DriveUsageOut", + "DrivesCreate400Response", + "DrivesCreate400ResponseError", + "DrivesList400Response", + "DrivesList400ResponseError", + "ErrorResponse", + "FolderCascadeOut", + "FolderCopyIn", + "FolderCreateIn", + "FolderListOut", + "FolderOut", + "FolderUpdateIn", + "GrantCreateIn", + "GrantListOut", + "GrantOut", + "GrantUpdateIn", + "HealthDegradedDetail", + "HealthDegradedResponse", + "HealthOut", + "SearchHitOut", + "SearchPageOut", + "ShareCreateIn", + "ShareCreateOut", + "ShareListOut", + "ShareOut", + "V0ErrorEnvelope", + "ValidationErrorResponse", + "ValidationErrorResponseError", + "ValidationErrorResponseErrorDetails", + "ValidationErrorResponseErrorDetailsFieldsInner", + "VersionCreatedOut", + "VersionListOut", + "VersionOut", +] + +# import apis into sdk package +from agentdrive_sdk.generated.async_client.api.artifacts_api import ArtifactsApi as ArtifactsApi +from agentdrive_sdk.generated.async_client.api.changes_api import ChangesApi as ChangesApi +from agentdrive_sdk.generated.async_client.api.default_api import DefaultApi as DefaultApi +from agentdrive_sdk.generated.async_client.api.discovery_api import DiscoveryApi as DiscoveryApi +from agentdrive_sdk.generated.async_client.api.drives_api import DrivesApi as DrivesApi +from agentdrive_sdk.generated.async_client.api.folders_api import FoldersApi as FoldersApi +from agentdrive_sdk.generated.async_client.api.grants_api import GrantsApi as GrantsApi +from agentdrive_sdk.generated.async_client.api.search_api import SearchApi as SearchApi +from agentdrive_sdk.generated.async_client.api.shares_api import SharesApi as SharesApi +from agentdrive_sdk.generated.async_client.api.shares_redemption_api import SharesRedemptionApi as SharesRedemptionApi +from agentdrive_sdk.generated.async_client.api.versions_api import VersionsApi as VersionsApi + +# import ApiClient +from agentdrive_sdk.generated.async_client.api_response import ApiResponse as ApiResponse +from agentdrive_sdk.generated.async_client.api_client import ApiClient as ApiClient +from agentdrive_sdk.generated.async_client.configuration import Configuration as Configuration +from agentdrive_sdk.generated.async_client.exceptions import OpenApiException as OpenApiException +from agentdrive_sdk.generated.async_client.exceptions import ApiTypeError as ApiTypeError +from agentdrive_sdk.generated.async_client.exceptions import ApiValueError as ApiValueError +from agentdrive_sdk.generated.async_client.exceptions import ApiKeyError as ApiKeyError +from agentdrive_sdk.generated.async_client.exceptions import ApiAttributeError as ApiAttributeError +from agentdrive_sdk.generated.async_client.exceptions import ApiException as ApiException + +# import models into sdk package +from agentdrive_sdk.generated.async_client.models.artifact_copy_in import ArtifactCopyIn as ArtifactCopyIn +from agentdrive_sdk.generated.async_client.models.artifact_list_out import ArtifactListOut as ArtifactListOut +from agentdrive_sdk.generated.async_client.models.artifact_out import ArtifactOut as ArtifactOut +from agentdrive_sdk.generated.async_client.models.artifact_update_in import ArtifactUpdateIn as ArtifactUpdateIn +from agentdrive_sdk.generated.async_client.models.change_actor_out import ChangeActorOut as ChangeActorOut +from agentdrive_sdk.generated.async_client.models.change_out import ChangeOut as ChangeOut +from agentdrive_sdk.generated.async_client.models.change_page_out import ChangePageOut as ChangePageOut +from agentdrive_sdk.generated.async_client.models.change_resource_out import ChangeResourceOut as ChangeResourceOut +from agentdrive_sdk.generated.async_client.models.drive_create_in import DriveCreateIn as DriveCreateIn +from agentdrive_sdk.generated.async_client.models.drive_list_out import DriveListOut as DriveListOut +from agentdrive_sdk.generated.async_client.models.drive_out import DriveOut as DriveOut +from agentdrive_sdk.generated.async_client.models.drive_update_in import DriveUpdateIn as DriveUpdateIn +from agentdrive_sdk.generated.async_client.models.drive_usage_out import DriveUsageOut as DriveUsageOut +from agentdrive_sdk.generated.async_client.models.drives_create400_response import DrivesCreate400Response as DrivesCreate400Response +from agentdrive_sdk.generated.async_client.models.drives_create400_response_error import DrivesCreate400ResponseError as DrivesCreate400ResponseError +from agentdrive_sdk.generated.async_client.models.drives_list400_response import DrivesList400Response as DrivesList400Response +from agentdrive_sdk.generated.async_client.models.drives_list400_response_error import DrivesList400ResponseError as DrivesList400ResponseError +from agentdrive_sdk.generated.async_client.models.error_response import ErrorResponse as ErrorResponse +from agentdrive_sdk.generated.async_client.models.folder_cascade_out import FolderCascadeOut as FolderCascadeOut +from agentdrive_sdk.generated.async_client.models.folder_copy_in import FolderCopyIn as FolderCopyIn +from agentdrive_sdk.generated.async_client.models.folder_create_in import FolderCreateIn as FolderCreateIn +from agentdrive_sdk.generated.async_client.models.folder_list_out import FolderListOut as FolderListOut +from agentdrive_sdk.generated.async_client.models.folder_out import FolderOut as FolderOut +from agentdrive_sdk.generated.async_client.models.folder_update_in import FolderUpdateIn as FolderUpdateIn +from agentdrive_sdk.generated.async_client.models.grant_create_in import GrantCreateIn as GrantCreateIn +from agentdrive_sdk.generated.async_client.models.grant_list_out import GrantListOut as GrantListOut +from agentdrive_sdk.generated.async_client.models.grant_out import GrantOut as GrantOut +from agentdrive_sdk.generated.async_client.models.grant_update_in import GrantUpdateIn as GrantUpdateIn +from agentdrive_sdk.generated.async_client.models.health_degraded_detail import HealthDegradedDetail as HealthDegradedDetail +from agentdrive_sdk.generated.async_client.models.health_degraded_response import HealthDegradedResponse as HealthDegradedResponse +from agentdrive_sdk.generated.async_client.models.health_out import HealthOut as HealthOut +from agentdrive_sdk.generated.async_client.models.search_hit_out import SearchHitOut as SearchHitOut +from agentdrive_sdk.generated.async_client.models.search_page_out import SearchPageOut as SearchPageOut +from agentdrive_sdk.generated.async_client.models.share_create_in import ShareCreateIn as ShareCreateIn +from agentdrive_sdk.generated.async_client.models.share_create_out import ShareCreateOut as ShareCreateOut +from agentdrive_sdk.generated.async_client.models.share_list_out import ShareListOut as ShareListOut +from agentdrive_sdk.generated.async_client.models.share_out import ShareOut as ShareOut +from agentdrive_sdk.generated.async_client.models.v0_error_envelope import V0ErrorEnvelope as V0ErrorEnvelope +from agentdrive_sdk.generated.async_client.models.validation_error_response import ValidationErrorResponse as ValidationErrorResponse +from agentdrive_sdk.generated.async_client.models.validation_error_response_error import ValidationErrorResponseError as ValidationErrorResponseError +from agentdrive_sdk.generated.async_client.models.validation_error_response_error_details import ValidationErrorResponseErrorDetails as ValidationErrorResponseErrorDetails +from agentdrive_sdk.generated.async_client.models.validation_error_response_error_details_fields_inner import ValidationErrorResponseErrorDetailsFieldsInner as ValidationErrorResponseErrorDetailsFieldsInner +from agentdrive_sdk.generated.async_client.models.version_created_out import VersionCreatedOut as VersionCreatedOut +from agentdrive_sdk.generated.async_client.models.version_list_out import VersionListOut as VersionListOut +from agentdrive_sdk.generated.async_client.models.version_out import VersionOut as VersionOut diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/api/__init__.py b/sdk/python/src/agentdrive_sdk/generated/async_client/api/__init__.py new file mode 100644 index 0000000..320c489 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/api/__init__.py @@ -0,0 +1,14 @@ +# flake8: noqa + +# import apis into api package +from agentdrive_sdk.generated.async_client.api.artifacts_api import ArtifactsApi +from agentdrive_sdk.generated.async_client.api.changes_api import ChangesApi +from agentdrive_sdk.generated.async_client.api.default_api import DefaultApi +from agentdrive_sdk.generated.async_client.api.discovery_api import DiscoveryApi +from agentdrive_sdk.generated.async_client.api.drives_api import DrivesApi +from agentdrive_sdk.generated.async_client.api.folders_api import FoldersApi +from agentdrive_sdk.generated.async_client.api.grants_api import GrantsApi +from agentdrive_sdk.generated.async_client.api.search_api import SearchApi +from agentdrive_sdk.generated.async_client.api.shares_api import SharesApi +from agentdrive_sdk.generated.async_client.api.shares_redemption_api import SharesRedemptionApi +from agentdrive_sdk.generated.async_client.api.versions_api import VersionsApi diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/api/artifacts_api.py b/sdk/python/src/agentdrive_sdk/generated/async_client/api/artifacts_api.py new file mode 100644 index 0000000..b36c1e4 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/api/artifacts_api.py @@ -0,0 +1,3056 @@ +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from datetime import datetime +from pydantic import Field, StrictBytes, StrictInt, StrictStr +from typing import Any, Dict, Optional, Tuple, Union +from typing_extensions import Annotated +from agentdrive_sdk.generated.async_client.models.artifact_copy_in import ArtifactCopyIn +from agentdrive_sdk.generated.async_client.models.artifact_list_out import ArtifactListOut +from agentdrive_sdk.generated.async_client.models.artifact_out import ArtifactOut +from agentdrive_sdk.generated.async_client.models.artifact_update_in import ArtifactUpdateIn + +from agentdrive_sdk.generated.async_client.api_client import ApiClient, RequestSerialized +from agentdrive_sdk.generated.async_client.api_response import ApiResponse +from agentdrive_sdk.generated.async_client.rest import RESTResponseType + + +class ArtifactsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def artifacts_content( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytes: + """Read Artifact Content + + Download the head version's bytes — stream or 307 signed URL. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_content_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + '304': None, + '307': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def artifacts_content_with_http_info( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytes]: + """Read Artifact Content + + Download the head version's bytes — stream or 307 signed URL. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_content_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + '304': None, + '307': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def artifacts_content_without_preload_content( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Read Artifact Content + + Download the head version's bytes — stream or 307 signed URL. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_content_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + '304': None, + '307': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _artifacts_content_serialize( + self, + drive_id, + artifact_id, + if_none_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if artifact_id is not None: + _path_params['artifact_id'] = artifact_id + # process the query parameters + # process the header parameters + if if_none_match is not None: + _header_params['If-None-Match'] = if_none_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/octet-stream', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}/artifacts/{artifact_id}/content', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def artifacts_copy( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + idempotency_key: Optional[StrictStr], + artifact_copy_in: ArtifactCopyIn, + if_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ArtifactOut: + """Copy Artifact + + Copy one artifact within the same drive. Cross-drive copy is out of v0 scope and rejected (400 INVALID_ARGUMENT). ``destination_drive_id`` must equal the source drive when present. Materializes the artifact + its selected version synchronously → 201. ``If-Match`` is optional; when present it is validated against the source revision (412 stale). + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param artifact_copy_in: (required) + :type artifact_copy_in: ArtifactCopyIn + :param if_match: + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_copy_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + idempotency_key=idempotency_key, + artifact_copy_in=artifact_copy_in, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ArtifactOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def artifacts_copy_with_http_info( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + idempotency_key: Optional[StrictStr], + artifact_copy_in: ArtifactCopyIn, + if_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ArtifactOut]: + """Copy Artifact + + Copy one artifact within the same drive. Cross-drive copy is out of v0 scope and rejected (400 INVALID_ARGUMENT). ``destination_drive_id`` must equal the source drive when present. Materializes the artifact + its selected version synchronously → 201. ``If-Match`` is optional; when present it is validated against the source revision (412 stale). + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param artifact_copy_in: (required) + :type artifact_copy_in: ArtifactCopyIn + :param if_match: + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_copy_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + idempotency_key=idempotency_key, + artifact_copy_in=artifact_copy_in, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ArtifactOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def artifacts_copy_without_preload_content( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + idempotency_key: Optional[StrictStr], + artifact_copy_in: ArtifactCopyIn, + if_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Copy Artifact + + Copy one artifact within the same drive. Cross-drive copy is out of v0 scope and rejected (400 INVALID_ARGUMENT). ``destination_drive_id`` must equal the source drive when present. Materializes the artifact + its selected version synchronously → 201. ``If-Match`` is optional; when present it is validated against the source revision (412 stale). + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param artifact_copy_in: (required) + :type artifact_copy_in: ArtifactCopyIn + :param if_match: + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_copy_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + idempotency_key=idempotency_key, + artifact_copy_in=artifact_copy_in, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ArtifactOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _artifacts_copy_serialize( + self, + drive_id, + artifact_id, + idempotency_key, + artifact_copy_in, + if_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if artifact_id is not None: + _path_params['artifact_id'] = artifact_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if artifact_copy_in is not None: + _body_params = artifact_copy_in + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v0/drives/{drive_id}/artifacts/{artifact_id}/copy', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def artifacts_create( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="The artifact bytes.")], + name: Annotated[StrictStr, Field(description="Artifact name.")], + parent_id: Annotated[StrictStr, Field(description="Destination folder id (fld_*).")], + authorization: Optional[StrictStr] = None, + content_type: Annotated[Optional[StrictStr], Field(description="Declared media type.")] = None, + metadata: Annotated[Optional[Dict[str, Any]], Field(description="Free-form JSON metadata.")] = None, + sha256: Annotated[Optional[StrictStr], Field(description="Optional content sha256 for verification.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ArtifactOut: + """Create Artifact + + Create one artifact with inline content — multipart only. Multipart only (415 for a JSON body). Parts: parent_id, name, metadata, content (bytes), content_type, sha256. parent_id, name, and content are required. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param content: The artifact bytes. (required) + :type content: bytes + :param name: Artifact name. (required) + :type name: str + :param parent_id: Destination folder id (fld_*). (required) + :type parent_id: str + :param authorization: + :type authorization: str + :param content_type: Declared media type. + :type content_type: str + :param metadata: Free-form JSON metadata. + :type metadata: object + :param sha256: Optional content sha256 for verification. + :type sha256: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_create_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + content=content, + name=name, + parent_id=parent_id, + authorization=authorization, + content_type=content_type, + metadata=metadata, + sha256=sha256, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ArtifactOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def artifacts_create_with_http_info( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="The artifact bytes.")], + name: Annotated[StrictStr, Field(description="Artifact name.")], + parent_id: Annotated[StrictStr, Field(description="Destination folder id (fld_*).")], + authorization: Optional[StrictStr] = None, + content_type: Annotated[Optional[StrictStr], Field(description="Declared media type.")] = None, + metadata: Annotated[Optional[Dict[str, Any]], Field(description="Free-form JSON metadata.")] = None, + sha256: Annotated[Optional[StrictStr], Field(description="Optional content sha256 for verification.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ArtifactOut]: + """Create Artifact + + Create one artifact with inline content — multipart only. Multipart only (415 for a JSON body). Parts: parent_id, name, metadata, content (bytes), content_type, sha256. parent_id, name, and content are required. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param content: The artifact bytes. (required) + :type content: bytes + :param name: Artifact name. (required) + :type name: str + :param parent_id: Destination folder id (fld_*). (required) + :type parent_id: str + :param authorization: + :type authorization: str + :param content_type: Declared media type. + :type content_type: str + :param metadata: Free-form JSON metadata. + :type metadata: object + :param sha256: Optional content sha256 for verification. + :type sha256: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_create_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + content=content, + name=name, + parent_id=parent_id, + authorization=authorization, + content_type=content_type, + metadata=metadata, + sha256=sha256, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ArtifactOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def artifacts_create_without_preload_content( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="The artifact bytes.")], + name: Annotated[StrictStr, Field(description="Artifact name.")], + parent_id: Annotated[StrictStr, Field(description="Destination folder id (fld_*).")], + authorization: Optional[StrictStr] = None, + content_type: Annotated[Optional[StrictStr], Field(description="Declared media type.")] = None, + metadata: Annotated[Optional[Dict[str, Any]], Field(description="Free-form JSON metadata.")] = None, + sha256: Annotated[Optional[StrictStr], Field(description="Optional content sha256 for verification.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Artifact + + Create one artifact with inline content — multipart only. Multipart only (415 for a JSON body). Parts: parent_id, name, metadata, content (bytes), content_type, sha256. parent_id, name, and content are required. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param content: The artifact bytes. (required) + :type content: bytes + :param name: Artifact name. (required) + :type name: str + :param parent_id: Destination folder id (fld_*). (required) + :type parent_id: str + :param authorization: + :type authorization: str + :param content_type: Declared media type. + :type content_type: str + :param metadata: Free-form JSON metadata. + :type metadata: object + :param sha256: Optional content sha256 for verification. + :type sha256: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_create_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + content=content, + name=name, + parent_id=parent_id, + authorization=authorization, + content_type=content_type, + metadata=metadata, + sha256=sha256, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ArtifactOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _artifacts_create_serialize( + self, + drive_id, + idempotency_key, + content, + name, + parent_id, + authorization, + content_type, + metadata, + sha256, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + if content is not None: + _files['content'] = content + if content_type is not None: + _form_params.append(('content_type', content_type)) + if metadata is not None: + _form_params.append(('metadata', metadata)) + if name is not None: + _form_params.append(('name', name)) + if parent_id is not None: + _form_params.append(('parent_id', parent_id)) + if sha256 is not None: + _form_params.append(('sha256', sha256)) + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'multipart/form-data' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v0/drives/{drive_id}/artifacts', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def artifacts_delete( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ArtifactOut: + """Delete Artifact + + Soft-delete one artifact (its versions stay). + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_delete_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ArtifactOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def artifacts_delete_with_http_info( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ArtifactOut]: + """Delete Artifact + + Soft-delete one artifact (its versions stay). + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_delete_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ArtifactOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def artifacts_delete_without_preload_content( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Artifact + + Soft-delete one artifact (its versions stay). + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_delete_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ArtifactOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _artifacts_delete_serialize( + self, + drive_id, + artifact_id, + idempotency_key, + if_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if artifact_id is not None: + _path_params['artifact_id'] = artifact_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v0/drives/{drive_id}/artifacts/{artifact_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def artifacts_list( + self, + drive_id: StrictStr, + lifecycle: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + parent_id: Optional[StrictStr] = None, + name: Optional[StrictStr] = None, + content_type: Optional[StrictStr] = None, + label: Optional[StrictStr] = None, + updated_after: Optional[datetime] = None, + updated_before: Optional[datetime] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ArtifactListOut: + """List Artifacts + + List the drive's artifacts, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted artifacts. ``parent_id`` / ``name`` / ``content_type`` / ``label`` are exact-match filters; ``updated_after`` / ``updated_before`` are inclusive bounds. Unknown query parameters are rejected. + + :param drive_id: (required) + :type drive_id: str + :param lifecycle: + :type lifecycle: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param parent_id: + :type parent_id: str + :param name: + :type name: str + :param content_type: + :type content_type: str + :param label: + :type label: str + :param updated_after: + :type updated_after: datetime + :param updated_before: + :type updated_before: datetime + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_list_serialize( + drive_id=drive_id, + lifecycle=lifecycle, + limit=limit, + cursor=cursor, + parent_id=parent_id, + name=name, + content_type=content_type, + label=label, + updated_after=updated_after, + updated_before=updated_before, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ArtifactListOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def artifacts_list_with_http_info( + self, + drive_id: StrictStr, + lifecycle: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + parent_id: Optional[StrictStr] = None, + name: Optional[StrictStr] = None, + content_type: Optional[StrictStr] = None, + label: Optional[StrictStr] = None, + updated_after: Optional[datetime] = None, + updated_before: Optional[datetime] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ArtifactListOut]: + """List Artifacts + + List the drive's artifacts, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted artifacts. ``parent_id`` / ``name`` / ``content_type`` / ``label`` are exact-match filters; ``updated_after`` / ``updated_before`` are inclusive bounds. Unknown query parameters are rejected. + + :param drive_id: (required) + :type drive_id: str + :param lifecycle: + :type lifecycle: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param parent_id: + :type parent_id: str + :param name: + :type name: str + :param content_type: + :type content_type: str + :param label: + :type label: str + :param updated_after: + :type updated_after: datetime + :param updated_before: + :type updated_before: datetime + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_list_serialize( + drive_id=drive_id, + lifecycle=lifecycle, + limit=limit, + cursor=cursor, + parent_id=parent_id, + name=name, + content_type=content_type, + label=label, + updated_after=updated_after, + updated_before=updated_before, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ArtifactListOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def artifacts_list_without_preload_content( + self, + drive_id: StrictStr, + lifecycle: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + parent_id: Optional[StrictStr] = None, + name: Optional[StrictStr] = None, + content_type: Optional[StrictStr] = None, + label: Optional[StrictStr] = None, + updated_after: Optional[datetime] = None, + updated_before: Optional[datetime] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Artifacts + + List the drive's artifacts, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted artifacts. ``parent_id`` / ``name`` / ``content_type`` / ``label`` are exact-match filters; ``updated_after`` / ``updated_before`` are inclusive bounds. Unknown query parameters are rejected. + + :param drive_id: (required) + :type drive_id: str + :param lifecycle: + :type lifecycle: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param parent_id: + :type parent_id: str + :param name: + :type name: str + :param content_type: + :type content_type: str + :param label: + :type label: str + :param updated_after: + :type updated_after: datetime + :param updated_before: + :type updated_before: datetime + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_list_serialize( + drive_id=drive_id, + lifecycle=lifecycle, + limit=limit, + cursor=cursor, + parent_id=parent_id, + name=name, + content_type=content_type, + label=label, + updated_after=updated_after, + updated_before=updated_before, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ArtifactListOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _artifacts_list_serialize( + self, + drive_id, + lifecycle, + limit, + cursor, + parent_id, + name, + content_type, + label, + updated_after, + updated_before, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + # process the query parameters + if lifecycle is not None: + + _query_params.append(('lifecycle', lifecycle)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + if parent_id is not None: + + _query_params.append(('parent_id', parent_id)) + + if name is not None: + + _query_params.append(('name', name)) + + if content_type is not None: + + _query_params.append(('content_type', content_type)) + + if label is not None: + + _query_params.append(('label', label)) + + if updated_after is not None: + if isinstance(updated_after, datetime): + _query_params.append( + ( + 'updated_after', + updated_after.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('updated_after', updated_after)) + + if updated_before is not None: + if isinstance(updated_before, datetime): + _query_params.append( + ( + 'updated_before', + updated_before.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('updated_before', updated_before)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}/artifacts', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def artifacts_read( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ArtifactOut: + """Read Artifact + + Read one active artifact. ``If-None-Match`` short-circuits to 304. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_read_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ArtifactOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def artifacts_read_with_http_info( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ArtifactOut]: + """Read Artifact + + Read one active artifact. ``If-None-Match`` short-circuits to 304. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_read_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ArtifactOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def artifacts_read_without_preload_content( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Read Artifact + + Read one active artifact. ``If-None-Match`` short-circuits to 304. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_read_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ArtifactOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _artifacts_read_serialize( + self, + drive_id, + artifact_id, + if_none_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if artifact_id is not None: + _path_params['artifact_id'] = artifact_id + # process the query parameters + # process the header parameters + if if_none_match is not None: + _header_params['If-None-Match'] = if_none_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}/artifacts/{artifact_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def artifacts_restore( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ArtifactOut: + """Restore Artifact + + Restore a soft-deleted artifact atomically. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_restore_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ArtifactOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def artifacts_restore_with_http_info( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ArtifactOut]: + """Restore Artifact + + Restore a soft-deleted artifact atomically. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_restore_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ArtifactOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def artifacts_restore_without_preload_content( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Restore Artifact + + Restore a soft-deleted artifact atomically. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_restore_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ArtifactOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _artifacts_restore_serialize( + self, + drive_id, + artifact_id, + idempotency_key, + if_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if artifact_id is not None: + _path_params['artifact_id'] = artifact_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v0/drives/{drive_id}/artifacts/{artifact_id}/restore', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def artifacts_update( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + artifact_update_in: ArtifactUpdateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ArtifactOut: + """Update Artifact + + Rename / move / set metadata or labels. At least one field required. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param artifact_update_in: (required) + :type artifact_update_in: ArtifactUpdateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_update_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + idempotency_key=idempotency_key, + if_match=if_match, + artifact_update_in=artifact_update_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ArtifactOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def artifacts_update_with_http_info( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + artifact_update_in: ArtifactUpdateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ArtifactOut]: + """Update Artifact + + Rename / move / set metadata or labels. At least one field required. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param artifact_update_in: (required) + :type artifact_update_in: ArtifactUpdateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_update_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + idempotency_key=idempotency_key, + if_match=if_match, + artifact_update_in=artifact_update_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ArtifactOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def artifacts_update_without_preload_content( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + artifact_update_in: ArtifactUpdateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Artifact + + Rename / move / set metadata or labels. At least one field required. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param artifact_update_in: (required) + :type artifact_update_in: ArtifactUpdateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_update_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + idempotency_key=idempotency_key, + if_match=if_match, + artifact_update_in=artifact_update_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ArtifactOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _artifacts_update_serialize( + self, + drive_id, + artifact_id, + idempotency_key, + if_match, + artifact_update_in, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if artifact_id is not None: + _path_params['artifact_id'] = artifact_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if artifact_update_in is not None: + _body_params = artifact_update_in + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v0/drives/{drive_id}/artifacts/{artifact_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/api/changes_api.py b/sdk/python/src/agentdrive_sdk/generated/async_client/api/changes_api.py new file mode 100644 index 0000000..d833404 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/api/changes_api.py @@ -0,0 +1,386 @@ +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import StrictInt, StrictStr, field_validator +from typing import Optional +from agentdrive_sdk.generated.async_client.models.change_page_out import ChangePageOut + +from agentdrive_sdk.generated.async_client.api_client import ApiClient, RequestSerialized +from agentdrive_sdk.generated.async_client.api_response import ApiResponse +from agentdrive_sdk.generated.async_client.rest import RESTResponseType + + +class ChangesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def changes_list( + self, + drive_id: StrictStr, + limit: Optional[StrictInt] = None, + start: Optional[StrictStr] = None, + cursor: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ChangePageOut: + """List Changes + + Pull one page of changes. Exactly one of ``start`` or ``cursor``. + + :param drive_id: (required) + :type drive_id: str + :param limit: + :type limit: int + :param start: + :type start: str + :param cursor: + :type cursor: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._changes_list_serialize( + drive_id=drive_id, + limit=limit, + start=start, + cursor=cursor, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ChangePageOut", + '400': "DrivesList400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '410': "DrivesList400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def changes_list_with_http_info( + self, + drive_id: StrictStr, + limit: Optional[StrictInt] = None, + start: Optional[StrictStr] = None, + cursor: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ChangePageOut]: + """List Changes + + Pull one page of changes. Exactly one of ``start`` or ``cursor``. + + :param drive_id: (required) + :type drive_id: str + :param limit: + :type limit: int + :param start: + :type start: str + :param cursor: + :type cursor: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._changes_list_serialize( + drive_id=drive_id, + limit=limit, + start=start, + cursor=cursor, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ChangePageOut", + '400': "DrivesList400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '410': "DrivesList400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def changes_list_without_preload_content( + self, + drive_id: StrictStr, + limit: Optional[StrictInt] = None, + start: Optional[StrictStr] = None, + cursor: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Changes + + Pull one page of changes. Exactly one of ``start`` or ``cursor``. + + :param drive_id: (required) + :type drive_id: str + :param limit: + :type limit: int + :param start: + :type start: str + :param cursor: + :type cursor: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._changes_list_serialize( + drive_id=drive_id, + limit=limit, + start=start, + cursor=cursor, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ChangePageOut", + '400': "DrivesList400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '410': "DrivesList400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _changes_list_serialize( + self, + drive_id, + limit, + start, + cursor, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if start is not None: + + _query_params.append(('start', start)) + + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}/changes', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/api/default_api.py b/sdk/python/src/agentdrive_sdk/generated/async_client/api/default_api.py new file mode 100644 index 0000000..04d0b2d --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/api/default_api.py @@ -0,0 +1,281 @@ +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from agentdrive_sdk.generated.async_client.models.health_out import HealthOut + +from agentdrive_sdk.generated.async_client.api_client import ApiClient, RequestSerialized +from agentdrive_sdk.generated.async_client.api_response import ApiResponse +from agentdrive_sdk.generated.async_client.rest import RESTResponseType + + +class DefaultApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def health( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> HealthOut: + """Health + + Liveness + DB-reachability probe. Used by Cloud Run / k8s healthchecks and any uptime monitor. Returns 200 only if the DB pool can serve a trivial query; 503 otherwise so the orchestrator can pull the instance out of rotation. NOTE: route is `/health`, NOT `/healthz`. Google's edge infrastructure intercepts `/healthz` (legacy kubernetes-reserved path) and returns a generic 404 before traffic reaches Cloud Run — discovered the hard way during the first prod deploy. Don't rename back. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._health_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HealthOut", + '503': "HealthDegradedResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def health_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[HealthOut]: + """Health + + Liveness + DB-reachability probe. Used by Cloud Run / k8s healthchecks and any uptime monitor. Returns 200 only if the DB pool can serve a trivial query; 503 otherwise so the orchestrator can pull the instance out of rotation. NOTE: route is `/health`, NOT `/healthz`. Google's edge infrastructure intercepts `/healthz` (legacy kubernetes-reserved path) and returns a generic 404 before traffic reaches Cloud Run — discovered the hard way during the first prod deploy. Don't rename back. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._health_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HealthOut", + '503': "HealthDegradedResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def health_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Health + + Liveness + DB-reachability probe. Used by Cloud Run / k8s healthchecks and any uptime monitor. Returns 200 only if the DB pool can serve a trivial query; 503 otherwise so the orchestrator can pull the instance out of rotation. NOTE: route is `/health`, NOT `/healthz`. Google's edge infrastructure intercepts `/healthz` (legacy kubernetes-reserved path) and returns a generic 404 before traffic reaches Cloud Run — discovered the hard way during the first prod deploy. Don't rename back. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._health_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HealthOut", + '503': "HealthDegradedResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _health_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/health', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/api/discovery_api.py b/sdk/python/src/agentdrive_sdk/generated/async_client/api/discovery_api.py new file mode 100644 index 0000000..6ed5857 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/api/discovery_api.py @@ -0,0 +1,278 @@ +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from typing import Any, Dict + +from agentdrive_sdk.generated.async_client.api_client import ApiClient, RequestSerialized +from agentdrive_sdk.generated.async_client.api_response import ApiResponse +from agentdrive_sdk.generated.async_client.rest import RESTResponseType + + +class DiscoveryApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def oauth_protected_resource( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Dict[str, Optional[object]]: + """Protected-resource metadata (RFC 9728) + + Names the reset v0 surface as a protected resource and points clients at Hub — the only authorization server whose product tokens this deployment accepts. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._oauth_protected_resource_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, Optional[object]]", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def oauth_protected_resource_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Dict[str, Optional[object]]]: + """Protected-resource metadata (RFC 9728) + + Names the reset v0 surface as a protected resource and points clients at Hub — the only authorization server whose product tokens this deployment accepts. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._oauth_protected_resource_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, Optional[object]]", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def oauth_protected_resource_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Protected-resource metadata (RFC 9728) + + Names the reset v0 surface as a protected resource and points clients at Hub — the only authorization server whose product tokens this deployment accepts. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._oauth_protected_resource_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, Optional[object]]", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _oauth_protected_resource_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/.well-known/oauth-protected-resource', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/api/drives_api.py b/sdk/python/src/agentdrive_sdk/generated/async_client/api/drives_api.py new file mode 100644 index 0000000..044918a --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/api/drives_api.py @@ -0,0 +1,2354 @@ +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import StrictInt, StrictStr +from typing import Optional +from agentdrive_sdk.generated.async_client.models.drive_create_in import DriveCreateIn +from agentdrive_sdk.generated.async_client.models.drive_list_out import DriveListOut +from agentdrive_sdk.generated.async_client.models.drive_out import DriveOut +from agentdrive_sdk.generated.async_client.models.drive_update_in import DriveUpdateIn +from agentdrive_sdk.generated.async_client.models.drive_usage_out import DriveUsageOut + +from agentdrive_sdk.generated.async_client.api_client import ApiClient, RequestSerialized +from agentdrive_sdk.generated.async_client.api_response import ApiResponse +from agentdrive_sdk.generated.async_client.rest import RESTResponseType + + +class DrivesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def drives_create( + self, + idempotency_key: Optional[StrictStr], + drive_create_in: DriveCreateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DriveOut: + """Create Drive + + Create a drive with its structural root folder and creator-manager grant(s) in one transaction; idempotent under the ``Idempotency-Key``. + + :param idempotency_key: (required) + :type idempotency_key: str + :param drive_create_in: (required) + :type drive_create_in: DriveCreateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_create_serialize( + idempotency_key=idempotency_key, + drive_create_in=drive_create_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "DriveOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesList400Response", + '409': "DrivesList400Response", + '412': "DrivesList400Response", + '422': "ValidationErrorResponse", + '428': "DrivesList400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def drives_create_with_http_info( + self, + idempotency_key: Optional[StrictStr], + drive_create_in: DriveCreateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DriveOut]: + """Create Drive + + Create a drive with its structural root folder and creator-manager grant(s) in one transaction; idempotent under the ``Idempotency-Key``. + + :param idempotency_key: (required) + :type idempotency_key: str + :param drive_create_in: (required) + :type drive_create_in: DriveCreateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_create_serialize( + idempotency_key=idempotency_key, + drive_create_in=drive_create_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "DriveOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesList400Response", + '409': "DrivesList400Response", + '412': "DrivesList400Response", + '422': "ValidationErrorResponse", + '428': "DrivesList400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def drives_create_without_preload_content( + self, + idempotency_key: Optional[StrictStr], + drive_create_in: DriveCreateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Drive + + Create a drive with its structural root folder and creator-manager grant(s) in one transaction; idempotent under the ``Idempotency-Key``. + + :param idempotency_key: (required) + :type idempotency_key: str + :param drive_create_in: (required) + :type drive_create_in: DriveCreateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_create_serialize( + idempotency_key=idempotency_key, + drive_create_in=drive_create_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "DriveOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesList400Response", + '409': "DrivesList400Response", + '412': "DrivesList400Response", + '422': "ValidationErrorResponse", + '428': "DrivesList400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _drives_create_serialize( + self, + idempotency_key, + drive_create_in, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if drive_create_in is not None: + _body_params = drive_create_in + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v0/drives', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def drives_delete( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DriveOut: + """Delete Drive + + Soft-delete a drive. Returns 200 with the deleted representation so the client has the post-delete revision/ETag for a restore. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_delete_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesList400Response", + '412': "DrivesList400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def drives_delete_with_http_info( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DriveOut]: + """Delete Drive + + Soft-delete a drive. Returns 200 with the deleted representation so the client has the post-delete revision/ETag for a restore. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_delete_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesList400Response", + '412': "DrivesList400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def drives_delete_without_preload_content( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Drive + + Soft-delete a drive. Returns 200 with the deleted representation so the client has the post-delete revision/ETag for a restore. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_delete_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesList400Response", + '412': "DrivesList400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _drives_delete_serialize( + self, + drive_id, + idempotency_key, + if_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v0/drives/{drive_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def drives_list( + self, + lifecycle: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DriveListOut: + """List Drives + + List the actor's workspace drives, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted drives so a manager can read the post-delete revision as the If-Match source for a restore. Unknown query parameters are rejected (§6.3). + + :param lifecycle: + :type lifecycle: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_list_serialize( + lifecycle=lifecycle, + limit=limit, + cursor=cursor, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveListOut", + '400': "DrivesList400Response", + '401': "DrivesList400Response", + '403': "DrivesList400Response", + '404': "DrivesList400Response", + '422': "ValidationErrorResponse", + '429': "DrivesList400Response", + '503': "DrivesList400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def drives_list_with_http_info( + self, + lifecycle: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DriveListOut]: + """List Drives + + List the actor's workspace drives, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted drives so a manager can read the post-delete revision as the If-Match source for a restore. Unknown query parameters are rejected (§6.3). + + :param lifecycle: + :type lifecycle: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_list_serialize( + lifecycle=lifecycle, + limit=limit, + cursor=cursor, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveListOut", + '400': "DrivesList400Response", + '401': "DrivesList400Response", + '403': "DrivesList400Response", + '404': "DrivesList400Response", + '422': "ValidationErrorResponse", + '429': "DrivesList400Response", + '503': "DrivesList400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def drives_list_without_preload_content( + self, + lifecycle: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Drives + + List the actor's workspace drives, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted drives so a manager can read the post-delete revision as the If-Match source for a restore. Unknown query parameters are rejected (§6.3). + + :param lifecycle: + :type lifecycle: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_list_serialize( + lifecycle=lifecycle, + limit=limit, + cursor=cursor, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveListOut", + '400': "DrivesList400Response", + '401': "DrivesList400Response", + '403': "DrivesList400Response", + '404': "DrivesList400Response", + '422': "ValidationErrorResponse", + '429': "DrivesList400Response", + '503': "DrivesList400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _drives_list_serialize( + self, + lifecycle, + limit, + cursor, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if lifecycle is not None: + + _query_params.append(('lifecycle', lifecycle)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def drives_read( + self, + drive_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DriveOut: + """Read Drive + + Read one active drive. ETag = quoted revision; matching ``If-None-Match`` → 304. Deleted and cross-workspace drives are 404. + + :param drive_id: (required) + :type drive_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_read_serialize( + drive_id=drive_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def drives_read_with_http_info( + self, + drive_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DriveOut]: + """Read Drive + + Read one active drive. ETag = quoted revision; matching ``If-None-Match`` → 304. Deleted and cross-workspace drives are 404. + + :param drive_id: (required) + :type drive_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_read_serialize( + drive_id=drive_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def drives_read_without_preload_content( + self, + drive_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Read Drive + + Read one active drive. ETag = quoted revision; matching ``If-None-Match`` → 304. Deleted and cross-workspace drives are 404. + + :param drive_id: (required) + :type drive_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_read_serialize( + drive_id=drive_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _drives_read_serialize( + self, + drive_id, + if_none_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + # process the query parameters + # process the header parameters + if if_none_match is not None: + _header_params['If-None-Match'] = if_none_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def drives_restore( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DriveOut: + """Restore Drive + + Restore a soft-deleted drive. If-Match must carry the post-delete revision; restoring an already-active drive is 409 CONFLICT. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_restore_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def drives_restore_with_http_info( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DriveOut]: + """Restore Drive + + Restore a soft-deleted drive. If-Match must carry the post-delete revision; restoring an already-active drive is 409 CONFLICT. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_restore_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def drives_restore_without_preload_content( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Restore Drive + + Restore a soft-deleted drive. If-Match must carry the post-delete revision; restoring an already-active drive is 409 CONFLICT. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_restore_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _drives_restore_serialize( + self, + drive_id, + idempotency_key, + if_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v0/drives/{drive_id}/restore', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def drives_update( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + drive_update_in: DriveUpdateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DriveOut: + """Update Drive + + Rename / update a drive's metadata. Requires ``Idempotency-Key`` and ``If-Match`` (428 absent, 412 stale); bumps the revision. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param drive_update_in: (required) + :type drive_update_in: DriveUpdateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_update_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + if_match=if_match, + drive_update_in=drive_update_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def drives_update_with_http_info( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + drive_update_in: DriveUpdateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DriveOut]: + """Update Drive + + Rename / update a drive's metadata. Requires ``Idempotency-Key`` and ``If-Match`` (428 absent, 412 stale); bumps the revision. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param drive_update_in: (required) + :type drive_update_in: DriveUpdateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_update_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + if_match=if_match, + drive_update_in=drive_update_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def drives_update_without_preload_content( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + drive_update_in: DriveUpdateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Drive + + Rename / update a drive's metadata. Requires ``Idempotency-Key`` and ``If-Match`` (428 absent, 412 stale); bumps the revision. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param drive_update_in: (required) + :type drive_update_in: DriveUpdateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_update_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + if_match=if_match, + drive_update_in=drive_update_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _drives_update_serialize( + self, + drive_id, + idempotency_key, + if_match, + drive_update_in, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if drive_update_in is not None: + _body_params = drive_update_in + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v0/drives/{drive_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def drives_usage( + self, + drive_id: StrictStr, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DriveUsageOut: + """Drive Usage + + Byte counters for one active drive: storage is the live sum of its versions' sizes; retrieval reads the counter the content-read slice maintains (0 until it lands). + + :param drive_id: (required) + :type drive_id: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_usage_serialize( + drive_id=drive_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveUsageOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def drives_usage_with_http_info( + self, + drive_id: StrictStr, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DriveUsageOut]: + """Drive Usage + + Byte counters for one active drive: storage is the live sum of its versions' sizes; retrieval reads the counter the content-read slice maintains (0 until it lands). + + :param drive_id: (required) + :type drive_id: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_usage_serialize( + drive_id=drive_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveUsageOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def drives_usage_without_preload_content( + self, + drive_id: StrictStr, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Drive Usage + + Byte counters for one active drive: storage is the live sum of its versions' sizes; retrieval reads the counter the content-read slice maintains (0 until it lands). + + :param drive_id: (required) + :type drive_id: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_usage_serialize( + drive_id=drive_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveUsageOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _drives_usage_serialize( + self, + drive_id, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + # process the query parameters + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}/usage', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/api/folders_api.py b/sdk/python/src/agentdrive_sdk/generated/async_client/api/folders_api.py new file mode 100644 index 0000000..7330f0f --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/api/folders_api.py @@ -0,0 +1,2578 @@ +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import StrictBool, StrictInt, StrictStr +from typing import Optional +from agentdrive_sdk.generated.async_client.models.folder_cascade_out import FolderCascadeOut +from agentdrive_sdk.generated.async_client.models.folder_copy_in import FolderCopyIn +from agentdrive_sdk.generated.async_client.models.folder_create_in import FolderCreateIn +from agentdrive_sdk.generated.async_client.models.folder_list_out import FolderListOut +from agentdrive_sdk.generated.async_client.models.folder_out import FolderOut +from agentdrive_sdk.generated.async_client.models.folder_update_in import FolderUpdateIn + +from agentdrive_sdk.generated.async_client.api_client import ApiClient, RequestSerialized +from agentdrive_sdk.generated.async_client.api_response import ApiResponse +from agentdrive_sdk.generated.async_client.rest import RESTResponseType + + +class FoldersApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def folders_copy( + self, + drive_id: StrictStr, + folder_id: StrictStr, + idempotency_key: Optional[StrictStr], + folder_copy_in: FolderCopyIn, + if_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FolderOut: + """Copy Folder + + Copy a folder's subtree within the same drive. Cross-drive copy is out of v0 scope and rejected (400 INVALID_ARGUMENT). ``destination_drive_id`` must equal the source drive when present. Materializes the subtree synchronously → 201 + the copied folder. ``If-Match`` is optional; when present it is validated against the source revision (412 stale). + + :param drive_id: (required) + :type drive_id: str + :param folder_id: (required) + :type folder_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param folder_copy_in: (required) + :type folder_copy_in: FolderCopyIn + :param if_match: + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_copy_serialize( + drive_id=drive_id, + folder_id=folder_id, + idempotency_key=idempotency_key, + folder_copy_in=folder_copy_in, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "FolderOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def folders_copy_with_http_info( + self, + drive_id: StrictStr, + folder_id: StrictStr, + idempotency_key: Optional[StrictStr], + folder_copy_in: FolderCopyIn, + if_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FolderOut]: + """Copy Folder + + Copy a folder's subtree within the same drive. Cross-drive copy is out of v0 scope and rejected (400 INVALID_ARGUMENT). ``destination_drive_id`` must equal the source drive when present. Materializes the subtree synchronously → 201 + the copied folder. ``If-Match`` is optional; when present it is validated against the source revision (412 stale). + + :param drive_id: (required) + :type drive_id: str + :param folder_id: (required) + :type folder_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param folder_copy_in: (required) + :type folder_copy_in: FolderCopyIn + :param if_match: + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_copy_serialize( + drive_id=drive_id, + folder_id=folder_id, + idempotency_key=idempotency_key, + folder_copy_in=folder_copy_in, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "FolderOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def folders_copy_without_preload_content( + self, + drive_id: StrictStr, + folder_id: StrictStr, + idempotency_key: Optional[StrictStr], + folder_copy_in: FolderCopyIn, + if_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Copy Folder + + Copy a folder's subtree within the same drive. Cross-drive copy is out of v0 scope and rejected (400 INVALID_ARGUMENT). ``destination_drive_id`` must equal the source drive when present. Materializes the subtree synchronously → 201 + the copied folder. ``If-Match`` is optional; when present it is validated against the source revision (412 stale). + + :param drive_id: (required) + :type drive_id: str + :param folder_id: (required) + :type folder_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param folder_copy_in: (required) + :type folder_copy_in: FolderCopyIn + :param if_match: + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_copy_serialize( + drive_id=drive_id, + folder_id=folder_id, + idempotency_key=idempotency_key, + folder_copy_in=folder_copy_in, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "FolderOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _folders_copy_serialize( + self, + drive_id, + folder_id, + idempotency_key, + folder_copy_in, + if_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if folder_id is not None: + _path_params['folder_id'] = folder_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if folder_copy_in is not None: + _body_params = folder_copy_in + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v0/drives/{drive_id}/folders/{folder_id}/copy', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def folders_create( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + folder_create_in: FolderCreateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FolderOut: + """Create Folder + + Create one folder under `parent_id`; idempotent under the ``Idempotency-Key``. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param folder_create_in: (required) + :type folder_create_in: FolderCreateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_create_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + folder_create_in=folder_create_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "FolderOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def folders_create_with_http_info( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + folder_create_in: FolderCreateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FolderOut]: + """Create Folder + + Create one folder under `parent_id`; idempotent under the ``Idempotency-Key``. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param folder_create_in: (required) + :type folder_create_in: FolderCreateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_create_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + folder_create_in=folder_create_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "FolderOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def folders_create_without_preload_content( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + folder_create_in: FolderCreateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Folder + + Create one folder under `parent_id`; idempotent under the ``Idempotency-Key``. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param folder_create_in: (required) + :type folder_create_in: FolderCreateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_create_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + folder_create_in=folder_create_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "FolderOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _folders_create_serialize( + self, + drive_id, + idempotency_key, + folder_create_in, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if folder_create_in is not None: + _body_params = folder_create_in + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v0/drives/{drive_id}/folders', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def folders_delete( + self, + drive_id: StrictStr, + folder_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + recursive: Optional[StrictBool] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FolderCascadeOut: + """Delete Folder + + Soft-delete a folder and its full live subtree (folders + artifacts) in one transaction. A non-empty subtree requires ``recursive=true`` (409 FOLDER_RECURSIVE_REQUIRED otherwise). Returns the deleted root representation plus exact cascade counts and the post-delete revision/ETag for a restore. + + :param drive_id: (required) + :type drive_id: str + :param folder_id: (required) + :type folder_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param recursive: + :type recursive: bool + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_delete_serialize( + drive_id=drive_id, + folder_id=folder_id, + idempotency_key=idempotency_key, + if_match=if_match, + recursive=recursive, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderCascadeOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def folders_delete_with_http_info( + self, + drive_id: StrictStr, + folder_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + recursive: Optional[StrictBool] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FolderCascadeOut]: + """Delete Folder + + Soft-delete a folder and its full live subtree (folders + artifacts) in one transaction. A non-empty subtree requires ``recursive=true`` (409 FOLDER_RECURSIVE_REQUIRED otherwise). Returns the deleted root representation plus exact cascade counts and the post-delete revision/ETag for a restore. + + :param drive_id: (required) + :type drive_id: str + :param folder_id: (required) + :type folder_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param recursive: + :type recursive: bool + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_delete_serialize( + drive_id=drive_id, + folder_id=folder_id, + idempotency_key=idempotency_key, + if_match=if_match, + recursive=recursive, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderCascadeOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def folders_delete_without_preload_content( + self, + drive_id: StrictStr, + folder_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + recursive: Optional[StrictBool] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Folder + + Soft-delete a folder and its full live subtree (folders + artifacts) in one transaction. A non-empty subtree requires ``recursive=true`` (409 FOLDER_RECURSIVE_REQUIRED otherwise). Returns the deleted root representation plus exact cascade counts and the post-delete revision/ETag for a restore. + + :param drive_id: (required) + :type drive_id: str + :param folder_id: (required) + :type folder_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param recursive: + :type recursive: bool + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_delete_serialize( + drive_id=drive_id, + folder_id=folder_id, + idempotency_key=idempotency_key, + if_match=if_match, + recursive=recursive, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderCascadeOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _folders_delete_serialize( + self, + drive_id, + folder_id, + idempotency_key, + if_match, + recursive, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if folder_id is not None: + _path_params['folder_id'] = folder_id + # process the query parameters + if recursive is not None: + + _query_params.append(('recursive', recursive)) + + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v0/drives/{drive_id}/folders/{folder_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def folders_list( + self, + drive_id: StrictStr, + lifecycle: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + parent_id: Optional[StrictStr] = None, + name: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FolderListOut: + """List Folders + + List the drive's folders, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted folders so the post-delete revision can be read as the If-Match source for a restore. ``parent_id`` / ``name`` are exact-match filters. Unknown query parameters are rejected (§6.3). + + :param drive_id: (required) + :type drive_id: str + :param lifecycle: + :type lifecycle: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param parent_id: + :type parent_id: str + :param name: + :type name: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_list_serialize( + drive_id=drive_id, + lifecycle=lifecycle, + limit=limit, + cursor=cursor, + parent_id=parent_id, + name=name, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderListOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def folders_list_with_http_info( + self, + drive_id: StrictStr, + lifecycle: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + parent_id: Optional[StrictStr] = None, + name: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FolderListOut]: + """List Folders + + List the drive's folders, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted folders so the post-delete revision can be read as the If-Match source for a restore. ``parent_id`` / ``name`` are exact-match filters. Unknown query parameters are rejected (§6.3). + + :param drive_id: (required) + :type drive_id: str + :param lifecycle: + :type lifecycle: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param parent_id: + :type parent_id: str + :param name: + :type name: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_list_serialize( + drive_id=drive_id, + lifecycle=lifecycle, + limit=limit, + cursor=cursor, + parent_id=parent_id, + name=name, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderListOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def folders_list_without_preload_content( + self, + drive_id: StrictStr, + lifecycle: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + parent_id: Optional[StrictStr] = None, + name: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Folders + + List the drive's folders, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted folders so the post-delete revision can be read as the If-Match source for a restore. ``parent_id`` / ``name`` are exact-match filters. Unknown query parameters are rejected (§6.3). + + :param drive_id: (required) + :type drive_id: str + :param lifecycle: + :type lifecycle: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param parent_id: + :type parent_id: str + :param name: + :type name: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_list_serialize( + drive_id=drive_id, + lifecycle=lifecycle, + limit=limit, + cursor=cursor, + parent_id=parent_id, + name=name, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderListOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _folders_list_serialize( + self, + drive_id, + lifecycle, + limit, + cursor, + parent_id, + name, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + # process the query parameters + if lifecycle is not None: + + _query_params.append(('lifecycle', lifecycle)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + if parent_id is not None: + + _query_params.append(('parent_id', parent_id)) + + if name is not None: + + _query_params.append(('name', name)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}/folders', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def folders_read( + self, + drive_id: StrictStr, + folder_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FolderOut: + """Read Folder + + Read one active folder. ETag = quoted revision; matching ``If-None-Match`` → 304. Deleted and cross-workspace folders are 404. + + :param drive_id: (required) + :type drive_id: str + :param folder_id: (required) + :type folder_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_read_serialize( + drive_id=drive_id, + folder_id=folder_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def folders_read_with_http_info( + self, + drive_id: StrictStr, + folder_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FolderOut]: + """Read Folder + + Read one active folder. ETag = quoted revision; matching ``If-None-Match`` → 304. Deleted and cross-workspace folders are 404. + + :param drive_id: (required) + :type drive_id: str + :param folder_id: (required) + :type folder_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_read_serialize( + drive_id=drive_id, + folder_id=folder_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def folders_read_without_preload_content( + self, + drive_id: StrictStr, + folder_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Read Folder + + Read one active folder. ETag = quoted revision; matching ``If-None-Match`` → 304. Deleted and cross-workspace folders are 404. + + :param drive_id: (required) + :type drive_id: str + :param folder_id: (required) + :type folder_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_read_serialize( + drive_id=drive_id, + folder_id=folder_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _folders_read_serialize( + self, + drive_id, + folder_id, + if_none_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if folder_id is not None: + _path_params['folder_id'] = folder_id + # process the query parameters + # process the header parameters + if if_none_match is not None: + _header_params['If-None-Match'] = if_none_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}/folders/{folder_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def folders_restore( + self, + drive_id: StrictStr, + folder_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FolderCascadeOut: + """Restore Folder + + Restore a soft-deleted folder and its deleted subtree atomically. If-Match must carry the post-delete revision; restoring an already-active folder is 409 CONFLICT. + + :param drive_id: (required) + :type drive_id: str + :param folder_id: (required) + :type folder_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_restore_serialize( + drive_id=drive_id, + folder_id=folder_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderCascadeOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def folders_restore_with_http_info( + self, + drive_id: StrictStr, + folder_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FolderCascadeOut]: + """Restore Folder + + Restore a soft-deleted folder and its deleted subtree atomically. If-Match must carry the post-delete revision; restoring an already-active folder is 409 CONFLICT. + + :param drive_id: (required) + :type drive_id: str + :param folder_id: (required) + :type folder_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_restore_serialize( + drive_id=drive_id, + folder_id=folder_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderCascadeOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def folders_restore_without_preload_content( + self, + drive_id: StrictStr, + folder_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Restore Folder + + Restore a soft-deleted folder and its deleted subtree atomically. If-Match must carry the post-delete revision; restoring an already-active folder is 409 CONFLICT. + + :param drive_id: (required) + :type drive_id: str + :param folder_id: (required) + :type folder_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_restore_serialize( + drive_id=drive_id, + folder_id=folder_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderCascadeOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _folders_restore_serialize( + self, + drive_id, + folder_id, + idempotency_key, + if_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if folder_id is not None: + _path_params['folder_id'] = folder_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v0/drives/{drive_id}/folders/{folder_id}/restore', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def folders_update( + self, + drive_id: StrictStr, + folder_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + folder_update_in: FolderUpdateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FolderOut: + """Update Folder + + Rename / move / update a folder's metadata or inheritance. Requires ``Idempotency-Key`` and ``If-Match`` (428 absent, 412 stale); bumps the revision. + + :param drive_id: (required) + :type drive_id: str + :param folder_id: (required) + :type folder_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param folder_update_in: (required) + :type folder_update_in: FolderUpdateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_update_serialize( + drive_id=drive_id, + folder_id=folder_id, + idempotency_key=idempotency_key, + if_match=if_match, + folder_update_in=folder_update_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def folders_update_with_http_info( + self, + drive_id: StrictStr, + folder_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + folder_update_in: FolderUpdateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FolderOut]: + """Update Folder + + Rename / move / update a folder's metadata or inheritance. Requires ``Idempotency-Key`` and ``If-Match`` (428 absent, 412 stale); bumps the revision. + + :param drive_id: (required) + :type drive_id: str + :param folder_id: (required) + :type folder_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param folder_update_in: (required) + :type folder_update_in: FolderUpdateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_update_serialize( + drive_id=drive_id, + folder_id=folder_id, + idempotency_key=idempotency_key, + if_match=if_match, + folder_update_in=folder_update_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def folders_update_without_preload_content( + self, + drive_id: StrictStr, + folder_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + folder_update_in: FolderUpdateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Folder + + Rename / move / update a folder's metadata or inheritance. Requires ``Idempotency-Key`` and ``If-Match`` (428 absent, 412 stale); bumps the revision. + + :param drive_id: (required) + :type drive_id: str + :param folder_id: (required) + :type folder_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param folder_update_in: (required) + :type folder_update_in: FolderUpdateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_update_serialize( + drive_id=drive_id, + folder_id=folder_id, + idempotency_key=idempotency_key, + if_match=if_match, + folder_update_in=folder_update_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _folders_update_serialize( + self, + drive_id, + folder_id, + idempotency_key, + if_match, + folder_update_in, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if folder_id is not None: + _path_params['folder_id'] = folder_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if folder_update_in is not None: + _body_params = folder_update_in + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v0/drives/{drive_id}/folders/{folder_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/api/grants_api.py b/sdk/python/src/agentdrive_sdk/generated/async_client/api/grants_api.py new file mode 100644 index 0000000..14bf064 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/api/grants_api.py @@ -0,0 +1,1846 @@ +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import StrictInt, StrictStr +from typing import Optional +from agentdrive_sdk.generated.async_client.models.grant_create_in import GrantCreateIn +from agentdrive_sdk.generated.async_client.models.grant_list_out import GrantListOut +from agentdrive_sdk.generated.async_client.models.grant_out import GrantOut +from agentdrive_sdk.generated.async_client.models.grant_update_in import GrantUpdateIn + +from agentdrive_sdk.generated.async_client.api_client import ApiClient, RequestSerialized +from agentdrive_sdk.generated.async_client.api_response import ApiResponse +from agentdrive_sdk.generated.async_client.rest import RESTResponseType + + +class GrantsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def grants_create( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + grant_create_in: GrantCreateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GrantOut: + """Create Grant + + Grant one principal a role on a drive, folder, or artifact. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param grant_create_in: (required) + :type grant_create_in: GrantCreateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._grants_create_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + grant_create_in=grant_create_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "GrantOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def grants_create_with_http_info( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + grant_create_in: GrantCreateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GrantOut]: + """Create Grant + + Grant one principal a role on a drive, folder, or artifact. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param grant_create_in: (required) + :type grant_create_in: GrantCreateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._grants_create_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + grant_create_in=grant_create_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "GrantOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def grants_create_without_preload_content( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + grant_create_in: GrantCreateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Grant + + Grant one principal a role on a drive, folder, or artifact. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param grant_create_in: (required) + :type grant_create_in: GrantCreateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._grants_create_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + grant_create_in=grant_create_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "GrantOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _grants_create_serialize( + self, + drive_id, + idempotency_key, + grant_create_in, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if grant_create_in is not None: + _body_params = grant_create_in + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v0/drives/{drive_id}/grants', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def grants_list( + self, + drive_id: StrictStr, + lifecycle: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + resource_type: Optional[StrictStr] = None, + resource_id: Optional[StrictStr] = None, + principal_type: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GrantListOut: + """List Grants + + List explicit grants in the drive, keyset paginated. **What you see depends on your role (contract change).** A caller holding ``manager`` on the drive lists EVERY grant in it. Any other caller lists only the grants that name them — their own agent/user rows, ``workspace`` grants covering them, and ``public`` grants (which already expose the resource to them anyway). Previously any drive ``viewer`` could page out every principal id, role and expiry in the drive; that was an access-graph disclosure, not a feature. The operation is refused (404) only for a caller holding no live grant anywhere in the drive — never for lack of ``manager``, because seeing your own access is not a privilege. That admits folder-scoped principals, who previously 404'd here despite having access to show. A folder ``manager`` still sees only their own rows, not the roster of the subtree they administer; scoping the listing by per-resource administration authority is a follow-up this change does not claim. ``resource_id`` filters to one resource's grants and REQUIRES ``resource_type`` alongside it — a bare resource id is ambiguous across the three resource kinds, and guessing the kind from the id prefix would make the filter's meaning depend on an id format the contract does not promise to keep. ``resource_type`` on its own remains a valid (and pre-existing) filter. + + :param drive_id: (required) + :type drive_id: str + :param lifecycle: + :type lifecycle: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param resource_type: + :type resource_type: str + :param resource_id: + :type resource_id: str + :param principal_type: + :type principal_type: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._grants_list_serialize( + drive_id=drive_id, + lifecycle=lifecycle, + limit=limit, + cursor=cursor, + resource_type=resource_type, + resource_id=resource_id, + principal_type=principal_type, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GrantListOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def grants_list_with_http_info( + self, + drive_id: StrictStr, + lifecycle: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + resource_type: Optional[StrictStr] = None, + resource_id: Optional[StrictStr] = None, + principal_type: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GrantListOut]: + """List Grants + + List explicit grants in the drive, keyset paginated. **What you see depends on your role (contract change).** A caller holding ``manager`` on the drive lists EVERY grant in it. Any other caller lists only the grants that name them — their own agent/user rows, ``workspace`` grants covering them, and ``public`` grants (which already expose the resource to them anyway). Previously any drive ``viewer`` could page out every principal id, role and expiry in the drive; that was an access-graph disclosure, not a feature. The operation is refused (404) only for a caller holding no live grant anywhere in the drive — never for lack of ``manager``, because seeing your own access is not a privilege. That admits folder-scoped principals, who previously 404'd here despite having access to show. A folder ``manager`` still sees only their own rows, not the roster of the subtree they administer; scoping the listing by per-resource administration authority is a follow-up this change does not claim. ``resource_id`` filters to one resource's grants and REQUIRES ``resource_type`` alongside it — a bare resource id is ambiguous across the three resource kinds, and guessing the kind from the id prefix would make the filter's meaning depend on an id format the contract does not promise to keep. ``resource_type`` on its own remains a valid (and pre-existing) filter. + + :param drive_id: (required) + :type drive_id: str + :param lifecycle: + :type lifecycle: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param resource_type: + :type resource_type: str + :param resource_id: + :type resource_id: str + :param principal_type: + :type principal_type: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._grants_list_serialize( + drive_id=drive_id, + lifecycle=lifecycle, + limit=limit, + cursor=cursor, + resource_type=resource_type, + resource_id=resource_id, + principal_type=principal_type, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GrantListOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def grants_list_without_preload_content( + self, + drive_id: StrictStr, + lifecycle: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + resource_type: Optional[StrictStr] = None, + resource_id: Optional[StrictStr] = None, + principal_type: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Grants + + List explicit grants in the drive, keyset paginated. **What you see depends on your role (contract change).** A caller holding ``manager`` on the drive lists EVERY grant in it. Any other caller lists only the grants that name them — their own agent/user rows, ``workspace`` grants covering them, and ``public`` grants (which already expose the resource to them anyway). Previously any drive ``viewer`` could page out every principal id, role and expiry in the drive; that was an access-graph disclosure, not a feature. The operation is refused (404) only for a caller holding no live grant anywhere in the drive — never for lack of ``manager``, because seeing your own access is not a privilege. That admits folder-scoped principals, who previously 404'd here despite having access to show. A folder ``manager`` still sees only their own rows, not the roster of the subtree they administer; scoping the listing by per-resource administration authority is a follow-up this change does not claim. ``resource_id`` filters to one resource's grants and REQUIRES ``resource_type`` alongside it — a bare resource id is ambiguous across the three resource kinds, and guessing the kind from the id prefix would make the filter's meaning depend on an id format the contract does not promise to keep. ``resource_type`` on its own remains a valid (and pre-existing) filter. + + :param drive_id: (required) + :type drive_id: str + :param lifecycle: + :type lifecycle: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param resource_type: + :type resource_type: str + :param resource_id: + :type resource_id: str + :param principal_type: + :type principal_type: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._grants_list_serialize( + drive_id=drive_id, + lifecycle=lifecycle, + limit=limit, + cursor=cursor, + resource_type=resource_type, + resource_id=resource_id, + principal_type=principal_type, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GrantListOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _grants_list_serialize( + self, + drive_id, + lifecycle, + limit, + cursor, + resource_type, + resource_id, + principal_type, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + # process the query parameters + if lifecycle is not None: + + _query_params.append(('lifecycle', lifecycle)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + if resource_type is not None: + + _query_params.append(('resource_type', resource_type)) + + if resource_id is not None: + + _query_params.append(('resource_id', resource_id)) + + if principal_type is not None: + + _query_params.append(('principal_type', principal_type)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}/grants', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def grants_read( + self, + drive_id: StrictStr, + grant_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GrantOut: + """Read Grant + + Read one grant in the drive. + + :param drive_id: (required) + :type drive_id: str + :param grant_id: (required) + :type grant_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._grants_read_serialize( + drive_id=drive_id, + grant_id=grant_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GrantOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def grants_read_with_http_info( + self, + drive_id: StrictStr, + grant_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GrantOut]: + """Read Grant + + Read one grant in the drive. + + :param drive_id: (required) + :type drive_id: str + :param grant_id: (required) + :type grant_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._grants_read_serialize( + drive_id=drive_id, + grant_id=grant_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GrantOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def grants_read_without_preload_content( + self, + drive_id: StrictStr, + grant_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Read Grant + + Read one grant in the drive. + + :param drive_id: (required) + :type drive_id: str + :param grant_id: (required) + :type grant_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._grants_read_serialize( + drive_id=drive_id, + grant_id=grant_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GrantOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _grants_read_serialize( + self, + drive_id, + grant_id, + if_none_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if grant_id is not None: + _path_params['grant_id'] = grant_id + # process the query parameters + # process the header parameters + if if_none_match is not None: + _header_params['If-None-Match'] = if_none_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}/grants/{grant_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def grants_revoke( + self, + drive_id: StrictStr, + grant_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GrantOut: + """Revoke Grant + + Revoke a grant (soft, sets revoked_at) under If-Match. + + :param drive_id: (required) + :type drive_id: str + :param grant_id: (required) + :type grant_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._grants_revoke_serialize( + drive_id=drive_id, + grant_id=grant_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GrantOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def grants_revoke_with_http_info( + self, + drive_id: StrictStr, + grant_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GrantOut]: + """Revoke Grant + + Revoke a grant (soft, sets revoked_at) under If-Match. + + :param drive_id: (required) + :type drive_id: str + :param grant_id: (required) + :type grant_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._grants_revoke_serialize( + drive_id=drive_id, + grant_id=grant_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GrantOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def grants_revoke_without_preload_content( + self, + drive_id: StrictStr, + grant_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Revoke Grant + + Revoke a grant (soft, sets revoked_at) under If-Match. + + :param drive_id: (required) + :type drive_id: str + :param grant_id: (required) + :type grant_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._grants_revoke_serialize( + drive_id=drive_id, + grant_id=grant_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GrantOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _grants_revoke_serialize( + self, + drive_id, + grant_id, + idempotency_key, + if_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if grant_id is not None: + _path_params['grant_id'] = grant_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v0/drives/{drive_id}/grants/{grant_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def grants_update( + self, + drive_id: StrictStr, + grant_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + grant_update_in: GrantUpdateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GrantOut: + """Update Grant + + Change a grant's role or expiry under If-Match. + + :param drive_id: (required) + :type drive_id: str + :param grant_id: (required) + :type grant_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param grant_update_in: (required) + :type grant_update_in: GrantUpdateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._grants_update_serialize( + drive_id=drive_id, + grant_id=grant_id, + idempotency_key=idempotency_key, + if_match=if_match, + grant_update_in=grant_update_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GrantOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def grants_update_with_http_info( + self, + drive_id: StrictStr, + grant_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + grant_update_in: GrantUpdateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GrantOut]: + """Update Grant + + Change a grant's role or expiry under If-Match. + + :param drive_id: (required) + :type drive_id: str + :param grant_id: (required) + :type grant_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param grant_update_in: (required) + :type grant_update_in: GrantUpdateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._grants_update_serialize( + drive_id=drive_id, + grant_id=grant_id, + idempotency_key=idempotency_key, + if_match=if_match, + grant_update_in=grant_update_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GrantOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def grants_update_without_preload_content( + self, + drive_id: StrictStr, + grant_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + grant_update_in: GrantUpdateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Grant + + Change a grant's role or expiry under If-Match. + + :param drive_id: (required) + :type drive_id: str + :param grant_id: (required) + :type grant_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param grant_update_in: (required) + :type grant_update_in: GrantUpdateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._grants_update_serialize( + drive_id=drive_id, + grant_id=grant_id, + idempotency_key=idempotency_key, + if_match=if_match, + grant_update_in=grant_update_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GrantOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _grants_update_serialize( + self, + drive_id, + grant_id, + idempotency_key, + if_match, + grant_update_in, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if grant_id is not None: + _path_params['grant_id'] = grant_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if grant_update_in is not None: + _body_params = grant_update_in + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v0/drives/{drive_id}/grants/{grant_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/api/search_api.py b/sdk/python/src/agentdrive_sdk/generated/async_client/api/search_api.py new file mode 100644 index 0000000..fdbf37a --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/api/search_api.py @@ -0,0 +1,505 @@ +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from datetime import datetime +from pydantic import Field, StrictInt, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated +from agentdrive_sdk.generated.async_client.models.search_page_out import SearchPageOut + +from agentdrive_sdk.generated.async_client.api_client import ApiClient, RequestSerialized +from agentdrive_sdk.generated.async_client.api_response import ApiResponse +from agentdrive_sdk.generated.async_client.rest import RESTResponseType + + +class SearchApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def drive_search( + self, + drive_id: StrictStr, + q: Annotated[str, Field(min_length=1, strict=True)], + mode: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + parent_id: Optional[StrictStr] = None, + content_type: Optional[StrictStr] = None, + label: Optional[StrictStr] = None, + updated_after: Optional[datetime] = None, + updated_before: Optional[datetime] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SearchPageOut: + """Drive Search + + Search the drive's live artifacts. ``q`` is required and must be non-empty. ``mode`` selects the retrieval engine: ``lexical``, ``hybrid``, or ``semantic``. This deployment enables ``lexical`` only; requesting a disabled mode fails ``400 SEARCH_MODE_UNAVAILABLE``. Each hit's ``snippet`` is HTML-safe by contract: artifact content is entity-escaped and only the server's own ````/```` highlight pair survives, so a client may render it as HTML. + + :param drive_id: (required) + :type drive_id: str + :param q: (required) + :type q: str + :param mode: + :type mode: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param parent_id: + :type parent_id: str + :param content_type: + :type content_type: str + :param label: + :type label: str + :param updated_after: + :type updated_after: datetime + :param updated_before: + :type updated_before: datetime + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drive_search_serialize( + drive_id=drive_id, + q=q, + mode=mode, + limit=limit, + cursor=cursor, + parent_id=parent_id, + content_type=content_type, + label=label, + updated_after=updated_after, + updated_before=updated_before, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SearchPageOut", + '400': "DrivesList400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def drive_search_with_http_info( + self, + drive_id: StrictStr, + q: Annotated[str, Field(min_length=1, strict=True)], + mode: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + parent_id: Optional[StrictStr] = None, + content_type: Optional[StrictStr] = None, + label: Optional[StrictStr] = None, + updated_after: Optional[datetime] = None, + updated_before: Optional[datetime] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SearchPageOut]: + """Drive Search + + Search the drive's live artifacts. ``q`` is required and must be non-empty. ``mode`` selects the retrieval engine: ``lexical``, ``hybrid``, or ``semantic``. This deployment enables ``lexical`` only; requesting a disabled mode fails ``400 SEARCH_MODE_UNAVAILABLE``. Each hit's ``snippet`` is HTML-safe by contract: artifact content is entity-escaped and only the server's own ````/```` highlight pair survives, so a client may render it as HTML. + + :param drive_id: (required) + :type drive_id: str + :param q: (required) + :type q: str + :param mode: + :type mode: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param parent_id: + :type parent_id: str + :param content_type: + :type content_type: str + :param label: + :type label: str + :param updated_after: + :type updated_after: datetime + :param updated_before: + :type updated_before: datetime + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drive_search_serialize( + drive_id=drive_id, + q=q, + mode=mode, + limit=limit, + cursor=cursor, + parent_id=parent_id, + content_type=content_type, + label=label, + updated_after=updated_after, + updated_before=updated_before, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SearchPageOut", + '400': "DrivesList400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def drive_search_without_preload_content( + self, + drive_id: StrictStr, + q: Annotated[str, Field(min_length=1, strict=True)], + mode: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + parent_id: Optional[StrictStr] = None, + content_type: Optional[StrictStr] = None, + label: Optional[StrictStr] = None, + updated_after: Optional[datetime] = None, + updated_before: Optional[datetime] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Drive Search + + Search the drive's live artifacts. ``q`` is required and must be non-empty. ``mode`` selects the retrieval engine: ``lexical``, ``hybrid``, or ``semantic``. This deployment enables ``lexical`` only; requesting a disabled mode fails ``400 SEARCH_MODE_UNAVAILABLE``. Each hit's ``snippet`` is HTML-safe by contract: artifact content is entity-escaped and only the server's own ````/```` highlight pair survives, so a client may render it as HTML. + + :param drive_id: (required) + :type drive_id: str + :param q: (required) + :type q: str + :param mode: + :type mode: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param parent_id: + :type parent_id: str + :param content_type: + :type content_type: str + :param label: + :type label: str + :param updated_after: + :type updated_after: datetime + :param updated_before: + :type updated_before: datetime + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drive_search_serialize( + drive_id=drive_id, + q=q, + mode=mode, + limit=limit, + cursor=cursor, + parent_id=parent_id, + content_type=content_type, + label=label, + updated_after=updated_after, + updated_before=updated_before, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SearchPageOut", + '400': "DrivesList400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _drive_search_serialize( + self, + drive_id, + q, + mode, + limit, + cursor, + parent_id, + content_type, + label, + updated_after, + updated_before, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + # process the query parameters + if q is not None: + + _query_params.append(('q', q)) + + if mode is not None: + + _query_params.append(('mode', mode)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + if parent_id is not None: + + _query_params.append(('parent_id', parent_id)) + + if content_type is not None: + + _query_params.append(('content_type', content_type)) + + if label is not None: + + _query_params.append(('label', label)) + + if updated_after is not None: + if isinstance(updated_after, datetime): + _query_params.append( + ( + 'updated_after', + updated_after.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('updated_after', updated_after)) + + if updated_before is not None: + if isinstance(updated_before, datetime): + _query_params.append( + ( + 'updated_before', + updated_before.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('updated_before', updated_before)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}/search', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/api/shares_api.py b/sdk/python/src/agentdrive_sdk/generated/async_client/api/shares_api.py new file mode 100644 index 0000000..a439fe1 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/api/shares_api.py @@ -0,0 +1,1801 @@ +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import StrictInt, StrictStr +from typing import Optional +from agentdrive_sdk.generated.async_client.models.share_create_in import ShareCreateIn +from agentdrive_sdk.generated.async_client.models.share_create_out import ShareCreateOut +from agentdrive_sdk.generated.async_client.models.share_list_out import ShareListOut +from agentdrive_sdk.generated.async_client.models.share_out import ShareOut + +from agentdrive_sdk.generated.async_client.api_client import ApiClient, RequestSerialized +from agentdrive_sdk.generated.async_client.api_response import ApiResponse +from agentdrive_sdk.generated.async_client.rest import RESTResponseType + + +class SharesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def shares_create( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + share_create_in: ShareCreateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ShareCreateOut: + """Create Share + + Mint a read-only bearer link. The response carries the plaintext secret — the only response that does. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param share_create_in: (required) + :type share_create_in: ShareCreateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_create_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + share_create_in=share_create_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ShareCreateOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def shares_create_with_http_info( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + share_create_in: ShareCreateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ShareCreateOut]: + """Create Share + + Mint a read-only bearer link. The response carries the plaintext secret — the only response that does. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param share_create_in: (required) + :type share_create_in: ShareCreateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_create_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + share_create_in=share_create_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ShareCreateOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def shares_create_without_preload_content( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + share_create_in: ShareCreateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Share + + Mint a read-only bearer link. The response carries the plaintext secret — the only response that does. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param share_create_in: (required) + :type share_create_in: ShareCreateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_create_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + share_create_in=share_create_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ShareCreateOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _shares_create_serialize( + self, + drive_id, + idempotency_key, + share_create_in, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if share_create_in is not None: + _body_params = share_create_in + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v0/drives/{drive_id}/shares', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def shares_list( + self, + drive_id: StrictStr, + lifecycle: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + resource_type: Optional[StrictStr] = None, + resource_id: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ShareListOut: + """List Shares + + List the drive's shares (no secrets), keyset paginated. ``resource_id`` narrows the page to one resource's links and REQUIRES ``resource_type`` alongside it — a bare resource id is ambiguous across ``artifact`` / ``artifact_version`` / ``folder``, and inferring the kind from the id prefix would tie the filter's meaning to an id format the contract does not promise to keep. ``resource_type`` alone is a valid filter. Listing shares already requires drive ``manager``, so these filters only narrow a page the caller could already read in full. + + :param drive_id: (required) + :type drive_id: str + :param lifecycle: + :type lifecycle: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param resource_type: + :type resource_type: str + :param resource_id: + :type resource_id: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_list_serialize( + drive_id=drive_id, + lifecycle=lifecycle, + limit=limit, + cursor=cursor, + resource_type=resource_type, + resource_id=resource_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ShareListOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def shares_list_with_http_info( + self, + drive_id: StrictStr, + lifecycle: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + resource_type: Optional[StrictStr] = None, + resource_id: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ShareListOut]: + """List Shares + + List the drive's shares (no secrets), keyset paginated. ``resource_id`` narrows the page to one resource's links and REQUIRES ``resource_type`` alongside it — a bare resource id is ambiguous across ``artifact`` / ``artifact_version`` / ``folder``, and inferring the kind from the id prefix would tie the filter's meaning to an id format the contract does not promise to keep. ``resource_type`` alone is a valid filter. Listing shares already requires drive ``manager``, so these filters only narrow a page the caller could already read in full. + + :param drive_id: (required) + :type drive_id: str + :param lifecycle: + :type lifecycle: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param resource_type: + :type resource_type: str + :param resource_id: + :type resource_id: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_list_serialize( + drive_id=drive_id, + lifecycle=lifecycle, + limit=limit, + cursor=cursor, + resource_type=resource_type, + resource_id=resource_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ShareListOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def shares_list_without_preload_content( + self, + drive_id: StrictStr, + lifecycle: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + resource_type: Optional[StrictStr] = None, + resource_id: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Shares + + List the drive's shares (no secrets), keyset paginated. ``resource_id`` narrows the page to one resource's links and REQUIRES ``resource_type`` alongside it — a bare resource id is ambiguous across ``artifact`` / ``artifact_version`` / ``folder``, and inferring the kind from the id prefix would tie the filter's meaning to an id format the contract does not promise to keep. ``resource_type`` alone is a valid filter. Listing shares already requires drive ``manager``, so these filters only narrow a page the caller could already read in full. + + :param drive_id: (required) + :type drive_id: str + :param lifecycle: + :type lifecycle: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param resource_type: + :type resource_type: str + :param resource_id: + :type resource_id: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_list_serialize( + drive_id=drive_id, + lifecycle=lifecycle, + limit=limit, + cursor=cursor, + resource_type=resource_type, + resource_id=resource_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ShareListOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _shares_list_serialize( + self, + drive_id, + lifecycle, + limit, + cursor, + resource_type, + resource_id, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + # process the query parameters + if lifecycle is not None: + + _query_params.append(('lifecycle', lifecycle)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + if resource_type is not None: + + _query_params.append(('resource_type', resource_type)) + + if resource_id is not None: + + _query_params.append(('resource_id', resource_id)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}/shares', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def shares_read( + self, + drive_id: StrictStr, + share_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ShareOut: + """Read Share + + Read one share's management representation (no secret). + + :param drive_id: (required) + :type drive_id: str + :param share_id: (required) + :type share_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_read_serialize( + drive_id=drive_id, + share_id=share_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ShareOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def shares_read_with_http_info( + self, + drive_id: StrictStr, + share_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ShareOut]: + """Read Share + + Read one share's management representation (no secret). + + :param drive_id: (required) + :type drive_id: str + :param share_id: (required) + :type share_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_read_serialize( + drive_id=drive_id, + share_id=share_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ShareOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def shares_read_without_preload_content( + self, + drive_id: StrictStr, + share_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Read Share + + Read one share's management representation (no secret). + + :param drive_id: (required) + :type drive_id: str + :param share_id: (required) + :type share_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_read_serialize( + drive_id=drive_id, + share_id=share_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ShareOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _shares_read_serialize( + self, + drive_id, + share_id, + if_none_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if share_id is not None: + _path_params['share_id'] = share_id + # process the query parameters + # process the header parameters + if if_none_match is not None: + _header_params['If-None-Match'] = if_none_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}/shares/{share_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def shares_revoke( + self, + drive_id: StrictStr, + share_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ShareOut: + """Revoke Share + + Revoke a share (soft, sets revoked_at) under If-Match. + + :param drive_id: (required) + :type drive_id: str + :param share_id: (required) + :type share_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_revoke_serialize( + drive_id=drive_id, + share_id=share_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ShareOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def shares_revoke_with_http_info( + self, + drive_id: StrictStr, + share_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ShareOut]: + """Revoke Share + + Revoke a share (soft, sets revoked_at) under If-Match. + + :param drive_id: (required) + :type drive_id: str + :param share_id: (required) + :type share_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_revoke_serialize( + drive_id=drive_id, + share_id=share_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ShareOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def shares_revoke_without_preload_content( + self, + drive_id: StrictStr, + share_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Revoke Share + + Revoke a share (soft, sets revoked_at) under If-Match. + + :param drive_id: (required) + :type drive_id: str + :param share_id: (required) + :type share_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_revoke_serialize( + drive_id=drive_id, + share_id=share_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ShareOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _shares_revoke_serialize( + self, + drive_id, + share_id, + idempotency_key, + if_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if share_id is not None: + _path_params['share_id'] = share_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v0/drives/{drive_id}/shares/{share_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def shares_rotate( + self, + drive_id: StrictStr, + share_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ShareCreateOut: + """Rotate Share + + Rotate the secret in place (same id, no grace window). The response carries the new plaintext secret. + + :param drive_id: (required) + :type drive_id: str + :param share_id: (required) + :type share_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_rotate_serialize( + drive_id=drive_id, + share_id=share_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ShareCreateOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def shares_rotate_with_http_info( + self, + drive_id: StrictStr, + share_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ShareCreateOut]: + """Rotate Share + + Rotate the secret in place (same id, no grace window). The response carries the new plaintext secret. + + :param drive_id: (required) + :type drive_id: str + :param share_id: (required) + :type share_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_rotate_serialize( + drive_id=drive_id, + share_id=share_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ShareCreateOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def shares_rotate_without_preload_content( + self, + drive_id: StrictStr, + share_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Rotate Share + + Rotate the secret in place (same id, no grace window). The response carries the new plaintext secret. + + :param drive_id: (required) + :type drive_id: str + :param share_id: (required) + :type share_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_rotate_serialize( + drive_id=drive_id, + share_id=share_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ShareCreateOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _shares_rotate_serialize( + self, + drive_id, + share_id, + idempotency_key, + if_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if share_id is not None: + _path_params['share_id'] = share_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v0/drives/{drive_id}/shares/{share_id}/rotate', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/api/shares_redemption_api.py b/sdk/python/src/agentdrive_sdk/generated/async_client/api/shares_redemption_api.py new file mode 100644 index 0000000..9d50f27 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/api/shares_redemption_api.py @@ -0,0 +1,297 @@ +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import StrictStr +from typing import Any + +from agentdrive_sdk.generated.async_client.api_client import ApiClient, RequestSerialized +from agentdrive_sdk.generated.async_client.api_response import ApiResponse +from agentdrive_sdk.generated.async_client.rest import RESTResponseType + + +class SharesRedemptionApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def shares_redeem( + self, + share_key: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Redeem Share + + The un-slashed form. Browsers are canonicalized onto `/s/{key}/`. This inherits the published `shares_redeem` operation id from the route it replaced, because for an API client it *is* that operation, unchanged: same URL, same JSON `Accept`, same bytes, same uniform 404. Only the browser arm is new. Dropping it from the spec would have described the route as gone while it kept answering. The page links its own sub-resources relatively (`content`), and relative resolution replaces the last path segment: from `/s/KEY` that reaches `/s/content`, from `/s/KEY/` it reaches `/s/KEY/content`. The trailing slash is what makes an image on a share page load at all. Links already in the wild have no slash, so this redirect is how they keep working. It is unconditional and runs before any lookup — redirecting only for keys that resolve would turn the status code into an existence oracle and undo the anti-enumeration property the rest of this module maintains. Only browsers are moved. JSON and byte clients are answered in place, so the shipped v0 contract for this URL is unchanged, redirect included. + + :param share_key: (required) + :type share_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_redeem_serialize( + share_key=share_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "ValidationErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def shares_redeem_with_http_info( + self, + share_key: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Redeem Share + + The un-slashed form. Browsers are canonicalized onto `/s/{key}/`. This inherits the published `shares_redeem` operation id from the route it replaced, because for an API client it *is* that operation, unchanged: same URL, same JSON `Accept`, same bytes, same uniform 404. Only the browser arm is new. Dropping it from the spec would have described the route as gone while it kept answering. The page links its own sub-resources relatively (`content`), and relative resolution replaces the last path segment: from `/s/KEY` that reaches `/s/content`, from `/s/KEY/` it reaches `/s/KEY/content`. The trailing slash is what makes an image on a share page load at all. Links already in the wild have no slash, so this redirect is how they keep working. It is unconditional and runs before any lookup — redirecting only for keys that resolve would turn the status code into an existence oracle and undo the anti-enumeration property the rest of this module maintains. Only browsers are moved. JSON and byte clients are answered in place, so the shipped v0 contract for this URL is unchanged, redirect included. + + :param share_key: (required) + :type share_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_redeem_serialize( + share_key=share_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "ValidationErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def shares_redeem_without_preload_content( + self, + share_key: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Redeem Share + + The un-slashed form. Browsers are canonicalized onto `/s/{key}/`. This inherits the published `shares_redeem` operation id from the route it replaced, because for an API client it *is* that operation, unchanged: same URL, same JSON `Accept`, same bytes, same uniform 404. Only the browser arm is new. Dropping it from the spec would have described the route as gone while it kept answering. The page links its own sub-resources relatively (`content`), and relative resolution replaces the last path segment: from `/s/KEY` that reaches `/s/content`, from `/s/KEY/` it reaches `/s/KEY/content`. The trailing slash is what makes an image on a share page load at all. Links already in the wild have no slash, so this redirect is how they keep working. It is unconditional and runs before any lookup — redirecting only for keys that resolve would turn the status code into an existence oracle and undo the anti-enumeration property the rest of this module maintains. Only browsers are moved. JSON and byte clients are answered in place, so the shipped v0 contract for this URL is unchanged, redirect included. + + :param share_key: (required) + :type share_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_redeem_serialize( + share_key=share_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "ValidationErrorResponse", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _shares_redeem_serialize( + self, + share_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if share_key is not None: + _path_params['share_key'] = share_key + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/s/{share_key}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/api/versions_api.py b/sdk/python/src/agentdrive_sdk/generated/async_client/api/versions_api.py new file mode 100644 index 0000000..5a3784e --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/api/versions_api.py @@ -0,0 +1,1853 @@ +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBytes, StrictInt, StrictStr +from typing import Optional, Tuple, Union +from typing_extensions import Annotated +from agentdrive_sdk.generated.async_client.models.version_created_out import VersionCreatedOut +from agentdrive_sdk.generated.async_client.models.version_list_out import VersionListOut +from agentdrive_sdk.generated.async_client.models.version_out import VersionOut + +from agentdrive_sdk.generated.async_client.api_client import ApiClient, RequestSerialized +from agentdrive_sdk.generated.async_client.api_response import ApiResponse +from agentdrive_sdk.generated.async_client.rest import RESTResponseType + + +class VersionsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + async def versions_append( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="The artifact bytes.")], + authorization: Optional[StrictStr] = None, + content_type: Annotated[Optional[StrictStr], Field(description="Declared media type.")] = None, + sha256: Annotated[Optional[StrictStr], Field(description="Optional content sha256 for verification.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> VersionCreatedOut: + """Append Version + + Append one immutable version and rotate the artifact head. Multipart only (415 for a JSON body). Parts: content (bytes), content_type, sha256. content is required; name, parent_id, and metadata are not accepted here. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param content: The artifact bytes. (required) + :type content: bytes + :param authorization: + :type authorization: str + :param content_type: Declared media type. + :type content_type: str + :param sha256: Optional content sha256 for verification. + :type sha256: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._versions_append_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + idempotency_key=idempotency_key, + if_match=if_match, + content=content, + authorization=authorization, + content_type=content_type, + sha256=sha256, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "VersionCreatedOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def versions_append_with_http_info( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="The artifact bytes.")], + authorization: Optional[StrictStr] = None, + content_type: Annotated[Optional[StrictStr], Field(description="Declared media type.")] = None, + sha256: Annotated[Optional[StrictStr], Field(description="Optional content sha256 for verification.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[VersionCreatedOut]: + """Append Version + + Append one immutable version and rotate the artifact head. Multipart only (415 for a JSON body). Parts: content (bytes), content_type, sha256. content is required; name, parent_id, and metadata are not accepted here. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param content: The artifact bytes. (required) + :type content: bytes + :param authorization: + :type authorization: str + :param content_type: Declared media type. + :type content_type: str + :param sha256: Optional content sha256 for verification. + :type sha256: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._versions_append_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + idempotency_key=idempotency_key, + if_match=if_match, + content=content, + authorization=authorization, + content_type=content_type, + sha256=sha256, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "VersionCreatedOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def versions_append_without_preload_content( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="The artifact bytes.")], + authorization: Optional[StrictStr] = None, + content_type: Annotated[Optional[StrictStr], Field(description="Declared media type.")] = None, + sha256: Annotated[Optional[StrictStr], Field(description="Optional content sha256 for verification.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Append Version + + Append one immutable version and rotate the artifact head. Multipart only (415 for a JSON body). Parts: content (bytes), content_type, sha256. content is required; name, parent_id, and metadata are not accepted here. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param content: The artifact bytes. (required) + :type content: bytes + :param authorization: + :type authorization: str + :param content_type: Declared media type. + :type content_type: str + :param sha256: Optional content sha256 for verification. + :type sha256: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._versions_append_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + idempotency_key=idempotency_key, + if_match=if_match, + content=content, + authorization=authorization, + content_type=content_type, + sha256=sha256, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "VersionCreatedOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _versions_append_serialize( + self, + drive_id, + artifact_id, + idempotency_key, + if_match, + content, + authorization, + content_type, + sha256, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if artifact_id is not None: + _path_params['artifact_id'] = artifact_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + if content is not None: + _files['content'] = content + if content_type is not None: + _form_params.append(('content_type', content_type)) + if sha256 is not None: + _form_params.append(('sha256', sha256)) + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'multipart/form-data' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v0/drives/{drive_id}/artifacts/{artifact_id}/versions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def versions_content( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + version_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytes: + """Read Version Content + + Download one version's immutable bytes — stream or 307. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param version_id: (required) + :type version_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._versions_content_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + version_id=version_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + '304': None, + '307': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def versions_content_with_http_info( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + version_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytes]: + """Read Version Content + + Download one version's immutable bytes — stream or 307. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param version_id: (required) + :type version_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._versions_content_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + version_id=version_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + '304': None, + '307': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def versions_content_without_preload_content( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + version_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Read Version Content + + Download one version's immutable bytes — stream or 307. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param version_id: (required) + :type version_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._versions_content_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + version_id=version_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + '304': None, + '307': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _versions_content_serialize( + self, + drive_id, + artifact_id, + version_id, + if_none_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if artifact_id is not None: + _path_params['artifact_id'] = artifact_id + if version_id is not None: + _path_params['version_id'] = version_id + # process the query parameters + # process the header parameters + if if_none_match is not None: + _header_params['If-None-Match'] = if_none_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/octet-stream', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}/content', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def versions_list( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> VersionListOut: + """List Versions + + List the artifact's version trail, newest first (ordinal DESC). + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._versions_list_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + limit=limit, + cursor=cursor, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VersionListOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def versions_list_with_http_info( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[VersionListOut]: + """List Versions + + List the artifact's version trail, newest first (ordinal DESC). + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._versions_list_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + limit=limit, + cursor=cursor, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VersionListOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def versions_list_without_preload_content( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Versions + + List the artifact's version trail, newest first (ordinal DESC). + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._versions_list_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + limit=limit, + cursor=cursor, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VersionListOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _versions_list_serialize( + self, + drive_id, + artifact_id, + limit, + cursor, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if artifact_id is not None: + _path_params['artifact_id'] = artifact_id + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}/artifacts/{artifact_id}/versions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def versions_read( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + version_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> VersionOut: + """Read Version + + Read one immutable version. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param version_id: (required) + :type version_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._versions_read_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + version_id=version_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VersionOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def versions_read_with_http_info( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + version_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[VersionOut]: + """Read Version + + Read one immutable version. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param version_id: (required) + :type version_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._versions_read_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + version_id=version_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VersionOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def versions_read_without_preload_content( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + version_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Read Version + + Read one immutable version. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param version_id: (required) + :type version_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._versions_read_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + version_id=version_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VersionOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _versions_read_serialize( + self, + drive_id, + artifact_id, + version_id, + if_none_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if artifact_id is not None: + _path_params['artifact_id'] = artifact_id + if version_id is not None: + _path_params['version_id'] = version_id + # process the query parameters + # process the header parameters + if if_none_match is not None: + _header_params['If-None-Match'] = if_none_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + async def versions_restore( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + version_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> VersionCreatedOut: + """Restore Version + + Restore a historical version as a NEW head version (no byte copy). + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param version_id: (required) + :type version_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._versions_restore_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + version_id=version_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "VersionCreatedOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + async def versions_restore_with_http_info( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + version_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[VersionCreatedOut]: + """Restore Version + + Restore a historical version as a NEW head version (no byte copy). + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param version_id: (required) + :type version_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._versions_restore_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + version_id=version_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "VersionCreatedOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + await response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + async def versions_restore_without_preload_content( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + version_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Restore Version + + Restore a historical version as a NEW head version (no byte copy). + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param version_id: (required) + :type version_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._versions_restore_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + version_id=version_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "VersionCreatedOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = await self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _versions_restore_serialize( + self, + drive_id, + artifact_id, + version_id, + idempotency_key, + if_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if artifact_id is not None: + _path_params['artifact_id'] = artifact_id + if version_id is not None: + _path_params['version_id'] = version_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}/restore', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/api_client.py b/sdk/python/src/agentdrive_sdk/generated/async_client/api_client.py new file mode 100644 index 0000000..18a8b40 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/api_client.py @@ -0,0 +1,822 @@ +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + + +import datetime +from dateutil.parser import parse +from enum import Enum +import decimal +import json +import mimetypes +import os +import re +import tempfile +import uuid + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from agentdrive_sdk.generated.async_client.configuration import Configuration +from agentdrive_sdk.generated.async_client.api_response import ApiResponse, T as ApiResponseT +import agentdrive_sdk.generated.async_client.models +from agentdrive_sdk.generated.async_client import rest +from agentdrive_sdk.generated.async_client.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'decimal': decimal.Decimal, + 'UUID': uuid.UUID, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/0.1.0/python' + self.client_side_validation = configuration.client_side_validation + + async def __aenter__(self): + return self + + async def __aexit__(self, exc_type, exc_value, traceback): + await self.close() + + async def close(self): + await self.rest_client.close() + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None or self.configuration.ignore_operation_servers: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + async def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = await self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # If the response_type has not matched (eg. did not match the previous if statements) and the default response is available, use it. + if response_type is None and str(response_data.status) not in response_types_map \ + and (not isinstance(response_data.status, int) or not 100 <= response_data.status <= 599 or str(response_data.status)[0] + "XX" not in response_types_map) \ + and 'default' in response_types_map: + response_type = response_types_map['default'] + + # deserialize response data + response_text = None + return_data = None + try: + if response_type in ("bytearray", "bytes"): + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.headers.get('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + return_data = self.deserialize(response_text, response_type, content_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.headers, + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is decimal.Decimal return string representation. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, uuid.UUID): + return str(obj) + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + elif isinstance(obj, decimal.Decimal): + return str(obj) + elif isinstance(obj, dict): + return { + key: self.sanitize_for_serialization(val) + for key, val in obj.items() + } + + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return self.sanitize_for_serialization(obj_dict) + + + def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + :param content_type: content type of response. + + :return: deserialized object. + """ + + # fetch data from response object + if content_type is None: + try: + data = json.loads(response_text) + except ValueError: + data = response_text + elif re.match(r'^application/(json|[\w!#$&.+\-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): + if response_text == "": + data = "" + else: + data = json.loads(response_text) + elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE): + data = response_text + else: + raise ApiException( + status=0, + reason="Unsupported content type: {0}".format(content_type) + ) + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(agentdrive_sdk.generated.async_client.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass is object: + return self.__deserialize_object(data) + elif klass is datetime.date: + return self.__deserialize_date(data) + elif klass is datetime.datetime: + return self.__deserialize_datetime(data) + elif klass is decimal.Decimal: + return decimal.Decimal(data) + elif klass is uuid.UUID: + return uuid.UUID(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, quote(str(value))) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters( + self, + files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], + ): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + elif isinstance(v, tuple): + filename, filedata = v + elif isinstance(v, list): + for file_param in v: + params.extend(self.files_parameters({k: file_param})) + continue + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + if not 'Cookie' in headers: + headers['Cookie'] = "" + else: + headers['Cookie'] += "; " + # Account for cookie value containing spaces and special characters + cookie_value = str(auth_setting['value']) + if not re.match("^\".*\"$", cookie_value): + cookie_value = cookie_value.replace("\"", "\\\"") + cookie_value = f"\"{cookie_value}\"" + headers['Cookie'] += f"{auth_setting['key']}={cookie_value}" + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.headers.get("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = os.path.basename(m.group(1)) # Strip any directory traversal + if filename in ("", ".", ".."): # fall back to tmp filename + filename = os.path.basename(path) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/sdk/python/agentdrive_sdk/api_response.py b/sdk/python/src/agentdrive_sdk/generated/async_client/api_response.py similarity index 100% rename from sdk/python/agentdrive_sdk/api_response.py rename to sdk/python/src/agentdrive_sdk/generated/async_client/api_response.py diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/configuration.py b/sdk/python/src/agentdrive_sdk/generated/async_client/configuration.py new file mode 100644 index 0000000..30a5b0e --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/configuration.py @@ -0,0 +1,605 @@ +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import base64 +import copy +import http.client as httplib +import logging +from logging import FileHandler +import sys +from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union +from typing_extensions import NotRequired, Self + + + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +ServerVariablesT = Dict[str, str] + +GenericAuthSetting = TypedDict( + "GenericAuthSetting", + { + "type": str, + "in": str, + "key": str, + "value": str, + }, +) + + +OAuth2AuthSetting = TypedDict( + "OAuth2AuthSetting", + { + "type": Literal["oauth2"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +APIKeyAuthSetting = TypedDict( + "APIKeyAuthSetting", + { + "type": Literal["api_key"], + "in": str, + "key": str, + "value": Optional[str], + }, +) + + +BasicAuthSetting = TypedDict( + "BasicAuthSetting", + { + "type": Literal["basic"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": Optional[str], + }, +) + + +BearerFormatAuthSetting = TypedDict( + "BearerFormatAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "format": Literal["JWT"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +BearerAuthSetting = TypedDict( + "BearerAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +HTTPSignatureAuthSetting = TypedDict( + "HTTPSignatureAuthSetting", + { + "type": Literal["http-signature"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": None, + }, +) + + +AuthSettings = TypedDict( + "AuthSettings", + { + "bearerAuth": BearerFormatAuthSetting, + }, + total=False, +) + + +class HostSettingVariable(TypedDict): + description: str + default_value: str + enum_values: List[str] + + +class HostSetting(TypedDict): + url: str + description: str + variables: NotRequired[Dict[str, HostSettingVariable]] + + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param ignore_operation_servers + Boolean to ignore operation servers for the API client. + Config will use `host` as the base url regardless of the operation servers. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param verify_ssl: bool - Set this to false to skip verifying SSL certificate + when calling API from https server. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + :param retries: int - Retry configuration. + :param ca_cert_data: verify the peer using concatenated CA certificate data + in PEM (str) or DER (bytes) format. + :param cert_file: the path to a client certificate file, for mTLS. + :param key_file: the path to a client key file, for mTLS. + :param assert_hostname: Set this to True/False to enable/disable SSL hostname verification. + :param tls_server_name: SSL/TLS Server Name Indication (SNI). Set this to the SNI value expected by the server. + :param connection_pool_maxsize: Connection pool max size. None in the constructor is coerced to 100 for async and cpu_count * 5 for sync. + :param proxy: Proxy URL. + :param proxy_headers: Proxy headers. + :param safe_chars_for_path_param: Safe characters for path parameter encoding. + :param client_side_validation: Enable client-side validation. Default True. + :param socket_options: Options to pass down to the underlying urllib3 socket. + :param datetime_format: Datetime format string for serialization. + :param date_format: Date format string for serialization. + + :Example: + """ + + _default: ClassVar[Optional[Self]] = None + + def __init__( + self, + host: Optional[str]=None, + api_key: Optional[Dict[str, str]]=None, + api_key_prefix: Optional[Dict[str, str]]=None, + username: Optional[str]=None, + password: Optional[str]=None, + access_token: Optional[str]=None, + server_index: Optional[int]=None, + server_variables: Optional[ServerVariablesT]=None, + server_operation_index: Optional[Dict[int, int]]=None, + server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, + ignore_operation_servers: bool=False, + ssl_ca_cert: Optional[str]=None, + retries: Optional[int] = None, + ca_cert_data: Optional[Union[str, bytes]] = None, + cert_file: Optional[str]=None, + key_file: Optional[str]=None, + verify_ssl: bool=True, + assert_hostname: Optional[bool]=None, + tls_server_name: Optional[str]=None, + connection_pool_maxsize: Optional[int]=None, + proxy: Optional[str]=None, + proxy_headers: Optional[Any]=None, + safe_chars_for_path_param: str='', + client_side_validation: bool=True, + socket_options: Optional[Any]=None, + datetime_format: str="%Y-%m-%dT%H:%M:%S.%f%z", + date_format: str="%Y-%m-%d", + *, + debug: Optional[bool] = None, + ) -> None: + """Constructor + """ + self._base_path = "https://api.agentdrive.run" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.ignore_operation_servers = ignore_operation_servers + """Ignore operation servers + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("agentdrive_sdk.generated.async_client") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + if debug is not None: + self.debug = debug + else: + self.__debug = False + """Debug switch + """ + + self.verify_ssl = verify_ssl + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.ca_cert_data = ca_cert_data + """Set this to verify the peer using PEM (str) or DER (bytes) + certificate data. + """ + self.cert_file = cert_file + """client certificate file + """ + self.key_file = key_file + """client key file + """ + self.assert_hostname = assert_hostname + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = tls_server_name + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = connection_pool_maxsize if connection_pool_maxsize is not None else 100 + """This value is passed to the aiohttp to limit simultaneous connections. + None in the constructor is coerced to default 100. + """ + + self.proxy = proxy + """Proxy URL + """ + self.proxy_headers = proxy_headers + """Proxy headers + """ + self.safe_chars_for_path_param = safe_chars_for_path_param + """Safe chars for path_param + """ + self.retries = retries + """Retry configuration + """ + # Enable client side validation + self.client_side_validation = client_side_validation + + self.socket_options = socket_options + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = datetime_format + """datetime format + """ + + self.date_format = date_format + """date format + """ + + def __deepcopy__(self, memo: Dict[int, Any]) -> Self: + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setter to re-create the file handler (excluded from __dict__ copy) + result.logger_file = self.logger_file + + return result + + def __setattr__(self, name: str, value: Any) -> None: + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default: Optional[Self]) -> None: + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls) -> Self: + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls) -> Self: + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = cls() + return cls._default + + @property + def logger_file(self) -> Optional[str]: + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value: Optional[str]) -> None: + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self) -> bool: + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value: bool) -> None: + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self) -> str: + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value: str) -> None: + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]: + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get( + identifier, self.api_key_prefix.get(alias) if alias is not None else None) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + return None + + def get_basic_auth_token(self) -> Optional[str]: + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + + return "Basic " + base64.b64encode( + (username + ":" + password).encode('utf-8') + ).decode('utf-8') + + def auth_settings(self)-> AuthSettings: + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth: AuthSettings = {} + if self.access_token is not None: + auth['bearerAuth'] = { + 'type': 'bearer', + 'in': 'header', + 'format': 'JWT', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self) -> str: + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: <PINNED>\n"\ + "SDK Package Version: 0.1.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self) -> List[HostSetting]: + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.agentdrive.run", + 'description': "AgentDrive public API", + } + ] + + def get_host_from_settings( + self, + index: Optional[int], + variables: Optional[ServerVariablesT]=None, + servers: Optional[List[HostSetting]]=None, + ) -> str: + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and variable['enum_values'] \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self) -> str: + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value: str) -> None: + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/exceptions.py b/sdk/python/src/agentdrive_sdk/generated/async_client/exceptions.py new file mode 100644 index 0000000..d88fe7d --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/exceptions.py @@ -0,0 +1,218 @@ +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.headers + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + # Added new conditions for 409 and 422 + if http_resp.status == 409: + raise ConflictException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 422: + raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + if self.data: + error_message += "HTTP response data: {0}\n".format(self.data) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +class ConflictException(ApiException): + """Exception for HTTP 409 Conflict.""" + pass + + +class UnprocessableEntityException(ApiException): + """Exception for HTTP 422 Unprocessable Entity.""" + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/__init__.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/__init__.py new file mode 100644 index 0000000..be18464 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/__init__.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +# flake8: noqa +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +# import models into model package +from agentdrive_sdk.generated.async_client.models.artifact_copy_in import ArtifactCopyIn +from agentdrive_sdk.generated.async_client.models.artifact_list_out import ArtifactListOut +from agentdrive_sdk.generated.async_client.models.artifact_out import ArtifactOut +from agentdrive_sdk.generated.async_client.models.artifact_update_in import ArtifactUpdateIn +from agentdrive_sdk.generated.async_client.models.change_actor_out import ChangeActorOut +from agentdrive_sdk.generated.async_client.models.change_out import ChangeOut +from agentdrive_sdk.generated.async_client.models.change_page_out import ChangePageOut +from agentdrive_sdk.generated.async_client.models.change_resource_out import ChangeResourceOut +from agentdrive_sdk.generated.async_client.models.drive_create_in import DriveCreateIn +from agentdrive_sdk.generated.async_client.models.drive_list_out import DriveListOut +from agentdrive_sdk.generated.async_client.models.drive_out import DriveOut +from agentdrive_sdk.generated.async_client.models.drive_update_in import DriveUpdateIn +from agentdrive_sdk.generated.async_client.models.drive_usage_out import DriveUsageOut +from agentdrive_sdk.generated.async_client.models.drives_create400_response import DrivesCreate400Response +from agentdrive_sdk.generated.async_client.models.drives_create400_response_error import DrivesCreate400ResponseError +from agentdrive_sdk.generated.async_client.models.drives_list400_response import DrivesList400Response +from agentdrive_sdk.generated.async_client.models.drives_list400_response_error import DrivesList400ResponseError +from agentdrive_sdk.generated.async_client.models.error_response import ErrorResponse +from agentdrive_sdk.generated.async_client.models.folder_cascade_out import FolderCascadeOut +from agentdrive_sdk.generated.async_client.models.folder_copy_in import FolderCopyIn +from agentdrive_sdk.generated.async_client.models.folder_create_in import FolderCreateIn +from agentdrive_sdk.generated.async_client.models.folder_list_out import FolderListOut +from agentdrive_sdk.generated.async_client.models.folder_out import FolderOut +from agentdrive_sdk.generated.async_client.models.folder_update_in import FolderUpdateIn +from agentdrive_sdk.generated.async_client.models.grant_create_in import GrantCreateIn +from agentdrive_sdk.generated.async_client.models.grant_list_out import GrantListOut +from agentdrive_sdk.generated.async_client.models.grant_out import GrantOut +from agentdrive_sdk.generated.async_client.models.grant_update_in import GrantUpdateIn +from agentdrive_sdk.generated.async_client.models.health_degraded_detail import HealthDegradedDetail +from agentdrive_sdk.generated.async_client.models.health_degraded_response import HealthDegradedResponse +from agentdrive_sdk.generated.async_client.models.health_out import HealthOut +from agentdrive_sdk.generated.async_client.models.search_hit_out import SearchHitOut +from agentdrive_sdk.generated.async_client.models.search_page_out import SearchPageOut +from agentdrive_sdk.generated.async_client.models.share_create_in import ShareCreateIn +from agentdrive_sdk.generated.async_client.models.share_create_out import ShareCreateOut +from agentdrive_sdk.generated.async_client.models.share_list_out import ShareListOut +from agentdrive_sdk.generated.async_client.models.share_out import ShareOut +from agentdrive_sdk.generated.async_client.models.v0_error_envelope import V0ErrorEnvelope +from agentdrive_sdk.generated.async_client.models.validation_error_response import ValidationErrorResponse +from agentdrive_sdk.generated.async_client.models.validation_error_response_error import ValidationErrorResponseError +from agentdrive_sdk.generated.async_client.models.validation_error_response_error_details import ValidationErrorResponseErrorDetails +from agentdrive_sdk.generated.async_client.models.validation_error_response_error_details_fields_inner import ValidationErrorResponseErrorDetailsFieldsInner +from agentdrive_sdk.generated.async_client.models.version_created_out import VersionCreatedOut +from agentdrive_sdk.generated.async_client.models.version_list_out import VersionListOut +from agentdrive_sdk.generated.async_client.models.version_out import VersionOut diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/artifact_copy_in.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/artifact_copy_in.py new file mode 100644 index 0000000..7b97c54 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/artifact_copy_in.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ArtifactCopyIn(BaseModel): + """ + POST /v0/drives/{id}/artifacts/{artifact_id}/copy body. ``destination_drive_id`` must equal the source drive (or be absent) — cross-drive copy is out of v0 scope and rejected. + """ # noqa: E501 + destination_drive_id: Optional[Annotated[str, Field(strict=True)]] = None + destination_name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] + destination_parent_id: Annotated[str, Field(strict=True)] + version_id: Optional[Annotated[str, Field(strict=True)]] = None + __properties: ClassVar[List[str]] = ["destination_drive_id", "destination_name", "destination_parent_id", "version_id"] + + @field_validator('destination_drive_id', mode="before") + def destination_drive_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if isinstance(value, str) and not re.match(r"^drv_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^drv_[a-f0-9]{16}$/") + return value + + @field_validator('destination_parent_id', mode="before") + def destination_parent_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^fld_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^fld_[a-f0-9]{16}$/") + return value + + @field_validator('version_id', mode="before") + def version_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if isinstance(value, str) and not re.match(r"^ver_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^ver_[a-f0-9]{16}$/") + return value + + model_config = ConfigDict( + extra="forbid", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ArtifactCopyIn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the request body using wire aliases.""" + return to_jsonable_python( + self.model_dump( + by_alias=True, + exclude_unset=True, + exclude={"additional_properties"}, + ) + ) + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Validate a request dictionary without discarding unknown fields.""" + if obj is None: + return None + return cls.model_validate(obj) diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/artifact_list_out.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/artifact_list_out.py new file mode 100644 index 0000000..1cbdbae --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/artifact_list_out.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from agentdrive_sdk.generated.async_client.models.artifact_out import ArtifactOut +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ArtifactListOut(BaseModel): + """ + ArtifactListOut + """ # noqa: E501 + items: List[ArtifactOut] + next_cursor: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["items", "next_cursor"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ArtifactListOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item_items in self.items: + if _item_items: + _items.append(_item_items.to_dict()) + _dict['items'] = _items + # set to None if next_cursor (nullable) is None + # and model_fields_set contains the field + if self.next_cursor is None and "next_cursor" in self.model_fields_set: + _dict['next_cursor'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ArtifactListOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "items": [ArtifactOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, + "next_cursor": obj.get("next_cursor") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/artifact_out.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/artifact_out.py new file mode 100644 index 0000000..20e13fe --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/artifact_out.py @@ -0,0 +1,167 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ArtifactOut(BaseModel): + """ + ArtifactOut + """ # noqa: E501 + content_preview: Optional[StrictStr] + content_type: Optional[StrictStr] + created_at: datetime + deleted_at: Optional[datetime] + drive_id: Annotated[str, Field(strict=True)] + effective_visibility: StrictStr = Field(description="Server-computed exposure summary, resolved over the artifact's live grants, its folder ancestry (bounded by the nearest sealed folder), and the drive. 'public' when any live grant has principal_type 'public'; otherwise 'shared' when a live grant names a principal other than the drive's creator; otherwise 'private'. Describes exposure, NOT the caller's own access.") + head_version_id: Optional[StrictStr] + id: Annotated[str, Field(strict=True)] + labels: List[StrictStr] + metadata: Dict[str, Any] + name: StrictStr + parent_id: Annotated[str, Field(strict=True)] + revision: Annotated[str, Field(strict=True)] + state: StrictStr + updated_at: datetime + __properties: ClassVar[List[str]] = ["content_preview", "content_type", "created_at", "deleted_at", "drive_id", "effective_visibility", "head_version_id", "id", "labels", "metadata", "name", "parent_id", "revision", "state", "updated_at"] + + @field_validator('drive_id', mode="before") + def drive_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^drv_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^drv_[a-f0-9]{16}$/") + return value + + + @field_validator('id', mode="before") + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^art_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^art_[a-f0-9]{16}$/") + return value + + @field_validator('parent_id', mode="before") + def parent_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^fld_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^fld_[a-f0-9]{16}$/") + return value + + @field_validator('revision', mode="before") + def revision_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^rev_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^rev_[a-f0-9]{16}$/") + return value + + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ArtifactOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if content_preview (nullable) is None + # and model_fields_set contains the field + if self.content_preview is None and "content_preview" in self.model_fields_set: + _dict['content_preview'] = None + + # set to None if content_type (nullable) is None + # and model_fields_set contains the field + if self.content_type is None and "content_type" in self.model_fields_set: + _dict['content_type'] = None + + # set to None if deleted_at (nullable) is None + # and model_fields_set contains the field + if self.deleted_at is None and "deleted_at" in self.model_fields_set: + _dict['deleted_at'] = None + + # set to None if head_version_id (nullable) is None + # and model_fields_set contains the field + if self.head_version_id is None and "head_version_id" in self.model_fields_set: + _dict['head_version_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ArtifactOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "content_preview": obj.get("content_preview"), + "content_type": obj.get("content_type"), + "created_at": obj.get("created_at"), + "deleted_at": obj.get("deleted_at"), + "drive_id": obj.get("drive_id"), + "effective_visibility": obj.get("effective_visibility"), + "head_version_id": obj.get("head_version_id"), + "id": obj.get("id"), + "labels": obj.get("labels"), + "metadata": obj.get("metadata"), + "name": obj.get("name"), + "parent_id": obj.get("parent_id"), + "revision": obj.get("revision"), + "state": obj.get("state"), + "updated_at": obj.get("updated_at") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/artifact_update_in.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/artifact_update_in.py new file mode 100644 index 0000000..b2a2e70 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/artifact_update_in.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ArtifactUpdateIn(BaseModel): + """ + PATCH /v0/drives/{id}/artifacts/{artifact_id} body — at least one field is required. + """ # noqa: E501 + labels: Optional[List[StrictStr]] = None + metadata: Optional[Dict[str, Any]] = None + name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = None + parent_id: Optional[Annotated[str, Field(strict=True)]] = None + __properties: ClassVar[List[str]] = ["labels", "metadata", "name", "parent_id"] + + @field_validator('parent_id', mode="before") + def parent_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if isinstance(value, str) and not re.match(r"^fld_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^fld_[a-f0-9]{16}$/") + return value + + model_config = ConfigDict( + extra="forbid", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ArtifactUpdateIn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the request body using wire aliases.""" + return to_jsonable_python( + self.model_dump( + by_alias=True, + exclude_unset=True, + exclude={"additional_properties"}, + ) + ) + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Validate a request dictionary without discarding unknown fields.""" + if obj is None: + return None + return cls.model_validate(obj) diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/change_actor_out.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/change_actor_out.py new file mode 100644 index 0000000..2c31c7e --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/change_actor_out.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ChangeActorOut(BaseModel): + """ + ChangeActorOut + """ # noqa: E501 + id: Optional[StrictStr] + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ChangeActorOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if id (nullable) is None + # and model_fields_set contains the field + if self.id is None and "id" in self.model_fields_set: + _dict['id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChangeActorOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/change_out.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/change_out.py new file mode 100644 index 0000000..10a8676 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/change_out.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from agentdrive_sdk.generated.async_client.models.change_actor_out import ChangeActorOut +from agentdrive_sdk.generated.async_client.models.change_resource_out import ChangeResourceOut +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ChangeOut(BaseModel): + """ + ChangeOut + """ # noqa: E501 + actor: ChangeActorOut + change_set_id: StrictStr + data: Dict[str, Any] + drive_id: Annotated[str, Field(strict=True)] + id: Annotated[str, Field(strict=True)] + occurred_at: datetime + previous_revision: Optional[StrictStr] + resource: ChangeResourceOut + revision: Optional[StrictStr] + type: StrictStr + __properties: ClassVar[List[str]] = ["actor", "change_set_id", "data", "drive_id", "id", "occurred_at", "previous_revision", "resource", "revision", "type"] + + @field_validator('drive_id', mode="before") + def drive_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^drv_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^drv_[a-f0-9]{16}$/") + return value + + @field_validator('id', mode="before") + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^chg_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^chg_[a-f0-9]{16}$/") + return value + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ChangeOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of actor + if self.actor: + _dict['actor'] = self.actor.to_dict() + # override the default output from pydantic by calling `to_dict()` of resource + if self.resource: + _dict['resource'] = self.resource.to_dict() + # set to None if previous_revision (nullable) is None + # and model_fields_set contains the field + if self.previous_revision is None and "previous_revision" in self.model_fields_set: + _dict['previous_revision'] = None + + # set to None if revision (nullable) is None + # and model_fields_set contains the field + if self.revision is None and "revision" in self.model_fields_set: + _dict['revision'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChangeOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "actor": ChangeActorOut.from_dict(obj["actor"]) if obj.get("actor") is not None else None, + "change_set_id": obj.get("change_set_id"), + "data": obj.get("data"), + "drive_id": obj.get("drive_id"), + "id": obj.get("id"), + "occurred_at": obj.get("occurred_at"), + "previous_revision": obj.get("previous_revision"), + "resource": ChangeResourceOut.from_dict(obj["resource"]) if obj.get("resource") is not None else None, + "revision": obj.get("revision"), + "type": obj.get("type") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/change_page_out.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/change_page_out.py new file mode 100644 index 0000000..a7b5a9b --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/change_page_out.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from agentdrive_sdk.generated.async_client.models.change_out import ChangeOut +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ChangePageOut(BaseModel): + """ + ChangePageOut + """ # noqa: E501 + has_more: StrictBool + items: List[ChangeOut] + next_cursor: StrictStr + __properties: ClassVar[List[str]] = ["has_more", "items", "next_cursor"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ChangePageOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item_items in self.items: + if _item_items: + _items.append(_item_items.to_dict()) + _dict['items'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChangePageOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "has_more": obj.get("has_more"), + "items": [ChangeOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, + "next_cursor": obj.get("next_cursor") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/change_resource_out.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/change_resource_out.py new file mode 100644 index 0000000..0d9ef7b --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/change_resource_out.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ChangeResourceOut(BaseModel): + """ + ChangeResourceOut + """ # noqa: E501 + id: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ChangeResourceOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChangeResourceOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/drive_create_in.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/drive_create_in.py new file mode 100644 index 0000000..61ffdaf --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/drive_create_in.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DriveCreateIn(BaseModel): + """ + POST /v0/drives body. + """ # noqa: E501 + metadata: Dict[str, Any] = None + name: Annotated[str, Field(min_length=1, strict=True)] + __properties: ClassVar[List[str]] = ["metadata", "name"] + + model_config = ConfigDict( + extra="forbid", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DriveCreateIn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the request body using wire aliases.""" + return to_jsonable_python( + self.model_dump( + by_alias=True, + exclude_unset=True, + exclude={"additional_properties"}, + ) + ) + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Validate a request dictionary without discarding unknown fields.""" + if obj is None: + return None + return cls.model_validate(obj) diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/drive_list_out.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/drive_list_out.py new file mode 100644 index 0000000..3adc5c4 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/drive_list_out.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from agentdrive_sdk.generated.async_client.models.drive_out import DriveOut +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DriveListOut(BaseModel): + """ + DriveListOut + """ # noqa: E501 + items: List[DriveOut] + next_cursor: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["items", "next_cursor"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DriveListOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item_items in self.items: + if _item_items: + _items.append(_item_items.to_dict()) + _dict['items'] = _items + # set to None if next_cursor (nullable) is None + # and model_fields_set contains the field + if self.next_cursor is None and "next_cursor" in self.model_fields_set: + _dict['next_cursor'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DriveListOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "items": [DriveOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, + "next_cursor": obj.get("next_cursor") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/drive_out.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/drive_out.py new file mode 100644 index 0000000..f4bbdc9 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/drive_out.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DriveOut(BaseModel): + """ + DriveOut + """ # noqa: E501 + created_at: datetime + created_by: Optional[StrictStr] + deleted_at: Optional[datetime] + id: Annotated[str, Field(strict=True)] + metadata: Dict[str, Any] + name: StrictStr + retrieval_bytes: StrictInt + revision: Annotated[str, Field(strict=True)] + root_folder_id: StrictStr + state: StrictStr + storage_bytes: StrictInt + updated_at: datetime + workspace_id: StrictStr + __properties: ClassVar[List[str]] = ["created_at", "created_by", "deleted_at", "id", "metadata", "name", "retrieval_bytes", "revision", "root_folder_id", "state", "storage_bytes", "updated_at", "workspace_id"] + + @field_validator('id', mode="before") + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^drv_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^drv_[a-f0-9]{16}$/") + return value + + @field_validator('revision', mode="before") + def revision_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^rev_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^rev_[a-f0-9]{16}$/") + return value + + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DriveOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if created_by (nullable) is None + # and model_fields_set contains the field + if self.created_by is None and "created_by" in self.model_fields_set: + _dict['created_by'] = None + + # set to None if deleted_at (nullable) is None + # and model_fields_set contains the field + if self.deleted_at is None and "deleted_at" in self.model_fields_set: + _dict['deleted_at'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DriveOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "created_at": obj.get("created_at"), + "created_by": obj.get("created_by"), + "deleted_at": obj.get("deleted_at"), + "id": obj.get("id"), + "metadata": obj.get("metadata"), + "name": obj.get("name"), + "retrieval_bytes": obj.get("retrieval_bytes"), + "revision": obj.get("revision"), + "root_folder_id": obj.get("root_folder_id"), + "state": obj.get("state"), + "storage_bytes": obj.get("storage_bytes"), + "updated_at": obj.get("updated_at"), + "workspace_id": obj.get("workspace_id") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/drive_update_in.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/drive_update_in.py new file mode 100644 index 0000000..a24c3ee --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/drive_update_in.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DriveUpdateIn(BaseModel): + """ + PATCH /v0/drives/{id} body — at least one field is required. + """ # noqa: E501 + metadata: Optional[Dict[str, Any]] = None + name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None + __properties: ClassVar[List[str]] = ["metadata", "name"] + + model_config = ConfigDict( + extra="forbid", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DriveUpdateIn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the request body using wire aliases.""" + return to_jsonable_python( + self.model_dump( + by_alias=True, + exclude_unset=True, + exclude={"additional_properties"}, + ) + ) + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Validate a request dictionary without discarding unknown fields.""" + if obj is None: + return None + return cls.model_validate(obj) diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/drive_usage_out.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/drive_usage_out.py new file mode 100644 index 0000000..609308c --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/drive_usage_out.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DriveUsageOut(BaseModel): + """ + DriveUsageOut + """ # noqa: E501 + retrieval_bytes: StrictInt + storage_bytes: StrictInt + __properties: ClassVar[List[str]] = ["retrieval_bytes", "storage_bytes"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DriveUsageOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DriveUsageOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "retrieval_bytes": obj.get("retrieval_bytes"), + "storage_bytes": obj.get("storage_bytes") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/drives_create400_response.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/drives_create400_response.py new file mode 100644 index 0000000..fad69d7 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/drives_create400_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from agentdrive_sdk.generated.async_client.models.drives_create400_response_error import DrivesCreate400ResponseError +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DrivesCreate400Response(BaseModel): + """ + DrivesCreate400Response + """ # noqa: E501 + error: DrivesCreate400ResponseError + __properties: ClassVar[List[str]] = ["error"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DrivesCreate400Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DrivesCreate400Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": DrivesCreate400ResponseError.from_dict(obj["error"]) if obj.get("error") is not None else None + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/drives_create400_response_error.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/drives_create400_response_error.py new file mode 100644 index 0000000..89d3725 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/drives_create400_response_error.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DrivesCreate400ResponseError(BaseModel): + """ + DrivesCreate400ResponseError + """ # noqa: E501 + code: StrictStr = Field(description="Stable machine-readable error code (see the error-catalog).") + details: Optional[Dict[str, Any]] = Field(default=None, description="Error-code-specific context (optional).") + message: StrictStr + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "details", "message"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DrivesCreate400ResponseError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DrivesCreate400ResponseError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "details": obj.get("details"), + "message": obj.get("message") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/drives_list400_response.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/drives_list400_response.py new file mode 100644 index 0000000..703b4a2 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/drives_list400_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from agentdrive_sdk.generated.async_client.models.drives_list400_response_error import DrivesList400ResponseError +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DrivesList400Response(BaseModel): + """ + DrivesList400Response + """ # noqa: E501 + error: DrivesList400ResponseError + __properties: ClassVar[List[str]] = ["error"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DrivesList400Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DrivesList400Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": DrivesList400ResponseError.from_dict(obj["error"]) if obj.get("error") is not None else None + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/drives_list400_response_error.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/drives_list400_response_error.py new file mode 100644 index 0000000..aafb245 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/drives_list400_response_error.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DrivesList400ResponseError(BaseModel): + """ + DrivesList400ResponseError + """ # noqa: E501 + code: StrictStr = Field(description="Stable machine-readable error code (see the error-catalog).") + details: Optional[Dict[str, Any]] = Field(default=None, description="Error-code-specific context (optional).") + message: Optional[StrictStr] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "details", "message"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DrivesList400ResponseError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DrivesList400ResponseError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "details": obj.get("details"), + "message": obj.get("message") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/error_response.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/error_response.py new file mode 100644 index 0000000..7d308a1 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/error_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from agentdrive_sdk.generated.async_client.models.drives_create400_response_error import DrivesCreate400ResponseError +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ErrorResponse(BaseModel): + """ + ErrorResponse + """ # noqa: E501 + error: DrivesCreate400ResponseError + __properties: ClassVar[List[str]] = ["error"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ErrorResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ErrorResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": DrivesCreate400ResponseError.from_dict(obj["error"]) if obj.get("error") is not None else None + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/folder_cascade_out.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/folder_cascade_out.py new file mode 100644 index 0000000..30dedec --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/folder_cascade_out.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from agentdrive_sdk.generated.async_client.models.folder_out import FolderOut +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class FolderCascadeOut(BaseModel): + """ + FolderCascadeOut + """ # noqa: E501 + cascade: Dict[str, StrictInt] + folder: FolderOut + __properties: ClassVar[List[str]] = ["cascade", "folder"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FolderCascadeOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of folder + if self.folder: + _dict['folder'] = self.folder.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FolderCascadeOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cascade": obj.get("cascade"), + "folder": FolderOut.from_dict(obj["folder"]) if obj.get("folder") is not None else None + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/folder_copy_in.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/folder_copy_in.py new file mode 100644 index 0000000..3245946 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/folder_copy_in.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class FolderCopyIn(BaseModel): + """ + POST /v0/drives/{id}/folders/{folder_id}/copy body. ``destination_drive_id`` must equal the source drive (or be absent) — cross-drive copy is out of v0 scope and rejected. + """ # noqa: E501 + destination_drive_id: Optional[Annotated[str, Field(strict=True)]] = None + destination_name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] + destination_parent_id: Annotated[str, Field(strict=True)] + __properties: ClassVar[List[str]] = ["destination_drive_id", "destination_name", "destination_parent_id"] + + @field_validator('destination_drive_id', mode="before") + def destination_drive_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if isinstance(value, str) and not re.match(r"^drv_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^drv_[a-f0-9]{16}$/") + return value + + @field_validator('destination_parent_id', mode="before") + def destination_parent_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^fld_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^fld_[a-f0-9]{16}$/") + return value + + model_config = ConfigDict( + extra="forbid", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FolderCopyIn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the request body using wire aliases.""" + return to_jsonable_python( + self.model_dump( + by_alias=True, + exclude_unset=True, + exclude={"additional_properties"}, + ) + ) + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Validate a request dictionary without discarding unknown fields.""" + if obj is None: + return None + return cls.model_validate(obj) diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/folder_create_in.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/folder_create_in.py new file mode 100644 index 0000000..05ec038 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/folder_create_in.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class FolderCreateIn(BaseModel): + """ + POST /v0/drives/{id}/folders body. + """ # noqa: E501 + grant_inheritance: StrictStr = 'inherit' + metadata: Dict[str, Any] = None + name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] + parent_id: Annotated[str, Field(strict=True)] + __properties: ClassVar[List[str]] = ["grant_inheritance", "metadata", "name", "parent_id"] + + @field_validator('grant_inheritance') + def grant_inheritance_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['inherit', 'sealed']): + raise ValueError("must be one of enum values ('inherit', 'sealed')") + return value + + @field_validator('parent_id', mode="before") + def parent_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^fld_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^fld_[a-f0-9]{16}$/") + return value + + model_config = ConfigDict( + extra="forbid", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FolderCreateIn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the request body using wire aliases.""" + return to_jsonable_python( + self.model_dump( + by_alias=True, + exclude_unset=True, + exclude={"additional_properties"}, + ) + ) + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Validate a request dictionary without discarding unknown fields.""" + if obj is None: + return None + return cls.model_validate(obj) diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/folder_list_out.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/folder_list_out.py new file mode 100644 index 0000000..a1eb886 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/folder_list_out.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from agentdrive_sdk.generated.async_client.models.folder_out import FolderOut +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class FolderListOut(BaseModel): + """ + FolderListOut + """ # noqa: E501 + items: List[FolderOut] + next_cursor: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["items", "next_cursor"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FolderListOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item_items in self.items: + if _item_items: + _items.append(_item_items.to_dict()) + _dict['items'] = _items + # set to None if next_cursor (nullable) is None + # and model_fields_set contains the field + if self.next_cursor is None and "next_cursor" in self.model_fields_set: + _dict['next_cursor'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FolderListOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "items": [FolderOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, + "next_cursor": obj.get("next_cursor") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/folder_out.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/folder_out.py new file mode 100644 index 0000000..ac4c7e1 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/folder_out.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class FolderOut(BaseModel): + """ + FolderOut + """ # noqa: E501 + created_at: datetime + deleted_at: Optional[datetime] + drive_id: Annotated[str, Field(strict=True)] + grant_inheritance: StrictStr + id: Annotated[str, Field(strict=True)] + metadata: Dict[str, Any] + name: Optional[StrictStr] + parent_id: Optional[StrictStr] + revision: Annotated[str, Field(strict=True)] + state: StrictStr + updated_at: datetime + __properties: ClassVar[List[str]] = ["created_at", "deleted_at", "drive_id", "grant_inheritance", "id", "metadata", "name", "parent_id", "revision", "state", "updated_at"] + + @field_validator('drive_id', mode="before") + def drive_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^drv_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^drv_[a-f0-9]{16}$/") + return value + + + @field_validator('id', mode="before") + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^fld_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^fld_[a-f0-9]{16}$/") + return value + + @field_validator('revision', mode="before") + def revision_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^rev_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^rev_[a-f0-9]{16}$/") + return value + + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FolderOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if deleted_at (nullable) is None + # and model_fields_set contains the field + if self.deleted_at is None and "deleted_at" in self.model_fields_set: + _dict['deleted_at'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if parent_id (nullable) is None + # and model_fields_set contains the field + if self.parent_id is None and "parent_id" in self.model_fields_set: + _dict['parent_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FolderOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "created_at": obj.get("created_at"), + "deleted_at": obj.get("deleted_at"), + "drive_id": obj.get("drive_id"), + "grant_inheritance": obj.get("grant_inheritance"), + "id": obj.get("id"), + "metadata": obj.get("metadata"), + "name": obj.get("name"), + "parent_id": obj.get("parent_id"), + "revision": obj.get("revision"), + "state": obj.get("state"), + "updated_at": obj.get("updated_at") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/folder_update_in.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/folder_update_in.py new file mode 100644 index 0000000..e363c36 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/folder_update_in.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class FolderUpdateIn(BaseModel): + """ + PATCH /v0/drives/{id}/folders/{folder_id} body — at least one field is required. + """ # noqa: E501 + grant_inheritance: Optional[StrictStr] = None + metadata: Optional[Dict[str, Any]] = None + name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = None + parent_id: Optional[Annotated[str, Field(strict=True)]] = None + __properties: ClassVar[List[str]] = ["grant_inheritance", "metadata", "name", "parent_id"] + + @field_validator('grant_inheritance') + def grant_inheritance_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['inherit', 'sealed']): + raise ValueError("must be one of enum values ('inherit', 'sealed')") + return value + + @field_validator('parent_id', mode="before") + def parent_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if isinstance(value, str) and not re.match(r"^fld_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^fld_[a-f0-9]{16}$/") + return value + + model_config = ConfigDict( + extra="forbid", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FolderUpdateIn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the request body using wire aliases.""" + return to_jsonable_python( + self.model_dump( + by_alias=True, + exclude_unset=True, + exclude={"additional_properties"}, + ) + ) + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Validate a request dictionary without discarding unknown fields.""" + if obj is None: + return None + return cls.model_validate(obj) diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/grant_create_in.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/grant_create_in.py new file mode 100644 index 0000000..e72fa68 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/grant_create_in.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class GrantCreateIn(BaseModel): + """ + POST /v0/drives/{id}/grants body. + """ # noqa: E501 + expires_at: Optional[datetime] = None + principal_id: Optional[StrictStr] = None + principal_type: StrictStr + resource_id: Annotated[str, Field(min_length=1, strict=True)] + resource_type: StrictStr + role: StrictStr + __properties: ClassVar[List[str]] = ["expires_at", "principal_id", "principal_type", "resource_id", "resource_type", "role"] + + @field_validator('principal_type') + def principal_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['agent', 'user', 'workspace', 'public']): + raise ValueError("must be one of enum values ('agent', 'user', 'workspace', 'public')") + return value + + @field_validator('resource_type') + def resource_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['drive', 'folder', 'artifact']): + raise ValueError("must be one of enum values ('drive', 'folder', 'artifact')") + return value + + @field_validator('role') + def role_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['viewer', 'editor', 'manager']): + raise ValueError("must be one of enum values ('viewer', 'editor', 'manager')") + return value + + model_config = ConfigDict( + extra="forbid", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GrantCreateIn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the request body using wire aliases.""" + return to_jsonable_python( + self.model_dump( + by_alias=True, + exclude_unset=True, + exclude={"additional_properties"}, + ) + ) + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Validate a request dictionary without discarding unknown fields.""" + if obj is None: + return None + return cls.model_validate(obj) diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/grant_list_out.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/grant_list_out.py new file mode 100644 index 0000000..22e8c70 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/grant_list_out.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from agentdrive_sdk.generated.async_client.models.grant_out import GrantOut +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class GrantListOut(BaseModel): + """ + GrantListOut + """ # noqa: E501 + items: List[GrantOut] + next_cursor: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["items", "next_cursor"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GrantListOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item_items in self.items: + if _item_items: + _items.append(_item_items.to_dict()) + _dict['items'] = _items + # set to None if next_cursor (nullable) is None + # and model_fields_set contains the field + if self.next_cursor is None and "next_cursor" in self.model_fields_set: + _dict['next_cursor'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GrantListOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "items": [GrantOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, + "next_cursor": obj.get("next_cursor") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/grant_out.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/grant_out.py new file mode 100644 index 0000000..cc0512a --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/grant_out.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class GrantOut(BaseModel): + """ + GrantOut + """ # noqa: E501 + created_at: datetime + drive_id: Annotated[str, Field(strict=True)] + expires_at: Optional[datetime] + id: Annotated[str, Field(strict=True)] + principal_id: Optional[StrictStr] + principal_type: StrictStr + resource_id: StrictStr + resource_type: StrictStr + revision: Annotated[str, Field(strict=True)] + revoked_at: Optional[datetime] + role: StrictStr + state: StrictStr + __properties: ClassVar[List[str]] = ["created_at", "drive_id", "expires_at", "id", "principal_id", "principal_type", "resource_id", "resource_type", "revision", "revoked_at", "role", "state"] + + @field_validator('drive_id', mode="before") + def drive_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^drv_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^drv_[a-f0-9]{16}$/") + return value + + @field_validator('id', mode="before") + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^grn_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^grn_[a-f0-9]{16}$/") + return value + + + + @field_validator('revision', mode="before") + def revision_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^rev_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^rev_[a-f0-9]{16}$/") + return value + + + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GrantOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if expires_at (nullable) is None + # and model_fields_set contains the field + if self.expires_at is None and "expires_at" in self.model_fields_set: + _dict['expires_at'] = None + + # set to None if principal_id (nullable) is None + # and model_fields_set contains the field + if self.principal_id is None and "principal_id" in self.model_fields_set: + _dict['principal_id'] = None + + # set to None if revoked_at (nullable) is None + # and model_fields_set contains the field + if self.revoked_at is None and "revoked_at" in self.model_fields_set: + _dict['revoked_at'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GrantOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "created_at": obj.get("created_at"), + "drive_id": obj.get("drive_id"), + "expires_at": obj.get("expires_at"), + "id": obj.get("id"), + "principal_id": obj.get("principal_id"), + "principal_type": obj.get("principal_type"), + "resource_id": obj.get("resource_id"), + "resource_type": obj.get("resource_type"), + "revision": obj.get("revision"), + "revoked_at": obj.get("revoked_at"), + "role": obj.get("role"), + "state": obj.get("state") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/grant_update_in.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/grant_update_in.py new file mode 100644 index 0000000..14e9f10 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/grant_update_in.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class GrantUpdateIn(BaseModel): + """ + PATCH /v0/drives/{id}/grants/{grant_id} body — at least one field is required. An explicit ``expires_at: null`` clears the expiry; omitting it leaves it unchanged. + """ # noqa: E501 + expires_at: Optional[datetime] = None + role: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["expires_at", "role"] + + @field_validator('role') + def role_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['viewer', 'editor', 'manager']): + raise ValueError("must be one of enum values ('viewer', 'editor', 'manager')") + return value + + model_config = ConfigDict( + extra="forbid", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GrantUpdateIn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the request body using wire aliases.""" + return to_jsonable_python( + self.model_dump( + by_alias=True, + exclude_unset=True, + exclude={"additional_properties"}, + ) + ) + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Validate a request dictionary without discarding unknown fields.""" + if obj is None: + return None + return cls.model_validate(obj) diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/health_degraded_detail.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/health_degraded_detail.py new file mode 100644 index 0000000..ef0e5f7 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/health_degraded_detail.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class HealthDegradedDetail(BaseModel): + """ + HealthDegradedDetail + """ # noqa: E501 + error: StrictStr + status: StrictStr + __properties: ClassVar[List[str]] = ["error", "status"] + + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HealthDegradedDetail from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HealthDegradedDetail from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "status": obj.get("status") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/health_degraded_response.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/health_degraded_response.py new file mode 100644 index 0000000..73b05b6 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/health_degraded_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from agentdrive_sdk.generated.async_client.models.health_degraded_detail import HealthDegradedDetail +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class HealthDegradedResponse(BaseModel): + """ + Legacy health-probe failure shape. Health predates the `/v0` error envelope and is consumed by load balancers. PR 1 documents the wire shape without changing it; convergence on the canonical API envelope is a separately reviewed compatibility decision. + """ # noqa: E501 + detail: HealthDegradedDetail + __properties: ClassVar[List[str]] = ["detail"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HealthDegradedResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HealthDegradedResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "detail": HealthDegradedDetail.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/health_out.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/health_out.py new file mode 100644 index 0000000..4388369 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/health_out.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class HealthOut(BaseModel): + """ + HealthOut + """ # noqa: E501 + status: StrictStr + __properties: ClassVar[List[str]] = ["status"] + + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HealthOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HealthOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/search_hit_out.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/search_hit_out.py new file mode 100644 index 0000000..d577a27 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/search_hit_out.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class SearchHitOut(BaseModel): + """ + SearchHitOut + """ # noqa: E501 + content_type: Optional[StrictStr] + drive_id: Annotated[str, Field(strict=True)] + id: Annotated[str, Field(strict=True)] + name: StrictStr + parent_id: Optional[StrictStr] + rank: Union[StrictFloat, StrictInt] + snippet: StrictStr = Field(description="HTML-safe highlighted excerpt. The ONLY markup it may contain is the server's own ... highlight pair; artifact content is entity-escaped, so this may be rendered as HTML.") + updated_at: datetime + version_id: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["content_type", "drive_id", "id", "name", "parent_id", "rank", "snippet", "updated_at", "version_id"] + + @field_validator('drive_id', mode="before") + def drive_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^drv_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^drv_[a-f0-9]{16}$/") + return value + + @field_validator('id', mode="before") + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^art_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^art_[a-f0-9]{16}$/") + return value + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SearchHitOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if content_type (nullable) is None + # and model_fields_set contains the field + if self.content_type is None and "content_type" in self.model_fields_set: + _dict['content_type'] = None + + # set to None if parent_id (nullable) is None + # and model_fields_set contains the field + if self.parent_id is None and "parent_id" in self.model_fields_set: + _dict['parent_id'] = None + + # set to None if version_id (nullable) is None + # and model_fields_set contains the field + if self.version_id is None and "version_id" in self.model_fields_set: + _dict['version_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SearchHitOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "content_type": obj.get("content_type"), + "drive_id": obj.get("drive_id"), + "id": obj.get("id"), + "name": obj.get("name"), + "parent_id": obj.get("parent_id"), + "rank": obj.get("rank"), + "snippet": obj.get("snippet"), + "updated_at": obj.get("updated_at"), + "version_id": obj.get("version_id") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/search_page_out.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/search_page_out.py new file mode 100644 index 0000000..5c60be6 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/search_page_out.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from agentdrive_sdk.generated.async_client.models.search_hit_out import SearchHitOut +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class SearchPageOut(BaseModel): + """ + SearchPageOut + """ # noqa: E501 + items: List[SearchHitOut] + next_cursor: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["items", "next_cursor"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SearchPageOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item_items in self.items: + if _item_items: + _items.append(_item_items.to_dict()) + _dict['items'] = _items + # set to None if next_cursor (nullable) is None + # and model_fields_set contains the field + if self.next_cursor is None and "next_cursor" in self.model_fields_set: + _dict['next_cursor'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SearchPageOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "items": [SearchHitOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, + "next_cursor": obj.get("next_cursor") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/share_create_in.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/share_create_in.py new file mode 100644 index 0000000..7ed4d71 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/share_create_in.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ShareCreateIn(BaseModel): + """ + POST /v0/drives/{id}/shares body. + """ # noqa: E501 + expires_at: Optional[datetime] = None + resource_id: Annotated[str, Field(min_length=1, strict=True)] + resource_type: StrictStr + __properties: ClassVar[List[str]] = ["expires_at", "resource_id", "resource_type"] + + @field_validator('resource_type') + def resource_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['artifact', 'artifact_version', 'folder']): + raise ValueError("must be one of enum values ('artifact', 'artifact_version', 'folder')") + return value + + model_config = ConfigDict( + extra="forbid", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ShareCreateIn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the request body using wire aliases.""" + return to_jsonable_python( + self.model_dump( + by_alias=True, + exclude_unset=True, + exclude={"additional_properties"}, + ) + ) + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Validate a request dictionary without discarding unknown fields.""" + if obj is None: + return None + return cls.model_validate(obj) diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/share_create_out.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/share_create_out.py new file mode 100644 index 0000000..fc3d8c1 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/share_create_out.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ShareCreateOut(BaseModel): + """ + The create/rotate response — the ONLY response carrying the plaintext secret. + """ # noqa: E501 + created_at: datetime + created_by: Optional[StrictStr] + drive_id: Annotated[str, Field(strict=True)] + expires_at: Optional[datetime] + id: Annotated[str, Field(strict=True)] + resource_id: StrictStr + resource_type: StrictStr + revision: Annotated[str, Field(strict=True)] + revoked_at: Optional[datetime] + rotated_at: Optional[datetime] + secret: Optional[StrictStr] = Field(default=None, description="Plaintext share secret. Present only on first execution of a create or rotate; null on idempotent replay — rotate to obtain a new secret.") + state: StrictStr + __properties: ClassVar[List[str]] = ["created_at", "created_by", "drive_id", "expires_at", "id", "resource_id", "resource_type", "revision", "revoked_at", "rotated_at", "secret", "state"] + + @field_validator('drive_id', mode="before") + def drive_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^drv_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^drv_[a-f0-9]{16}$/") + return value + + @field_validator('id', mode="before") + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^shr_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^shr_[a-f0-9]{16}$/") + return value + + + @field_validator('revision', mode="before") + def revision_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^rev_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^rev_[a-f0-9]{16}$/") + return value + + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ShareCreateOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if created_by (nullable) is None + # and model_fields_set contains the field + if self.created_by is None and "created_by" in self.model_fields_set: + _dict['created_by'] = None + + # set to None if expires_at (nullable) is None + # and model_fields_set contains the field + if self.expires_at is None and "expires_at" in self.model_fields_set: + _dict['expires_at'] = None + + # set to None if revoked_at (nullable) is None + # and model_fields_set contains the field + if self.revoked_at is None and "revoked_at" in self.model_fields_set: + _dict['revoked_at'] = None + + # set to None if rotated_at (nullable) is None + # and model_fields_set contains the field + if self.rotated_at is None and "rotated_at" in self.model_fields_set: + _dict['rotated_at'] = None + + # set to None if secret (nullable) is None + # and model_fields_set contains the field + if self.secret is None and "secret" in self.model_fields_set: + _dict['secret'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ShareCreateOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "created_at": obj.get("created_at"), + "created_by": obj.get("created_by"), + "drive_id": obj.get("drive_id"), + "expires_at": obj.get("expires_at"), + "id": obj.get("id"), + "resource_id": obj.get("resource_id"), + "resource_type": obj.get("resource_type"), + "revision": obj.get("revision"), + "revoked_at": obj.get("revoked_at"), + "rotated_at": obj.get("rotated_at"), + "secret": obj.get("secret"), + "state": obj.get("state") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/share_list_out.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/share_list_out.py new file mode 100644 index 0000000..f5fd064 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/share_list_out.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from agentdrive_sdk.generated.async_client.models.share_out import ShareOut +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ShareListOut(BaseModel): + """ + ShareListOut + """ # noqa: E501 + items: List[ShareOut] + next_cursor: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["items", "next_cursor"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ShareListOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item_items in self.items: + if _item_items: + _items.append(_item_items.to_dict()) + _dict['items'] = _items + # set to None if next_cursor (nullable) is None + # and model_fields_set contains the field + if self.next_cursor is None and "next_cursor" in self.model_fields_set: + _dict['next_cursor'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ShareListOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "items": [ShareOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, + "next_cursor": obj.get("next_cursor") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/share_out.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/share_out.py new file mode 100644 index 0000000..0e0451f --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/share_out.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ShareOut(BaseModel): + """ + ShareOut + """ # noqa: E501 + created_at: datetime + created_by: Optional[StrictStr] + drive_id: Annotated[str, Field(strict=True)] + expires_at: Optional[datetime] + id: Annotated[str, Field(strict=True)] + resource_id: StrictStr + resource_type: StrictStr + revision: Annotated[str, Field(strict=True)] + revoked_at: Optional[datetime] + rotated_at: Optional[datetime] + state: StrictStr + __properties: ClassVar[List[str]] = ["created_at", "created_by", "drive_id", "expires_at", "id", "resource_id", "resource_type", "revision", "revoked_at", "rotated_at", "state"] + + @field_validator('drive_id', mode="before") + def drive_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^drv_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^drv_[a-f0-9]{16}$/") + return value + + @field_validator('id', mode="before") + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^shr_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^shr_[a-f0-9]{16}$/") + return value + + + @field_validator('revision', mode="before") + def revision_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^rev_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^rev_[a-f0-9]{16}$/") + return value + + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ShareOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if created_by (nullable) is None + # and model_fields_set contains the field + if self.created_by is None and "created_by" in self.model_fields_set: + _dict['created_by'] = None + + # set to None if expires_at (nullable) is None + # and model_fields_set contains the field + if self.expires_at is None and "expires_at" in self.model_fields_set: + _dict['expires_at'] = None + + # set to None if revoked_at (nullable) is None + # and model_fields_set contains the field + if self.revoked_at is None and "revoked_at" in self.model_fields_set: + _dict['revoked_at'] = None + + # set to None if rotated_at (nullable) is None + # and model_fields_set contains the field + if self.rotated_at is None and "rotated_at" in self.model_fields_set: + _dict['rotated_at'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ShareOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "created_at": obj.get("created_at"), + "created_by": obj.get("created_by"), + "drive_id": obj.get("drive_id"), + "expires_at": obj.get("expires_at"), + "id": obj.get("id"), + "resource_id": obj.get("resource_id"), + "resource_type": obj.get("resource_type"), + "revision": obj.get("revision"), + "revoked_at": obj.get("revoked_at"), + "rotated_at": obj.get("rotated_at"), + "state": obj.get("state") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/v0_error_envelope.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/v0_error_envelope.py new file mode 100644 index 0000000..db43783 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/v0_error_envelope.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from agentdrive_sdk.generated.async_client.models.drives_create400_response_error import DrivesCreate400ResponseError +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class V0ErrorEnvelope(BaseModel): + """ + V0ErrorEnvelope + """ # noqa: E501 + error: DrivesCreate400ResponseError + __properties: ClassVar[List[str]] = ["error"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of V0ErrorEnvelope from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of V0ErrorEnvelope from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": DrivesCreate400ResponseError.from_dict(obj["error"]) if obj.get("error") is not None else None + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/validation_error_response.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/validation_error_response.py new file mode 100644 index 0000000..ea36f8e --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/validation_error_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from agentdrive_sdk.generated.async_client.models.validation_error_response_error import ValidationErrorResponseError +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ValidationErrorResponse(BaseModel): + """ + ValidationErrorResponse + """ # noqa: E501 + error: ValidationErrorResponseError + __properties: ClassVar[List[str]] = ["error"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationErrorResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ValidationErrorResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": ValidationErrorResponseError.from_dict(obj["error"]) if obj.get("error") is not None else None + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/validation_error_response_error.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/validation_error_response_error.py new file mode 100644 index 0000000..33ea10a --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/validation_error_response_error.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from agentdrive_sdk.generated.async_client.models.validation_error_response_error_details import ValidationErrorResponseErrorDetails +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ValidationErrorResponseError(BaseModel): + """ + ValidationErrorResponseError + """ # noqa: E501 + code: Optional[StrictStr] + details: Optional[ValidationErrorResponseErrorDetails] = None + message: Optional[StrictStr] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "details", "message"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationErrorResponseError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if code (nullable) is None + # and model_fields_set contains the field + if self.code is None and "code" in self.model_fields_set: + _dict['code'] = None + + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ValidationErrorResponseError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "details": ValidationErrorResponseErrorDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "message": obj.get("message") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/validation_error_response_error_details.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/validation_error_response_error_details.py new file mode 100644 index 0000000..e49e9fd --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/validation_error_response_error_details.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from agentdrive_sdk.generated.async_client.models.validation_error_response_error_details_fields_inner import ValidationErrorResponseErrorDetailsFieldsInner +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ValidationErrorResponseErrorDetails(BaseModel): + """ + ValidationErrorResponseErrorDetails + """ # noqa: E501 + fields: Optional[List[ValidationErrorResponseErrorDetailsFieldsInner]] = None + __properties: ClassVar[List[str]] = ["fields"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationErrorResponseErrorDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in fields (list) + _items = [] + if self.fields: + for _item_fields in self.fields: + if _item_fields: + _items.append(_item_fields.to_dict()) + _dict['fields'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ValidationErrorResponseErrorDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fields": [ValidationErrorResponseErrorDetailsFieldsInner.from_dict(_item) for _item in obj["fields"]] if obj.get("fields") is not None else None + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/validation_error_response_error_details_fields_inner.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/validation_error_response_error_details_fields_inner.py new file mode 100644 index 0000000..f88b439 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/validation_error_response_error_details_fields_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ValidationErrorResponseErrorDetailsFieldsInner(BaseModel): + """ + ValidationErrorResponseErrorDetailsFieldsInner + """ # noqa: E501 + location: Optional[StrictStr] = None + reason: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["location", "reason"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationErrorResponseErrorDetailsFieldsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ValidationErrorResponseErrorDetailsFieldsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "location": obj.get("location"), + "reason": obj.get("reason") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/version_created_out.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/version_created_out.py new file mode 100644 index 0000000..fd3ee8a --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/version_created_out.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class VersionCreatedOut(BaseModel): + """ + The append/restore response — a version plus the artifact's new revision, which the version-creating 201 rotates. + """ # noqa: E501 + artifact_id: Annotated[str, Field(strict=True)] + artifact_revision: Annotated[str, Field(strict=True)] = Field(description="The artifact's revision after this version became head — the If-Match value for the next mutation.") + content_type: StrictStr + created_at: datetime + created_by: Optional[StrictStr] + hash: StrictStr + id: Annotated[str, Field(strict=True)] + parent_version_id: Optional[StrictStr] + size_bytes: Annotated[int, Field(strict=True, ge=0)] + version_number: Annotated[int, Field(strict=True, ge=1)] + __properties: ClassVar[List[str]] = ["artifact_id", "artifact_revision", "content_type", "created_at", "created_by", "hash", "id", "parent_version_id", "size_bytes", "version_number"] + + @field_validator('artifact_id', mode="before") + def artifact_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^art_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^art_[a-f0-9]{16}$/") + return value + + @field_validator('artifact_revision', mode="before") + def artifact_revision_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^rev_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^rev_[a-f0-9]{16}$/") + return value + + @field_validator('id', mode="before") + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^ver_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^ver_[a-f0-9]{16}$/") + return value + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VersionCreatedOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if created_by (nullable) is None + # and model_fields_set contains the field + if self.created_by is None and "created_by" in self.model_fields_set: + _dict['created_by'] = None + + # set to None if parent_version_id (nullable) is None + # and model_fields_set contains the field + if self.parent_version_id is None and "parent_version_id" in self.model_fields_set: + _dict['parent_version_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VersionCreatedOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "artifact_id": obj.get("artifact_id"), + "artifact_revision": obj.get("artifact_revision"), + "content_type": obj.get("content_type"), + "created_at": obj.get("created_at"), + "created_by": obj.get("created_by"), + "hash": obj.get("hash"), + "id": obj.get("id"), + "parent_version_id": obj.get("parent_version_id"), + "size_bytes": obj.get("size_bytes"), + "version_number": obj.get("version_number") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/version_list_out.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/version_list_out.py new file mode 100644 index 0000000..6fea515 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/version_list_out.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from agentdrive_sdk.generated.async_client.models.version_out import VersionOut +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class VersionListOut(BaseModel): + """ + VersionListOut + """ # noqa: E501 + items: List[VersionOut] + next_cursor: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["items", "next_cursor"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VersionListOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item_items in self.items: + if _item_items: + _items.append(_item_items.to_dict()) + _dict['items'] = _items + # set to None if next_cursor (nullable) is None + # and model_fields_set contains the field + if self.next_cursor is None and "next_cursor" in self.model_fields_set: + _dict['next_cursor'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VersionListOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "items": [VersionOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, + "next_cursor": obj.get("next_cursor") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/models/version_out.py b/sdk/python/src/agentdrive_sdk/generated/async_client/models/version_out.py new file mode 100644 index 0000000..73841e9 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/models/version_out.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class VersionOut(BaseModel): + """ + VersionOut + """ # noqa: E501 + artifact_id: Annotated[str, Field(strict=True)] + content_type: StrictStr + created_at: datetime + created_by: Optional[StrictStr] + hash: StrictStr + id: Annotated[str, Field(strict=True)] + parent_version_id: Optional[StrictStr] + size_bytes: Annotated[int, Field(strict=True, ge=0)] + version_number: Annotated[int, Field(strict=True, ge=1)] + __properties: ClassVar[List[str]] = ["artifact_id", "content_type", "created_at", "created_by", "hash", "id", "parent_version_id", "size_bytes", "version_number"] + + @field_validator('artifact_id', mode="before") + def artifact_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^art_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^art_[a-f0-9]{16}$/") + return value + + @field_validator('id', mode="before") + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^ver_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^ver_[a-f0-9]{16}$/") + return value + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VersionOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if created_by (nullable) is None + # and model_fields_set contains the field + if self.created_by is None and "created_by" in self.model_fields_set: + _dict['created_by'] = None + + # set to None if parent_version_id (nullable) is None + # and model_fields_set contains the field + if self.parent_version_id is None and "parent_version_id" in self.model_fields_set: + _dict['parent_version_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VersionOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "artifact_id": obj.get("artifact_id"), + "content_type": obj.get("content_type"), + "created_at": obj.get("created_at"), + "created_by": obj.get("created_by"), + "hash": obj.get("hash"), + "id": obj.get("id"), + "parent_version_id": obj.get("parent_version_id"), + "size_bytes": obj.get("size_bytes"), + "version_number": obj.get("version_number") + }) + return _obj diff --git a/sdk/python/agentdrive_sdk/py.typed b/sdk/python/src/agentdrive_sdk/generated/async_client/py.typed similarity index 100% rename from sdk/python/agentdrive_sdk/py.typed rename to sdk/python/src/agentdrive_sdk/generated/async_client/py.typed diff --git a/sdk/python/src/agentdrive_sdk/generated/async_client/rest.py b/sdk/python/src/agentdrive_sdk/generated/async_client/rest.py new file mode 100644 index 0000000..307b20a --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/async_client/rest.py @@ -0,0 +1,202 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import io +import json +import re +import ssl +from typing import Optional, Union + +import httpx + +from agentdrive_sdk.generated.async_client.exceptions import ApiException, ApiValueError + +RESTResponseType = httpx.Response + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status_code + self.reason = resp.reason_phrase + self.data = None + + async def read(self): + if self.data is None: + self.data = await self.response.aread() + return self.data + + @property + def headers(self): + """Returns a CIMultiDictProxy of response headers.""" + return self.response.headers + + def getheaders(self): + """Returns a CIMultiDictProxy of the response headers; use ``headers`` instead.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header; use ``headers`` instead.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + + # maxsize is number of requests to host that are allowed in parallel + self.maxsize = configuration.connection_pool_maxsize + + self.ssl_context = ssl.create_default_context( + cafile=configuration.ssl_ca_cert, + cadata=configuration.ca_cert_data, + ) + if configuration.cert_file: + self.ssl_context.load_cert_chain( + configuration.cert_file, keyfile=configuration.key_file + ) + + if not configuration.verify_ssl: + self.ssl_context.check_hostname = False + self.ssl_context.verify_mode = ssl.CERT_NONE + + self.proxy = configuration.proxy + self.proxy_headers = configuration.proxy_headers + + self.pool_manager: Optional[httpx.AsyncClient] = None + + async def close(self): + if self.pool_manager is not None: + await self.pool_manager.aclose() + + async def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None): + """Execute request + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + timeout = _request_timeout or 5 * 60 + + if 'Content-Type' not in headers: + headers['Content-Type'] = 'application/json' + + args = { + "method": method, + "url": url, + "timeout": timeout, + "headers": headers + } + + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + if re.search('json', headers['Content-Type'], re.IGNORECASE): + if body is not None: + args["json"] = body + if body is None and post_params: + args["json"] = dict(post_params) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + args["data"] = dict(post_params) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by httpx + del headers['Content-Type'] + + files = [] + data = {} + for param in post_params: + k, v = param + if isinstance(v, tuple) and len(v) == 3: + files.append((k, v)) + else: + # Ensures that dict objects are serialized + if isinstance(v, dict): + v = json.dumps(v) + elif isinstance(v, int): + v = str(v) + data[k] = v + + if files: + args["files"] = files + if data: + args["data"] = data + + # Pass a `bytes` parameter directly in the body to support + # other content types than Json when `body` argument is provided + # in serialized form + elif isinstance(body, str) or isinstance(body, bytes): + args["data"] = body + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + + if self.pool_manager is None: + self.pool_manager = self._create_pool_manager() + + r = await self.pool_manager.request(**args) + return RESTResponse(r) + + def _create_pool_manager(self) -> httpx.AsyncClient: + limits = httpx.Limits(max_connections=self.maxsize) + + proxy = None + if self.proxy: + proxy = httpx.Proxy( + url=self.proxy, + headers=self.proxy_headers + ) + + return httpx.AsyncClient( + limits=limits, + proxy=proxy, + verify=self.ssl_context, + trust_env=True, + follow_redirects=False + ) diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/__init__.py b/sdk/python/src/agentdrive_sdk/generated/sync/__init__.py new file mode 100644 index 0000000..e168b2d --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/__init__.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +# flake8: noqa + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +__version__ = "0.1.0" + +# Define package exports +__all__ = [ + "ArtifactsApi", + "ChangesApi", + "DefaultApi", + "DiscoveryApi", + "DrivesApi", + "FoldersApi", + "GrantsApi", + "SearchApi", + "SharesApi", + "SharesRedemptionApi", + "VersionsApi", + "ApiResponse", + "ApiClient", + "Configuration", + "OpenApiException", + "ApiTypeError", + "ApiValueError", + "ApiKeyError", + "ApiAttributeError", + "ApiException", + "ArtifactCopyIn", + "ArtifactListOut", + "ArtifactOut", + "ArtifactUpdateIn", + "ChangeActorOut", + "ChangeOut", + "ChangePageOut", + "ChangeResourceOut", + "DriveCreateIn", + "DriveListOut", + "DriveOut", + "DriveUpdateIn", + "DriveUsageOut", + "DrivesCreate400Response", + "DrivesCreate400ResponseError", + "DrivesList400Response", + "DrivesList400ResponseError", + "ErrorResponse", + "FolderCascadeOut", + "FolderCopyIn", + "FolderCreateIn", + "FolderListOut", + "FolderOut", + "FolderUpdateIn", + "GrantCreateIn", + "GrantListOut", + "GrantOut", + "GrantUpdateIn", + "HealthDegradedDetail", + "HealthDegradedResponse", + "HealthOut", + "SearchHitOut", + "SearchPageOut", + "ShareCreateIn", + "ShareCreateOut", + "ShareListOut", + "ShareOut", + "V0ErrorEnvelope", + "ValidationErrorResponse", + "ValidationErrorResponseError", + "ValidationErrorResponseErrorDetails", + "ValidationErrorResponseErrorDetailsFieldsInner", + "VersionCreatedOut", + "VersionListOut", + "VersionOut", +] + +# import apis into sdk package +from agentdrive_sdk.generated.sync.api.artifacts_api import ArtifactsApi as ArtifactsApi +from agentdrive_sdk.generated.sync.api.changes_api import ChangesApi as ChangesApi +from agentdrive_sdk.generated.sync.api.default_api import DefaultApi as DefaultApi +from agentdrive_sdk.generated.sync.api.discovery_api import DiscoveryApi as DiscoveryApi +from agentdrive_sdk.generated.sync.api.drives_api import DrivesApi as DrivesApi +from agentdrive_sdk.generated.sync.api.folders_api import FoldersApi as FoldersApi +from agentdrive_sdk.generated.sync.api.grants_api import GrantsApi as GrantsApi +from agentdrive_sdk.generated.sync.api.search_api import SearchApi as SearchApi +from agentdrive_sdk.generated.sync.api.shares_api import SharesApi as SharesApi +from agentdrive_sdk.generated.sync.api.shares_redemption_api import SharesRedemptionApi as SharesRedemptionApi +from agentdrive_sdk.generated.sync.api.versions_api import VersionsApi as VersionsApi + +# import ApiClient +from agentdrive_sdk.generated.sync.api_response import ApiResponse as ApiResponse +from agentdrive_sdk.generated.sync.api_client import ApiClient as ApiClient +from agentdrive_sdk.generated.sync.configuration import Configuration as Configuration +from agentdrive_sdk.generated.sync.exceptions import OpenApiException as OpenApiException +from agentdrive_sdk.generated.sync.exceptions import ApiTypeError as ApiTypeError +from agentdrive_sdk.generated.sync.exceptions import ApiValueError as ApiValueError +from agentdrive_sdk.generated.sync.exceptions import ApiKeyError as ApiKeyError +from agentdrive_sdk.generated.sync.exceptions import ApiAttributeError as ApiAttributeError +from agentdrive_sdk.generated.sync.exceptions import ApiException as ApiException + +# import models into sdk package +from agentdrive_sdk.generated.sync.models.artifact_copy_in import ArtifactCopyIn as ArtifactCopyIn +from agentdrive_sdk.generated.sync.models.artifact_list_out import ArtifactListOut as ArtifactListOut +from agentdrive_sdk.generated.sync.models.artifact_out import ArtifactOut as ArtifactOut +from agentdrive_sdk.generated.sync.models.artifact_update_in import ArtifactUpdateIn as ArtifactUpdateIn +from agentdrive_sdk.generated.sync.models.change_actor_out import ChangeActorOut as ChangeActorOut +from agentdrive_sdk.generated.sync.models.change_out import ChangeOut as ChangeOut +from agentdrive_sdk.generated.sync.models.change_page_out import ChangePageOut as ChangePageOut +from agentdrive_sdk.generated.sync.models.change_resource_out import ChangeResourceOut as ChangeResourceOut +from agentdrive_sdk.generated.sync.models.drive_create_in import DriveCreateIn as DriveCreateIn +from agentdrive_sdk.generated.sync.models.drive_list_out import DriveListOut as DriveListOut +from agentdrive_sdk.generated.sync.models.drive_out import DriveOut as DriveOut +from agentdrive_sdk.generated.sync.models.drive_update_in import DriveUpdateIn as DriveUpdateIn +from agentdrive_sdk.generated.sync.models.drive_usage_out import DriveUsageOut as DriveUsageOut +from agentdrive_sdk.generated.sync.models.drives_create400_response import DrivesCreate400Response as DrivesCreate400Response +from agentdrive_sdk.generated.sync.models.drives_create400_response_error import DrivesCreate400ResponseError as DrivesCreate400ResponseError +from agentdrive_sdk.generated.sync.models.drives_list400_response import DrivesList400Response as DrivesList400Response +from agentdrive_sdk.generated.sync.models.drives_list400_response_error import DrivesList400ResponseError as DrivesList400ResponseError +from agentdrive_sdk.generated.sync.models.error_response import ErrorResponse as ErrorResponse +from agentdrive_sdk.generated.sync.models.folder_cascade_out import FolderCascadeOut as FolderCascadeOut +from agentdrive_sdk.generated.sync.models.folder_copy_in import FolderCopyIn as FolderCopyIn +from agentdrive_sdk.generated.sync.models.folder_create_in import FolderCreateIn as FolderCreateIn +from agentdrive_sdk.generated.sync.models.folder_list_out import FolderListOut as FolderListOut +from agentdrive_sdk.generated.sync.models.folder_out import FolderOut as FolderOut +from agentdrive_sdk.generated.sync.models.folder_update_in import FolderUpdateIn as FolderUpdateIn +from agentdrive_sdk.generated.sync.models.grant_create_in import GrantCreateIn as GrantCreateIn +from agentdrive_sdk.generated.sync.models.grant_list_out import GrantListOut as GrantListOut +from agentdrive_sdk.generated.sync.models.grant_out import GrantOut as GrantOut +from agentdrive_sdk.generated.sync.models.grant_update_in import GrantUpdateIn as GrantUpdateIn +from agentdrive_sdk.generated.sync.models.health_degraded_detail import HealthDegradedDetail as HealthDegradedDetail +from agentdrive_sdk.generated.sync.models.health_degraded_response import HealthDegradedResponse as HealthDegradedResponse +from agentdrive_sdk.generated.sync.models.health_out import HealthOut as HealthOut +from agentdrive_sdk.generated.sync.models.search_hit_out import SearchHitOut as SearchHitOut +from agentdrive_sdk.generated.sync.models.search_page_out import SearchPageOut as SearchPageOut +from agentdrive_sdk.generated.sync.models.share_create_in import ShareCreateIn as ShareCreateIn +from agentdrive_sdk.generated.sync.models.share_create_out import ShareCreateOut as ShareCreateOut +from agentdrive_sdk.generated.sync.models.share_list_out import ShareListOut as ShareListOut +from agentdrive_sdk.generated.sync.models.share_out import ShareOut as ShareOut +from agentdrive_sdk.generated.sync.models.v0_error_envelope import V0ErrorEnvelope as V0ErrorEnvelope +from agentdrive_sdk.generated.sync.models.validation_error_response import ValidationErrorResponse as ValidationErrorResponse +from agentdrive_sdk.generated.sync.models.validation_error_response_error import ValidationErrorResponseError as ValidationErrorResponseError +from agentdrive_sdk.generated.sync.models.validation_error_response_error_details import ValidationErrorResponseErrorDetails as ValidationErrorResponseErrorDetails +from agentdrive_sdk.generated.sync.models.validation_error_response_error_details_fields_inner import ValidationErrorResponseErrorDetailsFieldsInner as ValidationErrorResponseErrorDetailsFieldsInner +from agentdrive_sdk.generated.sync.models.version_created_out import VersionCreatedOut as VersionCreatedOut +from agentdrive_sdk.generated.sync.models.version_list_out import VersionListOut as VersionListOut +from agentdrive_sdk.generated.sync.models.version_out import VersionOut as VersionOut diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/api/__init__.py b/sdk/python/src/agentdrive_sdk/generated/sync/api/__init__.py new file mode 100644 index 0000000..d99c022 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/api/__init__.py @@ -0,0 +1,14 @@ +# flake8: noqa + +# import apis into api package +from agentdrive_sdk.generated.sync.api.artifacts_api import ArtifactsApi +from agentdrive_sdk.generated.sync.api.changes_api import ChangesApi +from agentdrive_sdk.generated.sync.api.default_api import DefaultApi +from agentdrive_sdk.generated.sync.api.discovery_api import DiscoveryApi +from agentdrive_sdk.generated.sync.api.drives_api import DrivesApi +from agentdrive_sdk.generated.sync.api.folders_api import FoldersApi +from agentdrive_sdk.generated.sync.api.grants_api import GrantsApi +from agentdrive_sdk.generated.sync.api.search_api import SearchApi +from agentdrive_sdk.generated.sync.api.shares_api import SharesApi +from agentdrive_sdk.generated.sync.api.shares_redemption_api import SharesRedemptionApi +from agentdrive_sdk.generated.sync.api.versions_api import VersionsApi diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/api/artifacts_api.py b/sdk/python/src/agentdrive_sdk/generated/sync/api/artifacts_api.py new file mode 100644 index 0000000..1fac095 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/api/artifacts_api.py @@ -0,0 +1,3056 @@ +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from datetime import datetime +from pydantic import Field, StrictBytes, StrictInt, StrictStr +from typing import Any, Dict, Optional, Tuple, Union +from typing_extensions import Annotated +from agentdrive_sdk.generated.sync.models.artifact_copy_in import ArtifactCopyIn +from agentdrive_sdk.generated.sync.models.artifact_list_out import ArtifactListOut +from agentdrive_sdk.generated.sync.models.artifact_out import ArtifactOut +from agentdrive_sdk.generated.sync.models.artifact_update_in import ArtifactUpdateIn + +from agentdrive_sdk.generated.sync.api_client import ApiClient, RequestSerialized +from agentdrive_sdk.generated.sync.api_response import ApiResponse +from agentdrive_sdk.generated.sync.rest import RESTResponseType + + +class ArtifactsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def artifacts_content( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytes: + """Read Artifact Content + + Download the head version's bytes — stream or 307 signed URL. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_content_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + '304': None, + '307': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def artifacts_content_with_http_info( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytes]: + """Read Artifact Content + + Download the head version's bytes — stream or 307 signed URL. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_content_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + '304': None, + '307': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def artifacts_content_without_preload_content( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Read Artifact Content + + Download the head version's bytes — stream or 307 signed URL. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_content_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + '304': None, + '307': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _artifacts_content_serialize( + self, + drive_id, + artifact_id, + if_none_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if artifact_id is not None: + _path_params['artifact_id'] = artifact_id + # process the query parameters + # process the header parameters + if if_none_match is not None: + _header_params['If-None-Match'] = if_none_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/octet-stream', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}/artifacts/{artifact_id}/content', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def artifacts_copy( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + idempotency_key: Optional[StrictStr], + artifact_copy_in: ArtifactCopyIn, + if_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ArtifactOut: + """Copy Artifact + + Copy one artifact within the same drive. Cross-drive copy is out of v0 scope and rejected (400 INVALID_ARGUMENT). ``destination_drive_id`` must equal the source drive when present. Materializes the artifact + its selected version synchronously → 201. ``If-Match`` is optional; when present it is validated against the source revision (412 stale). + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param artifact_copy_in: (required) + :type artifact_copy_in: ArtifactCopyIn + :param if_match: + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_copy_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + idempotency_key=idempotency_key, + artifact_copy_in=artifact_copy_in, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ArtifactOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def artifacts_copy_with_http_info( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + idempotency_key: Optional[StrictStr], + artifact_copy_in: ArtifactCopyIn, + if_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ArtifactOut]: + """Copy Artifact + + Copy one artifact within the same drive. Cross-drive copy is out of v0 scope and rejected (400 INVALID_ARGUMENT). ``destination_drive_id`` must equal the source drive when present. Materializes the artifact + its selected version synchronously → 201. ``If-Match`` is optional; when present it is validated against the source revision (412 stale). + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param artifact_copy_in: (required) + :type artifact_copy_in: ArtifactCopyIn + :param if_match: + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_copy_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + idempotency_key=idempotency_key, + artifact_copy_in=artifact_copy_in, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ArtifactOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def artifacts_copy_without_preload_content( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + idempotency_key: Optional[StrictStr], + artifact_copy_in: ArtifactCopyIn, + if_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Copy Artifact + + Copy one artifact within the same drive. Cross-drive copy is out of v0 scope and rejected (400 INVALID_ARGUMENT). ``destination_drive_id`` must equal the source drive when present. Materializes the artifact + its selected version synchronously → 201. ``If-Match`` is optional; when present it is validated against the source revision (412 stale). + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param artifact_copy_in: (required) + :type artifact_copy_in: ArtifactCopyIn + :param if_match: + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_copy_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + idempotency_key=idempotency_key, + artifact_copy_in=artifact_copy_in, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ArtifactOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _artifacts_copy_serialize( + self, + drive_id, + artifact_id, + idempotency_key, + artifact_copy_in, + if_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if artifact_id is not None: + _path_params['artifact_id'] = artifact_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if artifact_copy_in is not None: + _body_params = artifact_copy_in + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v0/drives/{drive_id}/artifacts/{artifact_id}/copy', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def artifacts_create( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="The artifact bytes.")], + name: Annotated[StrictStr, Field(description="Artifact name.")], + parent_id: Annotated[StrictStr, Field(description="Destination folder id (fld_*).")], + authorization: Optional[StrictStr] = None, + content_type: Annotated[Optional[StrictStr], Field(description="Declared media type.")] = None, + metadata: Annotated[Optional[Dict[str, Any]], Field(description="Free-form JSON metadata.")] = None, + sha256: Annotated[Optional[StrictStr], Field(description="Optional content sha256 for verification.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ArtifactOut: + """Create Artifact + + Create one artifact with inline content — multipart only. Multipart only (415 for a JSON body). Parts: parent_id, name, metadata, content (bytes), content_type, sha256. parent_id, name, and content are required. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param content: The artifact bytes. (required) + :type content: bytes + :param name: Artifact name. (required) + :type name: str + :param parent_id: Destination folder id (fld_*). (required) + :type parent_id: str + :param authorization: + :type authorization: str + :param content_type: Declared media type. + :type content_type: str + :param metadata: Free-form JSON metadata. + :type metadata: object + :param sha256: Optional content sha256 for verification. + :type sha256: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_create_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + content=content, + name=name, + parent_id=parent_id, + authorization=authorization, + content_type=content_type, + metadata=metadata, + sha256=sha256, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ArtifactOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def artifacts_create_with_http_info( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="The artifact bytes.")], + name: Annotated[StrictStr, Field(description="Artifact name.")], + parent_id: Annotated[StrictStr, Field(description="Destination folder id (fld_*).")], + authorization: Optional[StrictStr] = None, + content_type: Annotated[Optional[StrictStr], Field(description="Declared media type.")] = None, + metadata: Annotated[Optional[Dict[str, Any]], Field(description="Free-form JSON metadata.")] = None, + sha256: Annotated[Optional[StrictStr], Field(description="Optional content sha256 for verification.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ArtifactOut]: + """Create Artifact + + Create one artifact with inline content — multipart only. Multipart only (415 for a JSON body). Parts: parent_id, name, metadata, content (bytes), content_type, sha256. parent_id, name, and content are required. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param content: The artifact bytes. (required) + :type content: bytes + :param name: Artifact name. (required) + :type name: str + :param parent_id: Destination folder id (fld_*). (required) + :type parent_id: str + :param authorization: + :type authorization: str + :param content_type: Declared media type. + :type content_type: str + :param metadata: Free-form JSON metadata. + :type metadata: object + :param sha256: Optional content sha256 for verification. + :type sha256: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_create_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + content=content, + name=name, + parent_id=parent_id, + authorization=authorization, + content_type=content_type, + metadata=metadata, + sha256=sha256, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ArtifactOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def artifacts_create_without_preload_content( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="The artifact bytes.")], + name: Annotated[StrictStr, Field(description="Artifact name.")], + parent_id: Annotated[StrictStr, Field(description="Destination folder id (fld_*).")], + authorization: Optional[StrictStr] = None, + content_type: Annotated[Optional[StrictStr], Field(description="Declared media type.")] = None, + metadata: Annotated[Optional[Dict[str, Any]], Field(description="Free-form JSON metadata.")] = None, + sha256: Annotated[Optional[StrictStr], Field(description="Optional content sha256 for verification.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Artifact + + Create one artifact with inline content — multipart only. Multipart only (415 for a JSON body). Parts: parent_id, name, metadata, content (bytes), content_type, sha256. parent_id, name, and content are required. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param content: The artifact bytes. (required) + :type content: bytes + :param name: Artifact name. (required) + :type name: str + :param parent_id: Destination folder id (fld_*). (required) + :type parent_id: str + :param authorization: + :type authorization: str + :param content_type: Declared media type. + :type content_type: str + :param metadata: Free-form JSON metadata. + :type metadata: object + :param sha256: Optional content sha256 for verification. + :type sha256: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_create_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + content=content, + name=name, + parent_id=parent_id, + authorization=authorization, + content_type=content_type, + metadata=metadata, + sha256=sha256, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ArtifactOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _artifacts_create_serialize( + self, + drive_id, + idempotency_key, + content, + name, + parent_id, + authorization, + content_type, + metadata, + sha256, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + if content is not None: + _files['content'] = content + if content_type is not None: + _form_params.append(('content_type', content_type)) + if metadata is not None: + _form_params.append(('metadata', metadata)) + if name is not None: + _form_params.append(('name', name)) + if parent_id is not None: + _form_params.append(('parent_id', parent_id)) + if sha256 is not None: + _form_params.append(('sha256', sha256)) + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'multipart/form-data' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v0/drives/{drive_id}/artifacts', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def artifacts_delete( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ArtifactOut: + """Delete Artifact + + Soft-delete one artifact (its versions stay). + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_delete_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ArtifactOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def artifacts_delete_with_http_info( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ArtifactOut]: + """Delete Artifact + + Soft-delete one artifact (its versions stay). + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_delete_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ArtifactOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def artifacts_delete_without_preload_content( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Artifact + + Soft-delete one artifact (its versions stay). + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_delete_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ArtifactOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _artifacts_delete_serialize( + self, + drive_id, + artifact_id, + idempotency_key, + if_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if artifact_id is not None: + _path_params['artifact_id'] = artifact_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v0/drives/{drive_id}/artifacts/{artifact_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def artifacts_list( + self, + drive_id: StrictStr, + lifecycle: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + parent_id: Optional[StrictStr] = None, + name: Optional[StrictStr] = None, + content_type: Optional[StrictStr] = None, + label: Optional[StrictStr] = None, + updated_after: Optional[datetime] = None, + updated_before: Optional[datetime] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ArtifactListOut: + """List Artifacts + + List the drive's artifacts, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted artifacts. ``parent_id`` / ``name`` / ``content_type`` / ``label`` are exact-match filters; ``updated_after`` / ``updated_before`` are inclusive bounds. Unknown query parameters are rejected. + + :param drive_id: (required) + :type drive_id: str + :param lifecycle: + :type lifecycle: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param parent_id: + :type parent_id: str + :param name: + :type name: str + :param content_type: + :type content_type: str + :param label: + :type label: str + :param updated_after: + :type updated_after: datetime + :param updated_before: + :type updated_before: datetime + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_list_serialize( + drive_id=drive_id, + lifecycle=lifecycle, + limit=limit, + cursor=cursor, + parent_id=parent_id, + name=name, + content_type=content_type, + label=label, + updated_after=updated_after, + updated_before=updated_before, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ArtifactListOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def artifacts_list_with_http_info( + self, + drive_id: StrictStr, + lifecycle: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + parent_id: Optional[StrictStr] = None, + name: Optional[StrictStr] = None, + content_type: Optional[StrictStr] = None, + label: Optional[StrictStr] = None, + updated_after: Optional[datetime] = None, + updated_before: Optional[datetime] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ArtifactListOut]: + """List Artifacts + + List the drive's artifacts, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted artifacts. ``parent_id`` / ``name`` / ``content_type`` / ``label`` are exact-match filters; ``updated_after`` / ``updated_before`` are inclusive bounds. Unknown query parameters are rejected. + + :param drive_id: (required) + :type drive_id: str + :param lifecycle: + :type lifecycle: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param parent_id: + :type parent_id: str + :param name: + :type name: str + :param content_type: + :type content_type: str + :param label: + :type label: str + :param updated_after: + :type updated_after: datetime + :param updated_before: + :type updated_before: datetime + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_list_serialize( + drive_id=drive_id, + lifecycle=lifecycle, + limit=limit, + cursor=cursor, + parent_id=parent_id, + name=name, + content_type=content_type, + label=label, + updated_after=updated_after, + updated_before=updated_before, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ArtifactListOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def artifacts_list_without_preload_content( + self, + drive_id: StrictStr, + lifecycle: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + parent_id: Optional[StrictStr] = None, + name: Optional[StrictStr] = None, + content_type: Optional[StrictStr] = None, + label: Optional[StrictStr] = None, + updated_after: Optional[datetime] = None, + updated_before: Optional[datetime] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Artifacts + + List the drive's artifacts, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted artifacts. ``parent_id`` / ``name`` / ``content_type`` / ``label`` are exact-match filters; ``updated_after`` / ``updated_before`` are inclusive bounds. Unknown query parameters are rejected. + + :param drive_id: (required) + :type drive_id: str + :param lifecycle: + :type lifecycle: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param parent_id: + :type parent_id: str + :param name: + :type name: str + :param content_type: + :type content_type: str + :param label: + :type label: str + :param updated_after: + :type updated_after: datetime + :param updated_before: + :type updated_before: datetime + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_list_serialize( + drive_id=drive_id, + lifecycle=lifecycle, + limit=limit, + cursor=cursor, + parent_id=parent_id, + name=name, + content_type=content_type, + label=label, + updated_after=updated_after, + updated_before=updated_before, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ArtifactListOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _artifacts_list_serialize( + self, + drive_id, + lifecycle, + limit, + cursor, + parent_id, + name, + content_type, + label, + updated_after, + updated_before, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + # process the query parameters + if lifecycle is not None: + + _query_params.append(('lifecycle', lifecycle)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + if parent_id is not None: + + _query_params.append(('parent_id', parent_id)) + + if name is not None: + + _query_params.append(('name', name)) + + if content_type is not None: + + _query_params.append(('content_type', content_type)) + + if label is not None: + + _query_params.append(('label', label)) + + if updated_after is not None: + if isinstance(updated_after, datetime): + _query_params.append( + ( + 'updated_after', + updated_after.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('updated_after', updated_after)) + + if updated_before is not None: + if isinstance(updated_before, datetime): + _query_params.append( + ( + 'updated_before', + updated_before.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('updated_before', updated_before)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}/artifacts', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def artifacts_read( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ArtifactOut: + """Read Artifact + + Read one active artifact. ``If-None-Match`` short-circuits to 304. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_read_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ArtifactOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def artifacts_read_with_http_info( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ArtifactOut]: + """Read Artifact + + Read one active artifact. ``If-None-Match`` short-circuits to 304. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_read_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ArtifactOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def artifacts_read_without_preload_content( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Read Artifact + + Read one active artifact. ``If-None-Match`` short-circuits to 304. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_read_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ArtifactOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _artifacts_read_serialize( + self, + drive_id, + artifact_id, + if_none_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if artifact_id is not None: + _path_params['artifact_id'] = artifact_id + # process the query parameters + # process the header parameters + if if_none_match is not None: + _header_params['If-None-Match'] = if_none_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}/artifacts/{artifact_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def artifacts_restore( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ArtifactOut: + """Restore Artifact + + Restore a soft-deleted artifact atomically. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_restore_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ArtifactOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def artifacts_restore_with_http_info( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ArtifactOut]: + """Restore Artifact + + Restore a soft-deleted artifact atomically. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_restore_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ArtifactOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def artifacts_restore_without_preload_content( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Restore Artifact + + Restore a soft-deleted artifact atomically. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_restore_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ArtifactOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _artifacts_restore_serialize( + self, + drive_id, + artifact_id, + idempotency_key, + if_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if artifact_id is not None: + _path_params['artifact_id'] = artifact_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v0/drives/{drive_id}/artifacts/{artifact_id}/restore', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def artifacts_update( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + artifact_update_in: ArtifactUpdateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ArtifactOut: + """Update Artifact + + Rename / move / set metadata or labels. At least one field required. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param artifact_update_in: (required) + :type artifact_update_in: ArtifactUpdateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_update_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + idempotency_key=idempotency_key, + if_match=if_match, + artifact_update_in=artifact_update_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ArtifactOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def artifacts_update_with_http_info( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + artifact_update_in: ArtifactUpdateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ArtifactOut]: + """Update Artifact + + Rename / move / set metadata or labels. At least one field required. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param artifact_update_in: (required) + :type artifact_update_in: ArtifactUpdateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_update_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + idempotency_key=idempotency_key, + if_match=if_match, + artifact_update_in=artifact_update_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ArtifactOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def artifacts_update_without_preload_content( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + artifact_update_in: ArtifactUpdateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Artifact + + Rename / move / set metadata or labels. At least one field required. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param artifact_update_in: (required) + :type artifact_update_in: ArtifactUpdateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._artifacts_update_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + idempotency_key=idempotency_key, + if_match=if_match, + artifact_update_in=artifact_update_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ArtifactOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _artifacts_update_serialize( + self, + drive_id, + artifact_id, + idempotency_key, + if_match, + artifact_update_in, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if artifact_id is not None: + _path_params['artifact_id'] = artifact_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if artifact_update_in is not None: + _body_params = artifact_update_in + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v0/drives/{drive_id}/artifacts/{artifact_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/api/changes_api.py b/sdk/python/src/agentdrive_sdk/generated/sync/api/changes_api.py new file mode 100644 index 0000000..7db7131 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/api/changes_api.py @@ -0,0 +1,386 @@ +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import StrictInt, StrictStr, field_validator +from typing import Optional +from agentdrive_sdk.generated.sync.models.change_page_out import ChangePageOut + +from agentdrive_sdk.generated.sync.api_client import ApiClient, RequestSerialized +from agentdrive_sdk.generated.sync.api_response import ApiResponse +from agentdrive_sdk.generated.sync.rest import RESTResponseType + + +class ChangesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def changes_list( + self, + drive_id: StrictStr, + limit: Optional[StrictInt] = None, + start: Optional[StrictStr] = None, + cursor: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ChangePageOut: + """List Changes + + Pull one page of changes. Exactly one of ``start`` or ``cursor``. + + :param drive_id: (required) + :type drive_id: str + :param limit: + :type limit: int + :param start: + :type start: str + :param cursor: + :type cursor: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._changes_list_serialize( + drive_id=drive_id, + limit=limit, + start=start, + cursor=cursor, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ChangePageOut", + '400': "DrivesList400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '410': "DrivesList400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def changes_list_with_http_info( + self, + drive_id: StrictStr, + limit: Optional[StrictInt] = None, + start: Optional[StrictStr] = None, + cursor: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ChangePageOut]: + """List Changes + + Pull one page of changes. Exactly one of ``start`` or ``cursor``. + + :param drive_id: (required) + :type drive_id: str + :param limit: + :type limit: int + :param start: + :type start: str + :param cursor: + :type cursor: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._changes_list_serialize( + drive_id=drive_id, + limit=limit, + start=start, + cursor=cursor, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ChangePageOut", + '400': "DrivesList400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '410': "DrivesList400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def changes_list_without_preload_content( + self, + drive_id: StrictStr, + limit: Optional[StrictInt] = None, + start: Optional[StrictStr] = None, + cursor: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Changes + + Pull one page of changes. Exactly one of ``start`` or ``cursor``. + + :param drive_id: (required) + :type drive_id: str + :param limit: + :type limit: int + :param start: + :type start: str + :param cursor: + :type cursor: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._changes_list_serialize( + drive_id=drive_id, + limit=limit, + start=start, + cursor=cursor, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ChangePageOut", + '400': "DrivesList400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '410': "DrivesList400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _changes_list_serialize( + self, + drive_id, + limit, + start, + cursor, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if start is not None: + + _query_params.append(('start', start)) + + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}/changes', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/api/default_api.py b/sdk/python/src/agentdrive_sdk/generated/sync/api/default_api.py new file mode 100644 index 0000000..0d593fb --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/api/default_api.py @@ -0,0 +1,281 @@ +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from agentdrive_sdk.generated.sync.models.health_out import HealthOut + +from agentdrive_sdk.generated.sync.api_client import ApiClient, RequestSerialized +from agentdrive_sdk.generated.sync.api_response import ApiResponse +from agentdrive_sdk.generated.sync.rest import RESTResponseType + + +class DefaultApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def health( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> HealthOut: + """Health + + Liveness + DB-reachability probe. Used by Cloud Run / k8s healthchecks and any uptime monitor. Returns 200 only if the DB pool can serve a trivial query; 503 otherwise so the orchestrator can pull the instance out of rotation. NOTE: route is `/health`, NOT `/healthz`. Google's edge infrastructure intercepts `/healthz` (legacy kubernetes-reserved path) and returns a generic 404 before traffic reaches Cloud Run — discovered the hard way during the first prod deploy. Don't rename back. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._health_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HealthOut", + '503': "HealthDegradedResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def health_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[HealthOut]: + """Health + + Liveness + DB-reachability probe. Used by Cloud Run / k8s healthchecks and any uptime monitor. Returns 200 only if the DB pool can serve a trivial query; 503 otherwise so the orchestrator can pull the instance out of rotation. NOTE: route is `/health`, NOT `/healthz`. Google's edge infrastructure intercepts `/healthz` (legacy kubernetes-reserved path) and returns a generic 404 before traffic reaches Cloud Run — discovered the hard way during the first prod deploy. Don't rename back. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._health_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HealthOut", + '503': "HealthDegradedResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def health_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Health + + Liveness + DB-reachability probe. Used by Cloud Run / k8s healthchecks and any uptime monitor. Returns 200 only if the DB pool can serve a trivial query; 503 otherwise so the orchestrator can pull the instance out of rotation. NOTE: route is `/health`, NOT `/healthz`. Google's edge infrastructure intercepts `/healthz` (legacy kubernetes-reserved path) and returns a generic 404 before traffic reaches Cloud Run — discovered the hard way during the first prod deploy. Don't rename back. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._health_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "HealthOut", + '503': "HealthDegradedResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _health_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/health', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/api/discovery_api.py b/sdk/python/src/agentdrive_sdk/generated/sync/api/discovery_api.py new file mode 100644 index 0000000..243d895 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/api/discovery_api.py @@ -0,0 +1,278 @@ +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from typing import Any, Dict + +from agentdrive_sdk.generated.sync.api_client import ApiClient, RequestSerialized +from agentdrive_sdk.generated.sync.api_response import ApiResponse +from agentdrive_sdk.generated.sync.rest import RESTResponseType + + +class DiscoveryApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def oauth_protected_resource( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> Dict[str, Optional[object]]: + """Protected-resource metadata (RFC 9728) + + Names the reset v0 surface as a protected resource and points clients at Hub — the only authorization server whose product tokens this deployment accepts. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._oauth_protected_resource_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, Optional[object]]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def oauth_protected_resource_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[Dict[str, Optional[object]]]: + """Protected-resource metadata (RFC 9728) + + Names the reset v0 surface as a protected resource and points clients at Hub — the only authorization server whose product tokens this deployment accepts. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._oauth_protected_resource_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, Optional[object]]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def oauth_protected_resource_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Protected-resource metadata (RFC 9728) + + Names the reset v0 surface as a protected resource and points clients at Hub — the only authorization server whose product tokens this deployment accepts. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._oauth_protected_resource_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "Dict[str, Optional[object]]", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _oauth_protected_resource_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/.well-known/oauth-protected-resource', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/api/drives_api.py b/sdk/python/src/agentdrive_sdk/generated/sync/api/drives_api.py new file mode 100644 index 0000000..226e3b5 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/api/drives_api.py @@ -0,0 +1,2354 @@ +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import StrictInt, StrictStr +from typing import Optional +from agentdrive_sdk.generated.sync.models.drive_create_in import DriveCreateIn +from agentdrive_sdk.generated.sync.models.drive_list_out import DriveListOut +from agentdrive_sdk.generated.sync.models.drive_out import DriveOut +from agentdrive_sdk.generated.sync.models.drive_update_in import DriveUpdateIn +from agentdrive_sdk.generated.sync.models.drive_usage_out import DriveUsageOut + +from agentdrive_sdk.generated.sync.api_client import ApiClient, RequestSerialized +from agentdrive_sdk.generated.sync.api_response import ApiResponse +from agentdrive_sdk.generated.sync.rest import RESTResponseType + + +class DrivesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def drives_create( + self, + idempotency_key: Optional[StrictStr], + drive_create_in: DriveCreateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DriveOut: + """Create Drive + + Create a drive with its structural root folder and creator-manager grant(s) in one transaction; idempotent under the ``Idempotency-Key``. + + :param idempotency_key: (required) + :type idempotency_key: str + :param drive_create_in: (required) + :type drive_create_in: DriveCreateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_create_serialize( + idempotency_key=idempotency_key, + drive_create_in=drive_create_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "DriveOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesList400Response", + '409': "DrivesList400Response", + '412': "DrivesList400Response", + '422': "ValidationErrorResponse", + '428': "DrivesList400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def drives_create_with_http_info( + self, + idempotency_key: Optional[StrictStr], + drive_create_in: DriveCreateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DriveOut]: + """Create Drive + + Create a drive with its structural root folder and creator-manager grant(s) in one transaction; idempotent under the ``Idempotency-Key``. + + :param idempotency_key: (required) + :type idempotency_key: str + :param drive_create_in: (required) + :type drive_create_in: DriveCreateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_create_serialize( + idempotency_key=idempotency_key, + drive_create_in=drive_create_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "DriveOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesList400Response", + '409': "DrivesList400Response", + '412': "DrivesList400Response", + '422': "ValidationErrorResponse", + '428': "DrivesList400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def drives_create_without_preload_content( + self, + idempotency_key: Optional[StrictStr], + drive_create_in: DriveCreateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Drive + + Create a drive with its structural root folder and creator-manager grant(s) in one transaction; idempotent under the ``Idempotency-Key``. + + :param idempotency_key: (required) + :type idempotency_key: str + :param drive_create_in: (required) + :type drive_create_in: DriveCreateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_create_serialize( + idempotency_key=idempotency_key, + drive_create_in=drive_create_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "DriveOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesList400Response", + '409': "DrivesList400Response", + '412': "DrivesList400Response", + '422': "ValidationErrorResponse", + '428': "DrivesList400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _drives_create_serialize( + self, + idempotency_key, + drive_create_in, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if drive_create_in is not None: + _body_params = drive_create_in + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v0/drives', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def drives_delete( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DriveOut: + """Delete Drive + + Soft-delete a drive. Returns 200 with the deleted representation so the client has the post-delete revision/ETag for a restore. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_delete_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesList400Response", + '412': "DrivesList400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def drives_delete_with_http_info( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DriveOut]: + """Delete Drive + + Soft-delete a drive. Returns 200 with the deleted representation so the client has the post-delete revision/ETag for a restore. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_delete_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesList400Response", + '412': "DrivesList400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def drives_delete_without_preload_content( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Drive + + Soft-delete a drive. Returns 200 with the deleted representation so the client has the post-delete revision/ETag for a restore. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_delete_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesList400Response", + '412': "DrivesList400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _drives_delete_serialize( + self, + drive_id, + idempotency_key, + if_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v0/drives/{drive_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def drives_list( + self, + lifecycle: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DriveListOut: + """List Drives + + List the actor's workspace drives, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted drives so a manager can read the post-delete revision as the If-Match source for a restore. Unknown query parameters are rejected (§6.3). + + :param lifecycle: + :type lifecycle: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_list_serialize( + lifecycle=lifecycle, + limit=limit, + cursor=cursor, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveListOut", + '400': "DrivesList400Response", + '401': "DrivesList400Response", + '403': "DrivesList400Response", + '404': "DrivesList400Response", + '422': "ValidationErrorResponse", + '429': "DrivesList400Response", + '503': "DrivesList400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def drives_list_with_http_info( + self, + lifecycle: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DriveListOut]: + """List Drives + + List the actor's workspace drives, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted drives so a manager can read the post-delete revision as the If-Match source for a restore. Unknown query parameters are rejected (§6.3). + + :param lifecycle: + :type lifecycle: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_list_serialize( + lifecycle=lifecycle, + limit=limit, + cursor=cursor, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveListOut", + '400': "DrivesList400Response", + '401': "DrivesList400Response", + '403': "DrivesList400Response", + '404': "DrivesList400Response", + '422': "ValidationErrorResponse", + '429': "DrivesList400Response", + '503': "DrivesList400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def drives_list_without_preload_content( + self, + lifecycle: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Drives + + List the actor's workspace drives, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted drives so a manager can read the post-delete revision as the If-Match source for a restore. Unknown query parameters are rejected (§6.3). + + :param lifecycle: + :type lifecycle: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_list_serialize( + lifecycle=lifecycle, + limit=limit, + cursor=cursor, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveListOut", + '400': "DrivesList400Response", + '401': "DrivesList400Response", + '403': "DrivesList400Response", + '404': "DrivesList400Response", + '422': "ValidationErrorResponse", + '429': "DrivesList400Response", + '503': "DrivesList400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _drives_list_serialize( + self, + lifecycle, + limit, + cursor, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if lifecycle is not None: + + _query_params.append(('lifecycle', lifecycle)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def drives_read( + self, + drive_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DriveOut: + """Read Drive + + Read one active drive. ETag = quoted revision; matching ``If-None-Match`` → 304. Deleted and cross-workspace drives are 404. + + :param drive_id: (required) + :type drive_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_read_serialize( + drive_id=drive_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def drives_read_with_http_info( + self, + drive_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DriveOut]: + """Read Drive + + Read one active drive. ETag = quoted revision; matching ``If-None-Match`` → 304. Deleted and cross-workspace drives are 404. + + :param drive_id: (required) + :type drive_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_read_serialize( + drive_id=drive_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def drives_read_without_preload_content( + self, + drive_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Read Drive + + Read one active drive. ETag = quoted revision; matching ``If-None-Match`` → 304. Deleted and cross-workspace drives are 404. + + :param drive_id: (required) + :type drive_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_read_serialize( + drive_id=drive_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _drives_read_serialize( + self, + drive_id, + if_none_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + # process the query parameters + # process the header parameters + if if_none_match is not None: + _header_params['If-None-Match'] = if_none_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def drives_restore( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DriveOut: + """Restore Drive + + Restore a soft-deleted drive. If-Match must carry the post-delete revision; restoring an already-active drive is 409 CONFLICT. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_restore_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def drives_restore_with_http_info( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DriveOut]: + """Restore Drive + + Restore a soft-deleted drive. If-Match must carry the post-delete revision; restoring an already-active drive is 409 CONFLICT. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_restore_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def drives_restore_without_preload_content( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Restore Drive + + Restore a soft-deleted drive. If-Match must carry the post-delete revision; restoring an already-active drive is 409 CONFLICT. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_restore_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _drives_restore_serialize( + self, + drive_id, + idempotency_key, + if_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v0/drives/{drive_id}/restore', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def drives_update( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + drive_update_in: DriveUpdateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DriveOut: + """Update Drive + + Rename / update a drive's metadata. Requires ``Idempotency-Key`` and ``If-Match`` (428 absent, 412 stale); bumps the revision. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param drive_update_in: (required) + :type drive_update_in: DriveUpdateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_update_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + if_match=if_match, + drive_update_in=drive_update_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def drives_update_with_http_info( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + drive_update_in: DriveUpdateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DriveOut]: + """Update Drive + + Rename / update a drive's metadata. Requires ``Idempotency-Key`` and ``If-Match`` (428 absent, 412 stale); bumps the revision. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param drive_update_in: (required) + :type drive_update_in: DriveUpdateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_update_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + if_match=if_match, + drive_update_in=drive_update_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def drives_update_without_preload_content( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + drive_update_in: DriveUpdateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Drive + + Rename / update a drive's metadata. Requires ``Idempotency-Key`` and ``If-Match`` (428 absent, 412 stale); bumps the revision. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param drive_update_in: (required) + :type drive_update_in: DriveUpdateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_update_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + if_match=if_match, + drive_update_in=drive_update_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _drives_update_serialize( + self, + drive_id, + idempotency_key, + if_match, + drive_update_in, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if drive_update_in is not None: + _body_params = drive_update_in + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v0/drives/{drive_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def drives_usage( + self, + drive_id: StrictStr, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> DriveUsageOut: + """Drive Usage + + Byte counters for one active drive: storage is the live sum of its versions' sizes; retrieval reads the counter the content-read slice maintains (0 until it lands). + + :param drive_id: (required) + :type drive_id: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_usage_serialize( + drive_id=drive_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveUsageOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def drives_usage_with_http_info( + self, + drive_id: StrictStr, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[DriveUsageOut]: + """Drive Usage + + Byte counters for one active drive: storage is the live sum of its versions' sizes; retrieval reads the counter the content-read slice maintains (0 until it lands). + + :param drive_id: (required) + :type drive_id: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_usage_serialize( + drive_id=drive_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveUsageOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def drives_usage_without_preload_content( + self, + drive_id: StrictStr, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Drive Usage + + Byte counters for one active drive: storage is the live sum of its versions' sizes; retrieval reads the counter the content-read slice maintains (0 until it lands). + + :param drive_id: (required) + :type drive_id: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drives_usage_serialize( + drive_id=drive_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "DriveUsageOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _drives_usage_serialize( + self, + drive_id, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + # process the query parameters + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}/usage', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/api/folders_api.py b/sdk/python/src/agentdrive_sdk/generated/sync/api/folders_api.py new file mode 100644 index 0000000..9c1e78e --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/api/folders_api.py @@ -0,0 +1,2578 @@ +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import StrictBool, StrictInt, StrictStr +from typing import Optional +from agentdrive_sdk.generated.sync.models.folder_cascade_out import FolderCascadeOut +from agentdrive_sdk.generated.sync.models.folder_copy_in import FolderCopyIn +from agentdrive_sdk.generated.sync.models.folder_create_in import FolderCreateIn +from agentdrive_sdk.generated.sync.models.folder_list_out import FolderListOut +from agentdrive_sdk.generated.sync.models.folder_out import FolderOut +from agentdrive_sdk.generated.sync.models.folder_update_in import FolderUpdateIn + +from agentdrive_sdk.generated.sync.api_client import ApiClient, RequestSerialized +from agentdrive_sdk.generated.sync.api_response import ApiResponse +from agentdrive_sdk.generated.sync.rest import RESTResponseType + + +class FoldersApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def folders_copy( + self, + drive_id: StrictStr, + folder_id: StrictStr, + idempotency_key: Optional[StrictStr], + folder_copy_in: FolderCopyIn, + if_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FolderOut: + """Copy Folder + + Copy a folder's subtree within the same drive. Cross-drive copy is out of v0 scope and rejected (400 INVALID_ARGUMENT). ``destination_drive_id`` must equal the source drive when present. Materializes the subtree synchronously → 201 + the copied folder. ``If-Match`` is optional; when present it is validated against the source revision (412 stale). + + :param drive_id: (required) + :type drive_id: str + :param folder_id: (required) + :type folder_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param folder_copy_in: (required) + :type folder_copy_in: FolderCopyIn + :param if_match: + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_copy_serialize( + drive_id=drive_id, + folder_id=folder_id, + idempotency_key=idempotency_key, + folder_copy_in=folder_copy_in, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "FolderOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def folders_copy_with_http_info( + self, + drive_id: StrictStr, + folder_id: StrictStr, + idempotency_key: Optional[StrictStr], + folder_copy_in: FolderCopyIn, + if_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FolderOut]: + """Copy Folder + + Copy a folder's subtree within the same drive. Cross-drive copy is out of v0 scope and rejected (400 INVALID_ARGUMENT). ``destination_drive_id`` must equal the source drive when present. Materializes the subtree synchronously → 201 + the copied folder. ``If-Match`` is optional; when present it is validated against the source revision (412 stale). + + :param drive_id: (required) + :type drive_id: str + :param folder_id: (required) + :type folder_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param folder_copy_in: (required) + :type folder_copy_in: FolderCopyIn + :param if_match: + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_copy_serialize( + drive_id=drive_id, + folder_id=folder_id, + idempotency_key=idempotency_key, + folder_copy_in=folder_copy_in, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "FolderOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def folders_copy_without_preload_content( + self, + drive_id: StrictStr, + folder_id: StrictStr, + idempotency_key: Optional[StrictStr], + folder_copy_in: FolderCopyIn, + if_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Copy Folder + + Copy a folder's subtree within the same drive. Cross-drive copy is out of v0 scope and rejected (400 INVALID_ARGUMENT). ``destination_drive_id`` must equal the source drive when present. Materializes the subtree synchronously → 201 + the copied folder. ``If-Match`` is optional; when present it is validated against the source revision (412 stale). + + :param drive_id: (required) + :type drive_id: str + :param folder_id: (required) + :type folder_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param folder_copy_in: (required) + :type folder_copy_in: FolderCopyIn + :param if_match: + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_copy_serialize( + drive_id=drive_id, + folder_id=folder_id, + idempotency_key=idempotency_key, + folder_copy_in=folder_copy_in, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "FolderOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _folders_copy_serialize( + self, + drive_id, + folder_id, + idempotency_key, + folder_copy_in, + if_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if folder_id is not None: + _path_params['folder_id'] = folder_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if folder_copy_in is not None: + _body_params = folder_copy_in + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v0/drives/{drive_id}/folders/{folder_id}/copy', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def folders_create( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + folder_create_in: FolderCreateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FolderOut: + """Create Folder + + Create one folder under `parent_id`; idempotent under the ``Idempotency-Key``. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param folder_create_in: (required) + :type folder_create_in: FolderCreateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_create_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + folder_create_in=folder_create_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "FolderOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def folders_create_with_http_info( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + folder_create_in: FolderCreateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FolderOut]: + """Create Folder + + Create one folder under `parent_id`; idempotent under the ``Idempotency-Key``. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param folder_create_in: (required) + :type folder_create_in: FolderCreateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_create_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + folder_create_in=folder_create_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "FolderOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def folders_create_without_preload_content( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + folder_create_in: FolderCreateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Folder + + Create one folder under `parent_id`; idempotent under the ``Idempotency-Key``. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param folder_create_in: (required) + :type folder_create_in: FolderCreateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_create_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + folder_create_in=folder_create_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "FolderOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _folders_create_serialize( + self, + drive_id, + idempotency_key, + folder_create_in, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if folder_create_in is not None: + _body_params = folder_create_in + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v0/drives/{drive_id}/folders', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def folders_delete( + self, + drive_id: StrictStr, + folder_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + recursive: Optional[StrictBool] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FolderCascadeOut: + """Delete Folder + + Soft-delete a folder and its full live subtree (folders + artifacts) in one transaction. A non-empty subtree requires ``recursive=true`` (409 FOLDER_RECURSIVE_REQUIRED otherwise). Returns the deleted root representation plus exact cascade counts and the post-delete revision/ETag for a restore. + + :param drive_id: (required) + :type drive_id: str + :param folder_id: (required) + :type folder_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param recursive: + :type recursive: bool + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_delete_serialize( + drive_id=drive_id, + folder_id=folder_id, + idempotency_key=idempotency_key, + if_match=if_match, + recursive=recursive, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderCascadeOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def folders_delete_with_http_info( + self, + drive_id: StrictStr, + folder_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + recursive: Optional[StrictBool] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FolderCascadeOut]: + """Delete Folder + + Soft-delete a folder and its full live subtree (folders + artifacts) in one transaction. A non-empty subtree requires ``recursive=true`` (409 FOLDER_RECURSIVE_REQUIRED otherwise). Returns the deleted root representation plus exact cascade counts and the post-delete revision/ETag for a restore. + + :param drive_id: (required) + :type drive_id: str + :param folder_id: (required) + :type folder_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param recursive: + :type recursive: bool + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_delete_serialize( + drive_id=drive_id, + folder_id=folder_id, + idempotency_key=idempotency_key, + if_match=if_match, + recursive=recursive, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderCascadeOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def folders_delete_without_preload_content( + self, + drive_id: StrictStr, + folder_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + recursive: Optional[StrictBool] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Folder + + Soft-delete a folder and its full live subtree (folders + artifacts) in one transaction. A non-empty subtree requires ``recursive=true`` (409 FOLDER_RECURSIVE_REQUIRED otherwise). Returns the deleted root representation plus exact cascade counts and the post-delete revision/ETag for a restore. + + :param drive_id: (required) + :type drive_id: str + :param folder_id: (required) + :type folder_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param recursive: + :type recursive: bool + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_delete_serialize( + drive_id=drive_id, + folder_id=folder_id, + idempotency_key=idempotency_key, + if_match=if_match, + recursive=recursive, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderCascadeOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _folders_delete_serialize( + self, + drive_id, + folder_id, + idempotency_key, + if_match, + recursive, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if folder_id is not None: + _path_params['folder_id'] = folder_id + # process the query parameters + if recursive is not None: + + _query_params.append(('recursive', recursive)) + + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v0/drives/{drive_id}/folders/{folder_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def folders_list( + self, + drive_id: StrictStr, + lifecycle: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + parent_id: Optional[StrictStr] = None, + name: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FolderListOut: + """List Folders + + List the drive's folders, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted folders so the post-delete revision can be read as the If-Match source for a restore. ``parent_id`` / ``name`` are exact-match filters. Unknown query parameters are rejected (§6.3). + + :param drive_id: (required) + :type drive_id: str + :param lifecycle: + :type lifecycle: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param parent_id: + :type parent_id: str + :param name: + :type name: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_list_serialize( + drive_id=drive_id, + lifecycle=lifecycle, + limit=limit, + cursor=cursor, + parent_id=parent_id, + name=name, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderListOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def folders_list_with_http_info( + self, + drive_id: StrictStr, + lifecycle: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + parent_id: Optional[StrictStr] = None, + name: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FolderListOut]: + """List Folders + + List the drive's folders, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted folders so the post-delete revision can be read as the If-Match source for a restore. ``parent_id`` / ``name`` are exact-match filters. Unknown query parameters are rejected (§6.3). + + :param drive_id: (required) + :type drive_id: str + :param lifecycle: + :type lifecycle: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param parent_id: + :type parent_id: str + :param name: + :type name: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_list_serialize( + drive_id=drive_id, + lifecycle=lifecycle, + limit=limit, + cursor=cursor, + parent_id=parent_id, + name=name, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderListOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def folders_list_without_preload_content( + self, + drive_id: StrictStr, + lifecycle: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + parent_id: Optional[StrictStr] = None, + name: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Folders + + List the drive's folders, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted folders so the post-delete revision can be read as the If-Match source for a restore. ``parent_id`` / ``name`` are exact-match filters. Unknown query parameters are rejected (§6.3). + + :param drive_id: (required) + :type drive_id: str + :param lifecycle: + :type lifecycle: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param parent_id: + :type parent_id: str + :param name: + :type name: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_list_serialize( + drive_id=drive_id, + lifecycle=lifecycle, + limit=limit, + cursor=cursor, + parent_id=parent_id, + name=name, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderListOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _folders_list_serialize( + self, + drive_id, + lifecycle, + limit, + cursor, + parent_id, + name, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + # process the query parameters + if lifecycle is not None: + + _query_params.append(('lifecycle', lifecycle)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + if parent_id is not None: + + _query_params.append(('parent_id', parent_id)) + + if name is not None: + + _query_params.append(('name', name)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}/folders', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def folders_read( + self, + drive_id: StrictStr, + folder_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FolderOut: + """Read Folder + + Read one active folder. ETag = quoted revision; matching ``If-None-Match`` → 304. Deleted and cross-workspace folders are 404. + + :param drive_id: (required) + :type drive_id: str + :param folder_id: (required) + :type folder_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_read_serialize( + drive_id=drive_id, + folder_id=folder_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def folders_read_with_http_info( + self, + drive_id: StrictStr, + folder_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FolderOut]: + """Read Folder + + Read one active folder. ETag = quoted revision; matching ``If-None-Match`` → 304. Deleted and cross-workspace folders are 404. + + :param drive_id: (required) + :type drive_id: str + :param folder_id: (required) + :type folder_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_read_serialize( + drive_id=drive_id, + folder_id=folder_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def folders_read_without_preload_content( + self, + drive_id: StrictStr, + folder_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Read Folder + + Read one active folder. ETag = quoted revision; matching ``If-None-Match`` → 304. Deleted and cross-workspace folders are 404. + + :param drive_id: (required) + :type drive_id: str + :param folder_id: (required) + :type folder_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_read_serialize( + drive_id=drive_id, + folder_id=folder_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _folders_read_serialize( + self, + drive_id, + folder_id, + if_none_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if folder_id is not None: + _path_params['folder_id'] = folder_id + # process the query parameters + # process the header parameters + if if_none_match is not None: + _header_params['If-None-Match'] = if_none_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}/folders/{folder_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def folders_restore( + self, + drive_id: StrictStr, + folder_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FolderCascadeOut: + """Restore Folder + + Restore a soft-deleted folder and its deleted subtree atomically. If-Match must carry the post-delete revision; restoring an already-active folder is 409 CONFLICT. + + :param drive_id: (required) + :type drive_id: str + :param folder_id: (required) + :type folder_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_restore_serialize( + drive_id=drive_id, + folder_id=folder_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderCascadeOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def folders_restore_with_http_info( + self, + drive_id: StrictStr, + folder_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FolderCascadeOut]: + """Restore Folder + + Restore a soft-deleted folder and its deleted subtree atomically. If-Match must carry the post-delete revision; restoring an already-active folder is 409 CONFLICT. + + :param drive_id: (required) + :type drive_id: str + :param folder_id: (required) + :type folder_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_restore_serialize( + drive_id=drive_id, + folder_id=folder_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderCascadeOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def folders_restore_without_preload_content( + self, + drive_id: StrictStr, + folder_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Restore Folder + + Restore a soft-deleted folder and its deleted subtree atomically. If-Match must carry the post-delete revision; restoring an already-active folder is 409 CONFLICT. + + :param drive_id: (required) + :type drive_id: str + :param folder_id: (required) + :type folder_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_restore_serialize( + drive_id=drive_id, + folder_id=folder_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderCascadeOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _folders_restore_serialize( + self, + drive_id, + folder_id, + idempotency_key, + if_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if folder_id is not None: + _path_params['folder_id'] = folder_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v0/drives/{drive_id}/folders/{folder_id}/restore', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def folders_update( + self, + drive_id: StrictStr, + folder_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + folder_update_in: FolderUpdateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> FolderOut: + """Update Folder + + Rename / move / update a folder's metadata or inheritance. Requires ``Idempotency-Key`` and ``If-Match`` (428 absent, 412 stale); bumps the revision. + + :param drive_id: (required) + :type drive_id: str + :param folder_id: (required) + :type folder_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param folder_update_in: (required) + :type folder_update_in: FolderUpdateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_update_serialize( + drive_id=drive_id, + folder_id=folder_id, + idempotency_key=idempotency_key, + if_match=if_match, + folder_update_in=folder_update_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def folders_update_with_http_info( + self, + drive_id: StrictStr, + folder_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + folder_update_in: FolderUpdateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[FolderOut]: + """Update Folder + + Rename / move / update a folder's metadata or inheritance. Requires ``Idempotency-Key`` and ``If-Match`` (428 absent, 412 stale); bumps the revision. + + :param drive_id: (required) + :type drive_id: str + :param folder_id: (required) + :type folder_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param folder_update_in: (required) + :type folder_update_in: FolderUpdateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_update_serialize( + drive_id=drive_id, + folder_id=folder_id, + idempotency_key=idempotency_key, + if_match=if_match, + folder_update_in=folder_update_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def folders_update_without_preload_content( + self, + drive_id: StrictStr, + folder_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + folder_update_in: FolderUpdateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Folder + + Rename / move / update a folder's metadata or inheritance. Requires ``Idempotency-Key`` and ``If-Match`` (428 absent, 412 stale); bumps the revision. + + :param drive_id: (required) + :type drive_id: str + :param folder_id: (required) + :type folder_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param folder_update_in: (required) + :type folder_update_in: FolderUpdateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._folders_update_serialize( + drive_id=drive_id, + folder_id=folder_id, + idempotency_key=idempotency_key, + if_match=if_match, + folder_update_in=folder_update_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "FolderOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _folders_update_serialize( + self, + drive_id, + folder_id, + idempotency_key, + if_match, + folder_update_in, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if folder_id is not None: + _path_params['folder_id'] = folder_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if folder_update_in is not None: + _body_params = folder_update_in + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v0/drives/{drive_id}/folders/{folder_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/api/grants_api.py b/sdk/python/src/agentdrive_sdk/generated/sync/api/grants_api.py new file mode 100644 index 0000000..5370737 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/api/grants_api.py @@ -0,0 +1,1846 @@ +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import StrictInt, StrictStr +from typing import Optional +from agentdrive_sdk.generated.sync.models.grant_create_in import GrantCreateIn +from agentdrive_sdk.generated.sync.models.grant_list_out import GrantListOut +from agentdrive_sdk.generated.sync.models.grant_out import GrantOut +from agentdrive_sdk.generated.sync.models.grant_update_in import GrantUpdateIn + +from agentdrive_sdk.generated.sync.api_client import ApiClient, RequestSerialized +from agentdrive_sdk.generated.sync.api_response import ApiResponse +from agentdrive_sdk.generated.sync.rest import RESTResponseType + + +class GrantsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def grants_create( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + grant_create_in: GrantCreateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GrantOut: + """Create Grant + + Grant one principal a role on a drive, folder, or artifact. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param grant_create_in: (required) + :type grant_create_in: GrantCreateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._grants_create_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + grant_create_in=grant_create_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "GrantOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def grants_create_with_http_info( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + grant_create_in: GrantCreateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GrantOut]: + """Create Grant + + Grant one principal a role on a drive, folder, or artifact. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param grant_create_in: (required) + :type grant_create_in: GrantCreateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._grants_create_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + grant_create_in=grant_create_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "GrantOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def grants_create_without_preload_content( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + grant_create_in: GrantCreateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Grant + + Grant one principal a role on a drive, folder, or artifact. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param grant_create_in: (required) + :type grant_create_in: GrantCreateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._grants_create_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + grant_create_in=grant_create_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "GrantOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _grants_create_serialize( + self, + drive_id, + idempotency_key, + grant_create_in, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if grant_create_in is not None: + _body_params = grant_create_in + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v0/drives/{drive_id}/grants', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def grants_list( + self, + drive_id: StrictStr, + lifecycle: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + resource_type: Optional[StrictStr] = None, + resource_id: Optional[StrictStr] = None, + principal_type: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GrantListOut: + """List Grants + + List explicit grants in the drive, keyset paginated. **What you see depends on your role (contract change).** A caller holding ``manager`` on the drive lists EVERY grant in it. Any other caller lists only the grants that name them — their own agent/user rows, ``workspace`` grants covering them, and ``public`` grants (which already expose the resource to them anyway). Previously any drive ``viewer`` could page out every principal id, role and expiry in the drive; that was an access-graph disclosure, not a feature. The operation is refused (404) only for a caller holding no live grant anywhere in the drive — never for lack of ``manager``, because seeing your own access is not a privilege. That admits folder-scoped principals, who previously 404'd here despite having access to show. A folder ``manager`` still sees only their own rows, not the roster of the subtree they administer; scoping the listing by per-resource administration authority is a follow-up this change does not claim. ``resource_id`` filters to one resource's grants and REQUIRES ``resource_type`` alongside it — a bare resource id is ambiguous across the three resource kinds, and guessing the kind from the id prefix would make the filter's meaning depend on an id format the contract does not promise to keep. ``resource_type`` on its own remains a valid (and pre-existing) filter. + + :param drive_id: (required) + :type drive_id: str + :param lifecycle: + :type lifecycle: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param resource_type: + :type resource_type: str + :param resource_id: + :type resource_id: str + :param principal_type: + :type principal_type: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._grants_list_serialize( + drive_id=drive_id, + lifecycle=lifecycle, + limit=limit, + cursor=cursor, + resource_type=resource_type, + resource_id=resource_id, + principal_type=principal_type, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GrantListOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def grants_list_with_http_info( + self, + drive_id: StrictStr, + lifecycle: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + resource_type: Optional[StrictStr] = None, + resource_id: Optional[StrictStr] = None, + principal_type: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GrantListOut]: + """List Grants + + List explicit grants in the drive, keyset paginated. **What you see depends on your role (contract change).** A caller holding ``manager`` on the drive lists EVERY grant in it. Any other caller lists only the grants that name them — their own agent/user rows, ``workspace`` grants covering them, and ``public`` grants (which already expose the resource to them anyway). Previously any drive ``viewer`` could page out every principal id, role and expiry in the drive; that was an access-graph disclosure, not a feature. The operation is refused (404) only for a caller holding no live grant anywhere in the drive — never for lack of ``manager``, because seeing your own access is not a privilege. That admits folder-scoped principals, who previously 404'd here despite having access to show. A folder ``manager`` still sees only their own rows, not the roster of the subtree they administer; scoping the listing by per-resource administration authority is a follow-up this change does not claim. ``resource_id`` filters to one resource's grants and REQUIRES ``resource_type`` alongside it — a bare resource id is ambiguous across the three resource kinds, and guessing the kind from the id prefix would make the filter's meaning depend on an id format the contract does not promise to keep. ``resource_type`` on its own remains a valid (and pre-existing) filter. + + :param drive_id: (required) + :type drive_id: str + :param lifecycle: + :type lifecycle: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param resource_type: + :type resource_type: str + :param resource_id: + :type resource_id: str + :param principal_type: + :type principal_type: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._grants_list_serialize( + drive_id=drive_id, + lifecycle=lifecycle, + limit=limit, + cursor=cursor, + resource_type=resource_type, + resource_id=resource_id, + principal_type=principal_type, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GrantListOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def grants_list_without_preload_content( + self, + drive_id: StrictStr, + lifecycle: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + resource_type: Optional[StrictStr] = None, + resource_id: Optional[StrictStr] = None, + principal_type: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Grants + + List explicit grants in the drive, keyset paginated. **What you see depends on your role (contract change).** A caller holding ``manager`` on the drive lists EVERY grant in it. Any other caller lists only the grants that name them — their own agent/user rows, ``workspace`` grants covering them, and ``public`` grants (which already expose the resource to them anyway). Previously any drive ``viewer`` could page out every principal id, role and expiry in the drive; that was an access-graph disclosure, not a feature. The operation is refused (404) only for a caller holding no live grant anywhere in the drive — never for lack of ``manager``, because seeing your own access is not a privilege. That admits folder-scoped principals, who previously 404'd here despite having access to show. A folder ``manager`` still sees only their own rows, not the roster of the subtree they administer; scoping the listing by per-resource administration authority is a follow-up this change does not claim. ``resource_id`` filters to one resource's grants and REQUIRES ``resource_type`` alongside it — a bare resource id is ambiguous across the three resource kinds, and guessing the kind from the id prefix would make the filter's meaning depend on an id format the contract does not promise to keep. ``resource_type`` on its own remains a valid (and pre-existing) filter. + + :param drive_id: (required) + :type drive_id: str + :param lifecycle: + :type lifecycle: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param resource_type: + :type resource_type: str + :param resource_id: + :type resource_id: str + :param principal_type: + :type principal_type: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._grants_list_serialize( + drive_id=drive_id, + lifecycle=lifecycle, + limit=limit, + cursor=cursor, + resource_type=resource_type, + resource_id=resource_id, + principal_type=principal_type, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GrantListOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _grants_list_serialize( + self, + drive_id, + lifecycle, + limit, + cursor, + resource_type, + resource_id, + principal_type, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + # process the query parameters + if lifecycle is not None: + + _query_params.append(('lifecycle', lifecycle)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + if resource_type is not None: + + _query_params.append(('resource_type', resource_type)) + + if resource_id is not None: + + _query_params.append(('resource_id', resource_id)) + + if principal_type is not None: + + _query_params.append(('principal_type', principal_type)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}/grants', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def grants_read( + self, + drive_id: StrictStr, + grant_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GrantOut: + """Read Grant + + Read one grant in the drive. + + :param drive_id: (required) + :type drive_id: str + :param grant_id: (required) + :type grant_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._grants_read_serialize( + drive_id=drive_id, + grant_id=grant_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GrantOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def grants_read_with_http_info( + self, + drive_id: StrictStr, + grant_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GrantOut]: + """Read Grant + + Read one grant in the drive. + + :param drive_id: (required) + :type drive_id: str + :param grant_id: (required) + :type grant_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._grants_read_serialize( + drive_id=drive_id, + grant_id=grant_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GrantOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def grants_read_without_preload_content( + self, + drive_id: StrictStr, + grant_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Read Grant + + Read one grant in the drive. + + :param drive_id: (required) + :type drive_id: str + :param grant_id: (required) + :type grant_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._grants_read_serialize( + drive_id=drive_id, + grant_id=grant_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GrantOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _grants_read_serialize( + self, + drive_id, + grant_id, + if_none_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if grant_id is not None: + _path_params['grant_id'] = grant_id + # process the query parameters + # process the header parameters + if if_none_match is not None: + _header_params['If-None-Match'] = if_none_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}/grants/{grant_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def grants_revoke( + self, + drive_id: StrictStr, + grant_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GrantOut: + """Revoke Grant + + Revoke a grant (soft, sets revoked_at) under If-Match. + + :param drive_id: (required) + :type drive_id: str + :param grant_id: (required) + :type grant_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._grants_revoke_serialize( + drive_id=drive_id, + grant_id=grant_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GrantOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def grants_revoke_with_http_info( + self, + drive_id: StrictStr, + grant_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GrantOut]: + """Revoke Grant + + Revoke a grant (soft, sets revoked_at) under If-Match. + + :param drive_id: (required) + :type drive_id: str + :param grant_id: (required) + :type grant_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._grants_revoke_serialize( + drive_id=drive_id, + grant_id=grant_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GrantOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def grants_revoke_without_preload_content( + self, + drive_id: StrictStr, + grant_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Revoke Grant + + Revoke a grant (soft, sets revoked_at) under If-Match. + + :param drive_id: (required) + :type drive_id: str + :param grant_id: (required) + :type grant_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._grants_revoke_serialize( + drive_id=drive_id, + grant_id=grant_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GrantOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _grants_revoke_serialize( + self, + drive_id, + grant_id, + idempotency_key, + if_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if grant_id is not None: + _path_params['grant_id'] = grant_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v0/drives/{drive_id}/grants/{grant_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def grants_update( + self, + drive_id: StrictStr, + grant_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + grant_update_in: GrantUpdateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> GrantOut: + """Update Grant + + Change a grant's role or expiry under If-Match. + + :param drive_id: (required) + :type drive_id: str + :param grant_id: (required) + :type grant_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param grant_update_in: (required) + :type grant_update_in: GrantUpdateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._grants_update_serialize( + drive_id=drive_id, + grant_id=grant_id, + idempotency_key=idempotency_key, + if_match=if_match, + grant_update_in=grant_update_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GrantOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def grants_update_with_http_info( + self, + drive_id: StrictStr, + grant_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + grant_update_in: GrantUpdateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[GrantOut]: + """Update Grant + + Change a grant's role or expiry under If-Match. + + :param drive_id: (required) + :type drive_id: str + :param grant_id: (required) + :type grant_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param grant_update_in: (required) + :type grant_update_in: GrantUpdateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._grants_update_serialize( + drive_id=drive_id, + grant_id=grant_id, + idempotency_key=idempotency_key, + if_match=if_match, + grant_update_in=grant_update_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GrantOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def grants_update_without_preload_content( + self, + drive_id: StrictStr, + grant_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + grant_update_in: GrantUpdateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Grant + + Change a grant's role or expiry under If-Match. + + :param drive_id: (required) + :type drive_id: str + :param grant_id: (required) + :type grant_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param grant_update_in: (required) + :type grant_update_in: GrantUpdateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._grants_update_serialize( + drive_id=drive_id, + grant_id=grant_id, + idempotency_key=idempotency_key, + if_match=if_match, + grant_update_in=grant_update_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "GrantOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _grants_update_serialize( + self, + drive_id, + grant_id, + idempotency_key, + if_match, + grant_update_in, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if grant_id is not None: + _path_params['grant_id'] = grant_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if grant_update_in is not None: + _body_params = grant_update_in + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='PATCH', + resource_path='/v0/drives/{drive_id}/grants/{grant_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/api/search_api.py b/sdk/python/src/agentdrive_sdk/generated/sync/api/search_api.py new file mode 100644 index 0000000..6a0ee76 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/api/search_api.py @@ -0,0 +1,505 @@ +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from datetime import datetime +from pydantic import Field, StrictInt, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated +from agentdrive_sdk.generated.sync.models.search_page_out import SearchPageOut + +from agentdrive_sdk.generated.sync.api_client import ApiClient, RequestSerialized +from agentdrive_sdk.generated.sync.api_response import ApiResponse +from agentdrive_sdk.generated.sync.rest import RESTResponseType + + +class SearchApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def drive_search( + self, + drive_id: StrictStr, + q: Annotated[str, Field(min_length=1, strict=True)], + mode: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + parent_id: Optional[StrictStr] = None, + content_type: Optional[StrictStr] = None, + label: Optional[StrictStr] = None, + updated_after: Optional[datetime] = None, + updated_before: Optional[datetime] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SearchPageOut: + """Drive Search + + Search the drive's live artifacts. ``q`` is required and must be non-empty. ``mode`` selects the retrieval engine: ``lexical``, ``hybrid``, or ``semantic``. This deployment enables ``lexical`` only; requesting a disabled mode fails ``400 SEARCH_MODE_UNAVAILABLE``. Each hit's ``snippet`` is HTML-safe by contract: artifact content is entity-escaped and only the server's own ````/```` highlight pair survives, so a client may render it as HTML. + + :param drive_id: (required) + :type drive_id: str + :param q: (required) + :type q: str + :param mode: + :type mode: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param parent_id: + :type parent_id: str + :param content_type: + :type content_type: str + :param label: + :type label: str + :param updated_after: + :type updated_after: datetime + :param updated_before: + :type updated_before: datetime + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drive_search_serialize( + drive_id=drive_id, + q=q, + mode=mode, + limit=limit, + cursor=cursor, + parent_id=parent_id, + content_type=content_type, + label=label, + updated_after=updated_after, + updated_before=updated_before, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SearchPageOut", + '400': "DrivesList400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def drive_search_with_http_info( + self, + drive_id: StrictStr, + q: Annotated[str, Field(min_length=1, strict=True)], + mode: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + parent_id: Optional[StrictStr] = None, + content_type: Optional[StrictStr] = None, + label: Optional[StrictStr] = None, + updated_after: Optional[datetime] = None, + updated_before: Optional[datetime] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SearchPageOut]: + """Drive Search + + Search the drive's live artifacts. ``q`` is required and must be non-empty. ``mode`` selects the retrieval engine: ``lexical``, ``hybrid``, or ``semantic``. This deployment enables ``lexical`` only; requesting a disabled mode fails ``400 SEARCH_MODE_UNAVAILABLE``. Each hit's ``snippet`` is HTML-safe by contract: artifact content is entity-escaped and only the server's own ````/```` highlight pair survives, so a client may render it as HTML. + + :param drive_id: (required) + :type drive_id: str + :param q: (required) + :type q: str + :param mode: + :type mode: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param parent_id: + :type parent_id: str + :param content_type: + :type content_type: str + :param label: + :type label: str + :param updated_after: + :type updated_after: datetime + :param updated_before: + :type updated_before: datetime + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drive_search_serialize( + drive_id=drive_id, + q=q, + mode=mode, + limit=limit, + cursor=cursor, + parent_id=parent_id, + content_type=content_type, + label=label, + updated_after=updated_after, + updated_before=updated_before, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SearchPageOut", + '400': "DrivesList400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def drive_search_without_preload_content( + self, + drive_id: StrictStr, + q: Annotated[str, Field(min_length=1, strict=True)], + mode: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + parent_id: Optional[StrictStr] = None, + content_type: Optional[StrictStr] = None, + label: Optional[StrictStr] = None, + updated_after: Optional[datetime] = None, + updated_before: Optional[datetime] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Drive Search + + Search the drive's live artifacts. ``q`` is required and must be non-empty. ``mode`` selects the retrieval engine: ``lexical``, ``hybrid``, or ``semantic``. This deployment enables ``lexical`` only; requesting a disabled mode fails ``400 SEARCH_MODE_UNAVAILABLE``. Each hit's ``snippet`` is HTML-safe by contract: artifact content is entity-escaped and only the server's own ````/```` highlight pair survives, so a client may render it as HTML. + + :param drive_id: (required) + :type drive_id: str + :param q: (required) + :type q: str + :param mode: + :type mode: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param parent_id: + :type parent_id: str + :param content_type: + :type content_type: str + :param label: + :type label: str + :param updated_after: + :type updated_after: datetime + :param updated_before: + :type updated_before: datetime + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._drive_search_serialize( + drive_id=drive_id, + q=q, + mode=mode, + limit=limit, + cursor=cursor, + parent_id=parent_id, + content_type=content_type, + label=label, + updated_after=updated_after, + updated_before=updated_before, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SearchPageOut", + '400': "DrivesList400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _drive_search_serialize( + self, + drive_id, + q, + mode, + limit, + cursor, + parent_id, + content_type, + label, + updated_after, + updated_before, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + # process the query parameters + if q is not None: + + _query_params.append(('q', q)) + + if mode is not None: + + _query_params.append(('mode', mode)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + if parent_id is not None: + + _query_params.append(('parent_id', parent_id)) + + if content_type is not None: + + _query_params.append(('content_type', content_type)) + + if label is not None: + + _query_params.append(('label', label)) + + if updated_after is not None: + if isinstance(updated_after, datetime): + _query_params.append( + ( + 'updated_after', + updated_after.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('updated_after', updated_after)) + + if updated_before is not None: + if isinstance(updated_before, datetime): + _query_params.append( + ( + 'updated_before', + updated_before.strftime( + self.api_client.configuration.datetime_format + ) + ) + ) + else: + _query_params.append(('updated_before', updated_before)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}/search', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/api/shares_api.py b/sdk/python/src/agentdrive_sdk/generated/sync/api/shares_api.py new file mode 100644 index 0000000..1f7afd1 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/api/shares_api.py @@ -0,0 +1,1801 @@ +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import StrictInt, StrictStr +from typing import Optional +from agentdrive_sdk.generated.sync.models.share_create_in import ShareCreateIn +from agentdrive_sdk.generated.sync.models.share_create_out import ShareCreateOut +from agentdrive_sdk.generated.sync.models.share_list_out import ShareListOut +from agentdrive_sdk.generated.sync.models.share_out import ShareOut + +from agentdrive_sdk.generated.sync.api_client import ApiClient, RequestSerialized +from agentdrive_sdk.generated.sync.api_response import ApiResponse +from agentdrive_sdk.generated.sync.rest import RESTResponseType + + +class SharesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def shares_create( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + share_create_in: ShareCreateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ShareCreateOut: + """Create Share + + Mint a read-only bearer link. The response carries the plaintext secret — the only response that does. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param share_create_in: (required) + :type share_create_in: ShareCreateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_create_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + share_create_in=share_create_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ShareCreateOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def shares_create_with_http_info( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + share_create_in: ShareCreateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ShareCreateOut]: + """Create Share + + Mint a read-only bearer link. The response carries the plaintext secret — the only response that does. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param share_create_in: (required) + :type share_create_in: ShareCreateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_create_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + share_create_in=share_create_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ShareCreateOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def shares_create_without_preload_content( + self, + drive_id: StrictStr, + idempotency_key: Optional[StrictStr], + share_create_in: ShareCreateIn, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Share + + Mint a read-only bearer link. The response carries the plaintext secret — the only response that does. + + :param drive_id: (required) + :type drive_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param share_create_in: (required) + :type share_create_in: ShareCreateIn + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_create_serialize( + drive_id=drive_id, + idempotency_key=idempotency_key, + share_create_in=share_create_in, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "ShareCreateOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _shares_create_serialize( + self, + drive_id, + idempotency_key, + share_create_in, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + if share_create_in is not None: + _body_params = share_create_in + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v0/drives/{drive_id}/shares', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def shares_list( + self, + drive_id: StrictStr, + lifecycle: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + resource_type: Optional[StrictStr] = None, + resource_id: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ShareListOut: + """List Shares + + List the drive's shares (no secrets), keyset paginated. ``resource_id`` narrows the page to one resource's links and REQUIRES ``resource_type`` alongside it — a bare resource id is ambiguous across ``artifact`` / ``artifact_version`` / ``folder``, and inferring the kind from the id prefix would tie the filter's meaning to an id format the contract does not promise to keep. ``resource_type`` alone is a valid filter. Listing shares already requires drive ``manager``, so these filters only narrow a page the caller could already read in full. + + :param drive_id: (required) + :type drive_id: str + :param lifecycle: + :type lifecycle: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param resource_type: + :type resource_type: str + :param resource_id: + :type resource_id: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_list_serialize( + drive_id=drive_id, + lifecycle=lifecycle, + limit=limit, + cursor=cursor, + resource_type=resource_type, + resource_id=resource_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ShareListOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def shares_list_with_http_info( + self, + drive_id: StrictStr, + lifecycle: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + resource_type: Optional[StrictStr] = None, + resource_id: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ShareListOut]: + """List Shares + + List the drive's shares (no secrets), keyset paginated. ``resource_id`` narrows the page to one resource's links and REQUIRES ``resource_type`` alongside it — a bare resource id is ambiguous across ``artifact`` / ``artifact_version`` / ``folder``, and inferring the kind from the id prefix would tie the filter's meaning to an id format the contract does not promise to keep. ``resource_type`` alone is a valid filter. Listing shares already requires drive ``manager``, so these filters only narrow a page the caller could already read in full. + + :param drive_id: (required) + :type drive_id: str + :param lifecycle: + :type lifecycle: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param resource_type: + :type resource_type: str + :param resource_id: + :type resource_id: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_list_serialize( + drive_id=drive_id, + lifecycle=lifecycle, + limit=limit, + cursor=cursor, + resource_type=resource_type, + resource_id=resource_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ShareListOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def shares_list_without_preload_content( + self, + drive_id: StrictStr, + lifecycle: Optional[StrictStr] = None, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + resource_type: Optional[StrictStr] = None, + resource_id: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Shares + + List the drive's shares (no secrets), keyset paginated. ``resource_id`` narrows the page to one resource's links and REQUIRES ``resource_type`` alongside it — a bare resource id is ambiguous across ``artifact`` / ``artifact_version`` / ``folder``, and inferring the kind from the id prefix would tie the filter's meaning to an id format the contract does not promise to keep. ``resource_type`` alone is a valid filter. Listing shares already requires drive ``manager``, so these filters only narrow a page the caller could already read in full. + + :param drive_id: (required) + :type drive_id: str + :param lifecycle: + :type lifecycle: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param resource_type: + :type resource_type: str + :param resource_id: + :type resource_id: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_list_serialize( + drive_id=drive_id, + lifecycle=lifecycle, + limit=limit, + cursor=cursor, + resource_type=resource_type, + resource_id=resource_id, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ShareListOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _shares_list_serialize( + self, + drive_id, + lifecycle, + limit, + cursor, + resource_type, + resource_id, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + # process the query parameters + if lifecycle is not None: + + _query_params.append(('lifecycle', lifecycle)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + if resource_type is not None: + + _query_params.append(('resource_type', resource_type)) + + if resource_id is not None: + + _query_params.append(('resource_id', resource_id)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}/shares', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def shares_read( + self, + drive_id: StrictStr, + share_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ShareOut: + """Read Share + + Read one share's management representation (no secret). + + :param drive_id: (required) + :type drive_id: str + :param share_id: (required) + :type share_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_read_serialize( + drive_id=drive_id, + share_id=share_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ShareOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def shares_read_with_http_info( + self, + drive_id: StrictStr, + share_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ShareOut]: + """Read Share + + Read one share's management representation (no secret). + + :param drive_id: (required) + :type drive_id: str + :param share_id: (required) + :type share_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_read_serialize( + drive_id=drive_id, + share_id=share_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ShareOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def shares_read_without_preload_content( + self, + drive_id: StrictStr, + share_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Read Share + + Read one share's management representation (no secret). + + :param drive_id: (required) + :type drive_id: str + :param share_id: (required) + :type share_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_read_serialize( + drive_id=drive_id, + share_id=share_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ShareOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _shares_read_serialize( + self, + drive_id, + share_id, + if_none_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if share_id is not None: + _path_params['share_id'] = share_id + # process the query parameters + # process the header parameters + if if_none_match is not None: + _header_params['If-None-Match'] = if_none_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}/shares/{share_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def shares_revoke( + self, + drive_id: StrictStr, + share_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ShareOut: + """Revoke Share + + Revoke a share (soft, sets revoked_at) under If-Match. + + :param drive_id: (required) + :type drive_id: str + :param share_id: (required) + :type share_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_revoke_serialize( + drive_id=drive_id, + share_id=share_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ShareOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def shares_revoke_with_http_info( + self, + drive_id: StrictStr, + share_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ShareOut]: + """Revoke Share + + Revoke a share (soft, sets revoked_at) under If-Match. + + :param drive_id: (required) + :type drive_id: str + :param share_id: (required) + :type share_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_revoke_serialize( + drive_id=drive_id, + share_id=share_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ShareOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def shares_revoke_without_preload_content( + self, + drive_id: StrictStr, + share_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Revoke Share + + Revoke a share (soft, sets revoked_at) under If-Match. + + :param drive_id: (required) + :type drive_id: str + :param share_id: (required) + :type share_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_revoke_serialize( + drive_id=drive_id, + share_id=share_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ShareOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _shares_revoke_serialize( + self, + drive_id, + share_id, + idempotency_key, + if_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if share_id is not None: + _path_params['share_id'] = share_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v0/drives/{drive_id}/shares/{share_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def shares_rotate( + self, + drive_id: StrictStr, + share_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ShareCreateOut: + """Rotate Share + + Rotate the secret in place (same id, no grace window). The response carries the new plaintext secret. + + :param drive_id: (required) + :type drive_id: str + :param share_id: (required) + :type share_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_rotate_serialize( + drive_id=drive_id, + share_id=share_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ShareCreateOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def shares_rotate_with_http_info( + self, + drive_id: StrictStr, + share_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ShareCreateOut]: + """Rotate Share + + Rotate the secret in place (same id, no grace window). The response carries the new plaintext secret. + + :param drive_id: (required) + :type drive_id: str + :param share_id: (required) + :type share_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_rotate_serialize( + drive_id=drive_id, + share_id=share_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ShareCreateOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def shares_rotate_without_preload_content( + self, + drive_id: StrictStr, + share_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Rotate Share + + Rotate the secret in place (same id, no grace window). The response carries the new plaintext secret. + + :param drive_id: (required) + :type drive_id: str + :param share_id: (required) + :type share_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_rotate_serialize( + drive_id=drive_id, + share_id=share_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ShareCreateOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _shares_rotate_serialize( + self, + drive_id, + share_id, + idempotency_key, + if_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if share_id is not None: + _path_params['share_id'] = share_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v0/drives/{drive_id}/shares/{share_id}/rotate', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/api/shares_redemption_api.py b/sdk/python/src/agentdrive_sdk/generated/sync/api/shares_redemption_api.py new file mode 100644 index 0000000..14de328 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/api/shares_redemption_api.py @@ -0,0 +1,297 @@ +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import StrictStr +from typing import Any + +from agentdrive_sdk.generated.sync.api_client import ApiClient, RequestSerialized +from agentdrive_sdk.generated.sync.api_response import ApiResponse +from agentdrive_sdk.generated.sync.rest import RESTResponseType + + +class SharesRedemptionApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def shares_redeem( + self, + share_key: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> object: + """Redeem Share + + The un-slashed form. Browsers are canonicalized onto `/s/{key}/`. This inherits the published `shares_redeem` operation id from the route it replaced, because for an API client it *is* that operation, unchanged: same URL, same JSON `Accept`, same bytes, same uniform 404. Only the browser arm is new. Dropping it from the spec would have described the route as gone while it kept answering. The page links its own sub-resources relatively (`content`), and relative resolution replaces the last path segment: from `/s/KEY` that reaches `/s/content`, from `/s/KEY/` it reaches `/s/KEY/content`. The trailing slash is what makes an image on a share page load at all. Links already in the wild have no slash, so this redirect is how they keep working. It is unconditional and runs before any lookup — redirecting only for keys that resolve would turn the status code into an existence oracle and undo the anti-enumeration property the rest of this module maintains. Only browsers are moved. JSON and byte clients are answered in place, so the shipped v0 contract for this URL is unchanged, redirect included. + + :param share_key: (required) + :type share_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_redeem_serialize( + share_key=share_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "ValidationErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def shares_redeem_with_http_info( + self, + share_key: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[object]: + """Redeem Share + + The un-slashed form. Browsers are canonicalized onto `/s/{key}/`. This inherits the published `shares_redeem` operation id from the route it replaced, because for an API client it *is* that operation, unchanged: same URL, same JSON `Accept`, same bytes, same uniform 404. Only the browser arm is new. Dropping it from the spec would have described the route as gone while it kept answering. The page links its own sub-resources relatively (`content`), and relative resolution replaces the last path segment: from `/s/KEY` that reaches `/s/content`, from `/s/KEY/` it reaches `/s/KEY/content`. The trailing slash is what makes an image on a share page load at all. Links already in the wild have no slash, so this redirect is how they keep working. It is unconditional and runs before any lookup — redirecting only for keys that resolve would turn the status code into an existence oracle and undo the anti-enumeration property the rest of this module maintains. Only browsers are moved. JSON and byte clients are answered in place, so the shipped v0 contract for this URL is unchanged, redirect included. + + :param share_key: (required) + :type share_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_redeem_serialize( + share_key=share_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "ValidationErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def shares_redeem_without_preload_content( + self, + share_key: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Redeem Share + + The un-slashed form. Browsers are canonicalized onto `/s/{key}/`. This inherits the published `shares_redeem` operation id from the route it replaced, because for an API client it *is* that operation, unchanged: same URL, same JSON `Accept`, same bytes, same uniform 404. Only the browser arm is new. Dropping it from the spec would have described the route as gone while it kept answering. The page links its own sub-resources relatively (`content`), and relative resolution replaces the last path segment: from `/s/KEY` that reaches `/s/content`, from `/s/KEY/` it reaches `/s/KEY/content`. The trailing slash is what makes an image on a share page load at all. Links already in the wild have no slash, so this redirect is how they keep working. It is unconditional and runs before any lookup — redirecting only for keys that resolve would turn the status code into an existence oracle and undo the anti-enumeration property the rest of this module maintains. Only browsers are moved. JSON and byte clients are answered in place, so the shipped v0 contract for this URL is unchanged, redirect included. + + :param share_key: (required) + :type share_key: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._shares_redeem_serialize( + share_key=share_key, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "object", + '422': "ValidationErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _shares_redeem_serialize( + self, + share_key, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if share_key is not None: + _path_params['share_key'] = share_key + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/s/{share_key}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/api/versions_api.py b/sdk/python/src/agentdrive_sdk/generated/sync/api/versions_api.py new file mode 100644 index 0000000..f6551ac --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/api/versions_api.py @@ -0,0 +1,1853 @@ +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBytes, StrictInt, StrictStr +from typing import Optional, Tuple, Union +from typing_extensions import Annotated +from agentdrive_sdk.generated.sync.models.version_created_out import VersionCreatedOut +from agentdrive_sdk.generated.sync.models.version_list_out import VersionListOut +from agentdrive_sdk.generated.sync.models.version_out import VersionOut + +from agentdrive_sdk.generated.sync.api_client import ApiClient, RequestSerialized +from agentdrive_sdk.generated.sync.api_response import ApiResponse +from agentdrive_sdk.generated.sync.rest import RESTResponseType + + +class VersionsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def versions_append( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="The artifact bytes.")], + authorization: Optional[StrictStr] = None, + content_type: Annotated[Optional[StrictStr], Field(description="Declared media type.")] = None, + sha256: Annotated[Optional[StrictStr], Field(description="Optional content sha256 for verification.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> VersionCreatedOut: + """Append Version + + Append one immutable version and rotate the artifact head. Multipart only (415 for a JSON body). Parts: content (bytes), content_type, sha256. content is required; name, parent_id, and metadata are not accepted here. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param content: The artifact bytes. (required) + :type content: bytes + :param authorization: + :type authorization: str + :param content_type: Declared media type. + :type content_type: str + :param sha256: Optional content sha256 for verification. + :type sha256: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._versions_append_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + idempotency_key=idempotency_key, + if_match=if_match, + content=content, + authorization=authorization, + content_type=content_type, + sha256=sha256, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "VersionCreatedOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def versions_append_with_http_info( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="The artifact bytes.")], + authorization: Optional[StrictStr] = None, + content_type: Annotated[Optional[StrictStr], Field(description="Declared media type.")] = None, + sha256: Annotated[Optional[StrictStr], Field(description="Optional content sha256 for verification.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[VersionCreatedOut]: + """Append Version + + Append one immutable version and rotate the artifact head. Multipart only (415 for a JSON body). Parts: content (bytes), content_type, sha256. content is required; name, parent_id, and metadata are not accepted here. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param content: The artifact bytes. (required) + :type content: bytes + :param authorization: + :type authorization: str + :param content_type: Declared media type. + :type content_type: str + :param sha256: Optional content sha256 for verification. + :type sha256: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._versions_append_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + idempotency_key=idempotency_key, + if_match=if_match, + content=content, + authorization=authorization, + content_type=content_type, + sha256=sha256, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "VersionCreatedOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def versions_append_without_preload_content( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + content: Annotated[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]], Field(description="The artifact bytes.")], + authorization: Optional[StrictStr] = None, + content_type: Annotated[Optional[StrictStr], Field(description="Declared media type.")] = None, + sha256: Annotated[Optional[StrictStr], Field(description="Optional content sha256 for verification.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Append Version + + Append one immutable version and rotate the artifact head. Multipart only (415 for a JSON body). Parts: content (bytes), content_type, sha256. content is required; name, parent_id, and metadata are not accepted here. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param content: The artifact bytes. (required) + :type content: bytes + :param authorization: + :type authorization: str + :param content_type: Declared media type. + :type content_type: str + :param sha256: Optional content sha256 for verification. + :type sha256: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._versions_append_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + idempotency_key=idempotency_key, + if_match=if_match, + content=content, + authorization=authorization, + content_type=content_type, + sha256=sha256, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "VersionCreatedOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _versions_append_serialize( + self, + drive_id, + artifact_id, + idempotency_key, + if_match, + content, + authorization, + content_type, + sha256, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if artifact_id is not None: + _path_params['artifact_id'] = artifact_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + if content is not None: + _files['content'] = content + if content_type is not None: + _form_params.append(('content_type', content_type)) + if sha256 is not None: + _form_params.append(('sha256', sha256)) + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'multipart/form-data' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v0/drives/{drive_id}/artifacts/{artifact_id}/versions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def versions_content( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + version_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> bytes: + """Read Version Content + + Download one version's immutable bytes — stream or 307. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param version_id: (required) + :type version_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._versions_content_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + version_id=version_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + '304': None, + '307': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def versions_content_with_http_info( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + version_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[bytes]: + """Read Version Content + + Download one version's immutable bytes — stream or 307. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param version_id: (required) + :type version_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._versions_content_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + version_id=version_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + '304': None, + '307': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def versions_content_without_preload_content( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + version_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Read Version Content + + Download one version's immutable bytes — stream or 307. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param version_id: (required) + :type version_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._versions_content_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + version_id=version_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "bytes", + '304': None, + '307': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _versions_content_serialize( + self, + drive_id, + artifact_id, + version_id, + if_none_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if artifact_id is not None: + _path_params['artifact_id'] = artifact_id + if version_id is not None: + _path_params['version_id'] = version_id + # process the query parameters + # process the header parameters + if if_none_match is not None: + _header_params['If-None-Match'] = if_none_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/octet-stream', + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}/content', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def versions_list( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> VersionListOut: + """List Versions + + List the artifact's version trail, newest first (ordinal DESC). + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._versions_list_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + limit=limit, + cursor=cursor, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VersionListOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def versions_list_with_http_info( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[VersionListOut]: + """List Versions + + List the artifact's version trail, newest first (ordinal DESC). + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._versions_list_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + limit=limit, + cursor=cursor, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VersionListOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def versions_list_without_preload_content( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + limit: Optional[StrictInt] = None, + cursor: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Versions + + List the artifact's version trail, newest first (ordinal DESC). + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param limit: + :type limit: int + :param cursor: + :type cursor: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._versions_list_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + limit=limit, + cursor=cursor, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VersionListOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _versions_list_serialize( + self, + drive_id, + artifact_id, + limit, + cursor, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if artifact_id is not None: + _path_params['artifact_id'] = artifact_id + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if cursor is not None: + + _query_params.append(('cursor', cursor)) + + # process the header parameters + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}/artifacts/{artifact_id}/versions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def versions_read( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + version_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> VersionOut: + """Read Version + + Read one immutable version. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param version_id: (required) + :type version_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._versions_read_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + version_id=version_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VersionOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def versions_read_with_http_info( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + version_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[VersionOut]: + """Read Version + + Read one immutable version. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param version_id: (required) + :type version_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._versions_read_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + version_id=version_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VersionOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def versions_read_without_preload_content( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + version_id: StrictStr, + if_none_match: Optional[StrictStr] = None, + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Read Version + + Read one immutable version. + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param version_id: (required) + :type version_id: str + :param if_none_match: + :type if_none_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._versions_read_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + version_id=version_id, + if_none_match=if_none_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "VersionOut", + '304': None, + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _versions_read_serialize( + self, + drive_id, + artifact_id, + version_id, + if_none_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if artifact_id is not None: + _path_params['artifact_id'] = artifact_id + if version_id is not None: + _path_params['version_id'] = version_id + # process the query parameters + # process the header parameters + if if_none_match is not None: + _header_params['If-None-Match'] = if_none_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def versions_restore( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + version_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> VersionCreatedOut: + """Restore Version + + Restore a historical version as a NEW head version (no byte copy). + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param version_id: (required) + :type version_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._versions_restore_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + version_id=version_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "VersionCreatedOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def versions_restore_with_http_info( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + version_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[VersionCreatedOut]: + """Restore Version + + Restore a historical version as a NEW head version (no byte copy). + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param version_id: (required) + :type version_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._versions_restore_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + version_id=version_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "VersionCreatedOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def versions_restore_without_preload_content( + self, + drive_id: StrictStr, + artifact_id: StrictStr, + version_id: StrictStr, + idempotency_key: Optional[StrictStr], + if_match: Optional[StrictStr], + authorization: Optional[StrictStr] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Restore Version + + Restore a historical version as a NEW head version (no byte copy). + + :param drive_id: (required) + :type drive_id: str + :param artifact_id: (required) + :type artifact_id: str + :param version_id: (required) + :type version_id: str + :param idempotency_key: (required) + :type idempotency_key: str + :param if_match: (required) + :type if_match: str + :param authorization: + :type authorization: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._versions_restore_serialize( + drive_id=drive_id, + artifact_id=artifact_id, + version_id=version_id, + idempotency_key=idempotency_key, + if_match=if_match, + authorization=authorization, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "VersionCreatedOut", + '400': "DrivesCreate400Response", + '401': "DrivesCreate400Response", + '403': "DrivesCreate400Response", + '404': "DrivesCreate400Response", + '409': "DrivesCreate400Response", + '412': "DrivesCreate400Response", + '422': "ValidationErrorResponse", + '428': "DrivesCreate400Response", + '429': "DrivesCreate400Response", + '503': "DrivesCreate400Response", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _versions_restore_serialize( + self, + drive_id, + artifact_id, + version_id, + idempotency_key, + if_match, + authorization, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if drive_id is not None: + _path_params['drive_id'] = drive_id + if artifact_id is not None: + _path_params['artifact_id'] = artifact_id + if version_id is not None: + _path_params['version_id'] = version_id + # process the query parameters + # process the header parameters + if idempotency_key is not None: + _header_params['Idempotency-Key'] = idempotency_key + if if_match is not None: + _header_params['If-Match'] = if_match + if authorization is not None: + _header_params['authorization'] = authorization + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'bearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}/restore', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/api_client.py b/sdk/python/src/agentdrive_sdk/generated/sync/api_client.py new file mode 100644 index 0000000..81a7639 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/api_client.py @@ -0,0 +1,819 @@ +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + + +import datetime +from dateutil.parser import parse +from enum import Enum +import decimal +import json +import mimetypes +import os +import re +import tempfile +import uuid + +from urllib.parse import quote +from typing import Tuple, Optional, List, Dict, Union +from pydantic import SecretStr + +from agentdrive_sdk.generated.sync.configuration import Configuration +from agentdrive_sdk.generated.sync.api_response import ApiResponse, T as ApiResponseT +import agentdrive_sdk.generated.sync.models +from agentdrive_sdk.generated.sync import rest +from agentdrive_sdk.generated.sync.exceptions import ( + ApiValueError, + ApiException, + BadRequestException, + UnauthorizedException, + ForbiddenException, + NotFoundException, + ServiceException +) + +RequestSerialized = Tuple[str, str, Dict[str, str], Optional[str], List[str]] + +class ApiClient: + """Generic API client for OpenAPI client library builds. + + OpenAPI generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the OpenAPI + templates. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, str, int) + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int, # TODO remove as only py3 is supported? + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'decimal': decimal.Decimal, + 'UUID': uuid.UUID, + 'object': object, + } + _pool = None + + def __init__( + self, + configuration=None, + header_name=None, + header_value=None, + cookie=None + ) -> None: + # use default configuration if none is provided + if configuration is None: + configuration = Configuration.get_default() + self.configuration = configuration + + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'OpenAPI-Generator/0.1.0/python' + self.client_side_validation = configuration.client_side_validation + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + pass + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + + _default = None + + @classmethod + def get_default(cls): + """Return new instance of ApiClient. + + This method returns newly created, based on default constructor, + object of ApiClient class or returns a copy of default + ApiClient. + + :return: The ApiClient object. + """ + if cls._default is None: + cls._default = ApiClient() + return cls._default + + @classmethod + def set_default(cls, default): + """Set default instance of ApiClient. + + It stores default ApiClient. + + :param default: object of ApiClient. + """ + cls._default = default + + def param_serialize( + self, + method, + resource_path, + path_params=None, + query_params=None, + header_params=None, + body=None, + post_params=None, + files=None, auth_settings=None, + collection_formats=None, + _host=None, + _request_auth=None + ) -> RequestSerialized: + + """Builds the HTTP request params needed by the request. + :param method: Method to call. + :param resource_path: Path to method endpoint. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :return: tuple of form (path, http_method, query_params, header_params, + body, post_params, files) + """ + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict( + self.parameters_to_tuples(header_params,collection_formats) + ) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples( + path_params, + collection_formats + ) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # post parameters + if post_params or files: + post_params = post_params if post_params else [] + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples( + post_params, + collection_formats + ) + if files: + post_params.extend(self.files_parameters(files)) + + # auth setting + self.update_params_for_auth( + header_params, + query_params, + auth_settings, + resource_path, + method, + body, + request_auth=_request_auth + ) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + if _host is None or self.configuration.ignore_operation_servers: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _host + resource_path + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + url_query = self.parameters_to_url_query( + query_params, + collection_formats + ) + url += "?" + url_query + + return method, url, header_params, body, post_params + + + def call_api( + self, + method, + url, + header_params=None, + body=None, + post_params=None, + _request_timeout=None + ) -> rest.RESTResponse: + """Makes the HTTP request (synchronous) + :param method: Method to call. + :param url: Path to method endpoint. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param _request_timeout: timeout setting for this request. + :return: RESTResponse + """ + + try: + # perform request and return response + response_data = self.rest_client.request( + method, url, + headers=header_params, + body=body, post_params=post_params, + _request_timeout=_request_timeout + ) + + except ApiException as e: + raise e + + return response_data + + def response_deserialize( + self, + response_data: rest.RESTResponse, + response_types_map: Optional[Dict[str, ApiResponseT]]=None + ) -> ApiResponse[ApiResponseT]: + """Deserializes response into an object. + :param response_data: RESTResponse object to be deserialized. + :param response_types_map: dict of response types. + :return: ApiResponse + """ + + msg = "RESTResponse.read() must be called before passing it to response_deserialize()" + assert response_data.data is not None, msg + + response_type = response_types_map.get(str(response_data.status), None) + if not response_type and isinstance(response_data.status, int) and 100 <= response_data.status <= 599: + # if not found, look for '1XX', '2XX', etc. + response_type = response_types_map.get(str(response_data.status)[0] + "XX", None) + + # If the response_type has not matched (eg. did not match the previous if statements) and the default response is available, use it. + if response_type is None and str(response_data.status) not in response_types_map \ + and (not isinstance(response_data.status, int) or not 100 <= response_data.status <= 599 or str(response_data.status)[0] + "XX" not in response_types_map) \ + and 'default' in response_types_map: + response_type = response_types_map['default'] + + # deserialize response data + response_text = None + return_data = None + try: + if response_type in ("bytearray", "bytes"): + return_data = response_data.data + elif response_type == "file": + return_data = self.__deserialize_file(response_data) + elif response_type is not None: + match = None + content_type = response_data.headers.get('content-type') + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_text = response_data.data.decode(encoding) + return_data = self.deserialize(response_text, response_type, content_type) + finally: + if not 200 <= response_data.status <= 299: + raise ApiException.from_response( + http_resp=response_data, + body=response_text, + data=return_data, + ) + + return ApiResponse( + status_code = response_data.status, + data = return_data, + headers = response_data.headers, + raw_data = response_data.data + ) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is SecretStr, return obj.get_secret_value() + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is decimal.Decimal return string representation. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is OpenAPI model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, Enum): + return obj.value + elif isinstance(obj, SecretStr): + return obj.get_secret_value() + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, uuid.UUID): + return str(obj) + elif isinstance(obj, list): + return [ + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ] + elif isinstance(obj, tuple): + return tuple( + self.sanitize_for_serialization(sub_obj) for sub_obj in obj + ) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + elif isinstance(obj, decimal.Decimal): + return str(obj) + elif isinstance(obj, dict): + return { + key: self.sanitize_for_serialization(val) + for key, val in obj.items() + } + + # Convert model obj to dict except + # attributes `openapi_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + if hasattr(obj, 'to_dict') and callable(getattr(obj, 'to_dict')): + obj_dict = obj.to_dict() + else: + obj_dict = obj.__dict__ + + return self.sanitize_for_serialization(obj_dict) + + + def deserialize(self, response_text: str, response_type: str, content_type: Optional[str]): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + :param content_type: content type of response. + + :return: deserialized object. + """ + + # fetch data from response object + if content_type is None: + try: + data = json.loads(response_text) + except ValueError: + data = response_text + elif re.match(r'^application/(json|[\w!#$&.+\-^_]+\+json)\s*(;|$)', content_type, re.IGNORECASE): + if response_text == "": + data = "" + else: + data = json.loads(response_text) + elif re.match(r'^text\/[a-z.+-]+\s*(;|$)', content_type, re.IGNORECASE): + data = response_text + else: + raise ApiException( + status=0, + reason="Unsupported content type: {0}".format(content_type) + ) + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if isinstance(klass, str): + if klass.startswith('List['): + m = re.match(r'List\[(.*)]', klass) + assert m is not None, "Malformed List type definition" + sub_kls = m.group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('Dict['): + m = re.match(r'Dict\[([^,]*), (.*)]', klass) + assert m is not None, "Malformed Dict type definition" + sub_kls = m.group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in data.items()} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(agentdrive_sdk.generated.sync.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass is object: + return self.__deserialize_object(data) + elif klass is datetime.date: + return self.__deserialize_date(data) + elif klass is datetime.datetime: + return self.__deserialize_datetime(data) + elif klass is decimal.Decimal: + return decimal.Decimal(data) + elif klass is uuid.UUID: + return uuid.UUID(data) + elif issubclass(klass, Enum): + return self.__deserialize_enum(data, klass) + else: + return self.__deserialize_model(data, klass) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def parameters_to_url_query(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: URL query string (e.g. a=Hello%20World&b=123) + """ + new_params: List[Tuple[str, str]] = [] + if collection_formats is None: + collection_formats = {} + for k, v in params.items() if isinstance(params, dict) else params: + if isinstance(v, bool): + v = str(v).lower() + if isinstance(v, (int, float)): + v = str(v) + if isinstance(v, dict): + v = json.dumps(v) + + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, quote(str(value))) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(quote(str(value)) for value in v)) + ) + else: + new_params.append((k, quote(str(v)))) + + return "&".join(["=".join(map(str, item)) for item in new_params]) + + def files_parameters( + self, + files: Dict[str, Union[str, bytes, List[str], List[bytes], Tuple[str, bytes]]], + ): + """Builds form parameters. + + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + for k, v in files.items(): + if isinstance(v, str): + with open(v, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + elif isinstance(v, bytes): + filename = k + filedata = v + elif isinstance(v, tuple): + filename, filedata = v + elif isinstance(v, list): + for file_param in v: + params.extend(self.files_parameters({k: file_param})) + continue + else: + raise ValueError("Unsupported file value") + mimetype = ( + mimetypes.guess_type(filename)[0] + or 'application/octet-stream' + ) + params.append( + tuple([k, tuple([filename, filedata, mimetype])]) + ) + return params + + def select_header_accept(self, accepts: List[str]) -> Optional[str]: + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return None + + for accept in accepts: + if re.search('json', accept, re.IGNORECASE): + return accept + + return accepts[0] + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return None + + for content_type in content_types: + if re.search('json', content_type, re.IGNORECASE): + return content_type + + return content_types[0] + + def update_params_for_auth( + self, + headers, + queries, + auth_settings, + resource_path, + method, + body, + request_auth=None + ) -> None: + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param request_auth: if set, the provided settings will + override the token in the configuration. + """ + if not auth_settings: + return + + if request_auth: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + request_auth + ) + else: + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + self._apply_auth_params( + headers, + queries, + resource_path, + method, + body, + auth_setting + ) + + def _apply_auth_params( + self, + headers, + queries, + resource_path, + method, + body, + auth_setting + ) -> None: + """Updates the request parameters based on a single auth_setting + + :param headers: Header parameters dict to be updated. + :param queries: Query parameters tuple list to be updated. + :resource_path: A string representation of the HTTP request resource path. + :method: A string representation of the HTTP request method. + :body: A object representing the body of the HTTP request. + The object type is the return value of sanitize_for_serialization(). + :param auth_setting: auth settings for the endpoint + """ + if auth_setting['in'] == 'cookie': + if not 'Cookie' in headers: + headers['Cookie'] = "" + else: + headers['Cookie'] += "; " + # Account for cookie value containing spaces and special characters + cookie_value = str(auth_setting['value']) + if not re.match("^\".*\"$", cookie_value): + cookie_value = cookie_value.replace("\"", "\\\"") + cookie_value = f"\"{cookie_value}\"" + headers['Cookie'] += f"{auth_setting['key']}={cookie_value}" + elif auth_setting['in'] == 'header': + if auth_setting['type'] != 'http-signature': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + queries.append((auth_setting['key'], auth_setting['value'])) + else: + raise ApiValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + handle file downloading + save response body into a tmp file and return the instance + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.headers.get("Content-Disposition") + if content_disposition: + m = re.search( + r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition + ) + assert m is not None, "Unexpected 'content-disposition' header value" + filename = os.path.basename(m.group(1)) # Strip any directory traversal + if filename in ("", ".", ".."): # fall back to tmp filename + filename = os.path.basename(path) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return str(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return an original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datetime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __deserialize_enum(self, data, klass): + """Deserializes primitive type to enum. + + :param data: primitive type. + :param klass: class literal. + :return: enum value. + """ + try: + return klass(data) + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as `{1}`" + .format(data, klass) + ) + ) + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + return klass.from_dict(data) diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/api_response.py b/sdk/python/src/agentdrive_sdk/generated/sync/api_response.py new file mode 100644 index 0000000..9bc7c11 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/api_response.py @@ -0,0 +1,21 @@ +"""API response object.""" + +from __future__ import annotations +from typing import Optional, Generic, Mapping, TypeVar +from pydantic import Field, StrictInt, StrictBytes, BaseModel + +T = TypeVar("T") + +class ApiResponse(BaseModel, Generic[T]): + """ + API response object + """ + + status_code: StrictInt = Field(description="HTTP status code") + headers: Optional[Mapping[str, str]] = Field(None, description="HTTP headers") + data: T = Field(description="Deserialized data given the data type") + raw_data: StrictBytes = Field(description="Raw data (HTTP response body)") + + model_config = { + "arbitrary_types_allowed": True + } diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/configuration.py b/sdk/python/src/agentdrive_sdk/generated/sync/configuration.py new file mode 100644 index 0000000..c21c54b --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/configuration.py @@ -0,0 +1,623 @@ +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import copy +import http.client as httplib +import logging +from logging import FileHandler +import multiprocessing +import sys +from typing import Any, ClassVar, Dict, List, Literal, Optional, TypedDict, Union +from urllib.parse import urlparse +from urllib.request import getproxies +from typing_extensions import NotRequired, Self + +import urllib3 + + +JSON_SCHEMA_VALIDATION_KEYWORDS = { + 'multipleOf', 'maximum', 'exclusiveMaximum', + 'minimum', 'exclusiveMinimum', 'maxLength', + 'minLength', 'pattern', 'maxItems', 'minItems' +} + +ServerVariablesT = Dict[str, str] + +GenericAuthSetting = TypedDict( + "GenericAuthSetting", + { + "type": str, + "in": str, + "key": str, + "value": str, + }, +) + + +OAuth2AuthSetting = TypedDict( + "OAuth2AuthSetting", + { + "type": Literal["oauth2"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +APIKeyAuthSetting = TypedDict( + "APIKeyAuthSetting", + { + "type": Literal["api_key"], + "in": str, + "key": str, + "value": Optional[str], + }, +) + + +BasicAuthSetting = TypedDict( + "BasicAuthSetting", + { + "type": Literal["basic"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": Optional[str], + }, +) + + +BearerFormatAuthSetting = TypedDict( + "BearerFormatAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "format": Literal["JWT"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +BearerAuthSetting = TypedDict( + "BearerAuthSetting", + { + "type": Literal["bearer"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": str, + }, +) + + +HTTPSignatureAuthSetting = TypedDict( + "HTTPSignatureAuthSetting", + { + "type": Literal["http-signature"], + "in": Literal["header"], + "key": Literal["Authorization"], + "value": None, + }, +) + + +AuthSettings = TypedDict( + "AuthSettings", + { + "bearerAuth": BearerFormatAuthSetting, + }, + total=False, +) + + +class HostSettingVariable(TypedDict): + description: str + default_value: str + enum_values: List[str] + + +class HostSetting(TypedDict): + url: str + description: str + variables: NotRequired[Dict[str, HostSettingVariable]] + + +class Configuration: + """This class contains various settings of the API client. + + :param host: Base url. + :param ignore_operation_servers + Boolean to ignore operation servers for the API client. + Config will use `host` as the base url regardless of the operation servers. + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer). + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication. + :param password: Password for HTTP basic authentication. + :param access_token: Access token. + :param server_index: Index to servers configuration. + :param server_variables: Mapping with string values to replace variables in + templated server configuration. The validation of enums is performed for + variables with defined enum values before. + :param server_operation_index: Mapping from operation ID to an index to server + configuration. + :param server_operation_variables: Mapping from operation ID to a mapping with + string values to replace variables in templated server configuration. + The validation of enums is performed for variables with defined enum + values before. + :param verify_ssl: bool - Set this to false to skip verifying SSL certificate + when calling API from https server. + :param ssl_ca_cert: str - the path to a file of concatenated CA certificates + in PEM format. + :param retries: int | urllib3.util.retry.Retry - Retry configuration. + :param ca_cert_data: verify the peer using concatenated CA certificate data + in PEM (str) or DER (bytes) format. + :param cert_file: the path to a client certificate file, for mTLS. + :param key_file: the path to a client key file, for mTLS. + :param assert_hostname: Set this to True/False to enable/disable SSL hostname verification. + :param tls_server_name: SSL/TLS Server Name Indication (SNI). Set this to the SNI value expected by the server. + :param connection_pool_maxsize: Connection pool max size. None in the constructor is coerced to 100 for async and cpu_count * 5 for sync. + :param proxy: Proxy URL. + :param no_proxy: Comma-separated hosts that bypass the proxy. + :param proxy_headers: Proxy headers. + :param safe_chars_for_path_param: Safe characters for path parameter encoding. + :param client_side_validation: Enable client-side validation. Default True. + :param socket_options: Options to pass down to the underlying urllib3 socket. + :param datetime_format: Datetime format string for serialization. + :param date_format: Date format string for serialization. + + :Example: + """ + + _default: ClassVar[Optional[Self]] = None + + def __init__( + self, + host: Optional[str]=None, + api_key: Optional[Dict[str, str]]=None, + api_key_prefix: Optional[Dict[str, str]]=None, + username: Optional[str]=None, + password: Optional[str]=None, + access_token: Optional[str]=None, + server_index: Optional[int]=None, + server_variables: Optional[ServerVariablesT]=None, + server_operation_index: Optional[Dict[int, int]]=None, + server_operation_variables: Optional[Dict[int, ServerVariablesT]]=None, + ignore_operation_servers: bool=False, + ssl_ca_cert: Optional[str]=None, + retries: Optional[Union[int, urllib3.util.retry.Retry]] = None, + ca_cert_data: Optional[Union[str, bytes]] = None, + cert_file: Optional[str]=None, + key_file: Optional[str]=None, + verify_ssl: bool=True, + assert_hostname: Optional[bool]=None, + tls_server_name: Optional[str]=None, + connection_pool_maxsize: Optional[int]=None, + proxy: Optional[str]=None, + no_proxy: Optional[str]=None, + proxy_headers: Optional[Any]=None, + safe_chars_for_path_param: str='', + client_side_validation: bool=True, + socket_options: Optional[Any]=None, + datetime_format: str="%Y-%m-%dT%H:%M:%S.%f%z", + date_format: str="%Y-%m-%d", + *, + debug: Optional[bool] = None, + ) -> None: + """Constructor + """ + self._base_path = "https://api.agentdrive.run" if host is None else host + """Default Base url + """ + self.server_index = 0 if server_index is None and host is None else server_index + self.server_operation_index = server_operation_index or {} + """Default server index + """ + self.server_variables = server_variables or {} + self.server_operation_variables = server_operation_variables or {} + """Default server variables + """ + self.ignore_operation_servers = ignore_operation_servers + """Ignore operation servers + """ + self.temp_folder_path = None + """Temp file folder for downloading files + """ + # Authentication Settings + self.api_key = {} + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ + self.api_key_prefix = {} + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.access_token = access_token + """Access token + """ + self.logger = {} + """Logging Settings + """ + self.logger["package_logger"] = logging.getLogger("agentdrive_sdk.generated.sync") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + """Log format + """ + self.logger_stream_handler = None + """Log stream handler + """ + self.logger_file_handler: Optional[FileHandler] = None + """Log file handler + """ + self.logger_file = None + """Debug file location + """ + if debug is not None: + self.debug = debug + else: + self.__debug = False + """Debug switch + """ + + self.verify_ssl = verify_ssl + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ + self.ssl_ca_cert = ssl_ca_cert + """Set this to customize the certificate file to verify the peer. + """ + self.ca_cert_data = ca_cert_data + """Set this to verify the peer using PEM (str) or DER (bytes) + certificate data. + """ + self.cert_file = cert_file + """client certificate file + """ + self.key_file = key_file + """client key file + """ + self.assert_hostname = assert_hostname + """Set this to True/False to enable/disable SSL hostname verification. + """ + self.tls_server_name = tls_server_name + """SSL/TLS Server Name Indication (SNI) + Set this to the SNI value expected by the server. + """ + + self.connection_pool_maxsize = connection_pool_maxsize if connection_pool_maxsize is not None else multiprocessing.cpu_count() * 5 + """urllib3 connection pool's maximum number of connections saved + per pool. None in the constructor is coerced to cpu_count * 5. + """ + + # urllib3 does not read proxy environment variables itself: + # https://github.com/urllib3/urllib3/issues/1785 + if proxy is None or no_proxy is None: + proxies = getproxies() + if proxy is None: + scheme = urlparse(self.host).scheme + proxy = proxies.get(scheme) or proxies.get("all") + if no_proxy is None: + no_proxy = proxies.get("no") + self.proxy = proxy + """Proxy URL + """ + self.no_proxy = no_proxy + """Hosts that bypass the proxy + """ + self.proxy_headers = proxy_headers + """Proxy headers + """ + self.safe_chars_for_path_param = safe_chars_for_path_param + """Safe chars for path_param + """ + self.retries = retries + """Retry configuration + """ + # Enable client side validation + self.client_side_validation = client_side_validation + + self.socket_options = socket_options + """Options to pass down to the underlying urllib3 socket + """ + + self.datetime_format = datetime_format + """datetime format + """ + + self.date_format = date_format + """date format + """ + + def __deepcopy__(self, memo: Dict[int, Any]) -> Self: + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setter to re-create the file handler (excluded from __dict__ copy) + result.logger_file = self.logger_file + + return result + + def __setattr__(self, name: str, value: Any) -> None: + object.__setattr__(self, name, value) + + @classmethod + def set_default(cls, default: Optional[Self]) -> None: + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = default + + @classmethod + def get_default_copy(cls) -> Self: + """Deprecated. Please use `get_default` instead. + + Deprecated. Please use `get_default` instead. + + :return: The configuration object. + """ + return cls.get_default() + + @classmethod + def get_default(cls) -> Self: + """Return the default configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration. + + :return: The configuration object. + """ + if cls._default is None: + cls._default = cls() + return cls._default + + @property + def logger_file(self) -> Optional[str]: + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value: Optional[str]) -> None: + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in self.logger.items(): + logger.addHandler(self.logger_file_handler) + + @property + def debug(self) -> bool: + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value: bool) -> None: + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in self.logger.items(): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in self.logger.items(): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self) -> str: + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value: str) -> None: + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier: str, alias: Optional[str]=None) -> Optional[str]: + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :param alias: The alternative identifier of apiKey. + :return: The token for api key authentication. + """ + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) + if key: + prefix = self.api_key_prefix.get( + identifier, self.api_key_prefix.get(alias) if alias is not None else None) + if prefix: + return "%s %s" % (prefix, key) + else: + return key + + return None + + def get_basic_auth_token(self) -> Optional[str]: + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password + + return urllib3.util.make_headers( + basic_auth=username + ':' + password + ).get('authorization') + + def auth_settings(self)-> AuthSettings: + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + auth: AuthSettings = {} + if self.access_token is not None: + auth['bearerAuth'] = { + 'type': 'bearer', + 'in': 'header', + 'format': 'JWT', + 'key': 'Authorization', + 'value': 'Bearer ' + self.access_token + } + return auth + + def to_debug_report(self) -> str: + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: <PINNED>\n"\ + "SDK Package Version: 0.1.0".\ + format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self) -> List[HostSetting]: + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "https://api.agentdrive.run", + 'description': "AgentDrive public API", + } + ] + + def get_host_from_settings( + self, + index: Optional[int], + variables: Optional[ServerVariablesT]=None, + servers: Optional[List[HostSetting]]=None, + ) -> str: + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :param servers: an array of host settings or None + :return: URL based on host settings + """ + if index is None: + return self._base_path + + variables = {} if variables is None else variables + servers = self.get_host_settings() if servers is None else servers + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server.get('variables', {}).items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and variable['enum_values'] \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url + + @property + def host(self) -> str: + """Return generated host.""" + return self.get_host_from_settings(self.server_index, variables=self.server_variables) + + @host.setter + def host(self, value: str) -> None: + """Fix base path.""" + self._base_path = value + self.server_index = None diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/exceptions.py b/sdk/python/src/agentdrive_sdk/generated/sync/exceptions.py new file mode 100644 index 0000000..d88fe7d --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/exceptions.py @@ -0,0 +1,218 @@ +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from typing import Any, Optional +from typing_extensions import Self + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None) -> None: + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiAttributeError(OpenApiException, AttributeError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Raised when an attribute reference or assignment fails. + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiAttributeError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None) -> None: + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + def __init__( + self, + status=None, + reason=None, + http_resp=None, + *, + body: Optional[str] = None, + data: Optional[Any] = None, + ) -> None: + self.status = status + self.reason = reason + self.body = body + self.data = data + self.headers = None + + if http_resp: + if self.status is None: + self.status = http_resp.status + if self.reason is None: + self.reason = http_resp.reason + if self.body is None: + try: + self.body = http_resp.data.decode('utf-8') + except Exception: + pass + self.headers = http_resp.headers + + @classmethod + def from_response( + cls, + *, + http_resp, + body: Optional[str], + data: Optional[Any], + ) -> Self: + if http_resp.status == 400: + raise BadRequestException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 401: + raise UnauthorizedException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 403: + raise ForbiddenException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 404: + raise NotFoundException(http_resp=http_resp, body=body, data=data) + + # Added new conditions for 409 and 422 + if http_resp.status == 409: + raise ConflictException(http_resp=http_resp, body=body, data=data) + + if http_resp.status == 422: + raise UnprocessableEntityException(http_resp=http_resp, body=body, data=data) + + if 500 <= http_resp.status <= 599: + raise ServiceException(http_resp=http_resp, body=body, data=data) + raise ApiException(http_resp=http_resp, body=body, data=data) + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + if self.data: + error_message += "HTTP response data: {0}\n".format(self.data) + + return error_message + + +class BadRequestException(ApiException): + pass + + +class NotFoundException(ApiException): + pass + + +class UnauthorizedException(ApiException): + pass + + +class ForbiddenException(ApiException): + pass + + +class ServiceException(ApiException): + pass + + +class ConflictException(ApiException): + """Exception for HTTP 409 Conflict.""" + pass + + +class UnprocessableEntityException(ApiException): + """Exception for HTTP 422 Unprocessable Entity.""" + pass + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, int): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/__init__.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/__init__.py new file mode 100644 index 0000000..5b47f39 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/__init__.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +# flake8: noqa +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +# import models into model package +from agentdrive_sdk.generated.sync.models.artifact_copy_in import ArtifactCopyIn +from agentdrive_sdk.generated.sync.models.artifact_list_out import ArtifactListOut +from agentdrive_sdk.generated.sync.models.artifact_out import ArtifactOut +from agentdrive_sdk.generated.sync.models.artifact_update_in import ArtifactUpdateIn +from agentdrive_sdk.generated.sync.models.change_actor_out import ChangeActorOut +from agentdrive_sdk.generated.sync.models.change_out import ChangeOut +from agentdrive_sdk.generated.sync.models.change_page_out import ChangePageOut +from agentdrive_sdk.generated.sync.models.change_resource_out import ChangeResourceOut +from agentdrive_sdk.generated.sync.models.drive_create_in import DriveCreateIn +from agentdrive_sdk.generated.sync.models.drive_list_out import DriveListOut +from agentdrive_sdk.generated.sync.models.drive_out import DriveOut +from agentdrive_sdk.generated.sync.models.drive_update_in import DriveUpdateIn +from agentdrive_sdk.generated.sync.models.drive_usage_out import DriveUsageOut +from agentdrive_sdk.generated.sync.models.drives_create400_response import DrivesCreate400Response +from agentdrive_sdk.generated.sync.models.drives_create400_response_error import DrivesCreate400ResponseError +from agentdrive_sdk.generated.sync.models.drives_list400_response import DrivesList400Response +from agentdrive_sdk.generated.sync.models.drives_list400_response_error import DrivesList400ResponseError +from agentdrive_sdk.generated.sync.models.error_response import ErrorResponse +from agentdrive_sdk.generated.sync.models.folder_cascade_out import FolderCascadeOut +from agentdrive_sdk.generated.sync.models.folder_copy_in import FolderCopyIn +from agentdrive_sdk.generated.sync.models.folder_create_in import FolderCreateIn +from agentdrive_sdk.generated.sync.models.folder_list_out import FolderListOut +from agentdrive_sdk.generated.sync.models.folder_out import FolderOut +from agentdrive_sdk.generated.sync.models.folder_update_in import FolderUpdateIn +from agentdrive_sdk.generated.sync.models.grant_create_in import GrantCreateIn +from agentdrive_sdk.generated.sync.models.grant_list_out import GrantListOut +from agentdrive_sdk.generated.sync.models.grant_out import GrantOut +from agentdrive_sdk.generated.sync.models.grant_update_in import GrantUpdateIn +from agentdrive_sdk.generated.sync.models.health_degraded_detail import HealthDegradedDetail +from agentdrive_sdk.generated.sync.models.health_degraded_response import HealthDegradedResponse +from agentdrive_sdk.generated.sync.models.health_out import HealthOut +from agentdrive_sdk.generated.sync.models.search_hit_out import SearchHitOut +from agentdrive_sdk.generated.sync.models.search_page_out import SearchPageOut +from agentdrive_sdk.generated.sync.models.share_create_in import ShareCreateIn +from agentdrive_sdk.generated.sync.models.share_create_out import ShareCreateOut +from agentdrive_sdk.generated.sync.models.share_list_out import ShareListOut +from agentdrive_sdk.generated.sync.models.share_out import ShareOut +from agentdrive_sdk.generated.sync.models.v0_error_envelope import V0ErrorEnvelope +from agentdrive_sdk.generated.sync.models.validation_error_response import ValidationErrorResponse +from agentdrive_sdk.generated.sync.models.validation_error_response_error import ValidationErrorResponseError +from agentdrive_sdk.generated.sync.models.validation_error_response_error_details import ValidationErrorResponseErrorDetails +from agentdrive_sdk.generated.sync.models.validation_error_response_error_details_fields_inner import ValidationErrorResponseErrorDetailsFieldsInner +from agentdrive_sdk.generated.sync.models.version_created_out import VersionCreatedOut +from agentdrive_sdk.generated.sync.models.version_list_out import VersionListOut +from agentdrive_sdk.generated.sync.models.version_out import VersionOut diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/artifact_copy_in.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/artifact_copy_in.py new file mode 100644 index 0000000..7b97c54 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/artifact_copy_in.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ArtifactCopyIn(BaseModel): + """ + POST /v0/drives/{id}/artifacts/{artifact_id}/copy body. ``destination_drive_id`` must equal the source drive (or be absent) — cross-drive copy is out of v0 scope and rejected. + """ # noqa: E501 + destination_drive_id: Optional[Annotated[str, Field(strict=True)]] = None + destination_name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] + destination_parent_id: Annotated[str, Field(strict=True)] + version_id: Optional[Annotated[str, Field(strict=True)]] = None + __properties: ClassVar[List[str]] = ["destination_drive_id", "destination_name", "destination_parent_id", "version_id"] + + @field_validator('destination_drive_id', mode="before") + def destination_drive_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if isinstance(value, str) and not re.match(r"^drv_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^drv_[a-f0-9]{16}$/") + return value + + @field_validator('destination_parent_id', mode="before") + def destination_parent_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^fld_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^fld_[a-f0-9]{16}$/") + return value + + @field_validator('version_id', mode="before") + def version_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if isinstance(value, str) and not re.match(r"^ver_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^ver_[a-f0-9]{16}$/") + return value + + model_config = ConfigDict( + extra="forbid", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ArtifactCopyIn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the request body using wire aliases.""" + return to_jsonable_python( + self.model_dump( + by_alias=True, + exclude_unset=True, + exclude={"additional_properties"}, + ) + ) + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Validate a request dictionary without discarding unknown fields.""" + if obj is None: + return None + return cls.model_validate(obj) diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/artifact_list_out.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/artifact_list_out.py new file mode 100644 index 0000000..ebfd6cc --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/artifact_list_out.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from agentdrive_sdk.generated.sync.models.artifact_out import ArtifactOut +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ArtifactListOut(BaseModel): + """ + ArtifactListOut + """ # noqa: E501 + items: List[ArtifactOut] + next_cursor: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["items", "next_cursor"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ArtifactListOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item_items in self.items: + if _item_items: + _items.append(_item_items.to_dict()) + _dict['items'] = _items + # set to None if next_cursor (nullable) is None + # and model_fields_set contains the field + if self.next_cursor is None and "next_cursor" in self.model_fields_set: + _dict['next_cursor'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ArtifactListOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "items": [ArtifactOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, + "next_cursor": obj.get("next_cursor") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/artifact_out.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/artifact_out.py new file mode 100644 index 0000000..20e13fe --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/artifact_out.py @@ -0,0 +1,167 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ArtifactOut(BaseModel): + """ + ArtifactOut + """ # noqa: E501 + content_preview: Optional[StrictStr] + content_type: Optional[StrictStr] + created_at: datetime + deleted_at: Optional[datetime] + drive_id: Annotated[str, Field(strict=True)] + effective_visibility: StrictStr = Field(description="Server-computed exposure summary, resolved over the artifact's live grants, its folder ancestry (bounded by the nearest sealed folder), and the drive. 'public' when any live grant has principal_type 'public'; otherwise 'shared' when a live grant names a principal other than the drive's creator; otherwise 'private'. Describes exposure, NOT the caller's own access.") + head_version_id: Optional[StrictStr] + id: Annotated[str, Field(strict=True)] + labels: List[StrictStr] + metadata: Dict[str, Any] + name: StrictStr + parent_id: Annotated[str, Field(strict=True)] + revision: Annotated[str, Field(strict=True)] + state: StrictStr + updated_at: datetime + __properties: ClassVar[List[str]] = ["content_preview", "content_type", "created_at", "deleted_at", "drive_id", "effective_visibility", "head_version_id", "id", "labels", "metadata", "name", "parent_id", "revision", "state", "updated_at"] + + @field_validator('drive_id', mode="before") + def drive_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^drv_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^drv_[a-f0-9]{16}$/") + return value + + + @field_validator('id', mode="before") + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^art_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^art_[a-f0-9]{16}$/") + return value + + @field_validator('parent_id', mode="before") + def parent_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^fld_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^fld_[a-f0-9]{16}$/") + return value + + @field_validator('revision', mode="before") + def revision_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^rev_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^rev_[a-f0-9]{16}$/") + return value + + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ArtifactOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if content_preview (nullable) is None + # and model_fields_set contains the field + if self.content_preview is None and "content_preview" in self.model_fields_set: + _dict['content_preview'] = None + + # set to None if content_type (nullable) is None + # and model_fields_set contains the field + if self.content_type is None and "content_type" in self.model_fields_set: + _dict['content_type'] = None + + # set to None if deleted_at (nullable) is None + # and model_fields_set contains the field + if self.deleted_at is None and "deleted_at" in self.model_fields_set: + _dict['deleted_at'] = None + + # set to None if head_version_id (nullable) is None + # and model_fields_set contains the field + if self.head_version_id is None and "head_version_id" in self.model_fields_set: + _dict['head_version_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ArtifactOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "content_preview": obj.get("content_preview"), + "content_type": obj.get("content_type"), + "created_at": obj.get("created_at"), + "deleted_at": obj.get("deleted_at"), + "drive_id": obj.get("drive_id"), + "effective_visibility": obj.get("effective_visibility"), + "head_version_id": obj.get("head_version_id"), + "id": obj.get("id"), + "labels": obj.get("labels"), + "metadata": obj.get("metadata"), + "name": obj.get("name"), + "parent_id": obj.get("parent_id"), + "revision": obj.get("revision"), + "state": obj.get("state"), + "updated_at": obj.get("updated_at") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/artifact_update_in.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/artifact_update_in.py new file mode 100644 index 0000000..b2a2e70 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/artifact_update_in.py @@ -0,0 +1,84 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ArtifactUpdateIn(BaseModel): + """ + PATCH /v0/drives/{id}/artifacts/{artifact_id} body — at least one field is required. + """ # noqa: E501 + labels: Optional[List[StrictStr]] = None + metadata: Optional[Dict[str, Any]] = None + name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = None + parent_id: Optional[Annotated[str, Field(strict=True)]] = None + __properties: ClassVar[List[str]] = ["labels", "metadata", "name", "parent_id"] + + @field_validator('parent_id', mode="before") + def parent_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if isinstance(value, str) and not re.match(r"^fld_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^fld_[a-f0-9]{16}$/") + return value + + model_config = ConfigDict( + extra="forbid", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ArtifactUpdateIn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the request body using wire aliases.""" + return to_jsonable_python( + self.model_dump( + by_alias=True, + exclude_unset=True, + exclude={"additional_properties"}, + ) + ) + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Validate a request dictionary without discarding unknown fields.""" + if obj is None: + return None + return cls.model_validate(obj) diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/change_actor_out.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/change_actor_out.py new file mode 100644 index 0000000..2c31c7e --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/change_actor_out.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ChangeActorOut(BaseModel): + """ + ChangeActorOut + """ # noqa: E501 + id: Optional[StrictStr] + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ChangeActorOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if id (nullable) is None + # and model_fields_set contains the field + if self.id is None and "id" in self.model_fields_set: + _dict['id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChangeActorOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/change_out.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/change_out.py new file mode 100644 index 0000000..49151d6 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/change_out.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from agentdrive_sdk.generated.sync.models.change_actor_out import ChangeActorOut +from agentdrive_sdk.generated.sync.models.change_resource_out import ChangeResourceOut +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ChangeOut(BaseModel): + """ + ChangeOut + """ # noqa: E501 + actor: ChangeActorOut + change_set_id: StrictStr + data: Dict[str, Any] + drive_id: Annotated[str, Field(strict=True)] + id: Annotated[str, Field(strict=True)] + occurred_at: datetime + previous_revision: Optional[StrictStr] + resource: ChangeResourceOut + revision: Optional[StrictStr] + type: StrictStr + __properties: ClassVar[List[str]] = ["actor", "change_set_id", "data", "drive_id", "id", "occurred_at", "previous_revision", "resource", "revision", "type"] + + @field_validator('drive_id', mode="before") + def drive_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^drv_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^drv_[a-f0-9]{16}$/") + return value + + @field_validator('id', mode="before") + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^chg_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^chg_[a-f0-9]{16}$/") + return value + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ChangeOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of actor + if self.actor: + _dict['actor'] = self.actor.to_dict() + # override the default output from pydantic by calling `to_dict()` of resource + if self.resource: + _dict['resource'] = self.resource.to_dict() + # set to None if previous_revision (nullable) is None + # and model_fields_set contains the field + if self.previous_revision is None and "previous_revision" in self.model_fields_set: + _dict['previous_revision'] = None + + # set to None if revision (nullable) is None + # and model_fields_set contains the field + if self.revision is None and "revision" in self.model_fields_set: + _dict['revision'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChangeOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "actor": ChangeActorOut.from_dict(obj["actor"]) if obj.get("actor") is not None else None, + "change_set_id": obj.get("change_set_id"), + "data": obj.get("data"), + "drive_id": obj.get("drive_id"), + "id": obj.get("id"), + "occurred_at": obj.get("occurred_at"), + "previous_revision": obj.get("previous_revision"), + "resource": ChangeResourceOut.from_dict(obj["resource"]) if obj.get("resource") is not None else None, + "revision": obj.get("revision"), + "type": obj.get("type") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/change_page_out.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/change_page_out.py new file mode 100644 index 0000000..23834e4 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/change_page_out.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List +from agentdrive_sdk.generated.sync.models.change_out import ChangeOut +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ChangePageOut(BaseModel): + """ + ChangePageOut + """ # noqa: E501 + has_more: StrictBool + items: List[ChangeOut] + next_cursor: StrictStr + __properties: ClassVar[List[str]] = ["has_more", "items", "next_cursor"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ChangePageOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item_items in self.items: + if _item_items: + _items.append(_item_items.to_dict()) + _dict['items'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChangePageOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "has_more": obj.get("has_more"), + "items": [ChangeOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, + "next_cursor": obj.get("next_cursor") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/change_resource_out.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/change_resource_out.py new file mode 100644 index 0000000..0d9ef7b --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/change_resource_out.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ChangeResourceOut(BaseModel): + """ + ChangeResourceOut + """ # noqa: E501 + id: StrictStr + type: StrictStr + __properties: ClassVar[List[str]] = ["id", "type"] + + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ChangeResourceOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChangeResourceOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/drive_create_in.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/drive_create_in.py new file mode 100644 index 0000000..61ffdaf --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/drive_create_in.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DriveCreateIn(BaseModel): + """ + POST /v0/drives body. + """ # noqa: E501 + metadata: Dict[str, Any] = None + name: Annotated[str, Field(min_length=1, strict=True)] + __properties: ClassVar[List[str]] = ["metadata", "name"] + + model_config = ConfigDict( + extra="forbid", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DriveCreateIn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the request body using wire aliases.""" + return to_jsonable_python( + self.model_dump( + by_alias=True, + exclude_unset=True, + exclude={"additional_properties"}, + ) + ) + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Validate a request dictionary without discarding unknown fields.""" + if obj is None: + return None + return cls.model_validate(obj) diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/drive_list_out.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/drive_list_out.py new file mode 100644 index 0000000..47daa6a --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/drive_list_out.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from agentdrive_sdk.generated.sync.models.drive_out import DriveOut +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DriveListOut(BaseModel): + """ + DriveListOut + """ # noqa: E501 + items: List[DriveOut] + next_cursor: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["items", "next_cursor"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DriveListOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item_items in self.items: + if _item_items: + _items.append(_item_items.to_dict()) + _dict['items'] = _items + # set to None if next_cursor (nullable) is None + # and model_fields_set contains the field + if self.next_cursor is None and "next_cursor" in self.model_fields_set: + _dict['next_cursor'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DriveListOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "items": [DriveOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, + "next_cursor": obj.get("next_cursor") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/drive_out.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/drive_out.py new file mode 100644 index 0000000..f4bbdc9 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/drive_out.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DriveOut(BaseModel): + """ + DriveOut + """ # noqa: E501 + created_at: datetime + created_by: Optional[StrictStr] + deleted_at: Optional[datetime] + id: Annotated[str, Field(strict=True)] + metadata: Dict[str, Any] + name: StrictStr + retrieval_bytes: StrictInt + revision: Annotated[str, Field(strict=True)] + root_folder_id: StrictStr + state: StrictStr + storage_bytes: StrictInt + updated_at: datetime + workspace_id: StrictStr + __properties: ClassVar[List[str]] = ["created_at", "created_by", "deleted_at", "id", "metadata", "name", "retrieval_bytes", "revision", "root_folder_id", "state", "storage_bytes", "updated_at", "workspace_id"] + + @field_validator('id', mode="before") + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^drv_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^drv_[a-f0-9]{16}$/") + return value + + @field_validator('revision', mode="before") + def revision_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^rev_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^rev_[a-f0-9]{16}$/") + return value + + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DriveOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if created_by (nullable) is None + # and model_fields_set contains the field + if self.created_by is None and "created_by" in self.model_fields_set: + _dict['created_by'] = None + + # set to None if deleted_at (nullable) is None + # and model_fields_set contains the field + if self.deleted_at is None and "deleted_at" in self.model_fields_set: + _dict['deleted_at'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DriveOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "created_at": obj.get("created_at"), + "created_by": obj.get("created_by"), + "deleted_at": obj.get("deleted_at"), + "id": obj.get("id"), + "metadata": obj.get("metadata"), + "name": obj.get("name"), + "retrieval_bytes": obj.get("retrieval_bytes"), + "revision": obj.get("revision"), + "root_folder_id": obj.get("root_folder_id"), + "state": obj.get("state"), + "storage_bytes": obj.get("storage_bytes"), + "updated_at": obj.get("updated_at"), + "workspace_id": obj.get("workspace_id") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/drive_update_in.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/drive_update_in.py new file mode 100644 index 0000000..a24c3ee --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/drive_update_in.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DriveUpdateIn(BaseModel): + """ + PATCH /v0/drives/{id} body — at least one field is required. + """ # noqa: E501 + metadata: Optional[Dict[str, Any]] = None + name: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None + __properties: ClassVar[List[str]] = ["metadata", "name"] + + model_config = ConfigDict( + extra="forbid", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DriveUpdateIn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the request body using wire aliases.""" + return to_jsonable_python( + self.model_dump( + by_alias=True, + exclude_unset=True, + exclude={"additional_properties"}, + ) + ) + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Validate a request dictionary without discarding unknown fields.""" + if obj is None: + return None + return cls.model_validate(obj) diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/drive_usage_out.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/drive_usage_out.py new file mode 100644 index 0000000..609308c --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/drive_usage_out.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DriveUsageOut(BaseModel): + """ + DriveUsageOut + """ # noqa: E501 + retrieval_bytes: StrictInt + storage_bytes: StrictInt + __properties: ClassVar[List[str]] = ["retrieval_bytes", "storage_bytes"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DriveUsageOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DriveUsageOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "retrieval_bytes": obj.get("retrieval_bytes"), + "storage_bytes": obj.get("storage_bytes") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/drives_create400_response.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/drives_create400_response.py new file mode 100644 index 0000000..e0f7ff5 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/drives_create400_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from agentdrive_sdk.generated.sync.models.drives_create400_response_error import DrivesCreate400ResponseError +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DrivesCreate400Response(BaseModel): + """ + DrivesCreate400Response + """ # noqa: E501 + error: DrivesCreate400ResponseError + __properties: ClassVar[List[str]] = ["error"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DrivesCreate400Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DrivesCreate400Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": DrivesCreate400ResponseError.from_dict(obj["error"]) if obj.get("error") is not None else None + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/drives_create400_response_error.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/drives_create400_response_error.py new file mode 100644 index 0000000..89d3725 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/drives_create400_response_error.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DrivesCreate400ResponseError(BaseModel): + """ + DrivesCreate400ResponseError + """ # noqa: E501 + code: StrictStr = Field(description="Stable machine-readable error code (see the error-catalog).") + details: Optional[Dict[str, Any]] = Field(default=None, description="Error-code-specific context (optional).") + message: StrictStr + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "details", "message"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DrivesCreate400ResponseError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DrivesCreate400ResponseError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "details": obj.get("details"), + "message": obj.get("message") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/drives_list400_response.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/drives_list400_response.py new file mode 100644 index 0000000..3557dc1 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/drives_list400_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from agentdrive_sdk.generated.sync.models.drives_list400_response_error import DrivesList400ResponseError +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DrivesList400Response(BaseModel): + """ + DrivesList400Response + """ # noqa: E501 + error: DrivesList400ResponseError + __properties: ClassVar[List[str]] = ["error"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DrivesList400Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DrivesList400Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": DrivesList400ResponseError.from_dict(obj["error"]) if obj.get("error") is not None else None + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/drives_list400_response_error.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/drives_list400_response_error.py new file mode 100644 index 0000000..aafb245 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/drives_list400_response_error.py @@ -0,0 +1,109 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class DrivesList400ResponseError(BaseModel): + """ + DrivesList400ResponseError + """ # noqa: E501 + code: StrictStr = Field(description="Stable machine-readable error code (see the error-catalog).") + details: Optional[Dict[str, Any]] = Field(default=None, description="Error-code-specific context (optional).") + message: Optional[StrictStr] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "details", "message"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DrivesList400ResponseError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DrivesList400ResponseError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "details": obj.get("details"), + "message": obj.get("message") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/error_response.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/error_response.py new file mode 100644 index 0000000..cccdff1 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/error_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from agentdrive_sdk.generated.sync.models.drives_create400_response_error import DrivesCreate400ResponseError +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ErrorResponse(BaseModel): + """ + ErrorResponse + """ # noqa: E501 + error: DrivesCreate400ResponseError + __properties: ClassVar[List[str]] = ["error"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ErrorResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ErrorResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": DrivesCreate400ResponseError.from_dict(obj["error"]) if obj.get("error") is not None else None + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/folder_cascade_out.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/folder_cascade_out.py new file mode 100644 index 0000000..a29b166 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/folder_cascade_out.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from agentdrive_sdk.generated.sync.models.folder_out import FolderOut +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class FolderCascadeOut(BaseModel): + """ + FolderCascadeOut + """ # noqa: E501 + cascade: Dict[str, StrictInt] + folder: FolderOut + __properties: ClassVar[List[str]] = ["cascade", "folder"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FolderCascadeOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of folder + if self.folder: + _dict['folder'] = self.folder.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FolderCascadeOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "cascade": obj.get("cascade"), + "folder": FolderOut.from_dict(obj["folder"]) if obj.get("folder") is not None else None + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/folder_copy_in.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/folder_copy_in.py new file mode 100644 index 0000000..3245946 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/folder_copy_in.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class FolderCopyIn(BaseModel): + """ + POST /v0/drives/{id}/folders/{folder_id}/copy body. ``destination_drive_id`` must equal the source drive (or be absent) — cross-drive copy is out of v0 scope and rejected. + """ # noqa: E501 + destination_drive_id: Optional[Annotated[str, Field(strict=True)]] = None + destination_name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] + destination_parent_id: Annotated[str, Field(strict=True)] + __properties: ClassVar[List[str]] = ["destination_drive_id", "destination_name", "destination_parent_id"] + + @field_validator('destination_drive_id', mode="before") + def destination_drive_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if isinstance(value, str) and not re.match(r"^drv_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^drv_[a-f0-9]{16}$/") + return value + + @field_validator('destination_parent_id', mode="before") + def destination_parent_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^fld_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^fld_[a-f0-9]{16}$/") + return value + + model_config = ConfigDict( + extra="forbid", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FolderCopyIn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the request body using wire aliases.""" + return to_jsonable_python( + self.model_dump( + by_alias=True, + exclude_unset=True, + exclude={"additional_properties"}, + ) + ) + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Validate a request dictionary without discarding unknown fields.""" + if obj is None: + return None + return cls.model_validate(obj) diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/folder_create_in.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/folder_create_in.py new file mode 100644 index 0000000..05ec038 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/folder_create_in.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class FolderCreateIn(BaseModel): + """ + POST /v0/drives/{id}/folders body. + """ # noqa: E501 + grant_inheritance: StrictStr = 'inherit' + metadata: Dict[str, Any] = None + name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] + parent_id: Annotated[str, Field(strict=True)] + __properties: ClassVar[List[str]] = ["grant_inheritance", "metadata", "name", "parent_id"] + + @field_validator('grant_inheritance') + def grant_inheritance_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['inherit', 'sealed']): + raise ValueError("must be one of enum values ('inherit', 'sealed')") + return value + + @field_validator('parent_id', mode="before") + def parent_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^fld_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^fld_[a-f0-9]{16}$/") + return value + + model_config = ConfigDict( + extra="forbid", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FolderCreateIn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the request body using wire aliases.""" + return to_jsonable_python( + self.model_dump( + by_alias=True, + exclude_unset=True, + exclude={"additional_properties"}, + ) + ) + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Validate a request dictionary without discarding unknown fields.""" + if obj is None: + return None + return cls.model_validate(obj) diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/folder_list_out.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/folder_list_out.py new file mode 100644 index 0000000..1b62672 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/folder_list_out.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from agentdrive_sdk.generated.sync.models.folder_out import FolderOut +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class FolderListOut(BaseModel): + """ + FolderListOut + """ # noqa: E501 + items: List[FolderOut] + next_cursor: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["items", "next_cursor"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FolderListOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item_items in self.items: + if _item_items: + _items.append(_item_items.to_dict()) + _dict['items'] = _items + # set to None if next_cursor (nullable) is None + # and model_fields_set contains the field + if self.next_cursor is None and "next_cursor" in self.model_fields_set: + _dict['next_cursor'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FolderListOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "items": [FolderOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, + "next_cursor": obj.get("next_cursor") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/folder_out.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/folder_out.py new file mode 100644 index 0000000..ac4c7e1 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/folder_out.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class FolderOut(BaseModel): + """ + FolderOut + """ # noqa: E501 + created_at: datetime + deleted_at: Optional[datetime] + drive_id: Annotated[str, Field(strict=True)] + grant_inheritance: StrictStr + id: Annotated[str, Field(strict=True)] + metadata: Dict[str, Any] + name: Optional[StrictStr] + parent_id: Optional[StrictStr] + revision: Annotated[str, Field(strict=True)] + state: StrictStr + updated_at: datetime + __properties: ClassVar[List[str]] = ["created_at", "deleted_at", "drive_id", "grant_inheritance", "id", "metadata", "name", "parent_id", "revision", "state", "updated_at"] + + @field_validator('drive_id', mode="before") + def drive_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^drv_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^drv_[a-f0-9]{16}$/") + return value + + + @field_validator('id', mode="before") + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^fld_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^fld_[a-f0-9]{16}$/") + return value + + @field_validator('revision', mode="before") + def revision_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^rev_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^rev_[a-f0-9]{16}$/") + return value + + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FolderOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if deleted_at (nullable) is None + # and model_fields_set contains the field + if self.deleted_at is None and "deleted_at" in self.model_fields_set: + _dict['deleted_at'] = None + + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if parent_id (nullable) is None + # and model_fields_set contains the field + if self.parent_id is None and "parent_id" in self.model_fields_set: + _dict['parent_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FolderOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "created_at": obj.get("created_at"), + "deleted_at": obj.get("deleted_at"), + "drive_id": obj.get("drive_id"), + "grant_inheritance": obj.get("grant_inheritance"), + "id": obj.get("id"), + "metadata": obj.get("metadata"), + "name": obj.get("name"), + "parent_id": obj.get("parent_id"), + "revision": obj.get("revision"), + "state": obj.get("state"), + "updated_at": obj.get("updated_at") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/folder_update_in.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/folder_update_in.py new file mode 100644 index 0000000..e363c36 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/folder_update_in.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class FolderUpdateIn(BaseModel): + """ + PATCH /v0/drives/{id}/folders/{folder_id} body — at least one field is required. + """ # noqa: E501 + grant_inheritance: Optional[StrictStr] = None + metadata: Optional[Dict[str, Any]] = None + name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=255)]] = None + parent_id: Optional[Annotated[str, Field(strict=True)]] = None + __properties: ClassVar[List[str]] = ["grant_inheritance", "metadata", "name", "parent_id"] + + @field_validator('grant_inheritance') + def grant_inheritance_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['inherit', 'sealed']): + raise ValueError("must be one of enum values ('inherit', 'sealed')") + return value + + @field_validator('parent_id', mode="before") + def parent_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if value is None: + return value + + if isinstance(value, str) and not re.match(r"^fld_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^fld_[a-f0-9]{16}$/") + return value + + model_config = ConfigDict( + extra="forbid", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FolderUpdateIn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the request body using wire aliases.""" + return to_jsonable_python( + self.model_dump( + by_alias=True, + exclude_unset=True, + exclude={"additional_properties"}, + ) + ) + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Validate a request dictionary without discarding unknown fields.""" + if obj is None: + return None + return cls.model_validate(obj) diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/grant_create_in.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/grant_create_in.py new file mode 100644 index 0000000..e72fa68 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/grant_create_in.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class GrantCreateIn(BaseModel): + """ + POST /v0/drives/{id}/grants body. + """ # noqa: E501 + expires_at: Optional[datetime] = None + principal_id: Optional[StrictStr] = None + principal_type: StrictStr + resource_id: Annotated[str, Field(min_length=1, strict=True)] + resource_type: StrictStr + role: StrictStr + __properties: ClassVar[List[str]] = ["expires_at", "principal_id", "principal_type", "resource_id", "resource_type", "role"] + + @field_validator('principal_type') + def principal_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['agent', 'user', 'workspace', 'public']): + raise ValueError("must be one of enum values ('agent', 'user', 'workspace', 'public')") + return value + + @field_validator('resource_type') + def resource_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['drive', 'folder', 'artifact']): + raise ValueError("must be one of enum values ('drive', 'folder', 'artifact')") + return value + + @field_validator('role') + def role_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['viewer', 'editor', 'manager']): + raise ValueError("must be one of enum values ('viewer', 'editor', 'manager')") + return value + + model_config = ConfigDict( + extra="forbid", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GrantCreateIn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the request body using wire aliases.""" + return to_jsonable_python( + self.model_dump( + by_alias=True, + exclude_unset=True, + exclude={"additional_properties"}, + ) + ) + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Validate a request dictionary without discarding unknown fields.""" + if obj is None: + return None + return cls.model_validate(obj) diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/grant_list_out.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/grant_list_out.py new file mode 100644 index 0000000..654914c --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/grant_list_out.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from agentdrive_sdk.generated.sync.models.grant_out import GrantOut +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class GrantListOut(BaseModel): + """ + GrantListOut + """ # noqa: E501 + items: List[GrantOut] + next_cursor: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["items", "next_cursor"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GrantListOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item_items in self.items: + if _item_items: + _items.append(_item_items.to_dict()) + _dict['items'] = _items + # set to None if next_cursor (nullable) is None + # and model_fields_set contains the field + if self.next_cursor is None and "next_cursor" in self.model_fields_set: + _dict['next_cursor'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GrantListOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "items": [GrantOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, + "next_cursor": obj.get("next_cursor") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/grant_out.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/grant_out.py new file mode 100644 index 0000000..cc0512a --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/grant_out.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class GrantOut(BaseModel): + """ + GrantOut + """ # noqa: E501 + created_at: datetime + drive_id: Annotated[str, Field(strict=True)] + expires_at: Optional[datetime] + id: Annotated[str, Field(strict=True)] + principal_id: Optional[StrictStr] + principal_type: StrictStr + resource_id: StrictStr + resource_type: StrictStr + revision: Annotated[str, Field(strict=True)] + revoked_at: Optional[datetime] + role: StrictStr + state: StrictStr + __properties: ClassVar[List[str]] = ["created_at", "drive_id", "expires_at", "id", "principal_id", "principal_type", "resource_id", "resource_type", "revision", "revoked_at", "role", "state"] + + @field_validator('drive_id', mode="before") + def drive_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^drv_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^drv_[a-f0-9]{16}$/") + return value + + @field_validator('id', mode="before") + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^grn_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^grn_[a-f0-9]{16}$/") + return value + + + + @field_validator('revision', mode="before") + def revision_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^rev_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^rev_[a-f0-9]{16}$/") + return value + + + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GrantOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if expires_at (nullable) is None + # and model_fields_set contains the field + if self.expires_at is None and "expires_at" in self.model_fields_set: + _dict['expires_at'] = None + + # set to None if principal_id (nullable) is None + # and model_fields_set contains the field + if self.principal_id is None and "principal_id" in self.model_fields_set: + _dict['principal_id'] = None + + # set to None if revoked_at (nullable) is None + # and model_fields_set contains the field + if self.revoked_at is None and "revoked_at" in self.model_fields_set: + _dict['revoked_at'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of GrantOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "created_at": obj.get("created_at"), + "drive_id": obj.get("drive_id"), + "expires_at": obj.get("expires_at"), + "id": obj.get("id"), + "principal_id": obj.get("principal_id"), + "principal_type": obj.get("principal_type"), + "resource_id": obj.get("resource_id"), + "resource_type": obj.get("resource_type"), + "revision": obj.get("revision"), + "revoked_at": obj.get("revoked_at"), + "role": obj.get("role"), + "state": obj.get("state") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/grant_update_in.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/grant_update_in.py new file mode 100644 index 0000000..14e9f10 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/grant_update_in.py @@ -0,0 +1,82 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class GrantUpdateIn(BaseModel): + """ + PATCH /v0/drives/{id}/grants/{grant_id} body — at least one field is required. An explicit ``expires_at: null`` clears the expiry; omitting it leaves it unchanged. + """ # noqa: E501 + expires_at: Optional[datetime] = None + role: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["expires_at", "role"] + + @field_validator('role') + def role_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['viewer', 'editor', 'manager']): + raise ValueError("must be one of enum values ('viewer', 'editor', 'manager')") + return value + + model_config = ConfigDict( + extra="forbid", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of GrantUpdateIn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the request body using wire aliases.""" + return to_jsonable_python( + self.model_dump( + by_alias=True, + exclude_unset=True, + exclude={"additional_properties"}, + ) + ) + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Validate a request dictionary without discarding unknown fields.""" + if obj is None: + return None + return cls.model_validate(obj) diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/health_degraded_detail.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/health_degraded_detail.py new file mode 100644 index 0000000..ef0e5f7 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/health_degraded_detail.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class HealthDegradedDetail(BaseModel): + """ + HealthDegradedDetail + """ # noqa: E501 + error: StrictStr + status: StrictStr + __properties: ClassVar[List[str]] = ["error", "status"] + + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HealthDegradedDetail from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HealthDegradedDetail from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": obj.get("error"), + "status": obj.get("status") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/health_degraded_response.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/health_degraded_response.py new file mode 100644 index 0000000..0373f03 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/health_degraded_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from agentdrive_sdk.generated.sync.models.health_degraded_detail import HealthDegradedDetail +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class HealthDegradedResponse(BaseModel): + """ + Legacy health-probe failure shape. Health predates the `/v0` error envelope and is consumed by load balancers. PR 1 documents the wire shape without changing it; convergence on the canonical API envelope is a separately reviewed compatibility decision. + """ # noqa: E501 + detail: HealthDegradedDetail + __properties: ClassVar[List[str]] = ["detail"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HealthDegradedResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HealthDegradedResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "detail": HealthDegradedDetail.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/health_out.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/health_out.py new file mode 100644 index 0000000..4388369 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/health_out.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class HealthOut(BaseModel): + """ + HealthOut + """ # noqa: E501 + status: StrictStr + __properties: ClassVar[List[str]] = ["status"] + + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of HealthOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of HealthOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/search_hit_out.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/search_hit_out.py new file mode 100644 index 0000000..d577a27 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/search_hit_out.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class SearchHitOut(BaseModel): + """ + SearchHitOut + """ # noqa: E501 + content_type: Optional[StrictStr] + drive_id: Annotated[str, Field(strict=True)] + id: Annotated[str, Field(strict=True)] + name: StrictStr + parent_id: Optional[StrictStr] + rank: Union[StrictFloat, StrictInt] + snippet: StrictStr = Field(description="HTML-safe highlighted excerpt. The ONLY markup it may contain is the server's own ... highlight pair; artifact content is entity-escaped, so this may be rendered as HTML.") + updated_at: datetime + version_id: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["content_type", "drive_id", "id", "name", "parent_id", "rank", "snippet", "updated_at", "version_id"] + + @field_validator('drive_id', mode="before") + def drive_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^drv_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^drv_[a-f0-9]{16}$/") + return value + + @field_validator('id', mode="before") + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^art_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^art_[a-f0-9]{16}$/") + return value + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SearchHitOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if content_type (nullable) is None + # and model_fields_set contains the field + if self.content_type is None and "content_type" in self.model_fields_set: + _dict['content_type'] = None + + # set to None if parent_id (nullable) is None + # and model_fields_set contains the field + if self.parent_id is None and "parent_id" in self.model_fields_set: + _dict['parent_id'] = None + + # set to None if version_id (nullable) is None + # and model_fields_set contains the field + if self.version_id is None and "version_id" in self.model_fields_set: + _dict['version_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SearchHitOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "content_type": obj.get("content_type"), + "drive_id": obj.get("drive_id"), + "id": obj.get("id"), + "name": obj.get("name"), + "parent_id": obj.get("parent_id"), + "rank": obj.get("rank"), + "snippet": obj.get("snippet"), + "updated_at": obj.get("updated_at"), + "version_id": obj.get("version_id") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/search_page_out.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/search_page_out.py new file mode 100644 index 0000000..045508e --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/search_page_out.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from agentdrive_sdk.generated.sync.models.search_hit_out import SearchHitOut +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class SearchPageOut(BaseModel): + """ + SearchPageOut + """ # noqa: E501 + items: List[SearchHitOut] + next_cursor: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["items", "next_cursor"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SearchPageOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item_items in self.items: + if _item_items: + _items.append(_item_items.to_dict()) + _dict['items'] = _items + # set to None if next_cursor (nullable) is None + # and model_fields_set contains the field + if self.next_cursor is None and "next_cursor" in self.model_fields_set: + _dict['next_cursor'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SearchPageOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "items": [SearchHitOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, + "next_cursor": obj.get("next_cursor") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/share_create_in.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/share_create_in.py new file mode 100644 index 0000000..7ed4d71 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/share_create_in.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ShareCreateIn(BaseModel): + """ + POST /v0/drives/{id}/shares body. + """ # noqa: E501 + expires_at: Optional[datetime] = None + resource_id: Annotated[str, Field(min_length=1, strict=True)] + resource_type: StrictStr + __properties: ClassVar[List[str]] = ["expires_at", "resource_id", "resource_type"] + + @field_validator('resource_type') + def resource_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['artifact', 'artifact_version', 'folder']): + raise ValueError("must be one of enum values ('artifact', 'artifact_version', 'folder')") + return value + + model_config = ConfigDict( + extra="forbid", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ShareCreateIn from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the request body using wire aliases.""" + return to_jsonable_python( + self.model_dump( + by_alias=True, + exclude_unset=True, + exclude={"additional_properties"}, + ) + ) + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Validate a request dictionary without discarding unknown fields.""" + if obj is None: + return None + return cls.model_validate(obj) diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/share_create_out.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/share_create_out.py new file mode 100644 index 0000000..fc3d8c1 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/share_create_out.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ShareCreateOut(BaseModel): + """ + The create/rotate response — the ONLY response carrying the plaintext secret. + """ # noqa: E501 + created_at: datetime + created_by: Optional[StrictStr] + drive_id: Annotated[str, Field(strict=True)] + expires_at: Optional[datetime] + id: Annotated[str, Field(strict=True)] + resource_id: StrictStr + resource_type: StrictStr + revision: Annotated[str, Field(strict=True)] + revoked_at: Optional[datetime] + rotated_at: Optional[datetime] + secret: Optional[StrictStr] = Field(default=None, description="Plaintext share secret. Present only on first execution of a create or rotate; null on idempotent replay — rotate to obtain a new secret.") + state: StrictStr + __properties: ClassVar[List[str]] = ["created_at", "created_by", "drive_id", "expires_at", "id", "resource_id", "resource_type", "revision", "revoked_at", "rotated_at", "secret", "state"] + + @field_validator('drive_id', mode="before") + def drive_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^drv_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^drv_[a-f0-9]{16}$/") + return value + + @field_validator('id', mode="before") + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^shr_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^shr_[a-f0-9]{16}$/") + return value + + + @field_validator('revision', mode="before") + def revision_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^rev_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^rev_[a-f0-9]{16}$/") + return value + + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ShareCreateOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if created_by (nullable) is None + # and model_fields_set contains the field + if self.created_by is None and "created_by" in self.model_fields_set: + _dict['created_by'] = None + + # set to None if expires_at (nullable) is None + # and model_fields_set contains the field + if self.expires_at is None and "expires_at" in self.model_fields_set: + _dict['expires_at'] = None + + # set to None if revoked_at (nullable) is None + # and model_fields_set contains the field + if self.revoked_at is None and "revoked_at" in self.model_fields_set: + _dict['revoked_at'] = None + + # set to None if rotated_at (nullable) is None + # and model_fields_set contains the field + if self.rotated_at is None and "rotated_at" in self.model_fields_set: + _dict['rotated_at'] = None + + # set to None if secret (nullable) is None + # and model_fields_set contains the field + if self.secret is None and "secret" in self.model_fields_set: + _dict['secret'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ShareCreateOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "created_at": obj.get("created_at"), + "created_by": obj.get("created_by"), + "drive_id": obj.get("drive_id"), + "expires_at": obj.get("expires_at"), + "id": obj.get("id"), + "resource_id": obj.get("resource_id"), + "resource_type": obj.get("resource_type"), + "revision": obj.get("revision"), + "revoked_at": obj.get("revoked_at"), + "rotated_at": obj.get("rotated_at"), + "secret": obj.get("secret"), + "state": obj.get("state") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/share_list_out.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/share_list_out.py new file mode 100644 index 0000000..8aab0d0 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/share_list_out.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from agentdrive_sdk.generated.sync.models.share_out import ShareOut +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ShareListOut(BaseModel): + """ + ShareListOut + """ # noqa: E501 + items: List[ShareOut] + next_cursor: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["items", "next_cursor"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ShareListOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item_items in self.items: + if _item_items: + _items.append(_item_items.to_dict()) + _dict['items'] = _items + # set to None if next_cursor (nullable) is None + # and model_fields_set contains the field + if self.next_cursor is None and "next_cursor" in self.model_fields_set: + _dict['next_cursor'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ShareListOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "items": [ShareOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, + "next_cursor": obj.get("next_cursor") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/share_out.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/share_out.py new file mode 100644 index 0000000..0e0451f --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/share_out.py @@ -0,0 +1,152 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ShareOut(BaseModel): + """ + ShareOut + """ # noqa: E501 + created_at: datetime + created_by: Optional[StrictStr] + drive_id: Annotated[str, Field(strict=True)] + expires_at: Optional[datetime] + id: Annotated[str, Field(strict=True)] + resource_id: StrictStr + resource_type: StrictStr + revision: Annotated[str, Field(strict=True)] + revoked_at: Optional[datetime] + rotated_at: Optional[datetime] + state: StrictStr + __properties: ClassVar[List[str]] = ["created_at", "created_by", "drive_id", "expires_at", "id", "resource_id", "resource_type", "revision", "revoked_at", "rotated_at", "state"] + + @field_validator('drive_id', mode="before") + def drive_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^drv_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^drv_[a-f0-9]{16}$/") + return value + + @field_validator('id', mode="before") + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^shr_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^shr_[a-f0-9]{16}$/") + return value + + + @field_validator('revision', mode="before") + def revision_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^rev_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^rev_[a-f0-9]{16}$/") + return value + + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ShareOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if created_by (nullable) is None + # and model_fields_set contains the field + if self.created_by is None and "created_by" in self.model_fields_set: + _dict['created_by'] = None + + # set to None if expires_at (nullable) is None + # and model_fields_set contains the field + if self.expires_at is None and "expires_at" in self.model_fields_set: + _dict['expires_at'] = None + + # set to None if revoked_at (nullable) is None + # and model_fields_set contains the field + if self.revoked_at is None and "revoked_at" in self.model_fields_set: + _dict['revoked_at'] = None + + # set to None if rotated_at (nullable) is None + # and model_fields_set contains the field + if self.rotated_at is None and "rotated_at" in self.model_fields_set: + _dict['rotated_at'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ShareOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "created_at": obj.get("created_at"), + "created_by": obj.get("created_by"), + "drive_id": obj.get("drive_id"), + "expires_at": obj.get("expires_at"), + "id": obj.get("id"), + "resource_id": obj.get("resource_id"), + "resource_type": obj.get("resource_type"), + "revision": obj.get("revision"), + "revoked_at": obj.get("revoked_at"), + "rotated_at": obj.get("rotated_at"), + "state": obj.get("state") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/v0_error_envelope.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/v0_error_envelope.py new file mode 100644 index 0000000..aab5b73 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/v0_error_envelope.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from agentdrive_sdk.generated.sync.models.drives_create400_response_error import DrivesCreate400ResponseError +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class V0ErrorEnvelope(BaseModel): + """ + V0ErrorEnvelope + """ # noqa: E501 + error: DrivesCreate400ResponseError + __properties: ClassVar[List[str]] = ["error"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of V0ErrorEnvelope from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of V0ErrorEnvelope from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": DrivesCreate400ResponseError.from_dict(obj["error"]) if obj.get("error") is not None else None + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/validation_error_response.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/validation_error_response.py new file mode 100644 index 0000000..6add64f --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/validation_error_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from agentdrive_sdk.generated.sync.models.validation_error_response_error import ValidationErrorResponseError +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ValidationErrorResponse(BaseModel): + """ + ValidationErrorResponse + """ # noqa: E501 + error: ValidationErrorResponseError + __properties: ClassVar[List[str]] = ["error"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationErrorResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of error + if self.error: + _dict['error'] = self.error.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ValidationErrorResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "error": ValidationErrorResponseError.from_dict(obj["error"]) if obj.get("error") is not None else None + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/validation_error_response_error.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/validation_error_response_error.py new file mode 100644 index 0000000..437d43b --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/validation_error_response_error.py @@ -0,0 +1,118 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from agentdrive_sdk.generated.sync.models.validation_error_response_error_details import ValidationErrorResponseErrorDetails +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ValidationErrorResponseError(BaseModel): + """ + ValidationErrorResponseError + """ # noqa: E501 + code: Optional[StrictStr] + details: Optional[ValidationErrorResponseErrorDetails] = None + message: Optional[StrictStr] + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "details", "message"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationErrorResponseError from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of details + if self.details: + _dict['details'] = self.details.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + # set to None if code (nullable) is None + # and model_fields_set contains the field + if self.code is None and "code" in self.model_fields_set: + _dict['code'] = None + + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ValidationErrorResponseError from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "details": ValidationErrorResponseErrorDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, + "message": obj.get("message") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/validation_error_response_error_details.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/validation_error_response_error_details.py new file mode 100644 index 0000000..bb32238 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/validation_error_response_error_details.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from agentdrive_sdk.generated.sync.models.validation_error_response_error_details_fields_inner import ValidationErrorResponseErrorDetailsFieldsInner +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ValidationErrorResponseErrorDetails(BaseModel): + """ + ValidationErrorResponseErrorDetails + """ # noqa: E501 + fields: Optional[List[ValidationErrorResponseErrorDetailsFieldsInner]] = None + __properties: ClassVar[List[str]] = ["fields"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationErrorResponseErrorDetails from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in fields (list) + _items = [] + if self.fields: + for _item_fields in self.fields: + if _item_fields: + _items.append(_item_fields.to_dict()) + _dict['fields'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ValidationErrorResponseErrorDetails from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "fields": [ValidationErrorResponseErrorDetailsFieldsInner.from_dict(_item) for _item in obj["fields"]] if obj.get("fields") is not None else None + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/validation_error_response_error_details_fields_inner.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/validation_error_response_error_details_fields_inner.py new file mode 100644 index 0000000..f88b439 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/validation_error_response_error_details_fields_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class ValidationErrorResponseErrorDetailsFieldsInner(BaseModel): + """ + ValidationErrorResponseErrorDetailsFieldsInner + """ # noqa: E501 + location: Optional[StrictStr] = None + reason: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["location", "reason"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ValidationErrorResponseErrorDetailsFieldsInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ValidationErrorResponseErrorDetailsFieldsInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "location": obj.get("location"), + "reason": obj.get("reason") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/version_created_out.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/version_created_out.py new file mode 100644 index 0000000..fd3ee8a --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/version_created_out.py @@ -0,0 +1,138 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class VersionCreatedOut(BaseModel): + """ + The append/restore response — a version plus the artifact's new revision, which the version-creating 201 rotates. + """ # noqa: E501 + artifact_id: Annotated[str, Field(strict=True)] + artifact_revision: Annotated[str, Field(strict=True)] = Field(description="The artifact's revision after this version became head — the If-Match value for the next mutation.") + content_type: StrictStr + created_at: datetime + created_by: Optional[StrictStr] + hash: StrictStr + id: Annotated[str, Field(strict=True)] + parent_version_id: Optional[StrictStr] + size_bytes: Annotated[int, Field(strict=True, ge=0)] + version_number: Annotated[int, Field(strict=True, ge=1)] + __properties: ClassVar[List[str]] = ["artifact_id", "artifact_revision", "content_type", "created_at", "created_by", "hash", "id", "parent_version_id", "size_bytes", "version_number"] + + @field_validator('artifact_id', mode="before") + def artifact_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^art_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^art_[a-f0-9]{16}$/") + return value + + @field_validator('artifact_revision', mode="before") + def artifact_revision_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^rev_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^rev_[a-f0-9]{16}$/") + return value + + @field_validator('id', mode="before") + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^ver_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^ver_[a-f0-9]{16}$/") + return value + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VersionCreatedOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if created_by (nullable) is None + # and model_fields_set contains the field + if self.created_by is None and "created_by" in self.model_fields_set: + _dict['created_by'] = None + + # set to None if parent_version_id (nullable) is None + # and model_fields_set contains the field + if self.parent_version_id is None and "parent_version_id" in self.model_fields_set: + _dict['parent_version_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VersionCreatedOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "artifact_id": obj.get("artifact_id"), + "artifact_revision": obj.get("artifact_revision"), + "content_type": obj.get("content_type"), + "created_at": obj.get("created_at"), + "created_by": obj.get("created_by"), + "hash": obj.get("hash"), + "id": obj.get("id"), + "parent_version_id": obj.get("parent_version_id"), + "size_bytes": obj.get("size_bytes"), + "version_number": obj.get("version_number") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/version_list_out.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/version_list_out.py new file mode 100644 index 0000000..d304504 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/version_list_out.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from agentdrive_sdk.generated.sync.models.version_out import VersionOut +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class VersionListOut(BaseModel): + """ + VersionListOut + """ # noqa: E501 + items: List[VersionOut] + next_cursor: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["items", "next_cursor"] + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VersionListOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + _items = [] + if self.items: + for _item_items in self.items: + if _item_items: + _items.append(_item_items.to_dict()) + _dict['items'] = _items + # set to None if next_cursor (nullable) is None + # and model_fields_set contains the field + if self.next_cursor is None and "next_cursor" in self.model_fields_set: + _dict['next_cursor'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VersionListOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "items": [VersionOut.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None, + "next_cursor": obj.get("next_cursor") + }) + return _obj diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/models/version_out.py b/sdk/python/src/agentdrive_sdk/generated/sync/models/version_out.py new file mode 100644 index 0000000..73841e9 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/models/version_out.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self +from pydantic_core import to_jsonable_python + +class VersionOut(BaseModel): + """ + VersionOut + """ # noqa: E501 + artifact_id: Annotated[str, Field(strict=True)] + content_type: StrictStr + created_at: datetime + created_by: Optional[StrictStr] + hash: StrictStr + id: Annotated[str, Field(strict=True)] + parent_version_id: Optional[StrictStr] + size_bytes: Annotated[int, Field(strict=True, ge=0)] + version_number: Annotated[int, Field(strict=True, ge=1)] + __properties: ClassVar[List[str]] = ["artifact_id", "content_type", "created_at", "created_by", "hash", "id", "parent_version_id", "size_bytes", "version_number"] + + @field_validator('artifact_id', mode="before") + def artifact_id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^art_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^art_[a-f0-9]{16}$/") + return value + + @field_validator('id', mode="before") + def id_validate_regular_expression(cls, value): + """Validates the regular expression""" + if isinstance(value, str) and not re.match(r"^ver_[a-f0-9]{16}$", value): + raise ValueError(r"must validate the regular expression /^ver_[a-f0-9]{16}$/") + return value + + model_config = ConfigDict( + extra="ignore", + validate_by_name=True, + validate_by_alias=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(to_jsonable_python(self.to_dict())) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of VersionOut from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if created_by (nullable) is None + # and model_fields_set contains the field + if self.created_by is None and "created_by" in self.model_fields_set: + _dict['created_by'] = None + + # set to None if parent_version_id (nullable) is None + # and model_fields_set contains the field + if self.parent_version_id is None and "parent_version_id" in self.model_fields_set: + _dict['parent_version_id'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of VersionOut from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "artifact_id": obj.get("artifact_id"), + "content_type": obj.get("content_type"), + "created_at": obj.get("created_at"), + "created_by": obj.get("created_by"), + "hash": obj.get("hash"), + "id": obj.get("id"), + "parent_version_id": obj.get("parent_version_id"), + "size_bytes": obj.get("size_bytes"), + "version_number": obj.get("version_number") + }) + return _obj diff --git a/sdk/python/test/__init__.py b/sdk/python/src/agentdrive_sdk/generated/sync/py.typed similarity index 100% rename from sdk/python/test/__init__.py rename to sdk/python/src/agentdrive_sdk/generated/sync/py.typed diff --git a/sdk/python/src/agentdrive_sdk/generated/sync/rest.py b/sdk/python/src/agentdrive_sdk/generated/sync/rest.py new file mode 100644 index 0000000..a56f4d8 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/generated/sync/rest.py @@ -0,0 +1,319 @@ +# coding: utf-8 + +""" + AgentDrive + + AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + + The version of the OpenAPI document: + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import ipaddress +import io +import json +import re +import ssl +from urllib.parse import urlparse + +import urllib3 + +from agentdrive_sdk.generated.sync.exceptions import ApiException, ApiValueError + +SUPPORTED_SOCKS_PROXIES = {"socks5", "socks5h", "socks4", "socks4a"} +RESTResponseType = urllib3.HTTPResponse + + +def is_socks_proxy_url(url): + if url is None: + return False + split_section = url.split("://") + if len(split_section) < 2: + return False + else: + return split_section[0].lower() in SUPPORTED_SOCKS_PROXIES + + +def should_bypass_proxies(url: str, no_proxy: str) -> bool: + """Return whether ``url`` matches the comma-separated ``no_proxy`` rules.""" + parsed_url = urlparse(url) + if not parsed_url.hostname: + return True + + host = parsed_url.hostname.lower() + host_and_port = parsed_url.netloc.lower() + try: + host_ip = ipaddress.ip_address(host) + except ValueError: + host_ip = None + + for entry in (entry.strip().lower() for entry in no_proxy.split(',')): + if not entry: + continue + if entry == '*': + return True + + if host_ip is not None: + try: + if host_ip in ipaddress.ip_network(entry, strict=False): + return True + except ValueError: + pass + + entry = entry.lstrip('.') + if ( + host == entry + or host.endswith('.' + entry) + or host_and_port == entry + or host_and_port.endswith('.' + entry) + ): + return True + + return False + + +class RESTResponse(io.IOBase): + + def __init__(self, resp) -> None: + self.response = resp + self.status = resp.status + self.reason = resp.reason + self.data = None + + def read(self): + if self.data is None: + self.data = self.response.data + return self.data + + @property + def headers(self): + """Returns a dictionary of response headers.""" + return self.response.headers + + def getheaders(self): + """Returns a dictionary of the response headers; use ``headers`` instead.""" + return self.response.headers + + def getheader(self, name, default=None): + """Returns a given response header; use ``headers.get()`` instead.""" + return self.response.headers.get(name, default) + + +class RESTClientObject: + + def __init__(self, configuration) -> None: + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + pool_args = { + "cert_reqs": cert_reqs, + "ca_certs": configuration.ssl_ca_cert, + "cert_file": configuration.cert_file, + "key_file": configuration.key_file, + "ca_cert_data": configuration.ca_cert_data, + } + if configuration.assert_hostname is not None: + pool_args['assert_hostname'] = ( + configuration.assert_hostname + ) + + if configuration.retries is not None: + pool_args['retries'] = configuration.retries + + if configuration.tls_server_name: + pool_args['server_hostname'] = configuration.tls_server_name + + + if configuration.socket_options is not None: + pool_args['socket_options'] = configuration.socket_options + + if configuration.connection_pool_maxsize is not None: + pool_args['maxsize'] = configuration.connection_pool_maxsize + + # https pool manager + self.pool_manager: urllib3.PoolManager + + if configuration.proxy and not should_bypass_proxies( + configuration.host, configuration.no_proxy or '' + ): + if is_socks_proxy_url(configuration.proxy): + from urllib3.contrib.socks import SOCKSProxyManager + pool_args["proxy_url"] = configuration.proxy + pool_args["headers"] = configuration.proxy_headers + self.pool_manager = SOCKSProxyManager(**pool_args) + else: + pool_args["proxy_url"] = configuration.proxy + pool_args["proxy_headers"] = configuration.proxy_headers + self.pool_manager = urllib3.ProxyManager(**pool_args) + else: + self.pool_manager = urllib3.PoolManager(**pool_args) + + def request( + self, + method, + url, + headers=None, + body=None, + post_params=None, + _request_timeout=None + ): + """Perform requests. + + :param method: http request method + :param url: http request url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + """ + method = method.upper() + assert method in [ + 'GET', + 'HEAD', + 'DELETE', + 'POST', + 'PUT', + 'PATCH', + 'OPTIONS' + ] + + if post_params and body: + raise ApiValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, float)): + timeout = urllib3.Timeout(total=_request_timeout) + elif ( + isinstance(_request_timeout, tuple) + and len(_request_timeout) == 2 + ): + timeout = urllib3.Timeout( + connect=_request_timeout[0], + read=_request_timeout[1] + ) + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + + content_type = headers.get('Content-Type') + is_json = ( + not content_type + or re.search('json', content_type, re.IGNORECASE) + ) + # JSON is valid YAML 1.2, so structured YAML bodies can use + # the existing JSON serializer: + # https://yaml.org/spec/1.2.2/#13-relation-to-json + is_structured_yaml = ( + content_type + and re.search('yaml', content_type, re.IGNORECASE) + and not isinstance(body, (str, bytes)) + ) + if is_json or is_structured_yaml: + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, + url, + body=request_body, + timeout=timeout, + headers=headers, + preload_content=False, + redirect=False, + ) + elif content_type == 'application/x-www-form-urlencoded': + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=False, + timeout=timeout, + headers=headers, + preload_content=False, + redirect=False, + ) + elif content_type == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + # Ensures that dict objects are serialized + post_params = [(a, json.dumps(b)) if isinstance(b, dict) else (a,b) for a, b in post_params] + r = self.pool_manager.request( + method, + url, + fields=post_params, + encode_multipart=True, + timeout=timeout, + headers=headers, + preload_content=False, + redirect=False, + ) + # Pass a `string` parameter directly in the body to support + # other content types than JSON when `body` argument is + # provided in serialized form. + elif isinstance(body, str) or isinstance(body, bytes): + r = self.pool_manager.request( + method, + url, + body=body, + timeout=timeout, + headers=headers, + preload_content=False, + redirect=False, + ) + elif headers['Content-Type'].startswith('text/') and isinstance(body, bool): + request_body = "true" if body else "false" + r = self.pool_manager.request( + method, + url, + body=request_body, + preload_content=False, + redirect=False, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request( + method, + url, + fields={}, + timeout=timeout, + headers=headers, + preload_content=False, + redirect=False, + ) + except urllib3.exceptions.SSLError as e: + msg = "\n".join([type(e).__name__, str(e)]) + raise ApiException(status=0, reason=msg) + + return RESTResponse(r) diff --git a/sdk/python/src/agentdrive_sdk/py.typed b/sdk/python/src/agentdrive_sdk/py.typed new file mode 100644 index 0000000..1242d43 --- /dev/null +++ b/sdk/python/src/agentdrive_sdk/py.typed @@ -0,0 +1 @@ +# Marker file for PEP 561. diff --git a/sdk/python/test-requirements.txt b/sdk/python/test-requirements.txt deleted file mode 100644 index 731ef0e..0000000 --- a/sdk/python/test-requirements.txt +++ /dev/null @@ -1,6 +0,0 @@ -pytest >= 8.4.2 -pytest-cov >= 2.8.1 -tox >= 3.9.0 -flake8 >= 4.0.0 -types-python-dateutil >= 2.8.19.14 -mypy >= 1.5 diff --git a/sdk/python/test/test_agent_auth_api.py b/sdk/python/test/test_agent_auth_api.py deleted file mode 100644 index 0ea71d6..0000000 --- a/sdk/python/test/test_agent_auth_api.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.api.agent_auth_api import AgentAuthApi - - -class TestAgentAuthApi(unittest.TestCase): - """AgentAuthApi unit test stubs""" - - def setUp(self) -> None: - self.api = AgentAuthApi() - - def tearDown(self) -> None: - pass - - def test_extension_exchange_v0_auth_extension_exchange_post(self) -> None: - """Test case for extension_exchange_v0_auth_extension_exchange_post - - Redeem an extension OAuth ticket for a JWT pair - """ - pass - - def test_initiate_claim_agent_identity_claim_post(self) -> None: - """Test case for initiate_claim_agent_identity_claim_post - - Initiate the human-claim ceremony for an agent identity - """ - pass - - def test_jwks_well_known_jwks_json_get(self) -> None: - """Test case for jwks_well_known_jwks_json_get - - JSON Web Key Set — public keys for verifying AgentDrive JWTs - """ - pass - - def test_oauth2_token_oauth2_token_post(self) -> None: - """Test case for oauth2_token_oauth2_token_post - - Exchange a credential for an access_token - """ - pass - - def test_oauth_authorization_server_well_known_oauth_authorization_server_get(self) -> None: - """Test case for oauth_authorization_server_well_known_oauth_authorization_server_get - - Authorization-server metadata (RFC 8414 + auth.md agent_auth block) - """ - pass - - def test_oauth_protected_resource_mcp_well_known_oauth_protected_resource_mcp_get(self) -> None: - """Test case for oauth_protected_resource_mcp_well_known_oauth_protected_resource_mcp_get - - Protected-resource metadata for the MCP endpoint (RFC 9728 §3.1) - """ - pass - - def test_oauth_protected_resource_well_known_oauth_protected_resource_get(self) -> None: - """Test case for oauth_protected_resource_well_known_oauth_protected_resource_get - - Protected-resource metadata (auth.md / RFC 9728-like discovery) - """ - pass - - def test_register_agent_identity_agent_identity_post(self) -> None: - """Test case for register_agent_identity_agent_identity_post - - Register an agent identity (anonymous or ID-JAG) - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_agent_auth_metadata_out.py b/sdk/python/test/test_agent_auth_metadata_out.py deleted file mode 100644 index 4d068ff..0000000 --- a/sdk/python/test/test_agent_auth_metadata_out.py +++ /dev/null @@ -1,68 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.agent_auth_metadata_out import AgentAuthMetadataOut - -class TestAgentAuthMetadataOut(unittest.TestCase): - """AgentAuthMetadataOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AgentAuthMetadataOut: - """Test AgentAuthMetadataOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AgentAuthMetadataOut` - """ - model = AgentAuthMetadataOut() - if include_optional: - return AgentAuthMetadataOut( - claim_endpoint = '', - events_endpoint = '', - identity_assertion = { }, - identity_endpoint = '', - identity_types_supported = [ - '' - ], - skill = '', - spec_version = '' - ) - else: - return AgentAuthMetadataOut( - claim_endpoint = '', - events_endpoint = '', - identity_assertion = { }, - identity_endpoint = '', - identity_types_supported = [ - '' - ], - skill = '', - spec_version = '', - ) - """ - - def testAgentAuthMetadataOut(self): - """Test AgentAuthMetadataOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_anonymous_identity_response.py b/sdk/python/test/test_anonymous_identity_response.py deleted file mode 100644 index 3775627..0000000 --- a/sdk/python/test/test_anonymous_identity_response.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.anonymous_identity_response import AnonymousIdentityResponse - -class TestAnonymousIdentityResponse(unittest.TestCase): - """AnonymousIdentityResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AnonymousIdentityResponse: - """Test AnonymousIdentityResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AnonymousIdentityResponse` - """ - model = AnonymousIdentityResponse() - if include_optional: - return AnonymousIdentityResponse( - agent_identity_id = '', - claim_metadata = agentdrive_sdk.models.claim_metadata.ClaimMetadata( - claim_endpoint = '', - supported_email_hints = True, ), - claim_token = '', - drive_id = '', - expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - identity_assertion = '' - ) - else: - return AnonymousIdentityResponse( - agent_identity_id = '', - claim_metadata = agentdrive_sdk.models.claim_metadata.ClaimMetadata( - claim_endpoint = '', - supported_email_hints = True, ), - claim_token = '', - drive_id = '', - expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - identity_assertion = '', - ) - """ - - def testAnonymousIdentityResponse(self): - """Test AnonymousIdentityResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_artifact_delete_out.py b/sdk/python/test/test_artifact_delete_out.py deleted file mode 100644 index 2f00e48..0000000 --- a/sdk/python/test/test_artifact_delete_out.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.artifact_delete_out import ArtifactDeleteOut - -class TestArtifactDeleteOut(unittest.TestCase): - """ArtifactDeleteOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ArtifactDeleteOut: - """Test ArtifactDeleteOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ArtifactDeleteOut` - """ - model = ArtifactDeleteOut() - if include_optional: - return ArtifactDeleteOut( - deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - ok = True, - path = '', - purge_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - restore_url = '' - ) - else: - return ArtifactDeleteOut( - deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - path = '', - purge_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - ) - """ - - def testArtifactDeleteOut(self): - """Test ArtifactDeleteOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_artifact_head_out.py b/sdk/python/test/test_artifact_head_out.py deleted file mode 100644 index 8736972..0000000 --- a/sdk/python/test/test_artifact_head_out.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.artifact_head_out import ArtifactHeadOut - -class TestArtifactHeadOut(unittest.TestCase): - """ArtifactHeadOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ArtifactHeadOut: - """Test ArtifactHeadOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ArtifactHeadOut` - """ - model = ArtifactHeadOut() - if include_optional: - return ArtifactHeadOut( - version = 56 - ) - else: - return ArtifactHeadOut( - version = 56, - ) - """ - - def testArtifactHeadOut(self): - """Test ArtifactHeadOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_artifact_move_in.py b/sdk/python/test/test_artifact_move_in.py deleted file mode 100644 index 09730e8..0000000 --- a/sdk/python/test/test_artifact_move_in.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.artifact_move_in import ArtifactMoveIn - -class TestArtifactMoveIn(unittest.TestCase): - """ArtifactMoveIn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ArtifactMoveIn: - """Test ArtifactMoveIn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ArtifactMoveIn` - """ - model = ArtifactMoveIn() - if include_optional: - return ArtifactMoveIn( - path = '' - ) - else: - return ArtifactMoveIn( - path = '', - ) - """ - - def testArtifactMoveIn(self): - """Test ArtifactMoveIn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_artifact_out.py b/sdk/python/test/test_artifact_out.py deleted file mode 100644 index 095e90a..0000000 --- a/sdk/python/test/test_artifact_out.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.artifact_out import ArtifactOut - -class TestArtifactOut(unittest.TestCase): - """ArtifactOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ArtifactOut: - """Test ArtifactOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ArtifactOut` - """ - model = ArtifactOut() - if include_optional: - return ArtifactOut( - content_type = '', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - drive_id = '', - embedded_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - etag = '', - file_type = '', - hash = '', - id = '', - indexed_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - labels = [ - '' - ], - llm_index = { }, - metadata = { }, - metageneration = 56, - path = '', - permalink = '', - size_bytes = 56, - source = agentdrive_sdk.models.artifact_source.ArtifactSource( - refs = [ - agentdrive_sdk.models.source_ref.SourceRef( - id = '', - metadata = { }, - type = '', ) - ], ), - updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - url = '', - version_number = 56 - ) - else: - return ArtifactOut( - content_type = '', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - drive_id = '', - etag = '', - file_type = '', - hash = '', - id = '', - path = '', - permalink = '', - size_bytes = 56, - updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - url = '', - ) - """ - - def testArtifactOut(self): - """Test ArtifactOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_artifact_patch_in.py b/sdk/python/test/test_artifact_patch_in.py deleted file mode 100644 index f467cfb..0000000 --- a/sdk/python/test/test_artifact_patch_in.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.artifact_patch_in import ArtifactPatchIn - -class TestArtifactPatchIn(unittest.TestCase): - """ArtifactPatchIn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ArtifactPatchIn: - """Test ArtifactPatchIn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ArtifactPatchIn` - """ - model = ArtifactPatchIn() - if include_optional: - return ArtifactPatchIn( - labels = [ - '' - ], - metadata = { }, - source = agentdrive_sdk.models.artifact_source.ArtifactSource( - refs = [ - agentdrive_sdk.models.source_ref.SourceRef( - id = '', - metadata = { }, - type = '', ) - ], ) - ) - else: - return ArtifactPatchIn( - ) - """ - - def testArtifactPatchIn(self): - """Test ArtifactPatchIn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_artifact_source.py b/sdk/python/test/test_artifact_source.py deleted file mode 100644 index 5ec0e51..0000000 --- a/sdk/python/test/test_artifact_source.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.artifact_source import ArtifactSource - -class TestArtifactSource(unittest.TestCase): - """ArtifactSource unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ArtifactSource: - """Test ArtifactSource - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ArtifactSource` - """ - model = ArtifactSource() - if include_optional: - return ArtifactSource( - refs = [ - agentdrive_sdk.models.source_ref.SourceRef( - id = '', - metadata = { }, - type = '', ) - ] - ) - else: - return ArtifactSource( - ) - """ - - def testArtifactSource(self): - """Test ArtifactSource""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_authorization_server_metadata_out.py b/sdk/python/test/test_authorization_server_metadata_out.py deleted file mode 100644 index f67b0f7..0000000 --- a/sdk/python/test/test_authorization_server_metadata_out.py +++ /dev/null @@ -1,108 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.authorization_server_metadata_out import AuthorizationServerMetadataOut - -class TestAuthorizationServerMetadataOut(unittest.TestCase): - """AuthorizationServerMetadataOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AuthorizationServerMetadataOut: - """Test AuthorizationServerMetadataOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AuthorizationServerMetadataOut` - """ - model = AuthorizationServerMetadataOut() - if include_optional: - return AuthorizationServerMetadataOut( - agent_auth = { }, - authorization_endpoint = '', - authorization_response_iss_parameter_supported = True, - code_challenge_methods_supported = [ - '' - ], - grant_types_supported = [ - '' - ], - issuer = '', - jwks_uri = '', - registration_endpoint = '', - response_modes_supported = [ - '' - ], - response_types_supported = [ - '' - ], - revocation_endpoint = '', - revocation_endpoint_auth_methods_supported = [ - '' - ], - scopes_supported = [ - '' - ], - token_endpoint = '', - token_endpoint_auth_methods_supported = [ - '' - ] - ) - else: - return AuthorizationServerMetadataOut( - agent_auth = { }, - authorization_endpoint = '', - authorization_response_iss_parameter_supported = True, - code_challenge_methods_supported = [ - '' - ], - grant_types_supported = [ - '' - ], - issuer = '', - jwks_uri = '', - registration_endpoint = '', - response_modes_supported = [ - '' - ], - response_types_supported = [ - '' - ], - revocation_endpoint = '', - revocation_endpoint_auth_methods_supported = [ - '' - ], - scopes_supported = [ - '' - ], - token_endpoint = '', - token_endpoint_auth_methods_supported = [ - '' - ], - ) - """ - - def testAuthorizationServerMetadataOut(self): - """Test AuthorizationServerMetadataOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_authorize_decision_oauth2_authorize_post403_response.py b/sdk/python/test/test_authorize_decision_oauth2_authorize_post403_response.py deleted file mode 100644 index 65ef1d8..0000000 --- a/sdk/python/test/test_authorize_decision_oauth2_authorize_post403_response.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.authorize_decision_oauth2_authorize_post403_response import AuthorizeDecisionOauth2AuthorizePost403Response - -class TestAuthorizeDecisionOauth2AuthorizePost403Response(unittest.TestCase): - """AuthorizeDecisionOauth2AuthorizePost403Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> AuthorizeDecisionOauth2AuthorizePost403Response: - """Test AuthorizeDecisionOauth2AuthorizePost403Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `AuthorizeDecisionOauth2AuthorizePost403Response` - """ - model = AuthorizeDecisionOauth2AuthorizePost403Response() - if include_optional: - return AuthorizeDecisionOauth2AuthorizePost403Response( - error = '', - error_description = '', - detail = { } - ) - else: - return AuthorizeDecisionOauth2AuthorizePost403Response( - error = '', - detail = { }, - ) - """ - - def testAuthorizeDecisionOauth2AuthorizePost403Response(self): - """Test AuthorizeDecisionOauth2AuthorizePost403Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_claim_init_request.py b/sdk/python/test/test_claim_init_request.py deleted file mode 100644 index c6b386a..0000000 --- a/sdk/python/test/test_claim_init_request.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.claim_init_request import ClaimInitRequest - -class TestClaimInitRequest(unittest.TestCase): - """ClaimInitRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClaimInitRequest: - """Test ClaimInitRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ClaimInitRequest` - """ - model = ClaimInitRequest() - if include_optional: - return ClaimInitRequest( - claim_token = '', - email = '' - ) - else: - return ClaimInitRequest( - claim_token = '', - ) - """ - - def testClaimInitRequest(self): - """Test ClaimInitRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_claim_init_response.py b/sdk/python/test/test_claim_init_response.py deleted file mode 100644 index c932740..0000000 --- a/sdk/python/test/test_claim_init_response.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.claim_init_response import ClaimInitResponse - -class TestClaimInitResponse(unittest.TestCase): - """ClaimInitResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClaimInitResponse: - """Test ClaimInitResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ClaimInitResponse` - """ - model = ClaimInitResponse() - if include_optional: - return ClaimInitResponse( - claim_attempt_token = '', - expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - user_code = '', - verification_uri = '', - verification_uri_complete = '' - ) - else: - return ClaimInitResponse( - claim_attempt_token = '', - expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - user_code = '', - verification_uri = '', - verification_uri_complete = '', - ) - """ - - def testClaimInitResponse(self): - """Test ClaimInitResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_claim_metadata.py b/sdk/python/test/test_claim_metadata.py deleted file mode 100644 index ac6082d..0000000 --- a/sdk/python/test/test_claim_metadata.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.claim_metadata import ClaimMetadata - -class TestClaimMetadata(unittest.TestCase): - """ClaimMetadata unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClaimMetadata: - """Test ClaimMetadata - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ClaimMetadata` - """ - model = ClaimMetadata() - if include_optional: - return ClaimMetadata( - claim_endpoint = '', - supported_email_hints = True - ) - else: - return ClaimMetadata( - claim_endpoint = '', - ) - """ - - def testClaimMetadata(self): - """Test ClaimMetadata""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_client_registration_out.py b/sdk/python/test/test_client_registration_out.py deleted file mode 100644 index f1a133c..0000000 --- a/sdk/python/test/test_client_registration_out.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.client_registration_out import ClientRegistrationOut - -class TestClientRegistrationOut(unittest.TestCase): - """ClientRegistrationOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ClientRegistrationOut: - """Test ClientRegistrationOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ClientRegistrationOut` - """ - model = ClientRegistrationOut() - if include_optional: - return ClientRegistrationOut( - client_id = '', - client_id_issued_at = 56, - client_name = '', - grant_types = [ - '' - ], - redirect_uris = [ - '' - ], - response_types = [ - '' - ], - scope = '', - token_endpoint_auth_method = '' - ) - else: - return ClientRegistrationOut( - client_id = '', - client_id_issued_at = 56, - client_name = '', - grant_types = [ - '' - ], - redirect_uris = [ - '' - ], - response_types = [ - '' - ], - scope = '', - token_endpoint_auth_method = '', - ) - """ - - def testClientRegistrationOut(self): - """Test ClientRegistrationOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_compile_diagnostic_out.py b/sdk/python/test/test_compile_diagnostic_out.py deleted file mode 100644 index 77626f3..0000000 --- a/sdk/python/test/test_compile_diagnostic_out.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.compile_diagnostic_out import CompileDiagnosticOut - -class TestCompileDiagnosticOut(unittest.TestCase): - """CompileDiagnosticOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CompileDiagnosticOut: - """Test CompileDiagnosticOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CompileDiagnosticOut` - """ - model = CompileDiagnosticOut() - if include_optional: - return CompileDiagnosticOut( - category = '', - file = '', - line = 56, - message = '', - severity = '', - suggestion = '' - ) - else: - return CompileDiagnosticOut( - message = '', - severity = '', - ) - """ - - def testCompileDiagnosticOut(self): - """Test CompileDiagnosticOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_compile_job_in.py b/sdk/python/test/test_compile_job_in.py deleted file mode 100644 index 5f9f9ba..0000000 --- a/sdk/python/test/test_compile_job_in.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.compile_job_in import CompileJobIn - -class TestCompileJobIn(unittest.TestCase): - """CompileJobIn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CompileJobIn: - """Test CompileJobIn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CompileJobIn` - """ - model = CompileJobIn() - if include_optional: - return CompileJobIn( - options = agentdrive_sdk.models.compile_options.CompileOptions( - engine = '', - entrypoint = '', - wait = True, ), - task = 'latex.compile' - ) - else: - return CompileJobIn( - ) - """ - - def testCompileJobIn(self): - """Test CompileJobIn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_compile_job_list_out.py b/sdk/python/test/test_compile_job_list_out.py deleted file mode 100644 index 34e4552..0000000 --- a/sdk/python/test/test_compile_job_list_out.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.compile_job_list_out import CompileJobListOut - -class TestCompileJobListOut(unittest.TestCase): - """CompileJobListOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CompileJobListOut: - """Test CompileJobListOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CompileJobListOut` - """ - model = CompileJobListOut() - if include_optional: - return CompileJobListOut( - items = [ - { - 'key' : null - } - ], - jobs = [ - { - 'key' : null - } - ], - next_cursor = '' - ) - else: - return CompileJobListOut( - items = [ - { - 'key' : null - } - ], - jobs = [ - { - 'key' : null - } - ], - ) - """ - - def testCompileJobListOut(self): - """Test CompileJobListOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_compile_job_out.py b/sdk/python/test/test_compile_job_out.py deleted file mode 100644 index 45f5bd5..0000000 --- a/sdk/python/test/test_compile_job_out.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.compile_job_out import CompileJobOut - -class TestCompileJobOut(unittest.TestCase): - """CompileJobOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CompileJobOut: - """Test CompileJobOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CompileJobOut` - """ - model = CompileJobOut() - if include_optional: - return CompileJobOut( - cache_hit = True, - diagnostics = [ - { } - ], - duration_ms = 56, - engine = '', - job_id = '', - logs_url = '', - output = { }, - status = '', - task = '' - ) - else: - return CompileJobOut( - cache_hit = True, - engine = '', - job_id = '', - status = '', - task = '', - ) - """ - - def testCompileJobOut(self): - """Test CompileJobOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_compile_options.py b/sdk/python/test/test_compile_options.py deleted file mode 100644 index b0be41c..0000000 --- a/sdk/python/test/test_compile_options.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.compile_options import CompileOptions - -class TestCompileOptions(unittest.TestCase): - """CompileOptions unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CompileOptions: - """Test CompileOptions - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CompileOptions` - """ - model = CompileOptions() - if include_optional: - return CompileOptions( - engine = '', - entrypoint = '', - wait = True - ) - else: - return CompileOptions( - ) - """ - - def testCompileOptions(self): - """Test CompileOptions""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_compile_project_out.py b/sdk/python/test/test_compile_project_out.py deleted file mode 100644 index 1f52458..0000000 --- a/sdk/python/test/test_compile_project_out.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.compile_project_out import CompileProjectOut - -class TestCompileProjectOut(unittest.TestCase): - """CompileProjectOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CompileProjectOut: - """Test CompileProjectOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CompileProjectOut` - """ - model = CompileProjectOut() - if include_optional: - return CompileProjectOut( - auto_compile = True, - engine = '', - entrypoint = '', - fld_id = '' - ) - else: - return CompileProjectOut( - auto_compile = True, - engine = '', - entrypoint = '', - fld_id = '', - ) - """ - - def testCompileProjectOut(self): - """Test CompileProjectOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_copy_in.py b/sdk/python/test/test_copy_in.py deleted file mode 100644 index 322acb9..0000000 --- a/sdk/python/test/test_copy_in.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.copy_in import CopyIn - -class TestCopyIn(unittest.TestCase): - """CopyIn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CopyIn: - """Test CopyIn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CopyIn` - """ - model = CopyIn() - if include_optional: - return CopyIn( - from_generation = 56, - path = '', - source = agentdrive_sdk.models.artifact_source.ArtifactSource( - refs = [ - agentdrive_sdk.models.source_ref.SourceRef( - id = '', - metadata = { }, - type = '', ) - ], ) - ) - else: - return CopyIn( - path = '', - ) - """ - - def testCopyIn(self): - """Test CopyIn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_dataset_description_out.py b/sdk/python/test/test_dataset_description_out.py deleted file mode 100644 index 70b765d..0000000 --- a/sdk/python/test/test_dataset_description_out.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.dataset_description_out import DatasetDescriptionOut - -class TestDatasetDescriptionOut(unittest.TestCase): - """DatasetDescriptionOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DatasetDescriptionOut: - """Test DatasetDescriptionOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DatasetDescriptionOut` - """ - model = DatasetDescriptionOut() - if include_optional: - return DatasetDescriptionOut( - columns = [ - { } - ], - dataset = '' - ) - else: - return DatasetDescriptionOut( - columns = [ - { } - ], - dataset = '', - ) - """ - - def testDatasetDescriptionOut(self): - """Test DatasetDescriptionOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_default_api.py b/sdk/python/test/test_default_api.py deleted file mode 100644 index 7106259..0000000 --- a/sdk/python/test/test_default_api.py +++ /dev/null @@ -1,591 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.api.default_api import DefaultApi - - -class TestDefaultApi(unittest.TestCase): - """DefaultApi unit test stubs""" - - def setUp(self) -> None: - self.api = DefaultApi() - - def tearDown(self) -> None: - pass - - def test_abort_upload_v0_uploads_upload_id_delete(self) -> None: - """Test case for abort_upload_v0_uploads_upload_id_delete - - Abort a large (direct-to-GCS) upload session - """ - pass - - def test_begin_upload_v0_uploads_post(self) -> None: - """Test case for begin_upload_v0_uploads_post - - Begin a large (direct-to-GCS) upload - """ - pass - - def test_callback_auth_callback_get(self) -> None: - """Test case for callback_auth_callback_get - - Callback - """ - pass - - def test_cancel_job_v0_jobs_job_id_cancel_post(self) -> None: - """Test case for cancel_job_v0_jobs_job_id_cancel_post - - Cancel a queued/running job - """ - pass - - def test_commit_upload_v0_uploads_upload_id_commit_post(self) -> None: - """Test case for commit_upload_v0_uploads_upload_id_commit_post - - Commit a large (direct-to-GCS) upload - """ - pass - - def test_copy_artifact_route_v0_artifacts_art_id_copy_post(self) -> None: - """Test case for copy_artifact_route_v0_artifacts_art_id_copy_post - - Duplicate an artifact to a new path (CAS-shared, new ID) - """ - pass - - def test_copy_folder_by_id_v0_folders_fld_id_copy_post(self) -> None: - """Test case for copy_folder_by_id_v0_folders_fld_id_copy_post - - Duplicate a folder subtree to a new path (CAS-shared, new IDs) - """ - pass - - def test_create_folder_by_path_v0_folders_path_put(self) -> None: - """Test case for create_folder_by_path_v0_folders_path_put - - Create a folder (idempotent) - """ - pass - - def test_create_grant_route_v0_grants_post(self) -> None: - """Test case for create_grant_route_v0_grants_post - - Create (or fetch) a per-principal grant on a resource - """ - pass - - def test_create_share_route_v0_shares_post(self) -> None: - """Test case for create_share_route_v0_shares_post - - Mint a share link (returns the share_key once) - """ - pass - - def test_delete_artifact_by_id_route_v0_artifacts_art_id_delete(self) -> None: - """Test case for delete_artifact_by_id_route_v0_artifacts_art_id_delete - - Soft-delete an artifact by its stable ID - """ - pass - - def test_delete_artifact_v0_artifacts_path_delete(self) -> None: - """Test case for delete_artifact_v0_artifacts_path_delete - - Delete Artifact - """ - pass - - def test_delete_drive_route_v0_drives_drive_id_delete(self) -> None: - """Test case for delete_drive_route_v0_drives_drive_id_delete - - Soft-delete a drive - """ - pass - - def test_delete_folder_by_id_v0_folders_fld_id_delete(self) -> None: - """Test case for delete_folder_by_id_v0_folders_fld_id_delete - - Soft-delete a folder by stable ID (cascade with ?recursive=true) - """ - pass - - def test_delete_folder_by_path_v0_folders_path_delete(self) -> None: - """Test case for delete_folder_by_path_v0_folders_path_delete - - Soft-delete a folder (cascade with ?recursive=true) - """ - pass - - def test_delete_grant_route_v0_grants_grn_id_delete(self) -> None: - """Test case for delete_grant_route_v0_grants_grn_id_delete - - Revoke a grant (can_manage, or self-revoke own grant) - """ - pass - - def test_delete_share_route_v0_shares_shr_id_delete(self) -> None: - """Test case for delete_share_route_v0_shares_shr_id_delete - - Revoke a share link (requires can_manage) - """ - pass - - def test_download_artifact_by_id_v0_artifacts_art_id_download_get(self) -> None: - """Test case for download_artifact_by_id_v0_artifacts_art_id_download_get - - Stream the artifact bytes by stable ID (never rendered HTML) - """ - pass - - def test_download_artifact_by_path_v0_artifacts_path_download_get(self) -> None: - """Test case for download_artifact_by_path_v0_artifacts_path_download_get - - Stream the artifact bytes by path (never rendered HTML) - """ - pass - - def test_download_artifact_version_v0_artifacts_art_id_versions_version_number_download_get(self) -> None: - """Test case for download_artifact_version_v0_artifacts_art_id_versions_version_number_download_get - - Stream bytes for a specific version (machine surface) - """ - pass - - def test_download_url_by_id_v0_artifacts_art_id_download_url_get(self) -> None: - """Test case for download_url_by_id_v0_artifacts_art_id_download_url_get - - Signed direct-from-GCS download URL by stable ID - """ - pass - - def test_download_url_by_path_v0_artifacts_path_download_url_get(self) -> None: - """Test case for download_url_by_path_v0_artifacts_path_download_url_get - - Signed direct-from-GCS download URL by path - """ - pass - - def test_download_url_version_v0_artifacts_art_id_versions_version_number_download_url_get(self) -> None: - """Test case for download_url_version_v0_artifacts_art_id_versions_version_number_download_url_get - - Signed direct-from-GCS download URL for a specific version - """ - pass - - def test_enqueue_job_v0_projects_fld_id_jobs_post(self) -> None: - """Test case for enqueue_job_v0_projects_fld_id_jobs_post - - Enqueue a compile job for a project (folder) - """ - pass - - def test_extension_start_auth_extension_start_get(self) -> None: - """Test case for extension_start_auth_extension_start_get - - Extension Start - """ - pass - - def test_find_v0_find_get(self) -> None: - """Test case for find_v0_find_get - - Hybrid passage retrieval over the full file body - """ - pass - - def test_get_artifact_by_id_meta_v0_artifacts_art_id_meta_get(self) -> None: - """Test case for get_artifact_by_id_meta_v0_artifacts_art_id_meta_get - - Artifact metadata by stable ID (same shape as path /meta) - """ - pass - - def test_get_artifact_by_id_v0_artifacts_art_id_get(self) -> None: - """Test case for get_artifact_by_id_v0_artifacts_art_id_get - - Canonical lookup of an artifact by its stable ID - """ - pass - - def test_get_artifact_meta_v0_artifacts_path_meta_get(self) -> None: - """Test case for get_artifact_meta_v0_artifacts_path_meta_get - - Get Artifact Meta - """ - pass - - def test_get_artifact_version_v0_artifacts_art_id_versions_version_number_get(self) -> None: - """Test case for get_artifact_version_v0_artifacts_art_id_versions_version_number_get - - Metadata for a specific version of an artifact - """ - pass - - def test_get_drive_route_v0_drives_drive_id_get(self) -> None: - """Test case for get_drive_route_v0_drives_drive_id_get - - Drive overview by id (same shape as /drives/me) - """ - pass - - def test_get_feedback_status_v0_feedback_fbk_id_get(self) -> None: - """Test case for get_feedback_status_v0_feedback_fbk_id_get - - Get Feedback Status - """ - pass - - def test_get_folder_by_id_meta_v0_folders_fld_id_meta_get(self) -> None: - """Test case for get_folder_by_id_meta_v0_folders_fld_id_meta_get - - Folder metadata by stable ID (same shape as the bare id route) - """ - pass - - def test_get_folder_by_id_v0_folders_fld_id_get(self) -> None: - """Test case for get_folder_by_id_v0_folders_fld_id_get - - Canonical lookup of a folder by its stable ID - """ - pass - - def test_get_folder_by_path_meta_v0_folders_path_meta_get(self) -> None: - """Test case for get_folder_by_path_meta_v0_folders_path_meta_get - - Folder metadata by path (same shape as the bare path route) - """ - pass - - def test_get_folder_by_path_v0_folders_path_get(self) -> None: - """Test case for get_folder_by_path_v0_folders_path_get - - Read folder metadata by path - """ - pass - - def test_get_grant_route_v0_grants_grn_id_get(self) -> None: - """Test case for get_grant_route_v0_grants_grn_id_get - - Read a single grant (can_manage, or the grant's own principal) - """ - pass - - def test_get_job_logs_v0_jobs_job_id_logs_get(self) -> None: - """Test case for get_job_logs_v0_jobs_job_id_logs_get - - Raw compile log (text/plain) - """ - pass - - def test_get_job_v0_jobs_job_id_get(self) -> None: - """Test case for get_job_v0_jobs_job_id_get - - Poll a job - """ - pass - - def test_get_project_v0_projects_fld_id_get(self) -> None: - """Test case for get_project_v0_projects_fld_id_get - - Get a project's compile config - """ - pass - - def test_get_share_route_v0_shares_shr_id_get(self) -> None: - """Test case for get_share_route_v0_shares_shr_id_get - - Read a single share link's metadata (requires can_manage) - """ - pass - - def test_get_upload_status_v0_uploads_upload_id_get(self) -> None: - """Test case for get_upload_status_v0_uploads_upload_id_get - - Get the status of a large (direct-to-GCS) upload session - """ - pass - - def test_health_health_get(self) -> None: - """Test case for health_health_get - - Health - """ - pass - - def test_list_artifact_versions_v0_artifacts_art_id_versions_get(self) -> None: - """Test case for list_artifact_versions_v0_artifacts_art_id_versions_get - - List versions of an artifact, newest first - """ - pass - - def test_list_artifacts_v0_artifacts_get(self) -> None: - """Test case for list_artifacts_v0_artifacts_get - - List artifacts in the drive - """ - pass - - def test_list_events_route_v0_events_get(self) -> None: - """Test case for list_events_route_v0_events_get - - Read the append-only event log for the authenticated drive - """ - pass - - def test_list_grants_route_v0_grants_get(self) -> None: - """Test case for list_grants_route_v0_grants_get - - List live grants on a resource (requires can_manage) - """ - pass - - def test_list_project_jobs_v0_projects_fld_id_jobs_get(self) -> None: - """Test case for list_project_jobs_v0_projects_fld_id_jobs_get - - List a project's jobs - """ - pass - - def test_list_shares_route_v0_shares_get(self) -> None: - """Test case for list_shares_route_v0_shares_get - - List live share links on a resource (requires can_manage) - """ - pass - - def test_list_trash_route_v0_drives_drive_id_trash_get(self) -> None: - """Test case for list_trash_route_v0_drives_drive_id_trash_get - - List the authenticated drive's trash - """ - pass - - def test_login_auth_login_get(self) -> None: - """Test case for login_auth_login_get - - Login - """ - pass - - def test_logout_auth_logout_post(self) -> None: - """Test case for logout_auth_logout_post - - Logout - """ - pass - - def test_me_usage_v0_drives_me_usage_get(self) -> None: - """Test case for me_usage_v0_drives_me_usage_get - - Current-period usage + caps for the authenticated drive - """ - pass - - def test_me_v0_drives_me_get(self) -> None: - """Test case for me_v0_drives_me_get - - Me - """ - pass - - def test_move_artifact_route_v0_artifacts_art_id_move_post(self) -> None: - """Test case for move_artifact_route_v0_artifacts_art_id_move_post - - Rename / move an artifact to a new path - """ - pass - - def test_move_folder_by_id_v0_folders_fld_id_move_post(self) -> None: - """Test case for move_folder_by_id_v0_folders_fld_id_move_post - - Rename / move a folder by stable ID (cascade descendants) - """ - pass - - def test_move_folder_by_path_v0_folders_path_move_post(self) -> None: - """Test case for move_folder_by_path_v0_folders_path_move_post - - Rename / move a folder (cascade-update descendants) - """ - pass - - def test_patch_artifact_route_v0_artifacts_art_id_patch(self) -> None: - """Test case for patch_artifact_route_v0_artifacts_art_id_patch - - Edit artifact metadata (labels / metadata / source) - """ - pass - - def test_patch_folder_by_id_v0_folders_fld_id_patch(self) -> None: - """Test case for patch_folder_by_id_v0_folders_fld_id_patch - - Update folder metadata by stable ID - """ - pass - - def test_patch_folder_by_path_v0_folders_path_patch(self) -> None: - """Test case for patch_folder_by_path_v0_folders_path_patch - - Update folder metadata by path - """ - pass - - def test_patch_grant_route_v0_grants_grn_id_patch(self) -> None: - """Test case for patch_grant_route_v0_grants_grn_id_patch - - Update a grant's role and/or expiry (requires can_manage) - """ - pass - - def test_post_describe_v0_query_describe_post(self) -> None: - """Test case for post_describe_v0_query_describe_post - - Describe a dataset's column schema - """ - pass - - def test_post_feedback_v0_feedback_post(self) -> None: - """Test case for post_feedback_v0_feedback_post - - Post Feedback - """ - pass - - def test_post_lookup_values_v0_query_lookup_values_post(self) -> None: - """Test case for post_lookup_values_v0_query_lookup_values_post - - List distinct values of a dataset column - """ - pass - - def test_post_query_v0_query_post(self) -> None: - """Test case for post_query_v0_query_post - - Run a read-only SQL query over authorized datasets - """ - pass - - def test_put_artifact_v0_artifacts_path_put(self) -> None: - """Test case for put_artifact_v0_artifacts_path_put - - Upload (or overwrite) an artifact - """ - pass - - def test_put_project_v0_projects_fld_id_put(self) -> None: - """Test case for put_project_v0_projects_fld_id_put - - Set a project's compile config (entrypoint/engine/auto_compile) - """ - pass - - def test_redeem_share_s_share_key_get(self) -> None: - """Test case for redeem_share_s_share_key_get - - Redeem Share - """ - pass - - def test_redeem_share_with_password_s_share_key_post(self) -> None: - """Test case for redeem_share_with_password_s_share_key_post - - Redeem Share With Password - """ - pass - - def test_restore_artifact_v0_artifacts_art_id_restore_post(self) -> None: - """Test case for restore_artifact_v0_artifacts_art_id_restore_post - - Restore a soft-deleted artifact - """ - pass - - def test_restore_artifact_version_v0_artifacts_art_id_versions_version_number_restore_post(self) -> None: - """Test case for restore_artifact_version_v0_artifacts_art_id_versions_version_number_restore_post - - Restore a previous version as a new head version - """ - pass - - def test_restore_drive_route_v0_drives_drive_id_restore_post(self) -> None: - """Test case for restore_drive_route_v0_drives_drive_id_restore_post - - Restore a soft-deleted drive - """ - pass - - def test_restore_folder_by_id_v0_folders_fld_id_restore_post(self) -> None: - """Test case for restore_folder_by_id_v0_folders_fld_id_restore_post - - Restore a soft-deleted folder (cascade) - """ - pass - - def test_rotate_share_route_v0_shares_shr_id_rotate_post(self) -> None: - """Test case for rotate_share_route_v0_shares_shr_id_rotate_post - - Revoke + reissue a share link's key (requires can_share) - """ - pass - - def test_search_v0_search_get(self) -> None: - """Test case for search_v0_search_get - - Full-text search over artifacts in the drive - """ - pass - - def test_view_artifact_head_a_art_id_head_get(self) -> None: - """Test case for view_artifact_head_a_art_id_head_get - - View Artifact Head - """ - pass - - def test_view_artifact_version_v_art_id_version_get(self) -> None: - """Test case for view_artifact_version_v_art_id_version_get - - View Artifact Version - """ - pass - - def test_view_file_drive_id_path_get(self) -> None: - """Test case for view_file_drive_id_path_get - - View File - """ - pass - - def test_view_permalink_artifact_a_art_id_get(self) -> None: - """Test case for view_permalink_artifact_a_art_id_get - - View Permalink Artifact - """ - pass - - def test_view_permalink_folder_f_fld_id_get(self) -> None: - """Test case for view_permalink_folder_f_fld_id_get - - View Permalink Folder - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_describe_in.py b/sdk/python/test/test_describe_in.py deleted file mode 100644 index 7a299da..0000000 --- a/sdk/python/test/test_describe_in.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.describe_in import DescribeIn - -class TestDescribeIn(unittest.TestCase): - """DescribeIn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DescribeIn: - """Test DescribeIn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DescribeIn` - """ - model = DescribeIn() - if include_optional: - return DescribeIn( - dataset = '' - ) - else: - return DescribeIn( - dataset = '', - ) - """ - - def testDescribeIn(self): - """Test DescribeIn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_download_url_out.py b/sdk/python/test/test_download_url_out.py deleted file mode 100644 index 7f0ae52..0000000 --- a/sdk/python/test/test_download_url_out.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.download_url_out import DownloadUrlOut - -class TestDownloadUrlOut(unittest.TestCase): - """DownloadUrlOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DownloadUrlOut: - """Test DownloadUrlOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DownloadUrlOut` - """ - model = DownloadUrlOut() - if include_optional: - return DownloadUrlOut( - content_type = '', - direct = True, - download_url = '', - expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - filename = '', - size_bytes = 56 - ) - else: - return DownloadUrlOut( - content_type = '', - direct = True, - download_url = '', - filename = '', - size_bytes = 56, - ) - """ - - def testDownloadUrlOut(self): - """Test DownloadUrlOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_drive_api_key_create_in.py b/sdk/python/test/test_drive_api_key_create_in.py deleted file mode 100644 index 62222ff..0000000 --- a/sdk/python/test/test_drive_api_key_create_in.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.drive_api_key_create_in import DriveApiKeyCreateIn - -class TestDriveApiKeyCreateIn(unittest.TestCase): - """DriveApiKeyCreateIn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DriveApiKeyCreateIn: - """Test DriveApiKeyCreateIn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DriveApiKeyCreateIn` - """ - model = DriveApiKeyCreateIn() - if include_optional: - return DriveApiKeyCreateIn( - label = '0' - ) - else: - return DriveApiKeyCreateIn( - label = '0', - ) - """ - - def testDriveApiKeyCreateIn(self): - """Test DriveApiKeyCreateIn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_drive_api_key_create_out.py b/sdk/python/test/test_drive_api_key_create_out.py deleted file mode 100644 index 35af523..0000000 --- a/sdk/python/test/test_drive_api_key_create_out.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.drive_api_key_create_out import DriveApiKeyCreateOut - -class TestDriveApiKeyCreateOut(unittest.TestCase): - """DriveApiKeyCreateOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DriveApiKeyCreateOut: - """Test DriveApiKeyCreateOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DriveApiKeyCreateOut` - """ - model = DriveApiKeyCreateOut() - if include_optional: - return DriveApiKeyCreateOut( - api_key = '', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - label = '', - prefix = '' - ) - else: - return DriveApiKeyCreateOut( - api_key = '', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - prefix = '', - ) - """ - - def testDriveApiKeyCreateOut(self): - """Test DriveApiKeyCreateOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_drive_api_key_list_out.py b/sdk/python/test/test_drive_api_key_list_out.py deleted file mode 100644 index a9685e6..0000000 --- a/sdk/python/test/test_drive_api_key_list_out.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.drive_api_key_list_out import DriveApiKeyListOut - -class TestDriveApiKeyListOut(unittest.TestCase): - """DriveApiKeyListOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DriveApiKeyListOut: - """Test DriveApiKeyListOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DriveApiKeyListOut` - """ - model = DriveApiKeyListOut() - if include_optional: - return DriveApiKeyListOut( - items = [ - agentdrive_sdk.models.drive_api_key_out.DriveApiKeyOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - label = '', - last_used_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - prefix = '', - revoked_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) - ], - keys = [ - agentdrive_sdk.models.drive_api_key_out.DriveApiKeyOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - label = '', - last_used_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - prefix = '', - revoked_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) - ], - next_cursor = '' - ) - else: - return DriveApiKeyListOut( - items = [ - agentdrive_sdk.models.drive_api_key_out.DriveApiKeyOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - label = '', - last_used_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - prefix = '', - revoked_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) - ], - keys = [ - agentdrive_sdk.models.drive_api_key_out.DriveApiKeyOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - label = '', - last_used_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - prefix = '', - revoked_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) - ], - ) - """ - - def testDriveApiKeyListOut(self): - """Test DriveApiKeyListOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_drive_api_key_out.py b/sdk/python/test/test_drive_api_key_out.py deleted file mode 100644 index 9a75372..0000000 --- a/sdk/python/test/test_drive_api_key_out.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.drive_api_key_out import DriveApiKeyOut - -class TestDriveApiKeyOut(unittest.TestCase): - """DriveApiKeyOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DriveApiKeyOut: - """Test DriveApiKeyOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DriveApiKeyOut` - """ - model = DriveApiKeyOut() - if include_optional: - return DriveApiKeyOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - label = '', - last_used_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - prefix = '', - revoked_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') - ) - else: - return DriveApiKeyOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - prefix = '', - ) - """ - - def testDriveApiKeyOut(self): - """Test DriveApiKeyOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_drive_create_in.py b/sdk/python/test/test_drive_create_in.py deleted file mode 100644 index 846cb5f..0000000 --- a/sdk/python/test/test_drive_create_in.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.drive_create_in import DriveCreateIn - -class TestDriveCreateIn(unittest.TestCase): - """DriveCreateIn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DriveCreateIn: - """Test DriveCreateIn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DriveCreateIn` - """ - model = DriveCreateIn() - if include_optional: - return DriveCreateIn( - name = '0' - ) - else: - return DriveCreateIn( - name = '0', - ) - """ - - def testDriveCreateIn(self): - """Test DriveCreateIn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_drive_create_out.py b/sdk/python/test/test_drive_create_out.py deleted file mode 100644 index d35d7d9..0000000 --- a/sdk/python/test/test_drive_create_out.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.drive_create_out import DriveCreateOut - -class TestDriveCreateOut(unittest.TestCase): - """DriveCreateOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DriveCreateOut: - """Test DriveCreateOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DriveCreateOut` - """ - model = DriveCreateOut() - if include_optional: - return DriveCreateOut( - api_key = '', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - name = '', - organization_id = '', - owner_email = '', - owner_user_id = '', - storage_bytes = 56 - ) - else: - return DriveCreateOut( - api_key = '', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - name = '', - organization_id = '', - storage_bytes = 56, - ) - """ - - def testDriveCreateOut(self): - """Test DriveCreateOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_drive_delete_out.py b/sdk/python/test/test_drive_delete_out.py deleted file mode 100644 index 4edcb2d..0000000 --- a/sdk/python/test/test_drive_delete_out.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.drive_delete_out import DriveDeleteOut - -class TestDriveDeleteOut(unittest.TestCase): - """DriveDeleteOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DriveDeleteOut: - """Test DriveDeleteOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DriveDeleteOut` - """ - model = DriveDeleteOut() - if include_optional: - return DriveDeleteOut( - deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - ok = True, - purge_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - restore_url = '' - ) - else: - return DriveDeleteOut( - deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - purge_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - ) - """ - - def testDriveDeleteOut(self): - """Test DriveDeleteOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_drive_list.py b/sdk/python/test/test_drive_list.py deleted file mode 100644 index ea70ba5..0000000 --- a/sdk/python/test/test_drive_list.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.drive_list import DriveList - -class TestDriveList(unittest.TestCase): - """DriveList unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DriveList: - """Test DriveList - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DriveList` - """ - model = DriveList() - if include_optional: - return DriveList( - items = [ - agentdrive_sdk.models.drive_out.DriveOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - name = '', - organization_id = '', - owner_email = '', - owner_user_id = '', - storage_bytes = 56, ) - ], - next_cursor = '' - ) - else: - return DriveList( - items = [ - agentdrive_sdk.models.drive_out.DriveOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - name = '', - organization_id = '', - owner_email = '', - owner_user_id = '', - storage_bytes = 56, ) - ], - ) - """ - - def testDriveList(self): - """Test DriveList""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_drive_out.py b/sdk/python/test/test_drive_out.py deleted file mode 100644 index cdccbce..0000000 --- a/sdk/python/test/test_drive_out.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.drive_out import DriveOut - -class TestDriveOut(unittest.TestCase): - """DriveOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DriveOut: - """Test DriveOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DriveOut` - """ - model = DriveOut() - if include_optional: - return DriveOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - name = '', - organization_id = '', - owner_email = '', - owner_user_id = '', - storage_bytes = 56 - ) - else: - return DriveOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - name = '', - organization_id = '', - storage_bytes = 56, - ) - """ - - def testDriveOut(self): - """Test DriveOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_drive_read_out.py b/sdk/python/test/test_drive_read_out.py deleted file mode 100644 index b048baa..0000000 --- a/sdk/python/test/test_drive_read_out.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.drive_read_out import DriveReadOut - -class TestDriveReadOut(unittest.TestCase): - """DriveReadOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DriveReadOut: - """Test DriveReadOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DriveReadOut` - """ - model = DriveReadOut() - if include_optional: - return DriveReadOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - email = '', - etag = '', - id = '', - metageneration = 56, - organization_id = '', - storage_bytes = 56, - storage_limit = 56 - ) - else: - return DriveReadOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - etag = '', - id = '', - metageneration = 56, - organization_id = '', - storage_bytes = 56, - storage_limit = 56, - ) - """ - - def testDriveReadOut(self): - """Test DriveReadOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_drive_rename_in.py b/sdk/python/test/test_drive_rename_in.py deleted file mode 100644 index 53524ac..0000000 --- a/sdk/python/test/test_drive_rename_in.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.drive_rename_in import DriveRenameIn - -class TestDriveRenameIn(unittest.TestCase): - """DriveRenameIn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DriveRenameIn: - """Test DriveRenameIn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DriveRenameIn` - """ - model = DriveRenameIn() - if include_optional: - return DriveRenameIn( - name = '0' - ) - else: - return DriveRenameIn( - name = '0', - ) - """ - - def testDriveRenameIn(self): - """Test DriveRenameIn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_drive_restore_out.py b/sdk/python/test/test_drive_restore_out.py deleted file mode 100644 index f77bedc..0000000 --- a/sdk/python/test/test_drive_restore_out.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.drive_restore_out import DriveRestoreOut - -class TestDriveRestoreOut(unittest.TestCase): - """DriveRestoreOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DriveRestoreOut: - """Test DriveRestoreOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DriveRestoreOut` - """ - model = DriveRestoreOut() - if include_optional: - return DriveRestoreOut( - id = '', - rebased_artifact_count = 56, - restored_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') - ) - else: - return DriveRestoreOut( - id = '', - rebased_artifact_count = 56, - restored_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - ) - """ - - def testDriveRestoreOut(self): - """Test DriveRestoreOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_drive_usage_out.py b/sdk/python/test/test_drive_usage_out.py deleted file mode 100644 index 787b2b5..0000000 --- a/sdk/python/test/test_drive_usage_out.py +++ /dev/null @@ -1,145 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.drive_usage_out import DriveUsageOut - -class TestDriveUsageOut(unittest.TestCase): - """DriveUsageOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DriveUsageOut: - """Test DriveUsageOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `DriveUsageOut` - """ - model = DriveUsageOut() - if include_optional: - return DriveUsageOut( - account_footprint = agentdrive_sdk.models.storage_footprint_out.StorageFootprintOut( - as_of = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), - live_bytes = 56, - total_bytes = 56, - trash_bytes = 56, - version_bytes = 56, ), - egress_bytes = agentdrive_sdk.models.usage_counter_out.UsageCounterOut( - limit = 56, - used = 56, ), - footprint = agentdrive_sdk.models.storage_footprint_out.StorageFootprintOut( - as_of = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), - live_bytes = 56, - total_bytes = 56, - trash_bytes = 56, - version_bytes = 56, ), - indexed_bytes = agentdrive_sdk.models.usage_counter_out.UsageCounterOut( - limit = 56, - used = 56, ), - indexing_ops = agentdrive_sdk.models.usage_counter_out.UsageCounterOut( - limit = 56, - used = 56, ), - ops_this_month = agentdrive_sdk.models.operation_usage_out.OperationUsageOut( - reads = 56, - writes = 56, ), - period = agentdrive_sdk.models.usage_period_out.UsagePeriodOut( - ends = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - starts = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - year_month = '', ), - retrieval_queries = agentdrive_sdk.models.usage_counter_out.UsageCounterOut( - limit = 56, - used = 56, ), - storage = agentdrive_sdk.models.usage_counter_out.UsageCounterOut( - limit = 56, - used = 56, ), - storage_breakdown = agentdrive_sdk.models.storage_breakdown_out.StorageBreakdownOut( - as_of = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), - live_bytes = 56, - trash_bytes = 56, - version_bytes = 56, ), - tokens_this_month = agentdrive_sdk.models.token_usage_out.TokenUsageOut( - embed = 56, - llm_cached = 56, - llm_input = 56, - llm_output = 56, ), - version_retention = agentdrive_sdk.models.version_retention_out.VersionRetentionOut( - versions_max = 56, ), - writes_this_hour = agentdrive_sdk.models.hourly_usage_counter_out.HourlyUsageCounterOut( - limit = 56, - reset_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - used = 56, ) - ) - else: - return DriveUsageOut( - account_footprint = agentdrive_sdk.models.storage_footprint_out.StorageFootprintOut( - as_of = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), - live_bytes = 56, - total_bytes = 56, - trash_bytes = 56, - version_bytes = 56, ), - egress_bytes = agentdrive_sdk.models.usage_counter_out.UsageCounterOut( - limit = 56, - used = 56, ), - footprint = agentdrive_sdk.models.storage_footprint_out.StorageFootprintOut( - as_of = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), - live_bytes = 56, - total_bytes = 56, - trash_bytes = 56, - version_bytes = 56, ), - indexed_bytes = agentdrive_sdk.models.usage_counter_out.UsageCounterOut( - limit = 56, - used = 56, ), - indexing_ops = agentdrive_sdk.models.usage_counter_out.UsageCounterOut( - limit = 56, - used = 56, ), - ops_this_month = agentdrive_sdk.models.operation_usage_out.OperationUsageOut( - reads = 56, - writes = 56, ), - period = agentdrive_sdk.models.usage_period_out.UsagePeriodOut( - ends = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - starts = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - year_month = '', ), - retrieval_queries = agentdrive_sdk.models.usage_counter_out.UsageCounterOut( - limit = 56, - used = 56, ), - storage = agentdrive_sdk.models.usage_counter_out.UsageCounterOut( - limit = 56, - used = 56, ), - tokens_this_month = agentdrive_sdk.models.token_usage_out.TokenUsageOut( - embed = 56, - llm_cached = 56, - llm_input = 56, - llm_output = 56, ), - version_retention = agentdrive_sdk.models.version_retention_out.VersionRetentionOut( - versions_max = 56, ), - writes_this_hour = agentdrive_sdk.models.hourly_usage_counter_out.HourlyUsageCounterOut( - limit = 56, - reset_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - used = 56, ), - ) - """ - - def testDriveUsageOut(self): - """Test DriveUsageOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_drives_api.py b/sdk/python/test/test_drives_api.py deleted file mode 100644 index cd0aa34..0000000 --- a/sdk/python/test/test_drives_api.py +++ /dev/null @@ -1,80 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.api.drives_api import DrivesApi - - -class TestDrivesApi(unittest.TestCase): - """DrivesApi unit test stubs""" - - def setUp(self) -> None: - self.api = DrivesApi() - - def tearDown(self) -> None: - pass - - def test_create_drive_key_route_v0_drives_drive_id_keys_post(self) -> None: - """Test case for create_drive_key_route_v0_drives_drive_id_keys_post - - Create a drive API key - """ - pass - - def test_create_drive_route_v0_drives_post(self) -> None: - """Test case for create_drive_route_v0_drives_post - - Create a drive in your active space - """ - pass - - def test_list_drive_keys_route_v0_drives_drive_id_keys_get(self) -> None: - """Test case for list_drive_keys_route_v0_drives_drive_id_keys_get - - List a drive's API keys - """ - pass - - def test_list_drives_route_v0_drives_get(self) -> None: - """Test case for list_drives_route_v0_drives_get - - List the drives you can see - """ - pass - - def test_rename_drive_route_v0_drives_drive_id_patch(self) -> None: - """Test case for rename_drive_route_v0_drives_drive_id_patch - - Rename a drive you own - """ - pass - - def test_revoke_drive_key_route_v0_drives_drive_id_keys_key_id_revoke_post(self) -> None: - """Test case for revoke_drive_key_route_v0_drives_drive_id_keys_key_id_revoke_post - - Revoke a drive API key - """ - pass - - def test_rotate_one_key_route_v0_drives_drive_id_keys_key_id_rotate_post(self) -> None: - """Test case for rotate_one_key_route_v0_drives_drive_id_keys_key_id_rotate_post - - Rotate one API key - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_error_body.py b/sdk/python/test/test_error_body.py deleted file mode 100644 index 09eddf8..0000000 --- a/sdk/python/test/test_error_body.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.error_body import ErrorBody - -class TestErrorBody(unittest.TestCase): - """ErrorBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ErrorBody: - """Test ErrorBody - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ErrorBody` - """ - model = ErrorBody() - if include_optional: - return ErrorBody( - code = '', - message = '' - ) - else: - return ErrorBody( - code = '', - message = '', - ) - """ - - def testErrorBody(self): - """Test ErrorBody""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_error_detail.py b/sdk/python/test/test_error_detail.py deleted file mode 100644 index a8a0fd7..0000000 --- a/sdk/python/test/test_error_detail.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.error_detail import ErrorDetail - -class TestErrorDetail(unittest.TestCase): - """ErrorDetail unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ErrorDetail: - """Test ErrorDetail - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ErrorDetail` - """ - model = ErrorDetail() - if include_optional: - return ErrorDetail( - error = { } - ) - else: - return ErrorDetail( - error = { }, - ) - """ - - def testErrorDetail(self): - """Test ErrorDetail""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_error_response.py b/sdk/python/test/test_error_response.py deleted file mode 100644 index d68ffa4..0000000 --- a/sdk/python/test/test_error_response.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.error_response import ErrorResponse - -class TestErrorResponse(unittest.TestCase): - """ErrorResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ErrorResponse: - """Test ErrorResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ErrorResponse` - """ - model = ErrorResponse() - if include_optional: - return ErrorResponse( - detail = { } - ) - else: - return ErrorResponse( - detail = { }, - ) - """ - - def testErrorResponse(self): - """Test ErrorResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_event_out.py b/sdk/python/test/test_event_out.py deleted file mode 100644 index 8fa4ff6..0000000 --- a/sdk/python/test/test_event_out.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.event_out import EventOut - -class TestEventOut(unittest.TestCase): - """EventOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EventOut: - """Test EventOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EventOut` - """ - model = EventOut() - if include_optional: - return EventOut( - action = '', - actor_name = '', - art_id = '', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - drive_id = '', - id = '', - metadata = { } - ) - else: - return EventOut( - action = '', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - drive_id = '', - id = '', - ) - """ - - def testEventOut(self): - """Test EventOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_event_page.py b/sdk/python/test/test_event_page.py deleted file mode 100644 index b8f3490..0000000 --- a/sdk/python/test/test_event_page.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.event_page import EventPage - -class TestEventPage(unittest.TestCase): - """EventPage unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> EventPage: - """Test EventPage - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `EventPage` - """ - model = EventPage() - if include_optional: - return EventPage( - items = [ - agentdrive_sdk.models.event_out.EventOut( - action = '', - actor_name = '', - art_id = '', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - drive_id = '', - id = '', - metadata = { }, ) - ], - next_cursor = '' - ) - else: - return EventPage( - items = [ - agentdrive_sdk.models.event_out.EventOut( - action = '', - actor_name = '', - art_id = '', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - drive_id = '', - id = '', - metadata = { }, ) - ], - ) - """ - - def testEventPage(self): - """Test EventPage""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_extension_exchange_request.py b/sdk/python/test/test_extension_exchange_request.py deleted file mode 100644 index 04932a1..0000000 --- a/sdk/python/test/test_extension_exchange_request.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.extension_exchange_request import ExtensionExchangeRequest - -class TestExtensionExchangeRequest(unittest.TestCase): - """ExtensionExchangeRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ExtensionExchangeRequest: - """Test ExtensionExchangeRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ExtensionExchangeRequest` - """ - model = ExtensionExchangeRequest() - if include_optional: - return ExtensionExchangeRequest( - ext_id = '', - ticket = '' - ) - else: - return ExtensionExchangeRequest( - ext_id = '', - ticket = '', - ) - """ - - def testExtensionExchangeRequest(self): - """Test ExtensionExchangeRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_extension_exchange_response.py b/sdk/python/test/test_extension_exchange_response.py deleted file mode 100644 index 6790df8..0000000 --- a/sdk/python/test/test_extension_exchange_response.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.extension_exchange_response import ExtensionExchangeResponse - -class TestExtensionExchangeResponse(unittest.TestCase): - """ExtensionExchangeResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ExtensionExchangeResponse: - """Test ExtensionExchangeResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ExtensionExchangeResponse` - """ - model = ExtensionExchangeResponse() - if include_optional: - return ExtensionExchangeResponse( - access_token = '', - drive_id = '', - expires_in = 56, - identity_assertion = '', - scope = 'extension', - token_type = 'Bearer' - ) - else: - return ExtensionExchangeResponse( - access_token = '', - drive_id = '', - expires_in = 56, - identity_assertion = '', - ) - """ - - def testExtensionExchangeResponse(self): - """Test ExtensionExchangeResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_feedback_create_out.py b/sdk/python/test/test_feedback_create_out.py deleted file mode 100644 index 7354b87..0000000 --- a/sdk/python/test/test_feedback_create_out.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.feedback_create_out import FeedbackCreateOut - -class TestFeedbackCreateOut(unittest.TestCase): - """FeedbackCreateOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> FeedbackCreateOut: - """Test FeedbackCreateOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `FeedbackCreateOut` - """ - model = FeedbackCreateOut() - if include_optional: - return FeedbackCreateOut( - contact = True, - id = '', - note = '', - status = '' - ) - else: - return FeedbackCreateOut( - contact = True, - id = '', - status = '', - ) - """ - - def testFeedbackCreateOut(self): - """Test FeedbackCreateOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_feedback_status_out.py b/sdk/python/test/test_feedback_status_out.py deleted file mode 100644 index 9378b6c..0000000 --- a/sdk/python/test/test_feedback_status_out.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.feedback_status_out import FeedbackStatusOut - -class TestFeedbackStatusOut(unittest.TestCase): - """FeedbackStatusOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> FeedbackStatusOut: - """Test FeedbackStatusOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `FeedbackStatusOut` - """ - model = FeedbackStatusOut() - if include_optional: - return FeedbackStatusOut( - contact = True, - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - duplicate_of = '', - id = '', - kind = '', - status = '', - status_changed_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - title = '' - ) - else: - return FeedbackStatusOut( - contact = True, - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - kind = '', - status = '', - status_changed_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - title = '', - ) - """ - - def testFeedbackStatusOut(self): - """Test FeedbackStatusOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_find_hit_out.py b/sdk/python/test/test_find_hit_out.py deleted file mode 100644 index aa8d9a2..0000000 --- a/sdk/python/test/test_find_hit_out.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.find_hit_out import FindHitOut - -class TestFindHitOut(unittest.TestCase): - """FindHitOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> FindHitOut: - """Test FindHitOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `FindHitOut` - """ - model = FindHitOut() - if include_optional: - return FindHitOut( - art_id = '', - char_end = 56, - char_start = 56, - content_type = '', - drive_id = '', - file_type = '', - labels = [ - '' - ], - modality = 'text', - ord = 56, - page_end = 56, - page_start = 56, - path = '', - rank_lexical = 56, - rank_semantic = 56, - score = 1.337, - snippet = '', - text = '', - time_end_ms = 56, - time_start_ms = 56, - updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - url = '', - version_number = 56 - ) - else: - return FindHitOut( - art_id = '', - content_type = '', - drive_id = '', - file_type = '', - modality = 'text', - ord = 56, - path = '', - score = 1.337, - snippet = '', - text = '', - updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - url = '', - version_number = 56, - ) - """ - - def testFindHitOut(self): - """Test FindHitOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_find_page.py b/sdk/python/test/test_find_page.py deleted file mode 100644 index 6377477..0000000 --- a/sdk/python/test/test_find_page.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.find_page import FindPage - -class TestFindPage(unittest.TestCase): - """FindPage unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> FindPage: - """Test FindPage - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `FindPage` - """ - model = FindPage() - if include_optional: - return FindPage( - items = [ - agentdrive_sdk.models.find_hit_out.FindHitOut( - art_id = '', - char_end = 56, - char_start = 56, - content_type = '', - drive_id = '', - file_type = '', - labels = [ - '' - ], - modality = 'text', - ord = 56, - page_end = 56, - page_start = 56, - path = '', - rank_lexical = 56, - rank_semantic = 56, - score = 1.337, - snippet = '', - text = '', - time_end_ms = 56, - time_start_ms = 56, - updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - url = '', - version_number = 56, ) - ] - ) - else: - return FindPage( - items = [ - agentdrive_sdk.models.find_hit_out.FindHitOut( - art_id = '', - char_end = 56, - char_start = 56, - content_type = '', - drive_id = '', - file_type = '', - labels = [ - '' - ], - modality = 'text', - ord = 56, - page_end = 56, - page_start = 56, - path = '', - rank_lexical = 56, - rank_semantic = 56, - score = 1.337, - snippet = '', - text = '', - time_end_ms = 56, - time_start_ms = 56, - updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - url = '', - version_number = 56, ) - ], - ) - """ - - def testFindPage(self): - """Test FindPage""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_folder_copy_in.py b/sdk/python/test/test_folder_copy_in.py deleted file mode 100644 index c9980a3..0000000 --- a/sdk/python/test/test_folder_copy_in.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.folder_copy_in import FolderCopyIn - -class TestFolderCopyIn(unittest.TestCase): - """FolderCopyIn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> FolderCopyIn: - """Test FolderCopyIn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `FolderCopyIn` - """ - model = FolderCopyIn() - if include_optional: - return FolderCopyIn( - from_metageneration = 56, - path = '' - ) - else: - return FolderCopyIn( - path = '', - ) - """ - - def testFolderCopyIn(self): - """Test FolderCopyIn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_folder_copy_out.py b/sdk/python/test/test_folder_copy_out.py deleted file mode 100644 index ca23609..0000000 --- a/sdk/python/test/test_folder_copy_out.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.folder_copy_out import FolderCopyOut - -class TestFolderCopyOut(unittest.TestCase): - """FolderCopyOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> FolderCopyOut: - """Test FolderCopyOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `FolderCopyOut` - """ - model = FolderCopyOut() - if include_optional: - return FolderCopyOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - description = '', - drive_id = '', - etag = '', - from_fld_id = '', - id = '', - inherit_grants = True, - metageneration = 56, - n_artifacts_copied = 56, - path = '', - purge_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') - ) - else: - return FolderCopyOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - drive_id = '', - etag = '', - from_fld_id = '', - id = '', - n_artifacts_copied = 56, - path = '', - updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - ) - """ - - def testFolderCopyOut(self): - """Test FolderCopyOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_folder_create_in.py b/sdk/python/test/test_folder_create_in.py deleted file mode 100644 index 29be28f..0000000 --- a/sdk/python/test/test_folder_create_in.py +++ /dev/null @@ -1,51 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.folder_create_in import FolderCreateIn - -class TestFolderCreateIn(unittest.TestCase): - """FolderCreateIn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> FolderCreateIn: - """Test FolderCreateIn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `FolderCreateIn` - """ - model = FolderCreateIn() - if include_optional: - return FolderCreateIn( - description = '' - ) - else: - return FolderCreateIn( - ) - """ - - def testFolderCreateIn(self): - """Test FolderCreateIn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_folder_delete_out.py b/sdk/python/test/test_folder_delete_out.py deleted file mode 100644 index 1e9a2e3..0000000 --- a/sdk/python/test/test_folder_delete_out.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.folder_delete_out import FolderDeleteOut - -class TestFolderDeleteOut(unittest.TestCase): - """FolderDeleteOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> FolderDeleteOut: - """Test FolderDeleteOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `FolderDeleteOut` - """ - model = FolderDeleteOut() - if include_optional: - return FolderDeleteOut( - deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - n_artifacts_deleted = 56, - n_subfolders_deleted = 56, - ok = True, - path = '', - purge_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - retention_days = 56 - ) - else: - return FolderDeleteOut( - deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - n_artifacts_deleted = 56, - n_subfolders_deleted = 56, - path = '', - purge_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - retention_days = 56, - ) - """ - - def testFolderDeleteOut(self): - """Test FolderDeleteOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_folder_move_in.py b/sdk/python/test/test_folder_move_in.py deleted file mode 100644 index 38d7cc9..0000000 --- a/sdk/python/test/test_folder_move_in.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.folder_move_in import FolderMoveIn - -class TestFolderMoveIn(unittest.TestCase): - """FolderMoveIn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> FolderMoveIn: - """Test FolderMoveIn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `FolderMoveIn` - """ - model = FolderMoveIn() - if include_optional: - return FolderMoveIn( - path = '' - ) - else: - return FolderMoveIn( - path = '', - ) - """ - - def testFolderMoveIn(self): - """Test FolderMoveIn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_folder_out.py b/sdk/python/test/test_folder_out.py deleted file mode 100644 index 775a2b2..0000000 --- a/sdk/python/test/test_folder_out.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.folder_out import FolderOut - -class TestFolderOut(unittest.TestCase): - """FolderOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> FolderOut: - """Test FolderOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `FolderOut` - """ - model = FolderOut() - if include_optional: - return FolderOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - description = '', - drive_id = '', - etag = '', - id = '', - inherit_grants = True, - metageneration = 56, - path = '', - purge_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') - ) - else: - return FolderOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - drive_id = '', - etag = '', - id = '', - path = '', - updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - ) - """ - - def testFolderOut(self): - """Test FolderOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_folder_patch_in.py b/sdk/python/test/test_folder_patch_in.py deleted file mode 100644 index 7be8126..0000000 --- a/sdk/python/test/test_folder_patch_in.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.folder_patch_in import FolderPatchIn - -class TestFolderPatchIn(unittest.TestCase): - """FolderPatchIn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> FolderPatchIn: - """Test FolderPatchIn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `FolderPatchIn` - """ - model = FolderPatchIn() - if include_optional: - return FolderPatchIn( - description = '', - inherit_grants = True - ) - else: - return FolderPatchIn( - ) - """ - - def testFolderPatchIn(self): - """Test FolderPatchIn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_folder_restore_out.py b/sdk/python/test/test_folder_restore_out.py deleted file mode 100644 index 9177756..0000000 --- a/sdk/python/test/test_folder_restore_out.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.folder_restore_out import FolderRestoreOut - -class TestFolderRestoreOut(unittest.TestCase): - """FolderRestoreOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> FolderRestoreOut: - """Test FolderRestoreOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `FolderRestoreOut` - """ - model = FolderRestoreOut() - if include_optional: - return FolderRestoreOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - description = '', - drive_id = '', - etag = '', - id = '', - inherit_grants = True, - metageneration = 56, - n_artifacts_restored = 56, - n_subfolders_restored = 56, - path = '', - purge_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') - ) - else: - return FolderRestoreOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - drive_id = '', - etag = '', - id = '', - n_artifacts_restored = 56, - n_subfolders_restored = 56, - path = '', - updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - ) - """ - - def testFolderRestoreOut(self): - """Test FolderRestoreOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_grant_create_in.py b/sdk/python/test/test_grant_create_in.py deleted file mode 100644 index fdfa46c..0000000 --- a/sdk/python/test/test_grant_create_in.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.grant_create_in import GrantCreateIn - -class TestGrantCreateIn(unittest.TestCase): - """GrantCreateIn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GrantCreateIn: - """Test GrantCreateIn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GrantCreateIn` - """ - model = GrantCreateIn() - if include_optional: - return GrantCreateIn( - expires_in = 56, - principal = agentdrive_sdk.models.grant_principal_in.GrantPrincipalIn( - email = '', - id = '', - type = 'user', ), - resource = '', - role = 'viewer' - ) - else: - return GrantCreateIn( - principal = agentdrive_sdk.models.grant_principal_in.GrantPrincipalIn( - email = '', - id = '', - type = 'user', ), - resource = '', - role = 'viewer', - ) - """ - - def testGrantCreateIn(self): - """Test GrantCreateIn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_grant_list.py b/sdk/python/test/test_grant_list.py deleted file mode 100644 index 00b88b2..0000000 --- a/sdk/python/test/test_grant_list.py +++ /dev/null @@ -1,83 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.grant_list import GrantList - -class TestGrantList(unittest.TestCase): - """GrantList unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GrantList: - """Test GrantList - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GrantList` - """ - model = GrantList() - if include_optional: - return GrantList( - items = [ - agentdrive_sdk.models.grant_out.GrantOut( - artifacts_affected = 56, - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - granted_by_id = '', - granted_by_type = '', - id = '', - on_behalf_of = '', - principal_email = '', - principal_id = '', - principal_type = 'user', - resource_id = '', - resource_type = 'artifact', - role = 'viewer', ) - ], - next_cursor = '' - ) - else: - return GrantList( - items = [ - agentdrive_sdk.models.grant_out.GrantOut( - artifacts_affected = 56, - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - granted_by_id = '', - granted_by_type = '', - id = '', - on_behalf_of = '', - principal_email = '', - principal_id = '', - principal_type = 'user', - resource_id = '', - resource_type = 'artifact', - role = 'viewer', ) - ], - ) - """ - - def testGrantList(self): - """Test GrantList""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_grant_out.py b/sdk/python/test/test_grant_out.py deleted file mode 100644 index b6b8498..0000000 --- a/sdk/python/test/test_grant_out.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.grant_out import GrantOut - -class TestGrantOut(unittest.TestCase): - """GrantOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GrantOut: - """Test GrantOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GrantOut` - """ - model = GrantOut() - if include_optional: - return GrantOut( - artifacts_affected = 56, - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - granted_by_id = '', - granted_by_type = '', - id = '', - on_behalf_of = '', - principal_email = '', - principal_id = '', - principal_type = 'user', - resource_id = '', - resource_type = 'artifact', - role = 'viewer' - ) - else: - return GrantOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - granted_by_id = '', - granted_by_type = '', - id = '', - principal_type = 'user', - resource_id = '', - resource_type = 'artifact', - role = 'viewer', - ) - """ - - def testGrantOut(self): - """Test GrantOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_grant_patch_in.py b/sdk/python/test/test_grant_patch_in.py deleted file mode 100644 index 8c7dcef..0000000 --- a/sdk/python/test/test_grant_patch_in.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.grant_patch_in import GrantPatchIn - -class TestGrantPatchIn(unittest.TestCase): - """GrantPatchIn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GrantPatchIn: - """Test GrantPatchIn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GrantPatchIn` - """ - model = GrantPatchIn() - if include_optional: - return GrantPatchIn( - expires_in = 56, - role = 'viewer' - ) - else: - return GrantPatchIn( - ) - """ - - def testGrantPatchIn(self): - """Test GrantPatchIn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_grant_principal_in.py b/sdk/python/test/test_grant_principal_in.py deleted file mode 100644 index 686f373..0000000 --- a/sdk/python/test/test_grant_principal_in.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.grant_principal_in import GrantPrincipalIn - -class TestGrantPrincipalIn(unittest.TestCase): - """GrantPrincipalIn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GrantPrincipalIn: - """Test GrantPrincipalIn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GrantPrincipalIn` - """ - model = GrantPrincipalIn() - if include_optional: - return GrantPrincipalIn( - email = '', - id = '', - type = 'user' - ) - else: - return GrantPrincipalIn( - type = 'user', - ) - """ - - def testGrantPrincipalIn(self): - """Test GrantPrincipalIn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_health_degraded_detail.py b/sdk/python/test/test_health_degraded_detail.py deleted file mode 100644 index 04ed32b..0000000 --- a/sdk/python/test/test_health_degraded_detail.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.health_degraded_detail import HealthDegradedDetail - -class TestHealthDegradedDetail(unittest.TestCase): - """HealthDegradedDetail unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> HealthDegradedDetail: - """Test HealthDegradedDetail - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `HealthDegradedDetail` - """ - model = HealthDegradedDetail() - if include_optional: - return HealthDegradedDetail( - error = '', - status = 'degraded' - ) - else: - return HealthDegradedDetail( - error = '', - status = 'degraded', - ) - """ - - def testHealthDegradedDetail(self): - """Test HealthDegradedDetail""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_health_degraded_response.py b/sdk/python/test/test_health_degraded_response.py deleted file mode 100644 index 0dcd5ec..0000000 --- a/sdk/python/test/test_health_degraded_response.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.health_degraded_response import HealthDegradedResponse - -class TestHealthDegradedResponse(unittest.TestCase): - """HealthDegradedResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> HealthDegradedResponse: - """Test HealthDegradedResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `HealthDegradedResponse` - """ - model = HealthDegradedResponse() - if include_optional: - return HealthDegradedResponse( - detail = agentdrive_sdk.models.health_degraded_detail.HealthDegradedDetail( - error = '', - status = 'degraded', ) - ) - else: - return HealthDegradedResponse( - detail = agentdrive_sdk.models.health_degraded_detail.HealthDegradedDetail( - error = '', - status = 'degraded', ), - ) - """ - - def testHealthDegradedResponse(self): - """Test HealthDegradedResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_health_out.py b/sdk/python/test/test_health_out.py deleted file mode 100644 index 1557dc7..0000000 --- a/sdk/python/test/test_health_out.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.health_out import HealthOut - -class TestHealthOut(unittest.TestCase): - """HealthOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> HealthOut: - """Test HealthOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `HealthOut` - """ - model = HealthOut() - if include_optional: - return HealthOut( - status = 'ok' - ) - else: - return HealthOut( - status = 'ok', - ) - """ - - def testHealthOut(self): - """Test HealthOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_hourly_usage_counter_out.py b/sdk/python/test/test_hourly_usage_counter_out.py deleted file mode 100644 index 4b53e3d..0000000 --- a/sdk/python/test/test_hourly_usage_counter_out.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.hourly_usage_counter_out import HourlyUsageCounterOut - -class TestHourlyUsageCounterOut(unittest.TestCase): - """HourlyUsageCounterOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> HourlyUsageCounterOut: - """Test HourlyUsageCounterOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `HourlyUsageCounterOut` - """ - model = HourlyUsageCounterOut() - if include_optional: - return HourlyUsageCounterOut( - limit = 56, - reset_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - used = 56 - ) - else: - return HourlyUsageCounterOut( - limit = 56, - reset_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - used = 56, - ) - """ - - def testHourlyUsageCounterOut(self): - """Test HourlyUsageCounterOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_identity_assertion_metadata_out.py b/sdk/python/test/test_identity_assertion_metadata_out.py deleted file mode 100644 index e73c28a..0000000 --- a/sdk/python/test/test_identity_assertion_metadata_out.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.identity_assertion_metadata_out import IdentityAssertionMetadataOut - -class TestIdentityAssertionMetadataOut(unittest.TestCase): - """IdentityAssertionMetadataOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> IdentityAssertionMetadataOut: - """Test IdentityAssertionMetadataOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `IdentityAssertionMetadataOut` - """ - model = IdentityAssertionMetadataOut() - if include_optional: - return IdentityAssertionMetadataOut( - alg = '', - iss = '', - version = 56 - ) - else: - return IdentityAssertionMetadataOut( - alg = '', - iss = '', - version = 56, - ) - """ - - def testIdentityAssertionMetadataOut(self): - """Test IdentityAssertionMetadataOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_invitation_list.py b/sdk/python/test/test_invitation_list.py deleted file mode 100644 index c4ae38f..0000000 --- a/sdk/python/test/test_invitation_list.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.invitation_list import InvitationList - -class TestInvitationList(unittest.TestCase): - """InvitationList unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> InvitationList: - """Test InvitationList - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `InvitationList` - """ - model = InvitationList() - if include_optional: - return InvitationList( - items = [ - agentdrive_sdk.models.invitation_out.InvitationOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - email = '', - expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - invited_by = '', - organization_id = '', - role = 'admin', - status = 'pending', ) - ], - next_cursor = '' - ) - else: - return InvitationList( - items = [ - agentdrive_sdk.models.invitation_out.InvitationOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - email = '', - expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - invited_by = '', - organization_id = '', - role = 'admin', - status = 'pending', ) - ], - ) - """ - - def testInvitationList(self): - """Test InvitationList""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_invitation_out.py b/sdk/python/test/test_invitation_out.py deleted file mode 100644 index 800be2a..0000000 --- a/sdk/python/test/test_invitation_out.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.invitation_out import InvitationOut - -class TestInvitationOut(unittest.TestCase): - """InvitationOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> InvitationOut: - """Test InvitationOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `InvitationOut` - """ - model = InvitationOut() - if include_optional: - return InvitationOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - email = '', - expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - invited_by = '', - organization_id = '', - role = 'admin', - status = 'pending' - ) - else: - return InvitationOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - email = '', - expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - organization_id = '', - role = 'admin', - status = 'pending', - ) - """ - - def testInvitationOut(self): - """Test InvitationOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_invite_create_out.py b/sdk/python/test/test_invite_create_out.py deleted file mode 100644 index 7ccc91b..0000000 --- a/sdk/python/test/test_invite_create_out.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.invite_create_out import InviteCreateOut - -class TestInviteCreateOut(unittest.TestCase): - """InviteCreateOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> InviteCreateOut: - """Test InviteCreateOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `InviteCreateOut` - """ - model = InviteCreateOut() - if include_optional: - return InviteCreateOut( - already_member = True, - email_delivered = True, - invitation = agentdrive_sdk.models.invitation_out.InvitationOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - email = '', - expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - invited_by = '', - organization_id = '', - role = 'admin', - status = 'pending', ) - ) - else: - return InviteCreateOut( - ) - """ - - def testInviteCreateOut(self): - """Test InviteCreateOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_jwk_out.py b/sdk/python/test/test_jwk_out.py deleted file mode 100644 index 539cd0d..0000000 --- a/sdk/python/test/test_jwk_out.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.jwk_out import JwkOut - -class TestJwkOut(unittest.TestCase): - """JwkOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> JwkOut: - """Test JwkOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `JwkOut` - """ - model = JwkOut() - if include_optional: - return JwkOut( - alg = '', - e = '', - kid = '', - kty = '', - n = '', - use = '' - ) - else: - return JwkOut( - alg = '', - e = '', - kid = '', - kty = '', - n = '', - use = '', - ) - """ - - def testJwkOut(self): - """Test JwkOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_jwks_out.py b/sdk/python/test/test_jwks_out.py deleted file mode 100644 index cbd41eb..0000000 --- a/sdk/python/test/test_jwks_out.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.jwks_out import JwksOut - -class TestJwksOut(unittest.TestCase): - """JwksOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> JwksOut: - """Test JwksOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `JwksOut` - """ - model = JwksOut() - if include_optional: - return JwksOut( - keys = [ - { } - ] - ) - else: - return JwksOut( - keys = [ - { } - ], - ) - """ - - def testJwksOut(self): - """Test JwksOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_loc_inner.py b/sdk/python/test/test_loc_inner.py deleted file mode 100644 index 082ed2b..0000000 --- a/sdk/python/test/test_loc_inner.py +++ /dev/null @@ -1,50 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.loc_inner import LocInner - -class TestLocInner(unittest.TestCase): - """LocInner unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> LocInner: - """Test LocInner - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `LocInner` - """ - model = LocInner() - if include_optional: - return LocInner( - ) - else: - return LocInner( - ) - """ - - def testLocInner(self): - """Test LocInner""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_lookup_values_in.py b/sdk/python/test/test_lookup_values_in.py deleted file mode 100644 index 8a03c20..0000000 --- a/sdk/python/test/test_lookup_values_in.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.lookup_values_in import LookupValuesIn - -class TestLookupValuesIn(unittest.TestCase): - """LookupValuesIn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> LookupValuesIn: - """Test LookupValuesIn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `LookupValuesIn` - """ - model = LookupValuesIn() - if include_optional: - return LookupValuesIn( - column = '', - dataset = '', - limit = 56 - ) - else: - return LookupValuesIn( - column = '', - dataset = '', - ) - """ - - def testLookupValuesIn(self): - """Test LookupValuesIn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_lookup_values_out.py b/sdk/python/test/test_lookup_values_out.py deleted file mode 100644 index 5524d50..0000000 --- a/sdk/python/test/test_lookup_values_out.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.lookup_values_out import LookupValuesOut - -class TestLookupValuesOut(unittest.TestCase): - """LookupValuesOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> LookupValuesOut: - """Test LookupValuesOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `LookupValuesOut` - """ - model = LookupValuesOut() - if include_optional: - return LookupValuesOut( - column = '', - dataset = '', - values = [ - null - ] - ) - else: - return LookupValuesOut( - column = '', - dataset = '', - values = [ - null - ], - ) - """ - - def testLookupValuesOut(self): - """Test LookupValuesOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_mcp_oauth_api.py b/sdk/python/test/test_mcp_oauth_api.py deleted file mode 100644 index cd6bcd4..0000000 --- a/sdk/python/test/test_mcp_oauth_api.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.api.mcp_oauth_api import McpOauthApi - - -class TestMcpOauthApi(unittest.TestCase): - """McpOauthApi unit test stubs""" - - def setUp(self) -> None: - self.api = McpOauthApi() - - def tearDown(self) -> None: - pass - - def test_oauth2_register_oauth2_register_post(self) -> None: - """Test case for oauth2_register_oauth2_register_post - - Dynamic Client Registration (RFC 7591) - """ - pass - - def test_oauth2_revoke_oauth2_revoke_post(self) -> None: - """Test case for oauth2_revoke_oauth2_revoke_post - - Token revocation (RFC 7009) - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_mcp_oauth_ui_api.py b/sdk/python/test/test_mcp_oauth_ui_api.py deleted file mode 100644 index 0721847..0000000 --- a/sdk/python/test/test_mcp_oauth_ui_api.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.api.mcp_oauth_ui_api import McpOauthUiApi - - -class TestMcpOauthUiApi(unittest.TestCase): - """McpOauthUiApi unit test stubs""" - - def setUp(self) -> None: - self.api = McpOauthUiApi() - - def tearDown(self) -> None: - pass - - def test_authorize_decision_oauth2_authorize_post(self) -> None: - """Test case for authorize_decision_oauth2_authorize_post - - Authorize Decision - """ - pass - - def test_authorize_page_oauth2_authorize_get(self) -> None: - """Test case for authorize_page_oauth2_authorize_get - - Authorize Page - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_member_invite_in.py b/sdk/python/test/test_member_invite_in.py deleted file mode 100644 index c2a3837..0000000 --- a/sdk/python/test/test_member_invite_in.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.member_invite_in import MemberInviteIn - -class TestMemberInviteIn(unittest.TestCase): - """MemberInviteIn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> MemberInviteIn: - """Test MemberInviteIn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `MemberInviteIn` - """ - model = MemberInviteIn() - if include_optional: - return MemberInviteIn( - email = '012', - role = 'member' - ) - else: - return MemberInviteIn( - email = '012', - ) - """ - - def testMemberInviteIn(self): - """Test MemberInviteIn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_member_list.py b/sdk/python/test/test_member_list.py deleted file mode 100644 index 79c566b..0000000 --- a/sdk/python/test/test_member_list.py +++ /dev/null @@ -1,69 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.member_list import MemberList - -class TestMemberList(unittest.TestCase): - """MemberList unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> MemberList: - """Test MemberList - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `MemberList` - """ - model = MemberList() - if include_optional: - return MemberList( - items = [ - agentdrive_sdk.models.member_out.MemberOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - email = '', - first_name = '', - last_name = '', - role = 'admin', - user_id = '', ) - ], - next_cursor = '' - ) - else: - return MemberList( - items = [ - agentdrive_sdk.models.member_out.MemberOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - email = '', - first_name = '', - last_name = '', - role = 'admin', - user_id = '', ) - ], - ) - """ - - def testMemberList(self): - """Test MemberList""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_member_out.py b/sdk/python/test/test_member_out.py deleted file mode 100644 index 5286a8d..0000000 --- a/sdk/python/test/test_member_out.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.member_out import MemberOut - -class TestMemberOut(unittest.TestCase): - """MemberOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> MemberOut: - """Test MemberOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `MemberOut` - """ - model = MemberOut() - if include_optional: - return MemberOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - email = '', - first_name = '', - last_name = '', - role = 'admin', - user_id = '' - ) - else: - return MemberOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - email = '', - role = 'admin', - user_id = '', - ) - """ - - def testMemberOut(self): - """Test MemberOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_member_remove_out.py b/sdk/python/test/test_member_remove_out.py deleted file mode 100644 index 88b5ca4..0000000 --- a/sdk/python/test/test_member_remove_out.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.member_remove_out import MemberRemoveOut - -class TestMemberRemoveOut(unittest.TestCase): - """MemberRemoveOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> MemberRemoveOut: - """Test MemberRemoveOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `MemberRemoveOut` - """ - model = MemberRemoveOut() - if include_optional: - return MemberRemoveOut( - id = '', - ok = True, - organization_id = '' - ) - else: - return MemberRemoveOut( - id = '', - organization_id = '', - ) - """ - - def testMemberRemoveOut(self): - """Test MemberRemoveOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_member_role_in.py b/sdk/python/test/test_member_role_in.py deleted file mode 100644 index 9de6d10..0000000 --- a/sdk/python/test/test_member_role_in.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.member_role_in import MemberRoleIn - -class TestMemberRoleIn(unittest.TestCase): - """MemberRoleIn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> MemberRoleIn: - """Test MemberRoleIn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `MemberRoleIn` - """ - model = MemberRoleIn() - if include_optional: - return MemberRoleIn( - role = 'admin' - ) - else: - return MemberRoleIn( - role = 'admin', - ) - """ - - def testMemberRoleIn(self): - """Test MemberRoleIn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_members_api.py b/sdk/python/test/test_members_api.py deleted file mode 100644 index 3d7cd30..0000000 --- a/sdk/python/test/test_members_api.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.api.members_api import MembersApi - - -class TestMembersApi(unittest.TestCase): - """MembersApi unit test stubs""" - - def setUp(self) -> None: - self.api = MembersApi() - - def tearDown(self) -> None: - pass - - def test_invite_member_v0_members_invite_post(self) -> None: - """Test case for invite_member_v0_members_invite_post - - Invite a person to your workspace by email - """ - pass - - def test_list_invitations_v0_invitations_get(self) -> None: - """Test case for list_invitations_v0_invitations_get - - List pending invitations - """ - pass - - def test_list_members_v0_members_get(self) -> None: - """Test case for list_members_v0_members_get - - List the members of your active workspace - """ - pass - - def test_remove_member_v0_members_target_user_id_delete(self) -> None: - """Test case for remove_member_v0_members_target_user_id_delete - - Remove a member (or leave) - """ - pass - - def test_revoke_invitation_v0_invitations_invitation_id_delete(self) -> None: - """Test case for revoke_invitation_v0_invitations_invitation_id_delete - - Revoke a pending invitation - """ - pass - - def test_set_member_role_v0_members_target_user_id_patch(self) -> None: - """Test case for set_member_role_v0_members_target_user_id_patch - - Change a member's role - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_o_auth_protocol_error_out.py b/sdk/python/test/test_o_auth_protocol_error_out.py deleted file mode 100644 index 846054b..0000000 --- a/sdk/python/test/test_o_auth_protocol_error_out.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.o_auth_protocol_error_out import OAuthProtocolErrorOut - -class TestOAuthProtocolErrorOut(unittest.TestCase): - """OAuthProtocolErrorOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OAuthProtocolErrorOut: - """Test OAuthProtocolErrorOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OAuthProtocolErrorOut` - """ - model = OAuthProtocolErrorOut() - if include_optional: - return OAuthProtocolErrorOut( - error = '', - error_description = '' - ) - else: - return OAuthProtocolErrorOut( - error = '', - ) - """ - - def testOAuthProtocolErrorOut(self): - """Test OAuthProtocolErrorOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_operation_usage_out.py b/sdk/python/test/test_operation_usage_out.py deleted file mode 100644 index b8a715a..0000000 --- a/sdk/python/test/test_operation_usage_out.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.operation_usage_out import OperationUsageOut - -class TestOperationUsageOut(unittest.TestCase): - """OperationUsageOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> OperationUsageOut: - """Test OperationUsageOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `OperationUsageOut` - """ - model = OperationUsageOut() - if include_optional: - return OperationUsageOut( - reads = 56, - writes = 56 - ) - else: - return OperationUsageOut( - reads = 56, - writes = 56, - ) - """ - - def testOperationUsageOut(self): - """Test OperationUsageOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_page.py b/sdk/python/test/test_page.py deleted file mode 100644 index 96c51a5..0000000 --- a/sdk/python/test/test_page.py +++ /dev/null @@ -1,101 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.page import Page - -class TestPage(unittest.TestCase): - """Page unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> Page: - """Test Page - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `Page` - """ - model = Page() - if include_optional: - return Page( - items = [ - agentdrive_sdk.models.artifact_out.ArtifactOut( - content_type = '', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - drive_id = '', - embedded_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - etag = '', - file_type = '', - hash = '', - id = '', - indexed_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - labels = [ - '' - ], - llm_index = { }, - metadata = { }, - metageneration = 56, - path = '', - permalink = '', - size_bytes = 56, - source = null, - updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - url = '', - version_number = 56, ) - ], - next_cursor = '' - ) - else: - return Page( - items = [ - agentdrive_sdk.models.artifact_out.ArtifactOut( - content_type = '', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - drive_id = '', - embedded_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - etag = '', - file_type = '', - hash = '', - id = '', - indexed_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - labels = [ - '' - ], - llm_index = { }, - metadata = { }, - metageneration = 56, - path = '', - permalink = '', - size_bytes = 56, - source = null, - updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - url = '', - version_number = 56, ) - ], - ) - """ - - def testPage(self): - """Test Page""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_project_config_in.py b/sdk/python/test/test_project_config_in.py deleted file mode 100644 index aac29fb..0000000 --- a/sdk/python/test/test_project_config_in.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.project_config_in import ProjectConfigIn - -class TestProjectConfigIn(unittest.TestCase): - """ProjectConfigIn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ProjectConfigIn: - """Test ProjectConfigIn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ProjectConfigIn` - """ - model = ProjectConfigIn() - if include_optional: - return ProjectConfigIn( - auto_compile = True, - engine = '', - entrypoint = '' - ) - else: - return ProjectConfigIn( - entrypoint = '', - ) - """ - - def testProjectConfigIn(self): - """Test ProjectConfigIn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_protected_resource_metadata_out.py b/sdk/python/test/test_protected_resource_metadata_out.py deleted file mode 100644 index 3edef16..0000000 --- a/sdk/python/test/test_protected_resource_metadata_out.py +++ /dev/null @@ -1,70 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.protected_resource_metadata_out import ProtectedResourceMetadataOut - -class TestProtectedResourceMetadataOut(unittest.TestCase): - """ProtectedResourceMetadataOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ProtectedResourceMetadataOut: - """Test ProtectedResourceMetadataOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ProtectedResourceMetadataOut` - """ - model = ProtectedResourceMetadataOut() - if include_optional: - return ProtectedResourceMetadataOut( - authorization_servers = [ - '' - ], - bearer_methods_supported = [ - '' - ], - resource = '', - scopes_supported = [ - '' - ] - ) - else: - return ProtectedResourceMetadataOut( - authorization_servers = [ - '' - ], - bearer_methods_supported = [ - '' - ], - resource = '', - scopes_supported = [ - '' - ], - ) - """ - - def testProtectedResourceMetadataOut(self): - """Test ProtectedResourceMetadataOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_query_column_out.py b/sdk/python/test/test_query_column_out.py deleted file mode 100644 index e1474e2..0000000 --- a/sdk/python/test/test_query_column_out.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.query_column_out import QueryColumnOut - -class TestQueryColumnOut(unittest.TestCase): - """QueryColumnOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> QueryColumnOut: - """Test QueryColumnOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `QueryColumnOut` - """ - model = QueryColumnOut() - if include_optional: - return QueryColumnOut( - name = '', - type = '' - ) - else: - return QueryColumnOut( - name = '', - ) - """ - - def testQueryColumnOut(self): - """Test QueryColumnOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_query_dry_run_out.py b/sdk/python/test/test_query_dry_run_out.py deleted file mode 100644 index 4c786ac..0000000 --- a/sdk/python/test/test_query_dry_run_out.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.query_dry_run_out import QueryDryRunOut - -class TestQueryDryRunOut(unittest.TestCase): - """QueryDryRunOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> QueryDryRunOut: - """Test QueryDryRunOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `QueryDryRunOut` - """ - model = QueryDryRunOut() - if include_optional: - return QueryDryRunOut( - dry_run = true, - engine = '', - estimated_bytes_processed = 56, - result_schema = [ - { } - ], - valid = True - ) - else: - return QueryDryRunOut( - dry_run = true, - engine = '', - estimated_bytes_processed = 56, - result_schema = [ - { } - ], - valid = True, - ) - """ - - def testQueryDryRunOut(self): - """Test QueryDryRunOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_query_in.py b/sdk/python/test/test_query_in.py deleted file mode 100644 index 1365c77..0000000 --- a/sdk/python/test/test_query_in.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.query_in import QueryIn - -class TestQueryIn(unittest.TestCase): - """QueryIn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> QueryIn: - """Test QueryIn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `QueryIn` - """ - model = QueryIn() - if include_optional: - return QueryIn( - dry_run = True, - inputs = { - 'key' : '' - }, - sql = '' - ) - else: - return QueryIn( - sql = '', - ) - """ - - def testQueryIn(self): - """Test QueryIn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_query_result_out.py b/sdk/python/test/test_query_result_out.py deleted file mode 100644 index 281ae4e..0000000 --- a/sdk/python/test/test_query_result_out.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.query_result_out import QueryResultOut - -class TestQueryResultOut(unittest.TestCase): - """QueryResultOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> QueryResultOut: - """Test QueryResultOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `QueryResultOut` - """ - model = QueryResultOut() - if include_optional: - return QueryResultOut( - bytes_processed = 56, - cache_hit = True, - engine = '', - preview = [ - { } - ], - result_art_id = '', - result_schema = [ - { } - ], - row_count = 56 - ) - else: - return QueryResultOut( - bytes_processed = 56, - cache_hit = True, - engine = '', - preview = [ - { } - ], - result_art_id = '', - result_schema = [ - { } - ], - row_count = 56, - ) - """ - - def testQueryResultOut(self): - """Test QueryResultOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_register_agent_identity_agent_identity_post422_response.py b/sdk/python/test/test_register_agent_identity_agent_identity_post422_response.py deleted file mode 100644 index bdd7ab1..0000000 --- a/sdk/python/test/test_register_agent_identity_agent_identity_post422_response.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.register_agent_identity_agent_identity_post422_response import RegisterAgentIdentityAgentIdentityPost422Response - -class TestRegisterAgentIdentityAgentIdentityPost422Response(unittest.TestCase): - """RegisterAgentIdentityAgentIdentityPost422Response unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RegisterAgentIdentityAgentIdentityPost422Response: - """Test RegisterAgentIdentityAgentIdentityPost422Response - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `RegisterAgentIdentityAgentIdentityPost422Response` - """ - model = RegisterAgentIdentityAgentIdentityPost422Response() - if include_optional: - return RegisterAgentIdentityAgentIdentityPost422Response( - detail = { } - ) - else: - return RegisterAgentIdentityAgentIdentityPost422Response( - detail = { }, - ) - """ - - def testRegisterAgentIdentityAgentIdentityPost422Response(self): - """Test RegisterAgentIdentityAgentIdentityPost422Response""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_response_post_query_v0_query_post.py b/sdk/python/test/test_response_post_query_v0_query_post.py deleted file mode 100644 index aad6a6c..0000000 --- a/sdk/python/test/test_response_post_query_v0_query_post.py +++ /dev/null @@ -1,78 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.response_post_query_v0_query_post import ResponsePostQueryV0QueryPost - -class TestResponsePostQueryV0QueryPost(unittest.TestCase): - """ResponsePostQueryV0QueryPost unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ResponsePostQueryV0QueryPost: - """Test ResponsePostQueryV0QueryPost - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ResponsePostQueryV0QueryPost` - """ - model = ResponsePostQueryV0QueryPost() - if include_optional: - return ResponsePostQueryV0QueryPost( - dry_run = true, - engine = '', - estimated_bytes_processed = 56, - result_schema = [ - { } - ], - valid = True, - bytes_processed = 56, - cache_hit = True, - preview = [ - { } - ], - result_art_id = '', - row_count = 56 - ) - else: - return ResponsePostQueryV0QueryPost( - dry_run = true, - engine = '', - estimated_bytes_processed = 56, - result_schema = [ - { } - ], - valid = True, - bytes_processed = 56, - cache_hit = True, - preview = [ - { } - ], - result_art_id = '', - row_count = 56, - ) - """ - - def testResponsePostQueryV0QueryPost(self): - """Test ResponsePostQueryV0QueryPost""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_revoke_out.py b/sdk/python/test/test_revoke_out.py deleted file mode 100644 index 66d39c6..0000000 --- a/sdk/python/test/test_revoke_out.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.revoke_out import RevokeOut - -class TestRevokeOut(unittest.TestCase): - """RevokeOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RevokeOut: - """Test RevokeOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `RevokeOut` - """ - model = RevokeOut() - if include_optional: - return RevokeOut( - id = '', - ok = True, - revoked = 56 - ) - else: - return RevokeOut( - id = '', - revoked = 56, - ) - """ - - def testRevokeOut(self): - """Test RevokeOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_search_hit_out.py b/sdk/python/test/test_search_hit_out.py deleted file mode 100644 index 0a331ff..0000000 --- a/sdk/python/test/test_search_hit_out.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.search_hit_out import SearchHitOut - -class TestSearchHitOut(unittest.TestCase): - """SearchHitOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SearchHitOut: - """Test SearchHitOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SearchHitOut` - """ - model = SearchHitOut() - if include_optional: - return SearchHitOut( - art_id = '', - content_type = '', - drive_id = '', - file_type = '', - labels = [ - '' - ], - path = '', - score = 1.337, - snippet = '', - updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - url = '', - version_number = 56 - ) - else: - return SearchHitOut( - art_id = '', - content_type = '', - drive_id = '', - file_type = '', - path = '', - score = 1.337, - snippet = '', - updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - url = '', - version_number = 56, - ) - """ - - def testSearchHitOut(self): - """Test SearchHitOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_search_page.py b/sdk/python/test/test_search_page.py deleted file mode 100644 index 94d81b5..0000000 --- a/sdk/python/test/test_search_page.py +++ /dev/null @@ -1,82 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.search_page import SearchPage - -class TestSearchPage(unittest.TestCase): - """SearchPage unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SearchPage: - """Test SearchPage - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SearchPage` - """ - model = SearchPage() - if include_optional: - return SearchPage( - items = [ - agentdrive_sdk.models.search_hit_out.SearchHitOut( - art_id = '', - content_type = '', - drive_id = '', - file_type = '', - labels = [ - '' - ], - path = '', - score = 1.337, - snippet = '', - updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - url = '', - version_number = 56, ) - ] - ) - else: - return SearchPage( - items = [ - agentdrive_sdk.models.search_hit_out.SearchHitOut( - art_id = '', - content_type = '', - drive_id = '', - file_type = '', - labels = [ - '' - ], - path = '', - score = 1.337, - snippet = '', - updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - url = '', - version_number = 56, ) - ], - ) - """ - - def testSearchPage(self): - """Test SearchPage""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_share_create_in.py b/sdk/python/test/test_share_create_in.py deleted file mode 100644 index cc00dd9..0000000 --- a/sdk/python/test/test_share_create_in.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.share_create_in import ShareCreateIn - -class TestShareCreateIn(unittest.TestCase): - """ShareCreateIn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ShareCreateIn: - """Test ShareCreateIn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ShareCreateIn` - """ - model = ShareCreateIn() - if include_optional: - return ShareCreateIn( - expires_in = 56, - password = '', - resource = '', - role = 'viewer' - ) - else: - return ShareCreateIn( - resource = '', - ) - """ - - def testShareCreateIn(self): - """Test ShareCreateIn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_share_error_out.py b/sdk/python/test/test_share_error_out.py deleted file mode 100644 index 3adec61..0000000 --- a/sdk/python/test/test_share_error_out.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.share_error_out import ShareErrorOut - -class TestShareErrorOut(unittest.TestCase): - """ShareErrorOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ShareErrorOut: - """Test ShareErrorOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ShareErrorOut` - """ - model = ShareErrorOut() - if include_optional: - return ShareErrorOut( - error = { } - ) - else: - return ShareErrorOut( - error = { }, - ) - """ - - def testShareErrorOut(self): - """Test ShareErrorOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_share_list.py b/sdk/python/test/test_share_list.py deleted file mode 100644 index 20310fc..0000000 --- a/sdk/python/test/test_share_list.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.share_list import ShareList - -class TestShareList(unittest.TestCase): - """ShareList unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ShareList: - """Test ShareList - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ShareList` - """ - model = ShareList() - if include_optional: - return ShareList( - items = [ - agentdrive_sdk.models.share_out.ShareOut( - access_count = 56, - audience = '', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - has_password = True, - id = '', - last_accessed_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - resource_id = '', - resource_type = 'artifact', - role = 'viewer', ) - ], - next_cursor = '' - ) - else: - return ShareList( - items = [ - agentdrive_sdk.models.share_out.ShareOut( - access_count = 56, - audience = '', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - has_password = True, - id = '', - last_accessed_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - resource_id = '', - resource_type = 'artifact', - role = 'viewer', ) - ], - ) - """ - - def testShareList(self): - """Test ShareList""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_share_mint_out.py b/sdk/python/test/test_share_mint_out.py deleted file mode 100644 index 3c3dbb2..0000000 --- a/sdk/python/test/test_share_mint_out.py +++ /dev/null @@ -1,71 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.share_mint_out import ShareMintOut - -class TestShareMintOut(unittest.TestCase): - """ShareMintOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ShareMintOut: - """Test ShareMintOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ShareMintOut` - """ - model = ShareMintOut() - if include_optional: - return ShareMintOut( - access_count = 56, - audience = '', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - has_password = True, - id = '', - last_accessed_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - resource_id = '', - resource_type = 'artifact', - role = 'viewer', - share_key = '', - url = '' - ) - else: - return ShareMintOut( - audience = '', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - has_password = True, - id = '', - resource_id = '', - resource_type = 'artifact', - role = 'viewer', - share_key = '', - url = '', - ) - """ - - def testShareMintOut(self): - """Test ShareMintOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_share_out.py b/sdk/python/test/test_share_out.py deleted file mode 100644 index 4162159..0000000 --- a/sdk/python/test/test_share_out.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.share_out import ShareOut - -class TestShareOut(unittest.TestCase): - """ShareOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ShareOut: - """Test ShareOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ShareOut` - """ - model = ShareOut() - if include_optional: - return ShareOut( - access_count = 56, - audience = '', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - has_password = True, - id = '', - last_accessed_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - resource_id = '', - resource_type = 'artifact', - role = 'viewer' - ) - else: - return ShareOut( - audience = '', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - has_password = True, - id = '', - resource_id = '', - resource_type = 'artifact', - role = 'viewer', - ) - """ - - def testShareOut(self): - """Test ShareOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_share_redeem_out.py b/sdk/python/test/test_share_redeem_out.py deleted file mode 100644 index bf3ed58..0000000 --- a/sdk/python/test/test_share_redeem_out.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.share_redeem_out import ShareRedeemOut - -class TestShareRedeemOut(unittest.TestCase): - """ShareRedeemOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ShareRedeemOut: - """Test ShareRedeemOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ShareRedeemOut` - """ - model = ShareRedeemOut() - if include_optional: - return ShareRedeemOut( - expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - role = '', - token = '', - url = '' - ) - else: - return ShareRedeemOut( - expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - role = '', - token = '', - url = '', - ) - """ - - def testShareRedeemOut(self): - """Test ShareRedeemOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_source_ref.py b/sdk/python/test/test_source_ref.py deleted file mode 100644 index c7479f9..0000000 --- a/sdk/python/test/test_source_ref.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.source_ref import SourceRef - -class TestSourceRef(unittest.TestCase): - """SourceRef unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SourceRef: - """Test SourceRef - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SourceRef` - """ - model = SourceRef() - if include_optional: - return SourceRef( - id = '', - metadata = { }, - type = '' - ) - else: - return SourceRef( - id = '', - type = '', - ) - """ - - def testSourceRef(self): - """Test SourceRef""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_storage_breakdown_out.py b/sdk/python/test/test_storage_breakdown_out.py deleted file mode 100644 index 35904a6..0000000 --- a/sdk/python/test/test_storage_breakdown_out.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.storage_breakdown_out import StorageBreakdownOut - -class TestStorageBreakdownOut(unittest.TestCase): - """StorageBreakdownOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> StorageBreakdownOut: - """Test StorageBreakdownOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `StorageBreakdownOut` - """ - model = StorageBreakdownOut() - if include_optional: - return StorageBreakdownOut( - as_of = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), - live_bytes = 56, - trash_bytes = 56, - version_bytes = 56 - ) - else: - return StorageBreakdownOut( - as_of = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), - live_bytes = 56, - trash_bytes = 56, - version_bytes = 56, - ) - """ - - def testStorageBreakdownOut(self): - """Test StorageBreakdownOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_storage_footprint_out.py b/sdk/python/test/test_storage_footprint_out.py deleted file mode 100644 index 7d97341..0000000 --- a/sdk/python/test/test_storage_footprint_out.py +++ /dev/null @@ -1,59 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.storage_footprint_out import StorageFootprintOut - -class TestStorageFootprintOut(unittest.TestCase): - """StorageFootprintOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> StorageFootprintOut: - """Test StorageFootprintOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `StorageFootprintOut` - """ - model = StorageFootprintOut() - if include_optional: - return StorageFootprintOut( - as_of = datetime.datetime.strptime('1975-12-30', '%Y-%m-%d').date(), - live_bytes = 56, - total_bytes = 56, - trash_bytes = 56, - version_bytes = 56 - ) - else: - return StorageFootprintOut( - live_bytes = 56, - total_bytes = 56, - trash_bytes = 56, - version_bytes = 56, - ) - """ - - def testStorageFootprintOut(self): - """Test StorageFootprintOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_token_response.py b/sdk/python/test/test_token_response.py deleted file mode 100644 index f82e6c6..0000000 --- a/sdk/python/test/test_token_response.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.token_response import TokenResponse - -class TestTokenResponse(unittest.TestCase): - """TokenResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TokenResponse: - """Test TokenResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TokenResponse` - """ - model = TokenResponse() - if include_optional: - return TokenResponse( - access_token = '', - expires_in = 56, - identity_assertion = '', - scope = '', - token_type = 'Bearer' - ) - else: - return TokenResponse( - access_token = '', - expires_in = 56, - scope = '', - ) - """ - - def testTokenResponse(self): - """Test TokenResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_token_usage_out.py b/sdk/python/test/test_token_usage_out.py deleted file mode 100644 index 2bc16d4..0000000 --- a/sdk/python/test/test_token_usage_out.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.token_usage_out import TokenUsageOut - -class TestTokenUsageOut(unittest.TestCase): - """TokenUsageOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TokenUsageOut: - """Test TokenUsageOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TokenUsageOut` - """ - model = TokenUsageOut() - if include_optional: - return TokenUsageOut( - embed = 56, - llm_cached = 56, - llm_input = 56, - llm_output = 56 - ) - else: - return TokenUsageOut( - embed = 56, - llm_cached = 56, - llm_input = 56, - llm_output = 56, - ) - """ - - def testTokenUsageOut(self): - """Test TokenUsageOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_tokens_api.py b/sdk/python/test/test_tokens_api.py deleted file mode 100644 index adf0c29..0000000 --- a/sdk/python/test/test_tokens_api.py +++ /dev/null @@ -1,45 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.api.tokens_api import TokensApi - - -class TestTokensApi(unittest.TestCase): - """TokensApi unit test stubs""" - - def setUp(self) -> None: - self.api = TokensApi() - - def tearDown(self) -> None: - pass - - def test_list_tokens_v0_tokens_get(self) -> None: - """Test case for list_tokens_v0_tokens_get - - List your user-identity tokens - """ - pass - - def test_revoke_token_v0_tokens_token_id_revoke_post(self) -> None: - """Test case for revoke_token_v0_tokens_token_id_revoke_post - - Revoke one of your user-identity tokens - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_trash_artifact_out.py b/sdk/python/test/test_trash_artifact_out.py deleted file mode 100644 index 38da562..0000000 --- a/sdk/python/test/test_trash_artifact_out.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.trash_artifact_out import TrashArtifactOut - -class TestTrashArtifactOut(unittest.TestCase): - """TrashArtifactOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TrashArtifactOut: - """Test TrashArtifactOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TrashArtifactOut` - """ - model = TrashArtifactOut() - if include_optional: - return TrashArtifactOut( - deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - path = '', - purge_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - restore_url = '', - size_bytes = 56 - ) - else: - return TrashArtifactOut( - id = '', - path = '', - restore_url = '', - size_bytes = 56, - ) - """ - - def testTrashArtifactOut(self): - """Test TrashArtifactOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_trash_drive_out.py b/sdk/python/test/test_trash_drive_out.py deleted file mode 100644 index 5a79a2f..0000000 --- a/sdk/python/test/test_trash_drive_out.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.trash_drive_out import TrashDriveOut - -class TestTrashDriveOut(unittest.TestCase): - """TrashDriveOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TrashDriveOut: - """Test TrashDriveOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TrashDriveOut` - """ - model = TrashDriveOut() - if include_optional: - return TrashDriveOut( - deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '' - ) - else: - return TrashDriveOut( - id = '', - ) - """ - - def testTrashDriveOut(self): - """Test TrashDriveOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_trash_out.py b/sdk/python/test/test_trash_out.py deleted file mode 100644 index a1c1572..0000000 --- a/sdk/python/test/test_trash_out.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.trash_out import TrashOut - -class TestTrashOut(unittest.TestCase): - """TrashOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TrashOut: - """Test TrashOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TrashOut` - """ - model = TrashOut() - if include_optional: - return TrashOut( - artifacts = [ - agentdrive_sdk.models.trash_artifact_out.TrashArtifactOut( - deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - path = '', - purge_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - restore_url = '', - size_bytes = 56, ) - ], - drive = agentdrive_sdk.models.trash_drive_out.TrashDriveOut( - deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', ), - items = [ - agentdrive_sdk.models.trash_artifact_out.TrashArtifactOut( - deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - path = '', - purge_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - restore_url = '', - size_bytes = 56, ) - ], - next_cursor = '' - ) - else: - return TrashOut( - artifacts = [ - agentdrive_sdk.models.trash_artifact_out.TrashArtifactOut( - deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - path = '', - purge_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - restore_url = '', - size_bytes = 56, ) - ], - drive = agentdrive_sdk.models.trash_drive_out.TrashDriveOut( - deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', ), - items = [ - agentdrive_sdk.models.trash_artifact_out.TrashArtifactOut( - deleted_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - path = '', - purge_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - restore_url = '', - size_bytes = 56, ) - ], - ) - """ - - def testTrashOut(self): - """Test TrashOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_upload_abort_out.py b/sdk/python/test/test_upload_abort_out.py deleted file mode 100644 index ddb25d9..0000000 --- a/sdk/python/test/test_upload_abort_out.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.upload_abort_out import UploadAbortOut - -class TestUploadAbortOut(unittest.TestCase): - """UploadAbortOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UploadAbortOut: - """Test UploadAbortOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UploadAbortOut` - """ - model = UploadAbortOut() - if include_optional: - return UploadAbortOut( - released_bytes = 56, - state = 'aborted', - upload_id = '' - ) - else: - return UploadAbortOut( - released_bytes = 56, - upload_id = '', - ) - """ - - def testUploadAbortOut(self): - """Test UploadAbortOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_upload_begin_in.py b/sdk/python/test/test_upload_begin_in.py deleted file mode 100644 index 88226df..0000000 --- a/sdk/python/test/test_upload_begin_in.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.upload_begin_in import UploadBeginIn - -class TestUploadBeginIn(unittest.TestCase): - """UploadBeginIn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UploadBeginIn: - """Test UploadBeginIn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UploadBeginIn` - """ - model = UploadBeginIn() - if include_optional: - return UploadBeginIn( - actor_name = '', - change_summary = '', - content_type = 'application/octet-stream', - cors_origin = '', - crc32c = '', - if_match = 0.0, - if_none_match = True, - labels = [ - '' - ], - metadata = { }, - path = '', - size_bytes = 1.0, - source = agentdrive_sdk.models.artifact_source.ArtifactSource( - refs = [ - agentdrive_sdk.models.source_ref.SourceRef( - id = '', - metadata = { }, - type = '', ) - ], ) - ) - else: - return UploadBeginIn( - path = '', - size_bytes = 1.0, - ) - """ - - def testUploadBeginIn(self): - """Test UploadBeginIn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_upload_begin_out.py b/sdk/python/test/test_upload_begin_out.py deleted file mode 100644 index 22457a3..0000000 --- a/sdk/python/test/test_upload_begin_out.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.upload_begin_out import UploadBeginOut - -class TestUploadBeginOut(unittest.TestCase): - """UploadBeginOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UploadBeginOut: - """Test UploadBeginOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UploadBeginOut` - """ - model = UploadBeginOut() - if include_optional: - return UploadBeginOut( - expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - headers = { - 'key' : '' - }, - max_bytes = 56, - method = 'PUT', - upload_id = '', - upload_url = '' - ) - else: - return UploadBeginOut( - expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - headers = { - 'key' : '' - }, - max_bytes = 56, - upload_id = '', - upload_url = '', - ) - """ - - def testUploadBeginOut(self): - """Test UploadBeginOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_upload_status_out.py b/sdk/python/test/test_upload_status_out.py deleted file mode 100644 index 171f567..0000000 --- a/sdk/python/test/test_upload_status_out.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.upload_status_out import UploadStatusOut - -class TestUploadStatusOut(unittest.TestCase): - """UploadStatusOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UploadStatusOut: - """Test UploadStatusOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UploadStatusOut` - """ - model = UploadStatusOut() - if include_optional: - return UploadStatusOut( - committed_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - content_type = '', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - max_bytes = 56, - path = '', - size_bytes = 56, - state = 'initiated', - upload_id = '' - ) - else: - return UploadStatusOut( - content_type = '', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - max_bytes = 56, - path = '', - size_bytes = 56, - state = 'initiated', - upload_id = '', - ) - """ - - def testUploadStatusOut(self): - """Test UploadStatusOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_usage_counter_out.py b/sdk/python/test/test_usage_counter_out.py deleted file mode 100644 index 52b99af..0000000 --- a/sdk/python/test/test_usage_counter_out.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.usage_counter_out import UsageCounterOut - -class TestUsageCounterOut(unittest.TestCase): - """UsageCounterOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UsageCounterOut: - """Test UsageCounterOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UsageCounterOut` - """ - model = UsageCounterOut() - if include_optional: - return UsageCounterOut( - limit = 56, - used = 56 - ) - else: - return UsageCounterOut( - limit = 56, - used = 56, - ) - """ - - def testUsageCounterOut(self): - """Test UsageCounterOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_usage_period_out.py b/sdk/python/test/test_usage_period_out.py deleted file mode 100644 index 70d4a02..0000000 --- a/sdk/python/test/test_usage_period_out.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.usage_period_out import UsagePeriodOut - -class TestUsagePeriodOut(unittest.TestCase): - """UsagePeriodOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UsagePeriodOut: - """Test UsagePeriodOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UsagePeriodOut` - """ - model = UsagePeriodOut() - if include_optional: - return UsagePeriodOut( - ends = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - starts = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - year_month = '' - ) - else: - return UsagePeriodOut( - ends = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - starts = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - year_month = '', - ) - """ - - def testUsagePeriodOut(self): - """Test UsagePeriodOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_user_token_list.py b/sdk/python/test/test_user_token_list.py deleted file mode 100644 index b476817..0000000 --- a/sdk/python/test/test_user_token_list.py +++ /dev/null @@ -1,75 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.user_token_list import UserTokenList - -class TestUserTokenList(unittest.TestCase): - """UserTokenList unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UserTokenList: - """Test UserTokenList - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UserTokenList` - """ - model = UserTokenList() - if include_optional: - return UserTokenList( - items = [ - agentdrive_sdk.models.user_token_out.UserTokenOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - default_drive_id = '', - expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - label = '', - last_used_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - prefix = '', - revoked_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - scope = 'read', ) - ], - next_cursor = '' - ) - else: - return UserTokenList( - items = [ - agentdrive_sdk.models.user_token_out.UserTokenOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - default_drive_id = '', - expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - label = '', - last_used_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - prefix = '', - revoked_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - scope = 'read', ) - ], - ) - """ - - def testUserTokenList(self): - """Test UserTokenList""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_user_token_out.py b/sdk/python/test/test_user_token_out.py deleted file mode 100644 index 9866e8e..0000000 --- a/sdk/python/test/test_user_token_out.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.user_token_out import UserTokenOut - -class TestUserTokenOut(unittest.TestCase): - """UserTokenOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UserTokenOut: - """Test UserTokenOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UserTokenOut` - """ - model = UserTokenOut() - if include_optional: - return UserTokenOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - default_drive_id = '', - expires_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - label = '', - last_used_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - prefix = '', - revoked_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - scope = 'read' - ) - else: - return UserTokenOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - prefix = '', - scope = 'read', - ) - """ - - def testUserTokenOut(self): - """Test UserTokenOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_validation_error_body.py b/sdk/python/test/test_validation_error_body.py deleted file mode 100644 index d1f8c75..0000000 --- a/sdk/python/test/test_validation_error_body.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.validation_error_body import ValidationErrorBody - -class TestValidationErrorBody(unittest.TestCase): - """ValidationErrorBody unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ValidationErrorBody: - """Test ValidationErrorBody - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ValidationErrorBody` - """ - model = ValidationErrorBody() - if include_optional: - return ValidationErrorBody( - code = '', - fields = [ - { - 'key' : null - } - ], - message = '' - ) - else: - return ValidationErrorBody( - code = '', - fields = [ - { - 'key' : null - } - ], - message = '', - ) - """ - - def testValidationErrorBody(self): - """Test ValidationErrorBody""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_validation_error_detail.py b/sdk/python/test/test_validation_error_detail.py deleted file mode 100644 index f47f781..0000000 --- a/sdk/python/test/test_validation_error_detail.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.validation_error_detail import ValidationErrorDetail - -class TestValidationErrorDetail(unittest.TestCase): - """ValidationErrorDetail unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ValidationErrorDetail: - """Test ValidationErrorDetail - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ValidationErrorDetail` - """ - model = ValidationErrorDetail() - if include_optional: - return ValidationErrorDetail( - error = { } - ) - else: - return ValidationErrorDetail( - error = { }, - ) - """ - - def testValidationErrorDetail(self): - """Test ValidationErrorDetail""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_validation_error_response.py b/sdk/python/test/test_validation_error_response.py deleted file mode 100644 index b5c2b3c..0000000 --- a/sdk/python/test/test_validation_error_response.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.validation_error_response import ValidationErrorResponse - -class TestValidationErrorResponse(unittest.TestCase): - """ValidationErrorResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ValidationErrorResponse: - """Test ValidationErrorResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ValidationErrorResponse` - """ - model = ValidationErrorResponse() - if include_optional: - return ValidationErrorResponse( - detail = { } - ) - else: - return ValidationErrorResponse( - detail = { }, - ) - """ - - def testValidationErrorResponse(self): - """Test ValidationErrorResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_validation_issue.py b/sdk/python/test/test_validation_issue.py deleted file mode 100644 index 6b214d0..0000000 --- a/sdk/python/test/test_validation_issue.py +++ /dev/null @@ -1,62 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.validation_issue import ValidationIssue - -class TestValidationIssue(unittest.TestCase): - """ValidationIssue unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ValidationIssue: - """Test ValidationIssue - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ValidationIssue` - """ - model = ValidationIssue() - if include_optional: - return ValidationIssue( - ctx = { }, - input = None, - loc = [ - null - ], - msg = '', - type = '' - ) - else: - return ValidationIssue( - loc = [ - null - ], - msg = '', - type = '', - ) - """ - - def testValidationIssue(self): - """Test ValidationIssue""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_version_out.py b/sdk/python/test/test_version_out.py deleted file mode 100644 index 7caf4aa..0000000 --- a/sdk/python/test/test_version_out.py +++ /dev/null @@ -1,64 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.version_out import VersionOut - -class TestVersionOut(unittest.TestCase): - """VersionOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> VersionOut: - """Test VersionOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `VersionOut` - """ - model = VersionOut() - if include_optional: - return VersionOut( - actor_name = '', - art_id = '', - change_summary = '', - content_type = '', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - hash = '', - size_bytes = 56, - version_number = 56 - ) - else: - return VersionOut( - art_id = '', - content_type = '', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - hash = '', - size_bytes = 56, - version_number = 56, - ) - """ - - def testVersionOut(self): - """Test VersionOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_version_page.py b/sdk/python/test/test_version_page.py deleted file mode 100644 index 100dcf6..0000000 --- a/sdk/python/test/test_version_page.py +++ /dev/null @@ -1,74 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.version_page import VersionPage - -class TestVersionPage(unittest.TestCase): - """VersionPage unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> VersionPage: - """Test VersionPage - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `VersionPage` - """ - model = VersionPage() - if include_optional: - return VersionPage( - items = [ - agentdrive_sdk.models.version_out.VersionOut( - actor_name = '', - art_id = '', - change_summary = '', - content_type = '', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - hash = '', - size_bytes = 56, - version_number = 56, ) - ], - next_cursor = '', - pruned_before = 56 - ) - else: - return VersionPage( - items = [ - agentdrive_sdk.models.version_out.VersionOut( - actor_name = '', - art_id = '', - change_summary = '', - content_type = '', - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - hash = '', - size_bytes = 56, - version_number = 56, ) - ], - ) - """ - - def testVersionPage(self): - """Test VersionPage""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_version_retention_out.py b/sdk/python/test/test_version_retention_out.py deleted file mode 100644 index b14e633..0000000 --- a/sdk/python/test/test_version_retention_out.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.version_retention_out import VersionRetentionOut - -class TestVersionRetentionOut(unittest.TestCase): - """VersionRetentionOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> VersionRetentionOut: - """Test VersionRetentionOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `VersionRetentionOut` - """ - model = VersionRetentionOut() - if include_optional: - return VersionRetentionOut( - versions_max = 56 - ) - else: - return VersionRetentionOut( - versions_max = 56, - ) - """ - - def testVersionRetentionOut(self): - """Test VersionRetentionOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_workspace_create_in.py b/sdk/python/test/test_workspace_create_in.py deleted file mode 100644 index e5a7b90..0000000 --- a/sdk/python/test/test_workspace_create_in.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.workspace_create_in import WorkspaceCreateIn - -class TestWorkspaceCreateIn(unittest.TestCase): - """WorkspaceCreateIn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> WorkspaceCreateIn: - """Test WorkspaceCreateIn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `WorkspaceCreateIn` - """ - model = WorkspaceCreateIn() - if include_optional: - return WorkspaceCreateIn( - name = '0' - ) - else: - return WorkspaceCreateIn( - name = '0', - ) - """ - - def testWorkspaceCreateIn(self): - """Test WorkspaceCreateIn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_workspace_create_out.py b/sdk/python/test/test_workspace_create_out.py deleted file mode 100644 index 7506184..0000000 --- a/sdk/python/test/test_workspace_create_out.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.workspace_create_out import WorkspaceCreateOut - -class TestWorkspaceCreateOut(unittest.TestCase): - """WorkspaceCreateOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> WorkspaceCreateOut: - """Test WorkspaceCreateOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `WorkspaceCreateOut` - """ - model = WorkspaceCreateOut() - if include_optional: - return WorkspaceCreateOut( - starter_drive_api_key = '', - starter_drive_id = '', - workspace = agentdrive_sdk.models.workspace_out.WorkspaceOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - name = '', - role = 'admin', - tier_id = '', ) - ) - else: - return WorkspaceCreateOut( - starter_drive_api_key = '', - starter_drive_id = '', - workspace = agentdrive_sdk.models.workspace_out.WorkspaceOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - name = '', - role = 'admin', - tier_id = '', ), - ) - """ - - def testWorkspaceCreateOut(self): - """Test WorkspaceCreateOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_workspace_list.py b/sdk/python/test/test_workspace_list.py deleted file mode 100644 index 314f96e..0000000 --- a/sdk/python/test/test_workspace_list.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.workspace_list import WorkspaceList - -class TestWorkspaceList(unittest.TestCase): - """WorkspaceList unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> WorkspaceList: - """Test WorkspaceList - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `WorkspaceList` - """ - model = WorkspaceList() - if include_optional: - return WorkspaceList( - items = [ - agentdrive_sdk.models.workspace_out.WorkspaceOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - name = '', - role = 'admin', - tier_id = '', ) - ], - next_cursor = '' - ) - else: - return WorkspaceList( - items = [ - agentdrive_sdk.models.workspace_out.WorkspaceOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - name = '', - role = 'admin', - tier_id = '', ) - ], - ) - """ - - def testWorkspaceList(self): - """Test WorkspaceList""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_workspace_out.py b/sdk/python/test/test_workspace_out.py deleted file mode 100644 index c702031..0000000 --- a/sdk/python/test/test_workspace_out.py +++ /dev/null @@ -1,60 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.workspace_out import WorkspaceOut - -class TestWorkspaceOut(unittest.TestCase): - """WorkspaceOut unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> WorkspaceOut: - """Test WorkspaceOut - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `WorkspaceOut` - """ - model = WorkspaceOut() - if include_optional: - return WorkspaceOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - name = '', - role = 'admin', - tier_id = '' - ) - else: - return WorkspaceOut( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - name = '', - role = 'admin', - tier_id = '', - ) - """ - - def testWorkspaceOut(self): - """Test WorkspaceOut""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_workspace_rename_in.py b/sdk/python/test/test_workspace_rename_in.py deleted file mode 100644 index 35f4a24..0000000 --- a/sdk/python/test/test_workspace_rename_in.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.models.workspace_rename_in import WorkspaceRenameIn - -class TestWorkspaceRenameIn(unittest.TestCase): - """WorkspaceRenameIn unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> WorkspaceRenameIn: - """Test WorkspaceRenameIn - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `WorkspaceRenameIn` - """ - model = WorkspaceRenameIn() - if include_optional: - return WorkspaceRenameIn( - name = '0' - ) - else: - return WorkspaceRenameIn( - name = '0', - ) - """ - - def testWorkspaceRenameIn(self): - """Test WorkspaceRenameIn""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/test/test_workspaces_api.py b/sdk/python/test/test_workspaces_api.py deleted file mode 100644 index d259af3..0000000 --- a/sdk/python/test/test_workspaces_api.py +++ /dev/null @@ -1,52 +0,0 @@ -# coding: utf-8 - -""" - AgentDrive - - AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - - The version of the OpenAPI document: - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from agentdrive_sdk.api.workspaces_api import WorkspacesApi - - -class TestWorkspacesApi(unittest.TestCase): - """WorkspacesApi unit test stubs""" - - def setUp(self) -> None: - self.api = WorkspacesApi() - - def tearDown(self) -> None: - pass - - def test_create_workspace_route_v0_workspaces_post(self) -> None: - """Test case for create_workspace_route_v0_workspaces_post - - Create a new shared drive - """ - pass - - def test_list_workspaces_route_v0_workspaces_get(self) -> None: - """Test case for list_workspaces_route_v0_workspaces_get - - List the spaces you belong to - """ - pass - - def test_rename_workspace_route_v0_workspaces_org_id_patch(self) -> None: - """Test case for rename_workspace_route_v0_workspaces_org_id_patch - - Rename a shared drive you administer - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/sdk/python/tests/conformance/test_generated_clients.py b/sdk/python/tests/conformance/test_generated_clients.py new file mode 100644 index 0000000..f4ed467 --- /dev/null +++ b/sdk/python/tests/conformance/test_generated_clients.py @@ -0,0 +1,526 @@ +"""Live TCP conformance for both generated Python transports. + +The server in this module is deliberately small, but it is not a mocked +``ApiClient``: both generated clients serialize real HTTP requests and send +them over a loopback socket. The scenarios pin the contract features that are +easy for a generator or transport upgrade to silently damage. +""" + +from __future__ import annotations + +import asyncio +import json +import threading +from dataclasses import dataclass, field +from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer +from typing import Any +from urllib.parse import parse_qs, urlsplit + +import pytest + +from agentdrive_sdk.generated.async_client.api.artifacts_api import ( + ArtifactsApi as AsyncArtifactsApi, +) +from agentdrive_sdk.generated.async_client.api.drives_api import ( + DrivesApi as AsyncDrivesApi, +) +from agentdrive_sdk.generated.async_client.api_client import ApiClient as AsyncApiClient +from agentdrive_sdk.generated.async_client.configuration import ( + Configuration as AsyncConfiguration, +) +from agentdrive_sdk.generated.async_client.exceptions import ( + ApiException as AsyncApiException, +) +from agentdrive_sdk.generated.async_client.models.drive_create_in import ( + DriveCreateIn as AsyncDriveCreateIn, +) +from agentdrive_sdk.generated.sync.api.artifacts_api import ( + ArtifactsApi as SyncArtifactsApi, +) +from agentdrive_sdk.generated.sync.api.drives_api import DrivesApi as SyncDrivesApi +from agentdrive_sdk.generated.sync.api_client import ApiClient as SyncApiClient +from agentdrive_sdk.generated.sync.configuration import ( + Configuration as SyncConfiguration, +) +from agentdrive_sdk.generated.sync.exceptions import ApiException as SyncApiException +from agentdrive_sdk.generated.sync.models.drive_create_in import ( + DriveCreateIn as SyncDriveCreateIn, +) + +TOKEN = "generated-core-conformance-token" +DRIVE_ID = "drv_1111111111111111" +MISSING_DRIVE_ID = "drv_ffffffffffffffff" +ROOT_FOLDER_ID = "fld_2222222222222222" +REVISION = "rev_3333333333333333" +ARTIFACT_ID = "art_4444444444444444" +ETAG = f'"{REVISION}"' +CREATED_AT = "2026-08-09T12:00:00Z" + + +def _drive() -> dict[str, Any]: + return { + "id": DRIVE_ID, + "workspace_id": "tcws_conformance", + "created_by": "tcagt_conformance", + "name": "generated-core", + "metadata": {"source": "wire-test"}, + "revision": REVISION, + "root_folder_id": ROOT_FOLDER_ID, + "storage_bytes": 0, + "retrieval_bytes": 0, + "created_at": CREATED_AT, + "updated_at": CREATED_AT, + "deleted_at": None, + "state": "active", + } + + +def _artifact() -> dict[str, Any]: + return { + "id": ARTIFACT_ID, + "drive_id": DRIVE_ID, + "parent_id": ROOT_FOLDER_ID, + "name": "conformance.txt", + "content_type": "text/plain", + "content_preview": "hello generated core", + "effective_visibility": "private", + "labels": [], + "metadata": {"source": "wire-test"}, + "head_version_id": "ver_5555555555555555", + "revision": REVISION, + "state": "active", + "created_at": CREATED_AT, + "updated_at": CREATED_AT, + "deleted_at": None, + } + + +@dataclass +class _WireState: + lock: threading.Lock = field(default_factory=threading.Lock) + api_requests: list[dict[str, Any]] = field(default_factory=list) + sink_requests: list[dict[str, str | None]] = field(default_factory=list) + idempotent_drives: dict[str, tuple[str, dict[str, Any]]] = field( + default_factory=dict + ) + multipart_content_type: str | None = None + multipart_body: bytes = b"" + + def record_api(self, handler: BaseHTTPRequestHandler) -> None: + with self.lock: + self.api_requests.append( + { + "method": handler.command, + "path": handler.path, + "authorization": handler.headers.get("Authorization"), + "idempotency_key": handler.headers.get("Idempotency-Key"), + "if_none_match": handler.headers.get("If-None-Match"), + } + ) + + +class _QuietHandler(BaseHTTPRequestHandler): + protocol_version = "HTTP/1.1" + + def log_message(self, _format: str, *_args: object) -> None: + return + + def _write( + self, status: int, body: bytes, headers: dict[str, str] | None = None + ) -> None: + self.send_response(status) + for name, value in (headers or {}).items(): + self.send_header(name, value) + self.send_header("Content-Length", str(len(body))) + self.end_headers() + if body: + try: + self.wfile.write(body) + except (BrokenPipeError, ConnectionResetError): + # Raw-response and redirect tests may intentionally close the + # loopback connection before the fixture finishes its write. + pass + + def _json( + self, + status: int, + value: dict[str, Any], + headers: dict[str, str] | None = None, + ) -> None: + merged = {"Content-Type": "application/json", **(headers or {})} + self._write(status, json.dumps(value, separators=(",", ":")).encode(), merged) + + +class _SinkHandler(_QuietHandler): + state: _WireState + + def do_GET(self) -> None: # noqa: N802 - BaseHTTPRequestHandler API + with self.state.lock: + self.state.sink_requests.append( + { + "authorization": self.headers.get("Authorization"), + "cookie": self.headers.get("Cookie"), + } + ) + self._write( + 200, b"signed content", {"Content-Type": "application/octet-stream"} + ) + + +class _AgentDriveHandler(_QuietHandler): + state: _WireState + redirect_url: str + + def _route(self) -> tuple[str, dict[str, list[str]]]: + parsed = urlsplit(self.path) + assert parsed.path.startswith("/drive/"), parsed.path + return parsed.path.removeprefix("/drive"), parse_qs(parsed.query) + + def _authenticated(self) -> bool: + if self.headers.get("Authorization") == f"Bearer {TOKEN}": + return True + self._json( + 401, + { + "error": { + "code": "AUTHENTICATION_REQUIRED", + "message": "missing or invalid bearer token", + } + }, + { + "WWW-Authenticate": 'Bearer realm="agentdrive"', + "X-Request-Id": "req_auth", + }, + ) + return False + + def _not_found(self) -> None: + self._json( + 404, + {"error": {"code": "NOT_FOUND", "message": "resource not found"}}, + {"X-Request-Id": "req_missing"}, + ) + + def do_GET(self) -> None: # noqa: N802 - BaseHTTPRequestHandler API + self.state.record_api(self) + path, query = self._route() + if not self._authenticated(): + return + + if path == "/v0/drives": + if query.get("cursor") == ["page-2"]: + page = {"items": [], "next_cursor": None} + else: + page = {"items": [_drive()], "next_cursor": "page-2"} + self._json(200, page, {"X-Request-Id": "req_list"}) + return + + if path == f"/v0/drives/{MISSING_DRIVE_ID}": + self._not_found() + return + + artifact_path = f"/v0/drives/{DRIVE_ID}/artifacts/{ARTIFACT_ID}" + if path == artifact_path: + if self.headers.get("If-None-Match") == ETAG: + self._write(304, b"", {"ETag": ETAG, "X-Request-Id": "req_304"}) + else: + self._json( + 200, + _artifact(), + {"ETag": ETAG, "X-Request-Id": "req_artifact"}, + ) + return + + if path == f"{artifact_path}/content": + self._write( + 307, + b"", + { + "Location": self.redirect_url, + "ETag": ETAG, + "X-Request-Id": "req_redirect", + }, + ) + return + + self._not_found() + + def do_POST(self) -> None: # noqa: N802 - BaseHTTPRequestHandler API + self.state.record_api(self) + path, _query = self._route() + if not self._authenticated(): + return + + length = int(self.headers.get("Content-Length", "0")) + body = self.rfile.read(length) + + if path == "/v0/drives": + key = self.headers.get("Idempotency-Key") + if not key: + self._json( + 400, + { + "error": { + "code": "IDEMPOTENCY_REQUIRED", + "message": "key required", + } + }, + {"X-Request-Id": "req_idem_missing"}, + ) + return + decoded = json.loads(body) + signature = json.dumps(decoded, sort_keys=True, separators=(",", ":")) + with self.state.lock: + previous = self.state.idempotent_drives.get(key) + if previous is None: + response = _drive() + self.state.idempotent_drives[key] = (signature, response) + elif previous[0] == signature: + response = previous[1] + else: + response = None + if response is None: + self._json( + 409, + { + "error": { + "code": "IDEMPOTENCY_KEY_REUSE", + "message": "body changed", + } + }, + {"X-Request-Id": "req_idem_reuse"}, + ) + return + self._json( + 201, + response, + { + "ETag": ETAG, + "Location": f"/v0/drives/{DRIVE_ID}", + "X-Request-Id": "req_create", + }, + ) + return + + if path == f"/v0/drives/{DRIVE_ID}/artifacts": + with self.state.lock: + self.state.multipart_content_type = self.headers.get("Content-Type") + self.state.multipart_body = body + self._json( + 201, + _artifact(), + { + "ETag": ETAG, + "Location": f"/v0/drives/{DRIVE_ID}/artifacts/{ARTIFACT_ID}", + "X-Request-Id": "req_upload", + }, + ) + return + + self._not_found() + + +def _start_server( + handler: type[BaseHTTPRequestHandler], +) -> tuple[ThreadingHTTPServer, threading.Thread]: + server = ThreadingHTTPServer(("127.0.0.1", 0), handler) + thread = threading.Thread(target=server.serve_forever, daemon=True) + thread.start() + return server, thread + + +@pytest.fixture +def wire_server() -> tuple[str, _WireState]: + state = _WireState() + + sink_handler = type("SinkHandler", (_SinkHandler,), {"state": state}) + sink, sink_thread = _start_server(sink_handler) + sink_url = f"http://127.0.0.1:{sink.server_port}/signed-content" + + api_handler = type( + "AgentDriveHandler", + (_AgentDriveHandler,), + {"state": state, "redirect_url": sink_url}, + ) + api, api_thread = _start_server(api_handler) + try: + yield f"http://127.0.0.1:{api.server_port}/drive", state + finally: + api.shutdown() + sink.shutdown() + api.server_close() + sink.server_close() + api_thread.join(timeout=2) + sink_thread.join(timeout=2) + + +def _assert_multipart(state: _WireState) -> None: + assert state.multipart_content_type is not None + assert state.multipart_content_type.startswith("multipart/form-data; boundary=") + assert b'name="content"' in state.multipart_body + assert b"hello generated core" in state.multipart_body + assert b'name="name"' in state.multipart_body + assert b"conformance.txt" in state.multipart_body + assert b'name="parent_id"' in state.multipart_body + assert ROOT_FOLDER_ID.encode() in state.multipart_body + + +def _header(headers: Any, name: str) -> str | None: + """Read headers without assuming a generated transport's casing policy.""" + wanted = name.casefold() + return next( + (str(value) for key, value in headers.items() if str(key).casefold() == wanted), + None, + ) + + +def _assert_redirect_not_followed(state: _WireState) -> None: + # Phase 1 deliberately exposes 307 to callers. Phase 2 may follow the + # signed URL, but must build a new unauthenticated request to do so. + assert state.sink_requests == [] + content_requests = [r for r in state.api_requests if r["path"].endswith("/content")] + assert content_requests[-1]["authorization"] == f"Bearer {TOKEN}" + + +def test_sync_generated_client_live_wire_conformance( + wire_server: tuple[str, _WireState], +) -> None: + base_url, state = wire_server + + with SyncApiClient(SyncConfiguration(host=base_url)) as unauthenticated: + with pytest.raises(SyncApiException) as exc_info: + SyncDrivesApi(unauthenticated).drives_list() + assert exc_info.value.status == 401 + assert exc_info.value.headers.get("WWW-Authenticate", "").startswith("Bearer") + + configuration = SyncConfiguration(host=base_url, access_token=TOKEN) + with SyncApiClient(configuration) as api_client: + drives = SyncDrivesApi(api_client) + artifacts = SyncArtifactsApi(api_client) + + first = drives.drives_list_with_http_info(limit=1) + assert first.status_code == 200 + assert _header(first.headers, "X-Request-Id") == "req_list" + assert [item.id for item in first.data.items] == [DRIVE_ID] + assert first.data.next_cursor == "page-2" + second = drives.drives_list(limit=1, cursor=first.data.next_cursor) + assert second.items == [] + assert second.next_cursor is None + + request = SyncDriveCreateIn(name="generated-core") + created = drives.drives_create_with_http_info("idem-sync", request) + replay = drives.drives_create("idem-sync", request) + assert created.status_code == 201 + assert _header(created.headers, "ETag") == ETAG + assert created.data.id == replay.id == DRIVE_ID + + uploaded = artifacts.artifacts_create( + DRIVE_ID, + "idem-sync-upload", + ("conformance.txt", b"hello generated core"), + "conformance.txt", + ROOT_FOLDER_ID, + content_type="text/plain", + metadata={"source": "wire-test"}, + ) + assert uploaded.id == ARTIFACT_ID + assert uploaded.effective_visibility == "private" + _assert_multipart(state) + + conditional = artifacts.artifacts_read_without_preload_content( + DRIVE_ID, + ARTIFACT_ID, + if_none_match=ETAG, + ) + assert conditional.status == 304 + assert _header(conditional.headers, "ETag") == ETAG + conditional.release_conn() + + with pytest.raises(SyncApiException) as missing: + drives.drives_read(MISSING_DRIVE_ID) + assert missing.value.status == 404 + assert "NOT_FOUND" in (missing.value.body or "") + + redirect = artifacts.artifacts_content_without_preload_content( + DRIVE_ID, ARTIFACT_ID + ) + assert redirect.status == 307 + assert (_header(redirect.headers, "Location") or "").endswith("/signed-content") + redirect.release_conn() + + assert len(state.idempotent_drives) == 1 + _assert_redirect_not_followed(state) + + +async def _run_async_conformance(base_url: str, state: _WireState) -> None: + async with AsyncApiClient(AsyncConfiguration(host=base_url)) as unauthenticated: + with pytest.raises(AsyncApiException) as exc_info: + await AsyncDrivesApi(unauthenticated).drives_list() + assert exc_info.value.status == 401 + assert exc_info.value.headers.get("WWW-Authenticate", "").startswith("Bearer") + + configuration = AsyncConfiguration(host=base_url, access_token=TOKEN) + async with AsyncApiClient(configuration) as api_client: + drives = AsyncDrivesApi(api_client) + artifacts = AsyncArtifactsApi(api_client) + + first = await drives.drives_list_with_http_info(limit=1) + assert first.status_code == 200 + assert _header(first.headers, "X-Request-Id") == "req_list" + assert [item.id for item in first.data.items] == [DRIVE_ID] + assert first.data.next_cursor == "page-2" + second = await drives.drives_list(limit=1, cursor=first.data.next_cursor) + assert second.items == [] + assert second.next_cursor is None + + request = AsyncDriveCreateIn(name="generated-core") + created = await drives.drives_create_with_http_info("idem-async", request) + replay = await drives.drives_create("idem-async", request) + assert created.status_code == 201 + assert _header(created.headers, "ETag") == ETAG + assert created.data.id == replay.id == DRIVE_ID + + uploaded = await artifacts.artifacts_create( + DRIVE_ID, + "idem-async-upload", + ("conformance.txt", b"hello generated core"), + "conformance.txt", + ROOT_FOLDER_ID, + content_type="text/plain", + metadata={"source": "wire-test"}, + ) + assert uploaded.id == ARTIFACT_ID + assert uploaded.effective_visibility == "private" + _assert_multipart(state) + + conditional = await artifacts.artifacts_read_without_preload_content( + DRIVE_ID, + ARTIFACT_ID, + if_none_match=ETAG, + ) + assert conditional.status_code == 304 + assert _header(conditional.headers, "ETag") == ETAG + await conditional.aclose() + + with pytest.raises(AsyncApiException) as missing: + await drives.drives_read(MISSING_DRIVE_ID) + assert missing.value.status == 404 + assert "NOT_FOUND" in (missing.value.body or "") + + redirect = await artifacts.artifacts_content_without_preload_content( + DRIVE_ID, + ARTIFACT_ID, + ) + assert redirect.status_code == 307 + assert (_header(redirect.headers, "Location") or "").endswith("/signed-content") + await redirect.aclose() + + assert len(state.idempotent_drives) == 1 + _assert_redirect_not_followed(state) + + +def test_async_generated_client_live_wire_conformance( + wire_server: tuple[str, _WireState], +) -> None: + base_url, state = wire_server + asyncio.run(_run_async_conformance(base_url, state)) diff --git a/sdk/python/tox.ini b/sdk/python/tox.ini deleted file mode 100644 index 891045f..0000000 --- a/sdk/python/tox.ini +++ /dev/null @@ -1,9 +0,0 @@ -[tox] -envlist = py3 - -[testenv] -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=agentdrive_sdk diff --git a/sdk/typescript/README.md b/sdk/typescript/README.md index 8c7e8c1..2b69436 100644 --- a/sdk/typescript/README.md +++ b/sdk/typescript/README.md @@ -1,4 +1,4 @@ -# @mnexa-ai/agentdrive-sdk@0.0.1 +# @mnexa-ai/agentdrive-sdk@0.1.0 A TypeScript SDK client for the api.agentdrive.run API. @@ -16,21 +16,31 @@ Next, try it out. ```ts import { Configuration, - AgentAuthApi, + ArtifactsApi, } from '@mnexa-ai/agentdrive-sdk'; -import type { ExtensionExchangeV0AuthExtensionExchangePostRequest } from '@mnexa-ai/agentdrive-sdk'; +import type { ArtifactsContentRequest } from '@mnexa-ai/agentdrive-sdk'; async function example() { console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const api = new AgentAuthApi(); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new ArtifactsApi(config); const body = { - // ExtensionExchangeRequest - extensionExchangeRequest: ..., - } satisfies ExtensionExchangeV0AuthExtensionExchangePostRequest; + // string + driveId: driveId_example, + // string + artifactId: artifactId_example, + // string (optional) + ifNoneMatch: ifNoneMatch_example, + // string (optional) + authorization: authorization_example, + } satisfies ArtifactsContentRequest; try { - const data = await api.extensionExchangeV0AuthExtensionExchangePost(body); + const data = await api.artifactsContent(body); console.log(data); } catch (error) { console.error(error); @@ -50,257 +60,107 @@ All URIs are relative to *https://api.agentdrive.run* | Class | Method | HTTP request | Description | ----- | ------ | ------------ | ------------- -*AgentAuthApi* | [**extensionExchangeV0AuthExtensionExchangePost**](docs/AgentAuthApi.md#extensionexchangev0authextensionexchangepost) | **POST** /v0/auth/extension/exchange | Redeem an extension OAuth ticket for a JWT pair -*AgentAuthApi* | [**initiateClaimAgentIdentityClaimPost**](docs/AgentAuthApi.md#initiateclaimagentidentityclaimpost) | **POST** /agent/identity/claim | Initiate the human-claim ceremony for an agent identity -*AgentAuthApi* | [**jwksWellKnownJwksJsonGet**](docs/AgentAuthApi.md#jwkswellknownjwksjsonget) | **GET** /.well-known/jwks.json | JSON Web Key Set — public keys for verifying AgentDrive JWTs -*AgentAuthApi* | [**oauth2TokenOauth2TokenPost**](docs/AgentAuthApi.md#oauth2tokenoauth2tokenpost) | **POST** /oauth2/token | Exchange a credential for an access_token -*AgentAuthApi* | [**oauthAuthorizationServerWellKnownOauthAuthorizationServerGet**](docs/AgentAuthApi.md#oauthauthorizationserverwellknownoauthauthorizationserverget) | **GET** /.well-known/oauth-authorization-server | Authorization-server metadata (RFC 8414 + auth.md agent_auth block) -*AgentAuthApi* | [**oauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGet**](docs/AgentAuthApi.md#oauthprotectedresourcemcpwellknownoauthprotectedresourcemcpget) | **GET** /.well-known/oauth-protected-resource/mcp | Protected-resource metadata for the MCP endpoint (RFC 9728 §3.1) -*AgentAuthApi* | [**oauthProtectedResourceWellKnownOauthProtectedResourceGet**](docs/AgentAuthApi.md#oauthprotectedresourcewellknownoauthprotectedresourceget) | **GET** /.well-known/oauth-protected-resource | Protected-resource metadata (auth.md / RFC 9728-like discovery) -*AgentAuthApi* | [**registerAgentIdentityAgentIdentityPost**](docs/AgentAuthApi.md#registeragentidentityagentidentitypost) | **POST** /agent/identity | Register an agent identity (anonymous or ID-JAG) -*DefaultApi* | [**abortUploadV0UploadsUploadIdDelete**](docs/DefaultApi.md#abortuploadv0uploadsuploadiddelete) | **DELETE** /v0/uploads/{upload_id} | Abort a large (direct-to-GCS) upload session -*DefaultApi* | [**beginUploadV0UploadsPost**](docs/DefaultApi.md#beginuploadv0uploadspost) | **POST** /v0/uploads | Begin a large (direct-to-GCS) upload -*DefaultApi* | [**callbackAuthCallbackGet**](docs/DefaultApi.md#callbackauthcallbackget) | **GET** /auth/callback | Callback -*DefaultApi* | [**cancelJobV0JobsJobIdCancelPost**](docs/DefaultApi.md#canceljobv0jobsjobidcancelpost) | **POST** /v0/jobs/{job_id}/cancel | Cancel a queued/running job -*DefaultApi* | [**commitUploadV0UploadsUploadIdCommitPost**](docs/DefaultApi.md#commituploadv0uploadsuploadidcommitpost) | **POST** /v0/uploads/{upload_id}/commit | Commit a large (direct-to-GCS) upload -*DefaultApi* | [**copyArtifactRouteV0ArtifactsArtIdCopyPost**](docs/DefaultApi.md#copyartifactroutev0artifactsartidcopypost) | **POST** /v0/artifacts/{art_id}/copy | Duplicate an artifact to a new path (CAS-shared, new ID) -*DefaultApi* | [**copyFolderByIdV0FoldersFldIdCopyPost**](docs/DefaultApi.md#copyfolderbyidv0foldersfldidcopypost) | **POST** /v0/folders/{fld_id}/copy | Duplicate a folder subtree to a new path (CAS-shared, new IDs) -*DefaultApi* | [**createFolderByPathV0FoldersPathPut**](docs/DefaultApi.md#createfolderbypathv0folderspathput) | **PUT** /v0/folders/{path} | Create a folder (idempotent) -*DefaultApi* | [**createGrantRouteV0GrantsPost**](docs/DefaultApi.md#creategrantroutev0grantspost) | **POST** /v0/grants | Create (or fetch) a per-principal grant on a resource -*DefaultApi* | [**createShareRouteV0SharesPost**](docs/DefaultApi.md#createshareroutev0sharespost) | **POST** /v0/shares | Mint a share link (returns the share_key once) -*DefaultApi* | [**deleteArtifactByIdRouteV0ArtifactsArtIdDelete**](docs/DefaultApi.md#deleteartifactbyidroutev0artifactsartiddelete) | **DELETE** /v0/artifacts/{art_id} | Soft-delete an artifact by its stable ID -*DefaultApi* | [**deleteArtifactV0ArtifactsPathDelete**](docs/DefaultApi.md#deleteartifactv0artifactspathdelete) | **DELETE** /v0/artifacts/{path} | Delete Artifact -*DefaultApi* | [**deleteDriveRouteV0DrivesDriveIdDelete**](docs/DefaultApi.md#deletedriveroutev0drivesdriveiddelete) | **DELETE** /v0/drives/{drive_id} | Soft-delete a drive -*DefaultApi* | [**deleteFolderByIdV0FoldersFldIdDelete**](docs/DefaultApi.md#deletefolderbyidv0foldersfldiddelete) | **DELETE** /v0/folders/{fld_id} | Soft-delete a folder by stable ID (cascade with ?recursive=true) -*DefaultApi* | [**deleteFolderByPathV0FoldersPathDelete**](docs/DefaultApi.md#deletefolderbypathv0folderspathdelete) | **DELETE** /v0/folders/{path} | Soft-delete a folder (cascade with ?recursive=true) -*DefaultApi* | [**deleteGrantRouteV0GrantsGrnIdDelete**](docs/DefaultApi.md#deletegrantroutev0grantsgrniddelete) | **DELETE** /v0/grants/{grn_id} | Revoke a grant (can_manage, or self-revoke own grant) -*DefaultApi* | [**deleteShareRouteV0SharesShrIdDelete**](docs/DefaultApi.md#deleteshareroutev0sharesshriddelete) | **DELETE** /v0/shares/{shr_id} | Revoke a share link (requires can_manage) -*DefaultApi* | [**downloadArtifactByIdV0ArtifactsArtIdDownloadGet**](docs/DefaultApi.md#downloadartifactbyidv0artifactsartiddownloadget) | **GET** /v0/artifacts/{art_id}/download | Stream the artifact bytes by stable ID (never rendered HTML) -*DefaultApi* | [**downloadArtifactByPathV0ArtifactsPathDownloadGet**](docs/DefaultApi.md#downloadartifactbypathv0artifactspathdownloadget) | **GET** /v0/artifacts/{path}/download | Stream the artifact bytes by path (never rendered HTML) -*DefaultApi* | [**downloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGet**](docs/DefaultApi.md#downloadartifactversionv0artifactsartidversionsversionnumberdownloadget) | **GET** /v0/artifacts/{art_id}/versions/{version_number}/download | Stream bytes for a specific version (machine surface) -*DefaultApi* | [**downloadUrlByIdV0ArtifactsArtIdDownloadUrlGet**](docs/DefaultApi.md#downloadurlbyidv0artifactsartiddownloadurlget) | **GET** /v0/artifacts/{art_id}/download-url | Signed direct-from-GCS download URL by stable ID -*DefaultApi* | [**downloadUrlByPathV0ArtifactsPathDownloadUrlGet**](docs/DefaultApi.md#downloadurlbypathv0artifactspathdownloadurlget) | **GET** /v0/artifacts/{path}/download-url | Signed direct-from-GCS download URL by path -*DefaultApi* | [**downloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGet**](docs/DefaultApi.md#downloadurlversionv0artifactsartidversionsversionnumberdownloadurlget) | **GET** /v0/artifacts/{art_id}/versions/{version_number}/download-url | Signed direct-from-GCS download URL for a specific version -*DefaultApi* | [**enqueueJobV0ProjectsFldIdJobsPost**](docs/DefaultApi.md#enqueuejobv0projectsfldidjobspost) | **POST** /v0/projects/{fld_id}/jobs | Enqueue a compile job for a project (folder) -*DefaultApi* | [**extensionStartAuthExtensionStartGet**](docs/DefaultApi.md#extensionstartauthextensionstartget) | **GET** /auth/extension/start | Extension Start -*DefaultApi* | [**findV0FindGet**](docs/DefaultApi.md#findv0findget) | **GET** /v0/find | Hybrid passage retrieval over the full file body -*DefaultApi* | [**getArtifactByIdMetaV0ArtifactsArtIdMetaGet**](docs/DefaultApi.md#getartifactbyidmetav0artifactsartidmetaget) | **GET** /v0/artifacts/{art_id}/meta | Artifact metadata by stable ID (same shape as path /meta) -*DefaultApi* | [**getArtifactByIdV0ArtifactsArtIdGet**](docs/DefaultApi.md#getartifactbyidv0artifactsartidget) | **GET** /v0/artifacts/{art_id} | Canonical lookup of an artifact by its stable ID -*DefaultApi* | [**getArtifactMetaV0ArtifactsPathMetaGet**](docs/DefaultApi.md#getartifactmetav0artifactspathmetaget) | **GET** /v0/artifacts/{path}/meta | Get Artifact Meta -*DefaultApi* | [**getArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGet**](docs/DefaultApi.md#getartifactversionv0artifactsartidversionsversionnumberget) | **GET** /v0/artifacts/{art_id}/versions/{version_number} | Metadata for a specific version of an artifact -*DefaultApi* | [**getDriveRouteV0DrivesDriveIdGet**](docs/DefaultApi.md#getdriveroutev0drivesdriveidget) | **GET** /v0/drives/{drive_id} | Drive overview by id (same shape as /drives/me) -*DefaultApi* | [**getFeedbackStatusV0FeedbackFbkIdGet**](docs/DefaultApi.md#getfeedbackstatusv0feedbackfbkidget) | **GET** /v0/feedback/{fbk_id} | Get Feedback Status -*DefaultApi* | [**getFolderByIdMetaV0FoldersFldIdMetaGet**](docs/DefaultApi.md#getfolderbyidmetav0foldersfldidmetaget) | **GET** /v0/folders/{fld_id}/meta | Folder metadata by stable ID (same shape as the bare id route) -*DefaultApi* | [**getFolderByIdV0FoldersFldIdGet**](docs/DefaultApi.md#getfolderbyidv0foldersfldidget) | **GET** /v0/folders/{fld_id} | Canonical lookup of a folder by its stable ID -*DefaultApi* | [**getFolderByPathMetaV0FoldersPathMetaGet**](docs/DefaultApi.md#getfolderbypathmetav0folderspathmetaget) | **GET** /v0/folders/{path}/meta | Folder metadata by path (same shape as the bare path route) -*DefaultApi* | [**getFolderByPathV0FoldersPathGet**](docs/DefaultApi.md#getfolderbypathv0folderspathget) | **GET** /v0/folders/{path} | Read folder metadata by path -*DefaultApi* | [**getGrantRouteV0GrantsGrnIdGet**](docs/DefaultApi.md#getgrantroutev0grantsgrnidget) | **GET** /v0/grants/{grn_id} | Read a single grant (can_manage, or the grant\'s own principal) -*DefaultApi* | [**getJobLogsV0JobsJobIdLogsGet**](docs/DefaultApi.md#getjoblogsv0jobsjobidlogsget) | **GET** /v0/jobs/{job_id}/logs | Raw compile log (text/plain) -*DefaultApi* | [**getJobV0JobsJobIdGet**](docs/DefaultApi.md#getjobv0jobsjobidget) | **GET** /v0/jobs/{job_id} | Poll a job -*DefaultApi* | [**getProjectV0ProjectsFldIdGet**](docs/DefaultApi.md#getprojectv0projectsfldidget) | **GET** /v0/projects/{fld_id} | Get a project\'s compile config -*DefaultApi* | [**getShareRouteV0SharesShrIdGet**](docs/DefaultApi.md#getshareroutev0sharesshridget) | **GET** /v0/shares/{shr_id} | Read a single share link\'s metadata (requires can_manage) -*DefaultApi* | [**getUploadStatusV0UploadsUploadIdGet**](docs/DefaultApi.md#getuploadstatusv0uploadsuploadidget) | **GET** /v0/uploads/{upload_id} | Get the status of a large (direct-to-GCS) upload session -*DefaultApi* | [**healthHealthGet**](docs/DefaultApi.md#healthhealthget) | **GET** /health | Health -*DefaultApi* | [**listArtifactVersionsV0ArtifactsArtIdVersionsGet**](docs/DefaultApi.md#listartifactversionsv0artifactsartidversionsget) | **GET** /v0/artifacts/{art_id}/versions | List versions of an artifact, newest first -*DefaultApi* | [**listArtifactsV0ArtifactsGet**](docs/DefaultApi.md#listartifactsv0artifactsget) | **GET** /v0/artifacts | List artifacts in the drive -*DefaultApi* | [**listEventsRouteV0EventsGet**](docs/DefaultApi.md#listeventsroutev0eventsget) | **GET** /v0/events | Read the append-only event log for the authenticated drive -*DefaultApi* | [**listGrantsRouteV0GrantsGet**](docs/DefaultApi.md#listgrantsroutev0grantsget) | **GET** /v0/grants | List live grants on a resource (requires can_manage) -*DefaultApi* | [**listProjectJobsV0ProjectsFldIdJobsGet**](docs/DefaultApi.md#listprojectjobsv0projectsfldidjobsget) | **GET** /v0/projects/{fld_id}/jobs | List a project\'s jobs -*DefaultApi* | [**listSharesRouteV0SharesGet**](docs/DefaultApi.md#listsharesroutev0sharesget) | **GET** /v0/shares | List live share links on a resource (requires can_manage) -*DefaultApi* | [**listTrashRouteV0DrivesDriveIdTrashGet**](docs/DefaultApi.md#listtrashroutev0drivesdriveidtrashget) | **GET** /v0/drives/{drive_id}/trash | List the authenticated drive\'s trash -*DefaultApi* | [**loginAuthLoginGet**](docs/DefaultApi.md#loginauthloginget) | **GET** /auth/login | Login -*DefaultApi* | [**logoutAuthLogoutPost**](docs/DefaultApi.md#logoutauthlogoutpost) | **POST** /auth/logout | Logout -*DefaultApi* | [**meUsageV0DrivesMeUsageGet**](docs/DefaultApi.md#meusagev0drivesmeusageget) | **GET** /v0/drives/me/usage | Current-period usage + caps for the authenticated drive -*DefaultApi* | [**meV0DrivesMeGet**](docs/DefaultApi.md#mev0drivesmeget) | **GET** /v0/drives/me | Me -*DefaultApi* | [**moveArtifactRouteV0ArtifactsArtIdMovePost**](docs/DefaultApi.md#moveartifactroutev0artifactsartidmovepost) | **POST** /v0/artifacts/{art_id}/move | Rename / move an artifact to a new path -*DefaultApi* | [**moveFolderByIdV0FoldersFldIdMovePost**](docs/DefaultApi.md#movefolderbyidv0foldersfldidmovepost) | **POST** /v0/folders/{fld_id}/move | Rename / move a folder by stable ID (cascade descendants) -*DefaultApi* | [**moveFolderByPathV0FoldersPathMovePost**](docs/DefaultApi.md#movefolderbypathv0folderspathmovepost) | **POST** /v0/folders/{path}/move | Rename / move a folder (cascade-update descendants) -*DefaultApi* | [**patchArtifactRouteV0ArtifactsArtIdPatch**](docs/DefaultApi.md#patchartifactroutev0artifactsartidpatch) | **PATCH** /v0/artifacts/{art_id} | Edit artifact metadata (labels / metadata / source) -*DefaultApi* | [**patchFolderByIdV0FoldersFldIdPatch**](docs/DefaultApi.md#patchfolderbyidv0foldersfldidpatch) | **PATCH** /v0/folders/{fld_id} | Update folder metadata by stable ID -*DefaultApi* | [**patchFolderByPathV0FoldersPathPatch**](docs/DefaultApi.md#patchfolderbypathv0folderspathpatch) | **PATCH** /v0/folders/{path} | Update folder metadata by path -*DefaultApi* | [**patchGrantRouteV0GrantsGrnIdPatch**](docs/DefaultApi.md#patchgrantroutev0grantsgrnidpatch) | **PATCH** /v0/grants/{grn_id} | Update a grant\'s role and/or expiry (requires can_manage) -*DefaultApi* | [**postDescribeV0QueryDescribePost**](docs/DefaultApi.md#postdescribev0querydescribepost) | **POST** /v0/query/describe | Describe a dataset\'s column schema -*DefaultApi* | [**postFeedbackV0FeedbackPost**](docs/DefaultApi.md#postfeedbackv0feedbackpost) | **POST** /v0/feedback | Post Feedback -*DefaultApi* | [**postLookupValuesV0QueryLookupValuesPost**](docs/DefaultApi.md#postlookupvaluesv0querylookupvaluespost) | **POST** /v0/query/lookup-values | List distinct values of a dataset column -*DefaultApi* | [**postQueryV0QueryPost**](docs/DefaultApi.md#postqueryv0querypost) | **POST** /v0/query | Run a read-only SQL query over authorized datasets -*DefaultApi* | [**putArtifactV0ArtifactsPathPut**](docs/DefaultApi.md#putartifactv0artifactspathput) | **PUT** /v0/artifacts/{path} | Upload (or overwrite) an artifact -*DefaultApi* | [**putProjectV0ProjectsFldIdPut**](docs/DefaultApi.md#putprojectv0projectsfldidput) | **PUT** /v0/projects/{fld_id} | Set a project\'s compile config (entrypoint/engine/auto_compile) -*DefaultApi* | [**redeemShareSShareKeyGet**](docs/DefaultApi.md#redeemsharessharekeyget) | **GET** /s/{share_key} | Redeem Share -*DefaultApi* | [**redeemShareWithPasswordSShareKeyPost**](docs/DefaultApi.md#redeemsharewithpasswordssharekeypost) | **POST** /s/{share_key} | Redeem Share With Password -*DefaultApi* | [**restoreArtifactV0ArtifactsArtIdRestorePost**](docs/DefaultApi.md#restoreartifactv0artifactsartidrestorepost) | **POST** /v0/artifacts/{art_id}/restore | Restore a soft-deleted artifact -*DefaultApi* | [**restoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePost**](docs/DefaultApi.md#restoreartifactversionv0artifactsartidversionsversionnumberrestorepost) | **POST** /v0/artifacts/{art_id}/versions/{version_number}/restore | Restore a previous version as a new head version -*DefaultApi* | [**restoreDriveRouteV0DrivesDriveIdRestorePost**](docs/DefaultApi.md#restoredriveroutev0drivesdriveidrestorepost) | **POST** /v0/drives/{drive_id}/restore | Restore a soft-deleted drive -*DefaultApi* | [**restoreFolderByIdV0FoldersFldIdRestorePost**](docs/DefaultApi.md#restorefolderbyidv0foldersfldidrestorepost) | **POST** /v0/folders/{fld_id}/restore | Restore a soft-deleted folder (cascade) -*DefaultApi* | [**rotateShareRouteV0SharesShrIdRotatePost**](docs/DefaultApi.md#rotateshareroutev0sharesshridrotatepost) | **POST** /v0/shares/{shr_id}/rotate | Revoke + reissue a share link\'s key (requires can_share) -*DefaultApi* | [**searchV0SearchGet**](docs/DefaultApi.md#searchv0searchget) | **GET** /v0/search | Full-text search over artifacts in the drive -*DefaultApi* | [**viewArtifactHeadAArtIdHeadGet**](docs/DefaultApi.md#viewartifactheadaartidheadget) | **GET** /a/{art_id}/head | View Artifact Head -*DefaultApi* | [**viewArtifactVersionVArtIdVersionGet**](docs/DefaultApi.md#viewartifactversionvartidversionget) | **GET** /v/{art_id}/{version} | View Artifact Version -*DefaultApi* | [**viewFileDriveIdPathGet**](docs/DefaultApi.md#viewfiledriveidpathget) | **GET** /{drive_id}/{path} | View File -*DefaultApi* | [**viewPermalinkArtifactAArtIdGet**](docs/DefaultApi.md#viewpermalinkartifactaartidget) | **GET** /a/{art_id} | View Permalink Artifact -*DefaultApi* | [**viewPermalinkFolderFFldIdGet**](docs/DefaultApi.md#viewpermalinkfolderffldidget) | **GET** /f/{fld_id} | View Permalink Folder -*DrivesApi* | [**createDriveKeyRouteV0DrivesDriveIdKeysPost**](docs/DrivesApi.md#createdrivekeyroutev0drivesdriveidkeyspost) | **POST** /v0/drives/{drive_id}/keys | Create a drive API key -*DrivesApi* | [**createDriveRouteV0DrivesPost**](docs/DrivesApi.md#createdriveroutev0drivespost) | **POST** /v0/drives | Create a drive in your active space -*DrivesApi* | [**listDriveKeysRouteV0DrivesDriveIdKeysGet**](docs/DrivesApi.md#listdrivekeysroutev0drivesdriveidkeysget) | **GET** /v0/drives/{drive_id}/keys | List a drive\'s API keys -*DrivesApi* | [**listDrivesRouteV0DrivesGet**](docs/DrivesApi.md#listdrivesroutev0drivesget) | **GET** /v0/drives | List the drives you can see -*DrivesApi* | [**renameDriveRouteV0DrivesDriveIdPatch**](docs/DrivesApi.md#renamedriveroutev0drivesdriveidpatch) | **PATCH** /v0/drives/{drive_id} | Rename a drive you own -*DrivesApi* | [**revokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePost**](docs/DrivesApi.md#revokedrivekeyroutev0drivesdriveidkeyskeyidrevokepost) | **POST** /v0/drives/{drive_id}/keys/{key_id}/revoke | Revoke a drive API key -*DrivesApi* | [**rotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePost**](docs/DrivesApi.md#rotateonekeyroutev0drivesdriveidkeyskeyidrotatepost) | **POST** /v0/drives/{drive_id}/keys/{key_id}/rotate | Rotate one API key -*McpOauthApi* | [**oauth2RegisterOauth2RegisterPost**](docs/McpOauthApi.md#oauth2registeroauth2registerpost) | **POST** /oauth2/register | Dynamic Client Registration (RFC 7591) -*McpOauthApi* | [**oauth2RevokeOauth2RevokePost**](docs/McpOauthApi.md#oauth2revokeoauth2revokepost) | **POST** /oauth2/revoke | Token revocation (RFC 7009) -*McpOauthUiApi* | [**authorizeDecisionOauth2AuthorizePost**](docs/McpOauthUiApi.md#authorizedecisionoauth2authorizepost) | **POST** /oauth2/authorize | Authorize Decision -*McpOauthUiApi* | [**authorizePageOauth2AuthorizeGet**](docs/McpOauthUiApi.md#authorizepageoauth2authorizeget) | **GET** /oauth2/authorize | Authorize Page -*MembersApi* | [**inviteMemberV0MembersInvitePost**](docs/MembersApi.md#invitememberv0membersinvitepost) | **POST** /v0/members/invite | Invite a person to your workspace by email -*MembersApi* | [**listInvitationsV0InvitationsGet**](docs/MembersApi.md#listinvitationsv0invitationsget) | **GET** /v0/invitations | List pending invitations -*MembersApi* | [**listMembersV0MembersGet**](docs/MembersApi.md#listmembersv0membersget) | **GET** /v0/members | List the members of your active workspace -*MembersApi* | [**removeMemberV0MembersTargetUserIdDelete**](docs/MembersApi.md#removememberv0memberstargetuseriddelete) | **DELETE** /v0/members/{target_user_id} | Remove a member (or leave) -*MembersApi* | [**revokeInvitationV0InvitationsInvitationIdDelete**](docs/MembersApi.md#revokeinvitationv0invitationsinvitationiddelete) | **DELETE** /v0/invitations/{invitation_id} | Revoke a pending invitation -*MembersApi* | [**setMemberRoleV0MembersTargetUserIdPatch**](docs/MembersApi.md#setmemberrolev0memberstargetuseridpatch) | **PATCH** /v0/members/{target_user_id} | Change a member\'s role -*TokensApi* | [**listTokensV0TokensGet**](docs/TokensApi.md#listtokensv0tokensget) | **GET** /v0/tokens | List your user-identity tokens -*TokensApi* | [**revokeTokenV0TokensTokenIdRevokePost**](docs/TokensApi.md#revoketokenv0tokenstokenidrevokepost) | **POST** /v0/tokens/{token_id}/revoke | Revoke one of your user-identity tokens -*WorkspacesApi* | [**createWorkspaceRouteV0WorkspacesPost**](docs/WorkspacesApi.md#createworkspaceroutev0workspacespost) | **POST** /v0/workspaces | Create a new shared drive -*WorkspacesApi* | [**listWorkspacesRouteV0WorkspacesGet**](docs/WorkspacesApi.md#listworkspacesroutev0workspacesget) | **GET** /v0/workspaces | List the spaces you belong to -*WorkspacesApi* | [**renameWorkspaceRouteV0WorkspacesOrgIdPatch**](docs/WorkspacesApi.md#renameworkspaceroutev0workspacesorgidpatch) | **PATCH** /v0/workspaces/{org_id} | Rename a shared drive you administer +*ArtifactsApi* | [**artifactsContent**](docs/ArtifactsApi.md#artifactscontent) | **GET** /v0/drives/{drive_id}/artifacts/{artifact_id}/content | Read Artifact Content +*ArtifactsApi* | [**artifactsCopy**](docs/ArtifactsApi.md#artifactscopy) | **POST** /v0/drives/{drive_id}/artifacts/{artifact_id}/copy | Copy Artifact +*ArtifactsApi* | [**artifactsCreate**](docs/ArtifactsApi.md#artifactscreate) | **POST** /v0/drives/{drive_id}/artifacts | Create Artifact +*ArtifactsApi* | [**artifactsDelete**](docs/ArtifactsApi.md#artifactsdelete) | **DELETE** /v0/drives/{drive_id}/artifacts/{artifact_id} | Delete Artifact +*ArtifactsApi* | [**artifactsList**](docs/ArtifactsApi.md#artifactslist) | **GET** /v0/drives/{drive_id}/artifacts | List Artifacts +*ArtifactsApi* | [**artifactsRead**](docs/ArtifactsApi.md#artifactsread) | **GET** /v0/drives/{drive_id}/artifacts/{artifact_id} | Read Artifact +*ArtifactsApi* | [**artifactsRestore**](docs/ArtifactsApi.md#artifactsrestore) | **POST** /v0/drives/{drive_id}/artifacts/{artifact_id}/restore | Restore Artifact +*ArtifactsApi* | [**artifactsUpdate**](docs/ArtifactsApi.md#artifactsupdate) | **PATCH** /v0/drives/{drive_id}/artifacts/{artifact_id} | Update Artifact +*ChangesApi* | [**changesList**](docs/ChangesApi.md#changeslist) | **GET** /v0/drives/{drive_id}/changes | List Changes +*DefaultApi* | [**health**](docs/DefaultApi.md#health) | **GET** /health | Health +*DiscoveryApi* | [**oauthProtectedResource**](docs/DiscoveryApi.md#oauthprotectedresource) | **GET** /.well-known/oauth-protected-resource | Protected-resource metadata (RFC 9728) +*DrivesApi* | [**drivesCreate**](docs/DrivesApi.md#drivescreate) | **POST** /v0/drives | Create Drive +*DrivesApi* | [**drivesDelete**](docs/DrivesApi.md#drivesdelete) | **DELETE** /v0/drives/{drive_id} | Delete Drive +*DrivesApi* | [**drivesList**](docs/DrivesApi.md#driveslist) | **GET** /v0/drives | List Drives +*DrivesApi* | [**drivesRead**](docs/DrivesApi.md#drivesread) | **GET** /v0/drives/{drive_id} | Read Drive +*DrivesApi* | [**drivesRestore**](docs/DrivesApi.md#drivesrestore) | **POST** /v0/drives/{drive_id}/restore | Restore Drive +*DrivesApi* | [**drivesUpdate**](docs/DrivesApi.md#drivesupdate) | **PATCH** /v0/drives/{drive_id} | Update Drive +*DrivesApi* | [**drivesUsage**](docs/DrivesApi.md#drivesusage) | **GET** /v0/drives/{drive_id}/usage | Drive Usage +*FoldersApi* | [**foldersCopy**](docs/FoldersApi.md#folderscopy) | **POST** /v0/drives/{drive_id}/folders/{folder_id}/copy | Copy Folder +*FoldersApi* | [**foldersCreate**](docs/FoldersApi.md#folderscreate) | **POST** /v0/drives/{drive_id}/folders | Create Folder +*FoldersApi* | [**foldersDelete**](docs/FoldersApi.md#foldersdelete) | **DELETE** /v0/drives/{drive_id}/folders/{folder_id} | Delete Folder +*FoldersApi* | [**foldersList**](docs/FoldersApi.md#folderslist) | **GET** /v0/drives/{drive_id}/folders | List Folders +*FoldersApi* | [**foldersRead**](docs/FoldersApi.md#foldersread) | **GET** /v0/drives/{drive_id}/folders/{folder_id} | Read Folder +*FoldersApi* | [**foldersRestore**](docs/FoldersApi.md#foldersrestore) | **POST** /v0/drives/{drive_id}/folders/{folder_id}/restore | Restore Folder +*FoldersApi* | [**foldersUpdate**](docs/FoldersApi.md#foldersupdate) | **PATCH** /v0/drives/{drive_id}/folders/{folder_id} | Update Folder +*GrantsApi* | [**grantsCreate**](docs/GrantsApi.md#grantscreate) | **POST** /v0/drives/{drive_id}/grants | Create Grant +*GrantsApi* | [**grantsList**](docs/GrantsApi.md#grantslist) | **GET** /v0/drives/{drive_id}/grants | List Grants +*GrantsApi* | [**grantsRead**](docs/GrantsApi.md#grantsread) | **GET** /v0/drives/{drive_id}/grants/{grant_id} | Read Grant +*GrantsApi* | [**grantsRevoke**](docs/GrantsApi.md#grantsrevoke) | **DELETE** /v0/drives/{drive_id}/grants/{grant_id} | Revoke Grant +*GrantsApi* | [**grantsUpdate**](docs/GrantsApi.md#grantsupdate) | **PATCH** /v0/drives/{drive_id}/grants/{grant_id} | Update Grant +*SearchApi* | [**driveSearch**](docs/SearchApi.md#drivesearch) | **GET** /v0/drives/{drive_id}/search | Drive Search +*SharesApi* | [**sharesCreate**](docs/SharesApi.md#sharescreate) | **POST** /v0/drives/{drive_id}/shares | Create Share +*SharesApi* | [**sharesList**](docs/SharesApi.md#shareslist) | **GET** /v0/drives/{drive_id}/shares | List Shares +*SharesApi* | [**sharesRead**](docs/SharesApi.md#sharesread) | **GET** /v0/drives/{drive_id}/shares/{share_id} | Read Share +*SharesApi* | [**sharesRevoke**](docs/SharesApi.md#sharesrevoke) | **DELETE** /v0/drives/{drive_id}/shares/{share_id} | Revoke Share +*SharesApi* | [**sharesRotate**](docs/SharesApi.md#sharesrotate) | **POST** /v0/drives/{drive_id}/shares/{share_id}/rotate | Rotate Share +*SharesRedemptionApi* | [**sharesRedeem**](docs/SharesRedemptionApi.md#sharesredeem) | **GET** /s/{share_key} | Redeem Share +*VersionsApi* | [**versionsAppend**](docs/VersionsApi.md#versionsappend) | **POST** /v0/drives/{drive_id}/artifacts/{artifact_id}/versions | Append Version +*VersionsApi* | [**versionsContent**](docs/VersionsApi.md#versionscontent) | **GET** /v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}/content | Read Version Content +*VersionsApi* | [**versionsList**](docs/VersionsApi.md#versionslist) | **GET** /v0/drives/{drive_id}/artifacts/{artifact_id}/versions | List Versions +*VersionsApi* | [**versionsRead**](docs/VersionsApi.md#versionsread) | **GET** /v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id} | Read Version +*VersionsApi* | [**versionsRestore**](docs/VersionsApi.md#versionsrestore) | **POST** /v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}/restore | Restore Version ### Models -- [AgentAuthMetadataOut](docs/AgentAuthMetadataOut.md) -- [AnonymousIdentityResponse](docs/AnonymousIdentityResponse.md) -- [ArtifactDeleteOut](docs/ArtifactDeleteOut.md) -- [ArtifactHeadOut](docs/ArtifactHeadOut.md) -- [ArtifactMoveIn](docs/ArtifactMoveIn.md) +- [ArtifactCopyIn](docs/ArtifactCopyIn.md) +- [ArtifactListOut](docs/ArtifactListOut.md) - [ArtifactOut](docs/ArtifactOut.md) -- [ArtifactPatchIn](docs/ArtifactPatchIn.md) -- [ArtifactSource](docs/ArtifactSource.md) -- [AuthorizationServerMetadataOut](docs/AuthorizationServerMetadataOut.md) -- [AuthorizeDecisionOauth2AuthorizePost403Response](docs/AuthorizeDecisionOauth2AuthorizePost403Response.md) -- [ClaimInitRequest](docs/ClaimInitRequest.md) -- [ClaimInitResponse](docs/ClaimInitResponse.md) -- [ClaimMetadata](docs/ClaimMetadata.md) -- [ClientRegistrationOut](docs/ClientRegistrationOut.md) -- [CompileDiagnosticOut](docs/CompileDiagnosticOut.md) -- [CompileJobIn](docs/CompileJobIn.md) -- [CompileJobListOut](docs/CompileJobListOut.md) -- [CompileJobOut](docs/CompileJobOut.md) -- [CompileOptions](docs/CompileOptions.md) -- [CompileProjectOut](docs/CompileProjectOut.md) -- [CopyIn](docs/CopyIn.md) -- [DatasetDescriptionOut](docs/DatasetDescriptionOut.md) -- [DescribeIn](docs/DescribeIn.md) -- [DownloadUrlOut](docs/DownloadUrlOut.md) -- [DriveApiKeyCreateIn](docs/DriveApiKeyCreateIn.md) -- [DriveApiKeyCreateOut](docs/DriveApiKeyCreateOut.md) -- [DriveApiKeyListOut](docs/DriveApiKeyListOut.md) -- [DriveApiKeyOut](docs/DriveApiKeyOut.md) +- [ArtifactUpdateIn](docs/ArtifactUpdateIn.md) +- [ChangeActorOut](docs/ChangeActorOut.md) +- [ChangeOut](docs/ChangeOut.md) +- [ChangePageOut](docs/ChangePageOut.md) +- [ChangeResourceOut](docs/ChangeResourceOut.md) - [DriveCreateIn](docs/DriveCreateIn.md) -- [DriveCreateOut](docs/DriveCreateOut.md) -- [DriveDeleteOut](docs/DriveDeleteOut.md) -- [DriveList](docs/DriveList.md) +- [DriveListOut](docs/DriveListOut.md) - [DriveOut](docs/DriveOut.md) -- [DriveReadOut](docs/DriveReadOut.md) -- [DriveRenameIn](docs/DriveRenameIn.md) -- [DriveRestoreOut](docs/DriveRestoreOut.md) +- [DriveUpdateIn](docs/DriveUpdateIn.md) - [DriveUsageOut](docs/DriveUsageOut.md) -- [ErrorBody](docs/ErrorBody.md) -- [ErrorDetail](docs/ErrorDetail.md) +- [DrivesCreate400Response](docs/DrivesCreate400Response.md) +- [DrivesCreate400ResponseError](docs/DrivesCreate400ResponseError.md) +- [DrivesList400Response](docs/DrivesList400Response.md) +- [DrivesList400ResponseError](docs/DrivesList400ResponseError.md) - [ErrorResponse](docs/ErrorResponse.md) -- [EventOut](docs/EventOut.md) -- [EventPage](docs/EventPage.md) -- [ExtensionExchangeRequest](docs/ExtensionExchangeRequest.md) -- [ExtensionExchangeResponse](docs/ExtensionExchangeResponse.md) -- [FeedbackCreateOut](docs/FeedbackCreateOut.md) -- [FeedbackStatusOut](docs/FeedbackStatusOut.md) -- [FindHitOut](docs/FindHitOut.md) -- [FindPage](docs/FindPage.md) +- [FolderCascadeOut](docs/FolderCascadeOut.md) - [FolderCopyIn](docs/FolderCopyIn.md) -- [FolderCopyOut](docs/FolderCopyOut.md) - [FolderCreateIn](docs/FolderCreateIn.md) -- [FolderDeleteOut](docs/FolderDeleteOut.md) -- [FolderMoveIn](docs/FolderMoveIn.md) +- [FolderListOut](docs/FolderListOut.md) - [FolderOut](docs/FolderOut.md) -- [FolderPatchIn](docs/FolderPatchIn.md) -- [FolderRestoreOut](docs/FolderRestoreOut.md) +- [FolderUpdateIn](docs/FolderUpdateIn.md) - [GrantCreateIn](docs/GrantCreateIn.md) -- [GrantList](docs/GrantList.md) +- [GrantListOut](docs/GrantListOut.md) - [GrantOut](docs/GrantOut.md) -- [GrantPatchIn](docs/GrantPatchIn.md) -- [GrantPrincipalIn](docs/GrantPrincipalIn.md) +- [GrantUpdateIn](docs/GrantUpdateIn.md) - [HealthDegradedDetail](docs/HealthDegradedDetail.md) - [HealthDegradedResponse](docs/HealthDegradedResponse.md) - [HealthOut](docs/HealthOut.md) -- [HourlyUsageCounterOut](docs/HourlyUsageCounterOut.md) -- [IdentityAssertionMetadataOut](docs/IdentityAssertionMetadataOut.md) -- [InvitationList](docs/InvitationList.md) -- [InvitationOut](docs/InvitationOut.md) -- [InviteCreateOut](docs/InviteCreateOut.md) -- [JwkOut](docs/JwkOut.md) -- [JwksOut](docs/JwksOut.md) -- [LocInner](docs/LocInner.md) -- [LookupValuesIn](docs/LookupValuesIn.md) -- [LookupValuesOut](docs/LookupValuesOut.md) -- [MemberInviteIn](docs/MemberInviteIn.md) -- [MemberList](docs/MemberList.md) -- [MemberOut](docs/MemberOut.md) -- [MemberRemoveOut](docs/MemberRemoveOut.md) -- [MemberRoleIn](docs/MemberRoleIn.md) -- [OAuthProtocolErrorOut](docs/OAuthProtocolErrorOut.md) -- [OperationUsageOut](docs/OperationUsageOut.md) -- [Page](docs/Page.md) -- [ProjectConfigIn](docs/ProjectConfigIn.md) -- [ProtectedResourceMetadataOut](docs/ProtectedResourceMetadataOut.md) -- [QueryColumnOut](docs/QueryColumnOut.md) -- [QueryDryRunOut](docs/QueryDryRunOut.md) -- [QueryIn](docs/QueryIn.md) -- [QueryResultOut](docs/QueryResultOut.md) -- [RegisterAgentIdentityAgentIdentityPost422Response](docs/RegisterAgentIdentityAgentIdentityPost422Response.md) -- [ResponsePostQueryV0QueryPost](docs/ResponsePostQueryV0QueryPost.md) -- [RevokeOut](docs/RevokeOut.md) - [SearchHitOut](docs/SearchHitOut.md) -- [SearchPage](docs/SearchPage.md) +- [SearchPageOut](docs/SearchPageOut.md) - [ShareCreateIn](docs/ShareCreateIn.md) -- [ShareErrorOut](docs/ShareErrorOut.md) -- [ShareList](docs/ShareList.md) -- [ShareMintOut](docs/ShareMintOut.md) +- [ShareCreateOut](docs/ShareCreateOut.md) +- [ShareListOut](docs/ShareListOut.md) - [ShareOut](docs/ShareOut.md) -- [ShareRedeemOut](docs/ShareRedeemOut.md) -- [SourceRef](docs/SourceRef.md) -- [StorageBreakdownOut](docs/StorageBreakdownOut.md) -- [StorageFootprintOut](docs/StorageFootprintOut.md) -- [TokenResponse](docs/TokenResponse.md) -- [TokenUsageOut](docs/TokenUsageOut.md) -- [TrashArtifactOut](docs/TrashArtifactOut.md) -- [TrashDriveOut](docs/TrashDriveOut.md) -- [TrashOut](docs/TrashOut.md) -- [UploadAbortOut](docs/UploadAbortOut.md) -- [UploadBeginIn](docs/UploadBeginIn.md) -- [UploadBeginOut](docs/UploadBeginOut.md) -- [UploadStatusOut](docs/UploadStatusOut.md) -- [UsageCounterOut](docs/UsageCounterOut.md) -- [UsagePeriodOut](docs/UsagePeriodOut.md) -- [UserTokenList](docs/UserTokenList.md) -- [UserTokenOut](docs/UserTokenOut.md) -- [ValidationErrorBody](docs/ValidationErrorBody.md) -- [ValidationErrorDetail](docs/ValidationErrorDetail.md) +- [V0ErrorEnvelope](docs/V0ErrorEnvelope.md) - [ValidationErrorResponse](docs/ValidationErrorResponse.md) -- [ValidationIssue](docs/ValidationIssue.md) +- [ValidationErrorResponseError](docs/ValidationErrorResponseError.md) +- [ValidationErrorResponseErrorDetails](docs/ValidationErrorResponseErrorDetails.md) +- [ValidationErrorResponseErrorDetailsFieldsInner](docs/ValidationErrorResponseErrorDetailsFieldsInner.md) +- [VersionCreatedOut](docs/VersionCreatedOut.md) +- [VersionListOut](docs/VersionListOut.md) - [VersionOut](docs/VersionOut.md) -- [VersionPage](docs/VersionPage.md) -- [VersionRetentionOut](docs/VersionRetentionOut.md) -- [WorkspaceCreateIn](docs/WorkspaceCreateIn.md) -- [WorkspaceCreateOut](docs/WorkspaceCreateOut.md) -- [WorkspaceList](docs/WorkspaceList.md) -- [WorkspaceOut](docs/WorkspaceOut.md) -- [WorkspaceRenameIn](docs/WorkspaceRenameIn.md) ### Authorization Authentication schemes defined for the API: - -#### BearerAuth + +#### bearerAuth -- **Type**: HTTP Bearer Token authentication (ad_live_ | ad_user_ | JWT) +- **Type**: HTTP Bearer Token authentication (JWT) ## About @@ -309,7 +169,7 @@ and is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: `<PINNED>` -- Package version: `0.0.1` +- Package version: `0.1.0` - Generator version: `7.24.0` - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen` diff --git a/sdk/typescript/docs/AgentAuthApi.md b/sdk/typescript/docs/AgentAuthApi.md deleted file mode 100644 index 99dd072..0000000 --- a/sdk/typescript/docs/AgentAuthApi.md +++ /dev/null @@ -1,533 +0,0 @@ -# AgentAuthApi - -All URIs are relative to *https://api.agentdrive.run* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**extensionExchangeV0AuthExtensionExchangePost**](AgentAuthApi.md#extensionexchangev0authextensionexchangepost) | **POST** /v0/auth/extension/exchange | Redeem an extension OAuth ticket for a JWT pair | -| [**initiateClaimAgentIdentityClaimPost**](AgentAuthApi.md#initiateclaimagentidentityclaimpost) | **POST** /agent/identity/claim | Initiate the human-claim ceremony for an agent identity | -| [**jwksWellKnownJwksJsonGet**](AgentAuthApi.md#jwkswellknownjwksjsonget) | **GET** /.well-known/jwks.json | JSON Web Key Set — public keys for verifying AgentDrive JWTs | -| [**oauth2TokenOauth2TokenPost**](AgentAuthApi.md#oauth2tokenoauth2tokenpost) | **POST** /oauth2/token | Exchange a credential for an access_token | -| [**oauthAuthorizationServerWellKnownOauthAuthorizationServerGet**](AgentAuthApi.md#oauthauthorizationserverwellknownoauthauthorizationserverget) | **GET** /.well-known/oauth-authorization-server | Authorization-server metadata (RFC 8414 + auth.md agent_auth block) | -| [**oauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGet**](AgentAuthApi.md#oauthprotectedresourcemcpwellknownoauthprotectedresourcemcpget) | **GET** /.well-known/oauth-protected-resource/mcp | Protected-resource metadata for the MCP endpoint (RFC 9728 §3.1) | -| [**oauthProtectedResourceWellKnownOauthProtectedResourceGet**](AgentAuthApi.md#oauthprotectedresourcewellknownoauthprotectedresourceget) | **GET** /.well-known/oauth-protected-resource | Protected-resource metadata (auth.md / RFC 9728-like discovery) | -| [**registerAgentIdentityAgentIdentityPost**](AgentAuthApi.md#registeragentidentityagentidentitypost) | **POST** /agent/identity | Register an agent identity (anonymous or ID-JAG) | - - - -## extensionExchangeV0AuthExtensionExchangePost - -> ExtensionExchangeResponse extensionExchangeV0AuthExtensionExchangePost(extensionExchangeRequest) - -Redeem an extension OAuth ticket for a JWT pair - -Single-use opaque ticket → JWT pair. Called once by an extension\'s auth-complete.html after the OAuth handoff lands. Returns a 15-minute `access_token` (scope=extension) and a 90-day `identity_assertion` the extension stores and refreshes via POST /oauth2/token. - -### Example - -```ts -import { - Configuration, - AgentAuthApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { ExtensionExchangeV0AuthExtensionExchangePostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const api = new AgentAuthApi(); - - const body = { - // ExtensionExchangeRequest - extensionExchangeRequest: ..., - } satisfies ExtensionExchangeV0AuthExtensionExchangePostRequest; - - try { - const data = await api.extensionExchangeV0AuthExtensionExchangePost(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **extensionExchangeRequest** | [ExtensionExchangeRequest](ExtensionExchangeRequest.md) | | | - -### Return type - -[**ExtensionExchangeResponse**](ExtensionExchangeResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **400** | The extension ID or ticket is invalid. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | Too many extension sign-in attempts. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| -| **503** | Extension authentication or token signing is unavailable. | * X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## initiateClaimAgentIdentityClaimPost - -> ClaimInitResponse initiateClaimAgentIdentityClaimPost(claimInitRequest) - -Initiate the human-claim ceremony for an agent identity - -Returns a `user_code` and `verification_uri` (RFC 8628 device-code idiom). The agent surfaces these to the human, who visits the URI, signs in, and approves the claim. The agent then polls POST /oauth2/token (grant_type=claim) with the same `claim_token` to learn when the claim completes. - -### Example - -```ts -import { - Configuration, - AgentAuthApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { InitiateClaimAgentIdentityClaimPostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const api = new AgentAuthApi(); - - const body = { - // ClaimInitRequest - claimInitRequest: ..., - } satisfies InitiateClaimAgentIdentityClaimPostRequest; - - try { - const data = await api.initiateClaimAgentIdentityClaimPost(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **claimInitRequest** | [ClaimInitRequest](ClaimInitRequest.md) | | | - -### Return type - -[**ClaimInitResponse**](ClaimInitResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## jwksWellKnownJwksJsonGet - -> JwksOut jwksWellKnownJwksJsonGet() - -JSON Web Key Set — public keys for verifying AgentDrive JWTs - -Public half of the RSA signing key for identity_assertion + access_token JWTs issued by AgentDrive. RFC 7517 shape. Cache-friendly; key rotation publishes both kids during the overlap window. - -### Example - -```ts -import { - Configuration, - AgentAuthApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { JwksWellKnownJwksJsonGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const api = new AgentAuthApi(); - - try { - const data = await api.jwksWellKnownJwksJsonGet(); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**JwksOut**](JwksOut.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## oauth2TokenOauth2TokenPost - -> TokenResponse oauth2TokenOauth2TokenPost(grantType, assertion, claimToken) - -Exchange a credential for an access_token - -Two grant types: **`urn:ietf:params:oauth:grant-type:jwt-bearer`** (RFC 7523) — body `assertion=<identity_assertion JWT>`. Returns a fresh 15-minute access_token with the same scope as the assertion. **`claim`** (custom) — body `claim_token=<from POST /agent/identity>`. Polling endpoint for the claim ceremony. Returns one of: `authorization_pending` (400), `expired_token` (400), `access_denied` (400), or access_token + new identity_assertion + scope=full (200). - -### Example - -```ts -import { - Configuration, - AgentAuthApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { Oauth2TokenOauth2TokenPostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const api = new AgentAuthApi(); - - const body = { - // string - grantType: grantType_example, - // string (optional) - assertion: assertion_example, - // string (optional) - claimToken: claimToken_example, - } satisfies Oauth2TokenOauth2TokenPostRequest; - - try { - const data = await api.oauth2TokenOauth2TokenPost(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **grantType** | `string` | | [Defaults to `undefined`] | -| **assertion** | `string` | | [Optional] [Defaults to `undefined`] | -| **claimToken** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**TokenResponse**](TokenResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/x-www-form-urlencoded` -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## oauthAuthorizationServerWellKnownOauthAuthorizationServerGet - -> AuthorizationServerMetadataOut oauthAuthorizationServerWellKnownOauthAuthorizationServerGet() - -Authorization-server metadata (RFC 8414 + auth.md agent_auth block) - -Discovery document for the auth.md protocol. Carries the standard RFC 8414 fields plus an `agent_auth` block per the auth.md spec — the latter is what an agent runtime keys off to find the identity + claim endpoints. - -### Example - -```ts -import { - Configuration, - AgentAuthApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { OauthAuthorizationServerWellKnownOauthAuthorizationServerGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const api = new AgentAuthApi(); - - try { - const data = await api.oauthAuthorizationServerWellKnownOauthAuthorizationServerGet(); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**AuthorizationServerMetadataOut**](AuthorizationServerMetadataOut.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## oauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGet - -> ProtectedResourceMetadataOut oauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGet() - -Protected-resource metadata for the MCP endpoint (RFC 9728 §3.1) - -Path-inserted variant of the protected-resource document. MCP clients derive this URL from the resource URL `{origin}/mcp` (RFC 9728 §3.1: insert the well-known segment between host and path) after reading the WWW-Authenticate challenge on a 401 — it is the first hop of the client-side OAuth flow. - -### Example - -```ts -import { - Configuration, - AgentAuthApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { OauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const api = new AgentAuthApi(); - - try { - const data = await api.oauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGet(); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**ProtectedResourceMetadataOut**](ProtectedResourceMetadataOut.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## oauthProtectedResourceWellKnownOauthProtectedResourceGet - -> ProtectedResourceMetadataOut oauthProtectedResourceWellKnownOauthProtectedResourceGet() - -Protected-resource metadata (auth.md / RFC 9728-like discovery) - -Names this server as a protected resource and points clients at the authorization server they should obtain tokens from. In this design the resource server and authorization server are the same host. - -### Example - -```ts -import { - Configuration, - AgentAuthApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { OauthProtectedResourceWellKnownOauthProtectedResourceGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const api = new AgentAuthApi(); - - try { - const data = await api.oauthProtectedResourceWellKnownOauthProtectedResourceGet(); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**ProtectedResourceMetadataOut**](ProtectedResourceMetadataOut.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## registerAgentIdentityAgentIdentityPost - -> AnonymousIdentityResponse registerAgentIdentityAgentIdentityPost(requestBody) - -Register an agent identity (anonymous or ID-JAG) - -Two registration modes: **`type=anonymous`** — Provisions a brand-new agent identity bound to a fresh shadow-org drive. No human involved; returned `identity_assertion` carries `scope=pre_claim`. A human completes the claim ceremony later via /claim. **`type=identity_assertion`** — Agent provider (e.g. WorkOS) has already minted an ID-JAG asserting a user identity binding. We verify it against the provider\'s JWKS and provision a **claimed** identity immediately: scope=full, drive bound to the user, no claim ceremony needed. - -### Example - -```ts -import { - Configuration, - AgentAuthApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { RegisterAgentIdentityAgentIdentityPostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const api = new AgentAuthApi(); - - const body = { - // { [key: string]: any | null; } - requestBody: Object, - } satisfies RegisterAgentIdentityAgentIdentityPostRequest; - - try { - const data = await api.registerAgentIdentityAgentIdentityPost(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **requestBody** | `{ [key: string]: any | null; }` | | | - -### Return type - -[**AnonymousIdentityResponse**](AnonymousIdentityResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **503** | Agent identity signing is not configured. | * X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/AgentAuthMetadataOut.md b/sdk/typescript/docs/AgentAuthMetadataOut.md deleted file mode 100644 index e2803eb..0000000 --- a/sdk/typescript/docs/AgentAuthMetadataOut.md +++ /dev/null @@ -1,44 +0,0 @@ - -# AgentAuthMetadataOut - - -## Properties - -Name | Type ------------- | ------------- -`claimEndpoint` | string -`eventsEndpoint` | string -`identityAssertion` | [IdentityAssertionMetadataOut](IdentityAssertionMetadataOut.md) -`identityEndpoint` | string -`identityTypesSupported` | Array<string> -`skill` | string -`specVersion` | string - -## Example - -```typescript -import type { AgentAuthMetadataOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "claimEndpoint": null, - "eventsEndpoint": null, - "identityAssertion": null, - "identityEndpoint": null, - "identityTypesSupported": null, - "skill": null, - "specVersion": null, -} satisfies AgentAuthMetadataOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as AgentAuthMetadataOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/AnonymousIdentityResponse.md b/sdk/typescript/docs/AnonymousIdentityResponse.md deleted file mode 100644 index 981345a..0000000 --- a/sdk/typescript/docs/AnonymousIdentityResponse.md +++ /dev/null @@ -1,43 +0,0 @@ - -# AnonymousIdentityResponse - -`POST /agent/identity` response on the anonymous path. The agent stores `identity_assertion` as its long-lived credential and uses `claim_token` to initiate the claim ceremony when the human is ready. - -## Properties - -Name | Type ------------- | ------------- -`agentIdentityId` | string -`claimMetadata` | [ClaimMetadata](ClaimMetadata.md) -`claimToken` | string -`driveId` | string -`expiresAt` | Date -`identityAssertion` | string - -## Example - -```typescript -import type { AnonymousIdentityResponse } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "agentIdentityId": null, - "claimMetadata": null, - "claimToken": null, - "driveId": null, - "expiresAt": null, - "identityAssertion": null, -} satisfies AnonymousIdentityResponse - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as AnonymousIdentityResponse -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ArtifactCopyIn.md b/sdk/typescript/docs/ArtifactCopyIn.md new file mode 100644 index 0000000..90ff58f --- /dev/null +++ b/sdk/typescript/docs/ArtifactCopyIn.md @@ -0,0 +1,39 @@ + +# ArtifactCopyIn + +POST /v0/drives/{id}/artifacts/{artifact_id}/copy body. ``destination_drive_id`` must equal the source drive (or be absent) — cross-drive copy is out of v0 scope and rejected. + +## Properties + +Name | Type +------------ | ------------- +`destinationDriveId` | string +`destinationName` | string +`destinationParentId` | string +`versionId` | string + +## Example + +```typescript +import type { ArtifactCopyIn } from '@mnexa-ai/agentdrive-sdk' + +// TODO: Update the object below with actual values +const example = { + "destinationDriveId": null, + "destinationName": null, + "destinationParentId": null, + "versionId": null, +} satisfies ArtifactCopyIn + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ArtifactCopyIn +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ArtifactDeleteOut.md b/sdk/typescript/docs/ArtifactDeleteOut.md deleted file mode 100644 index f87965e..0000000 --- a/sdk/typescript/docs/ArtifactDeleteOut.md +++ /dev/null @@ -1,43 +0,0 @@ - -# ArtifactDeleteOut - -DELETE /v0/artifacts/{art_id} response — the soft-delete receipt. Reversible until the GC cron hard-deletes at `purge_at`; `restore_url` points at the by-id restore endpoint (deletion-design.md §5.3). - -## Properties - -Name | Type ------------- | ------------- -`deletedAt` | Date -`id` | string -`ok` | boolean -`path` | string -`purgeAt` | Date -`restoreUrl` | string - -## Example - -```typescript -import type { ArtifactDeleteOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "deletedAt": null, - "id": null, - "ok": null, - "path": null, - "purgeAt": null, - "restoreUrl": null, -} satisfies ArtifactDeleteOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as ArtifactDeleteOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ArtifactHeadOut.md b/sdk/typescript/docs/ArtifactHeadOut.md deleted file mode 100644 index f39d14f..0000000 --- a/sdk/typescript/docs/ArtifactHeadOut.md +++ /dev/null @@ -1,32 +0,0 @@ - -# ArtifactHeadOut - - -## Properties - -Name | Type ------------- | ------------- -`version` | number - -## Example - -```typescript -import type { ArtifactHeadOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "version": null, -} satisfies ArtifactHeadOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as ArtifactHeadOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ArtifactListOut.md b/sdk/typescript/docs/ArtifactListOut.md new file mode 100644 index 0000000..c627d31 --- /dev/null +++ b/sdk/typescript/docs/ArtifactListOut.md @@ -0,0 +1,34 @@ + +# ArtifactListOut + + +## Properties + +Name | Type +------------ | ------------- +`items` | [Array<ArtifactOut>](ArtifactOut.md) +`nextCursor` | string + +## Example + +```typescript +import type { ArtifactListOut } from '@mnexa-ai/agentdrive-sdk' + +// TODO: Update the object below with actual values +const example = { + "items": null, + "nextCursor": null, +} satisfies ArtifactListOut + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ArtifactListOut +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ArtifactMoveIn.md b/sdk/typescript/docs/ArtifactMoveIn.md deleted file mode 100644 index 0383624..0000000 --- a/sdk/typescript/docs/ArtifactMoveIn.md +++ /dev/null @@ -1,33 +0,0 @@ - -# ArtifactMoveIn - -POST /v0/artifacts/{art_id}/move body — rename / move to a new path on the same drive. Mirrors `FolderMoveIn`; its own schema (vs. reusing another body) keeps the move surface self-documenting in the OpenAPI spec. - -## Properties - -Name | Type ------------- | ------------- -`path` | string - -## Example - -```typescript -import type { ArtifactMoveIn } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "path": null, -} satisfies ArtifactMoveIn - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as ArtifactMoveIn -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ArtifactOut.md b/sdk/typescript/docs/ArtifactOut.md index 93d7ecd..35ccbad 100644 --- a/sdk/typescript/docs/ArtifactOut.md +++ b/sdk/typescript/docs/ArtifactOut.md @@ -6,26 +6,21 @@ Name | Type ------------ | ------------- +`contentPreview` | string `contentType` | string `createdAt` | Date +`deletedAt` | Date `driveId` | string -`embeddedAt` | Date -`etag` | string -`fileType` | string -`hash` | string +`effectiveVisibility` | string +`headVersionId` | string `id` | string -`indexedAt` | Date `labels` | Array<string> -`llmIndex` | { [key: string]: any; } `metadata` | { [key: string]: any; } -`metageneration` | number -`path` | string -`permalink` | string -`sizeBytes` | number -`source` | [ArtifactSource](ArtifactSource.md) +`name` | string +`parentId` | string +`revision` | string +`state` | string `updatedAt` | Date -`url` | string -`versionNumber` | number ## Example @@ -34,26 +29,21 @@ import type { ArtifactOut } from '@mnexa-ai/agentdrive-sdk' // TODO: Update the object below with actual values const example = { + "contentPreview": null, "contentType": null, "createdAt": null, + "deletedAt": null, "driveId": null, - "embeddedAt": null, - "etag": null, - "fileType": null, - "hash": null, + "effectiveVisibility": null, + "headVersionId": null, "id": null, - "indexedAt": null, "labels": null, - "llmIndex": null, "metadata": null, - "metageneration": null, - "path": null, - "permalink": null, - "sizeBytes": null, - "source": null, + "name": null, + "parentId": null, + "revision": null, + "state": null, "updatedAt": null, - "url": null, - "versionNumber": null, } satisfies ArtifactOut console.log(example) diff --git a/sdk/typescript/docs/ArtifactPatchIn.md b/sdk/typescript/docs/ArtifactPatchIn.md deleted file mode 100644 index 62d28dd..0000000 --- a/sdk/typescript/docs/ArtifactPatchIn.md +++ /dev/null @@ -1,37 +0,0 @@ - -# ArtifactPatchIn - -PATCH /v0/artifacts/{art_id} body — metadata-only partial (JSON-merge-patch) update. Every field is optional. Presence is what matters, not the value: a field left out of the body (per Pydantic `model_fields_set`) is left unchanged; a field that IS present is applied — with an explicit `null` / `[]` / `{}` meaning \"clear it\". This mirrors the MCP `set_metadata` tool and the core `patch_artifact_metadata` sentinel semantics (omitted = preserve, present = replace/clear). * `labels` — replace the label set; `[]` or `null` clears it. * `metadata` — replace the free-form metadata object; `{}` or `null` clears it. * `source` — replace provenance refs; `null` (or `{\"refs\": []}`) clears them. PATCH is metadata-only: to move/rename an artifact, use `POST /v0/artifacts/{art_id}/move`. `extra=\"forbid\"` makes a stray field (notably a legacy `path`) a hard 422 rather than a silent no-op — a clean-break signal to migrate to the move verb. - -## Properties - -Name | Type ------------- | ------------- -`labels` | Array<string> -`metadata` | { [key: string]: any; } -`source` | [ArtifactSource](ArtifactSource.md) - -## Example - -```typescript -import type { ArtifactPatchIn } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "labels": null, - "metadata": null, - "source": null, -} satisfies ArtifactPatchIn - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as ArtifactPatchIn -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ArtifactSource.md b/sdk/typescript/docs/ArtifactSource.md deleted file mode 100644 index 3d09da8..0000000 --- a/sdk/typescript/docs/ArtifactSource.md +++ /dev/null @@ -1,33 +0,0 @@ - -# ArtifactSource - -Caller-supplied provenance metadata, attached to an artifact. v0.6 model: a list of typed refs. The legacy v0.5 fields (`agent_id`, `run_id`, `prompt_hash`) were never validated and are superseded by the `refs` shape (an agent-id ref would be `{\"type\": \"agent\", \"id\": \"...\"}` in v0.6 vocabulary). - -## Properties - -Name | Type ------------- | ------------- -`refs` | [Array<SourceRef>](SourceRef.md) - -## Example - -```typescript -import type { ArtifactSource } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "refs": null, -} satisfies ArtifactSource - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as ArtifactSource -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ArtifactUpdateIn.md b/sdk/typescript/docs/ArtifactUpdateIn.md new file mode 100644 index 0000000..4def912 --- /dev/null +++ b/sdk/typescript/docs/ArtifactUpdateIn.md @@ -0,0 +1,39 @@ + +# ArtifactUpdateIn + +PATCH /v0/drives/{id}/artifacts/{artifact_id} body — at least one field is required. + +## Properties + +Name | Type +------------ | ------------- +`labels` | Array<string> +`metadata` | { [key: string]: any; } +`name` | string +`parentId` | string + +## Example + +```typescript +import type { ArtifactUpdateIn } from '@mnexa-ai/agentdrive-sdk' + +// TODO: Update the object below with actual values +const example = { + "labels": null, + "metadata": null, + "name": null, + "parentId": null, +} satisfies ArtifactUpdateIn + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ArtifactUpdateIn +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ArtifactsApi.md b/sdk/typescript/docs/ArtifactsApi.md new file mode 100644 index 0000000..34071bc --- /dev/null +++ b/sdk/typescript/docs/ArtifactsApi.md @@ -0,0 +1,783 @@ +# ArtifactsApi + +All URIs are relative to *https://api.agentdrive.run* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**artifactsContent**](ArtifactsApi.md#artifactscontent) | **GET** /v0/drives/{drive_id}/artifacts/{artifact_id}/content | Read Artifact Content | +| [**artifactsCopy**](ArtifactsApi.md#artifactscopy) | **POST** /v0/drives/{drive_id}/artifacts/{artifact_id}/copy | Copy Artifact | +| [**artifactsCreate**](ArtifactsApi.md#artifactscreate) | **POST** /v0/drives/{drive_id}/artifacts | Create Artifact | +| [**artifactsDelete**](ArtifactsApi.md#artifactsdelete) | **DELETE** /v0/drives/{drive_id}/artifacts/{artifact_id} | Delete Artifact | +| [**artifactsList**](ArtifactsApi.md#artifactslist) | **GET** /v0/drives/{drive_id}/artifacts | List Artifacts | +| [**artifactsRead**](ArtifactsApi.md#artifactsread) | **GET** /v0/drives/{drive_id}/artifacts/{artifact_id} | Read Artifact | +| [**artifactsRestore**](ArtifactsApi.md#artifactsrestore) | **POST** /v0/drives/{drive_id}/artifacts/{artifact_id}/restore | Restore Artifact | +| [**artifactsUpdate**](ArtifactsApi.md#artifactsupdate) | **PATCH** /v0/drives/{drive_id}/artifacts/{artifact_id} | Update Artifact | + + + +## artifactsContent + +> Blob artifactsContent(driveId, artifactId, ifNoneMatch, authorization) + +Read Artifact Content + +Download the head version\'s bytes — stream or 307 signed URL. + +### Example + +```ts +import { + Configuration, + ArtifactsApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { ArtifactsContentRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new ArtifactsApi(config); + + const body = { + // string + driveId: driveId_example, + // string + artifactId: artifactId_example, + // string (optional) + ifNoneMatch: ifNoneMatch_example, + // string (optional) + authorization: authorization_example, + } satisfies ArtifactsContentRequest; + + try { + const data = await api.artifactsContent(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **artifactId** | `string` | | [Defaults to `undefined`] | +| **ifNoneMatch** | `string` | | [Optional] [Defaults to `undefined`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +**Blob** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/octet-stream`, `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Raw artifact bytes (streamed). | * X-Request-Id - Request correlation identifier.
| +| **304** | If-None-Match matched the current ETag. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **307** | Redirect to a short-lived signed URL. | * Location - Redirect target.
* X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## artifactsCopy + +> ArtifactOut artifactsCopy(driveId, artifactId, idempotencyKey, artifactCopyIn, ifMatch, authorization) + +Copy Artifact + +Copy one artifact within the same drive. Cross-drive copy is out of v0 scope and rejected (400 INVALID_ARGUMENT). ``destination_drive_id`` must equal the source drive when present. Materializes the artifact + its selected version synchronously → 201. ``If-Match`` is optional; when present it is validated against the source revision (412 stale). + +### Example + +```ts +import { + Configuration, + ArtifactsApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { ArtifactsCopyRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new ArtifactsApi(config); + + const body = { + // string + driveId: driveId_example, + // string + artifactId: artifactId_example, + // string + idempotencyKey: idempotencyKey_example, + // ArtifactCopyIn + artifactCopyIn: ..., + // string (optional) + ifMatch: ifMatch_example, + // string (optional) + authorization: authorization_example, + } satisfies ArtifactsCopyRequest; + + try { + const data = await api.artifactsCopy(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **artifactId** | `string` | | [Defaults to `undefined`] | +| **idempotencyKey** | `string` | | [Defaults to `undefined`] | +| **artifactCopyIn** | [ArtifactCopyIn](ArtifactCopyIn.md) | | | +| **ifMatch** | `string` | | [Optional] [Defaults to `undefined`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**ArtifactOut**](ArtifactOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Successful Response | * ETag - Current strong entity tag.
* Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The parent or target resource was not found or is not visible. | * X-Request-Id - Request correlation identifier.
| +| **409** | A sibling already occupies the name/path, or the idempotency key was reused for a different request. | * X-Request-Id - Request correlation identifier.
| +| **412** | If-Match did not match (copy/restore preconditions). | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **428** | If-Match is required for this mutation. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## artifactsCreate + +> ArtifactOut artifactsCreate(driveId, idempotencyKey, content, name, parentId, authorization, contentType, metadata, sha256) + +Create Artifact + +Create one artifact with inline content — multipart only. Multipart only (415 for a JSON body). Parts: parent_id, name, metadata, content (bytes), content_type, sha256. parent_id, name, and content are required. + +### Example + +```ts +import { + Configuration, + ArtifactsApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { ArtifactsCreateRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new ArtifactsApi(config); + + const body = { + // string + driveId: driveId_example, + // string + idempotencyKey: idempotencyKey_example, + // Blob | The artifact bytes. + content: BINARY_DATA_HERE, + // string | Artifact name. + name: name_example, + // string | Destination folder id (fld_*). + parentId: parentId_example, + // string (optional) + authorization: authorization_example, + // string | Declared media type. (optional) + contentType: contentType_example, + // object | Free-form JSON metadata. (optional) + metadata: Object, + // string | Optional content sha256 for verification. (optional) + sha256: sha256_example, + } satisfies ArtifactsCreateRequest; + + try { + const data = await api.artifactsCreate(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **idempotencyKey** | `string` | | [Defaults to `undefined`] | +| **content** | `Blob` | The artifact bytes. | [Defaults to `undefined`] | +| **name** | `string` | Artifact name. | [Defaults to `undefined`] | +| **parentId** | `string` | Destination folder id (fld_*). | [Defaults to `undefined`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | +| **contentType** | `string` | Declared media type. | [Optional] [Defaults to `undefined`] | +| **metadata** | `object` | Free-form JSON metadata. | [Optional] [Defaults to `undefined`] | +| **sha256** | `string` | Optional content sha256 for verification. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**ArtifactOut**](ArtifactOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `multipart/form-data` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Successful Response | * ETag - Current strong entity tag.
* Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The parent or target resource was not found or is not visible. | * X-Request-Id - Request correlation identifier.
| +| **409** | A sibling already occupies the name/path, or the idempotency key was reused for a different request. | * X-Request-Id - Request correlation identifier.
| +| **412** | If-Match did not match (copy/restore preconditions). | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **428** | If-Match is required for this mutation. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## artifactsDelete + +> ArtifactOut artifactsDelete(driveId, artifactId, idempotencyKey, ifMatch, authorization) + +Delete Artifact + +Soft-delete one artifact (its versions stay). + +### Example + +```ts +import { + Configuration, + ArtifactsApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { ArtifactsDeleteRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new ArtifactsApi(config); + + const body = { + // string + driveId: driveId_example, + // string + artifactId: artifactId_example, + // string + idempotencyKey: idempotencyKey_example, + // string + ifMatch: ifMatch_example, + // string (optional) + authorization: authorization_example, + } satisfies ArtifactsDeleteRequest; + + try { + const data = await api.artifactsDelete(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **artifactId** | `string` | | [Defaults to `undefined`] | +| **idempotencyKey** | `string` | | [Defaults to `undefined`] | +| **ifMatch** | `string` | | [Defaults to `undefined`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**ArtifactOut**](ArtifactOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| +| **409** | The mutation conflicts with current state (name/path, lifecycle). | * X-Request-Id - Request correlation identifier.
| +| **412** | If-Match did not match the resource\'s current revision. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **428** | If-Match is required for this mutation. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## artifactsList + +> ArtifactListOut artifactsList(driveId, lifecycle, limit, cursor, parentId, name, contentType, label, updatedAfter, updatedBefore, authorization) + +List Artifacts + +List the drive\'s artifacts, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted artifacts. ``parent_id`` / ``name`` / ``content_type`` / ``label`` are exact-match filters; ``updated_after`` / ``updated_before`` are inclusive bounds. Unknown query parameters are rejected. + +### Example + +```ts +import { + Configuration, + ArtifactsApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { ArtifactsListRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new ArtifactsApi(config); + + const body = { + // string + driveId: driveId_example, + // string (optional) + lifecycle: lifecycle_example, + // number (optional) + limit: 56, + // string (optional) + cursor: cursor_example, + // string (optional) + parentId: parentId_example, + // string (optional) + name: name_example, + // string (optional) + contentType: contentType_example, + // string (optional) + label: label_example, + // Date (optional) + updatedAfter: 2013-10-20T19:20:30+01:00, + // Date (optional) + updatedBefore: 2013-10-20T19:20:30+01:00, + // string (optional) + authorization: authorization_example, + } satisfies ArtifactsListRequest; + + try { + const data = await api.artifactsList(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **lifecycle** | `string` | | [Optional] [Defaults to `'active'`] | +| **limit** | `number` | | [Optional] [Defaults to `undefined`] | +| **cursor** | `string` | | [Optional] [Defaults to `undefined`] | +| **parentId** | `string` | | [Optional] [Defaults to `undefined`] | +| **name** | `string` | | [Optional] [Defaults to `undefined`] | +| **contentType** | `string` | | [Optional] [Defaults to `undefined`] | +| **label** | `string` | | [Optional] [Defaults to `undefined`] | +| **updatedAfter** | `Date` | | [Optional] [Defaults to `undefined`] | +| **updatedBefore** | `Date` | | [Optional] [Defaults to `undefined`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**ArtifactListOut**](ArtifactListOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## artifactsRead + +> ArtifactOut artifactsRead(driveId, artifactId, ifNoneMatch, authorization) + +Read Artifact + +Read one active artifact. ``If-None-Match`` short-circuits to 304. + +### Example + +```ts +import { + Configuration, + ArtifactsApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { ArtifactsReadRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new ArtifactsApi(config); + + const body = { + // string + driveId: driveId_example, + // string + artifactId: artifactId_example, + // string (optional) + ifNoneMatch: ifNoneMatch_example, + // string (optional) + authorization: authorization_example, + } satisfies ArtifactsReadRequest; + + try { + const data = await api.artifactsRead(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **artifactId** | `string` | | [Defaults to `undefined`] | +| **ifNoneMatch** | `string` | | [Optional] [Defaults to `undefined`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**ArtifactOut**](ArtifactOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **304** | If-None-Match matched the current ETag. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## artifactsRestore + +> ArtifactOut artifactsRestore(driveId, artifactId, idempotencyKey, ifMatch, authorization) + +Restore Artifact + +Restore a soft-deleted artifact atomically. + +### Example + +```ts +import { + Configuration, + ArtifactsApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { ArtifactsRestoreRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new ArtifactsApi(config); + + const body = { + // string + driveId: driveId_example, + // string + artifactId: artifactId_example, + // string + idempotencyKey: idempotencyKey_example, + // string + ifMatch: ifMatch_example, + // string (optional) + authorization: authorization_example, + } satisfies ArtifactsRestoreRequest; + + try { + const data = await api.artifactsRestore(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **artifactId** | `string` | | [Defaults to `undefined`] | +| **idempotencyKey** | `string` | | [Defaults to `undefined`] | +| **ifMatch** | `string` | | [Defaults to `undefined`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**ArtifactOut**](ArtifactOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| +| **409** | The mutation conflicts with current state (name/path, lifecycle). | * X-Request-Id - Request correlation identifier.
| +| **412** | If-Match did not match the resource\'s current revision. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **428** | If-Match is required for this mutation. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## artifactsUpdate + +> ArtifactOut artifactsUpdate(driveId, artifactId, idempotencyKey, ifMatch, artifactUpdateIn, authorization) + +Update Artifact + +Rename / move / set metadata or labels. At least one field required. + +### Example + +```ts +import { + Configuration, + ArtifactsApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { ArtifactsUpdateRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new ArtifactsApi(config); + + const body = { + // string + driveId: driveId_example, + // string + artifactId: artifactId_example, + // string + idempotencyKey: idempotencyKey_example, + // string + ifMatch: ifMatch_example, + // ArtifactUpdateIn + artifactUpdateIn: ..., + // string (optional) + authorization: authorization_example, + } satisfies ArtifactsUpdateRequest; + + try { + const data = await api.artifactsUpdate(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **artifactId** | `string` | | [Defaults to `undefined`] | +| **idempotencyKey** | `string` | | [Defaults to `undefined`] | +| **ifMatch** | `string` | | [Defaults to `undefined`] | +| **artifactUpdateIn** | [ArtifactUpdateIn](ArtifactUpdateIn.md) | | | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**ArtifactOut**](ArtifactOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| +| **409** | The mutation conflicts with current state (name/path, lifecycle). | * X-Request-Id - Request correlation identifier.
| +| **412** | If-Match did not match the resource\'s current revision. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **428** | If-Match is required for this mutation. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/AuthorizationServerMetadataOut.md b/sdk/typescript/docs/AuthorizationServerMetadataOut.md deleted file mode 100644 index 61a7bbe..0000000 --- a/sdk/typescript/docs/AuthorizationServerMetadataOut.md +++ /dev/null @@ -1,60 +0,0 @@ - -# AuthorizationServerMetadataOut - - -## Properties - -Name | Type ------------- | ------------- -`agentAuth` | [AgentAuthMetadataOut](AgentAuthMetadataOut.md) -`authorizationEndpoint` | string -`authorizationResponseIssParameterSupported` | boolean -`codeChallengeMethodsSupported` | Array<string> -`grantTypesSupported` | Array<string> -`issuer` | string -`jwksUri` | string -`registrationEndpoint` | string -`responseModesSupported` | Array<string> -`responseTypesSupported` | Array<string> -`revocationEndpoint` | string -`revocationEndpointAuthMethodsSupported` | Array<string> -`scopesSupported` | Array<string> -`tokenEndpoint` | string -`tokenEndpointAuthMethodsSupported` | Array<string> - -## Example - -```typescript -import type { AuthorizationServerMetadataOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "agentAuth": null, - "authorizationEndpoint": null, - "authorizationResponseIssParameterSupported": null, - "codeChallengeMethodsSupported": null, - "grantTypesSupported": null, - "issuer": null, - "jwksUri": null, - "registrationEndpoint": null, - "responseModesSupported": null, - "responseTypesSupported": null, - "revocationEndpoint": null, - "revocationEndpointAuthMethodsSupported": null, - "scopesSupported": null, - "tokenEndpoint": null, - "tokenEndpointAuthMethodsSupported": null, -} satisfies AuthorizationServerMetadataOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as AuthorizationServerMetadataOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/AuthorizeDecisionOauth2AuthorizePost403Response.md b/sdk/typescript/docs/AuthorizeDecisionOauth2AuthorizePost403Response.md deleted file mode 100644 index 12997b0..0000000 --- a/sdk/typescript/docs/AuthorizeDecisionOauth2AuthorizePost403Response.md +++ /dev/null @@ -1,36 +0,0 @@ - -# AuthorizeDecisionOauth2AuthorizePost403Response - - -## Properties - -Name | Type ------------- | ------------- -`error` | string -`errorDescription` | string -`detail` | [ErrorDetail](ErrorDetail.md) - -## Example - -```typescript -import type { AuthorizeDecisionOauth2AuthorizePost403Response } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "error": null, - "errorDescription": null, - "detail": null, -} satisfies AuthorizeDecisionOauth2AuthorizePost403Response - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as AuthorizeDecisionOauth2AuthorizePost403Response -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ChangeActorOut.md b/sdk/typescript/docs/ChangeActorOut.md new file mode 100644 index 0000000..1f4cead --- /dev/null +++ b/sdk/typescript/docs/ChangeActorOut.md @@ -0,0 +1,34 @@ + +# ChangeActorOut + + +## Properties + +Name | Type +------------ | ------------- +`id` | string +`type` | string + +## Example + +```typescript +import type { ChangeActorOut } from '@mnexa-ai/agentdrive-sdk' + +// TODO: Update the object below with actual values +const example = { + "id": null, + "type": null, +} satisfies ChangeActorOut + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ChangeActorOut +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ChangeOut.md b/sdk/typescript/docs/ChangeOut.md new file mode 100644 index 0000000..8e55031 --- /dev/null +++ b/sdk/typescript/docs/ChangeOut.md @@ -0,0 +1,50 @@ + +# ChangeOut + + +## Properties + +Name | Type +------------ | ------------- +`actor` | [ChangeActorOut](ChangeActorOut.md) +`changeSetId` | string +`data` | { [key: string]: any; } +`driveId` | string +`id` | string +`occurredAt` | Date +`previousRevision` | string +`resource` | [ChangeResourceOut](ChangeResourceOut.md) +`revision` | string +`type` | string + +## Example + +```typescript +import type { ChangeOut } from '@mnexa-ai/agentdrive-sdk' + +// TODO: Update the object below with actual values +const example = { + "actor": null, + "changeSetId": null, + "data": null, + "driveId": null, + "id": null, + "occurredAt": null, + "previousRevision": null, + "resource": null, + "revision": null, + "type": null, +} satisfies ChangeOut + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ChangeOut +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ChangePageOut.md b/sdk/typescript/docs/ChangePageOut.md new file mode 100644 index 0000000..a6f9bc6 --- /dev/null +++ b/sdk/typescript/docs/ChangePageOut.md @@ -0,0 +1,36 @@ + +# ChangePageOut + + +## Properties + +Name | Type +------------ | ------------- +`hasMore` | boolean +`items` | [Array<ChangeOut>](ChangeOut.md) +`nextCursor` | string + +## Example + +```typescript +import type { ChangePageOut } from '@mnexa-ai/agentdrive-sdk' + +// TODO: Update the object below with actual values +const example = { + "hasMore": null, + "items": null, + "nextCursor": null, +} satisfies ChangePageOut + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ChangePageOut +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ChangeResourceOut.md b/sdk/typescript/docs/ChangeResourceOut.md new file mode 100644 index 0000000..2d24252 --- /dev/null +++ b/sdk/typescript/docs/ChangeResourceOut.md @@ -0,0 +1,34 @@ + +# ChangeResourceOut + + +## Properties + +Name | Type +------------ | ------------- +`id` | string +`type` | string + +## Example + +```typescript +import type { ChangeResourceOut } from '@mnexa-ai/agentdrive-sdk' + +// TODO: Update the object below with actual values +const example = { + "id": null, + "type": null, +} satisfies ChangeResourceOut + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ChangeResourceOut +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ChangesApi.md b/sdk/typescript/docs/ChangesApi.md new file mode 100644 index 0000000..32f1fa2 --- /dev/null +++ b/sdk/typescript/docs/ChangesApi.md @@ -0,0 +1,99 @@ +# ChangesApi + +All URIs are relative to *https://api.agentdrive.run* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**changesList**](ChangesApi.md#changeslist) | **GET** /v0/drives/{drive_id}/changes | List Changes | + + + +## changesList + +> ChangePageOut changesList(driveId, limit, start, cursor, authorization) + +List Changes + +Pull one page of changes. Exactly one of ``start`` or ``cursor``. + +### Example + +```ts +import { + Configuration, + ChangesApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { ChangesListRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new ChangesApi(config); + + const body = { + // string + driveId: driveId_example, + // number (optional) + limit: 56, + // 'now' | 'beginning' (optional) + start: start_example, + // string (optional) + cursor: cursor_example, + // string (optional) + authorization: authorization_example, + } satisfies ChangesListRequest; + + try { + const data = await api.changesList(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **limit** | `number` | | [Optional] [Defaults to `undefined`] | +| **start** | `now`, `beginning` | | [Optional] [Defaults to `undefined`] [Enum: now, beginning] | +| **cursor** | `string` | | [Optional] [Defaults to `undefined`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**ChangePageOut**](ChangePageOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). Pass exactly one of start or cursor (INVALID_REQUEST); a cursor not issued for this drive fails with INVALID_CURSOR. | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| +| **410** | The change cursor is older than retained history. Recover with a full sync: capture start=now, enumerate current resources, then replay from the captured cursor. | * X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ClaimInitRequest.md b/sdk/typescript/docs/ClaimInitRequest.md deleted file mode 100644 index a79348e..0000000 --- a/sdk/typescript/docs/ClaimInitRequest.md +++ /dev/null @@ -1,35 +0,0 @@ - -# ClaimInitRequest - -`POST /agent/identity/claim` body. - -## Properties - -Name | Type ------------- | ------------- -`claimToken` | string -`email` | string - -## Example - -```typescript -import type { ClaimInitRequest } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "claimToken": null, - "email": null, -} satisfies ClaimInitRequest - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as ClaimInitRequest -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ClaimInitResponse.md b/sdk/typescript/docs/ClaimInitResponse.md deleted file mode 100644 index 82357ab..0000000 --- a/sdk/typescript/docs/ClaimInitResponse.md +++ /dev/null @@ -1,40 +0,0 @@ - -# ClaimInitResponse - - -## Properties - -Name | Type ------------- | ------------- -`claimAttemptToken` | string -`expiresAt` | Date -`userCode` | string -`verificationUri` | string -`verificationUriComplete` | string - -## Example - -```typescript -import type { ClaimInitResponse } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "claimAttemptToken": null, - "expiresAt": null, - "userCode": null, - "verificationUri": null, - "verificationUriComplete": null, -} satisfies ClaimInitResponse - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as ClaimInitResponse -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ClaimMetadata.md b/sdk/typescript/docs/ClaimMetadata.md deleted file mode 100644 index 53a5834..0000000 --- a/sdk/typescript/docs/ClaimMetadata.md +++ /dev/null @@ -1,35 +0,0 @@ - -# ClaimMetadata - -Hints the agent\'s UI/CLI can use when initiating the claim ceremony. Decoupled from the `claim_token` itself so future additions don\'t change the token\'s shape. - -## Properties - -Name | Type ------------- | ------------- -`claimEndpoint` | string -`supportedEmailHints` | boolean - -## Example - -```typescript -import type { ClaimMetadata } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "claimEndpoint": null, - "supportedEmailHints": null, -} satisfies ClaimMetadata - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as ClaimMetadata -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ClientRegistrationOut.md b/sdk/typescript/docs/ClientRegistrationOut.md deleted file mode 100644 index 316eef8..0000000 --- a/sdk/typescript/docs/ClientRegistrationOut.md +++ /dev/null @@ -1,46 +0,0 @@ - -# ClientRegistrationOut - - -## Properties - -Name | Type ------------- | ------------- -`clientId` | string -`clientIdIssuedAt` | number -`clientName` | string -`grantTypes` | Array<string> -`redirectUris` | Array<string> -`responseTypes` | Array<string> -`scope` | string -`tokenEndpointAuthMethod` | string - -## Example - -```typescript -import type { ClientRegistrationOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "clientId": null, - "clientIdIssuedAt": null, - "clientName": null, - "grantTypes": null, - "redirectUris": null, - "responseTypes": null, - "scope": null, - "tokenEndpointAuthMethod": null, -} satisfies ClientRegistrationOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as ClientRegistrationOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/CompileDiagnosticOut.md b/sdk/typescript/docs/CompileDiagnosticOut.md deleted file mode 100644 index 43369bf..0000000 --- a/sdk/typescript/docs/CompileDiagnosticOut.md +++ /dev/null @@ -1,42 +0,0 @@ - -# CompileDiagnosticOut - - -## Properties - -Name | Type ------------- | ------------- -`category` | string -`file` | string -`line` | number -`message` | string -`severity` | string -`suggestion` | string - -## Example - -```typescript -import type { CompileDiagnosticOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "category": null, - "file": null, - "line": null, - "message": null, - "severity": null, - "suggestion": null, -} satisfies CompileDiagnosticOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as CompileDiagnosticOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/CompileJobIn.md b/sdk/typescript/docs/CompileJobIn.md deleted file mode 100644 index 7c6e4e3..0000000 --- a/sdk/typescript/docs/CompileJobIn.md +++ /dev/null @@ -1,34 +0,0 @@ - -# CompileJobIn - - -## Properties - -Name | Type ------------- | ------------- -`options` | [CompileOptions](CompileOptions.md) -`task` | string - -## Example - -```typescript -import type { CompileJobIn } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "options": null, - "task": null, -} satisfies CompileJobIn - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as CompileJobIn -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/CompileJobListOut.md b/sdk/typescript/docs/CompileJobListOut.md deleted file mode 100644 index 217001b..0000000 --- a/sdk/typescript/docs/CompileJobListOut.md +++ /dev/null @@ -1,36 +0,0 @@ - -# CompileJobListOut - - -## Properties - -Name | Type ------------- | ------------- -`items` | [Array<CompileJobOut>](CompileJobOut.md) -`jobs` | [Array<CompileJobOut>](CompileJobOut.md) -`nextCursor` | string - -## Example - -```typescript -import type { CompileJobListOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "items": null, - "jobs": null, - "nextCursor": null, -} satisfies CompileJobListOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as CompileJobListOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/CompileJobOut.md b/sdk/typescript/docs/CompileJobOut.md deleted file mode 100644 index 15a4459..0000000 --- a/sdk/typescript/docs/CompileJobOut.md +++ /dev/null @@ -1,48 +0,0 @@ - -# CompileJobOut - - -## Properties - -Name | Type ------------- | ------------- -`cacheHit` | boolean -`diagnostics` | [Array<CompileDiagnosticOut>](CompileDiagnosticOut.md) -`durationMs` | number -`engine` | string -`jobId` | string -`logsUrl` | string -`output` | { [key: string]: any; } -`status` | string -`task` | string - -## Example - -```typescript -import type { CompileJobOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "cacheHit": null, - "diagnostics": null, - "durationMs": null, - "engine": null, - "jobId": null, - "logsUrl": null, - "output": null, - "status": null, - "task": null, -} satisfies CompileJobOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as CompileJobOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/CompileOptions.md b/sdk/typescript/docs/CompileOptions.md deleted file mode 100644 index 90d2d22..0000000 --- a/sdk/typescript/docs/CompileOptions.md +++ /dev/null @@ -1,36 +0,0 @@ - -# CompileOptions - - -## Properties - -Name | Type ------------- | ------------- -`engine` | string -`entrypoint` | string -`wait` | boolean - -## Example - -```typescript -import type { CompileOptions } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "engine": null, - "entrypoint": null, - "wait": null, -} satisfies CompileOptions - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as CompileOptions -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/CompileProjectOut.md b/sdk/typescript/docs/CompileProjectOut.md deleted file mode 100644 index 8133459..0000000 --- a/sdk/typescript/docs/CompileProjectOut.md +++ /dev/null @@ -1,38 +0,0 @@ - -# CompileProjectOut - - -## Properties - -Name | Type ------------- | ------------- -`autoCompile` | boolean -`engine` | string -`entrypoint` | string -`fldId` | string - -## Example - -```typescript -import type { CompileProjectOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "autoCompile": null, - "engine": null, - "entrypoint": null, - "fldId": null, -} satisfies CompileProjectOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as CompileProjectOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/CopyIn.md b/sdk/typescript/docs/CopyIn.md deleted file mode 100644 index b87ddc9..0000000 --- a/sdk/typescript/docs/CopyIn.md +++ /dev/null @@ -1,37 +0,0 @@ - -# CopyIn - -POST /v0/artifacts/{art_id}/copy body — duplicate to new path. - -## Properties - -Name | Type ------------- | ------------- -`fromGeneration` | number -`path` | string -`source` | [ArtifactSource](ArtifactSource.md) - -## Example - -```typescript -import type { CopyIn } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "fromGeneration": null, - "path": null, - "source": null, -} satisfies CopyIn - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as CopyIn -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/DatasetDescriptionOut.md b/sdk/typescript/docs/DatasetDescriptionOut.md deleted file mode 100644 index 19cff72..0000000 --- a/sdk/typescript/docs/DatasetDescriptionOut.md +++ /dev/null @@ -1,34 +0,0 @@ - -# DatasetDescriptionOut - - -## Properties - -Name | Type ------------- | ------------- -`columns` | [Array<QueryColumnOut>](QueryColumnOut.md) -`dataset` | string - -## Example - -```typescript -import type { DatasetDescriptionOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "columns": null, - "dataset": null, -} satisfies DatasetDescriptionOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as DatasetDescriptionOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/DefaultApi.md b/sdk/typescript/docs/DefaultApi.md index d661ac6..1c967b8 100644 --- a/sdk/typescript/docs/DefaultApi.md +++ b/sdk/typescript/docs/DefaultApi.md @@ -4,6362 +4,17 @@ All URIs are relative to *https://api.agentdrive.run* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**abortUploadV0UploadsUploadIdDelete**](DefaultApi.md#abortuploadv0uploadsuploadiddelete) | **DELETE** /v0/uploads/{upload_id} | Abort a large (direct-to-GCS) upload session | -| [**beginUploadV0UploadsPost**](DefaultApi.md#beginuploadv0uploadspost) | **POST** /v0/uploads | Begin a large (direct-to-GCS) upload | -| [**callbackAuthCallbackGet**](DefaultApi.md#callbackauthcallbackget) | **GET** /auth/callback | Callback | -| [**cancelJobV0JobsJobIdCancelPost**](DefaultApi.md#canceljobv0jobsjobidcancelpost) | **POST** /v0/jobs/{job_id}/cancel | Cancel a queued/running job | -| [**commitUploadV0UploadsUploadIdCommitPost**](DefaultApi.md#commituploadv0uploadsuploadidcommitpost) | **POST** /v0/uploads/{upload_id}/commit | Commit a large (direct-to-GCS) upload | -| [**copyArtifactRouteV0ArtifactsArtIdCopyPost**](DefaultApi.md#copyartifactroutev0artifactsartidcopypost) | **POST** /v0/artifacts/{art_id}/copy | Duplicate an artifact to a new path (CAS-shared, new ID) | -| [**copyFolderByIdV0FoldersFldIdCopyPost**](DefaultApi.md#copyfolderbyidv0foldersfldidcopypost) | **POST** /v0/folders/{fld_id}/copy | Duplicate a folder subtree to a new path (CAS-shared, new IDs) | -| [**createFolderByPathV0FoldersPathPut**](DefaultApi.md#createfolderbypathv0folderspathput) | **PUT** /v0/folders/{path} | Create a folder (idempotent) | -| [**createGrantRouteV0GrantsPost**](DefaultApi.md#creategrantroutev0grantspost) | **POST** /v0/grants | Create (or fetch) a per-principal grant on a resource | -| [**createShareRouteV0SharesPost**](DefaultApi.md#createshareroutev0sharespost) | **POST** /v0/shares | Mint a share link (returns the share_key once) | -| [**deleteArtifactByIdRouteV0ArtifactsArtIdDelete**](DefaultApi.md#deleteartifactbyidroutev0artifactsartiddelete) | **DELETE** /v0/artifacts/{art_id} | Soft-delete an artifact by its stable ID | -| [**deleteArtifactV0ArtifactsPathDelete**](DefaultApi.md#deleteartifactv0artifactspathdelete) | **DELETE** /v0/artifacts/{path} | Delete Artifact | -| [**deleteDriveRouteV0DrivesDriveIdDelete**](DefaultApi.md#deletedriveroutev0drivesdriveiddelete) | **DELETE** /v0/drives/{drive_id} | Soft-delete a drive | -| [**deleteFolderByIdV0FoldersFldIdDelete**](DefaultApi.md#deletefolderbyidv0foldersfldiddelete) | **DELETE** /v0/folders/{fld_id} | Soft-delete a folder by stable ID (cascade with ?recursive=true) | -| [**deleteFolderByPathV0FoldersPathDelete**](DefaultApi.md#deletefolderbypathv0folderspathdelete) | **DELETE** /v0/folders/{path} | Soft-delete a folder (cascade with ?recursive=true) | -| [**deleteGrantRouteV0GrantsGrnIdDelete**](DefaultApi.md#deletegrantroutev0grantsgrniddelete) | **DELETE** /v0/grants/{grn_id} | Revoke a grant (can_manage, or self-revoke own grant) | -| [**deleteShareRouteV0SharesShrIdDelete**](DefaultApi.md#deleteshareroutev0sharesshriddelete) | **DELETE** /v0/shares/{shr_id} | Revoke a share link (requires can_manage) | -| [**downloadArtifactByIdV0ArtifactsArtIdDownloadGet**](DefaultApi.md#downloadartifactbyidv0artifactsartiddownloadget) | **GET** /v0/artifacts/{art_id}/download | Stream the artifact bytes by stable ID (never rendered HTML) | -| [**downloadArtifactByPathV0ArtifactsPathDownloadGet**](DefaultApi.md#downloadartifactbypathv0artifactspathdownloadget) | **GET** /v0/artifacts/{path}/download | Stream the artifact bytes by path (never rendered HTML) | -| [**downloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGet**](DefaultApi.md#downloadartifactversionv0artifactsartidversionsversionnumberdownloadget) | **GET** /v0/artifacts/{art_id}/versions/{version_number}/download | Stream bytes for a specific version (machine surface) | -| [**downloadUrlByIdV0ArtifactsArtIdDownloadUrlGet**](DefaultApi.md#downloadurlbyidv0artifactsartiddownloadurlget) | **GET** /v0/artifacts/{art_id}/download-url | Signed direct-from-GCS download URL by stable ID | -| [**downloadUrlByPathV0ArtifactsPathDownloadUrlGet**](DefaultApi.md#downloadurlbypathv0artifactspathdownloadurlget) | **GET** /v0/artifacts/{path}/download-url | Signed direct-from-GCS download URL by path | -| [**downloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGet**](DefaultApi.md#downloadurlversionv0artifactsartidversionsversionnumberdownloadurlget) | **GET** /v0/artifacts/{art_id}/versions/{version_number}/download-url | Signed direct-from-GCS download URL for a specific version | -| [**enqueueJobV0ProjectsFldIdJobsPost**](DefaultApi.md#enqueuejobv0projectsfldidjobspost) | **POST** /v0/projects/{fld_id}/jobs | Enqueue a compile job for a project (folder) | -| [**extensionStartAuthExtensionStartGet**](DefaultApi.md#extensionstartauthextensionstartget) | **GET** /auth/extension/start | Extension Start | -| [**findV0FindGet**](DefaultApi.md#findv0findget) | **GET** /v0/find | Hybrid passage retrieval over the full file body | -| [**getArtifactByIdMetaV0ArtifactsArtIdMetaGet**](DefaultApi.md#getartifactbyidmetav0artifactsartidmetaget) | **GET** /v0/artifacts/{art_id}/meta | Artifact metadata by stable ID (same shape as path /meta) | -| [**getArtifactByIdV0ArtifactsArtIdGet**](DefaultApi.md#getartifactbyidv0artifactsartidget) | **GET** /v0/artifacts/{art_id} | Canonical lookup of an artifact by its stable ID | -| [**getArtifactMetaV0ArtifactsPathMetaGet**](DefaultApi.md#getartifactmetav0artifactspathmetaget) | **GET** /v0/artifacts/{path}/meta | Get Artifact Meta | -| [**getArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGet**](DefaultApi.md#getartifactversionv0artifactsartidversionsversionnumberget) | **GET** /v0/artifacts/{art_id}/versions/{version_number} | Metadata for a specific version of an artifact | -| [**getDriveRouteV0DrivesDriveIdGet**](DefaultApi.md#getdriveroutev0drivesdriveidget) | **GET** /v0/drives/{drive_id} | Drive overview by id (same shape as /drives/me) | -| [**getFeedbackStatusV0FeedbackFbkIdGet**](DefaultApi.md#getfeedbackstatusv0feedbackfbkidget) | **GET** /v0/feedback/{fbk_id} | Get Feedback Status | -| [**getFolderByIdMetaV0FoldersFldIdMetaGet**](DefaultApi.md#getfolderbyidmetav0foldersfldidmetaget) | **GET** /v0/folders/{fld_id}/meta | Folder metadata by stable ID (same shape as the bare id route) | -| [**getFolderByIdV0FoldersFldIdGet**](DefaultApi.md#getfolderbyidv0foldersfldidget) | **GET** /v0/folders/{fld_id} | Canonical lookup of a folder by its stable ID | -| [**getFolderByPathMetaV0FoldersPathMetaGet**](DefaultApi.md#getfolderbypathmetav0folderspathmetaget) | **GET** /v0/folders/{path}/meta | Folder metadata by path (same shape as the bare path route) | -| [**getFolderByPathV0FoldersPathGet**](DefaultApi.md#getfolderbypathv0folderspathget) | **GET** /v0/folders/{path} | Read folder metadata by path | -| [**getGrantRouteV0GrantsGrnIdGet**](DefaultApi.md#getgrantroutev0grantsgrnidget) | **GET** /v0/grants/{grn_id} | Read a single grant (can_manage, or the grant\'s own principal) | -| [**getJobLogsV0JobsJobIdLogsGet**](DefaultApi.md#getjoblogsv0jobsjobidlogsget) | **GET** /v0/jobs/{job_id}/logs | Raw compile log (text/plain) | -| [**getJobV0JobsJobIdGet**](DefaultApi.md#getjobv0jobsjobidget) | **GET** /v0/jobs/{job_id} | Poll a job | -| [**getProjectV0ProjectsFldIdGet**](DefaultApi.md#getprojectv0projectsfldidget) | **GET** /v0/projects/{fld_id} | Get a project\'s compile config | -| [**getShareRouteV0SharesShrIdGet**](DefaultApi.md#getshareroutev0sharesshridget) | **GET** /v0/shares/{shr_id} | Read a single share link\'s metadata (requires can_manage) | -| [**getUploadStatusV0UploadsUploadIdGet**](DefaultApi.md#getuploadstatusv0uploadsuploadidget) | **GET** /v0/uploads/{upload_id} | Get the status of a large (direct-to-GCS) upload session | -| [**healthHealthGet**](DefaultApi.md#healthhealthget) | **GET** /health | Health | -| [**listArtifactVersionsV0ArtifactsArtIdVersionsGet**](DefaultApi.md#listartifactversionsv0artifactsartidversionsget) | **GET** /v0/artifacts/{art_id}/versions | List versions of an artifact, newest first | -| [**listArtifactsV0ArtifactsGet**](DefaultApi.md#listartifactsv0artifactsget) | **GET** /v0/artifacts | List artifacts in the drive | -| [**listEventsRouteV0EventsGet**](DefaultApi.md#listeventsroutev0eventsget) | **GET** /v0/events | Read the append-only event log for the authenticated drive | -| [**listGrantsRouteV0GrantsGet**](DefaultApi.md#listgrantsroutev0grantsget) | **GET** /v0/grants | List live grants on a resource (requires can_manage) | -| [**listProjectJobsV0ProjectsFldIdJobsGet**](DefaultApi.md#listprojectjobsv0projectsfldidjobsget) | **GET** /v0/projects/{fld_id}/jobs | List a project\'s jobs | -| [**listSharesRouteV0SharesGet**](DefaultApi.md#listsharesroutev0sharesget) | **GET** /v0/shares | List live share links on a resource (requires can_manage) | -| [**listTrashRouteV0DrivesDriveIdTrashGet**](DefaultApi.md#listtrashroutev0drivesdriveidtrashget) | **GET** /v0/drives/{drive_id}/trash | List the authenticated drive\'s trash | -| [**loginAuthLoginGet**](DefaultApi.md#loginauthloginget) | **GET** /auth/login | Login | -| [**logoutAuthLogoutPost**](DefaultApi.md#logoutauthlogoutpost) | **POST** /auth/logout | Logout | -| [**meUsageV0DrivesMeUsageGet**](DefaultApi.md#meusagev0drivesmeusageget) | **GET** /v0/drives/me/usage | Current-period usage + caps for the authenticated drive | -| [**meV0DrivesMeGet**](DefaultApi.md#mev0drivesmeget) | **GET** /v0/drives/me | Me | -| [**moveArtifactRouteV0ArtifactsArtIdMovePost**](DefaultApi.md#moveartifactroutev0artifactsartidmovepost) | **POST** /v0/artifacts/{art_id}/move | Rename / move an artifact to a new path | -| [**moveFolderByIdV0FoldersFldIdMovePost**](DefaultApi.md#movefolderbyidv0foldersfldidmovepost) | **POST** /v0/folders/{fld_id}/move | Rename / move a folder by stable ID (cascade descendants) | -| [**moveFolderByPathV0FoldersPathMovePost**](DefaultApi.md#movefolderbypathv0folderspathmovepost) | **POST** /v0/folders/{path}/move | Rename / move a folder (cascade-update descendants) | -| [**patchArtifactRouteV0ArtifactsArtIdPatch**](DefaultApi.md#patchartifactroutev0artifactsartidpatch) | **PATCH** /v0/artifacts/{art_id} | Edit artifact metadata (labels / metadata / source) | -| [**patchFolderByIdV0FoldersFldIdPatch**](DefaultApi.md#patchfolderbyidv0foldersfldidpatch) | **PATCH** /v0/folders/{fld_id} | Update folder metadata by stable ID | -| [**patchFolderByPathV0FoldersPathPatch**](DefaultApi.md#patchfolderbypathv0folderspathpatch) | **PATCH** /v0/folders/{path} | Update folder metadata by path | -| [**patchGrantRouteV0GrantsGrnIdPatch**](DefaultApi.md#patchgrantroutev0grantsgrnidpatch) | **PATCH** /v0/grants/{grn_id} | Update a grant\'s role and/or expiry (requires can_manage) | -| [**postDescribeV0QueryDescribePost**](DefaultApi.md#postdescribev0querydescribepost) | **POST** /v0/query/describe | Describe a dataset\'s column schema | -| [**postFeedbackV0FeedbackPost**](DefaultApi.md#postfeedbackv0feedbackpost) | **POST** /v0/feedback | Post Feedback | -| [**postLookupValuesV0QueryLookupValuesPost**](DefaultApi.md#postlookupvaluesv0querylookupvaluespost) | **POST** /v0/query/lookup-values | List distinct values of a dataset column | -| [**postQueryV0QueryPost**](DefaultApi.md#postqueryv0querypost) | **POST** /v0/query | Run a read-only SQL query over authorized datasets | -| [**putArtifactV0ArtifactsPathPut**](DefaultApi.md#putartifactv0artifactspathput) | **PUT** /v0/artifacts/{path} | Upload (or overwrite) an artifact | -| [**putProjectV0ProjectsFldIdPut**](DefaultApi.md#putprojectv0projectsfldidput) | **PUT** /v0/projects/{fld_id} | Set a project\'s compile config (entrypoint/engine/auto_compile) | -| [**redeemShareSShareKeyGet**](DefaultApi.md#redeemsharessharekeyget) | **GET** /s/{share_key} | Redeem Share | -| [**redeemShareWithPasswordSShareKeyPost**](DefaultApi.md#redeemsharewithpasswordssharekeypost) | **POST** /s/{share_key} | Redeem Share With Password | -| [**restoreArtifactV0ArtifactsArtIdRestorePost**](DefaultApi.md#restoreartifactv0artifactsartidrestorepost) | **POST** /v0/artifacts/{art_id}/restore | Restore a soft-deleted artifact | -| [**restoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePost**](DefaultApi.md#restoreartifactversionv0artifactsartidversionsversionnumberrestorepost) | **POST** /v0/artifacts/{art_id}/versions/{version_number}/restore | Restore a previous version as a new head version | -| [**restoreDriveRouteV0DrivesDriveIdRestorePost**](DefaultApi.md#restoredriveroutev0drivesdriveidrestorepost) | **POST** /v0/drives/{drive_id}/restore | Restore a soft-deleted drive | -| [**restoreFolderByIdV0FoldersFldIdRestorePost**](DefaultApi.md#restorefolderbyidv0foldersfldidrestorepost) | **POST** /v0/folders/{fld_id}/restore | Restore a soft-deleted folder (cascade) | -| [**rotateShareRouteV0SharesShrIdRotatePost**](DefaultApi.md#rotateshareroutev0sharesshridrotatepost) | **POST** /v0/shares/{shr_id}/rotate | Revoke + reissue a share link\'s key (requires can_share) | -| [**searchV0SearchGet**](DefaultApi.md#searchv0searchget) | **GET** /v0/search | Full-text search over artifacts in the drive | -| [**viewArtifactHeadAArtIdHeadGet**](DefaultApi.md#viewartifactheadaartidheadget) | **GET** /a/{art_id}/head | View Artifact Head | -| [**viewArtifactVersionVArtIdVersionGet**](DefaultApi.md#viewartifactversionvartidversionget) | **GET** /v/{art_id}/{version} | View Artifact Version | -| [**viewFileDriveIdPathGet**](DefaultApi.md#viewfiledriveidpathget) | **GET** /{drive_id}/{path} | View File | -| [**viewPermalinkArtifactAArtIdGet**](DefaultApi.md#viewpermalinkartifactaartidget) | **GET** /a/{art_id} | View Permalink Artifact | -| [**viewPermalinkFolderFFldIdGet**](DefaultApi.md#viewpermalinkfolderffldidget) | **GET** /f/{fld_id} | View Permalink Folder | +| [**health**](DefaultApi.md#health) | **GET** /health | Health | -## abortUploadV0UploadsUploadIdDelete +## health -> UploadAbortOut abortUploadV0UploadsUploadIdDelete(uploadId) +> HealthOut health() -Abort a large (direct-to-GCS) upload session - -Release an open upload session: return its reserved quota to the drive and mark it aborted. Idempotent — aborting an already-aborted or already-expired session succeeds with `released_bytes: 0`. A committed session cannot be aborted (409 ALREADY_COMMITTED). No write budget is charged — this frees resources rather than consuming them. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { AbortUploadV0UploadsUploadIdDeleteRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - uploadId: uploadId_example, - } satisfies AbortUploadV0UploadsUploadIdDeleteRequest; - - try { - const data = await api.abortUploadV0UploadsUploadIdDelete(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **uploadId** | `string` | | [Defaults to `undefined`] | - -### Return type - -[**UploadAbortOut**](UploadAbortOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | No such upload for this drive. | * X-Request-Id - Request correlation identifier.
| -| **409** | Upload already committed and cannot be aborted. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## beginUploadV0UploadsPost - -> UploadBeginOut beginUploadV0UploadsPost(uploadBeginIn) - -Begin a large (direct-to-GCS) upload - -Reserve quota and open a resumable upload session for a file larger than the buffered-upload limit. Returns a `upload_url` to PUT the raw bytes to DIRECTLY (no Authorization header — the URL is the credential), then call `/v0/uploads/{upload_id}/commit`. All artifact decisions (path, labels, metadata, source, if_match) are frozen here. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { BeginUploadV0UploadsPostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // UploadBeginIn - uploadBeginIn: ..., - } satisfies BeginUploadV0UploadsPostRequest; - - try { - const data = await api.beginUploadV0UploadsPost(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **uploadBeginIn** | [UploadBeginIn](UploadBeginIn.md) | | | - -### Return type - -[**UploadBeginOut**](UploadBeginOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **400** | Invalid path, labels, metadata, or source. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | Path reserved for the system (WIKI_RESERVED). | * X-Request-Id - Request correlation identifier.
| -| **413** | size_bytes exceeds the per-artifact cap or storage quota. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | Drive\'s per-hour write budget exhausted. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## callbackAuthCallbackGet - -> string callbackAuthCallbackGet(code, state, error) - -Callback - -Complete a sign-in. Handles the auth provider\'s OAuth callback and shapes failures into user-readable errors: * an invalid or expired login flow — LOGIN_FLOW_INVALID (400); * an invalid or already-used authorization code — AUTH_CODE_INVALID (400); * the upstream auth provider being unavailable — WORKOS_UNAVAILABLE (502), returned with Retry-After. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { CallbackAuthCallbackGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const api = new DefaultApi(); - - const body = { - // string (optional) - code: code_example, - // string (optional) - state: state_example, - // string (optional) - error: error_example, - } satisfies CallbackAuthCallbackGetRequest; - - try { - const data = await api.callbackAuthCallbackGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **code** | `string` | | [Optional] [Defaults to `undefined`] | -| **state** | `string` | | [Optional] [Defaults to `undefined`] | -| **error** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -**string** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `text/html`, `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Extension authentication handoff page. | * X-Request-Id - Request correlation identifier.
| -| **302** | Redirect to the canonical or authentication URL. | * Location - Redirect target.
* X-Request-Id - Request correlation identifier.
| -| **400** | The login flow or authorization code is invalid. | * X-Request-Id - Request correlation identifier.
| -| **409** | Account recovery is required or the Hub principal conflicts with the existing account link. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **502** | The upstream identity provider is temporarily unavailable. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| -| **503** | Extension authentication is temporarily disabled. | * X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## cancelJobV0JobsJobIdCancelPost - -> CompileJobOut cancelJobV0JobsJobIdCancelPost(jobId) - -Cancel a queued/running job - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { CancelJobV0JobsJobIdCancelPostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - jobId: jobId_example, - } satisfies CancelJobV0JobsJobIdCancelPostRequest; - - try { - const data = await api.cancelJobV0JobsJobIdCancelPost(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **jobId** | `string` | | [Defaults to `undefined`] | - -### Return type - -[**CompileJobOut**](CompileJobOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | No such compile job exists in this drive. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## commitUploadV0UploadsUploadIdCommitPost - -> ArtifactOut commitUploadV0UploadsUploadIdCommitPost(uploadId) - -Commit a large (direct-to-GCS) upload - -Finalize the upload begun at `/v0/uploads`: AgentDrive verifies the object that landed in GCS (size + checksum) and creates the artifact. Idempotent — a retry after a successful commit returns the same artifact. The write budget is charged when the upload session is created; commit retries are not charged again. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { CommitUploadV0UploadsUploadIdCommitPostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - uploadId: uploadId_example, - } satisfies CommitUploadV0UploadsUploadIdCommitPostRequest; - - try { - const data = await api.commitUploadV0UploadsUploadIdCommitPost(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **uploadId** | `string` | | [Defaults to `undefined`] | - -### Return type - -[**ArtifactOut**](ArtifactOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | No such upload for this drive. | * X-Request-Id - Request correlation identifier.
| -| **409** | Uploaded object size differs from declared size_bytes. | * X-Request-Id - Request correlation identifier.
| -| **410** | Upload session expired. | * X-Request-Id - Request correlation identifier.
| -| **412** | If-Match precondition failed or create-only conflict. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **413** | Committing the upload would exceed the storage quota. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | Drive\'s per-hour write budget exhausted. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## copyArtifactRouteV0ArtifactsArtIdCopyPost - -> ArtifactOut copyArtifactRouteV0ArtifactsArtIdCopyPost(artId, copyIn, xAgentdriveActor, ifNoneMatch) - -Duplicate an artifact to a new path (CAS-shared, new ID) - -Create a new artifact at `path` whose bytes are identical to the source artifact\'s. The copy reuses the source\'s CAS object (zero new storage) but gets a fresh `art_…` ID, a fresh version 1, and — by default — `source.refs = [{type: \'artifact\', id: \'<source>\'}]` so provenance is preserved. Quota: the copy\'s `size_bytes` is added to the drive\'s `storage_bytes` even though physical bytes are shared. Source-version pin: pass `from_generation` in the body to require the source\'s current content generation (`version_number`) to equal it (→ 412 SOURCE_VERSION_MISMATCH); a concurrent source *metadata* edit does NOT fail the copy. Destination create-only: `If-None-Match: *` returns 412 CREATE_CONFLICT (instead of 409 PATH_CONFLICT) when the target path is occupied. Returns 409 PATH_CONFLICT if the target path is already taken; 413 STORAGE_QUOTA_EXCEEDED if the copy would push the drive over its limit. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { CopyArtifactRouteV0ArtifactsArtIdCopyPostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - artId: artId_example, - // CopyIn - copyIn: ..., - // string (optional) - xAgentdriveActor: xAgentdriveActor_example, - // string (optional) - ifNoneMatch: ifNoneMatch_example, - } satisfies CopyArtifactRouteV0ArtifactsArtIdCopyPostRequest; - - try { - const data = await api.copyArtifactRouteV0ArtifactsArtIdCopyPost(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **artId** | `string` | | [Defaults to `undefined`] | -| **copyIn** | [CopyIn](CopyIn.md) | | | -| **xAgentdriveActor** | `string` | | [Optional] [Defaults to `undefined`] | -| **ifNoneMatch** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**ArtifactOut**](ArtifactOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | Successful Response | * ETag - Current strong entity tag.
* Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -| **400** | The destination path or source metadata is invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The source artifact does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **409** | The destination path is already occupied. | * X-Request-Id - Request correlation identifier.
| -| **412** | A request precondition did not match. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **413** | The copy would exceed the drive storage limit. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## copyFolderByIdV0FoldersFldIdCopyPost - -> FolderCopyOut copyFolderByIdV0FoldersFldIdCopyPost(fldId, folderCopyIn, xAgentdriveActor, ifNoneMatch) - -Duplicate a folder subtree to a new path (CAS-shared, new IDs) - -Clone the folder identified by URL id — and every descendant folder + artifact — under the body\'s `path` (canonical, trailing slash). Each copied artifact reuses the source\'s CAS object (zero new storage) but gets a fresh `art_…` ID, a fresh version 1, and `source.refs = [{type: \'artifact\', id: \'<source>\'}]` provenance. The new folder gets a fresh `fld_…` ID and the source\'s description. The entire subtree is copied in a SINGLE transaction — either every row lands or none does. Quota: each copy\'s `size_bytes` counts against the drive\'s `storage_bytes` even though physical bytes are shared. Source-version pin: pass `from_metageneration` in the body to require the source folder\'s current `metageneration` to equal it (→ 412 SOURCE_VERSION_MISMATCH). Destination create-only: `If-None-Match: *` returns 412 CREATE_CONFLICT (instead of 409 FOLDER_PATH_CONFLICT) when the destination folder is occupied. Returns 409 `FOLDER_PATH_CONFLICT` if the destination collides with a live folder or artifact; 400 `FOLDER_PATH_INVALID` if `path` is non-canonical; 413 `SUBTREE_TOO_LARGE` if the source holds more than 5000 artifacts; 413 `STORAGE_QUOTA_EXCEEDED` if the copy would push the drive over its limit. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { CopyFolderByIdV0FoldersFldIdCopyPostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - fldId: fldId_example, - // FolderCopyIn - folderCopyIn: ..., - // string (optional) - xAgentdriveActor: xAgentdriveActor_example, - // string (optional) - ifNoneMatch: ifNoneMatch_example, - } satisfies CopyFolderByIdV0FoldersFldIdCopyPostRequest; - - try { - const data = await api.copyFolderByIdV0FoldersFldIdCopyPost(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **fldId** | `string` | | [Defaults to `undefined`] | -| **folderCopyIn** | [FolderCopyIn](FolderCopyIn.md) | | | -| **xAgentdriveActor** | `string` | | [Optional] [Defaults to `undefined`] | -| **ifNoneMatch** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**FolderCopyOut**](FolderCopyOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | Successful Response | * ETag - Current strong entity tag.
* Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -| **400** | The destination path is invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The folder does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **409** | The destination path is already occupied. | * X-Request-Id - Request correlation identifier.
| -| **412** | A request precondition did not match. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **413** | The copied subtree would exceed the drive storage limit. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## createFolderByPathV0FoldersPathPut - -> FolderOut createFolderByPathV0FoldersPathPut(path, xAgentdriveActor, ifNoneMatch, folderCreateIn) - -Create a folder (idempotent) - -Create a folder at the URL path. Idempotent create-at-known-URI (mirrors `PUT /v0/artifacts/{path}`) — a second call for the same live path returns the existing row unchanged (metadata updates require PATCH). Returns 201 on create, 200 when the folder already exists. Send `If-None-Match: *` to make it strictly create-only: an existing folder then returns 412 CREATE_CONFLICT instead of the idempotent 200. Returns 409 `FOLDER_PATH_CONFLICT` if a live artifact occupies the file form of the path (e.g. mkdir `/foo/` when an artifact lives at `/foo`). - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { CreateFolderByPathV0FoldersPathPutRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - path: path_example, - // string (optional) - xAgentdriveActor: xAgentdriveActor_example, - // string (optional) - ifNoneMatch: ifNoneMatch_example, - // FolderCreateIn (optional) - folderCreateIn: ..., - } satisfies CreateFolderByPathV0FoldersPathPutRequest; - - try { - const data = await api.createFolderByPathV0FoldersPathPut(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **path** | `string` | | [Defaults to `undefined`] | -| **xAgentdriveActor** | `string` | | [Optional] [Defaults to `undefined`] | -| **ifNoneMatch** | `string` | | [Optional] [Defaults to `undefined`] | -| **folderCreateIn** | [FolderCreateIn](FolderCreateIn.md) | | [Optional] | - -### Return type - -[**FolderOut**](FolderOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The existing folder was returned unchanged. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **201** | Successful Response | * ETag - Current strong entity tag.
* Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -| **400** | The folder path is invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **409** | The folder conflicts with an existing path. | * X-Request-Id - Request correlation identifier.
| -| **412** | A request precondition did not match. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## createGrantRouteV0GrantsPost - -> GrantOut createGrantRouteV0GrantsPost(grantCreateIn, xAgentdriveActor) - -Create (or fetch) a per-principal grant on a resource - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { CreateGrantRouteV0GrantsPostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // GrantCreateIn - grantCreateIn: ..., - // string (optional) - xAgentdriveActor: xAgentdriveActor_example, - } satisfies CreateGrantRouteV0GrantsPostRequest; - - try { - const data = await api.createGrantRouteV0GrantsPost(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **grantCreateIn** | [GrantCreateIn](GrantCreateIn.md) | | | -| **xAgentdriveActor** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**GrantOut**](GrantOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | Successful Response | * Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -| **400** | The grant or expiry is invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The target resource does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## createShareRouteV0SharesPost - -> ShareMintOut createShareRouteV0SharesPost(shareCreateIn, xAgentdriveActor) - -Mint a share link (returns the share_key once) - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { CreateShareRouteV0SharesPostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // ShareCreateIn - shareCreateIn: ..., - // string (optional) - xAgentdriveActor: xAgentdriveActor_example, - } satisfies CreateShareRouteV0SharesPostRequest; - - try { - const data = await api.createShareRouteV0SharesPost(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **shareCreateIn** | [ShareCreateIn](ShareCreateIn.md) | | | -| **xAgentdriveActor** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**ShareMintOut**](ShareMintOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | Successful Response | * Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -| **400** | The share settings or expiry are invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The target resource does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## deleteArtifactByIdRouteV0ArtifactsArtIdDelete - -> ArtifactDeleteOut deleteArtifactByIdRouteV0ArtifactsArtIdDelete(artId, ifMatch, xAgentdriveActor) - -Soft-delete an artifact by its stable ID - -Soft-delete the artifact with this `art_…` ID. Same semantics + response shape as the path-based `DELETE /v0/artifacts/{path}` (reversible until the GC cron hard-deletes at `purge_at`; `restore_url` points at the by-id restore), but keys on the immutable id so a concurrent rename can\'t change the target. Returns 404 ARTIFACT_NOT_FOUND if no live artifact has this id; 403 WIKI_RESERVED for `_wiki/` artifacts (system-managed); 412 if `If-Match` doesn\'t match the current version. Declared before the `{path:path}` family so the id convertor wins for DELETEs. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { DeleteArtifactByIdRouteV0ArtifactsArtIdDeleteRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - artId: artId_example, - // string (optional) - ifMatch: ifMatch_example, - // string (optional) - xAgentdriveActor: xAgentdriveActor_example, - } satisfies DeleteArtifactByIdRouteV0ArtifactsArtIdDeleteRequest; - - try { - const data = await api.deleteArtifactByIdRouteV0ArtifactsArtIdDelete(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **artId** | `string` | | [Defaults to `undefined`] | -| **ifMatch** | `string` | | [Optional] [Defaults to `undefined`] | -| **xAgentdriveActor** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**ArtifactDeleteOut**](ArtifactDeleteOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | No live artifact with this ID exists. | * X-Request-Id - Request correlation identifier.
| -| **412** | If-Match does not match the current artifact. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## deleteArtifactV0ArtifactsPathDelete - -> ArtifactDeleteOut deleteArtifactV0ArtifactsPathDelete(path, ifMatch, xAgentdriveActor) - -Delete Artifact - -Soft-delete the artifact at the given path. A delete WITHOUT an `If-Match` precondition is last-writer-wins and will silently remove a concurrently-modified artifact. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { DeleteArtifactV0ArtifactsPathDeleteRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - path: path_example, - // string (optional) - ifMatch: ifMatch_example, - // string (optional) - xAgentdriveActor: xAgentdriveActor_example, - } satisfies DeleteArtifactV0ArtifactsPathDeleteRequest; - - try { - const data = await api.deleteArtifactV0ArtifactsPathDelete(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **path** | `string` | | [Defaults to `undefined`] | -| **ifMatch** | `string` | | [Optional] [Defaults to `undefined`] | -| **xAgentdriveActor** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**ArtifactDeleteOut**](ArtifactDeleteOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | No such live artifact exists in this drive. | * X-Request-Id - Request correlation identifier.
| -| **412** | A request precondition did not match. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## deleteDriveRouteV0DrivesDriveIdDelete - -> DriveDeleteOut deleteDriveRouteV0DrivesDriveIdDelete(driveId, confirm, xAgentdriveActor, ifMatch) - -Soft-delete a drive - -Mark the drive for cleanup. All tenant data (artifacts, versions, wiki, embeddings, events) is hidden via the `live_*` views and CASCADE-removed by the GC cleanup cron at `purge_at`. Restore via `POST /v0/drives/{id}/restore` while the row is still in trash. The path-param `drive_id` MUST match the authenticated drive. Accepts either an `ad_live_` per-drive key (deletes that key\'s drive) or an `ad_user_` user token selecting an owned drive (workspaces-design §5.3); a `read`-scope user token is rejected with 403 `INSUFFICIENT_SCOPE`. **Guard (§8):** a workspace must retain at least one live drive — deleting the workspace\'s last live drive returns 409 `LAST_DRIVE`. **Explicit confirmation required:** pass `?confirm=DELETE` or the request is rejected with 400 `CONFIRM_REQUIRED`. Tenant-level deletion is the largest-blast-radius operation on the API; the static token forces a deliberate act (soft-delete still gives a restore window on top). **Optimistic concurrency:** send `If-Match` with the drive\'s composite ETag (`\"<drv_id>.0.<metageneration>\"`, from a drive read) to make the delete conditional — a stale token returns 412 PRECONDITION_FAILED. A delete WITHOUT an `If-Match` precondition is last-writer-wins and will silently trash a concurrently-modified drive. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { DeleteDriveRouteV0DrivesDriveIdDeleteRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - driveId: driveId_example, - // string (optional) - confirm: confirm_example, - // string (optional) - xAgentdriveActor: xAgentdriveActor_example, - // string (optional) - ifMatch: ifMatch_example, - } satisfies DeleteDriveRouteV0DrivesDriveIdDeleteRequest; - - try { - const data = await api.deleteDriveRouteV0DrivesDriveIdDelete(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **driveId** | `string` | | [Defaults to `undefined`] | -| **confirm** | `string` | | [Optional] [Defaults to `undefined`] | -| **xAgentdriveActor** | `string` | | [Optional] [Defaults to `undefined`] | -| **ifMatch** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**DriveDeleteOut**](DriveDeleteOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **400** | The explicit DELETE confirmation is missing. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | No such drive exists for this principal. | * X-Request-Id - Request correlation identifier.
| -| **409** | The workspace must retain at least one live drive. | * X-Request-Id - Request correlation identifier.
| -| **412** | A request precondition did not match. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## deleteFolderByIdV0FoldersFldIdDelete - -> FolderDeleteOut deleteFolderByIdV0FoldersFldIdDelete(fldId, recursive, xAgentdriveActor, ifMatch) - -Soft-delete a folder by stable ID (cascade with ?recursive=true) - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { DeleteFolderByIdV0FoldersFldIdDeleteRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - fldId: fldId_example, - // boolean (optional) - recursive: true, - // string (optional) - xAgentdriveActor: xAgentdriveActor_example, - // string (optional) - ifMatch: ifMatch_example, - } satisfies DeleteFolderByIdV0FoldersFldIdDeleteRequest; - - try { - const data = await api.deleteFolderByIdV0FoldersFldIdDelete(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **fldId** | `string` | | [Defaults to `undefined`] | -| **recursive** | `boolean` | | [Optional] [Defaults to `false`] | -| **xAgentdriveActor** | `string` | | [Optional] [Defaults to `undefined`] | -| **ifMatch** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**FolderDeleteOut**](FolderDeleteOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The folder does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **412** | A request precondition did not match. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## deleteFolderByPathV0FoldersPathDelete - -> FolderDeleteOut deleteFolderByPathV0FoldersPathDelete(path, recursive, xAgentdriveActor, ifMatch) - -Soft-delete a folder (cascade with ?recursive=true) - -Soft-delete the folder. Refuses if the folder has live descendants unless `?recursive=true` is set, in which case ALL descendant folders + artifacts are soft-deleted in the same transaction. Returns 409 `FOLDER_RECURSIVE_REQUIRED` (with descendant counts in `colliding_path`) when recursion is needed but the flag isn\'t set. Retention window is frozen on `purge_at` per deletion-design.md §5.1; mid-retention tier changes don\'t shift it. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { DeleteFolderByPathV0FoldersPathDeleteRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - path: path_example, - // boolean (optional) - recursive: true, - // string (optional) - xAgentdriveActor: xAgentdriveActor_example, - // string (optional) - ifMatch: ifMatch_example, - } satisfies DeleteFolderByPathV0FoldersPathDeleteRequest; - - try { - const data = await api.deleteFolderByPathV0FoldersPathDelete(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **path** | `string` | | [Defaults to `undefined`] | -| **recursive** | `boolean` | | [Optional] [Defaults to `false`] | -| **xAgentdriveActor** | `string` | | [Optional] [Defaults to `undefined`] | -| **ifMatch** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**FolderDeleteOut**](FolderDeleteOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The folder does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **412** | A request precondition did not match. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## deleteGrantRouteV0GrantsGrnIdDelete - -> RevokeOut deleteGrantRouteV0GrantsGrnIdDelete(grnId, xAgentdriveActor) - -Revoke a grant (can_manage, or self-revoke own grant) - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { DeleteGrantRouteV0GrantsGrnIdDeleteRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - grnId: grnId_example, - // string (optional) - xAgentdriveActor: xAgentdriveActor_example, - } satisfies DeleteGrantRouteV0GrantsGrnIdDeleteRequest; - - try { - const data = await api.deleteGrantRouteV0GrantsGrnIdDelete(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **grnId** | `string` | | [Defaults to `undefined`] | -| **xAgentdriveActor** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**RevokeOut**](RevokeOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The grant does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## deleteShareRouteV0SharesShrIdDelete - -> RevokeOut deleteShareRouteV0SharesShrIdDelete(shrId, xAgentdriveActor) - -Revoke a share link (requires can_manage) - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { DeleteShareRouteV0SharesShrIdDeleteRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - shrId: shrId_example, - // string (optional) - xAgentdriveActor: xAgentdriveActor_example, - } satisfies DeleteShareRouteV0SharesShrIdDeleteRequest; - - try { - const data = await api.deleteShareRouteV0SharesShrIdDelete(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **shrId** | `string` | | [Defaults to `undefined`] | -| **xAgentdriveActor** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**RevokeOut**](RevokeOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The share does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## downloadArtifactByIdV0ArtifactsArtIdDownloadGet - -> Blob downloadArtifactByIdV0ArtifactsArtIdDownloadGet(artId) - -Stream the artifact bytes by stable ID (never rendered HTML) - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { DownloadArtifactByIdV0ArtifactsArtIdDownloadGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - artId: artId_example, - } satisfies DownloadArtifactByIdV0ArtifactsArtIdDownloadGetRequest; - - try { - const data = await api.downloadArtifactByIdV0ArtifactsArtIdDownloadGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **artId** | `string` | | [Defaults to `undefined`] | - -### Return type - -**Blob** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/octet-stream`, `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Raw artifact bytes. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | No live artifact with this ID exists. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## downloadArtifactByPathV0ArtifactsPathDownloadGet - -> Blob downloadArtifactByPathV0ArtifactsPathDownloadGet(path) - -Stream the artifact bytes by path (never rendered HTML) - -Same bytes-only machine surface as `/{art_id}/download` but resolves the artifact by path, so callers don\'t have to resolve path→id first. Applies the identical CSP `sandbox` + `nosniff` posture (never serves HTML inline as active content). - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { DownloadArtifactByPathV0ArtifactsPathDownloadGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - path: path_example, - } satisfies DownloadArtifactByPathV0ArtifactsPathDownloadGetRequest; - - try { - const data = await api.downloadArtifactByPathV0ArtifactsPathDownloadGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **path** | `string` | | [Defaults to `undefined`] | - -### Return type - -**Blob** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/octet-stream`, `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Raw artifact bytes. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | No live artifact exists at this path. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## downloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGet - -> Blob downloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGet(artId, versionNumber) - -Stream bytes for a specific version (machine surface) - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { DownloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - artId: artId_example, - // number - versionNumber: 56, - } satisfies DownloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGetRequest; - - try { - const data = await api.downloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **artId** | `string` | | [Defaults to `undefined`] | -| **versionNumber** | `number` | | [Defaults to `undefined`] | - -### Return type - -**Blob** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/octet-stream`, `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Raw artifact bytes. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The artifact or version does not exist. | * X-Request-Id - Request correlation identifier.
| -| **410** | The requested version has been pruned. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## downloadUrlByIdV0ArtifactsArtIdDownloadUrlGet - -> DownloadUrlOut downloadUrlByIdV0ArtifactsArtIdDownloadUrlGet(artId) - -Signed direct-from-GCS download URL by stable ID - -Returns a URL for the artifact\'s bytes. For large artifacts (>= the signed-download threshold) when signing is available, it\'s a short-lived **signed GCS URL** the client fetches directly (`direct:true`, `expires_at` set); otherwise the **proxy** `/download` URL (`direct:false`). Treat the URL as opaque. large-download-design.md §5.1. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { DownloadUrlByIdV0ArtifactsArtIdDownloadUrlGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - artId: artId_example, - } satisfies DownloadUrlByIdV0ArtifactsArtIdDownloadUrlGetRequest; - - try { - const data = await api.downloadUrlByIdV0ArtifactsArtIdDownloadUrlGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **artId** | `string` | | [Defaults to `undefined`] | - -### Return type - -[**DownloadUrlOut**](DownloadUrlOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The artifact does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## downloadUrlByPathV0ArtifactsPathDownloadUrlGet - -> DownloadUrlOut downloadUrlByPathV0ArtifactsPathDownloadUrlGet(path) - -Signed direct-from-GCS download URL by path - -Same as `/{art_id}/download-url` but resolves the artifact by path. The returned proxy URL (when `direct:false`) still points at the by-id `/download` endpoint. large-download-design.md §5.1. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { DownloadUrlByPathV0ArtifactsPathDownloadUrlGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - path: path_example, - } satisfies DownloadUrlByPathV0ArtifactsPathDownloadUrlGetRequest; - - try { - const data = await api.downloadUrlByPathV0ArtifactsPathDownloadUrlGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **path** | `string` | | [Defaults to `undefined`] | - -### Return type - -[**DownloadUrlOut**](DownloadUrlOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The artifact does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## downloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGet - -> DownloadUrlOut downloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGet(artId, versionNumber) - -Signed direct-from-GCS download URL for a specific version - -Same as `/{art_id}/download-url` but for a specific version\'s bytes (`direct:true` signed GCS URL when large + signing available, else the proxy `/versions/{n}/download` URL). large-download-design.md §5.1. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { DownloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - artId: artId_example, - // number - versionNumber: 56, - } satisfies DownloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGetRequest; - - try { - const data = await api.downloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **artId** | `string` | | [Defaults to `undefined`] | -| **versionNumber** | `number` | | [Defaults to `undefined`] | - -### Return type - -[**DownloadUrlOut**](DownloadUrlOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The artifact or version does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **410** | The requested version was pruned by retention. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## enqueueJobV0ProjectsFldIdJobsPost - -> CompileJobOut enqueueJobV0ProjectsFldIdJobsPost(fldId, compileJobIn, xAgentdriveActor) - -Enqueue a compile job for a project (folder) - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { EnqueueJobV0ProjectsFldIdJobsPostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - fldId: fldId_example, - // CompileJobIn - compileJobIn: ..., - // string (optional) - xAgentdriveActor: xAgentdriveActor_example, - } satisfies EnqueueJobV0ProjectsFldIdJobsPostRequest; - - try { - const data = await api.enqueueJobV0ProjectsFldIdJobsPost(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **fldId** | `string` | | [Defaults to `undefined`] | -| **compileJobIn** | [CompileJobIn](CompileJobIn.md) | | | -| **xAgentdriveActor** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**CompileJobOut**](CompileJobOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **202** | Compile accepted and queued or running. | * X-Request-Id - Request correlation identifier.
| -| **400** | The task, engine, entrypoint, or project is invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **402** | The current plan does not permit this compile. | * X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The project folder does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **413** | The compile project exceeds an input or storage limit. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## extensionStartAuthExtensionStartGet - -> extensionStartAuthExtensionStartGet(extId) - -Extension Start - -Begin a sign-in flow on behalf of a Chrome extension. Provider follows AUTH_MODE (WorkOS AuthKit or the TokenCanopy hub), exactly like /auth/login. Stamps `for=ext` + `ext_id` into the signed OAuth state so the callback handler knows to render the extension handoff page instead of setting a session cookie. Three short-circuits, all surface as actionable errors: * EXTENSION_AUTH_DISABLED (503): kill switch flipped off. * UNKNOWN_EXTENSION (400): `ext_id` not on the allow-list. * Missing `ext_id` query string (400 INVALID_REQUEST). - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { ExtensionStartAuthExtensionStartGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const api = new DefaultApi(); - - const body = { - // string (optional) - extId: extId_example, - } satisfies ExtensionStartAuthExtensionStartGetRequest; - - try { - const data = await api.extensionStartAuthExtensionStartGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **extId** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -`void` (Empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **302** | Redirect to the canonical or authentication URL. | * Location - Redirect target.
* X-Request-Id - Request correlation identifier.
| -| **400** | The extension ID is missing or not allowed. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **503** | Extension authentication is temporarily disabled. | * X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## findV0FindGet - -> FindPage findV0FindGet(q, mode, label, fileType, prefix, modality, updatedAfter, updatedBefore, limit) - -Hybrid passage retrieval over the full file body - -Passage-level chunk RAG over `embed_chunks`. Lexical (`chunk_tsv`, GIN) + semantic (HNSW over `embedding`) are run in parallel and fused via Reciprocal Rank Fusion (k=60). Unlike `/v0/search`, which only sees the first ~16 KB preview of each artifact, `/v0/find` reaches the full file body. **Modes:** - `hybrid` (default) — lexical + semantic, RRF-fused. - `lexical` — `chunk_tsv` only. Best for exact tokens, identifiers, code snippets. - `semantic` — embedding only. Best for conceptual queries where the surface terms differ from the query phrasing. **Granularity:** results are passages, not files. A long document with multiple matching regions returns multiple hits with distinct `ord` values; consecutive `ord`s overlap by ~400 tokens. Dedupe by `art_id` if you want one row per file. **Span citations:** `char_start`/`char_end` for text & code, `page_start`/`page_end` for PDFs, `time_start_ms`/`time_end_ms` for audio & video. Only the modality-relevant pair is populated. **Filters:** `label`, `file_type`, `prefix`, `modality` (repeatable), `updated_after` / `updated_before` (RFC 3339 timestamps, inclusive bounds on `updated_at`, applied to both legs). **Wiki coverage:** `/v0/find` excludes `_wiki/` paths by default and — importantly — does NOT cover them even when the caller passes `prefix=_wiki/...`. Wiki pages are not embedded by the pipeline (they\'re system-generated output, not user input), so `embed_chunks` has no rows for them and the join returns empty. Use `wiki_search` (or `list`/`grep` with a `_wiki/` prefix) for the wiki layer. **Embedding availability:** when `GEMINI_API_KEY` is not configured, `mode=semantic` returns 503; `mode=hybrid` logs a warning and falls back to lexical-only; `mode=lexical` is unaffected. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { FindV0FindGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - q: q_example, - // 'hybrid' | 'lexical' | 'semantic' (optional) - mode: mode_example, - // Array (optional) - label: ..., - // string (optional) - fileType: fileType_example, - // string (optional) - prefix: prefix_example, - // Array (optional) - modality: ..., - // Date (optional) - updatedAfter: 2013-10-20T19:20:30+01:00, - // Date (optional) - updatedBefore: 2013-10-20T19:20:30+01:00, - // number (optional) - limit: 56, - } satisfies FindV0FindGetRequest; - - try { - const data = await api.findV0FindGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **q** | `string` | | [Defaults to `undefined`] | -| **mode** | `hybrid`, `lexical`, `semantic` | | [Optional] [Defaults to `'hybrid'`] [Enum: hybrid, lexical, semantic] | -| **label** | `Array` | | [Optional] | -| **fileType** | `string` | | [Optional] [Defaults to `undefined`] | -| **prefix** | `string` | | [Optional] [Defaults to `undefined`] | -| **modality** | `Array` | | [Optional] | -| **updatedAfter** | `Date` | | [Optional] [Defaults to `undefined`] | -| **updatedBefore** | `Date` | | [Optional] [Defaults to `undefined`] | -| **limit** | `number` | | [Optional] [Defaults to `20`] | - -### Return type - -[**FindPage**](FindPage.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| -| **503** | Semantic embeddings are unavailable; use lexical or hybrid mode. | * X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## getArtifactByIdMetaV0ArtifactsArtIdMetaGet - -> ArtifactOut getArtifactByIdMetaV0ArtifactsArtIdMetaGet(artId) - -Artifact metadata by stable ID (same shape as path /meta) - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { GetArtifactByIdMetaV0ArtifactsArtIdMetaGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - artId: artId_example, - } satisfies GetArtifactByIdMetaV0ArtifactsArtIdMetaGetRequest; - - try { - const data = await api.getArtifactByIdMetaV0ArtifactsArtIdMetaGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **artId** | `string` | | [Defaults to `undefined`] | - -### Return type - -[**ArtifactOut**](ArtifactOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **304** | The current entity tag or modification date matched. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | No such artifact exists in this drive. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## getArtifactByIdV0ArtifactsArtIdGet - -> ArtifactOut getArtifactByIdV0ArtifactsArtIdGet(artId) - -Canonical lookup of an artifact by its stable ID - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { GetArtifactByIdV0ArtifactsArtIdGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - artId: artId_example, - } satisfies GetArtifactByIdV0ArtifactsArtIdGetRequest; - - try { - const data = await api.getArtifactByIdV0ArtifactsArtIdGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **artId** | `string` | | [Defaults to `undefined`] | - -### Return type - -[**ArtifactOut**](ArtifactOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **304** | The current entity tag or modification date matched. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | No such artifact exists in this drive. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## getArtifactMetaV0ArtifactsPathMetaGet - -> ArtifactOut getArtifactMetaV0ArtifactsPathMetaGet(path) - -Get Artifact Meta - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { GetArtifactMetaV0ArtifactsPathMetaGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - path: path_example, - } satisfies GetArtifactMetaV0ArtifactsPathMetaGetRequest; - - try { - const data = await api.getArtifactMetaV0ArtifactsPathMetaGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **path** | `string` | | [Defaults to `undefined`] | - -### Return type - -[**ArtifactOut**](ArtifactOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **304** | The current entity tag or modification date matched. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The artifact does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## getArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGet - -> VersionOut getArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGet(artId, versionNumber) - -Metadata for a specific version of an artifact - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { GetArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - artId: artId_example, - // number - versionNumber: 56, - } satisfies GetArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGetRequest; - - try { - const data = await api.getArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **artId** | `string` | | [Defaults to `undefined`] | -| **versionNumber** | `number` | | [Defaults to `undefined`] | - -### Return type - -[**VersionOut**](VersionOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The artifact or version does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **410** | The requested version was pruned by retention. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## getDriveRouteV0DrivesDriveIdGet - -> DriveReadOut getDriveRouteV0DrivesDriveIdGet(driveId) - -Drive overview by id (same shape as /drives/me) - -Identical to `GET /v0/drives/me` — the by-id singleton so `Location`-style URLs and scripted clients can address the drive canonically. The path-param `drive_id` MUST match the authenticated drive (mirrors the delete/trash routes\' no-leak 404). Emits the drive\'s composite `ETag` header (`\"<drv_id>.0.<metageneration>\"`). - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { GetDriveRouteV0DrivesDriveIdGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - driveId: driveId_example, - } satisfies GetDriveRouteV0DrivesDriveIdGetRequest; - - try { - const data = await api.getDriveRouteV0DrivesDriveIdGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **driveId** | `string` | | [Defaults to `undefined`] | - -### Return type - -[**DriveReadOut**](DriveReadOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | No matching authenticated drive exists. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## getFeedbackStatusV0FeedbackFbkIdGet - -> FeedbackStatusOut getFeedbackStatusV0FeedbackFbkIdGet(fbkId) - -Get Feedback Status - -Lifecycle status of feedback THIS drive filed. Foreign tickets read as 404 — indistinguishable from absent. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { GetFeedbackStatusV0FeedbackFbkIdGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - fbkId: fbkId_example, - } satisfies GetFeedbackStatusV0FeedbackFbkIdGetRequest; - - try { - const data = await api.getFeedbackStatusV0FeedbackFbkIdGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **fbkId** | `string` | | [Defaults to `undefined`] | - -### Return type - -[**FeedbackStatusOut**](FeedbackStatusOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The feedback ticket does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## getFolderByIdMetaV0FoldersFldIdMetaGet - -> FolderOut getFolderByIdMetaV0FoldersFldIdMetaGet(fldId) - -Folder metadata by stable ID (same shape as the bare id route) - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { GetFolderByIdMetaV0FoldersFldIdMetaGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - fldId: fldId_example, - } satisfies GetFolderByIdMetaV0FoldersFldIdMetaGetRequest; - - try { - const data = await api.getFolderByIdMetaV0FoldersFldIdMetaGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **fldId** | `string` | | [Defaults to `undefined`] | - -### Return type - -[**FolderOut**](FolderOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **304** | The current entity tag or modification date matched. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The folder does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## getFolderByIdV0FoldersFldIdGet - -> FolderOut getFolderByIdV0FoldersFldIdGet(fldId) - -Canonical lookup of a folder by its stable ID - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { GetFolderByIdV0FoldersFldIdGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - fldId: fldId_example, - } satisfies GetFolderByIdV0FoldersFldIdGetRequest; - - try { - const data = await api.getFolderByIdV0FoldersFldIdGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **fldId** | `string` | | [Defaults to `undefined`] | - -### Return type - -[**FolderOut**](FolderOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **304** | The current entity tag or modification date matched. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The folder does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## getFolderByPathMetaV0FoldersPathMetaGet - -> FolderOut getFolderByPathMetaV0FoldersPathMetaGet(path) - -Folder metadata by path (same shape as the bare path route) - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { GetFolderByPathMetaV0FoldersPathMetaGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - path: path_example, - } satisfies GetFolderByPathMetaV0FoldersPathMetaGetRequest; - - try { - const data = await api.getFolderByPathMetaV0FoldersPathMetaGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **path** | `string` | | [Defaults to `undefined`] | - -### Return type - -[**FolderOut**](FolderOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **304** | The current entity tag or modification date matched. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The folder does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## getFolderByPathV0FoldersPathGet - -> FolderOut getFolderByPathV0FoldersPathGet(path) - -Read folder metadata by path - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { GetFolderByPathV0FoldersPathGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - path: path_example, - } satisfies GetFolderByPathV0FoldersPathGetRequest; - - try { - const data = await api.getFolderByPathV0FoldersPathGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **path** | `string` | | [Defaults to `undefined`] | - -### Return type - -[**FolderOut**](FolderOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **304** | The current entity tag or modification date matched. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The folder does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## getGrantRouteV0GrantsGrnIdGet - -> GrantOut getGrantRouteV0GrantsGrnIdGet(grnId) - -Read a single grant (can_manage, or the grant\'s own principal) - -The `Location` target of `POST /v0/grants`. Authorization mirrors DELETE: `can_manage` on the granted resource, or the caller IS the grant\'s own principal (a grantee may read — like revoke — their own grant). A revoked grant reads as 404 (same no-leak shape as a foreign/absent id); DELETE stays idempotent on it. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { GetGrantRouteV0GrantsGrnIdGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - grnId: grnId_example, - } satisfies GetGrantRouteV0GrantsGrnIdGetRequest; - - try { - const data = await api.getGrantRouteV0GrantsGrnIdGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **grnId** | `string` | | [Defaults to `undefined`] | - -### Return type - -[**GrantOut**](GrantOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The grant does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## getJobLogsV0JobsJobIdLogsGet - -> string getJobLogsV0JobsJobIdLogsGet(jobId) - -Raw compile log (text/plain) - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { GetJobLogsV0JobsJobIdLogsGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - jobId: jobId_example, - } satisfies GetJobLogsV0JobsJobIdLogsGetRequest; - - try { - const data = await api.getJobLogsV0JobsJobIdLogsGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **jobId** | `string` | | [Defaults to `undefined`] | - -### Return type - -**string** - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `text/plain`, `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Raw compile log. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The job or its captured log does not exist. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## getJobV0JobsJobIdGet - -> CompileJobOut getJobV0JobsJobIdGet(jobId) - -Poll a job - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { GetJobV0JobsJobIdGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - jobId: jobId_example, - } satisfies GetJobV0JobsJobIdGetRequest; - - try { - const data = await api.getJobV0JobsJobIdGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **jobId** | `string` | | [Defaults to `undefined`] | - -### Return type - -[**CompileJobOut**](CompileJobOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | No such compile job exists in this drive. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## getProjectV0ProjectsFldIdGet - -> CompileProjectOut getProjectV0ProjectsFldIdGet(fldId) - -Get a project\'s compile config - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { GetProjectV0ProjectsFldIdGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - fldId: fldId_example, - } satisfies GetProjectV0ProjectsFldIdGetRequest; - - try { - const data = await api.getProjectV0ProjectsFldIdGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **fldId** | `string` | | [Defaults to `undefined`] | - -### Return type - -[**CompileProjectOut**](CompileProjectOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The project folder does not exist or has no compile configuration. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## getShareRouteV0SharesShrIdGet - -> ShareOut getShareRouteV0SharesShrIdGet(shrId) - -Read a single share link\'s metadata (requires can_manage) - -The `Location` target of `POST /v0/shares`. Metadata ONLY — `ShareOut` never carries the raw `share_key`/URL (returned exactly once at mint/rotate, §4.5). Authorization mirrors DELETE: `can_manage` on the shared resource. A revoked share reads as 404 (same no-leak shape as a foreign/absent id). - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { GetShareRouteV0SharesShrIdGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - shrId: shrId_example, - } satisfies GetShareRouteV0SharesShrIdGetRequest; - - try { - const data = await api.getShareRouteV0SharesShrIdGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **shrId** | `string` | | [Defaults to `undefined`] | - -### Return type - -[**ShareOut**](ShareOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The share does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## getUploadStatusV0UploadsUploadIdGet - -> UploadStatusOut getUploadStatusV0UploadsUploadIdGet(uploadId) - -Get the status of a large (direct-to-GCS) upload session - -Report the live state of an upload session begun at `/v0/uploads`. `state` is derived: `initiated` (open — PUT the bytes then commit), `committed` (artifact created), `aborted` (released via DELETE), or `expired` (past `expires_at` without a commit). Read-only; charges the read budget. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { GetUploadStatusV0UploadsUploadIdGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - uploadId: uploadId_example, - } satisfies GetUploadStatusV0UploadsUploadIdGetRequest; - - try { - const data = await api.getUploadStatusV0UploadsUploadIdGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **uploadId** | `string` | | [Defaults to `undefined`] | - -### Return type - -[**UploadStatusOut**](UploadStatusOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | No such upload for this drive. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## healthHealthGet - -> HealthOut healthHealthGet() - -Health - -Liveness + DB-reachability probe. Used by Cloud Run / k8s healthchecks and any uptime monitor. Returns 200 only if the DB pool can serve a trivial query; 503 otherwise so the orchestrator can pull the instance out of rotation. NOTE: route is `/health`, NOT `/healthz`. Google\'s edge infrastructure intercepts `/healthz` (legacy kubernetes-reserved path) and returns a generic 404 before traffic reaches Cloud Run — discovered the hard way during the first prod deploy. Don\'t rename back. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { HealthHealthGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const api = new DefaultApi(); - - try { - const data = await api.healthHealthGet(); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**HealthOut**](HealthOut.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **503** | The database reachability probe failed. | * X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## listArtifactVersionsV0ArtifactsArtIdVersionsGet - -> VersionPage listArtifactVersionsV0ArtifactsArtIdVersionsGet(artId, cursor, limit) - -List versions of an artifact, newest first - -Returns versions in descending `version_number` order. Cursor pagination via `?cursor=<token>`; `next_cursor` is non-null when the page is full and more older versions may exist. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { ListArtifactVersionsV0ArtifactsArtIdVersionsGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - artId: artId_example, - // string (optional) - cursor: cursor_example, - // number (optional) - limit: 56, - } satisfies ListArtifactVersionsV0ArtifactsArtIdVersionsGetRequest; - - try { - const data = await api.listArtifactVersionsV0ArtifactsArtIdVersionsGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **artId** | `string` | | [Defaults to `undefined`] | -| **cursor** | `string` | | [Optional] [Defaults to `undefined`] | -| **limit** | `number` | | [Optional] [Defaults to `50`] | - -### Return type - -[**VersionPage**](VersionPage.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **400** | The pagination cursor is invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The artifact does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## listArtifactsV0ArtifactsGet - -> Page listArtifactsV0ArtifactsGet(prefix, label, fileType, cursor, limit) - -List artifacts in the drive - -Returns artifacts sorted by path. Filter by `prefix`, `label` (repeatable + AND-combined), and `file_type`. **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=<token>` to fetch the next page. `next_cursor` is `null` on the final page. Filters MUST stay consistent across pages — the cursor encodes only the keyset position, not the filter set, so the client is responsible for re-sending the same filter on each page. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { ListArtifactsV0ArtifactsGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string (optional) - prefix: prefix_example, - // Array (optional) - label: ..., - // string (optional) - fileType: fileType_example, - // string (optional) - cursor: cursor_example, - // number (optional) - limit: 56, - } satisfies ListArtifactsV0ArtifactsGetRequest; - - try { - const data = await api.listArtifactsV0ArtifactsGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **prefix** | `string` | | [Optional] [Defaults to `''`] | -| **label** | `Array` | | [Optional] | -| **fileType** | `string` | | [Optional] [Defaults to `undefined`] | -| **cursor** | `string` | | [Optional] [Defaults to `undefined`] | -| **limit** | `number` | | [Optional] [Defaults to `50`] | - -### Return type - -[**Page**](Page.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **400** | The pagination cursor is invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## listEventsRouteV0EventsGet - -> EventPage listEventsRouteV0EventsGet(artId, action, since, before, cursor, limit) - -Read the append-only event log for the authenticated drive - -Returns events newest-first. Filters compose with AND. **Cursor pagination:** pass the oldest event\'s `created_at` from the previous page as `before` to fetch the next page back in time. Combine `since` + `before` to bound a window. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { ListEventsRouteV0EventsGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string (optional) - artId: artId_example, - // string (optional) - action: action_example, - // Date (optional) - since: 2013-10-20T19:20:30+01:00, - // Date (optional) - before: 2013-10-20T19:20:30+01:00, - // string (optional) - cursor: cursor_example, - // number (optional) - limit: 56, - } satisfies ListEventsRouteV0EventsGetRequest; - - try { - const data = await api.listEventsRouteV0EventsGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **artId** | `string` | | [Optional] [Defaults to `undefined`] | -| **action** | `string` | | [Optional] [Defaults to `undefined`] | -| **since** | `Date` | | [Optional] [Defaults to `undefined`] | -| **before** | `Date` | | [Optional] [Defaults to `undefined`] | -| **cursor** | `string` | | [Optional] [Defaults to `undefined`] | -| **limit** | `number` | | [Optional] [Defaults to `50`] | - -### Return type - -[**EventPage**](EventPage.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **400** | The pagination cursor is invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## listGrantsRouteV0GrantsGet - -> GrantList listGrantsRouteV0GrantsGet(resource, cursor, limit) - -List live grants on a resource (requires can_manage) - -**Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=<token>` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. The `resource` filter must be re-sent on every page — the cursor encodes only the keyset position. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { ListGrantsRouteV0GrantsGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string | art_*_/fld_* id or a path - resource: resource_example, - // string (optional) - cursor: cursor_example, - // number (optional) - limit: 56, - } satisfies ListGrantsRouteV0GrantsGetRequest; - - try { - const data = await api.listGrantsRouteV0GrantsGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **resource** | `string` | art_*_/fld_* id or a path | [Defaults to `undefined`] | -| **cursor** | `string` | | [Optional] [Defaults to `undefined`] | -| **limit** | `number` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**GrantList**](GrantList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **400** | The cursor or resource reference is invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The target resource does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## listProjectJobsV0ProjectsFldIdJobsGet - -> CompileJobListOut listProjectJobsV0ProjectsFldIdJobsGet(fldId, status, limit, cursor) - -List a project\'s jobs - -List compile jobs newest first in stable `(created_at, job_id)` descending order. Pass a non-null `next_cursor` back as `cursor` to continue; malformed cursors return `400 BAD_CURSOR`. The cursor contains only the keyset position, so a `status` filter must be re-sent unchanged on every page. `limit` retains its existing default of 50 and validated range of 1 through 200. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { ListProjectJobsV0ProjectsFldIdJobsGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - fldId: fldId_example, - // string (optional) - status: status_example, - // number (optional) - limit: 56, - // string (optional) - cursor: cursor_example, - } satisfies ListProjectJobsV0ProjectsFldIdJobsGetRequest; - - try { - const data = await api.listProjectJobsV0ProjectsFldIdJobsGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **fldId** | `string` | | [Defaults to `undefined`] | -| **status** | `string` | | [Optional] [Defaults to `undefined`] | -| **limit** | `number` | | [Optional] [Defaults to `50`] | -| **cursor** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**CompileJobListOut**](CompileJobListOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **400** | The status filter is invalid, or the cursor is malformed (`BAD_CURSOR`). | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The project folder does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## listSharesRouteV0SharesGet - -> ShareList listSharesRouteV0SharesGet(resource, cursor, limit) - -List live share links on a resource (requires can_manage) - -**Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=<token>` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. The `resource` filter must be re-sent on every page — the cursor encodes only the keyset position. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { ListSharesRouteV0SharesGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string | art_*_/fld_* id or a path - resource: resource_example, - // string (optional) - cursor: cursor_example, - // number (optional) - limit: 56, - } satisfies ListSharesRouteV0SharesGetRequest; - - try { - const data = await api.listSharesRouteV0SharesGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **resource** | `string` | art_*_/fld_* id or a path | [Defaults to `undefined`] | -| **cursor** | `string` | | [Optional] [Defaults to `undefined`] | -| **limit** | `number` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**ShareList**](ShareList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **400** | The cursor or resource reference is invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The target resource does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## listTrashRouteV0DrivesDriveIdTrashGet - -> TrashOut listTrashRouteV0DrivesDriveIdTrashGet(driveId, cursor, limit) - -List the authenticated drive\'s trash - -Returns soft-deleted artifacts on the drive plus the drive\'s own soft-delete state (if applicable). The path-param `drive_id` MUST match the authenticated drive. **Compatibility window:** `limit` or `cursor` opts into cursor pagination. Unadorned requests retain the legacy complete result during the migration window. Paginated requests are clamped to 1–100 items (default 50 when only `cursor` is supplied). `items` is canonical; `artifacts` is a deprecated same-value alias. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { ListTrashRouteV0DrivesDriveIdTrashGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - driveId: driveId_example, - // string (optional) - cursor: cursor_example, - // number (optional) - limit: 56, - } satisfies ListTrashRouteV0DrivesDriveIdTrashGetRequest; - - try { - const data = await api.listTrashRouteV0DrivesDriveIdTrashGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **driveId** | `string` | | [Defaults to `undefined`] | -| **cursor** | `string` | | [Optional] [Defaults to `undefined`] | -| **limit** | `number` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**TrashOut**](TrashOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **400** | The cursor is malformed (`BAD_CURSOR`). | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | No matching authenticated drive exists. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## loginAuthLoginGet - -> loginAuthLoginGet(returnTo) - -Login - -Begin a WorkOS sign-in flow. Mints a pre-login state cookie (binds the OAuth flow to this browser — defense-in-depth against login-CSRF), signs a state payload, and redirects to AuthKit. The hosted AuthKit page lets the user pick Google OAuth, Microsoft OAuth, magic-link, password, or passkey; we don\'t care which — they all funnel back to /auth/callback with a `code` we exchange in D2. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { LoginAuthLoginGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const api = new DefaultApi(); - - const body = { - // string (optional) - returnTo: returnTo_example, - } satisfies LoginAuthLoginGetRequest; - - try { - const data = await api.loginAuthLoginGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **returnTo** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -`void` (Empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **302** | Redirect to the canonical or authentication URL. | * Location - Redirect target.
* X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## logoutAuthLogoutPost - -> logoutAuthLogoutPost(csrf) - -Logout - -Terminate both the local session AND the upstream WorkOS session. Without the WorkOS-side termination, the next `/auth/login` flow silently re-authenticates the user through AuthKit\'s still-valid session cookie on `api.workos.com` — \"Sign out\" feels broken and a shared-browser user can\'t switch accounts. The recommended pattern (per https://workos.com/docs/authkit/sessions) is to redirect to the WorkOS logout endpoint with the `sid` we stashed during the callback; WorkOS clears its own session and returns the browser to our `return_to`. Failure modes handled: * No `workos_session_id` in the session (legacy v2 cookie issued before this slice landed): fall back to local-only logout. The upstream session lingers but the user\'s local state is cleared — same UX as before this slice; cookie rotation on next sign-in eventually overwrites it. * SDK raises during `get_logout_url`: pure string formatting at WorkOS\'s end, so the only realistic failure is a misconfigured WorkOS dashboard (no Sign-out redirect registered). We catch and fall back to local-only logout rather than 500ing — the user clicked \"Sign out\", they should land somewhere, not on an error page. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { LogoutAuthLogoutPostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const api = new DefaultApi(); - - const body = { - // string - csrf: csrf_example, - } satisfies LogoutAuthLogoutPostRequest; - - try { - const data = await api.logoutAuthLogoutPost(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **csrf** | `string` | | [Defaults to `undefined`] | - -### Return type - -`void` (Empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/x-www-form-urlencoded` -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **302** | Redirect to the canonical or authentication URL. | * Location - Redirect target.
* X-Request-Id - Request correlation identifier.
| -| **403** | The browser CSRF check failed. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## meUsageV0DrivesMeUsageGet - -> DriveUsageOut meUsageV0DrivesMeUsageGet() - -Current-period usage + caps for the authenticated drive - -Unified view of every metered dimension: storage (snapshot), writes (current hour), indexing ops + retrieval queries (current calendar month UTC). Each row carries `used` and `limit`; `limit: 0` means unlimited (the v0 free-tier default for the two monthly counters). Reads are de-throttled — there is no hourly read budget; the monthly read count appears under `ops_this_month.reads`. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { MeUsageV0DrivesMeUsageGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - try { - const data = await api.meUsageV0DrivesMeUsageGet(); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**DriveUsageOut**](DriveUsageOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## meV0DrivesMeGet - -> DriveReadOut meV0DrivesMeGet() - -Me - -Drive overview for the authenticated bearer token. Wire-protocol preservation (WorkOS integration §6): the `email` field is preserved in the response shape; its meaning is now \"the drive\'s owner\'s email\" (via `drives.owner_user_id` → `users.email`, joined in `auth.resolve_drive`). For solo signups this equals v0 behavior — the email the user signed up with. Returns null if the owner has been hard-purged. `organization_id` is a new additive field, as are `metageneration` / `etag` (also emitted as the `ETag` header). - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { MeV0DrivesMeGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - try { - const data = await api.meV0DrivesMeGet(); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**DriveReadOut**](DriveReadOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## moveArtifactRouteV0ArtifactsArtIdMovePost - -> ArtifactOut moveArtifactRouteV0ArtifactsArtIdMovePost(artId, artifactMoveIn, xAgentdriveActor, ifMatch) - -Rename / move an artifact to a new path - -Canonical artifact move/rename, keyed by the stable `art_…` ID (the artifact analogue of `POST /v0/folders/{fld_id}/move`). Moves the artifact to a new `path` on the same drive; ID, version history, source refs, labels, metadata, and the underlying CAS blob are all preserved — only `path` and `updated_at` change, and the move does NOT bump `version_number`. The row UPDATE and the emitted `artifact.renamed` event commit in a SINGLE transaction — a failure leaves the artifact fully unchanged. Returns 409 PATH_CONFLICT if the target `path` is already taken; 404 ARTIFACT_NOT_FOUND for an unknown id; 403 WIKI_RESERVED for a `_wiki/` / `_compiled/` target. Honors `If-Match` (→ 412 PRECONDITION_FAILED). Use `X-AgentDrive-Actor` to attach attribution to the emitted `artifact.renamed` event. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { MoveArtifactRouteV0ArtifactsArtIdMovePostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - artId: artId_example, - // ArtifactMoveIn - artifactMoveIn: ..., - // string (optional) - xAgentdriveActor: xAgentdriveActor_example, - // string (optional) - ifMatch: ifMatch_example, - } satisfies MoveArtifactRouteV0ArtifactsArtIdMovePostRequest; - - try { - const data = await api.moveArtifactRouteV0ArtifactsArtIdMovePost(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **artId** | `string` | | [Defaults to `undefined`] | -| **artifactMoveIn** | [ArtifactMoveIn](ArtifactMoveIn.md) | | | -| **xAgentdriveActor** | `string` | | [Optional] [Defaults to `undefined`] | -| **ifMatch** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**ArtifactOut**](ArtifactOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | No such artifact exists in this drive. | * X-Request-Id - Request correlation identifier.
| -| **409** | The destination path is already occupied. | * X-Request-Id - Request correlation identifier.
| -| **412** | A request precondition did not match. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## moveFolderByIdV0FoldersFldIdMovePost - -> FolderOut moveFolderByIdV0FoldersFldIdMovePost(fldId, folderMoveIn, xAgentdriveActor, ifMatch) - -Rename / move a folder by stable ID (cascade descendants) - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { MoveFolderByIdV0FoldersFldIdMovePostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - fldId: fldId_example, - // FolderMoveIn - folderMoveIn: ..., - // string (optional) - xAgentdriveActor: xAgentdriveActor_example, - // string (optional) - ifMatch: ifMatch_example, - } satisfies MoveFolderByIdV0FoldersFldIdMovePostRequest; - - try { - const data = await api.moveFolderByIdV0FoldersFldIdMovePost(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **fldId** | `string` | | [Defaults to `undefined`] | -| **folderMoveIn** | [FolderMoveIn](FolderMoveIn.md) | | | -| **xAgentdriveActor** | `string` | | [Optional] [Defaults to `undefined`] | -| **ifMatch** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**FolderOut**](FolderOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **400** | The destination path is invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The folder does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **409** | The destination path is already occupied. | * X-Request-Id - Request correlation identifier.
| -| **412** | A request precondition did not match. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## moveFolderByPathV0FoldersPathMovePost - -> FolderOut moveFolderByPathV0FoldersPathMovePost(path, folderMoveIn, xAgentdriveActor, ifMatch) - -Rename / move a folder (cascade-update descendants) - -Move the folder identified by URL path to the body\'s `path`. All descendant folders + artifacts are path-prefix-updated in the same transaction. The folder\'s `fld_*` ID stays stable. Returns 409 `FOLDER_PATH_CONFLICT` if the destination prefix collides with a live folder or artifact path. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { MoveFolderByPathV0FoldersPathMovePostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - path: path_example, - // FolderMoveIn - folderMoveIn: ..., - // string (optional) - xAgentdriveActor: xAgentdriveActor_example, - // string (optional) - ifMatch: ifMatch_example, - } satisfies MoveFolderByPathV0FoldersPathMovePostRequest; - - try { - const data = await api.moveFolderByPathV0FoldersPathMovePost(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **path** | `string` | | [Defaults to `undefined`] | -| **folderMoveIn** | [FolderMoveIn](FolderMoveIn.md) | | | -| **xAgentdriveActor** | `string` | | [Optional] [Defaults to `undefined`] | -| **ifMatch** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**FolderOut**](FolderOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **400** | The source or destination path is invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The source folder does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **409** | The destination path is already occupied. | * X-Request-Id - Request correlation identifier.
| -| **412** | A request precondition did not match. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## patchArtifactRouteV0ArtifactsArtIdPatch - -> ArtifactOut patchArtifactRouteV0ArtifactsArtIdPatch(artId, artifactPatchIn, xAgentdriveActor, ifMatch) - -Edit artifact metadata (labels / metadata / source) - -Metadata-only JSON-merge-patch update of a single artifact, keyed by its stable `art_…` ID. Every field in the body is optional; a field that is **omitted** is left unchanged, a field that is **present** is applied — with an explicit `null` / `[]` / `{}` meaning \"clear\". This mirrors the MCP `set_metadata` tool. Editable fields: * `labels` — replace the label set (`[]`/`null` clears). * `metadata` — replace the free-form metadata object (`{}`/`null` clears). * `source` — replace provenance refs (`null` clears). **To move/rename an artifact, use `POST /v0/artifacts/{art_id}/move`** — PATCH no longer accepts `path`. The body is `extra=\"forbid\"`, so a stray field (notably a legacy `path`) is rejected with 422 rather than silently ignored. Metadata edits do NOT create a new content version (no `version_number` / generation bump, no `artifact_versions` row) but DO bump the artifact\'s `metageneration` and `updated_at`. Returns 400 BAD_LABELS / BAD_SOURCE for invalid metadata; 404 ARTIFACT_NOT_FOUND for an unknown id. Honors `If-Match`, which takes the composite ETag `\"<art_id>.<generation>.<metageneration>\"` and is compared as a whole tuple: ANY concurrent content **or** metadata change (a bumped generation OR metageneration) → 412 PRECONDITION_FAILED. There is no last-writer-wins gap for metadata-only edits. Use `X-AgentDrive-Actor` to attach attribution to the emitted `artifact.metadata_updated` event. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { PatchArtifactRouteV0ArtifactsArtIdPatchRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - artId: artId_example, - // ArtifactPatchIn - artifactPatchIn: ..., - // string (optional) - xAgentdriveActor: xAgentdriveActor_example, - // string (optional) - ifMatch: ifMatch_example, - } satisfies PatchArtifactRouteV0ArtifactsArtIdPatchRequest; - - try { - const data = await api.patchArtifactRouteV0ArtifactsArtIdPatch(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **artId** | `string` | | [Defaults to `undefined`] | -| **artifactPatchIn** | [ArtifactPatchIn](ArtifactPatchIn.md) | | | -| **xAgentdriveActor** | `string` | | [Optional] [Defaults to `undefined`] | -| **ifMatch** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**ArtifactOut**](ArtifactOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **400** | The labels or source metadata are invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | No such live artifact exists in this drive. | * X-Request-Id - Request correlation identifier.
| -| **412** | A request precondition did not match. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## patchFolderByIdV0FoldersFldIdPatch - -> FolderOut patchFolderByIdV0FoldersFldIdPatch(fldId, folderPatchIn, xAgentdriveActor, ifMatch) - -Update folder metadata by stable ID - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { PatchFolderByIdV0FoldersFldIdPatchRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - fldId: fldId_example, - // FolderPatchIn - folderPatchIn: ..., - // string (optional) - xAgentdriveActor: xAgentdriveActor_example, - // string (optional) - ifMatch: ifMatch_example, - } satisfies PatchFolderByIdV0FoldersFldIdPatchRequest; - - try { - const data = await api.patchFolderByIdV0FoldersFldIdPatch(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **fldId** | `string` | | [Defaults to `undefined`] | -| **folderPatchIn** | [FolderPatchIn](FolderPatchIn.md) | | | -| **xAgentdriveActor** | `string` | | [Optional] [Defaults to `undefined`] | -| **ifMatch** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**FolderOut**](FolderOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **400** | The folder update is invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The folder does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **412** | A request precondition did not match. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## patchFolderByPathV0FoldersPathPatch - -> FolderOut patchFolderByPathV0FoldersPathPatch(path, folderPatchIn, xAgentdriveActor, ifMatch) - -Update folder metadata by path - -Partial update — field absence leaves the value unchanged; explicit `null` clears the field. Use the by-id endpoint (slice 2) when you need stable addressing across renames. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { PatchFolderByPathV0FoldersPathPatchRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - path: path_example, - // FolderPatchIn - folderPatchIn: ..., - // string (optional) - xAgentdriveActor: xAgentdriveActor_example, - // string (optional) - ifMatch: ifMatch_example, - } satisfies PatchFolderByPathV0FoldersPathPatchRequest; - - try { - const data = await api.patchFolderByPathV0FoldersPathPatch(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **path** | `string` | | [Defaults to `undefined`] | -| **folderPatchIn** | [FolderPatchIn](FolderPatchIn.md) | | | -| **xAgentdriveActor** | `string` | | [Optional] [Defaults to `undefined`] | -| **ifMatch** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**FolderOut**](FolderOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **400** | The folder update is invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The folder does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **412** | A request precondition did not match. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## patchGrantRouteV0GrantsGrnIdPatch - -> GrantOut patchGrantRouteV0GrantsGrnIdPatch(grnId, grantPatchIn, xAgentdriveActor) - -Update a grant\'s role and/or expiry (requires can_manage) - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { PatchGrantRouteV0GrantsGrnIdPatchRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - grnId: grnId_example, - // GrantPatchIn - grantPatchIn: ..., - // string (optional) - xAgentdriveActor: xAgentdriveActor_example, - } satisfies PatchGrantRouteV0GrantsGrnIdPatchRequest; - - try { - const data = await api.patchGrantRouteV0GrantsGrnIdPatch(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **grnId** | `string` | | [Defaults to `undefined`] | -| **grantPatchIn** | [GrantPatchIn](GrantPatchIn.md) | | | -| **xAgentdriveActor** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**GrantOut**](GrantOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **400** | The grant update or expiry is invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The grant does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## postDescribeV0QueryDescribePost - -> DatasetDescriptionOut postDescribeV0QueryDescribePost(describeIn) - -Describe a dataset\'s column schema - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { PostDescribeV0QueryDescribePostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // DescribeIn - describeIn: ..., - } satisfies PostDescribeV0QueryDescribePostRequest; - - try { - const data = await api.postDescribeV0QueryDescribePost(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **describeIn** | [DescribeIn](DescribeIn.md) | | | - -### Return type - -[**DatasetDescriptionOut**](DatasetDescriptionOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **400** | The referenced dataset is invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| -| **503** | The configured query engine is unavailable. | * X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## postFeedbackV0FeedbackPost - -> FeedbackCreateOut postFeedbackV0FeedbackPost() - -Post Feedback - -File feedback. Body: `{kind, title, body, contact?, attachments?: [art_id, ...]}` — attachments are snapshotted from this drive\'s artifacts at submit time. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { PostFeedbackV0FeedbackPostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - try { - const data = await api.postFeedbackV0FeedbackPost(); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**FeedbackCreateOut**](FeedbackCreateOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | Successful Response | * Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -| **400** | The feedback body or attachment list is invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | An attached artifact does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## postLookupValuesV0QueryLookupValuesPost - -> LookupValuesOut postLookupValuesV0QueryLookupValuesPost(lookupValuesIn) - -List distinct values of a dataset column - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { PostLookupValuesV0QueryLookupValuesPostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // LookupValuesIn - lookupValuesIn: ..., - } satisfies PostLookupValuesV0QueryLookupValuesPostRequest; - - try { - const data = await api.postLookupValuesV0QueryLookupValuesPost(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **lookupValuesIn** | [LookupValuesIn](LookupValuesIn.md) | | | - -### Return type - -[**LookupValuesOut**](LookupValuesOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **400** | The dataset, column, or limit is invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **402** | The current plan does not permit this query. | * X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| -| **503** | The configured query engine is unavailable. | * X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## postQueryV0QueryPost - -> ResponsePostQueryV0QueryPost postQueryV0QueryPost(queryIn) - -Run a read-only SQL query over authorized datasets - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { PostQueryV0QueryPostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // QueryIn - queryIn: ..., - } satisfies PostQueryV0QueryPostRequest; - - try { - const data = await api.postQueryV0QueryPost(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **queryIn** | [QueryIn](QueryIn.md) | | | - -### Return type - -[**ResponsePostQueryV0QueryPost**](ResponsePostQueryV0QueryPost.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **400** | The SQL or referenced dataset is invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **402** | The current plan does not permit this query. | * X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| -| **503** | The configured query engine is unavailable. | * X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## putArtifactV0ArtifactsPathPut - -> ArtifactOut putArtifactV0ArtifactsPathPut(path, contentType, xAgentdriveLabels, xAgentdriveMetadata, xAgentdriveSource, xAgentdriveActor, xAgentdriveChangeSummary, xAgentdriveChecksum, contentMd5, ifMatch, ifNoneMatch) - -Upload (or overwrite) an artifact - -Upload an artifact at the given path. The path is treated as the artifact\'s location in the drive — re-uploading the same path overwrites in place (idempotent). Returns 201 when the artifact is created (no prior live artifact at the path), 200 on overwrite — mirroring `PUT /v0/folders/{path}`. **Limits:** request body must not exceed **50 MB**. Path must be non-empty, ≤256 chars, only `[A-Za-z0-9_./-]`, no `..` segments, no leading/trailing slash. Per-token write rate limit: 100/hour. **Optional headers.** Each preserves the existing artifact\'s value when omitted on an overwrite, and takes the create-default on a new path; send the header to replace it: - `X-AgentDrive-Labels`: comma-separated labels (e.g. `draft,report`); an empty value clears them. Each: lowercase `[a-z0-9_-]+`, ≤64 chars; ≤16 labels per artifact. - `X-AgentDrive-Metadata`: JSON object of agent-attached fields. - `X-AgentDrive-Source`: JSON `{\"refs\": [...]}` source provenance (present, including `{\"refs\": []}`, replaces). - `X-AgentDrive-Actor`: caller-supplied actor name (≤64 chars) for event-log attribution. Untrusted; never used for authz. **Preconditions.** `If-Match: \"<id>.<gen>.<metagen>\"` makes the write conditional on the current composite ETag (→ 412 PRECONDITION_FAILED). `If-None-Match: *` is create-only: it succeeds only if no live artifact occupies the path (→ 412 CREATE_CONFLICT if one does). The two are mutually exclusive (→ 400 BAD_PRECONDITION). **Integrity (optional).** `X-AgentDrive-Checksum: <algo>:<value>` (`sha256:<hex>` or `crc32c:<base64>`) or the standard `Content-MD5` (base64 MD5) is verified against the received bytes before they land (→ 400 CHECKSUM_MISMATCH on mismatch); no artifact is created on failure. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { PutArtifactV0ArtifactsPathPutRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - path: path_example, - // string (optional) - contentType: contentType_example, - // string (optional) - xAgentdriveLabels: xAgentdriveLabels_example, - // string (optional) - xAgentdriveMetadata: xAgentdriveMetadata_example, - // string (optional) - xAgentdriveSource: xAgentdriveSource_example, - // string (optional) - xAgentdriveActor: xAgentdriveActor_example, - // string (optional) - xAgentdriveChangeSummary: xAgentdriveChangeSummary_example, - // string (optional) - xAgentdriveChecksum: xAgentdriveChecksum_example, - // string (optional) - contentMd5: contentMd5_example, - // string (optional) - ifMatch: ifMatch_example, - // string (optional) - ifNoneMatch: ifNoneMatch_example, - } satisfies PutArtifactV0ArtifactsPathPutRequest; - - try { - const data = await api.putArtifactV0ArtifactsPathPut(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **path** | `string` | | [Defaults to `undefined`] | -| **contentType** | `string` | | [Optional] [Defaults to `'application/octet-stream'`] | -| **xAgentdriveLabels** | `string` | | [Optional] [Defaults to `undefined`] | -| **xAgentdriveMetadata** | `string` | | [Optional] [Defaults to `undefined`] | -| **xAgentdriveSource** | `string` | | [Optional] [Defaults to `undefined`] | -| **xAgentdriveActor** | `string` | | [Optional] [Defaults to `undefined`] | -| **xAgentdriveChangeSummary** | `string` | | [Optional] [Defaults to `undefined`] | -| **xAgentdriveChecksum** | `string` | | [Optional] [Defaults to `undefined`] | -| **contentMd5** | `string` | | [Optional] [Defaults to `undefined`] | -| **ifMatch** | `string` | | [Optional] [Defaults to `undefined`] | -| **ifNoneMatch** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**ArtifactOut**](ArtifactOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **201** | Artifact created at a previously unused path. | * ETag - Current strong entity tag.
* Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -| **400** | The path, metadata, source, or conditional headers are invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **409** | The path is occupied and overwrite semantics do not permit replacement. | * X-Request-Id - Request correlation identifier.
| -| **412** | A request precondition did not match. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **413** | The artifact or resulting drive storage exceeds its limit. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## putProjectV0ProjectsFldIdPut - -> CompileProjectOut putProjectV0ProjectsFldIdPut(fldId, projectConfigIn) - -Set a project\'s compile config (entrypoint/engine/auto_compile) - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { PutProjectV0ProjectsFldIdPutRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - fldId: fldId_example, - // ProjectConfigIn - projectConfigIn: ..., - } satisfies PutProjectV0ProjectsFldIdPutRequest; - - try { - const data = await api.putProjectV0ProjectsFldIdPut(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **fldId** | `string` | | [Defaults to `undefined`] | -| **projectConfigIn** | [ProjectConfigIn](ProjectConfigIn.md) | | | - -### Return type - -[**CompileProjectOut**](CompileProjectOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **400** | The compile engine or entrypoint is invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The project folder does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## redeemShareSShareKeyGet - -> ShareRedeemOut redeemShareSShareKeyGet(shareKey) - -Redeem Share - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { RedeemShareSShareKeyGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const api = new DefaultApi(); - - const body = { - // string - shareKey: shareKey_example, - } satisfies RedeemShareSShareKeyGetRequest; - - try { - const data = await api.redeemShareSShareKeyGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **shareKey** | `string` | | [Defaults to `undefined`] | - -### Return type - -[**ShareRedeemOut**](ShareRedeemOut.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json`, `text/html` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | JSON capability response or browser password form. | * X-Request-Id - Request correlation identifier.
| -| **302** | Browser redemption succeeded; continue to the canonical URL. | * Location - Redirect target.
* X-Request-Id - Request correlation identifier.
| -| **401** | A password is required or the supplied password is invalid. | * X-Request-Id - Request correlation identifier.
| -| **404** | The share is invalid, expired, or no longer authorized. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## redeemShareWithPasswordSShareKeyPost - -> ShareRedeemOut redeemShareWithPasswordSShareKeyPost(shareKey, password) - -Redeem Share With Password - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { RedeemShareWithPasswordSShareKeyPostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const api = new DefaultApi(); - - const body = { - // string - shareKey: shareKey_example, - // string (optional) - password: password_example, - } satisfies RedeemShareWithPasswordSShareKeyPostRequest; - - try { - const data = await api.redeemShareWithPasswordSShareKeyPost(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **shareKey** | `string` | | [Defaults to `undefined`] | -| **password** | `string` | | [Optional] [Defaults to `''`] | - -### Return type - -[**ShareRedeemOut**](ShareRedeemOut.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/x-www-form-urlencoded` -- **Accept**: `application/json`, `text/html` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | JSON capability response or browser password form. | * X-Request-Id - Request correlation identifier.
| -| **302** | Browser redemption succeeded; continue to the canonical URL. | * Location - Redirect target.
* X-Request-Id - Request correlation identifier.
| -| **401** | A password is required or the supplied password is invalid. | * X-Request-Id - Request correlation identifier.
| -| **404** | The share is invalid, expired, or no longer authorized. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## restoreArtifactV0ArtifactsArtIdRestorePost - -> ArtifactOut restoreArtifactV0ArtifactsArtIdRestorePost(artId, rename, overwrite, xAgentdriveActor, ifMatch) - -Restore a soft-deleted artifact - -Clear `deleted_at` + `purge_at` on a soft-deleted artifact. Available only while the artifact is in trash (i.e. before the GC cleanup cron purges it). Returns 404 if the artifact is live or already hard-deleted; 409 PATH_CONFLICT if its path is now occupied by another live artifact. The 409 payload includes a `restore_options` block with `rename_to` and `force_overwrite` URLs the caller can follow to resolve the conflict — see deletion-design.md §5.4. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { RestoreArtifactV0ArtifactsArtIdRestorePostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - artId: artId_example, - // string | Restore at this path instead of the original. Soft-deletes the live occupant at the original path with audit `metadata.cause=\'restore_conflict_rename\'`. Mutually exclusive with `overwrite`. (optional) - rename: rename_example, - // boolean | Soft-delete the live occupant at the original path and restore there. Audit `metadata.cause=\'restore_conflict_overwrite\'`. Mutually exclusive with `rename`. (optional) - overwrite: true, - // string (optional) - xAgentdriveActor: xAgentdriveActor_example, - // string (optional) - ifMatch: ifMatch_example, - } satisfies RestoreArtifactV0ArtifactsArtIdRestorePostRequest; - - try { - const data = await api.restoreArtifactV0ArtifactsArtIdRestorePost(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **artId** | `string` | | [Defaults to `undefined`] | -| **rename** | `string` | Restore at this path instead of the original. Soft-deletes the live occupant at the original path with audit `metadata.cause=\'restore_conflict_rename\'`. Mutually exclusive with `overwrite`. | [Optional] [Defaults to `undefined`] | -| **overwrite** | `boolean` | Soft-delete the live occupant at the original path and restore there. Audit `metadata.cause=\'restore_conflict_overwrite\'`. Mutually exclusive with `rename`. | [Optional] [Defaults to `false`] | -| **xAgentdriveActor** | `string` | | [Optional] [Defaults to `undefined`] | -| **ifMatch** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**ArtifactOut**](ArtifactOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | No restorable artifact exists with this ID. | * X-Request-Id - Request correlation identifier.
| -| **409** | The original or requested restore path is occupied. | * X-Request-Id - Request correlation identifier.
| -| **412** | A request precondition did not match. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## restoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePost - -> ArtifactOut restoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePost(artId, versionNumber, xAgentdriveActor, ifMatch) - -Restore a previous version as a new head version - -Roll the artifact forward to the content of version `version_number` by creating a **new head version** with identical bytes. History is preserved — this never rewrites or deletes past versions. The prior version\'s content-addressed blob is reused, so no bytes are re-uploaded. A change summary of `Restored version N` is recorded on the new version; `X-AgentDrive-Actor` attributes it. Restoring a version whose content already matches the current head (including the head itself) is a **no-op**: it returns the current artifact unchanged, with no new version created. Honors `If-Match` on the current head (roll forward only if the head is unchanged → 412 PRECONDITION_FAILED). Errors: `404 ARTIFACT_NOT_FOUND`, `404 VERSION_NOT_FOUND`, and `410 VERSION_PRUNED` when the version existed but its bytes were retained out of existence. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { RestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - artId: artId_example, - // number - versionNumber: 56, - // string (optional) - xAgentdriveActor: xAgentdriveActor_example, - // string (optional) - ifMatch: ifMatch_example, - } satisfies RestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePostRequest; - - try { - const data = await api.restoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePost(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **artId** | `string` | | [Defaults to `undefined`] | -| **versionNumber** | `number` | | [Defaults to `undefined`] | -| **xAgentdriveActor** | `string` | | [Optional] [Defaults to `undefined`] | -| **ifMatch** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**ArtifactOut**](ArtifactOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The artifact or version does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **410** | The requested version was pruned by retention. | * X-Request-Id - Request correlation identifier.
| -| **412** | A request precondition did not match. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## restoreDriveRouteV0DrivesDriveIdRestorePost - -> DriveRestoreOut restoreDriveRouteV0DrivesDriveIdRestorePost(driveId, xAgentdriveActor, ifMatch) - -Restore a soft-deleted drive - -Clear `deleted_at` + `purge_at` on a soft-deleted drive. Soft-deleted child artifacts get their retention window rebased to the drive-restore moment (see deletion-design.md §5.2). Available only while the drive is in trash. Returns 404 if the drive is live or already hard-deleted. **Optimistic concurrency:** send `If-Match` with the trashed drive\'s composite ETag (`\"<drv_id>.0.<metageneration>\"`, e.g. from the delete response\'s `ETag` header) to make the restore conditional — a stale token returns 412 PRECONDITION_FAILED. A restore WITHOUT an `If-Match` precondition is last-writer-wins. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { RestoreDriveRouteV0DrivesDriveIdRestorePostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - driveId: driveId_example, - // string (optional) - xAgentdriveActor: xAgentdriveActor_example, - // string (optional) - ifMatch: ifMatch_example, - } satisfies RestoreDriveRouteV0DrivesDriveIdRestorePostRequest; - - try { - const data = await api.restoreDriveRouteV0DrivesDriveIdRestorePost(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **driveId** | `string` | | [Defaults to `undefined`] | -| **xAgentdriveActor** | `string` | | [Optional] [Defaults to `undefined`] | -| **ifMatch** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**DriveRestoreOut**](DriveRestoreOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The drive does not exist or is not in trash. | * X-Request-Id - Request correlation identifier.
| -| **409** | The drive cannot be restored into its current workspace state. | * X-Request-Id - Request correlation identifier.
| -| **412** | If-Match does not match the current drive. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## restoreFolderByIdV0FoldersFldIdRestorePost - -> FolderRestoreOut restoreFolderByIdV0FoldersFldIdRestorePost(fldId, xAgentdriveActor, ifMatch) - -Restore a soft-deleted folder (cascade) - -Mirrors `POST /v0/artifacts/{art_id}/restore` for folders: clear `deleted_at` + `purge_at` on a soft-deleted folder AND exactly the descendants soft-deleted in the same cascade (descendants trashed separately keep their trash state; restore those individually — the per-artifact restore remains for cherry-picking). Available only while the folder is in trash; returns 404 if it is live or already hard-purged. Returns 409 `PATH_CONFLICT` when a live folder/artifact now occupies a path this restore would reinstate (`colliding_path` + `kind` identify it). Unlike artifact restore there are NO `rename`/`overwrite` escape hatches — the whole cascade aborts; free the colliding path (or cherry-pick artifacts) and retry. `If-Match` (the trashed folder\'s composite ETag) makes the restore conditional → 412 PRECONDITION_FAILED on a stale token; omitted, the restore is last-writer-wins. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { RestoreFolderByIdV0FoldersFldIdRestorePostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - fldId: fldId_example, - // string (optional) - xAgentdriveActor: xAgentdriveActor_example, - // string (optional) - ifMatch: ifMatch_example, - } satisfies RestoreFolderByIdV0FoldersFldIdRestorePostRequest; - - try { - const data = await api.restoreFolderByIdV0FoldersFldIdRestorePost(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **fldId** | `string` | | [Defaults to `undefined`] | -| **xAgentdriveActor** | `string` | | [Optional] [Defaults to `undefined`] | -| **ifMatch** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**FolderRestoreOut**](FolderRestoreOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | No restorable folder exists with this ID. | * X-Request-Id - Request correlation identifier.
| -| **409** | The restore destination is already occupied. | * X-Request-Id - Request correlation identifier.
| -| **412** | A request precondition did not match. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## rotateShareRouteV0SharesShrIdRotatePost - -> ShareMintOut rotateShareRouteV0SharesShrIdRotatePost(shrId, xAgentdriveActor) - -Revoke + reissue a share link\'s key (requires can_share) - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { RotateShareRouteV0SharesShrIdRotatePostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - shrId: shrId_example, - // string (optional) - xAgentdriveActor: xAgentdriveActor_example, - } satisfies RotateShareRouteV0SharesShrIdRotatePostRequest; - - try { - const data = await api.rotateShareRouteV0SharesShrIdRotatePost(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **shrId** | `string` | | [Defaults to `undefined`] | -| **xAgentdriveActor** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**ShareMintOut**](ShareMintOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **400** | The replacement password is invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The share does not exist in this drive. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## searchV0SearchGet - -> SearchPage searchV0SearchGet(q, label, fileType, prefix, updatedAfter, updatedBefore, limit) - -Full-text search over artifacts in the drive - -Lexical (not semantic) full-text search powered by Postgres `websearch_to_tsquery`. Results are ranked by `ts_rank` over a weighted tsvector (path > content > metadata > labels). **Supported query syntax:** - Words: `kangaroo` (English stemming) - Phrases: `\"exact phrase\"` - Negation: `kangaroo -secret` - AND (implicit): `kangaroo secret` - OR: `kangaroo OR koala` - Paths & filenames: `reports/q3-summary.md` or `q3-summary.md` match by their path words (`/ . _ -` are word boundaries) **Not supported (v0):** - Semantic / embedding similarity - PDF and image content (only the path + metadata are searchable) - Non-English stemming - Fuzzy matching, regex - Boolean operator parentheses **Filters:** `label` (repeatable, AND), `file_type` (enum), `prefix` (path prefix), `updated_after` / `updated_before` (RFC 3339 timestamps, inclusive bounds on `updated_at`). - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { SearchV0SearchGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new DefaultApi(config); - - const body = { - // string - q: q_example, - // Array (optional) - label: ..., - // string (optional) - fileType: fileType_example, - // string (optional) - prefix: prefix_example, - // Date (optional) - updatedAfter: 2013-10-20T19:20:30+01:00, - // Date (optional) - updatedBefore: 2013-10-20T19:20:30+01:00, - // number (optional) - limit: 56, - } satisfies SearchV0SearchGetRequest; - - try { - const data = await api.searchV0SearchGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **q** | `string` | | [Defaults to `undefined`] | -| **label** | `Array` | | [Optional] | -| **fileType** | `string` | | [Optional] [Defaults to `undefined`] | -| **prefix** | `string` | | [Optional] [Defaults to `undefined`] | -| **updatedAfter** | `Date` | | [Optional] [Defaults to `undefined`] | -| **updatedBefore** | `Date` | | [Optional] [Defaults to `undefined`] | -| **limit** | `number` | | [Optional] [Defaults to `20`] | - -### Return type - -[**SearchPage**](SearchPage.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **400** | The search query or filter is invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## viewArtifactHeadAArtIdHeadGet - -> ArtifactHeadOut viewArtifactHeadAArtIdHeadGet(artId) - -View Artifact Head - -Return `{\"version\": <head version_number>}` for a readable artifact. Auth mirrors the permalink/viewer: the owner, or an `anyone:viewer` grant (a published artifact), reads. Two deliberate differences from the HTML viewer: * Never redirect to login. A poll is a background `fetch`, not a navigation — an HTML login page would be a useless body and a same-origin redirect the client can\'t act on. Anonymous callers on a private/absent artifact get a flat 404. * \"Doesn\'t exist\" and \"exists but not readable\" collapse to the same 404, so an anonymous poller can\'t use this as an existence oracle (matches the permalink/viewer leak guard). - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { ViewArtifactHeadAArtIdHeadGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const api = new DefaultApi(); - - const body = { - // string - artId: artId_example, - } satisfies ViewArtifactHeadAArtIdHeadGetRequest; - - try { - const data = await api.viewArtifactHeadAArtIdHeadGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **artId** | `string` | | [Defaults to `undefined`] | - -### Return type - -[**ArtifactHeadOut**](ArtifactHeadOut.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## viewArtifactVersionVArtIdVersionGet - -> Blob viewArtifactVersionVArtIdVersionGet(artId, version, raw, download) - -View Artifact Version - -Render version `version` of an artifact, read-only. Version history is owner-only. The drive-blind `can_read` gate still provides the same sign-in-or-404 masking as `/a/{art_id}`, but readable non-owners cannot browse snapshots. A pruned or never-existed version renders a friendly unavailable state, never a 500. `?raw=1` / `?download=1` stream the version\'s bytes (powering the bar\'s Raw / Download buttons) with the same sandbox+nosniff headers as the head raw path. - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { ViewArtifactVersionVArtIdVersionGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const api = new DefaultApi(); - - const body = { - // string - artId: artId_example, - // number - version: 56, - // number (optional) - raw: 56, - // number (optional) - download: 56, - } satisfies ViewArtifactVersionVArtIdVersionGetRequest; - - try { - const data = await api.viewArtifactVersionVArtIdVersionGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **artId** | `string` | | [Defaults to `undefined`] | -| **version** | `number` | | [Defaults to `undefined`] | -| **raw** | `number` | | [Optional] [Defaults to `0`] | -| **download** | `number` | | [Optional] [Defaults to `0`] | - -### Return type - -**Blob** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/octet-stream`, `text/html`, `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Rendered HTML or raw artifact bytes. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## viewFileDriveIdPathGet - -> Blob viewFileDriveIdPathGet(driveId, path, raw, download) - -View File - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { ViewFileDriveIdPathGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const api = new DefaultApi(); - - const body = { - // string - driveId: driveId_example, - // string - path: path_example, - // number (optional) - raw: 56, - // number (optional) - download: 56, - } satisfies ViewFileDriveIdPathGetRequest; - - try { - const data = await api.viewFileDriveIdPathGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **driveId** | `string` | | [Defaults to `undefined`] | -| **path** | `string` | | [Defaults to `undefined`] | -| **raw** | `number` | | [Optional] [Defaults to `0`] | -| **download** | `number` | | [Optional] [Defaults to `0`] | - -### Return type - -**Blob** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/octet-stream`, `text/html`, `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Rendered HTML or raw artifact bytes. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## viewPermalinkArtifactAArtIdGet - -> viewPermalinkArtifactAArtIdGet(artId) - -View Permalink Artifact - -Resolve a stable artifact ID to its path-URL and 302 there. Auth model matches the path URL: public artifacts redirect for anyone; private artifacts redirect only for the owner. Non-owners on private artifacts get 404 — same response as \"doesn\'t exist\", so the ID\'s existence isn\'t leaked. The forwarded query-param allowlist is `raw`, `download` (see _PERMALINK_FORWARDED_PARAMS). - -### Example - -```ts -import { - Configuration, - DefaultApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { ViewPermalinkArtifactAArtIdGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const api = new DefaultApi(); - - const body = { - // string - artId: artId_example, - } satisfies ViewPermalinkArtifactAArtIdGetRequest; - - try { - const data = await api.viewPermalinkArtifactAArtIdGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **artId** | `string` | | [Defaults to `undefined`] | - -### Return type - -`void` (Empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **302** | Redirect to the canonical or authentication URL. | * Location - Redirect target.
* X-Request-Id - Request correlation identifier.
| -| **404** | The artifact does not exist or is not readable. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## viewPermalinkFolderFFldIdGet - -> viewPermalinkFolderFFldIdGet(fldId) - -View Permalink Folder +Health -Resolve a stable folder ID to its current path-URL and 302. Auth model mirrors the artifact permalink: public folder = anon OK; private folder = owner only, otherwise 404 (no existence leak). \"Public\" is an `anyone:viewer` grant on the `fld_*` id resolved through `can_read` (§4.4); folders carry no visibility flag of their own. +Liveness + DB-reachability probe. Used by Cloud Run / k8s healthchecks and any uptime monitor. Returns 200 only if the DB pool can serve a trivial query; 503 otherwise so the orchestrator can pull the instance out of rotation. NOTE: route is `/health`, NOT `/healthz`. Google\'s edge infrastructure intercepts `/healthz` (legacy kubernetes-reserved path) and returns a generic 404 before traffic reaches Cloud Run — discovered the hard way during the first prod deploy. Don\'t rename back. ### Example @@ -6368,19 +23,14 @@ import { Configuration, DefaultApi, } from '@mnexa-ai/agentdrive-sdk'; -import type { ViewPermalinkFolderFFldIdGetRequest } from '@mnexa-ai/agentdrive-sdk'; +import type { HealthRequest } from '@mnexa-ai/agentdrive-sdk'; async function example() { console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); const api = new DefaultApi(); - const body = { - // string - fldId: fldId_example, - } satisfies ViewPermalinkFolderFFldIdGetRequest; - try { - const data = await api.viewPermalinkFolderFFldIdGet(body); + const data = await api.health(); console.log(data); } catch (error) { console.error(error); @@ -6393,14 +43,11 @@ example().catch(console.error); ### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **fldId** | `string` | | [Defaults to `undefined`] | +This endpoint does not need any parameter. ### Return type -`void` (Empty response body) +[**HealthOut**](HealthOut.md) ### Authorization @@ -6415,8 +62,7 @@ No authorization required ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **302** | Redirect to the canonical or authentication URL. | * Location - Redirect target.
* X-Request-Id - Request correlation identifier.
| -| **404** | The folder does not exist or is not readable. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **200** | Successful Response | - | +| **503** | The database reachability probe failed. | - | [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/DescribeIn.md b/sdk/typescript/docs/DescribeIn.md deleted file mode 100644 index 18bdbcd..0000000 --- a/sdk/typescript/docs/DescribeIn.md +++ /dev/null @@ -1,32 +0,0 @@ - -# DescribeIn - - -## Properties - -Name | Type ------------- | ------------- -`dataset` | string - -## Example - -```typescript -import type { DescribeIn } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "dataset": null, -} satisfies DescribeIn - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as DescribeIn -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/DiscoveryApi.md b/sdk/typescript/docs/DiscoveryApi.md new file mode 100644 index 0000000..f30af8d --- /dev/null +++ b/sdk/typescript/docs/DiscoveryApi.md @@ -0,0 +1,67 @@ +# DiscoveryApi + +All URIs are relative to *https://api.agentdrive.run* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**oauthProtectedResource**](DiscoveryApi.md#oauthprotectedresource) | **GET** /.well-known/oauth-protected-resource | Protected-resource metadata (RFC 9728) | + + + +## oauthProtectedResource + +> { [key: string]: any | null; } oauthProtectedResource() + +Protected-resource metadata (RFC 9728) + +Names the reset v0 surface as a protected resource and points clients at Hub — the only authorization server whose product tokens this deployment accepts. + +### Example + +```ts +import { + Configuration, + DiscoveryApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { OauthProtectedResourceRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const api = new DiscoveryApi(); + + try { + const data = await api.oauthProtectedResource(); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +**{ [key: string]: any | null; }** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/DownloadUrlOut.md b/sdk/typescript/docs/DownloadUrlOut.md deleted file mode 100644 index 31a05fc..0000000 --- a/sdk/typescript/docs/DownloadUrlOut.md +++ /dev/null @@ -1,43 +0,0 @@ - -# DownloadUrlOut - -A URL the caller can GET to fetch the artifact\'s bytes. `direct=True` ⇒ a short-lived signed GCS URL on `storage.googleapis.com` (client downloads straight from GCS; `expires_at` is set). `direct=False` ⇒ the proxy `/download` endpoint on the API host (no expiry) — returned for sub-threshold artifacts or when signing is unavailable. The URL is opaque: callers should not parse it. See large-download-design.md §5.1. - -## Properties - -Name | Type ------------- | ------------- -`contentType` | string -`direct` | boolean -`downloadUrl` | string -`expiresAt` | Date -`filename` | string -`sizeBytes` | number - -## Example - -```typescript -import type { DownloadUrlOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "contentType": null, - "direct": null, - "downloadUrl": null, - "expiresAt": null, - "filename": null, - "sizeBytes": null, -} satisfies DownloadUrlOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as DownloadUrlOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/DriveApiKeyCreateIn.md b/sdk/typescript/docs/DriveApiKeyCreateIn.md deleted file mode 100644 index bfa0151..0000000 --- a/sdk/typescript/docs/DriveApiKeyCreateIn.md +++ /dev/null @@ -1,33 +0,0 @@ - -# DriveApiKeyCreateIn - -`POST /v0/drives/{id}/keys` body — a required human label (a name for the key, e.g. the agent/integration it\'s for). - -## Properties - -Name | Type ------------- | ------------- -`label` | string - -## Example - -```typescript -import type { DriveApiKeyCreateIn } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "label": null, -} satisfies DriveApiKeyCreateIn - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as DriveApiKeyCreateIn -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/DriveApiKeyCreateOut.md b/sdk/typescript/docs/DriveApiKeyCreateOut.md deleted file mode 100644 index a82618f..0000000 --- a/sdk/typescript/docs/DriveApiKeyCreateOut.md +++ /dev/null @@ -1,41 +0,0 @@ - -# DriveApiKeyCreateOut - -`POST /v0/drives/{id}/keys` response — the new key\'s metadata PLUS the raw `ad_live_` value, returned **once**. Store `api_key` now; only its hash is persisted. - -## Properties - -Name | Type ------------- | ------------- -`apiKey` | string -`createdAt` | Date -`id` | string -`label` | string -`prefix` | string - -## Example - -```typescript -import type { DriveApiKeyCreateOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "apiKey": null, - "createdAt": null, - "id": null, - "label": null, - "prefix": null, -} satisfies DriveApiKeyCreateOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as DriveApiKeyCreateOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/DriveApiKeyListOut.md b/sdk/typescript/docs/DriveApiKeyListOut.md deleted file mode 100644 index fbe4ffb..0000000 --- a/sdk/typescript/docs/DriveApiKeyListOut.md +++ /dev/null @@ -1,37 +0,0 @@ - -# DriveApiKeyListOut - -`GET /v0/drives/{id}/keys` response — the drive\'s keys, oldest first (keyset order, design §3), including recently-revoked rows (filter on `revoked_at` for live only). `items` is the canonical list field (B-3: one envelope key everywhere); `keys` is a deprecated same-value alias kept for one release — the REST twin of the grep `matches` / compile `jobs` aliases. - -## Properties - -Name | Type ------------- | ------------- -`items` | [Array<DriveApiKeyOut>](DriveApiKeyOut.md) -`keys` | [Array<DriveApiKeyOut>](DriveApiKeyOut.md) -`nextCursor` | string - -## Example - -```typescript -import type { DriveApiKeyListOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "items": null, - "keys": null, - "nextCursor": null, -} satisfies DriveApiKeyListOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as DriveApiKeyListOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/DriveApiKeyOut.md b/sdk/typescript/docs/DriveApiKeyOut.md deleted file mode 100644 index 72d9e14..0000000 --- a/sdk/typescript/docs/DriveApiKeyOut.md +++ /dev/null @@ -1,43 +0,0 @@ - -# DriveApiKeyOut - -One per-drive `ad_live_` key — metadata only (never the raw key or hash). Item shape for `GET /v0/drives/{id}/keys`. - -## Properties - -Name | Type ------------- | ------------- -`createdAt` | Date -`id` | string -`label` | string -`lastUsedAt` | Date -`prefix` | string -`revokedAt` | Date - -## Example - -```typescript -import type { DriveApiKeyOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "createdAt": null, - "id": null, - "label": null, - "lastUsedAt": null, - "prefix": null, - "revokedAt": null, -} satisfies DriveApiKeyOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as DriveApiKeyOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/DriveCreateIn.md b/sdk/typescript/docs/DriveCreateIn.md index 04824db..bbf0e81 100644 --- a/sdk/typescript/docs/DriveCreateIn.md +++ b/sdk/typescript/docs/DriveCreateIn.md @@ -1,12 +1,13 @@ # DriveCreateIn -POST /v0/drives body. `name` is the user-facing drive label; the creator becomes the owner. +POST /v0/drives body. ## Properties Name | Type ------------ | ------------- +`metadata` | { [key: string]: any; } `name` | string ## Example @@ -16,6 +17,7 @@ import type { DriveCreateIn } from '@mnexa-ai/agentdrive-sdk' // TODO: Update the object below with actual values const example = { + "metadata": null, "name": null, } satisfies DriveCreateIn diff --git a/sdk/typescript/docs/DriveCreateOut.md b/sdk/typescript/docs/DriveCreateOut.md deleted file mode 100644 index 8b4c1fd..0000000 --- a/sdk/typescript/docs/DriveCreateOut.md +++ /dev/null @@ -1,47 +0,0 @@ - -# DriveCreateOut - -The create response — the ONLY place (besides key-rotate) a raw `ad_live_` key is returned, reveal-once. - -## Properties - -Name | Type ------------- | ------------- -`apiKey` | string -`createdAt` | Date -`id` | string -`name` | string -`organizationId` | string -`ownerEmail` | string -`ownerUserId` | string -`storageBytes` | number - -## Example - -```typescript -import type { DriveCreateOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "apiKey": null, - "createdAt": null, - "id": null, - "name": null, - "organizationId": null, - "ownerEmail": null, - "ownerUserId": null, - "storageBytes": null, -} satisfies DriveCreateOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as DriveCreateOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/DriveDeleteOut.md b/sdk/typescript/docs/DriveDeleteOut.md deleted file mode 100644 index ce992b0..0000000 --- a/sdk/typescript/docs/DriveDeleteOut.md +++ /dev/null @@ -1,41 +0,0 @@ - -# DriveDeleteOut - -DELETE /v0/drives/{drive_id} response — the drive soft-delete receipt. Reversible until the GC cron hard-deletes at `purge_at`; `restore_url` points at the drive restore endpoint (deletion-design.md §5.2). - -## Properties - -Name | Type ------------- | ------------- -`deletedAt` | Date -`id` | string -`ok` | boolean -`purgeAt` | Date -`restoreUrl` | string - -## Example - -```typescript -import type { DriveDeleteOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "deletedAt": null, - "id": null, - "ok": null, - "purgeAt": null, - "restoreUrl": null, -} satisfies DriveDeleteOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as DriveDeleteOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/DriveList.md b/sdk/typescript/docs/DriveList.md deleted file mode 100644 index eaa7e1a..0000000 --- a/sdk/typescript/docs/DriveList.md +++ /dev/null @@ -1,34 +0,0 @@ - -# DriveList - - -## Properties - -Name | Type ------------- | ------------- -`items` | [Array<DriveOut>](DriveOut.md) -`nextCursor` | string - -## Example - -```typescript -import type { DriveList } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "items": null, - "nextCursor": null, -} satisfies DriveList - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as DriveList -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/DriveListOut.md b/sdk/typescript/docs/DriveListOut.md new file mode 100644 index 0000000..8a21efe --- /dev/null +++ b/sdk/typescript/docs/DriveListOut.md @@ -0,0 +1,34 @@ + +# DriveListOut + + +## Properties + +Name | Type +------------ | ------------- +`items` | [Array<DriveOut>](DriveOut.md) +`nextCursor` | string + +## Example + +```typescript +import type { DriveListOut } from '@mnexa-ai/agentdrive-sdk' + +// TODO: Update the object below with actual values +const example = { + "items": null, + "nextCursor": null, +} satisfies DriveListOut + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as DriveListOut +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/DriveOut.md b/sdk/typescript/docs/DriveOut.md index 9f0af3e..37ce372 100644 --- a/sdk/typescript/docs/DriveOut.md +++ b/sdk/typescript/docs/DriveOut.md @@ -1,19 +1,24 @@ # DriveOut -One drive in a listing — metadata only (workspaces-design §4.2). Carries NO capability and NEVER a raw key. An admin\'s inventory and a member\'s owned list both serialize to this shape; `owner_email` is the only owner-identifying field surfaced. ## Properties Name | Type ------------ | ------------- `createdAt` | Date +`createdBy` | string +`deletedAt` | Date `id` | string +`metadata` | { [key: string]: any; } `name` | string -`organizationId` | string -`ownerEmail` | string -`ownerUserId` | string +`retrievalBytes` | number +`revision` | string +`rootFolderId` | string +`state` | string `storageBytes` | number +`updatedAt` | Date +`workspaceId` | string ## Example @@ -23,12 +28,18 @@ import type { DriveOut } from '@mnexa-ai/agentdrive-sdk' // TODO: Update the object below with actual values const example = { "createdAt": null, + "createdBy": null, + "deletedAt": null, "id": null, + "metadata": null, "name": null, - "organizationId": null, - "ownerEmail": null, - "ownerUserId": null, + "retrievalBytes": null, + "revision": null, + "rootFolderId": null, + "state": null, "storageBytes": null, + "updatedAt": null, + "workspaceId": null, } satisfies DriveOut console.log(example) diff --git a/sdk/typescript/docs/DriveReadOut.md b/sdk/typescript/docs/DriveReadOut.md deleted file mode 100644 index 8b556e4..0000000 --- a/sdk/typescript/docs/DriveReadOut.md +++ /dev/null @@ -1,47 +0,0 @@ - -# DriveReadOut - -Drive singleton shape returned by both data-plane read routes. - -## Properties - -Name | Type ------------- | ------------- -`createdAt` | Date -`email` | string -`etag` | string -`id` | string -`metageneration` | number -`organizationId` | string -`storageBytes` | number -`storageLimit` | number - -## Example - -```typescript -import type { DriveReadOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "createdAt": null, - "email": null, - "etag": null, - "id": null, - "metageneration": null, - "organizationId": null, - "storageBytes": null, - "storageLimit": null, -} satisfies DriveReadOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as DriveReadOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/DriveRenameIn.md b/sdk/typescript/docs/DriveRenameIn.md deleted file mode 100644 index 15e3069..0000000 --- a/sdk/typescript/docs/DriveRenameIn.md +++ /dev/null @@ -1,33 +0,0 @@ - -# DriveRenameIn - -PATCH /v0/drives/{id} body — rename a drive the caller owns. - -## Properties - -Name | Type ------------- | ------------- -`name` | string - -## Example - -```typescript -import type { DriveRenameIn } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "name": null, -} satisfies DriveRenameIn - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as DriveRenameIn -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/DriveRestoreOut.md b/sdk/typescript/docs/DriveRestoreOut.md deleted file mode 100644 index 561a2d0..0000000 --- a/sdk/typescript/docs/DriveRestoreOut.md +++ /dev/null @@ -1,36 +0,0 @@ - -# DriveRestoreOut - - -## Properties - -Name | Type ------------- | ------------- -`id` | string -`rebasedArtifactCount` | number -`restoredAt` | Date - -## Example - -```typescript -import type { DriveRestoreOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "id": null, - "rebasedArtifactCount": null, - "restoredAt": null, -} satisfies DriveRestoreOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as DriveRestoreOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/DriveUpdateIn.md b/sdk/typescript/docs/DriveUpdateIn.md new file mode 100644 index 0000000..646b917 --- /dev/null +++ b/sdk/typescript/docs/DriveUpdateIn.md @@ -0,0 +1,35 @@ + +# DriveUpdateIn + +PATCH /v0/drives/{id} body — at least one field is required. + +## Properties + +Name | Type +------------ | ------------- +`metadata` | { [key: string]: any; } +`name` | string + +## Example + +```typescript +import type { DriveUpdateIn } from '@mnexa-ai/agentdrive-sdk' + +// TODO: Update the object below with actual values +const example = { + "metadata": null, + "name": null, +} satisfies DriveUpdateIn + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as DriveUpdateIn +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/DriveUsageOut.md b/sdk/typescript/docs/DriveUsageOut.md index fc86b67..6045b1c 100644 --- a/sdk/typescript/docs/DriveUsageOut.md +++ b/sdk/typescript/docs/DriveUsageOut.md @@ -6,19 +6,8 @@ Name | Type ------------ | ------------- -`accountFootprint` | [StorageFootprintOut](StorageFootprintOut.md) -`egressBytes` | [UsageCounterOut](UsageCounterOut.md) -`footprint` | [StorageFootprintOut](StorageFootprintOut.md) -`indexedBytes` | [UsageCounterOut](UsageCounterOut.md) -`indexingOps` | [UsageCounterOut](UsageCounterOut.md) -`opsThisMonth` | [OperationUsageOut](OperationUsageOut.md) -`period` | [UsagePeriodOut](UsagePeriodOut.md) -`retrievalQueries` | [UsageCounterOut](UsageCounterOut.md) -`storage` | [UsageCounterOut](UsageCounterOut.md) -`storageBreakdown` | [StorageBreakdownOut](StorageBreakdownOut.md) -`tokensThisMonth` | [TokenUsageOut](TokenUsageOut.md) -`versionRetention` | [VersionRetentionOut](VersionRetentionOut.md) -`writesThisHour` | [HourlyUsageCounterOut](HourlyUsageCounterOut.md) +`retrievalBytes` | number +`storageBytes` | number ## Example @@ -27,19 +16,8 @@ import type { DriveUsageOut } from '@mnexa-ai/agentdrive-sdk' // TODO: Update the object below with actual values const example = { - "accountFootprint": null, - "egressBytes": null, - "footprint": null, - "indexedBytes": null, - "indexingOps": null, - "opsThisMonth": null, - "period": null, - "retrievalQueries": null, - "storage": null, - "storageBreakdown": null, - "tokensThisMonth": null, - "versionRetention": null, - "writesThisHour": null, + "retrievalBytes": null, + "storageBytes": null, } satisfies DriveUsageOut console.log(example) diff --git a/sdk/typescript/docs/DrivesApi.md b/sdk/typescript/docs/DrivesApi.md index ff4fc38..d2e871f 100644 --- a/sdk/typescript/docs/DrivesApi.md +++ b/sdk/typescript/docs/DrivesApi.md @@ -4,23 +4,23 @@ All URIs are relative to *https://api.agentdrive.run* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**createDriveKeyRouteV0DrivesDriveIdKeysPost**](DrivesApi.md#createdrivekeyroutev0drivesdriveidkeyspost) | **POST** /v0/drives/{drive_id}/keys | Create a drive API key | -| [**createDriveRouteV0DrivesPost**](DrivesApi.md#createdriveroutev0drivespost) | **POST** /v0/drives | Create a drive in your active space | -| [**listDriveKeysRouteV0DrivesDriveIdKeysGet**](DrivesApi.md#listdrivekeysroutev0drivesdriveidkeysget) | **GET** /v0/drives/{drive_id}/keys | List a drive\'s API keys | -| [**listDrivesRouteV0DrivesGet**](DrivesApi.md#listdrivesroutev0drivesget) | **GET** /v0/drives | List the drives you can see | -| [**renameDriveRouteV0DrivesDriveIdPatch**](DrivesApi.md#renamedriveroutev0drivesdriveidpatch) | **PATCH** /v0/drives/{drive_id} | Rename a drive you own | -| [**revokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePost**](DrivesApi.md#revokedrivekeyroutev0drivesdriveidkeyskeyidrevokepost) | **POST** /v0/drives/{drive_id}/keys/{key_id}/revoke | Revoke a drive API key | -| [**rotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePost**](DrivesApi.md#rotateonekeyroutev0drivesdriveidkeyskeyidrotatepost) | **POST** /v0/drives/{drive_id}/keys/{key_id}/rotate | Rotate one API key | +| [**drivesCreate**](DrivesApi.md#drivescreate) | **POST** /v0/drives | Create Drive | +| [**drivesDelete**](DrivesApi.md#drivesdelete) | **DELETE** /v0/drives/{drive_id} | Delete Drive | +| [**drivesList**](DrivesApi.md#driveslist) | **GET** /v0/drives | List Drives | +| [**drivesRead**](DrivesApi.md#drivesread) | **GET** /v0/drives/{drive_id} | Read Drive | +| [**drivesRestore**](DrivesApi.md#drivesrestore) | **POST** /v0/drives/{drive_id}/restore | Restore Drive | +| [**drivesUpdate**](DrivesApi.md#drivesupdate) | **PATCH** /v0/drives/{drive_id} | Update Drive | +| [**drivesUsage**](DrivesApi.md#drivesusage) | **GET** /v0/drives/{drive_id}/usage | Drive Usage | -## createDriveKeyRouteV0DrivesDriveIdKeysPost +## drivesCreate -> DriveApiKeyCreateOut createDriveKeyRouteV0DrivesDriveIdKeysPost(driveId, driveApiKeyCreateIn) +> DriveOut drivesCreate(idempotencyKey, driveCreateIn, authorization) -Create a drive API key +Create Drive -Mint a new `ad_live_` key for a drive you manage — a drive may hold several (one per agent/integration). A `label` (a name for the key) is **required**. **Manager only** (404 no-leak otherwise), `full`-scope user token. The raw key is returned **once** — store it now. +Create a drive with its structural root folder and creator-manager grant(s) in one transaction; idempotent under the ``Idempotency-Key``. ### Example @@ -29,25 +29,27 @@ import { Configuration, DrivesApi, } from '@mnexa-ai/agentdrive-sdk'; -import type { CreateDriveKeyRouteV0DrivesDriveIdKeysPostRequest } from '@mnexa-ai/agentdrive-sdk'; +import type { DrivesCreateRequest } from '@mnexa-ai/agentdrive-sdk'; async function example() { console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth + // Configure HTTP bearer authorization: bearerAuth accessToken: "YOUR BEARER TOKEN", }); const api = new DrivesApi(config); const body = { // string - driveId: driveId_example, - // DriveApiKeyCreateIn - driveApiKeyCreateIn: ..., - } satisfies CreateDriveKeyRouteV0DrivesDriveIdKeysPostRequest; + idempotencyKey: idempotencyKey_example, + // DriveCreateIn + driveCreateIn: ..., + // string (optional) + authorization: authorization_example, + } satisfies DrivesCreateRequest; try { - const data = await api.createDriveKeyRouteV0DrivesDriveIdKeysPost(body); + const data = await api.drivesCreate(body); console.log(data); } catch (error) { console.error(error); @@ -63,16 +65,17 @@ example().catch(console.error); | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **driveId** | `string` | | [Defaults to `undefined`] | -| **driveApiKeyCreateIn** | [DriveApiKeyCreateIn](DriveApiKeyCreateIn.md) | | | +| **idempotencyKey** | `string` | | [Defaults to `undefined`] | +| **driveCreateIn** | [DriveCreateIn](DriveCreateIn.md) | | | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | ### Return type -[**DriveApiKeyCreateOut**](DriveApiKeyCreateOut.md) +[**DriveOut**](DriveOut.md) ### Authorization -[BearerAuth](../README.md#BearerAuth) +[bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -83,24 +86,28 @@ example().catch(console.error); ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **400** | The key label or scope is invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The drive does not exist for this user. | * X-Request-Id - Request correlation identifier.
| +| **201** | Successful Response | * ETag - Current strong entity tag.
* Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The parent or target resource was not found or is not visible. | * X-Request-Id - Request correlation identifier.
| +| **409** | A sibling already occupies the name/path, or the idempotency key was reused for a different request. | * X-Request-Id - Request correlation identifier.
| +| **412** | If-Match did not match (copy/restore preconditions). | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| | **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **428** | If-Match is required for this mutation. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) -## createDriveRouteV0DrivesPost +## drivesDelete -> DriveCreateOut createDriveRouteV0DrivesPost(driveCreateIn) +> DriveOut drivesDelete(driveId, idempotencyKey, ifMatch, authorization) -Create a drive in your active space +Delete Drive -Create a named drive. Any **member** of the space may create one; the creator becomes its **owner**. Requires a `full`-scope user token. The response carries the drive\'s `ad_live_` API key **once** (`api_key`) — store it now, it is never returned again (mint more keys via `POST /v0/drives/{id}/keys`). The target workspace is the user\'s active organization (`users.default_org`); cross-workspace creation names no other workspace in v0. A space may hold up to its plan\'s drive limit (workspaces-v2 §4.6; seat-aware for shared drives). A caller at the limit is blocked with `403 DRIVE_LIMIT_REACHED`; the limit is tier-governed, not a hard cap. +Soft-delete a drive. Returns 200 with the deleted representation so the client has the post-delete revision/ETag for a restore. ### Example @@ -109,23 +116,29 @@ import { Configuration, DrivesApi, } from '@mnexa-ai/agentdrive-sdk'; -import type { CreateDriveRouteV0DrivesPostRequest } from '@mnexa-ai/agentdrive-sdk'; +import type { DrivesDeleteRequest } from '@mnexa-ai/agentdrive-sdk'; async function example() { console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth + // Configure HTTP bearer authorization: bearerAuth accessToken: "YOUR BEARER TOKEN", }); const api = new DrivesApi(config); const body = { - // DriveCreateIn - driveCreateIn: ..., - } satisfies CreateDriveRouteV0DrivesPostRequest; + // string + driveId: driveId_example, + // string + idempotencyKey: idempotencyKey_example, + // string + ifMatch: ifMatch_example, + // string (optional) + authorization: authorization_example, + } satisfies DrivesDeleteRequest; try { - const data = await api.createDriveRouteV0DrivesPost(body); + const data = await api.drivesDelete(body); console.log(data); } catch (error) { console.error(error); @@ -141,41 +154,50 @@ example().catch(console.error); | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **driveCreateIn** | [DriveCreateIn](DriveCreateIn.md) | | | +| **driveId** | `string` | | [Defaults to `undefined`] | +| **idempotencyKey** | `string` | | [Defaults to `undefined`] | +| **ifMatch** | `string` | | [Defaults to `undefined`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | ### Return type -[**DriveCreateOut**](DriveCreateOut.md) +[**DriveOut**](DriveOut.md) ### Authorization -[BearerAuth](../README.md#BearerAuth) +[bearerAuth](../README.md#bearerAuth) ### HTTP request headers -- **Content-Type**: `application/json` +- **Content-Type**: Not defined - **Accept**: `application/json` ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **201** | Successful Response | * Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| +| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| +| **409** | The mutation conflicts with current state (name/path, lifecycle). | * X-Request-Id - Request correlation identifier.
| +| **412** | If-Match did not match the resource\'s current revision. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| | **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **428** | If-Match is required for this mutation. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) -## listDriveKeysRouteV0DrivesDriveIdKeysGet +## drivesList -> DriveApiKeyListOut listDriveKeysRouteV0DrivesDriveIdKeysGet(driveId, cursor, limit) +> DriveListOut drivesList(lifecycle, limit, cursor, authorization) -List a drive\'s API keys +List Drives -List the `ad_live_` keys for a drive you manage (oldest first, including recently-revoked rows — filter on `revoked_at` for live only). **Manager only** (404 no-leak otherwise). A `read`-scope user token may list (metadata reveals no secret), mirroring `GET /v0/drives`. Metadata only — the raw key is never returned after mint. **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=<token>` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. +List the actor\'s workspace drives, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted drives so a manager can read the post-delete revision as the If-Match source for a restore. Unknown query parameters are rejected (§6.3). ### Example @@ -184,27 +206,29 @@ import { Configuration, DrivesApi, } from '@mnexa-ai/agentdrive-sdk'; -import type { ListDriveKeysRouteV0DrivesDriveIdKeysGetRequest } from '@mnexa-ai/agentdrive-sdk'; +import type { DrivesListRequest } from '@mnexa-ai/agentdrive-sdk'; async function example() { console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth + // Configure HTTP bearer authorization: bearerAuth accessToken: "YOUR BEARER TOKEN", }); const api = new DrivesApi(config); const body = { - // string - driveId: driveId_example, // string (optional) - cursor: cursor_example, + lifecycle: lifecycle_example, // number (optional) limit: 56, - } satisfies ListDriveKeysRouteV0DrivesDriveIdKeysGetRequest; + // string (optional) + cursor: cursor_example, + // string (optional) + authorization: authorization_example, + } satisfies DrivesListRequest; try { - const data = await api.listDriveKeysRouteV0DrivesDriveIdKeysGet(body); + const data = await api.drivesList(body); console.log(data); } catch (error) { console.error(error); @@ -220,17 +244,18 @@ example().catch(console.error); | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **driveId** | `string` | | [Defaults to `undefined`] | -| **cursor** | `string` | | [Optional] [Defaults to `undefined`] | +| **lifecycle** | `string` | | [Optional] [Defaults to `'active'`] | | **limit** | `number` | | [Optional] [Defaults to `undefined`] | +| **cursor** | `string` | | [Optional] [Defaults to `undefined`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | ### Return type -[**DriveApiKeyListOut**](DriveApiKeyListOut.md) +[**DriveListOut**](DriveListOut.md) ### Authorization -[BearerAuth](../README.md#BearerAuth) +[bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -242,22 +267,24 @@ example().catch(console.error); | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The drive does not exist for this user. | * X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| | **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) -## listDrivesRouteV0DrivesGet +## drivesRead -> DriveList listDrivesRouteV0DrivesGet(cursor, limit) +> DriveOut drivesRead(driveId, ifNoneMatch, authorization) -List the drives you can see +Read Drive -Returns drive **metadata** (workspaces-design §4.2): an **admin** sees the whole active workspace\'s drive inventory (every owner); a **member** sees only the drives they own. Metadata only — owner, size, timestamps — never a raw API key, and never an authorization to read a drive\'s contents. A `read`-scope token may call this; mutations require `full`. **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=<token>` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. +Read one active drive. ETag = quoted revision; matching ``If-None-Match`` → 304. Deleted and cross-workspace drives are 404. ### Example @@ -266,25 +293,27 @@ import { Configuration, DrivesApi, } from '@mnexa-ai/agentdrive-sdk'; -import type { ListDrivesRouteV0DrivesGetRequest } from '@mnexa-ai/agentdrive-sdk'; +import type { DrivesReadRequest } from '@mnexa-ai/agentdrive-sdk'; async function example() { console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth + // Configure HTTP bearer authorization: bearerAuth accessToken: "YOUR BEARER TOKEN", }); const api = new DrivesApi(config); const body = { + // string + driveId: driveId_example, // string (optional) - cursor: cursor_example, - // number (optional) - limit: 56, - } satisfies ListDrivesRouteV0DrivesGetRequest; + ifNoneMatch: ifNoneMatch_example, + // string (optional) + authorization: authorization_example, + } satisfies DrivesReadRequest; try { - const data = await api.listDrivesRouteV0DrivesGet(body); + const data = await api.drivesRead(body); console.log(data); } catch (error) { console.error(error); @@ -300,16 +329,17 @@ example().catch(console.error); | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **cursor** | `string` | | [Optional] [Defaults to `undefined`] | -| **limit** | `number` | | [Optional] [Defaults to `undefined`] | +| **driveId** | `string` | | [Defaults to `undefined`] | +| **ifNoneMatch** | `string` | | [Optional] [Defaults to `undefined`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | ### Return type -[**DriveList**](DriveList.md) +[**DriveOut**](DriveOut.md) ### Authorization -[BearerAuth](../README.md#BearerAuth) +[bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -320,22 +350,26 @@ example().catch(console.error); ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| +| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **304** | If-None-Match matched the current ETag. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| | **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) -## renameDriveRouteV0DrivesDriveIdPatch +## drivesRestore -> DriveOut renameDriveRouteV0DrivesDriveIdPatch(driveId, driveRenameIn) +> DriveOut drivesRestore(driveId, idempotencyKey, ifMatch, authorization) -Rename a drive you own +Restore Drive -Rename a drive. **Owner only** — a drive id that isn\'t yours returns 404 (no-leak). Requires a `full`-scope user token. +Restore a soft-deleted drive. If-Match must carry the post-delete revision; restoring an already-active drive is 409 CONFLICT. ### Example @@ -344,12 +378,12 @@ import { Configuration, DrivesApi, } from '@mnexa-ai/agentdrive-sdk'; -import type { RenameDriveRouteV0DrivesDriveIdPatchRequest } from '@mnexa-ai/agentdrive-sdk'; +import type { DrivesRestoreRequest } from '@mnexa-ai/agentdrive-sdk'; async function example() { console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth + // Configure HTTP bearer authorization: bearerAuth accessToken: "YOUR BEARER TOKEN", }); const api = new DrivesApi(config); @@ -357,12 +391,16 @@ async function example() { const body = { // string driveId: driveId_example, - // DriveRenameIn - driveRenameIn: ..., - } satisfies RenameDriveRouteV0DrivesDriveIdPatchRequest; + // string + idempotencyKey: idempotencyKey_example, + // string + ifMatch: ifMatch_example, + // string (optional) + authorization: authorization_example, + } satisfies DrivesRestoreRequest; try { - const data = await api.renameDriveRouteV0DrivesDriveIdPatch(body); + const data = await api.drivesRestore(body); console.log(data); } catch (error) { console.error(error); @@ -379,7 +417,9 @@ example().catch(console.error); | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **driveId** | `string` | | [Defaults to `undefined`] | -| **driveRenameIn** | [DriveRenameIn](DriveRenameIn.md) | | | +| **idempotencyKey** | `string` | | [Defaults to `undefined`] | +| **ifMatch** | `string` | | [Defaults to `undefined`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | ### Return type @@ -387,36 +427,39 @@ example().catch(console.error); ### Authorization -[BearerAuth](../README.md#BearerAuth) +[bearerAuth](../README.md#bearerAuth) ### HTTP request headers -- **Content-Type**: `application/json` +- **Content-Type**: Not defined - **Accept**: `application/json` ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **400** | The drive update is invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | No such drive exists for this principal. | * X-Request-Id - Request correlation identifier.
| -| **409** | The drive update conflicts with current workspace state. | * X-Request-Id - Request correlation identifier.
| +| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| +| **409** | The mutation conflicts with current state (name/path, lifecycle). | * X-Request-Id - Request correlation identifier.
| +| **412** | If-Match did not match the resource\'s current revision. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| | **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **428** | If-Match is required for this mutation. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) -## revokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePost +## drivesUpdate -> revokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePost(driveId, keyId) +> DriveOut drivesUpdate(driveId, idempotencyKey, ifMatch, driveUpdateIn, authorization) -Revoke a drive API key +Update Drive -Revoke one `ad_live_` key of a drive you manage — anything using it loses access immediately. **Manager only** (404 no-leak otherwise), `full`-scope user token. Idempotent: revoking an unknown/already-revoked key returns 204 too (no existence oracle). +Rename / update a drive\'s metadata. Requires ``Idempotency-Key`` and ``If-Match`` (428 absent, 412 stale); bumps the revision. ### Example @@ -425,12 +468,12 @@ import { Configuration, DrivesApi, } from '@mnexa-ai/agentdrive-sdk'; -import type { RevokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePostRequest } from '@mnexa-ai/agentdrive-sdk'; +import type { DrivesUpdateRequest } from '@mnexa-ai/agentdrive-sdk'; async function example() { console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth + // Configure HTTP bearer authorization: bearerAuth accessToken: "YOUR BEARER TOKEN", }); const api = new DrivesApi(config); @@ -439,11 +482,17 @@ async function example() { // string driveId: driveId_example, // string - keyId: keyId_example, - } satisfies RevokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePostRequest; + idempotencyKey: idempotencyKey_example, + // string + ifMatch: ifMatch_example, + // DriveUpdateIn + driveUpdateIn: ..., + // string (optional) + authorization: authorization_example, + } satisfies DrivesUpdateRequest; try { - const data = await api.revokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePost(body); + const data = await api.drivesUpdate(body); console.log(data); } catch (error) { console.error(error); @@ -460,42 +509,50 @@ example().catch(console.error); | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **driveId** | `string` | | [Defaults to `undefined`] | -| **keyId** | `string` | | [Defaults to `undefined`] | +| **idempotencyKey** | `string` | | [Defaults to `undefined`] | +| **ifMatch** | `string` | | [Defaults to `undefined`] | +| **driveUpdateIn** | [DriveUpdateIn](DriveUpdateIn.md) | | | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | ### Return type -`void` (Empty response body) +[**DriveOut**](DriveOut.md) ### Authorization -[BearerAuth](../README.md#BearerAuth) +[bearerAuth](../README.md#bearerAuth) ### HTTP request headers -- **Content-Type**: Not defined +- **Content-Type**: `application/json` - **Accept**: `application/json` ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -| **204** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The drive or key does not exist for this user. | * X-Request-Id - Request correlation identifier.
| +| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| +| **409** | The mutation conflicts with current state (name/path, lifecycle). | * X-Request-Id - Request correlation identifier.
| +| **412** | If-Match did not match the resource\'s current revision. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| | **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **428** | If-Match is required for this mutation. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) -## rotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePost +## drivesUsage -> DriveApiKeyCreateOut rotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePost(driveId, keyId) +> DriveUsageOut drivesUsage(driveId, authorization) -Rotate one API key +Drive Usage -Rotate a single `ad_live_` key: revoke `key_id` and mint a replacement that inherits its label. **Only that key** is affected — the drive\'s other keys keep working. **Manager only** (404 no-leak otherwise), `full`-scope user token. The new key is returned **once** — store it now. A `key_id` that isn\'t a live key of this drive is a 404. +Byte counters for one active drive: storage is the live sum of its versions\' sizes; retrieval reads the counter the content-read slice maintains (0 until it lands). ### Example @@ -504,12 +561,12 @@ import { Configuration, DrivesApi, } from '@mnexa-ai/agentdrive-sdk'; -import type { RotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePostRequest } from '@mnexa-ai/agentdrive-sdk'; +import type { DrivesUsageRequest } from '@mnexa-ai/agentdrive-sdk'; async function example() { console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth + // Configure HTTP bearer authorization: bearerAuth accessToken: "YOUR BEARER TOKEN", }); const api = new DrivesApi(config); @@ -517,12 +574,12 @@ async function example() { const body = { // string driveId: driveId_example, - // string - keyId: keyId_example, - } satisfies RotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePostRequest; + // string (optional) + authorization: authorization_example, + } satisfies DrivesUsageRequest; try { - const data = await api.rotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePost(body); + const data = await api.drivesUsage(body); console.log(data); } catch (error) { console.error(error); @@ -539,15 +596,15 @@ example().catch(console.error); | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **driveId** | `string` | | [Defaults to `undefined`] | -| **keyId** | `string` | | [Defaults to `undefined`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | ### Return type -[**DriveApiKeyCreateOut**](DriveApiKeyCreateOut.md) +[**DriveUsageOut**](DriveUsageOut.md) ### Authorization -[BearerAuth](../README.md#BearerAuth) +[bearerAuth](../README.md#bearerAuth) ### HTTP request headers @@ -559,10 +616,12 @@ example().catch(console.error); | Status code | Description | Response headers | |-------------|-------------|------------------| | **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The drive or key does not exist for this user. | * X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| | **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/DrivesCreate400Response.md b/sdk/typescript/docs/DrivesCreate400Response.md new file mode 100644 index 0000000..56dd4a3 --- /dev/null +++ b/sdk/typescript/docs/DrivesCreate400Response.md @@ -0,0 +1,32 @@ + +# DrivesCreate400Response + + +## Properties + +Name | Type +------------ | ------------- +`error` | [DrivesCreate400ResponseError](DrivesCreate400ResponseError.md) + +## Example + +```typescript +import type { DrivesCreate400Response } from '@mnexa-ai/agentdrive-sdk' + +// TODO: Update the object below with actual values +const example = { + "error": null, +} satisfies DrivesCreate400Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as DrivesCreate400Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/DrivesCreate400ResponseError.md b/sdk/typescript/docs/DrivesCreate400ResponseError.md new file mode 100644 index 0000000..9dddda6 --- /dev/null +++ b/sdk/typescript/docs/DrivesCreate400ResponseError.md @@ -0,0 +1,36 @@ + +# DrivesCreate400ResponseError + + +## Properties + +Name | Type +------------ | ------------- +`code` | string +`details` | object +`message` | string + +## Example + +```typescript +import type { DrivesCreate400ResponseError } from '@mnexa-ai/agentdrive-sdk' + +// TODO: Update the object below with actual values +const example = { + "code": null, + "details": null, + "message": null, +} satisfies DrivesCreate400ResponseError + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as DrivesCreate400ResponseError +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/DrivesList400Response.md b/sdk/typescript/docs/DrivesList400Response.md new file mode 100644 index 0000000..8b2427e --- /dev/null +++ b/sdk/typescript/docs/DrivesList400Response.md @@ -0,0 +1,32 @@ + +# DrivesList400Response + + +## Properties + +Name | Type +------------ | ------------- +`error` | [DrivesList400ResponseError](DrivesList400ResponseError.md) + +## Example + +```typescript +import type { DrivesList400Response } from '@mnexa-ai/agentdrive-sdk' + +// TODO: Update the object below with actual values +const example = { + "error": null, +} satisfies DrivesList400Response + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as DrivesList400Response +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/DrivesList400ResponseError.md b/sdk/typescript/docs/DrivesList400ResponseError.md new file mode 100644 index 0000000..c126773 --- /dev/null +++ b/sdk/typescript/docs/DrivesList400ResponseError.md @@ -0,0 +1,36 @@ + +# DrivesList400ResponseError + + +## Properties + +Name | Type +------------ | ------------- +`code` | string +`details` | object +`message` | string + +## Example + +```typescript +import type { DrivesList400ResponseError } from '@mnexa-ai/agentdrive-sdk' + +// TODO: Update the object below with actual values +const example = { + "code": null, + "details": null, + "message": null, +} satisfies DrivesList400ResponseError + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as DrivesList400ResponseError +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ErrorBody.md b/sdk/typescript/docs/ErrorBody.md deleted file mode 100644 index 3cc27ba..0000000 --- a/sdk/typescript/docs/ErrorBody.md +++ /dev/null @@ -1,35 +0,0 @@ - -# ErrorBody - -Machine-readable API error. Error-code-specific context (for example `limit`, `current_etag`, or `retry_after_s`) is intentionally additive. - -## Properties - -Name | Type ------------- | ------------- -`code` | string -`message` | string - -## Example - -```typescript -import type { ErrorBody } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "code": null, - "message": null, -} satisfies ErrorBody - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as ErrorBody -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ErrorDetail.md b/sdk/typescript/docs/ErrorDetail.md deleted file mode 100644 index f1cb586..0000000 --- a/sdk/typescript/docs/ErrorDetail.md +++ /dev/null @@ -1,32 +0,0 @@ - -# ErrorDetail - - -## Properties - -Name | Type ------------- | ------------- -`error` | [ErrorBody](ErrorBody.md) - -## Example - -```typescript -import type { ErrorDetail } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "error": null, -} satisfies ErrorDetail - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as ErrorDetail -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ErrorResponse.md b/sdk/typescript/docs/ErrorResponse.md index afbf750..e807a45 100644 --- a/sdk/typescript/docs/ErrorResponse.md +++ b/sdk/typescript/docs/ErrorResponse.md @@ -1,13 +1,12 @@ # ErrorResponse -Canonical non-validation error envelope emitted by AgentDrive. ## Properties Name | Type ------------ | ------------- -`detail` | [ErrorDetail](ErrorDetail.md) +`error` | [DrivesCreate400ResponseError](DrivesCreate400ResponseError.md) ## Example @@ -16,7 +15,7 @@ import type { ErrorResponse } from '@mnexa-ai/agentdrive-sdk' // TODO: Update the object below with actual values const example = { - "detail": null, + "error": null, } satisfies ErrorResponse console.log(example) diff --git a/sdk/typescript/docs/EventOut.md b/sdk/typescript/docs/EventOut.md deleted file mode 100644 index 9be0f97..0000000 --- a/sdk/typescript/docs/EventOut.md +++ /dev/null @@ -1,44 +0,0 @@ - -# EventOut - - -## Properties - -Name | Type ------------- | ------------- -`action` | string -`actorName` | string -`artId` | string -`createdAt` | Date -`driveId` | string -`id` | string -`metadata` | { [key: string]: any; } - -## Example - -```typescript -import type { EventOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "action": null, - "actorName": null, - "artId": null, - "createdAt": null, - "driveId": null, - "id": null, - "metadata": null, -} satisfies EventOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as EventOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/EventPage.md b/sdk/typescript/docs/EventPage.md deleted file mode 100644 index 9753f0d..0000000 --- a/sdk/typescript/docs/EventPage.md +++ /dev/null @@ -1,34 +0,0 @@ - -# EventPage - - -## Properties - -Name | Type ------------- | ------------- -`items` | [Array<EventOut>](EventOut.md) -`nextCursor` | string - -## Example - -```typescript -import type { EventPage } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "items": null, - "nextCursor": null, -} satisfies EventPage - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as EventPage -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ExtensionExchangeRequest.md b/sdk/typescript/docs/ExtensionExchangeRequest.md deleted file mode 100644 index 5aabe0d..0000000 --- a/sdk/typescript/docs/ExtensionExchangeRequest.md +++ /dev/null @@ -1,35 +0,0 @@ - -# ExtensionExchangeRequest - -Single-use ticket → JWT pair. Called by `auth-complete.html` inside the SnipIt extension. No `Authorization` header — the ticket itself is the credential. - -## Properties - -Name | Type ------------- | ------------- -`extId` | string -`ticket` | string - -## Example - -```typescript -import type { ExtensionExchangeRequest } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "extId": null, - "ticket": null, -} satisfies ExtensionExchangeRequest - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as ExtensionExchangeRequest -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ExtensionExchangeResponse.md b/sdk/typescript/docs/ExtensionExchangeResponse.md deleted file mode 100644 index a48e5f7..0000000 --- a/sdk/typescript/docs/ExtensionExchangeResponse.md +++ /dev/null @@ -1,42 +0,0 @@ - -# ExtensionExchangeResponse - - -## Properties - -Name | Type ------------- | ------------- -`accessToken` | string -`driveId` | string -`expiresIn` | number -`identityAssertion` | string -`scope` | string -`tokenType` | string - -## Example - -```typescript -import type { ExtensionExchangeResponse } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "accessToken": null, - "driveId": null, - "expiresIn": null, - "identityAssertion": null, - "scope": null, - "tokenType": null, -} satisfies ExtensionExchangeResponse - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as ExtensionExchangeResponse -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/FeedbackCreateOut.md b/sdk/typescript/docs/FeedbackCreateOut.md deleted file mode 100644 index 883012f..0000000 --- a/sdk/typescript/docs/FeedbackCreateOut.md +++ /dev/null @@ -1,38 +0,0 @@ - -# FeedbackCreateOut - - -## Properties - -Name | Type ------------- | ------------- -`contact` | boolean -`id` | string -`note` | string -`status` | string - -## Example - -```typescript -import type { FeedbackCreateOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "contact": null, - "id": null, - "note": null, - "status": null, -} satisfies FeedbackCreateOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as FeedbackCreateOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/FeedbackStatusOut.md b/sdk/typescript/docs/FeedbackStatusOut.md deleted file mode 100644 index 08d2344..0000000 --- a/sdk/typescript/docs/FeedbackStatusOut.md +++ /dev/null @@ -1,47 +0,0 @@ - -# FeedbackStatusOut - -GET /v0/feedback/{fbk_id} response — lifecycle status of feedback THIS drive filed. - -## Properties - -Name | Type ------------- | ------------- -`contact` | boolean -`createdAt` | Date -`duplicateOf` | string -`id` | string -`kind` | string -`status` | string -`statusChangedAt` | Date -`title` | string - -## Example - -```typescript -import type { FeedbackStatusOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "contact": null, - "createdAt": null, - "duplicateOf": null, - "id": null, - "kind": null, - "status": null, - "statusChangedAt": null, - "title": null, -} satisfies FeedbackStatusOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as FeedbackStatusOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/FindHitOut.md b/sdk/typescript/docs/FindHitOut.md deleted file mode 100644 index 906ae4b..0000000 --- a/sdk/typescript/docs/FindHitOut.md +++ /dev/null @@ -1,75 +0,0 @@ - -# FindHitOut - -One passage-level hit from `/v0/find` (hybrid chunk RAG over `embed_chunks`). The unit is a passage, not a file — consecutive `ord` values from the same `art_id` are normal because chunks overlap by ~400 tokens. Span fields are modality-aware: only the pair matching `modality` is populated, the others stay None. - -## Properties - -Name | Type ------------- | ------------- -`artId` | string -`charEnd` | number -`charStart` | number -`contentType` | string -`driveId` | string -`fileType` | string -`labels` | Array<string> -`modality` | string -`ord` | number -`pageEnd` | number -`pageStart` | number -`path` | string -`rankLexical` | number -`rankSemantic` | number -`score` | number -`snippet` | string -`text` | string -`timeEndMs` | number -`timeStartMs` | number -`updatedAt` | Date -`url` | string -`versionNumber` | number - -## Example - -```typescript -import type { FindHitOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "artId": null, - "charEnd": null, - "charStart": null, - "contentType": null, - "driveId": null, - "fileType": null, - "labels": null, - "modality": null, - "ord": null, - "pageEnd": null, - "pageStart": null, - "path": null, - "rankLexical": null, - "rankSemantic": null, - "score": null, - "snippet": null, - "text": null, - "timeEndMs": null, - "timeStartMs": null, - "updatedAt": null, - "url": null, - "versionNumber": null, -} satisfies FindHitOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as FindHitOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/FindPage.md b/sdk/typescript/docs/FindPage.md deleted file mode 100644 index dfd9f25..0000000 --- a/sdk/typescript/docs/FindPage.md +++ /dev/null @@ -1,33 +0,0 @@ - -# FindPage - -`/v0/find` response — single-shot top-N, deliberately unpaginated (same contract + rationale as `SearchPage`). - -## Properties - -Name | Type ------------- | ------------- -`items` | [Array<FindHitOut>](FindHitOut.md) - -## Example - -```typescript -import type { FindPage } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "items": null, -} satisfies FindPage - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as FindPage -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/FolderCascadeOut.md b/sdk/typescript/docs/FolderCascadeOut.md new file mode 100644 index 0000000..9c28caf --- /dev/null +++ b/sdk/typescript/docs/FolderCascadeOut.md @@ -0,0 +1,34 @@ + +# FolderCascadeOut + + +## Properties + +Name | Type +------------ | ------------- +`cascade` | { [key: string]: number; } +`folder` | [FolderOut](FolderOut.md) + +## Example + +```typescript +import type { FolderCascadeOut } from '@mnexa-ai/agentdrive-sdk' + +// TODO: Update the object below with actual values +const example = { + "cascade": null, + "folder": null, +} satisfies FolderCascadeOut + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as FolderCascadeOut +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/FolderCopyIn.md b/sdk/typescript/docs/FolderCopyIn.md index 898c22e..0c86eb2 100644 --- a/sdk/typescript/docs/FolderCopyIn.md +++ b/sdk/typescript/docs/FolderCopyIn.md @@ -1,14 +1,15 @@ # FolderCopyIn -POST /v0/folders/{fld_id}/copy body — duplicate the subtree to a new path. `path` is the target folder path (canonical, trailing slash). Its own schema (vs. reusing `FolderMoveIn`) keeps the copy surface self-documenting in the OpenAPI spec. +POST /v0/drives/{id}/folders/{folder_id}/copy body. ``destination_drive_id`` must equal the source drive (or be absent) — cross-drive copy is out of v0 scope and rejected. ## Properties Name | Type ------------ | ------------- -`fromMetageneration` | number -`path` | string +`destinationDriveId` | string +`destinationName` | string +`destinationParentId` | string ## Example @@ -17,8 +18,9 @@ import type { FolderCopyIn } from '@mnexa-ai/agentdrive-sdk' // TODO: Update the object below with actual values const example = { - "fromMetageneration": null, - "path": null, + "destinationDriveId": null, + "destinationName": null, + "destinationParentId": null, } satisfies FolderCopyIn console.log(example) diff --git a/sdk/typescript/docs/FolderCopyOut.md b/sdk/typescript/docs/FolderCopyOut.md deleted file mode 100644 index b9f72f0..0000000 --- a/sdk/typescript/docs/FolderCopyOut.md +++ /dev/null @@ -1,57 +0,0 @@ - -# FolderCopyOut - -POST /v0/folders/{fld_id}/copy response — the newly-created folder resource (same shape as `FolderOut`) plus copy-provenance fields: `from_fld_id` is the source folder and `n_artifacts_copied` is the number of descendant artifacts cloned into the new subtree. Mirrors the MCP `copy` folder route\'s conceptual shape. - -## Properties - -Name | Type ------------- | ------------- -`createdAt` | Date -`deletedAt` | Date -`description` | string -`driveId` | string -`etag` | string -`fromFldId` | string -`id` | string -`inheritGrants` | boolean -`metageneration` | number -`nArtifactsCopied` | number -`path` | string -`purgeAt` | Date -`updatedAt` | Date - -## Example - -```typescript -import type { FolderCopyOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "createdAt": null, - "deletedAt": null, - "description": null, - "driveId": null, - "etag": null, - "fromFldId": null, - "id": null, - "inheritGrants": null, - "metageneration": null, - "nArtifactsCopied": null, - "path": null, - "purgeAt": null, - "updatedAt": null, -} satisfies FolderCopyOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as FolderCopyOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/FolderCreateIn.md b/sdk/typescript/docs/FolderCreateIn.md index 6b48a89..8dde9d0 100644 --- a/sdk/typescript/docs/FolderCreateIn.md +++ b/sdk/typescript/docs/FolderCreateIn.md @@ -1,13 +1,16 @@ # FolderCreateIn -PUT /v0/folders/{path} body for the optional metadata params. Empty body is fine — `mkdir` with no description just creates the folder row. +POST /v0/drives/{id}/folders body. ## Properties Name | Type ------------ | ------------- -`description` | string +`grantInheritance` | string +`metadata` | { [key: string]: any; } +`name` | string +`parentId` | string ## Example @@ -16,7 +19,10 @@ import type { FolderCreateIn } from '@mnexa-ai/agentdrive-sdk' // TODO: Update the object below with actual values const example = { - "description": null, + "grantInheritance": null, + "metadata": null, + "name": null, + "parentId": null, } satisfies FolderCreateIn console.log(example) diff --git a/sdk/typescript/docs/FolderDeleteOut.md b/sdk/typescript/docs/FolderDeleteOut.md deleted file mode 100644 index 6818162..0000000 --- a/sdk/typescript/docs/FolderDeleteOut.md +++ /dev/null @@ -1,47 +0,0 @@ - -# FolderDeleteOut - -DELETE response — surfaces cascade counts so the caller can confirm scope of an rmdir before the client retries with `?recursive=true`. - -## Properties - -Name | Type ------------- | ------------- -`deletedAt` | Date -`id` | string -`nArtifactsDeleted` | number -`nSubfoldersDeleted` | number -`ok` | boolean -`path` | string -`purgeAt` | Date -`retentionDays` | number - -## Example - -```typescript -import type { FolderDeleteOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "deletedAt": null, - "id": null, - "nArtifactsDeleted": null, - "nSubfoldersDeleted": null, - "ok": null, - "path": null, - "purgeAt": null, - "retentionDays": null, -} satisfies FolderDeleteOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as FolderDeleteOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/FolderListOut.md b/sdk/typescript/docs/FolderListOut.md new file mode 100644 index 0000000..3f31e46 --- /dev/null +++ b/sdk/typescript/docs/FolderListOut.md @@ -0,0 +1,34 @@ + +# FolderListOut + + +## Properties + +Name | Type +------------ | ------------- +`items` | [Array<FolderOut>](FolderOut.md) +`nextCursor` | string + +## Example + +```typescript +import type { FolderListOut } from '@mnexa-ai/agentdrive-sdk' + +// TODO: Update the object below with actual values +const example = { + "items": null, + "nextCursor": null, +} satisfies FolderListOut + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as FolderListOut +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/FolderMoveIn.md b/sdk/typescript/docs/FolderMoveIn.md deleted file mode 100644 index 7bd72db..0000000 --- a/sdk/typescript/docs/FolderMoveIn.md +++ /dev/null @@ -1,33 +0,0 @@ - -# FolderMoveIn - -POST /v0/folders/{fld_id}/move body — rename / move. - -## Properties - -Name | Type ------------- | ------------- -`path` | string - -## Example - -```typescript -import type { FolderMoveIn } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "path": null, -} satisfies FolderMoveIn - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as FolderMoveIn -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/FolderOut.md b/sdk/typescript/docs/FolderOut.md index bfcbf9c..977a544 100644 --- a/sdk/typescript/docs/FolderOut.md +++ b/sdk/typescript/docs/FolderOut.md @@ -1,7 +1,6 @@ # FolderOut -Folder resource (folders+permalinks design §13). `path` is the canonical leading+trailing-slash form. Access is expressed through grants (permission-sharing-design §4.4), not a folder-level flag. ## Properties @@ -9,14 +8,14 @@ Name | Type ------------ | ------------- `createdAt` | Date `deletedAt` | Date -`description` | string `driveId` | string -`etag` | string +`grantInheritance` | string `id` | string -`inheritGrants` | boolean -`metageneration` | number -`path` | string -`purgeAt` | Date +`metadata` | { [key: string]: any; } +`name` | string +`parentId` | string +`revision` | string +`state` | string `updatedAt` | Date ## Example @@ -28,14 +27,14 @@ import type { FolderOut } from '@mnexa-ai/agentdrive-sdk' const example = { "createdAt": null, "deletedAt": null, - "description": null, "driveId": null, - "etag": null, + "grantInheritance": null, "id": null, - "inheritGrants": null, - "metageneration": null, - "path": null, - "purgeAt": null, + "metadata": null, + "name": null, + "parentId": null, + "revision": null, + "state": null, "updatedAt": null, } satisfies FolderOut diff --git a/sdk/typescript/docs/FolderPatchIn.md b/sdk/typescript/docs/FolderPatchIn.md deleted file mode 100644 index adc3988..0000000 --- a/sdk/typescript/docs/FolderPatchIn.md +++ /dev/null @@ -1,35 +0,0 @@ - -# FolderPatchIn - -PATCH /v0/folders/{fld_id} body — partial update. Field absence = unchanged. `description`: explicit null = clear. `inherit_grants`: non-nullable — null/absent = unchanged (it cannot be cleared, only flipped true/false). - -## Properties - -Name | Type ------------- | ------------- -`description` | string -`inheritGrants` | boolean - -## Example - -```typescript -import type { FolderPatchIn } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "description": null, - "inheritGrants": null, -} satisfies FolderPatchIn - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as FolderPatchIn -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/FolderRestoreOut.md b/sdk/typescript/docs/FolderRestoreOut.md deleted file mode 100644 index 47d62d9..0000000 --- a/sdk/typescript/docs/FolderRestoreOut.md +++ /dev/null @@ -1,57 +0,0 @@ - -# FolderRestoreOut - -POST /v0/folders/{fld_id}/restore response — the restored (live) folder resource (same shape as `FolderOut`) plus the cascade counts from `core.folders.restore_cascade` (dashboard-file-operations-design §4.5), so the caller can confirm the scope of what came back with the root. - -## Properties - -Name | Type ------------- | ------------- -`createdAt` | Date -`deletedAt` | Date -`description` | string -`driveId` | string -`etag` | string -`id` | string -`inheritGrants` | boolean -`metageneration` | number -`nArtifactsRestored` | number -`nSubfoldersRestored` | number -`path` | string -`purgeAt` | Date -`updatedAt` | Date - -## Example - -```typescript -import type { FolderRestoreOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "createdAt": null, - "deletedAt": null, - "description": null, - "driveId": null, - "etag": null, - "id": null, - "inheritGrants": null, - "metageneration": null, - "nArtifactsRestored": null, - "nSubfoldersRestored": null, - "path": null, - "purgeAt": null, - "updatedAt": null, -} satisfies FolderRestoreOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as FolderRestoreOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/FolderUpdateIn.md b/sdk/typescript/docs/FolderUpdateIn.md new file mode 100644 index 0000000..d3394f3 --- /dev/null +++ b/sdk/typescript/docs/FolderUpdateIn.md @@ -0,0 +1,39 @@ + +# FolderUpdateIn + +PATCH /v0/drives/{id}/folders/{folder_id} body — at least one field is required. + +## Properties + +Name | Type +------------ | ------------- +`grantInheritance` | string +`metadata` | { [key: string]: any; } +`name` | string +`parentId` | string + +## Example + +```typescript +import type { FolderUpdateIn } from '@mnexa-ai/agentdrive-sdk' + +// TODO: Update the object below with actual values +const example = { + "grantInheritance": null, + "metadata": null, + "name": null, + "parentId": null, +} satisfies FolderUpdateIn + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as FolderUpdateIn +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/FoldersApi.md b/sdk/typescript/docs/FoldersApi.md new file mode 100644 index 0000000..873e109 --- /dev/null +++ b/sdk/typescript/docs/FoldersApi.md @@ -0,0 +1,669 @@ +# FoldersApi + +All URIs are relative to *https://api.agentdrive.run* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**foldersCopy**](FoldersApi.md#folderscopy) | **POST** /v0/drives/{drive_id}/folders/{folder_id}/copy | Copy Folder | +| [**foldersCreate**](FoldersApi.md#folderscreate) | **POST** /v0/drives/{drive_id}/folders | Create Folder | +| [**foldersDelete**](FoldersApi.md#foldersdelete) | **DELETE** /v0/drives/{drive_id}/folders/{folder_id} | Delete Folder | +| [**foldersList**](FoldersApi.md#folderslist) | **GET** /v0/drives/{drive_id}/folders | List Folders | +| [**foldersRead**](FoldersApi.md#foldersread) | **GET** /v0/drives/{drive_id}/folders/{folder_id} | Read Folder | +| [**foldersRestore**](FoldersApi.md#foldersrestore) | **POST** /v0/drives/{drive_id}/folders/{folder_id}/restore | Restore Folder | +| [**foldersUpdate**](FoldersApi.md#foldersupdate) | **PATCH** /v0/drives/{drive_id}/folders/{folder_id} | Update Folder | + + + +## foldersCopy + +> FolderOut foldersCopy(driveId, folderId, idempotencyKey, folderCopyIn, ifMatch, authorization) + +Copy Folder + +Copy a folder\'s subtree within the same drive. Cross-drive copy is out of v0 scope and rejected (400 INVALID_ARGUMENT). ``destination_drive_id`` must equal the source drive when present. Materializes the subtree synchronously → 201 + the copied folder. ``If-Match`` is optional; when present it is validated against the source revision (412 stale). + +### Example + +```ts +import { + Configuration, + FoldersApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { FoldersCopyRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new FoldersApi(config); + + const body = { + // string + driveId: driveId_example, + // string + folderId: folderId_example, + // string + idempotencyKey: idempotencyKey_example, + // FolderCopyIn + folderCopyIn: ..., + // string (optional) + ifMatch: ifMatch_example, + // string (optional) + authorization: authorization_example, + } satisfies FoldersCopyRequest; + + try { + const data = await api.foldersCopy(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **folderId** | `string` | | [Defaults to `undefined`] | +| **idempotencyKey** | `string` | | [Defaults to `undefined`] | +| **folderCopyIn** | [FolderCopyIn](FolderCopyIn.md) | | | +| **ifMatch** | `string` | | [Optional] [Defaults to `undefined`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**FolderOut**](FolderOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Successful Response | * ETag - Current strong entity tag.
* Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The parent or target resource was not found or is not visible. | * X-Request-Id - Request correlation identifier.
| +| **409** | A sibling already occupies the name/path, or the idempotency key was reused for a different request. | * X-Request-Id - Request correlation identifier.
| +| **412** | If-Match did not match (copy/restore preconditions). | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **428** | If-Match is required for this mutation. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## foldersCreate + +> FolderOut foldersCreate(driveId, idempotencyKey, folderCreateIn, authorization) + +Create Folder + +Create one folder under `parent_id`; idempotent under the ``Idempotency-Key``. + +### Example + +```ts +import { + Configuration, + FoldersApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { FoldersCreateRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new FoldersApi(config); + + const body = { + // string + driveId: driveId_example, + // string + idempotencyKey: idempotencyKey_example, + // FolderCreateIn + folderCreateIn: ..., + // string (optional) + authorization: authorization_example, + } satisfies FoldersCreateRequest; + + try { + const data = await api.foldersCreate(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **idempotencyKey** | `string` | | [Defaults to `undefined`] | +| **folderCreateIn** | [FolderCreateIn](FolderCreateIn.md) | | | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**FolderOut**](FolderOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Successful Response | * ETag - Current strong entity tag.
* Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The parent or target resource was not found or is not visible. | * X-Request-Id - Request correlation identifier.
| +| **409** | A sibling already occupies the name/path, or the idempotency key was reused for a different request. | * X-Request-Id - Request correlation identifier.
| +| **412** | If-Match did not match (copy/restore preconditions). | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **428** | If-Match is required for this mutation. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## foldersDelete + +> FolderCascadeOut foldersDelete(driveId, folderId, idempotencyKey, ifMatch, recursive, authorization) + +Delete Folder + +Soft-delete a folder and its full live subtree (folders + artifacts) in one transaction. A non-empty subtree requires ``recursive=true`` (409 FOLDER_RECURSIVE_REQUIRED otherwise). Returns the deleted root representation plus exact cascade counts and the post-delete revision/ETag for a restore. + +### Example + +```ts +import { + Configuration, + FoldersApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { FoldersDeleteRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new FoldersApi(config); + + const body = { + // string + driveId: driveId_example, + // string + folderId: folderId_example, + // string + idempotencyKey: idempotencyKey_example, + // string + ifMatch: ifMatch_example, + // boolean (optional) + recursive: true, + // string (optional) + authorization: authorization_example, + } satisfies FoldersDeleteRequest; + + try { + const data = await api.foldersDelete(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **folderId** | `string` | | [Defaults to `undefined`] | +| **idempotencyKey** | `string` | | [Defaults to `undefined`] | +| **ifMatch** | `string` | | [Defaults to `undefined`] | +| **recursive** | `boolean` | | [Optional] [Defaults to `false`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**FolderCascadeOut**](FolderCascadeOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| +| **409** | The mutation conflicts with current state (name/path, lifecycle). | * X-Request-Id - Request correlation identifier.
| +| **412** | If-Match did not match the resource\'s current revision. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **428** | If-Match is required for this mutation. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## foldersList + +> FolderListOut foldersList(driveId, lifecycle, limit, cursor, parentId, name, authorization) + +List Folders + +List the drive\'s folders, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted folders so the post-delete revision can be read as the If-Match source for a restore. ``parent_id`` / ``name`` are exact-match filters. Unknown query parameters are rejected (§6.3). + +### Example + +```ts +import { + Configuration, + FoldersApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { FoldersListRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new FoldersApi(config); + + const body = { + // string + driveId: driveId_example, + // string (optional) + lifecycle: lifecycle_example, + // number (optional) + limit: 56, + // string (optional) + cursor: cursor_example, + // string (optional) + parentId: parentId_example, + // string (optional) + name: name_example, + // string (optional) + authorization: authorization_example, + } satisfies FoldersListRequest; + + try { + const data = await api.foldersList(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **lifecycle** | `string` | | [Optional] [Defaults to `'active'`] | +| **limit** | `number` | | [Optional] [Defaults to `undefined`] | +| **cursor** | `string` | | [Optional] [Defaults to `undefined`] | +| **parentId** | `string` | | [Optional] [Defaults to `undefined`] | +| **name** | `string` | | [Optional] [Defaults to `undefined`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**FolderListOut**](FolderListOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## foldersRead + +> FolderOut foldersRead(driveId, folderId, ifNoneMatch, authorization) + +Read Folder + +Read one active folder. ETag = quoted revision; matching ``If-None-Match`` → 304. Deleted and cross-workspace folders are 404. + +### Example + +```ts +import { + Configuration, + FoldersApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { FoldersReadRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new FoldersApi(config); + + const body = { + // string + driveId: driveId_example, + // string + folderId: folderId_example, + // string (optional) + ifNoneMatch: ifNoneMatch_example, + // string (optional) + authorization: authorization_example, + } satisfies FoldersReadRequest; + + try { + const data = await api.foldersRead(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **folderId** | `string` | | [Defaults to `undefined`] | +| **ifNoneMatch** | `string` | | [Optional] [Defaults to `undefined`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**FolderOut**](FolderOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **304** | If-None-Match matched the current ETag. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## foldersRestore + +> FolderCascadeOut foldersRestore(driveId, folderId, idempotencyKey, ifMatch, authorization) + +Restore Folder + +Restore a soft-deleted folder and its deleted subtree atomically. If-Match must carry the post-delete revision; restoring an already-active folder is 409 CONFLICT. + +### Example + +```ts +import { + Configuration, + FoldersApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { FoldersRestoreRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new FoldersApi(config); + + const body = { + // string + driveId: driveId_example, + // string + folderId: folderId_example, + // string + idempotencyKey: idempotencyKey_example, + // string + ifMatch: ifMatch_example, + // string (optional) + authorization: authorization_example, + } satisfies FoldersRestoreRequest; + + try { + const data = await api.foldersRestore(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **folderId** | `string` | | [Defaults to `undefined`] | +| **idempotencyKey** | `string` | | [Defaults to `undefined`] | +| **ifMatch** | `string` | | [Defaults to `undefined`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**FolderCascadeOut**](FolderCascadeOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| +| **409** | The mutation conflicts with current state (name/path, lifecycle). | * X-Request-Id - Request correlation identifier.
| +| **412** | If-Match did not match the resource\'s current revision. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **428** | If-Match is required for this mutation. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## foldersUpdate + +> FolderOut foldersUpdate(driveId, folderId, idempotencyKey, ifMatch, folderUpdateIn, authorization) + +Update Folder + +Rename / move / update a folder\'s metadata or inheritance. Requires ``Idempotency-Key`` and ``If-Match`` (428 absent, 412 stale); bumps the revision. + +### Example + +```ts +import { + Configuration, + FoldersApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { FoldersUpdateRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new FoldersApi(config); + + const body = { + // string + driveId: driveId_example, + // string + folderId: folderId_example, + // string + idempotencyKey: idempotencyKey_example, + // string + ifMatch: ifMatch_example, + // FolderUpdateIn + folderUpdateIn: ..., + // string (optional) + authorization: authorization_example, + } satisfies FoldersUpdateRequest; + + try { + const data = await api.foldersUpdate(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **folderId** | `string` | | [Defaults to `undefined`] | +| **idempotencyKey** | `string` | | [Defaults to `undefined`] | +| **ifMatch** | `string` | | [Defaults to `undefined`] | +| **folderUpdateIn** | [FolderUpdateIn](FolderUpdateIn.md) | | | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**FolderOut**](FolderOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| +| **409** | The mutation conflicts with current state (name/path, lifecycle). | * X-Request-Id - Request correlation identifier.
| +| **412** | If-Match did not match the resource\'s current revision. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **428** | If-Match is required for this mutation. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/GrantCreateIn.md b/sdk/typescript/docs/GrantCreateIn.md index 85bd25d..a2513c5 100644 --- a/sdk/typescript/docs/GrantCreateIn.md +++ b/sdk/typescript/docs/GrantCreateIn.md @@ -1,15 +1,17 @@ # GrantCreateIn -POST /v0/grants body. `resource` is an `art_*`/`fld_*` id or a path (resolved within the caller\'s drive). `expires_in` is seconds from now (omit for a permanent grant). +POST /v0/drives/{id}/grants body. ## Properties Name | Type ------------ | ------------- -`expiresIn` | number -`principal` | [GrantPrincipalIn](GrantPrincipalIn.md) -`resource` | string +`expiresAt` | Date +`principalId` | string +`principalType` | string +`resourceId` | string +`resourceType` | string `role` | string ## Example @@ -19,9 +21,11 @@ import type { GrantCreateIn } from '@mnexa-ai/agentdrive-sdk' // TODO: Update the object below with actual values const example = { - "expiresIn": null, - "principal": null, - "resource": null, + "expiresAt": null, + "principalId": null, + "principalType": null, + "resourceId": null, + "resourceType": null, "role": null, } satisfies GrantCreateIn diff --git a/sdk/typescript/docs/GrantList.md b/sdk/typescript/docs/GrantList.md deleted file mode 100644 index 4769b3e..0000000 --- a/sdk/typescript/docs/GrantList.md +++ /dev/null @@ -1,34 +0,0 @@ - -# GrantList - - -## Properties - -Name | Type ------------- | ------------- -`items` | [Array<GrantOut>](GrantOut.md) -`nextCursor` | string - -## Example - -```typescript -import type { GrantList } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "items": null, - "nextCursor": null, -} satisfies GrantList - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as GrantList -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/GrantListOut.md b/sdk/typescript/docs/GrantListOut.md new file mode 100644 index 0000000..93d15a6 --- /dev/null +++ b/sdk/typescript/docs/GrantListOut.md @@ -0,0 +1,34 @@ + +# GrantListOut + + +## Properties + +Name | Type +------------ | ------------- +`items` | [Array<GrantOut>](GrantOut.md) +`nextCursor` | string + +## Example + +```typescript +import type { GrantListOut } from '@mnexa-ai/agentdrive-sdk' + +// TODO: Update the object below with actual values +const example = { + "items": null, + "nextCursor": null, +} satisfies GrantListOut + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as GrantListOut +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/GrantOut.md b/sdk/typescript/docs/GrantOut.md index 50e3f2d..b1853e2 100644 --- a/sdk/typescript/docs/GrantOut.md +++ b/sdk/typescript/docs/GrantOut.md @@ -1,25 +1,23 @@ # GrantOut -A live grant. Audit fields (`granted_by_*`, `on_behalf_of`) are surfaced so a manager can see who shared what. ## Properties Name | Type ------------ | ------------- -`artifactsAffected` | number `createdAt` | Date +`driveId` | string `expiresAt` | Date -`grantedById` | string -`grantedByType` | string `id` | string -`onBehalfOf` | string -`principalEmail` | string `principalId` | string `principalType` | string `resourceId` | string `resourceType` | string +`revision` | string +`revokedAt` | Date `role` | string +`state` | string ## Example @@ -28,19 +26,18 @@ import type { GrantOut } from '@mnexa-ai/agentdrive-sdk' // TODO: Update the object below with actual values const example = { - "artifactsAffected": null, "createdAt": null, + "driveId": null, "expiresAt": null, - "grantedById": null, - "grantedByType": null, "id": null, - "onBehalfOf": null, - "principalEmail": null, "principalId": null, "principalType": null, "resourceId": null, "resourceType": null, + "revision": null, + "revokedAt": null, "role": null, + "state": null, } satisfies GrantOut console.log(example) diff --git a/sdk/typescript/docs/GrantPatchIn.md b/sdk/typescript/docs/GrantPatchIn.md deleted file mode 100644 index ccedbb1..0000000 --- a/sdk/typescript/docs/GrantPatchIn.md +++ /dev/null @@ -1,35 +0,0 @@ - -# GrantPatchIn - -PATCH /v0/grants/{grn_id} body. Field absence = unchanged; explicit `expires_in: null` clears the expiry (makes the grant permanent). - -## Properties - -Name | Type ------------- | ------------- -`expiresIn` | number -`role` | string - -## Example - -```typescript -import type { GrantPatchIn } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "expiresIn": null, - "role": null, -} satisfies GrantPatchIn - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as GrantPatchIn -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/GrantPrincipalIn.md b/sdk/typescript/docs/GrantPrincipalIn.md deleted file mode 100644 index 69b3ba9..0000000 --- a/sdk/typescript/docs/GrantPrincipalIn.md +++ /dev/null @@ -1,37 +0,0 @@ - -# GrantPrincipalIn - -Who a grant is for. `anyone` carries no id/email; `org`/`agent` require `id`; `user` requires exactly one of `id` / `email` (an email with no account becomes a pending-email invite resolved on sign-in). - -## Properties - -Name | Type ------------- | ------------- -`email` | string -`id` | string -`type` | string - -## Example - -```typescript -import type { GrantPrincipalIn } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "email": null, - "id": null, - "type": null, -} satisfies GrantPrincipalIn - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as GrantPrincipalIn -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/GrantUpdateIn.md b/sdk/typescript/docs/GrantUpdateIn.md new file mode 100644 index 0000000..bb7e1ba --- /dev/null +++ b/sdk/typescript/docs/GrantUpdateIn.md @@ -0,0 +1,35 @@ + +# GrantUpdateIn + +PATCH /v0/drives/{id}/grants/{grant_id} body — at least one field is required. An explicit ``expires_at: null`` clears the expiry; omitting it leaves it unchanged. + +## Properties + +Name | Type +------------ | ------------- +`expiresAt` | Date +`role` | string + +## Example + +```typescript +import type { GrantUpdateIn } from '@mnexa-ai/agentdrive-sdk' + +// TODO: Update the object below with actual values +const example = { + "expiresAt": null, + "role": null, +} satisfies GrantUpdateIn + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as GrantUpdateIn +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/GrantsApi.md b/sdk/typescript/docs/GrantsApi.md new file mode 100644 index 0000000..731f086 --- /dev/null +++ b/sdk/typescript/docs/GrantsApi.md @@ -0,0 +1,478 @@ +# GrantsApi + +All URIs are relative to *https://api.agentdrive.run* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**grantsCreate**](GrantsApi.md#grantscreate) | **POST** /v0/drives/{drive_id}/grants | Create Grant | +| [**grantsList**](GrantsApi.md#grantslist) | **GET** /v0/drives/{drive_id}/grants | List Grants | +| [**grantsRead**](GrantsApi.md#grantsread) | **GET** /v0/drives/{drive_id}/grants/{grant_id} | Read Grant | +| [**grantsRevoke**](GrantsApi.md#grantsrevoke) | **DELETE** /v0/drives/{drive_id}/grants/{grant_id} | Revoke Grant | +| [**grantsUpdate**](GrantsApi.md#grantsupdate) | **PATCH** /v0/drives/{drive_id}/grants/{grant_id} | Update Grant | + + + +## grantsCreate + +> GrantOut grantsCreate(driveId, idempotencyKey, grantCreateIn, authorization) + +Create Grant + +Grant one principal a role on a drive, folder, or artifact. + +### Example + +```ts +import { + Configuration, + GrantsApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { GrantsCreateRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GrantsApi(config); + + const body = { + // string + driveId: driveId_example, + // string + idempotencyKey: idempotencyKey_example, + // GrantCreateIn + grantCreateIn: ..., + // string (optional) + authorization: authorization_example, + } satisfies GrantsCreateRequest; + + try { + const data = await api.grantsCreate(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **idempotencyKey** | `string` | | [Defaults to `undefined`] | +| **grantCreateIn** | [GrantCreateIn](GrantCreateIn.md) | | | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**GrantOut**](GrantOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Successful Response | * ETag - Current strong entity tag.
* Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The parent or target resource was not found or is not visible. | * X-Request-Id - Request correlation identifier.
| +| **409** | A sibling already occupies the name/path, or the idempotency key was reused for a different request. | * X-Request-Id - Request correlation identifier.
| +| **412** | If-Match did not match (copy/restore preconditions). | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **428** | If-Match is required for this mutation. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## grantsList + +> GrantListOut grantsList(driveId, lifecycle, limit, cursor, resourceType, resourceId, principalType, authorization) + +List Grants + +List explicit grants in the drive, keyset paginated. **What you see depends on your role (contract change).** A caller holding ``manager`` on the drive lists EVERY grant in it. Any other caller lists only the grants that name them — their own agent/user rows, ``workspace`` grants covering them, and ``public`` grants (which already expose the resource to them anyway). Previously any drive ``viewer`` could page out every principal id, role and expiry in the drive; that was an access-graph disclosure, not a feature. The operation is refused (404) only for a caller holding no live grant anywhere in the drive — never for lack of ``manager``, because seeing your own access is not a privilege. That admits folder-scoped principals, who previously 404\'d here despite having access to show. A folder ``manager`` still sees only their own rows, not the roster of the subtree they administer; scoping the listing by per-resource administration authority is a follow-up this change does not claim. ``resource_id`` filters to one resource\'s grants and REQUIRES ``resource_type`` alongside it — a bare resource id is ambiguous across the three resource kinds, and guessing the kind from the id prefix would make the filter\'s meaning depend on an id format the contract does not promise to keep. ``resource_type`` on its own remains a valid (and pre-existing) filter. + +### Example + +```ts +import { + Configuration, + GrantsApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { GrantsListRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GrantsApi(config); + + const body = { + // string + driveId: driveId_example, + // string (optional) + lifecycle: lifecycle_example, + // number (optional) + limit: 56, + // string (optional) + cursor: cursor_example, + // string (optional) + resourceType: resourceType_example, + // string (optional) + resourceId: resourceId_example, + // string (optional) + principalType: principalType_example, + // string (optional) + authorization: authorization_example, + } satisfies GrantsListRequest; + + try { + const data = await api.grantsList(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **lifecycle** | `string` | | [Optional] [Defaults to `'active'`] | +| **limit** | `number` | | [Optional] [Defaults to `undefined`] | +| **cursor** | `string` | | [Optional] [Defaults to `undefined`] | +| **resourceType** | `string` | | [Optional] [Defaults to `undefined`] | +| **resourceId** | `string` | | [Optional] [Defaults to `undefined`] | +| **principalType** | `string` | | [Optional] [Defaults to `undefined`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**GrantListOut**](GrantListOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## grantsRead + +> GrantOut grantsRead(driveId, grantId, ifNoneMatch, authorization) + +Read Grant + +Read one grant in the drive. + +### Example + +```ts +import { + Configuration, + GrantsApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { GrantsReadRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GrantsApi(config); + + const body = { + // string + driveId: driveId_example, + // string + grantId: grantId_example, + // string (optional) + ifNoneMatch: ifNoneMatch_example, + // string (optional) + authorization: authorization_example, + } satisfies GrantsReadRequest; + + try { + const data = await api.grantsRead(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **grantId** | `string` | | [Defaults to `undefined`] | +| **ifNoneMatch** | `string` | | [Optional] [Defaults to `undefined`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**GrantOut**](GrantOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **304** | If-None-Match matched the current ETag. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## grantsRevoke + +> GrantOut grantsRevoke(driveId, grantId, idempotencyKey, ifMatch, authorization) + +Revoke Grant + +Revoke a grant (soft, sets revoked_at) under If-Match. + +### Example + +```ts +import { + Configuration, + GrantsApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { GrantsRevokeRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GrantsApi(config); + + const body = { + // string + driveId: driveId_example, + // string + grantId: grantId_example, + // string + idempotencyKey: idempotencyKey_example, + // string + ifMatch: ifMatch_example, + // string (optional) + authorization: authorization_example, + } satisfies GrantsRevokeRequest; + + try { + const data = await api.grantsRevoke(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **grantId** | `string` | | [Defaults to `undefined`] | +| **idempotencyKey** | `string` | | [Defaults to `undefined`] | +| **ifMatch** | `string` | | [Defaults to `undefined`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**GrantOut**](GrantOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| +| **409** | The mutation conflicts with current state (name/path, lifecycle). | * X-Request-Id - Request correlation identifier.
| +| **412** | If-Match did not match the resource\'s current revision. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **428** | If-Match is required for this mutation. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## grantsUpdate + +> GrantOut grantsUpdate(driveId, grantId, idempotencyKey, ifMatch, grantUpdateIn, authorization) + +Update Grant + +Change a grant\'s role or expiry under If-Match. + +### Example + +```ts +import { + Configuration, + GrantsApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { GrantsUpdateRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new GrantsApi(config); + + const body = { + // string + driveId: driveId_example, + // string + grantId: grantId_example, + // string + idempotencyKey: idempotencyKey_example, + // string + ifMatch: ifMatch_example, + // GrantUpdateIn + grantUpdateIn: ..., + // string (optional) + authorization: authorization_example, + } satisfies GrantsUpdateRequest; + + try { + const data = await api.grantsUpdate(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **grantId** | `string` | | [Defaults to `undefined`] | +| **idempotencyKey** | `string` | | [Defaults to `undefined`] | +| **ifMatch** | `string` | | [Defaults to `undefined`] | +| **grantUpdateIn** | [GrantUpdateIn](GrantUpdateIn.md) | | | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**GrantOut**](GrantOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| +| **409** | The mutation conflicts with current state (name/path, lifecycle). | * X-Request-Id - Request correlation identifier.
| +| **412** | If-Match did not match the resource\'s current revision. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **428** | If-Match is required for this mutation. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/HourlyUsageCounterOut.md b/sdk/typescript/docs/HourlyUsageCounterOut.md deleted file mode 100644 index bbf9b32..0000000 --- a/sdk/typescript/docs/HourlyUsageCounterOut.md +++ /dev/null @@ -1,36 +0,0 @@ - -# HourlyUsageCounterOut - - -## Properties - -Name | Type ------------- | ------------- -`limit` | number -`resetAt` | Date -`used` | number - -## Example - -```typescript -import type { HourlyUsageCounterOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "limit": null, - "resetAt": null, - "used": null, -} satisfies HourlyUsageCounterOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as HourlyUsageCounterOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/IdentityAssertionMetadataOut.md b/sdk/typescript/docs/IdentityAssertionMetadataOut.md deleted file mode 100644 index c15f946..0000000 --- a/sdk/typescript/docs/IdentityAssertionMetadataOut.md +++ /dev/null @@ -1,36 +0,0 @@ - -# IdentityAssertionMetadataOut - - -## Properties - -Name | Type ------------- | ------------- -`alg` | string -`iss` | string -`version` | number - -## Example - -```typescript -import type { IdentityAssertionMetadataOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "alg": null, - "iss": null, - "version": null, -} satisfies IdentityAssertionMetadataOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as IdentityAssertionMetadataOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/InvitationList.md b/sdk/typescript/docs/InvitationList.md deleted file mode 100644 index a92248d..0000000 --- a/sdk/typescript/docs/InvitationList.md +++ /dev/null @@ -1,34 +0,0 @@ - -# InvitationList - - -## Properties - -Name | Type ------------- | ------------- -`items` | [Array<InvitationOut>](InvitationOut.md) -`nextCursor` | string - -## Example - -```typescript -import type { InvitationList } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "items": null, - "nextCursor": null, -} satisfies InvitationList - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as InvitationList -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/InvitationOut.md b/sdk/typescript/docs/InvitationOut.md deleted file mode 100644 index 5d30f6a..0000000 --- a/sdk/typescript/docs/InvitationOut.md +++ /dev/null @@ -1,47 +0,0 @@ - -# InvitationOut - -One workspace invitation — metadata only; the raw token is never surfaced over the API (it lives only in the invite email). - -## Properties - -Name | Type ------------- | ------------- -`createdAt` | Date -`email` | string -`expiresAt` | Date -`id` | string -`invitedBy` | string -`organizationId` | string -`role` | string -`status` | string - -## Example - -```typescript -import type { InvitationOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "createdAt": null, - "email": null, - "expiresAt": null, - "id": null, - "invitedBy": null, - "organizationId": null, - "role": null, - "status": null, -} satisfies InvitationOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as InvitationOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/InviteCreateOut.md b/sdk/typescript/docs/InviteCreateOut.md deleted file mode 100644 index 0f5222b..0000000 --- a/sdk/typescript/docs/InviteCreateOut.md +++ /dev/null @@ -1,37 +0,0 @@ - -# InviteCreateOut - -POST /v0/members/invite response. `already_member` is True when the email was already a live member (no invite created — a no-op success). `email_delivered` is False when the invite row was created but the notification email failed to send — the invite is still valid and can be resent, but the invitee has not yet received a link. - -## Properties - -Name | Type ------------- | ------------- -`alreadyMember` | boolean -`emailDelivered` | boolean -`invitation` | [InvitationOut](InvitationOut.md) - -## Example - -```typescript -import type { InviteCreateOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "alreadyMember": null, - "emailDelivered": null, - "invitation": null, -} satisfies InviteCreateOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as InviteCreateOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/JwkOut.md b/sdk/typescript/docs/JwkOut.md deleted file mode 100644 index f3514d1..0000000 --- a/sdk/typescript/docs/JwkOut.md +++ /dev/null @@ -1,42 +0,0 @@ - -# JwkOut - - -## Properties - -Name | Type ------------- | ------------- -`alg` | string -`e` | string -`kid` | string -`kty` | string -`n` | string -`use` | string - -## Example - -```typescript -import type { JwkOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "alg": null, - "e": null, - "kid": null, - "kty": null, - "n": null, - "use": null, -} satisfies JwkOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as JwkOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/JwksOut.md b/sdk/typescript/docs/JwksOut.md deleted file mode 100644 index 9848eb4..0000000 --- a/sdk/typescript/docs/JwksOut.md +++ /dev/null @@ -1,32 +0,0 @@ - -# JwksOut - - -## Properties - -Name | Type ------------- | ------------- -`keys` | [Array<JwkOut>](JwkOut.md) - -## Example - -```typescript -import type { JwksOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "keys": null, -} satisfies JwksOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as JwksOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/LocInner.md b/sdk/typescript/docs/LocInner.md deleted file mode 100644 index 9c2fef1..0000000 --- a/sdk/typescript/docs/LocInner.md +++ /dev/null @@ -1,30 +0,0 @@ - -# LocInner - - -## Properties - -Name | Type ------------- | ------------- - -## Example - -```typescript -import type { LocInner } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { -} satisfies LocInner - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as LocInner -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/LookupValuesIn.md b/sdk/typescript/docs/LookupValuesIn.md deleted file mode 100644 index 87f79fd..0000000 --- a/sdk/typescript/docs/LookupValuesIn.md +++ /dev/null @@ -1,36 +0,0 @@ - -# LookupValuesIn - - -## Properties - -Name | Type ------------- | ------------- -`column` | string -`dataset` | string -`limit` | number - -## Example - -```typescript -import type { LookupValuesIn } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "column": null, - "dataset": null, - "limit": null, -} satisfies LookupValuesIn - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as LookupValuesIn -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/LookupValuesOut.md b/sdk/typescript/docs/LookupValuesOut.md deleted file mode 100644 index b1da7c1..0000000 --- a/sdk/typescript/docs/LookupValuesOut.md +++ /dev/null @@ -1,36 +0,0 @@ - -# LookupValuesOut - - -## Properties - -Name | Type ------------- | ------------- -`column` | string -`dataset` | string -`values` | Array<any> - -## Example - -```typescript -import type { LookupValuesOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "column": null, - "dataset": null, - "values": null, -} satisfies LookupValuesOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as LookupValuesOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/McpOauthApi.md b/sdk/typescript/docs/McpOauthApi.md deleted file mode 100644 index 3d64089..0000000 --- a/sdk/typescript/docs/McpOauthApi.md +++ /dev/null @@ -1,133 +0,0 @@ -# McpOauthApi - -All URIs are relative to *https://api.agentdrive.run* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**oauth2RegisterOauth2RegisterPost**](McpOauthApi.md#oauth2registeroauth2registerpost) | **POST** /oauth2/register | Dynamic Client Registration (RFC 7591) | -| [**oauth2RevokeOauth2RevokePost**](McpOauthApi.md#oauth2revokeoauth2revokepost) | **POST** /oauth2/revoke | Token revocation (RFC 7009) | - - - -## oauth2RegisterOauth2RegisterPost - -> ClientRegistrationOut oauth2RegisterOauth2RegisterPost() - -Dynamic Client Registration (RFC 7591) - -Anonymous registration endpoint for MCP clients. Public clients only (PKCE, no client_secret). Returns the registered metadata plus the assigned `client_id`. Registration grants nothing by itself — every token still requires a user consent ceremony at /oauth2/authorize. - -### Example - -```ts -import { - Configuration, - McpOauthApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { Oauth2RegisterOauth2RegisterPostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const api = new McpOauthApi(); - - try { - const data = await api.oauth2RegisterOauth2RegisterPost(); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**ClientRegistrationOut**](ClientRegistrationOut.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **400** | Invalid client metadata. | * X-Request-Id - Request correlation identifier.
| -| **429** | Registration rate limit exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## oauth2RevokeOauth2RevokePost - -> object oauth2RevokeOauth2RevokePost() - -Token revocation (RFC 7009) - -Revokes an `adat_` access token (that token only) or an `adrt_` refresh token (the whole rotation chain). Unknown tokens return 200 per RFC 7009 §2.2 — existence is not revealed. Public-client endpoint auth (`client_id` form param, no secret). - -### Example - -```ts -import { - Configuration, - McpOauthApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { Oauth2RevokeOauth2RevokePostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const api = new McpOauthApi(); - - try { - const data = await api.oauth2RevokeOauth2RevokePost(); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -**object** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **400** | Invalid revocation request. | * X-Request-Id - Request correlation identifier.
| -| **401** | Client authentication failed. | * X-Request-Id - Request correlation identifier.
| -| **403** | Token type is unsupported. | * X-Request-Id - Request correlation identifier.
| -| **429** | Revocation rate limit exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/McpOauthUiApi.md b/sdk/typescript/docs/McpOauthUiApi.md deleted file mode 100644 index d07fb14..0000000 --- a/sdk/typescript/docs/McpOauthUiApi.md +++ /dev/null @@ -1,139 +0,0 @@ -# McpOauthUiApi - -All URIs are relative to *https://api.agentdrive.run* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**authorizeDecisionOauth2AuthorizePost**](McpOauthUiApi.md#authorizedecisionoauth2authorizepost) | **POST** /oauth2/authorize | Authorize Decision | -| [**authorizePageOauth2AuthorizeGet**](McpOauthUiApi.md#authorizepageoauth2authorizeget) | **GET** /oauth2/authorize | Authorize Page | - - - -## authorizeDecisionOauth2AuthorizePost - -> authorizeDecisionOauth2AuthorizePost(csrf) - -Authorize Decision - -### Example - -```ts -import { - Configuration, - McpOauthUiApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { AuthorizeDecisionOauth2AuthorizePostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const api = new McpOauthUiApi(); - - const body = { - // string - csrf: csrf_example, - } satisfies AuthorizeDecisionOauth2AuthorizePostRequest; - - try { - const data = await api.authorizeDecisionOauth2AuthorizePost(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **csrf** | `string` | | [Defaults to `undefined`] | - -### Return type - -`void` (Empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: `application/x-www-form-urlencoded` -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **302** | Redirect to the canonical or authentication URL. | * Location - Redirect target.
* X-Request-Id - Request correlation identifier.
| -| **303** | Continue after the form submission at the redirect target. | * Location - Redirect target.
* X-Request-Id - Request correlation identifier.
| -| **400** | The authorization decision or request is invalid. | * X-Request-Id - Request correlation identifier.
| -| **403** | The selected drive is unavailable or the browser CSRF check failed. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | Authorization rate limit exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## authorizePageOauth2AuthorizeGet - -> string authorizePageOauth2AuthorizeGet() - -Authorize Page - -### Example - -```ts -import { - Configuration, - McpOauthUiApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { AuthorizePageOauth2AuthorizeGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const api = new McpOauthUiApi(); - - try { - const data = await api.authorizePageOauth2AuthorizeGet(); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -**string** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `text/html`, `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **302** | Redirect to the canonical or authentication URL. | * Location - Redirect target.
* X-Request-Id - Request correlation identifier.
| -| **400** | The authorization request is invalid. | * X-Request-Id - Request correlation identifier.
| -| **429** | Authorization rate limit exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/MemberInviteIn.md b/sdk/typescript/docs/MemberInviteIn.md deleted file mode 100644 index c1b3b9e..0000000 --- a/sdk/typescript/docs/MemberInviteIn.md +++ /dev/null @@ -1,35 +0,0 @@ - -# MemberInviteIn - -POST /v0/members/invite body — invite a person by email. - -## Properties - -Name | Type ------------- | ------------- -`email` | string -`role` | string - -## Example - -```typescript -import type { MemberInviteIn } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "email": null, - "role": null, -} satisfies MemberInviteIn - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as MemberInviteIn -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/MemberList.md b/sdk/typescript/docs/MemberList.md deleted file mode 100644 index 75e9776..0000000 --- a/sdk/typescript/docs/MemberList.md +++ /dev/null @@ -1,34 +0,0 @@ - -# MemberList - - -## Properties - -Name | Type ------------- | ------------- -`items` | [Array<MemberOut>](MemberOut.md) -`nextCursor` | string - -## Example - -```typescript -import type { MemberList } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "items": null, - "nextCursor": null, -} satisfies MemberList - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as MemberList -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/MemberOut.md b/sdk/typescript/docs/MemberOut.md deleted file mode 100644 index fa32fd5..0000000 --- a/sdk/typescript/docs/MemberOut.md +++ /dev/null @@ -1,43 +0,0 @@ - -# MemberOut - -One live member of a workspace — metadata for the members page / `GET /v0/members`. - -## Properties - -Name | Type ------------- | ------------- -`createdAt` | Date -`email` | string -`firstName` | string -`lastName` | string -`role` | string -`userId` | string - -## Example - -```typescript -import type { MemberOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "createdAt": null, - "email": null, - "firstName": null, - "lastName": null, - "role": null, - "userId": null, -} satisfies MemberOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as MemberOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/MemberRemoveOut.md b/sdk/typescript/docs/MemberRemoveOut.md deleted file mode 100644 index 6d09c43..0000000 --- a/sdk/typescript/docs/MemberRemoveOut.md +++ /dev/null @@ -1,37 +0,0 @@ - -# MemberRemoveOut - -DELETE /v0/members/{user_id} response — the member-removal receipt. `id` is the removed user\'s id (replaces the ad-hoc `removed` key). - -## Properties - -Name | Type ------------- | ------------- -`id` | string -`ok` | boolean -`organizationId` | string - -## Example - -```typescript -import type { MemberRemoveOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "id": null, - "ok": null, - "organizationId": null, -} satisfies MemberRemoveOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as MemberRemoveOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/MemberRoleIn.md b/sdk/typescript/docs/MemberRoleIn.md deleted file mode 100644 index 3bb233b..0000000 --- a/sdk/typescript/docs/MemberRoleIn.md +++ /dev/null @@ -1,33 +0,0 @@ - -# MemberRoleIn - -PATCH /v0/members/{user} body — promote/demote a member. - -## Properties - -Name | Type ------------- | ------------- -`role` | string - -## Example - -```typescript -import type { MemberRoleIn } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "role": null, -} satisfies MemberRoleIn - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as MemberRoleIn -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/MembersApi.md b/sdk/typescript/docs/MembersApi.md deleted file mode 100644 index 34f7f2f..0000000 --- a/sdk/typescript/docs/MembersApi.md +++ /dev/null @@ -1,483 +0,0 @@ -# MembersApi - -All URIs are relative to *https://api.agentdrive.run* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**inviteMemberV0MembersInvitePost**](MembersApi.md#invitememberv0membersinvitepost) | **POST** /v0/members/invite | Invite a person to your workspace by email | -| [**listInvitationsV0InvitationsGet**](MembersApi.md#listinvitationsv0invitationsget) | **GET** /v0/invitations | List pending invitations | -| [**listMembersV0MembersGet**](MembersApi.md#listmembersv0membersget) | **GET** /v0/members | List the members of your active workspace | -| [**removeMemberV0MembersTargetUserIdDelete**](MembersApi.md#removememberv0memberstargetuseriddelete) | **DELETE** /v0/members/{target_user_id} | Remove a member (or leave) | -| [**revokeInvitationV0InvitationsInvitationIdDelete**](MembersApi.md#revokeinvitationv0invitationsinvitationiddelete) | **DELETE** /v0/invitations/{invitation_id} | Revoke a pending invitation | -| [**setMemberRoleV0MembersTargetUserIdPatch**](MembersApi.md#setmemberrolev0memberstargetuseridpatch) | **PATCH** /v0/members/{target_user_id} | Change a member\'s role | - - - -## inviteMemberV0MembersInvitePost - -> InviteCreateOut inviteMemberV0MembersInvitePost(memberInviteIn) - -Invite a person to your workspace by email - -Create a pending invitation in the caller\'s active workspace and enqueue the invite email. **Admin only**, `full` scope. Inviting an existing member is a no-op success (`already_member: true`). A duplicate pending invite for the same email returns 409 `INVITE_PENDING` (resend it from the members page). The raw invite token is delivered only by email — never in this response. - -### Example - -```ts -import { - Configuration, - MembersApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { InviteMemberV0MembersInvitePostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new MembersApi(config); - - const body = { - // MemberInviteIn - memberInviteIn: ..., - } satisfies InviteMemberV0MembersInvitePostRequest; - - try { - const data = await api.inviteMemberV0MembersInvitePost(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **memberInviteIn** | [MemberInviteIn](MemberInviteIn.md) | | | - -### Return type - -[**InviteCreateOut**](InviteCreateOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | Successful Response | * Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -| **400** | The email or role is invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **409** | The user is already a member or has a pending invitation. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## listInvitationsV0InvitationsGet - -> InvitationList listInvitationsV0InvitationsGet(cursor, limit) - -List pending invitations - -List the pending invitations for the caller\'s active workspace. **Admin only.** Metadata only — the raw invite token is never surfaced. Newest first (`created_at` descending, tie-broken by `id`). Paginated: `limit` is clamped to [1, 100] (default 50, never a 422); pass the response\'s `next_cursor` back as `cursor` for the next page (`null` when the listing is complete). - -### Example - -```ts -import { - Configuration, - MembersApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { ListInvitationsV0InvitationsGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new MembersApi(config); - - const body = { - // string (optional) - cursor: cursor_example, - // number (optional) - limit: 56, - } satisfies ListInvitationsV0InvitationsGetRequest; - - try { - const data = await api.listInvitationsV0InvitationsGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **cursor** | `string` | | [Optional] [Defaults to `undefined`] | -| **limit** | `number` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**InvitationList**](InvitationList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## listMembersV0MembersGet - -> MemberList listMembersV0MembersGet(cursor, limit) - -List the members of your active workspace - -List live members (email, role, joined-at) of the caller\'s active workspace. Any **member** may list; a `read`-scope token is sufficient. Ordered by join time (`created_at`, tie-broken by `user_id`) — **no role grouping is promised**; a dashboard that wants admins-first sorts client-side. Paginated: `limit` is clamped to [1, 100] (default 50, never a 422); pass the response\'s `next_cursor` back as `cursor` for the next page (`null` when the listing is complete). - -### Example - -```ts -import { - Configuration, - MembersApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { ListMembersV0MembersGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new MembersApi(config); - - const body = { - // string (optional) - cursor: cursor_example, - // number (optional) - limit: 56, - } satisfies ListMembersV0MembersGetRequest; - - try { - const data = await api.listMembersV0MembersGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **cursor** | `string` | | [Optional] [Defaults to `undefined`] | -| **limit** | `number` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**MemberList**](MemberList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## removeMemberV0MembersTargetUserIdDelete - -> MemberRemoveOut removeMemberV0MembersTargetUserIdDelete(targetUserId, confirm) - -Remove a member (or leave) - -Remove a member from the caller\'s active workspace, soft-deleting every drive that member owns there (workspaces-design §4.4 — no ownership transfer in v0; their `ad_live_` keys then stop working). **Admin** may remove anyone; **any member** may remove themselves (self-leave). `full` scope. Removing the **last/sole admin** is rejected with 409 `LAST_ADMIN` (promote someone first, or delete the workspace). **Explicit confirmation required:** pass `?confirm=DELETE` or the request is rejected with 400 `CONFIRM_REQUIRED` — removal cascades a soft-delete of every drive the member owns, so it carries tenant-level blast radius (uniform with `DELETE /v0/drives/{id}`). Deliberately takes NO `If-Match`: membership rows carry no generation/metageneration axis to pin (there is no ETag to echo), so `?confirm=DELETE` is the sole mutation guard here. - -### Example - -```ts -import { - Configuration, - MembersApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { RemoveMemberV0MembersTargetUserIdDeleteRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new MembersApi(config); - - const body = { - // string - targetUserId: targetUserId_example, - // string (optional) - confirm: confirm_example, - } satisfies RemoveMemberV0MembersTargetUserIdDeleteRequest; - - try { - const data = await api.removeMemberV0MembersTargetUserIdDelete(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **targetUserId** | `string` | | [Defaults to `undefined`] | -| **confirm** | `string` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**MemberRemoveOut**](MemberRemoveOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The member does not exist in this workspace. | * X-Request-Id - Request correlation identifier.
| -| **409** | The removal would violate workspace ownership requirements. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## revokeInvitationV0InvitationsInvitationIdDelete - -> RevokeOut revokeInvitationV0InvitationsInvitationIdDelete(invitationId) - -Revoke a pending invitation - -Revoke a pending invitation in the caller\'s active workspace. **Admin only**, `full` scope. Org-scoped + idempotent: `revoked` is a COUNT — 1 when a live invite was revoked, 0 when it was already gone (a forged id, an invite from another workspace, or an already-consumed invite all return `revoked: 0`, no-leak). - -### Example - -```ts -import { - Configuration, - MembersApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { RevokeInvitationV0InvitationsInvitationIdDeleteRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new MembersApi(config); - - const body = { - // string - invitationId: invitationId_example, - } satisfies RevokeInvitationV0InvitationsInvitationIdDeleteRequest; - - try { - const data = await api.revokeInvitationV0InvitationsInvitationIdDelete(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **invitationId** | `string` | | [Defaults to `undefined`] | - -### Return type - -[**RevokeOut**](RevokeOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The invitation does not exist in this workspace. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## setMemberRoleV0MembersTargetUserIdPatch - -> MemberOut setMemberRoleV0MembersTargetUserIdPatch(targetUserId, memberRoleIn) - -Change a member\'s role - -Promote/demote a member in the caller\'s active workspace. **Admin only**, `full` scope. Demoting the workspace\'s **last admin** is rejected with 409 `LAST_ADMIN` (promote someone first). - -### Example - -```ts -import { - Configuration, - MembersApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { SetMemberRoleV0MembersTargetUserIdPatchRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new MembersApi(config); - - const body = { - // string - targetUserId: targetUserId_example, - // MemberRoleIn - memberRoleIn: ..., - } satisfies SetMemberRoleV0MembersTargetUserIdPatchRequest; - - try { - const data = await api.setMemberRoleV0MembersTargetUserIdPatch(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **targetUserId** | `string` | | [Defaults to `undefined`] | -| **memberRoleIn** | [MemberRoleIn](MemberRoleIn.md) | | | - -### Return type - -[**MemberOut**](MemberOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **400** | The membership update is invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The member does not exist in this workspace. | * X-Request-Id - Request correlation identifier.
| -| **409** | The update would violate workspace ownership requirements. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/OAuthProtocolErrorOut.md b/sdk/typescript/docs/OAuthProtocolErrorOut.md deleted file mode 100644 index 748d167..0000000 --- a/sdk/typescript/docs/OAuthProtocolErrorOut.md +++ /dev/null @@ -1,35 +0,0 @@ - -# OAuthProtocolErrorOut - -RFC OAuth error shape used by public protocol endpoints. - -## Properties - -Name | Type ------------- | ------------- -`error` | string -`errorDescription` | string - -## Example - -```typescript -import type { OAuthProtocolErrorOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "error": null, - "errorDescription": null, -} satisfies OAuthProtocolErrorOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as OAuthProtocolErrorOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/OperationUsageOut.md b/sdk/typescript/docs/OperationUsageOut.md deleted file mode 100644 index c952964..0000000 --- a/sdk/typescript/docs/OperationUsageOut.md +++ /dev/null @@ -1,34 +0,0 @@ - -# OperationUsageOut - - -## Properties - -Name | Type ------------- | ------------- -`reads` | number -`writes` | number - -## Example - -```typescript -import type { OperationUsageOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "reads": null, - "writes": null, -} satisfies OperationUsageOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as OperationUsageOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/Page.md b/sdk/typescript/docs/Page.md deleted file mode 100644 index af45db4..0000000 --- a/sdk/typescript/docs/Page.md +++ /dev/null @@ -1,34 +0,0 @@ - -# Page - - -## Properties - -Name | Type ------------- | ------------- -`items` | [Array<ArtifactOut>](ArtifactOut.md) -`nextCursor` | string - -## Example - -```typescript -import type { Page } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "items": null, - "nextCursor": null, -} satisfies Page - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as Page -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ProjectConfigIn.md b/sdk/typescript/docs/ProjectConfigIn.md deleted file mode 100644 index fa2002d..0000000 --- a/sdk/typescript/docs/ProjectConfigIn.md +++ /dev/null @@ -1,36 +0,0 @@ - -# ProjectConfigIn - - -## Properties - -Name | Type ------------- | ------------- -`autoCompile` | boolean -`engine` | string -`entrypoint` | string - -## Example - -```typescript -import type { ProjectConfigIn } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "autoCompile": null, - "engine": null, - "entrypoint": null, -} satisfies ProjectConfigIn - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as ProjectConfigIn -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ProtectedResourceMetadataOut.md b/sdk/typescript/docs/ProtectedResourceMetadataOut.md deleted file mode 100644 index 42b937d..0000000 --- a/sdk/typescript/docs/ProtectedResourceMetadataOut.md +++ /dev/null @@ -1,38 +0,0 @@ - -# ProtectedResourceMetadataOut - - -## Properties - -Name | Type ------------- | ------------- -`authorizationServers` | Array<string> -`bearerMethodsSupported` | Array<string> -`resource` | string -`scopesSupported` | Array<string> - -## Example - -```typescript -import type { ProtectedResourceMetadataOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "authorizationServers": null, - "bearerMethodsSupported": null, - "resource": null, - "scopesSupported": null, -} satisfies ProtectedResourceMetadataOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as ProtectedResourceMetadataOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/QueryColumnOut.md b/sdk/typescript/docs/QueryColumnOut.md deleted file mode 100644 index 2e966ed..0000000 --- a/sdk/typescript/docs/QueryColumnOut.md +++ /dev/null @@ -1,34 +0,0 @@ - -# QueryColumnOut - - -## Properties - -Name | Type ------------- | ------------- -`name` | string -`type` | string - -## Example - -```typescript -import type { QueryColumnOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "name": null, - "type": null, -} satisfies QueryColumnOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as QueryColumnOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/QueryDryRunOut.md b/sdk/typescript/docs/QueryDryRunOut.md deleted file mode 100644 index 71d333a..0000000 --- a/sdk/typescript/docs/QueryDryRunOut.md +++ /dev/null @@ -1,40 +0,0 @@ - -# QueryDryRunOut - - -## Properties - -Name | Type ------------- | ------------- -`dryRun` | boolean -`engine` | string -`estimatedBytesProcessed` | number -`resultSchema` | [Array<QueryColumnOut>](QueryColumnOut.md) -`valid` | boolean - -## Example - -```typescript -import type { QueryDryRunOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "dryRun": null, - "engine": null, - "estimatedBytesProcessed": null, - "resultSchema": null, - "valid": null, -} satisfies QueryDryRunOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as QueryDryRunOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/QueryIn.md b/sdk/typescript/docs/QueryIn.md deleted file mode 100644 index 51cb6c2..0000000 --- a/sdk/typescript/docs/QueryIn.md +++ /dev/null @@ -1,36 +0,0 @@ - -# QueryIn - - -## Properties - -Name | Type ------------- | ------------- -`dryRun` | boolean -`inputs` | { [key: string]: string; } -`sql` | string - -## Example - -```typescript -import type { QueryIn } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "dryRun": null, - "inputs": null, - "sql": null, -} satisfies QueryIn - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as QueryIn -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/QueryResultOut.md b/sdk/typescript/docs/QueryResultOut.md deleted file mode 100644 index 1fb5dd4..0000000 --- a/sdk/typescript/docs/QueryResultOut.md +++ /dev/null @@ -1,44 +0,0 @@ - -# QueryResultOut - - -## Properties - -Name | Type ------------- | ------------- -`bytesProcessed` | number -`cacheHit` | boolean -`engine` | string -`preview` | Array<{ [key: string]: any; } | null> -`resultArtId` | string -`resultSchema` | [Array<QueryColumnOut>](QueryColumnOut.md) -`rowCount` | number - -## Example - -```typescript -import type { QueryResultOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "bytesProcessed": null, - "cacheHit": null, - "engine": null, - "preview": null, - "resultArtId": null, - "resultSchema": null, - "rowCount": null, -} satisfies QueryResultOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as QueryResultOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/RegisterAgentIdentityAgentIdentityPost422Response.md b/sdk/typescript/docs/RegisterAgentIdentityAgentIdentityPost422Response.md deleted file mode 100644 index 31cf916..0000000 --- a/sdk/typescript/docs/RegisterAgentIdentityAgentIdentityPost422Response.md +++ /dev/null @@ -1,32 +0,0 @@ - -# RegisterAgentIdentityAgentIdentityPost422Response - - -## Properties - -Name | Type ------------- | ------------- -`detail` | [ErrorDetail](ErrorDetail.md) - -## Example - -```typescript -import type { RegisterAgentIdentityAgentIdentityPost422Response } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "detail": null, -} satisfies RegisterAgentIdentityAgentIdentityPost422Response - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as RegisterAgentIdentityAgentIdentityPost422Response -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ResponsePostQueryV0QueryPost.md b/sdk/typescript/docs/ResponsePostQueryV0QueryPost.md deleted file mode 100644 index a2f8ef1..0000000 --- a/sdk/typescript/docs/ResponsePostQueryV0QueryPost.md +++ /dev/null @@ -1,50 +0,0 @@ - -# ResponsePostQueryV0QueryPost - - -## Properties - -Name | Type ------------- | ------------- -`dryRun` | boolean -`engine` | string -`estimatedBytesProcessed` | number -`resultSchema` | [Array<QueryColumnOut>](QueryColumnOut.md) -`valid` | boolean -`bytesProcessed` | number -`cacheHit` | boolean -`preview` | Array<{ [key: string]: any; }> -`resultArtId` | string -`rowCount` | number - -## Example - -```typescript -import type { ResponsePostQueryV0QueryPost } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "dryRun": null, - "engine": null, - "estimatedBytesProcessed": null, - "resultSchema": null, - "valid": null, - "bytesProcessed": null, - "cacheHit": null, - "preview": null, - "resultArtId": null, - "rowCount": null, -} satisfies ResponsePostQueryV0QueryPost - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as ResponsePostQueryV0QueryPost -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/RevokeOut.md b/sdk/typescript/docs/RevokeOut.md deleted file mode 100644 index c426366..0000000 --- a/sdk/typescript/docs/RevokeOut.md +++ /dev/null @@ -1,37 +0,0 @@ - -# RevokeOut - -DELETE /v0/grants/{grn_id}, DELETE /v0/shares/{shr_id}, DELETE /v0/invitations/{invitation_id} response — the unified revoke receipt. `revoked` is a COUNT: 1 when a live row was revoked, 0 when it was already gone (DELETE is idempotent). - -## Properties - -Name | Type ------------- | ------------- -`id` | string -`ok` | boolean -`revoked` | number - -## Example - -```typescript -import type { RevokeOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "id": null, - "ok": null, - "revoked": null, -} satisfies RevokeOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as RevokeOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/SearchApi.md b/sdk/typescript/docs/SearchApi.md new file mode 100644 index 0000000..44de16c --- /dev/null +++ b/sdk/typescript/docs/SearchApi.md @@ -0,0 +1,116 @@ +# SearchApi + +All URIs are relative to *https://api.agentdrive.run* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**driveSearch**](SearchApi.md#drivesearch) | **GET** /v0/drives/{drive_id}/search | Drive Search | + + + +## driveSearch + +> SearchPageOut driveSearch(driveId, q, mode, limit, cursor, parentId, contentType, label, updatedAfter, updatedBefore, authorization) + +Drive Search + +Search the drive\'s live artifacts. ``q`` is required and must be non-empty. ``mode`` selects the retrieval engine: ``lexical``, ``hybrid``, or ``semantic``. This deployment enables ``lexical`` only; requesting a disabled mode fails ``400 SEARCH_MODE_UNAVAILABLE``. Each hit\'s ``snippet`` is HTML-safe by contract: artifact content is entity-escaped and only the server\'s own ``<mark>``/``</mark>`` highlight pair survives, so a client may render it as HTML. + +### Example + +```ts +import { + Configuration, + SearchApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { DriveSearchRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new SearchApi(config); + + const body = { + // string + driveId: driveId_example, + // string + q: q_example, + // 'lexical' | 'hybrid' | 'semantic' (optional) + mode: mode_example, + // number (optional) + limit: 56, + // string (optional) + cursor: cursor_example, + // string (optional) + parentId: parentId_example, + // string (optional) + contentType: contentType_example, + // string (optional) + label: label_example, + // Date (optional) + updatedAfter: 2013-10-20T19:20:30+01:00, + // Date (optional) + updatedBefore: 2013-10-20T19:20:30+01:00, + // string (optional) + authorization: authorization_example, + } satisfies DriveSearchRequest; + + try { + const data = await api.driveSearch(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **q** | `string` | | [Defaults to `undefined`] | +| **mode** | `lexical`, `hybrid`, `semantic` | | [Optional] [Defaults to `'lexical'`] [Enum: lexical, hybrid, semantic] | +| **limit** | `number` | | [Optional] [Defaults to `undefined`] | +| **cursor** | `string` | | [Optional] [Defaults to `undefined`] | +| **parentId** | `string` | | [Optional] [Defaults to `undefined`] | +| **contentType** | `string` | | [Optional] [Defaults to `undefined`] | +| **label** | `string` | | [Optional] [Defaults to `undefined`] | +| **updatedAfter** | `Date` | | [Optional] [Defaults to `undefined`] | +| **updatedBefore** | `Date` | | [Optional] [Defaults to `undefined`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**SearchPageOut**](SearchPageOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). Requesting a disabled search mode fails with SEARCH_MODE_UNAVAILABLE. | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/SearchHitOut.md b/sdk/typescript/docs/SearchHitOut.md index cd8c5ae..0d4e709 100644 --- a/sdk/typescript/docs/SearchHitOut.md +++ b/sdk/typescript/docs/SearchHitOut.md @@ -6,17 +6,15 @@ Name | Type ------------ | ------------- -`artId` | string `contentType` | string `driveId` | string -`fileType` | string -`labels` | Array<string> -`path` | string -`score` | number +`id` | string +`name` | string +`parentId` | string +`rank` | number `snippet` | string `updatedAt` | Date -`url` | string -`versionNumber` | number +`versionId` | string ## Example @@ -25,17 +23,15 @@ import type { SearchHitOut } from '@mnexa-ai/agentdrive-sdk' // TODO: Update the object below with actual values const example = { - "artId": null, "contentType": null, "driveId": null, - "fileType": null, - "labels": null, - "path": null, - "score": null, + "id": null, + "name": null, + "parentId": null, + "rank": null, "snippet": null, "updatedAt": null, - "url": null, - "versionNumber": null, + "versionId": null, } satisfies SearchHitOut console.log(example) diff --git a/sdk/typescript/docs/SearchPage.md b/sdk/typescript/docs/SearchPage.md deleted file mode 100644 index 42522eb..0000000 --- a/sdk/typescript/docs/SearchPage.md +++ /dev/null @@ -1,33 +0,0 @@ - -# SearchPage - -`/v0/search` response — single-shot top-N, deliberately unpaginated. Ranked retrieval doesn\'t paginate meaningfully (the industry norm: vector/RAG APIs are pure top-K; Algolia/GitHub cap ranked results outright) — the correct \"next page\" of a relevance-ranked list is a narrower query. Raise `limit` (≤100) for more hits. A `next_cursor` field advertised here in the past was structurally always null and was dropped; if deep retrieval is ever needed, an ES-`search_after` style `(score, id)` keyset can be re-added additively. - -## Properties - -Name | Type ------------- | ------------- -`items` | [Array<SearchHitOut>](SearchHitOut.md) - -## Example - -```typescript -import type { SearchPage } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "items": null, -} satisfies SearchPage - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as SearchPage -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/SearchPageOut.md b/sdk/typescript/docs/SearchPageOut.md new file mode 100644 index 0000000..ca76912 --- /dev/null +++ b/sdk/typescript/docs/SearchPageOut.md @@ -0,0 +1,34 @@ + +# SearchPageOut + + +## Properties + +Name | Type +------------ | ------------- +`items` | [Array<SearchHitOut>](SearchHitOut.md) +`nextCursor` | string + +## Example + +```typescript +import type { SearchPageOut } from '@mnexa-ai/agentdrive-sdk' + +// TODO: Update the object below with actual values +const example = { + "items": null, + "nextCursor": null, +} satisfies SearchPageOut + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as SearchPageOut +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ShareCreateIn.md b/sdk/typescript/docs/ShareCreateIn.md index af12da2..18751fe 100644 --- a/sdk/typescript/docs/ShareCreateIn.md +++ b/sdk/typescript/docs/ShareCreateIn.md @@ -1,16 +1,15 @@ # ShareCreateIn -POST /v0/shares body. `resource` is an `art_*`/`fld_*` id or a path. `expires_in` is seconds from now (omit for the default: none for a human creator, a short TTL for an agent). `password` (optional) gates redemption. +POST /v0/drives/{id}/shares body. ## Properties Name | Type ------------ | ------------- -`expiresIn` | number -`password` | string -`resource` | string -`role` | string +`expiresAt` | Date +`resourceId` | string +`resourceType` | string ## Example @@ -19,10 +18,9 @@ import type { ShareCreateIn } from '@mnexa-ai/agentdrive-sdk' // TODO: Update the object below with actual values const example = { - "expiresIn": null, - "password": null, - "resource": null, - "role": null, + "expiresAt": null, + "resourceId": null, + "resourceType": null, } satisfies ShareCreateIn console.log(example) diff --git a/sdk/typescript/docs/ShareCreateOut.md b/sdk/typescript/docs/ShareCreateOut.md new file mode 100644 index 0000000..7b2b431 --- /dev/null +++ b/sdk/typescript/docs/ShareCreateOut.md @@ -0,0 +1,55 @@ + +# ShareCreateOut + +The create/rotate response — the ONLY response carrying the plaintext secret. + +## Properties + +Name | Type +------------ | ------------- +`createdAt` | Date +`createdBy` | string +`driveId` | string +`expiresAt` | Date +`id` | string +`resourceId` | string +`resourceType` | string +`revision` | string +`revokedAt` | Date +`rotatedAt` | Date +`secret` | string +`state` | string + +## Example + +```typescript +import type { ShareCreateOut } from '@mnexa-ai/agentdrive-sdk' + +// TODO: Update the object below with actual values +const example = { + "createdAt": null, + "createdBy": null, + "driveId": null, + "expiresAt": null, + "id": null, + "resourceId": null, + "resourceType": null, + "revision": null, + "revokedAt": null, + "rotatedAt": null, + "secret": null, + "state": null, +} satisfies ShareCreateOut + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ShareCreateOut +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ShareErrorOut.md b/sdk/typescript/docs/ShareErrorOut.md deleted file mode 100644 index fd42ac1..0000000 --- a/sdk/typescript/docs/ShareErrorOut.md +++ /dev/null @@ -1,33 +0,0 @@ - -# ShareErrorOut - -Negotiated JSON error shape for the public share protocol. - -## Properties - -Name | Type ------------- | ------------- -`error` | [ErrorBody](ErrorBody.md) - -## Example - -```typescript -import type { ShareErrorOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "error": null, -} satisfies ShareErrorOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as ShareErrorOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ShareList.md b/sdk/typescript/docs/ShareList.md deleted file mode 100644 index 136b1d0..0000000 --- a/sdk/typescript/docs/ShareList.md +++ /dev/null @@ -1,34 +0,0 @@ - -# ShareList - - -## Properties - -Name | Type ------------- | ------------- -`items` | [Array<ShareOut>](ShareOut.md) -`nextCursor` | string - -## Example - -```typescript -import type { ShareList } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "items": null, - "nextCursor": null, -} satisfies ShareList - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as ShareList -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ShareListOut.md b/sdk/typescript/docs/ShareListOut.md new file mode 100644 index 0000000..352181a --- /dev/null +++ b/sdk/typescript/docs/ShareListOut.md @@ -0,0 +1,34 @@ + +# ShareListOut + + +## Properties + +Name | Type +------------ | ------------- +`items` | [Array<ShareOut>](ShareOut.md) +`nextCursor` | string + +## Example + +```typescript +import type { ShareListOut } from '@mnexa-ai/agentdrive-sdk' + +// TODO: Update the object below with actual values +const example = { + "items": null, + "nextCursor": null, +} satisfies ShareListOut + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ShareListOut +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ShareMintOut.md b/sdk/typescript/docs/ShareMintOut.md deleted file mode 100644 index 139058e..0000000 --- a/sdk/typescript/docs/ShareMintOut.md +++ /dev/null @@ -1,55 +0,0 @@ - -# ShareMintOut - -The create/rotate response — the ONLY place the `share_key` and its redemption `url` are exposed. - -## Properties - -Name | Type ------------- | ------------- -`accessCount` | number -`audience` | string -`createdAt` | Date -`expiresAt` | Date -`hasPassword` | boolean -`id` | string -`lastAccessedAt` | Date -`resourceId` | string -`resourceType` | string -`role` | string -`shareKey` | string -`url` | string - -## Example - -```typescript -import type { ShareMintOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "accessCount": null, - "audience": null, - "createdAt": null, - "expiresAt": null, - "hasPassword": null, - "id": null, - "lastAccessedAt": null, - "resourceId": null, - "resourceType": null, - "role": null, - "shareKey": null, - "url": null, -} satisfies ShareMintOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as ShareMintOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ShareOut.md b/sdk/typescript/docs/ShareOut.md index cf03dac..8ea2f4b 100644 --- a/sdk/typescript/docs/ShareOut.md +++ b/sdk/typescript/docs/ShareOut.md @@ -1,22 +1,22 @@ # ShareOut -A live share link as seen on list/management — NEVER carries the `share_key` (that is the credential, returned only at mint/rotate). ## Properties Name | Type ------------ | ------------- -`accessCount` | number -`audience` | string `createdAt` | Date +`createdBy` | string +`driveId` | string `expiresAt` | Date -`hasPassword` | boolean `id` | string -`lastAccessedAt` | Date `resourceId` | string `resourceType` | string -`role` | string +`revision` | string +`revokedAt` | Date +`rotatedAt` | Date +`state` | string ## Example @@ -25,16 +25,17 @@ import type { ShareOut } from '@mnexa-ai/agentdrive-sdk' // TODO: Update the object below with actual values const example = { - "accessCount": null, - "audience": null, "createdAt": null, + "createdBy": null, + "driveId": null, "expiresAt": null, - "hasPassword": null, "id": null, - "lastAccessedAt": null, "resourceId": null, "resourceType": null, - "role": null, + "revision": null, + "revokedAt": null, + "rotatedAt": null, + "state": null, } satisfies ShareOut console.log(example) diff --git a/sdk/typescript/docs/ShareRedeemOut.md b/sdk/typescript/docs/ShareRedeemOut.md deleted file mode 100644 index 01515ea..0000000 --- a/sdk/typescript/docs/ShareRedeemOut.md +++ /dev/null @@ -1,38 +0,0 @@ - -# ShareRedeemOut - - -## Properties - -Name | Type ------------- | ------------- -`expiresAt` | Date -`role` | string -`token` | string -`url` | string - -## Example - -```typescript -import type { ShareRedeemOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "expiresAt": null, - "role": null, - "token": null, - "url": null, -} satisfies ShareRedeemOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as ShareRedeemOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/SharesApi.md b/sdk/typescript/docs/SharesApi.md new file mode 100644 index 0000000..47f7838 --- /dev/null +++ b/sdk/typescript/docs/SharesApi.md @@ -0,0 +1,472 @@ +# SharesApi + +All URIs are relative to *https://api.agentdrive.run* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**sharesCreate**](SharesApi.md#sharescreate) | **POST** /v0/drives/{drive_id}/shares | Create Share | +| [**sharesList**](SharesApi.md#shareslist) | **GET** /v0/drives/{drive_id}/shares | List Shares | +| [**sharesRead**](SharesApi.md#sharesread) | **GET** /v0/drives/{drive_id}/shares/{share_id} | Read Share | +| [**sharesRevoke**](SharesApi.md#sharesrevoke) | **DELETE** /v0/drives/{drive_id}/shares/{share_id} | Revoke Share | +| [**sharesRotate**](SharesApi.md#sharesrotate) | **POST** /v0/drives/{drive_id}/shares/{share_id}/rotate | Rotate Share | + + + +## sharesCreate + +> ShareCreateOut sharesCreate(driveId, idempotencyKey, shareCreateIn, authorization) + +Create Share + +Mint a read-only bearer link. The response carries the plaintext secret — the only response that does. + +### Example + +```ts +import { + Configuration, + SharesApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { SharesCreateRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new SharesApi(config); + + const body = { + // string + driveId: driveId_example, + // string + idempotencyKey: idempotencyKey_example, + // ShareCreateIn + shareCreateIn: ..., + // string (optional) + authorization: authorization_example, + } satisfies SharesCreateRequest; + + try { + const data = await api.sharesCreate(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **idempotencyKey** | `string` | | [Defaults to `undefined`] | +| **shareCreateIn** | [ShareCreateIn](ShareCreateIn.md) | | | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**ShareCreateOut**](ShareCreateOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `application/json` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Successful Response | * ETag - Current strong entity tag.
* Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The parent or target resource was not found or is not visible. | * X-Request-Id - Request correlation identifier.
| +| **409** | A sibling already occupies the name/path, or the idempotency key was reused for a different request. | * X-Request-Id - Request correlation identifier.
| +| **412** | If-Match did not match (copy/restore preconditions). | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **428** | If-Match is required for this mutation. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## sharesList + +> ShareListOut sharesList(driveId, lifecycle, limit, cursor, resourceType, resourceId, authorization) + +List Shares + +List the drive\'s shares (no secrets), keyset paginated. ``resource_id`` narrows the page to one resource\'s links and REQUIRES ``resource_type`` alongside it — a bare resource id is ambiguous across ``artifact`` / ``artifact_version`` / ``folder``, and inferring the kind from the id prefix would tie the filter\'s meaning to an id format the contract does not promise to keep. ``resource_type`` alone is a valid filter. Listing shares already requires drive ``manager``, so these filters only narrow a page the caller could already read in full. + +### Example + +```ts +import { + Configuration, + SharesApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { SharesListRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new SharesApi(config); + + const body = { + // string + driveId: driveId_example, + // string (optional) + lifecycle: lifecycle_example, + // number (optional) + limit: 56, + // string (optional) + cursor: cursor_example, + // string (optional) + resourceType: resourceType_example, + // string (optional) + resourceId: resourceId_example, + // string (optional) + authorization: authorization_example, + } satisfies SharesListRequest; + + try { + const data = await api.sharesList(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **lifecycle** | `string` | | [Optional] [Defaults to `'active'`] | +| **limit** | `number` | | [Optional] [Defaults to `undefined`] | +| **cursor** | `string` | | [Optional] [Defaults to `undefined`] | +| **resourceType** | `string` | | [Optional] [Defaults to `undefined`] | +| **resourceId** | `string` | | [Optional] [Defaults to `undefined`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**ShareListOut**](ShareListOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## sharesRead + +> ShareOut sharesRead(driveId, shareId, ifNoneMatch, authorization) + +Read Share + +Read one share\'s management representation (no secret). + +### Example + +```ts +import { + Configuration, + SharesApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { SharesReadRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new SharesApi(config); + + const body = { + // string + driveId: driveId_example, + // string + shareId: shareId_example, + // string (optional) + ifNoneMatch: ifNoneMatch_example, + // string (optional) + authorization: authorization_example, + } satisfies SharesReadRequest; + + try { + const data = await api.sharesRead(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **shareId** | `string` | | [Defaults to `undefined`] | +| **ifNoneMatch** | `string` | | [Optional] [Defaults to `undefined`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**ShareOut**](ShareOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **304** | If-None-Match matched the current ETag. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## sharesRevoke + +> ShareOut sharesRevoke(driveId, shareId, idempotencyKey, ifMatch, authorization) + +Revoke Share + +Revoke a share (soft, sets revoked_at) under If-Match. + +### Example + +```ts +import { + Configuration, + SharesApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { SharesRevokeRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new SharesApi(config); + + const body = { + // string + driveId: driveId_example, + // string + shareId: shareId_example, + // string + idempotencyKey: idempotencyKey_example, + // string + ifMatch: ifMatch_example, + // string (optional) + authorization: authorization_example, + } satisfies SharesRevokeRequest; + + try { + const data = await api.sharesRevoke(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **shareId** | `string` | | [Defaults to `undefined`] | +| **idempotencyKey** | `string` | | [Defaults to `undefined`] | +| **ifMatch** | `string` | | [Defaults to `undefined`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**ShareOut**](ShareOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| +| **409** | The mutation conflicts with current state (name/path, lifecycle). | * X-Request-Id - Request correlation identifier.
| +| **412** | If-Match did not match the resource\'s current revision. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **428** | If-Match is required for this mutation. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## sharesRotate + +> ShareCreateOut sharesRotate(driveId, shareId, idempotencyKey, ifMatch, authorization) + +Rotate Share + +Rotate the secret in place (same id, no grace window). The response carries the new plaintext secret. + +### Example + +```ts +import { + Configuration, + SharesApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { SharesRotateRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new SharesApi(config); + + const body = { + // string + driveId: driveId_example, + // string + shareId: shareId_example, + // string + idempotencyKey: idempotencyKey_example, + // string + ifMatch: ifMatch_example, + // string (optional) + authorization: authorization_example, + } satisfies SharesRotateRequest; + + try { + const data = await api.sharesRotate(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **shareId** | `string` | | [Defaults to `undefined`] | +| **idempotencyKey** | `string` | | [Defaults to `undefined`] | +| **ifMatch** | `string` | | [Defaults to `undefined`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**ShareCreateOut**](ShareCreateOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| +| **409** | The mutation conflicts with current state (name/path, lifecycle). | * X-Request-Id - Request correlation identifier.
| +| **412** | If-Match did not match the resource\'s current revision. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **428** | If-Match is required for this mutation. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/SharesRedemptionApi.md b/sdk/typescript/docs/SharesRedemptionApi.md new file mode 100644 index 0000000..dcfc044 --- /dev/null +++ b/sdk/typescript/docs/SharesRedemptionApi.md @@ -0,0 +1,76 @@ +# SharesRedemptionApi + +All URIs are relative to *https://api.agentdrive.run* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**sharesRedeem**](SharesRedemptionApi.md#sharesredeem) | **GET** /s/{share_key} | Redeem Share | + + + +## sharesRedeem + +> any sharesRedeem(shareKey) + +Redeem Share + +The un-slashed form. Browsers are canonicalized onto `/s/{key}/`. This inherits the published `shares_redeem` operation id from the route it replaced, because for an API client it *is* that operation, unchanged: same URL, same JSON `Accept`, same bytes, same uniform 404. Only the browser arm is new. Dropping it from the spec would have described the route as gone while it kept answering. The page links its own sub-resources relatively (`content`), and relative resolution replaces the last path segment: from `/s/KEY` that reaches `/s/content`, from `/s/KEY/` it reaches `/s/KEY/content`. The trailing slash is what makes an image on a share page load at all. Links already in the wild have no slash, so this redirect is how they keep working. It is unconditional and runs before any lookup — redirecting only for keys that resolve would turn the status code into an existence oracle and undo the anti-enumeration property the rest of this module maintains. Only browsers are moved. JSON and byte clients are answered in place, so the shipped v0 contract for this URL is unchanged, redirect included. + +### Example + +```ts +import { + Configuration, + SharesRedemptionApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { SharesRedeemRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const api = new SharesRedemptionApi(); + + const body = { + // string + shareKey: shareKey_example, + } satisfies SharesRedeemRequest; + + try { + const data = await api.sharesRedeem(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **shareKey** | `string` | | [Defaults to `undefined`] | + +### Return type + +**any** + +### Authorization + +No authorization required + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/SourceRef.md b/sdk/typescript/docs/SourceRef.md deleted file mode 100644 index 70fb6b1..0000000 --- a/sdk/typescript/docs/SourceRef.md +++ /dev/null @@ -1,37 +0,0 @@ - -# SourceRef - -One typed provenance ref. `type` is open-vocabulary (server validates only length, not the value), so callers can declare new types as their integrations evolve. `id` is the type-specific identifier — for `type=\'artifact\'` this is an `art_…` ID. - -## Properties - -Name | Type ------------- | ------------- -`id` | string -`metadata` | { [key: string]: any; } -`type` | string - -## Example - -```typescript -import type { SourceRef } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "id": null, - "metadata": null, - "type": null, -} satisfies SourceRef - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as SourceRef -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/StorageBreakdownOut.md b/sdk/typescript/docs/StorageBreakdownOut.md deleted file mode 100644 index 1aba8de..0000000 --- a/sdk/typescript/docs/StorageBreakdownOut.md +++ /dev/null @@ -1,38 +0,0 @@ - -# StorageBreakdownOut - - -## Properties - -Name | Type ------------- | ------------- -`asOf` | Date -`liveBytes` | number -`trashBytes` | number -`versionBytes` | number - -## Example - -```typescript -import type { StorageBreakdownOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "asOf": null, - "liveBytes": null, - "trashBytes": null, - "versionBytes": null, -} satisfies StorageBreakdownOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as StorageBreakdownOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/StorageFootprintOut.md b/sdk/typescript/docs/StorageFootprintOut.md deleted file mode 100644 index 0b49e5a..0000000 --- a/sdk/typescript/docs/StorageFootprintOut.md +++ /dev/null @@ -1,40 +0,0 @@ - -# StorageFootprintOut - - -## Properties - -Name | Type ------------- | ------------- -`asOf` | Date -`liveBytes` | number -`totalBytes` | number -`trashBytes` | number -`versionBytes` | number - -## Example - -```typescript -import type { StorageFootprintOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "asOf": null, - "liveBytes": null, - "totalBytes": null, - "trashBytes": null, - "versionBytes": null, -} satisfies StorageFootprintOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as StorageFootprintOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/TokenResponse.md b/sdk/typescript/docs/TokenResponse.md deleted file mode 100644 index 5e9ee55..0000000 --- a/sdk/typescript/docs/TokenResponse.md +++ /dev/null @@ -1,41 +0,0 @@ - -# TokenResponse - -`POST /oauth2/token` success response. Mirrors RFC 6749 with an optional `identity_assertion` field for the claim grant path (where a fresh post-claim assertion supersedes the pre-claim one). - -## Properties - -Name | Type ------------- | ------------- -`accessToken` | string -`expiresIn` | number -`identityAssertion` | string -`scope` | string -`tokenType` | string - -## Example - -```typescript -import type { TokenResponse } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "accessToken": null, - "expiresIn": null, - "identityAssertion": null, - "scope": null, - "tokenType": null, -} satisfies TokenResponse - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as TokenResponse -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/TokenUsageOut.md b/sdk/typescript/docs/TokenUsageOut.md deleted file mode 100644 index 5f90a7f..0000000 --- a/sdk/typescript/docs/TokenUsageOut.md +++ /dev/null @@ -1,38 +0,0 @@ - -# TokenUsageOut - - -## Properties - -Name | Type ------------- | ------------- -`embed` | number -`llmCached` | number -`llmInput` | number -`llmOutput` | number - -## Example - -```typescript -import type { TokenUsageOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "embed": null, - "llmCached": null, - "llmInput": null, - "llmOutput": null, -} satisfies TokenUsageOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as TokenUsageOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/TokensApi.md b/sdk/typescript/docs/TokensApi.md deleted file mode 100644 index 809faa3..0000000 --- a/sdk/typescript/docs/TokensApi.md +++ /dev/null @@ -1,163 +0,0 @@ -# TokensApi - -All URIs are relative to *https://api.agentdrive.run* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**listTokensV0TokensGet**](TokensApi.md#listtokensv0tokensget) | **GET** /v0/tokens | List your user-identity tokens | -| [**revokeTokenV0TokensTokenIdRevokePost**](TokensApi.md#revoketokenv0tokenstokenidrevokepost) | **POST** /v0/tokens/{token_id}/revoke | Revoke one of your user-identity tokens | - - - -## listTokensV0TokensGet - -> UserTokenList listTokensV0TokensGet(cursor, limit) - -List your user-identity tokens - -List the `ad_user_` tokens belonging to the authenticated user. Metadata only — the raw token is shown once at mint (web only) and is never returned here. Includes recently-revoked tokens (with `revoked_at` set) so the caller can audit them; newest first. **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=<token>` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - -### Example - -```ts -import { - Configuration, - TokensApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { ListTokensV0TokensGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new TokensApi(config); - - const body = { - // string (optional) - cursor: cursor_example, - // number (optional) - limit: 56, - } satisfies ListTokensV0TokensGetRequest; - - try { - const data = await api.listTokensV0TokensGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **cursor** | `string` | | [Optional] [Defaults to `undefined`] | -| **limit** | `number` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**UserTokenList**](UserTokenList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## revokeTokenV0TokensTokenIdRevokePost - -> UserTokenOut revokeTokenV0TokensTokenIdRevokePost(tokenId) - -Revoke one of your user-identity tokens - -Revoke a single `ad_user_` token by id. Scoped to the authenticated user: a token id that isn\'t yours returns 404 (no-leak). Idempotent — revoking an already-revoked token also returns 404 (it is no longer a live token of yours to revoke). On success the revoked token\'s metadata is returned with `revoked_at` set. - -### Example - -```ts -import { - Configuration, - TokensApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { RevokeTokenV0TokensTokenIdRevokePostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new TokensApi(config); - - const body = { - // string - tokenId: tokenId_example, - } satisfies RevokeTokenV0TokensTokenIdRevokePostRequest; - - try { - const data = await api.revokeTokenV0TokensTokenIdRevokePost(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **tokenId** | `string` | | [Defaults to `undefined`] | - -### Return type - -[**UserTokenOut**](UserTokenOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The token does not exist for this user. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/TrashArtifactOut.md b/sdk/typescript/docs/TrashArtifactOut.md deleted file mode 100644 index 04d4947..0000000 --- a/sdk/typescript/docs/TrashArtifactOut.md +++ /dev/null @@ -1,42 +0,0 @@ - -# TrashArtifactOut - - -## Properties - -Name | Type ------------- | ------------- -`deletedAt` | Date -`id` | string -`path` | string -`purgeAt` | Date -`restoreUrl` | string -`sizeBytes` | number - -## Example - -```typescript -import type { TrashArtifactOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "deletedAt": null, - "id": null, - "path": null, - "purgeAt": null, - "restoreUrl": null, - "sizeBytes": null, -} satisfies TrashArtifactOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as TrashArtifactOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/TrashDriveOut.md b/sdk/typescript/docs/TrashDriveOut.md deleted file mode 100644 index a46aa3a..0000000 --- a/sdk/typescript/docs/TrashDriveOut.md +++ /dev/null @@ -1,34 +0,0 @@ - -# TrashDriveOut - - -## Properties - -Name | Type ------------- | ------------- -`deletedAt` | Date -`id` | string - -## Example - -```typescript -import type { TrashDriveOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "deletedAt": null, - "id": null, -} satisfies TrashDriveOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as TrashDriveOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/TrashOut.md b/sdk/typescript/docs/TrashOut.md deleted file mode 100644 index 70d5d03..0000000 --- a/sdk/typescript/docs/TrashOut.md +++ /dev/null @@ -1,39 +0,0 @@ - -# TrashOut - -Trash collection with a compatibility-preserving pagination opt-in. - -## Properties - -Name | Type ------------- | ------------- -`artifacts` | [Array<TrashArtifactOut>](TrashArtifactOut.md) -`drive` | [TrashDriveOut](TrashDriveOut.md) -`items` | [Array<TrashArtifactOut>](TrashArtifactOut.md) -`nextCursor` | string - -## Example - -```typescript -import type { TrashOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "artifacts": null, - "drive": null, - "items": null, - "nextCursor": null, -} satisfies TrashOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as TrashOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/UploadAbortOut.md b/sdk/typescript/docs/UploadAbortOut.md deleted file mode 100644 index 8f9e864..0000000 --- a/sdk/typescript/docs/UploadAbortOut.md +++ /dev/null @@ -1,37 +0,0 @@ - -# UploadAbortOut - -Response of `DELETE /v0/uploads/{upload_id}` — the session is released. `released_bytes` is the reservation returned to the drive\'s quota (the session\'s `size_bytes` for a live `initiated` session; `0` when the session was already aborted or already expired — the GC sweep owns an expired session\'s release). - -## Properties - -Name | Type ------------- | ------------- -`releasedBytes` | number -`state` | string -`uploadId` | string - -## Example - -```typescript -import type { UploadAbortOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "releasedBytes": null, - "state": null, - "uploadId": null, -} satisfies UploadAbortOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as UploadAbortOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/UploadBeginIn.md b/sdk/typescript/docs/UploadBeginIn.md deleted file mode 100644 index 1a02806..0000000 --- a/sdk/typescript/docs/UploadBeginIn.md +++ /dev/null @@ -1,55 +0,0 @@ - -# UploadBeginIn - -Body of `POST /v0/uploads` — the large-upload begin call (large-upload- design.md §5.1). All artifact decisions are frozen here; the subsequent GCS PUT carries only bytes, and `commit` carries only the `upload_id`. `labels`/`metadata`/`source` omitted (null) ⇒ preserve the existing artifact\'s value at commit; present (incl. empty) ⇒ replace. - -## Properties - -Name | Type ------------- | ------------- -`actorName` | string -`changeSummary` | string -`contentType` | string -`corsOrigin` | string -`crc32c` | string -`ifMatch` | number -`ifNoneMatch` | boolean -`labels` | Array<string> -`metadata` | { [key: string]: any; } -`path` | string -`sizeBytes` | number -`source` | [ArtifactSource](ArtifactSource.md) - -## Example - -```typescript -import type { UploadBeginIn } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "actorName": null, - "changeSummary": null, - "contentType": null, - "corsOrigin": null, - "crc32c": null, - "ifMatch": null, - "ifNoneMatch": null, - "labels": null, - "metadata": null, - "path": null, - "sizeBytes": null, - "source": null, -} satisfies UploadBeginIn - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as UploadBeginIn -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/UploadBeginOut.md b/sdk/typescript/docs/UploadBeginOut.md deleted file mode 100644 index e7d5c74..0000000 --- a/sdk/typescript/docs/UploadBeginOut.md +++ /dev/null @@ -1,43 +0,0 @@ - -# UploadBeginOut - -Response of `POST /v0/uploads`. PUT the bytes to `upload_url` (no auth header — the URL is the credential), then `POST .../commit`. - -## Properties - -Name | Type ------------- | ------------- -`expiresAt` | Date -`headers` | { [key: string]: string; } -`maxBytes` | number -`method` | string -`uploadId` | string -`uploadUrl` | string - -## Example - -```typescript -import type { UploadBeginOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "expiresAt": null, - "headers": null, - "maxBytes": null, - "method": null, - "uploadId": null, - "uploadUrl": null, -} satisfies UploadBeginOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as UploadBeginOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/UploadStatusOut.md b/sdk/typescript/docs/UploadStatusOut.md deleted file mode 100644 index e76d342..0000000 --- a/sdk/typescript/docs/UploadStatusOut.md +++ /dev/null @@ -1,49 +0,0 @@ - -# UploadStatusOut - -Response of `GET /v0/uploads/{upload_id}` — the live state of a direct-to-GCS upload session (large-upload-design.md §5). `state` is derived, not a stored column: * `initiated` — session open; PUT the bytes to the `upload_url`, then `POST /v0/uploads/{upload_id}/commit`. * `committed` — the bytes landed and the artifact was created (`committed_at` is set). * `aborted` — released via `DELETE /v0/uploads/{upload_id}`. * `expired` — past `expires_at` without a commit; the reservation is reclaimed by the GC sweep. - -## Properties - -Name | Type ------------- | ------------- -`committedAt` | Date -`contentType` | string -`createdAt` | Date -`expiresAt` | Date -`maxBytes` | number -`path` | string -`sizeBytes` | number -`state` | string -`uploadId` | string - -## Example - -```typescript -import type { UploadStatusOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "committedAt": null, - "contentType": null, - "createdAt": null, - "expiresAt": null, - "maxBytes": null, - "path": null, - "sizeBytes": null, - "state": null, - "uploadId": null, -} satisfies UploadStatusOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as UploadStatusOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/UsageCounterOut.md b/sdk/typescript/docs/UsageCounterOut.md deleted file mode 100644 index 8e18665..0000000 --- a/sdk/typescript/docs/UsageCounterOut.md +++ /dev/null @@ -1,34 +0,0 @@ - -# UsageCounterOut - - -## Properties - -Name | Type ------------- | ------------- -`limit` | number -`used` | number - -## Example - -```typescript -import type { UsageCounterOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "limit": null, - "used": null, -} satisfies UsageCounterOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as UsageCounterOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/UsagePeriodOut.md b/sdk/typescript/docs/UsagePeriodOut.md deleted file mode 100644 index 1c5e9f0..0000000 --- a/sdk/typescript/docs/UsagePeriodOut.md +++ /dev/null @@ -1,36 +0,0 @@ - -# UsagePeriodOut - - -## Properties - -Name | Type ------------- | ------------- -`ends` | Date -`starts` | Date -`yearMonth` | string - -## Example - -```typescript -import type { UsagePeriodOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "ends": null, - "starts": null, - "yearMonth": null, -} satisfies UsagePeriodOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as UsagePeriodOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/UserTokenList.md b/sdk/typescript/docs/UserTokenList.md deleted file mode 100644 index 98112ed..0000000 --- a/sdk/typescript/docs/UserTokenList.md +++ /dev/null @@ -1,34 +0,0 @@ - -# UserTokenList - - -## Properties - -Name | Type ------------- | ------------- -`items` | [Array<UserTokenOut>](UserTokenOut.md) -`nextCursor` | string - -## Example - -```typescript -import type { UserTokenList } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "items": null, - "nextCursor": null, -} satisfies UserTokenList - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as UserTokenList -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/UserTokenOut.md b/sdk/typescript/docs/UserTokenOut.md deleted file mode 100644 index cb473bc..0000000 --- a/sdk/typescript/docs/UserTokenOut.md +++ /dev/null @@ -1,49 +0,0 @@ - -# UserTokenOut - -One `ad_user_` token — metadata only. The raw token is NEVER exposed over the API (minting is web-only, reveal-once); this shape omits both the raw value and the stored hash by construction. - -## Properties - -Name | Type ------------- | ------------- -`createdAt` | Date -`defaultDriveId` | string -`expiresAt` | Date -`id` | string -`label` | string -`lastUsedAt` | Date -`prefix` | string -`revokedAt` | Date -`scope` | string - -## Example - -```typescript -import type { UserTokenOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "createdAt": null, - "defaultDriveId": null, - "expiresAt": null, - "id": null, - "label": null, - "lastUsedAt": null, - "prefix": null, - "revokedAt": null, - "scope": null, -} satisfies UserTokenOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as UserTokenOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/V0ErrorEnvelope.md b/sdk/typescript/docs/V0ErrorEnvelope.md new file mode 100644 index 0000000..5b0e851 --- /dev/null +++ b/sdk/typescript/docs/V0ErrorEnvelope.md @@ -0,0 +1,32 @@ + +# V0ErrorEnvelope + + +## Properties + +Name | Type +------------ | ------------- +`error` | [DrivesCreate400ResponseError](DrivesCreate400ResponseError.md) + +## Example + +```typescript +import type { V0ErrorEnvelope } from '@mnexa-ai/agentdrive-sdk' + +// TODO: Update the object below with actual values +const example = { + "error": null, +} satisfies V0ErrorEnvelope + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as V0ErrorEnvelope +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ValidationErrorBody.md b/sdk/typescript/docs/ValidationErrorBody.md deleted file mode 100644 index 210c2e1..0000000 --- a/sdk/typescript/docs/ValidationErrorBody.md +++ /dev/null @@ -1,36 +0,0 @@ - -# ValidationErrorBody - - -## Properties - -Name | Type ------------- | ------------- -`code` | string -`fields` | [Array<ValidationIssue>](ValidationIssue.md) -`message` | string - -## Example - -```typescript -import type { ValidationErrorBody } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "code": null, - "fields": null, - "message": null, -} satisfies ValidationErrorBody - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as ValidationErrorBody -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ValidationErrorDetail.md b/sdk/typescript/docs/ValidationErrorDetail.md deleted file mode 100644 index 87cdeb2..0000000 --- a/sdk/typescript/docs/ValidationErrorDetail.md +++ /dev/null @@ -1,32 +0,0 @@ - -# ValidationErrorDetail - - -## Properties - -Name | Type ------------- | ------------- -`error` | [ValidationErrorBody](ValidationErrorBody.md) - -## Example - -```typescript -import type { ValidationErrorDetail } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "error": null, -} satisfies ValidationErrorDetail - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as ValidationErrorDetail -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ValidationErrorResponse.md b/sdk/typescript/docs/ValidationErrorResponse.md index 9acce89..a99f8d8 100644 --- a/sdk/typescript/docs/ValidationErrorResponse.md +++ b/sdk/typescript/docs/ValidationErrorResponse.md @@ -1,13 +1,12 @@ # ValidationErrorResponse -The runtime `VALIDATION_ERROR` response for request parsing failures. ## Properties Name | Type ------------ | ------------- -`detail` | [ValidationErrorDetail](ValidationErrorDetail.md) +`error` | [ValidationErrorResponseError](ValidationErrorResponseError.md) ## Example @@ -16,7 +15,7 @@ import type { ValidationErrorResponse } from '@mnexa-ai/agentdrive-sdk' // TODO: Update the object below with actual values const example = { - "detail": null, + "error": null, } satisfies ValidationErrorResponse console.log(example) diff --git a/sdk/typescript/docs/ValidationErrorResponseError.md b/sdk/typescript/docs/ValidationErrorResponseError.md new file mode 100644 index 0000000..dac3fd3 --- /dev/null +++ b/sdk/typescript/docs/ValidationErrorResponseError.md @@ -0,0 +1,36 @@ + +# ValidationErrorResponseError + + +## Properties + +Name | Type +------------ | ------------- +`code` | string +`details` | [ValidationErrorResponseErrorDetails](ValidationErrorResponseErrorDetails.md) +`message` | string + +## Example + +```typescript +import type { ValidationErrorResponseError } from '@mnexa-ai/agentdrive-sdk' + +// TODO: Update the object below with actual values +const example = { + "code": null, + "details": null, + "message": null, +} satisfies ValidationErrorResponseError + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ValidationErrorResponseError +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ValidationErrorResponseErrorDetails.md b/sdk/typescript/docs/ValidationErrorResponseErrorDetails.md new file mode 100644 index 0000000..a9a15d7 --- /dev/null +++ b/sdk/typescript/docs/ValidationErrorResponseErrorDetails.md @@ -0,0 +1,32 @@ + +# ValidationErrorResponseErrorDetails + + +## Properties + +Name | Type +------------ | ------------- +`fields` | [Array<ValidationErrorResponseErrorDetailsFieldsInner>](ValidationErrorResponseErrorDetailsFieldsInner.md) + +## Example + +```typescript +import type { ValidationErrorResponseErrorDetails } from '@mnexa-ai/agentdrive-sdk' + +// TODO: Update the object below with actual values +const example = { + "fields": null, +} satisfies ValidationErrorResponseErrorDetails + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ValidationErrorResponseErrorDetails +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ValidationErrorResponseErrorDetailsFieldsInner.md b/sdk/typescript/docs/ValidationErrorResponseErrorDetailsFieldsInner.md new file mode 100644 index 0000000..4ebe639 --- /dev/null +++ b/sdk/typescript/docs/ValidationErrorResponseErrorDetailsFieldsInner.md @@ -0,0 +1,34 @@ + +# ValidationErrorResponseErrorDetailsFieldsInner + + +## Properties + +Name | Type +------------ | ------------- +`location` | string +`reason` | string + +## Example + +```typescript +import type { ValidationErrorResponseErrorDetailsFieldsInner } from '@mnexa-ai/agentdrive-sdk' + +// TODO: Update the object below with actual values +const example = { + "location": null, + "reason": null, +} satisfies ValidationErrorResponseErrorDetailsFieldsInner + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as ValidationErrorResponseErrorDetailsFieldsInner +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/ValidationIssue.md b/sdk/typescript/docs/ValidationIssue.md deleted file mode 100644 index 8d4da6b..0000000 --- a/sdk/typescript/docs/ValidationIssue.md +++ /dev/null @@ -1,41 +0,0 @@ - -# ValidationIssue - -One Pydantic/FastAPI validation issue. - -## Properties - -Name | Type ------------- | ------------- -`ctx` | { [key: string]: any; } -`input` | any -`loc` | [Array<LocInner>](LocInner.md) -`msg` | string -`type` | string - -## Example - -```typescript -import type { ValidationIssue } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "ctx": null, - "input": null, - "loc": null, - "msg": null, - "type": null, -} satisfies ValidationIssue - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as ValidationIssue -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/VersionCreatedOut.md b/sdk/typescript/docs/VersionCreatedOut.md new file mode 100644 index 0000000..08d583d --- /dev/null +++ b/sdk/typescript/docs/VersionCreatedOut.md @@ -0,0 +1,51 @@ + +# VersionCreatedOut + +The append/restore response — a version plus the artifact\'s new revision, which the version-creating 201 rotates. + +## Properties + +Name | Type +------------ | ------------- +`artifactId` | string +`artifactRevision` | string +`contentType` | string +`createdAt` | Date +`createdBy` | string +`hash` | string +`id` | string +`parentVersionId` | string +`sizeBytes` | number +`versionNumber` | number + +## Example + +```typescript +import type { VersionCreatedOut } from '@mnexa-ai/agentdrive-sdk' + +// TODO: Update the object below with actual values +const example = { + "artifactId": null, + "artifactRevision": null, + "contentType": null, + "createdAt": null, + "createdBy": null, + "hash": null, + "id": null, + "parentVersionId": null, + "sizeBytes": null, + "versionNumber": null, +} satisfies VersionCreatedOut + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as VersionCreatedOut +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/VersionListOut.md b/sdk/typescript/docs/VersionListOut.md new file mode 100644 index 0000000..0d88ed7 --- /dev/null +++ b/sdk/typescript/docs/VersionListOut.md @@ -0,0 +1,34 @@ + +# VersionListOut + + +## Properties + +Name | Type +------------ | ------------- +`items` | [Array<VersionOut>](VersionOut.md) +`nextCursor` | string + +## Example + +```typescript +import type { VersionListOut } from '@mnexa-ai/agentdrive-sdk' + +// TODO: Update the object below with actual values +const example = { + "items": null, + "nextCursor": null, +} satisfies VersionListOut + +console.log(example) + +// Convert the instance to a JSON string +const exampleJSON: string = JSON.stringify(example) +console.log(exampleJSON) + +// Parse the JSON string back to an object +const exampleParsed = JSON.parse(exampleJSON) as VersionListOut +console.log(exampleParsed) +``` + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/VersionOut.md b/sdk/typescript/docs/VersionOut.md index 1a3136e..2f8020b 100644 --- a/sdk/typescript/docs/VersionOut.md +++ b/sdk/typescript/docs/VersionOut.md @@ -6,12 +6,13 @@ Name | Type ------------ | ------------- -`actorName` | string -`artId` | string -`changeSummary` | string +`artifactId` | string `contentType` | string `createdAt` | Date +`createdBy` | string `hash` | string +`id` | string +`parentVersionId` | string `sizeBytes` | number `versionNumber` | number @@ -22,12 +23,13 @@ import type { VersionOut } from '@mnexa-ai/agentdrive-sdk' // TODO: Update the object below with actual values const example = { - "actorName": null, - "artId": null, - "changeSummary": null, + "artifactId": null, "contentType": null, "createdAt": null, + "createdBy": null, "hash": null, + "id": null, + "parentVersionId": null, "sizeBytes": null, "versionNumber": null, } satisfies VersionOut diff --git a/sdk/typescript/docs/VersionPage.md b/sdk/typescript/docs/VersionPage.md deleted file mode 100644 index c761b11..0000000 --- a/sdk/typescript/docs/VersionPage.md +++ /dev/null @@ -1,36 +0,0 @@ - -# VersionPage - - -## Properties - -Name | Type ------------- | ------------- -`items` | [Array<VersionOut>](VersionOut.md) -`nextCursor` | string -`prunedBefore` | number - -## Example - -```typescript -import type { VersionPage } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "items": null, - "nextCursor": null, - "prunedBefore": null, -} satisfies VersionPage - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as VersionPage -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/VersionRetentionOut.md b/sdk/typescript/docs/VersionRetentionOut.md deleted file mode 100644 index 9464a0f..0000000 --- a/sdk/typescript/docs/VersionRetentionOut.md +++ /dev/null @@ -1,32 +0,0 @@ - -# VersionRetentionOut - - -## Properties - -Name | Type ------------- | ------------- -`versionsMax` | number - -## Example - -```typescript -import type { VersionRetentionOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "versionsMax": null, -} satisfies VersionRetentionOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as VersionRetentionOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/VersionsApi.md b/sdk/typescript/docs/VersionsApi.md new file mode 100644 index 0000000..37bf8cc --- /dev/null +++ b/sdk/typescript/docs/VersionsApi.md @@ -0,0 +1,483 @@ +# VersionsApi + +All URIs are relative to *https://api.agentdrive.run* + +| Method | HTTP request | Description | +|------------- | ------------- | -------------| +| [**versionsAppend**](VersionsApi.md#versionsappend) | **POST** /v0/drives/{drive_id}/artifacts/{artifact_id}/versions | Append Version | +| [**versionsContent**](VersionsApi.md#versionscontent) | **GET** /v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}/content | Read Version Content | +| [**versionsList**](VersionsApi.md#versionslist) | **GET** /v0/drives/{drive_id}/artifacts/{artifact_id}/versions | List Versions | +| [**versionsRead**](VersionsApi.md#versionsread) | **GET** /v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id} | Read Version | +| [**versionsRestore**](VersionsApi.md#versionsrestore) | **POST** /v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}/restore | Restore Version | + + + +## versionsAppend + +> VersionCreatedOut versionsAppend(driveId, artifactId, idempotencyKey, ifMatch, content, authorization, contentType, sha256) + +Append Version + +Append one immutable version and rotate the artifact head. Multipart only (415 for a JSON body). Parts: content (bytes), content_type, sha256. content is required; name, parent_id, and metadata are not accepted here. + +### Example + +```ts +import { + Configuration, + VersionsApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { VersionsAppendRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new VersionsApi(config); + + const body = { + // string + driveId: driveId_example, + // string + artifactId: artifactId_example, + // string + idempotencyKey: idempotencyKey_example, + // string + ifMatch: ifMatch_example, + // Blob | The artifact bytes. + content: BINARY_DATA_HERE, + // string (optional) + authorization: authorization_example, + // string | Declared media type. (optional) + contentType: contentType_example, + // string | Optional content sha256 for verification. (optional) + sha256: sha256_example, + } satisfies VersionsAppendRequest; + + try { + const data = await api.versionsAppend(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **artifactId** | `string` | | [Defaults to `undefined`] | +| **idempotencyKey** | `string` | | [Defaults to `undefined`] | +| **ifMatch** | `string` | | [Defaults to `undefined`] | +| **content** | `Blob` | The artifact bytes. | [Defaults to `undefined`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | +| **contentType** | `string` | Declared media type. | [Optional] [Defaults to `undefined`] | +| **sha256** | `string` | Optional content sha256 for verification. | [Optional] [Defaults to `undefined`] | + +### Return type + +[**VersionCreatedOut**](VersionCreatedOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: `multipart/form-data` +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Successful Response | * ETag - Current strong entity tag.
* Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| +| **409** | The mutation conflicts with current state (name/path, lifecycle). | * X-Request-Id - Request correlation identifier.
| +| **412** | If-Match did not match the resource\'s current revision. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **428** | If-Match is required for this mutation. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## versionsContent + +> Blob versionsContent(driveId, artifactId, versionId, ifNoneMatch, authorization) + +Read Version Content + +Download one version\'s immutable bytes — stream or 307. + +### Example + +```ts +import { + Configuration, + VersionsApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { VersionsContentRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new VersionsApi(config); + + const body = { + // string + driveId: driveId_example, + // string + artifactId: artifactId_example, + // string + versionId: versionId_example, + // string (optional) + ifNoneMatch: ifNoneMatch_example, + // string (optional) + authorization: authorization_example, + } satisfies VersionsContentRequest; + + try { + const data = await api.versionsContent(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **artifactId** | `string` | | [Defaults to `undefined`] | +| **versionId** | `string` | | [Defaults to `undefined`] | +| **ifNoneMatch** | `string` | | [Optional] [Defaults to `undefined`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +**Blob** + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/octet-stream`, `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Raw artifact bytes (streamed). | * X-Request-Id - Request correlation identifier.
| +| **304** | If-None-Match matched the current ETag. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **307** | Redirect to a short-lived signed URL. | * Location - Redirect target.
* X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## versionsList + +> VersionListOut versionsList(driveId, artifactId, limit, cursor, authorization) + +List Versions + +List the artifact\'s version trail, newest first (ordinal DESC). + +### Example + +```ts +import { + Configuration, + VersionsApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { VersionsListRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new VersionsApi(config); + + const body = { + // string + driveId: driveId_example, + // string + artifactId: artifactId_example, + // number (optional) + limit: 56, + // string (optional) + cursor: cursor_example, + // string (optional) + authorization: authorization_example, + } satisfies VersionsListRequest; + + try { + const data = await api.versionsList(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **artifactId** | `string` | | [Defaults to `undefined`] | +| **limit** | `number` | | [Optional] [Defaults to `undefined`] | +| **cursor** | `string` | | [Optional] [Defaults to `undefined`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**VersionListOut**](VersionListOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## versionsRead + +> VersionOut versionsRead(driveId, artifactId, versionId, ifNoneMatch, authorization) + +Read Version + +Read one immutable version. + +### Example + +```ts +import { + Configuration, + VersionsApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { VersionsReadRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new VersionsApi(config); + + const body = { + // string + driveId: driveId_example, + // string + artifactId: artifactId_example, + // string + versionId: versionId_example, + // string (optional) + ifNoneMatch: ifNoneMatch_example, + // string (optional) + authorization: authorization_example, + } satisfies VersionsReadRequest; + + try { + const data = await api.versionsRead(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **artifactId** | `string` | | [Defaults to `undefined`] | +| **versionId** | `string` | | [Defaults to `undefined`] | +| **ifNoneMatch** | `string` | | [Optional] [Defaults to `undefined`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**VersionOut**](VersionOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **304** | If-None-Match matched the current ETag. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) + + +## versionsRestore + +> VersionCreatedOut versionsRestore(driveId, artifactId, versionId, idempotencyKey, ifMatch, authorization) + +Restore Version + +Restore a historical version as a NEW head version (no byte copy). + +### Example + +```ts +import { + Configuration, + VersionsApi, +} from '@mnexa-ai/agentdrive-sdk'; +import type { VersionsRestoreRequest } from '@mnexa-ai/agentdrive-sdk'; + +async function example() { + console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); + const config = new Configuration({ + // Configure HTTP bearer authorization: bearerAuth + accessToken: "YOUR BEARER TOKEN", + }); + const api = new VersionsApi(config); + + const body = { + // string + driveId: driveId_example, + // string + artifactId: artifactId_example, + // string + versionId: versionId_example, + // string + idempotencyKey: idempotencyKey_example, + // string + ifMatch: ifMatch_example, + // string (optional) + authorization: authorization_example, + } satisfies VersionsRestoreRequest; + + try { + const data = await api.versionsRestore(body); + console.log(data); + } catch (error) { + console.error(error); + } +} + +// Run the test +example().catch(console.error); +``` + +### Parameters + + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **driveId** | `string` | | [Defaults to `undefined`] | +| **artifactId** | `string` | | [Defaults to `undefined`] | +| **versionId** | `string` | | [Defaults to `undefined`] | +| **idempotencyKey** | `string` | | [Defaults to `undefined`] | +| **ifMatch** | `string` | | [Defaults to `undefined`] | +| **authorization** | `string` | | [Optional] [Defaults to `undefined`] | + +### Return type + +[**VersionCreatedOut**](VersionCreatedOut.md) + +### Authorization + +[bearerAuth](../README.md#bearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: `application/json` + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **201** | Successful Response | * ETag - Current strong entity tag.
* Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| +| **400** | Malformed request (invalid query parameter, cursor, or argument). | * X-Request-Id - Request correlation identifier.
| +| **401** | Missing or invalid bearer token. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| +| **403** | Token lacks a required scope. | * X-Request-Id - Request correlation identifier.
| +| **404** | The resource was not found or is not visible to the caller. | * X-Request-Id - Request correlation identifier.
| +| **409** | The mutation conflicts with current state (name/path, lifecycle). | * X-Request-Id - Request correlation identifier.
| +| **412** | If-Match did not match the resource\'s current revision. | * ETag - Current strong entity tag.
* X-Request-Id - Request correlation identifier.
| +| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| +| **428** | If-Match is required for this mutation. | * X-Request-Id - Request correlation identifier.
| +| **429** | Rate limited. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| +| **503** | Token verification is temporarily unavailable (the Hub JWKS could not be fetched). This is the API\'s unavailability, not a problem with the presented credential. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| + +[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/WorkspaceCreateIn.md b/sdk/typescript/docs/WorkspaceCreateIn.md deleted file mode 100644 index 32f3cba..0000000 --- a/sdk/typescript/docs/WorkspaceCreateIn.md +++ /dev/null @@ -1,33 +0,0 @@ - -# WorkspaceCreateIn - -POST /v0/workspaces body. `name` is the user-facing workspace label; the creator becomes its admin and gets a starter drive. - -## Properties - -Name | Type ------------- | ------------- -`name` | string - -## Example - -```typescript -import type { WorkspaceCreateIn } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "name": null, -} satisfies WorkspaceCreateIn - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as WorkspaceCreateIn -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/WorkspaceCreateOut.md b/sdk/typescript/docs/WorkspaceCreateOut.md deleted file mode 100644 index 71a212d..0000000 --- a/sdk/typescript/docs/WorkspaceCreateOut.md +++ /dev/null @@ -1,37 +0,0 @@ - -# WorkspaceCreateOut - -POST /v0/workspaces response. Carries the new workspace + its starter drive\'s `ad_live_` key **once** (`starter_drive_api_key`) — reveal-once, store it now (mint more keys via `POST /v0/drives/{id}/keys`). - -## Properties - -Name | Type ------------- | ------------- -`starterDriveApiKey` | string -`starterDriveId` | string -`workspace` | [WorkspaceOut](WorkspaceOut.md) - -## Example - -```typescript -import type { WorkspaceCreateOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "starterDriveApiKey": null, - "starterDriveId": null, - "workspace": null, -} satisfies WorkspaceCreateOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as WorkspaceCreateOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/WorkspaceList.md b/sdk/typescript/docs/WorkspaceList.md deleted file mode 100644 index 8d2f515..0000000 --- a/sdk/typescript/docs/WorkspaceList.md +++ /dev/null @@ -1,34 +0,0 @@ - -# WorkspaceList - - -## Properties - -Name | Type ------------- | ------------- -`items` | [Array<WorkspaceOut>](WorkspaceOut.md) -`nextCursor` | string - -## Example - -```typescript -import type { WorkspaceList } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "items": null, - "nextCursor": null, -} satisfies WorkspaceList - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as WorkspaceList -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/WorkspaceOut.md b/sdk/typescript/docs/WorkspaceOut.md deleted file mode 100644 index ab9b470..0000000 --- a/sdk/typescript/docs/WorkspaceOut.md +++ /dev/null @@ -1,41 +0,0 @@ - -# WorkspaceOut - -One workspace in a listing — metadata only. `role` is the CALLER\'s role in it (admin/member), so a client can render management affordances without a second round-trip. - -## Properties - -Name | Type ------------- | ------------- -`createdAt` | Date -`id` | string -`name` | string -`role` | string -`tierId` | string - -## Example - -```typescript -import type { WorkspaceOut } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "createdAt": null, - "id": null, - "name": null, - "role": null, - "tierId": null, -} satisfies WorkspaceOut - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as WorkspaceOut -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/WorkspaceRenameIn.md b/sdk/typescript/docs/WorkspaceRenameIn.md deleted file mode 100644 index bd2c2b6..0000000 --- a/sdk/typescript/docs/WorkspaceRenameIn.md +++ /dev/null @@ -1,33 +0,0 @@ - -# WorkspaceRenameIn - -PATCH /v0/workspaces/{org} body — rename a workspace the caller administers. - -## Properties - -Name | Type ------------- | ------------- -`name` | string - -## Example - -```typescript -import type { WorkspaceRenameIn } from '@mnexa-ai/agentdrive-sdk' - -// TODO: Update the object below with actual values -const example = { - "name": null, -} satisfies WorkspaceRenameIn - -console.log(example) - -// Convert the instance to a JSON string -const exampleJSON: string = JSON.stringify(example) -console.log(exampleJSON) - -// Parse the JSON string back to an object -const exampleParsed = JSON.parse(exampleJSON) as WorkspaceRenameIn -console.log(exampleParsed) -``` - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/docs/WorkspacesApi.md b/sdk/typescript/docs/WorkspacesApi.md deleted file mode 100644 index 072b877..0000000 --- a/sdk/typescript/docs/WorkspacesApi.md +++ /dev/null @@ -1,245 +0,0 @@ -# WorkspacesApi - -All URIs are relative to *https://api.agentdrive.run* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createWorkspaceRouteV0WorkspacesPost**](WorkspacesApi.md#createworkspaceroutev0workspacespost) | **POST** /v0/workspaces | Create a new shared drive | -| [**listWorkspacesRouteV0WorkspacesGet**](WorkspacesApi.md#listworkspacesroutev0workspacesget) | **GET** /v0/workspaces | List the spaces you belong to | -| [**renameWorkspaceRouteV0WorkspacesOrgIdPatch**](WorkspacesApi.md#renameworkspaceroutev0workspacesorgidpatch) | **PATCH** /v0/workspaces/{org_id} | Rename a shared drive you administer | - - - -## createWorkspaceRouteV0WorkspacesPost - -> WorkspaceCreateOut createWorkspaceRouteV0WorkspacesPost(workspaceCreateIn) - -Create a new shared drive - -Create a new **shared drive** — a shared, multi-member space (the `workspaces` path is retained for API stability). You become its **admin** and get a starter drive; the starter drive\'s `ad_live_` key is returned **once** (`starter_drive_api_key`). A user may administer up to their plan\'s number of shared drives (workspaces-v2 §4.6). A caller at the limit is blocked with `403 WORKSPACE_LIMIT_REACHED`. Requires a `full`-scope user token. - -### Example - -```ts -import { - Configuration, - WorkspacesApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { CreateWorkspaceRouteV0WorkspacesPostRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new WorkspacesApi(config); - - const body = { - // WorkspaceCreateIn - workspaceCreateIn: ..., - } satisfies CreateWorkspaceRouteV0WorkspacesPostRequest; - - try { - const data = await api.createWorkspaceRouteV0WorkspacesPost(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **workspaceCreateIn** | [WorkspaceCreateIn](WorkspaceCreateIn.md) | | | - -### Return type - -[**WorkspaceCreateOut**](WorkspaceCreateOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **201** | Successful Response | * Location - Canonical URL of the created resource.
* X-Request-Id - Request correlation identifier.
| -| **400** | The workspace name or request is invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **409** | The workspace conflicts with an existing organization. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## listWorkspacesRouteV0WorkspacesGet - -> WorkspaceList listWorkspacesRouteV0WorkspacesGet(cursor, limit) - -List the spaces you belong to - -Return every space the caller is a member of, each carrying the caller\'s `role` in it. Metadata only. A `read`-scope token is sufficient. **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=<token>` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - -### Example - -```ts -import { - Configuration, - WorkspacesApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { ListWorkspacesRouteV0WorkspacesGetRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new WorkspacesApi(config); - - const body = { - // string (optional) - cursor: cursor_example, - // number (optional) - limit: 56, - } satisfies ListWorkspacesRouteV0WorkspacesGetRequest; - - try { - const data = await api.listWorkspacesRouteV0WorkspacesGet(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **cursor** | `string` | | [Optional] [Defaults to `undefined`] | -| **limit** | `number` | | [Optional] [Defaults to `undefined`] | - -### Return type - -[**WorkspaceList**](WorkspaceList.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) - - -## renameWorkspaceRouteV0WorkspacesOrgIdPatch - -> WorkspaceOut renameWorkspaceRouteV0WorkspacesOrgIdPatch(orgId, workspaceRenameIn) - -Rename a shared drive you administer - -Rename a shared drive. **Admin only** — one you don\'t administer (or aren\'t a member of) returns 404 (no-leak). Requires a `full`-scope user token. - -### Example - -```ts -import { - Configuration, - WorkspacesApi, -} from '@mnexa-ai/agentdrive-sdk'; -import type { RenameWorkspaceRouteV0WorkspacesOrgIdPatchRequest } from '@mnexa-ai/agentdrive-sdk'; - -async function example() { - console.log("🚀 Testing @mnexa-ai/agentdrive-sdk SDK..."); - const config = new Configuration({ - // Configure HTTP bearer authorization: BearerAuth - accessToken: "YOUR BEARER TOKEN", - }); - const api = new WorkspacesApi(config); - - const body = { - // string - orgId: orgId_example, - // WorkspaceRenameIn - workspaceRenameIn: ..., - } satisfies RenameWorkspaceRouteV0WorkspacesOrgIdPatchRequest; - - try { - const data = await api.renameWorkspaceRouteV0WorkspacesOrgIdPatch(body); - console.log(data); - } catch (error) { - console.error(error); - } -} - -// Run the test -example().catch(console.error); -``` - -### Parameters - - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **orgId** | `string` | | [Defaults to `undefined`] | -| **workspaceRenameIn** | [WorkspaceRenameIn](WorkspaceRenameIn.md) | | | - -### Return type - -[**WorkspaceOut**](WorkspaceOut.md) - -### Authorization - -[BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - -- **Content-Type**: `application/json` -- **Accept**: `application/json` - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | * X-Request-Id - Request correlation identifier.
| -| **400** | The workspace update is invalid. | * X-Request-Id - Request correlation identifier.
| -| **401** | Bearer credential is missing or invalid. | * WWW-Authenticate - RFC 6750 bearer authentication challenge.
* X-Request-Id - Request correlation identifier.
| -| **403** | The authenticated principal is not allowed to perform this operation. | * X-Request-Id - Request correlation identifier.
| -| **404** | The workspace does not exist for this user. | * X-Request-Id - Request correlation identifier.
| -| **422** | Request validation failed. | * X-Request-Id - Request correlation identifier.
| -| **429** | A request, operation, or quota rate limit was exceeded. | * Retry-After - Seconds until the caller should retry.
* X-Request-Id - Request correlation identifier.
| - -[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md) diff --git a/sdk/typescript/package-lock.json b/sdk/typescript/package-lock.json index 5d83d17..c933ea2 100644 --- a/sdk/typescript/package-lock.json +++ b/sdk/typescript/package-lock.json @@ -1,12 +1,12 @@ { "name": "@mnexa-ai/agentdrive-sdk", - "version": "0.0.1", + "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@mnexa-ai/agentdrive-sdk", - "version": "0.0.1", + "version": "0.1.0", "devDependencies": { "typescript": "^4.0 || ^5.0" } diff --git a/sdk/typescript/package.json b/sdk/typescript/package.json index 4842813..2911c4f 100644 --- a/sdk/typescript/package.json +++ b/sdk/typescript/package.json @@ -1,6 +1,6 @@ { "name": "@mnexa-ai/agentdrive-sdk", - "version": "0.0.1", + "version": "0.1.0", "description": "OpenAPI client for @mnexa-ai/agentdrive-sdk", "author": "OpenAPI-Generator", "repository": { diff --git a/sdk/typescript/src/apis/AgentAuthApi.ts b/sdk/typescript/src/apis/AgentAuthApi.ts deleted file mode 100644 index 797c5b3..0000000 --- a/sdk/typescript/src/apis/AgentAuthApi.ts +++ /dev/null @@ -1,476 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as runtime from '../runtime'; -import { - type AnonymousIdentityResponse, - AnonymousIdentityResponseFromJSON, - AnonymousIdentityResponseToJSON, -} from '../models/AnonymousIdentityResponse'; -import { - type AuthorizationServerMetadataOut, - AuthorizationServerMetadataOutFromJSON, - AuthorizationServerMetadataOutToJSON, -} from '../models/AuthorizationServerMetadataOut'; -import { - type ClaimInitRequest, - ClaimInitRequestFromJSON, - ClaimInitRequestToJSON, -} from '../models/ClaimInitRequest'; -import { - type ClaimInitResponse, - ClaimInitResponseFromJSON, - ClaimInitResponseToJSON, -} from '../models/ClaimInitResponse'; -import { - type ErrorResponse, - ErrorResponseFromJSON, - ErrorResponseToJSON, -} from '../models/ErrorResponse'; -import { - type ExtensionExchangeRequest, - ExtensionExchangeRequestFromJSON, - ExtensionExchangeRequestToJSON, -} from '../models/ExtensionExchangeRequest'; -import { - type ExtensionExchangeResponse, - ExtensionExchangeResponseFromJSON, - ExtensionExchangeResponseToJSON, -} from '../models/ExtensionExchangeResponse'; -import { - type JwksOut, - JwksOutFromJSON, - JwksOutToJSON, -} from '../models/JwksOut'; -import { - type ProtectedResourceMetadataOut, - ProtectedResourceMetadataOutFromJSON, - ProtectedResourceMetadataOutToJSON, -} from '../models/ProtectedResourceMetadataOut'; -import { - type RegisterAgentIdentityAgentIdentityPost422Response, - RegisterAgentIdentityAgentIdentityPost422ResponseFromJSON, - RegisterAgentIdentityAgentIdentityPost422ResponseToJSON, -} from '../models/RegisterAgentIdentityAgentIdentityPost422Response'; -import { - type TokenResponse, - TokenResponseFromJSON, - TokenResponseToJSON, -} from '../models/TokenResponse'; -import { - type ValidationErrorResponse, - ValidationErrorResponseFromJSON, - ValidationErrorResponseToJSON, -} from '../models/ValidationErrorResponse'; - -export interface ExtensionExchangeV0AuthExtensionExchangePostRequest { - extensionExchangeRequest: ExtensionExchangeRequest; -} - -export interface InitiateClaimAgentIdentityClaimPostRequest { - claimInitRequest: ClaimInitRequest; -} - -export interface Oauth2TokenOauth2TokenPostRequest { - grantType: string; - assertion?: string | null; - claimToken?: string | null; -} - -export interface RegisterAgentIdentityAgentIdentityPostRequest { - requestBody: { [key: string]: any | null; }; -} - -/** - * - */ -export class AgentAuthApi extends runtime.BaseAPI { - - /** - * Creates request options for extensionExchangeV0AuthExtensionExchangePost without sending the request - */ - async extensionExchangeV0AuthExtensionExchangePostRequestOpts(requestParameters: ExtensionExchangeV0AuthExtensionExchangePostRequest): Promise { - if (requestParameters['extensionExchangeRequest'] == null) { - throw new runtime.RequiredError( - 'extensionExchangeRequest', - 'Required parameter "extensionExchangeRequest" was null or undefined when calling extensionExchangeV0AuthExtensionExchangePost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - - let urlPath = `/v0/auth/extension/exchange`; - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ExtensionExchangeRequestToJSON(requestParameters['extensionExchangeRequest']), - }; - } - - /** - * Single-use opaque ticket → JWT pair. Called once by an extension\'s auth-complete.html after the OAuth handoff lands. Returns a 15-minute `access_token` (scope=extension) and a 90-day `identity_assertion` the extension stores and refreshes via POST /oauth2/token. - * Redeem an extension OAuth ticket for a JWT pair - */ - async extensionExchangeV0AuthExtensionExchangePostRaw(requestParameters: ExtensionExchangeV0AuthExtensionExchangePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.extensionExchangeV0AuthExtensionExchangePostRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ExtensionExchangeResponseFromJSON(jsonValue)); - } - - /** - * Single-use opaque ticket → JWT pair. Called once by an extension\'s auth-complete.html after the OAuth handoff lands. Returns a 15-minute `access_token` (scope=extension) and a 90-day `identity_assertion` the extension stores and refreshes via POST /oauth2/token. - * Redeem an extension OAuth ticket for a JWT pair - */ - async extensionExchangeV0AuthExtensionExchangePost(requestParameters: ExtensionExchangeV0AuthExtensionExchangePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.extensionExchangeV0AuthExtensionExchangePostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for initiateClaimAgentIdentityClaimPost without sending the request - */ - async initiateClaimAgentIdentityClaimPostRequestOpts(requestParameters: InitiateClaimAgentIdentityClaimPostRequest): Promise { - if (requestParameters['claimInitRequest'] == null) { - throw new runtime.RequiredError( - 'claimInitRequest', - 'Required parameter "claimInitRequest" was null or undefined when calling initiateClaimAgentIdentityClaimPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - - let urlPath = `/agent/identity/claim`; - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ClaimInitRequestToJSON(requestParameters['claimInitRequest']), - }; - } - - /** - * Returns a `user_code` and `verification_uri` (RFC 8628 device-code idiom). The agent surfaces these to the human, who visits the URI, signs in, and approves the claim. The agent then polls POST /oauth2/token (grant_type=claim) with the same `claim_token` to learn when the claim completes. - * Initiate the human-claim ceremony for an agent identity - */ - async initiateClaimAgentIdentityClaimPostRaw(requestParameters: InitiateClaimAgentIdentityClaimPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.initiateClaimAgentIdentityClaimPostRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ClaimInitResponseFromJSON(jsonValue)); - } - - /** - * Returns a `user_code` and `verification_uri` (RFC 8628 device-code idiom). The agent surfaces these to the human, who visits the URI, signs in, and approves the claim. The agent then polls POST /oauth2/token (grant_type=claim) with the same `claim_token` to learn when the claim completes. - * Initiate the human-claim ceremony for an agent identity - */ - async initiateClaimAgentIdentityClaimPost(requestParameters: InitiateClaimAgentIdentityClaimPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.initiateClaimAgentIdentityClaimPostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for jwksWellKnownJwksJsonGet without sending the request - */ - async jwksWellKnownJwksJsonGetRequestOpts(): Promise { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/.well-known/jwks.json`; - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Public half of the RSA signing key for identity_assertion + access_token JWTs issued by AgentDrive. RFC 7517 shape. Cache-friendly; key rotation publishes both kids during the overlap window. - * JSON Web Key Set — public keys for verifying AgentDrive JWTs - */ - async jwksWellKnownJwksJsonGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.jwksWellKnownJwksJsonGetRequestOpts(); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => JwksOutFromJSON(jsonValue)); - } - - /** - * Public half of the RSA signing key for identity_assertion + access_token JWTs issued by AgentDrive. RFC 7517 shape. Cache-friendly; key rotation publishes both kids during the overlap window. - * JSON Web Key Set — public keys for verifying AgentDrive JWTs - */ - async jwksWellKnownJwksJsonGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.jwksWellKnownJwksJsonGetRaw(initOverrides); - return await response.value(); - } - - /** - * Creates request options for oauth2TokenOauth2TokenPost without sending the request - */ - async oauth2TokenOauth2TokenPostRequestOpts(requestParameters: Oauth2TokenOauth2TokenPostRequest): Promise { - if (requestParameters['grantType'] == null) { - throw new runtime.RequiredError( - 'grantType', - 'Required parameter "grantType" was null or undefined when calling oauth2TokenOauth2TokenPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const consumes: runtime.Consume[] = [ - { contentType: 'application/x-www-form-urlencoded' }, - ]; - // @ts-ignore: canConsumeForm may be unused - const canConsumeForm = runtime.canConsumeForm(consumes); - - let formParams: { append(param: string, value: any): any }; - let useForm = false; - if (useForm) { - formParams = new FormData(); - } else { - formParams = new URLSearchParams(); - } - - if (requestParameters['assertion'] != null) { - formParams.append('assertion', requestParameters['assertion'] as any); - } - - if (requestParameters['claimToken'] != null) { - formParams.append('claim_token', requestParameters['claimToken'] as any); - } - - if (requestParameters['grantType'] != null) { - formParams.append('grant_type', requestParameters['grantType'] as any); - } - - - let urlPath = `/oauth2/token`; - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: formParams, - }; - } - - /** - * Two grant types: **`urn:ietf:params:oauth:grant-type:jwt-bearer`** (RFC 7523) — body `assertion=`. Returns a fresh 15-minute access_token with the same scope as the assertion. **`claim`** (custom) — body `claim_token=`. Polling endpoint for the claim ceremony. Returns one of: `authorization_pending` (400), `expired_token` (400), `access_denied` (400), or access_token + new identity_assertion + scope=full (200). - * Exchange a credential for an access_token - */ - async oauth2TokenOauth2TokenPostRaw(requestParameters: Oauth2TokenOauth2TokenPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.oauth2TokenOauth2TokenPostRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => TokenResponseFromJSON(jsonValue)); - } - - /** - * Two grant types: **`urn:ietf:params:oauth:grant-type:jwt-bearer`** (RFC 7523) — body `assertion=`. Returns a fresh 15-minute access_token with the same scope as the assertion. **`claim`** (custom) — body `claim_token=`. Polling endpoint for the claim ceremony. Returns one of: `authorization_pending` (400), `expired_token` (400), `access_denied` (400), or access_token + new identity_assertion + scope=full (200). - * Exchange a credential for an access_token - */ - async oauth2TokenOauth2TokenPost(requestParameters: Oauth2TokenOauth2TokenPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.oauth2TokenOauth2TokenPostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for oauthAuthorizationServerWellKnownOauthAuthorizationServerGet without sending the request - */ - async oauthAuthorizationServerWellKnownOauthAuthorizationServerGetRequestOpts(): Promise { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/.well-known/oauth-authorization-server`; - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Discovery document for the auth.md protocol. Carries the standard RFC 8414 fields plus an `agent_auth` block per the auth.md spec — the latter is what an agent runtime keys off to find the identity + claim endpoints. - * Authorization-server metadata (RFC 8414 + auth.md agent_auth block) - */ - async oauthAuthorizationServerWellKnownOauthAuthorizationServerGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.oauthAuthorizationServerWellKnownOauthAuthorizationServerGetRequestOpts(); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => AuthorizationServerMetadataOutFromJSON(jsonValue)); - } - - /** - * Discovery document for the auth.md protocol. Carries the standard RFC 8414 fields plus an `agent_auth` block per the auth.md spec — the latter is what an agent runtime keys off to find the identity + claim endpoints. - * Authorization-server metadata (RFC 8414 + auth.md agent_auth block) - */ - async oauthAuthorizationServerWellKnownOauthAuthorizationServerGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.oauthAuthorizationServerWellKnownOauthAuthorizationServerGetRaw(initOverrides); - return await response.value(); - } - - /** - * Creates request options for oauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGet without sending the request - */ - async oauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGetRequestOpts(): Promise { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/.well-known/oauth-protected-resource/mcp`; - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Path-inserted variant of the protected-resource document. MCP clients derive this URL from the resource URL `{origin}/mcp` (RFC 9728 §3.1: insert the well-known segment between host and path) after reading the WWW-Authenticate challenge on a 401 — it is the first hop of the client-side OAuth flow. - * Protected-resource metadata for the MCP endpoint (RFC 9728 §3.1) - */ - async oauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.oauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGetRequestOpts(); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ProtectedResourceMetadataOutFromJSON(jsonValue)); - } - - /** - * Path-inserted variant of the protected-resource document. MCP clients derive this URL from the resource URL `{origin}/mcp` (RFC 9728 §3.1: insert the well-known segment between host and path) after reading the WWW-Authenticate challenge on a 401 — it is the first hop of the client-side OAuth flow. - * Protected-resource metadata for the MCP endpoint (RFC 9728 §3.1) - */ - async oauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.oauthProtectedResourceMcpWellKnownOauthProtectedResourceMcpGetRaw(initOverrides); - return await response.value(); - } - - /** - * Creates request options for oauthProtectedResourceWellKnownOauthProtectedResourceGet without sending the request - */ - async oauthProtectedResourceWellKnownOauthProtectedResourceGetRequestOpts(): Promise { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/.well-known/oauth-protected-resource`; - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Names this server as a protected resource and points clients at the authorization server they should obtain tokens from. In this design the resource server and authorization server are the same host. - * Protected-resource metadata (auth.md / RFC 9728-like discovery) - */ - async oauthProtectedResourceWellKnownOauthProtectedResourceGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.oauthProtectedResourceWellKnownOauthProtectedResourceGetRequestOpts(); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ProtectedResourceMetadataOutFromJSON(jsonValue)); - } - - /** - * Names this server as a protected resource and points clients at the authorization server they should obtain tokens from. In this design the resource server and authorization server are the same host. - * Protected-resource metadata (auth.md / RFC 9728-like discovery) - */ - async oauthProtectedResourceWellKnownOauthProtectedResourceGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.oauthProtectedResourceWellKnownOauthProtectedResourceGetRaw(initOverrides); - return await response.value(); - } - - /** - * Creates request options for registerAgentIdentityAgentIdentityPost without sending the request - */ - async registerAgentIdentityAgentIdentityPostRequestOpts(requestParameters: RegisterAgentIdentityAgentIdentityPostRequest): Promise { - if (requestParameters['requestBody'] == null) { - throw new runtime.RequiredError( - 'requestBody', - 'Required parameter "requestBody" was null or undefined when calling registerAgentIdentityAgentIdentityPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - - let urlPath = `/agent/identity`; - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: requestParameters['requestBody'], - }; - } - - /** - * Two registration modes: **`type=anonymous`** — Provisions a brand-new agent identity bound to a fresh shadow-org drive. No human involved; returned `identity_assertion` carries `scope=pre_claim`. A human completes the claim ceremony later via /claim. **`type=identity_assertion`** — Agent provider (e.g. WorkOS) has already minted an ID-JAG asserting a user identity binding. We verify it against the provider\'s JWKS and provision a **claimed** identity immediately: scope=full, drive bound to the user, no claim ceremony needed. - * Register an agent identity (anonymous or ID-JAG) - */ - async registerAgentIdentityAgentIdentityPostRaw(requestParameters: RegisterAgentIdentityAgentIdentityPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.registerAgentIdentityAgentIdentityPostRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => AnonymousIdentityResponseFromJSON(jsonValue)); - } - - /** - * Two registration modes: **`type=anonymous`** — Provisions a brand-new agent identity bound to a fresh shadow-org drive. No human involved; returned `identity_assertion` carries `scope=pre_claim`. A human completes the claim ceremony later via /claim. **`type=identity_assertion`** — Agent provider (e.g. WorkOS) has already minted an ID-JAG asserting a user identity binding. We verify it against the provider\'s JWKS and provision a **claimed** identity immediately: scope=full, drive bound to the user, no claim ceremony needed. - * Register an agent identity (anonymous or ID-JAG) - */ - async registerAgentIdentityAgentIdentityPost(requestParameters: RegisterAgentIdentityAgentIdentityPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.registerAgentIdentityAgentIdentityPostRaw(requestParameters, initOverrides); - return await response.value(); - } - -} diff --git a/sdk/typescript/src/apis/ArtifactsApi.ts b/sdk/typescript/src/apis/ArtifactsApi.ts new file mode 100644 index 0000000..df0da63 --- /dev/null +++ b/sdk/typescript/src/apis/ArtifactsApi.ts @@ -0,0 +1,864 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import * as runtime from '../runtime'; +import { + type ArtifactCopyIn, + ArtifactCopyInFromJSON, + ArtifactCopyInToJSON, +} from '../models/ArtifactCopyIn'; +import { + type ArtifactListOut, + ArtifactListOutFromJSON, + ArtifactListOutToJSON, +} from '../models/ArtifactListOut'; +import { + type ArtifactOut, + ArtifactOutFromJSON, + ArtifactOutToJSON, +} from '../models/ArtifactOut'; +import { + type ArtifactUpdateIn, + ArtifactUpdateInFromJSON, + ArtifactUpdateInToJSON, +} from '../models/ArtifactUpdateIn'; +import { + type DrivesCreate400Response, + DrivesCreate400ResponseFromJSON, + DrivesCreate400ResponseToJSON, +} from '../models/DrivesCreate400Response'; +import { + type ValidationErrorResponse, + ValidationErrorResponseFromJSON, + ValidationErrorResponseToJSON, +} from '../models/ValidationErrorResponse'; + +export interface ArtifactsContentRequest { + driveId: string; + artifactId: string; + ifNoneMatch?: string | null; + authorization?: string | null; +} + +export interface ArtifactsCopyRequest { + driveId: string; + artifactId: string; + idempotencyKey: string | null; + artifactCopyIn: ArtifactCopyIn; + ifMatch?: string | null; + authorization?: string | null; +} + +export interface ArtifactsCreateRequest { + driveId: string; + idempotencyKey: string | null; + content: Blob; + name: string; + parentId: string; + authorization?: string | null; + contentType?: string; + metadata?: object; + sha256?: string; +} + +export interface ArtifactsDeleteRequest { + driveId: string; + artifactId: string; + idempotencyKey: string | null; + ifMatch: string | null; + authorization?: string | null; +} + +export interface ArtifactsListRequest { + driveId: string; + lifecycle?: string; + limit?: number | null; + cursor?: string | null; + parentId?: string | null; + name?: string | null; + contentType?: string | null; + label?: string | null; + updatedAfter?: Date | null; + updatedBefore?: Date | null; + authorization?: string | null; +} + +export interface ArtifactsReadRequest { + driveId: string; + artifactId: string; + ifNoneMatch?: string | null; + authorization?: string | null; +} + +export interface ArtifactsRestoreRequest { + driveId: string; + artifactId: string; + idempotencyKey: string | null; + ifMatch: string | null; + authorization?: string | null; +} + +export interface ArtifactsUpdateRequest { + driveId: string; + artifactId: string; + idempotencyKey: string | null; + ifMatch: string | null; + artifactUpdateIn: ArtifactUpdateIn; + authorization?: string | null; +} + +/** + * + */ +export class ArtifactsApi extends runtime.BaseAPI { + + /** + * Creates request options for artifactsContent without sending the request + */ + async artifactsContentRequestOpts(requestParameters: ArtifactsContentRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling artifactsContent().' + ); + } + + if (requestParameters['artifactId'] == null) { + throw new runtime.RequiredError( + 'artifactId', + 'Required parameter "artifactId" was null or undefined when calling artifactsContent().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['ifNoneMatch'] != null) { + headerParameters['If-None-Match'] = String(requestParameters['ifNoneMatch']); + } + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/v0/drives/{drive_id}/artifacts/{artifact_id}/content`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + urlPath = urlPath.replace('{artifact_id}', encodeURIComponent(String(requestParameters['artifactId']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Download the head version\'s bytes — stream or 307 signed URL. + * Read Artifact Content + */ + async artifactsContentRaw(requestParameters: ArtifactsContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.artifactsContentRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.BlobApiResponse(response); + } + + /** + * Download the head version\'s bytes — stream or 307 signed URL. + * Read Artifact Content + */ + async artifactsContent(requestParameters: ArtifactsContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.artifactsContentRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for artifactsCopy without sending the request + */ + async artifactsCopyRequestOpts(requestParameters: ArtifactsCopyRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling artifactsCopy().' + ); + } + + if (requestParameters['artifactId'] == null) { + throw new runtime.RequiredError( + 'artifactId', + 'Required parameter "artifactId" was null or undefined when calling artifactsCopy().' + ); + } + + if (requestParameters['idempotencyKey'] == null) { + throw new runtime.RequiredError( + 'idempotencyKey', + 'Required parameter "idempotencyKey" was null or undefined when calling artifactsCopy().' + ); + } + + if (requestParameters['artifactCopyIn'] == null) { + throw new runtime.RequiredError( + 'artifactCopyIn', + 'Required parameter "artifactCopyIn" was null or undefined when calling artifactsCopy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['idempotencyKey'] != null) { + headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']); + } + + if (requestParameters['ifMatch'] != null) { + headerParameters['If-Match'] = String(requestParameters['ifMatch']); + } + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/v0/drives/{drive_id}/artifacts/{artifact_id}/copy`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + urlPath = urlPath.replace('{artifact_id}', encodeURIComponent(String(requestParameters['artifactId']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ArtifactCopyInToJSON(requestParameters['artifactCopyIn']), + }; + } + + /** + * Copy one artifact within the same drive. Cross-drive copy is out of v0 scope and rejected (400 INVALID_ARGUMENT). ``destination_drive_id`` must equal the source drive when present. Materializes the artifact + its selected version synchronously → 201. ``If-Match`` is optional; when present it is validated against the source revision (412 stale). + * Copy Artifact + */ + async artifactsCopyRaw(requestParameters: ArtifactsCopyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.artifactsCopyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactOutFromJSON(jsonValue)); + } + + /** + * Copy one artifact within the same drive. Cross-drive copy is out of v0 scope and rejected (400 INVALID_ARGUMENT). ``destination_drive_id`` must equal the source drive when present. Materializes the artifact + its selected version synchronously → 201. ``If-Match`` is optional; when present it is validated against the source revision (412 stale). + * Copy Artifact + */ + async artifactsCopy(requestParameters: ArtifactsCopyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.artifactsCopyRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for artifactsCreate without sending the request + */ + async artifactsCreateRequestOpts(requestParameters: ArtifactsCreateRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling artifactsCreate().' + ); + } + + if (requestParameters['idempotencyKey'] == null) { + throw new runtime.RequiredError( + 'idempotencyKey', + 'Required parameter "idempotencyKey" was null or undefined when calling artifactsCreate().' + ); + } + + if (requestParameters['content'] == null) { + throw new runtime.RequiredError( + 'content', + 'Required parameter "content" was null or undefined when calling artifactsCreate().' + ); + } + + if (requestParameters['name'] == null) { + throw new runtime.RequiredError( + 'name', + 'Required parameter "name" was null or undefined when calling artifactsCreate().' + ); + } + + if (requestParameters['parentId'] == null) { + throw new runtime.RequiredError( + 'parentId', + 'Required parameter "parentId" was null or undefined when calling artifactsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['idempotencyKey'] != null) { + headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']); + } + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const consumes: runtime.Consume[] = [ + { contentType: 'multipart/form-data' }, + ]; + // @ts-ignore: canConsumeForm may be unused + const canConsumeForm = runtime.canConsumeForm(consumes); + + let formParams: { append(param: string, value: any): any }; + let useForm = false; + // use FormData to transmit files using content-type "multipart/form-data" + useForm = canConsumeForm; + if (useForm) { + formParams = new FormData(); + } else { + formParams = new URLSearchParams(); + } + + if (requestParameters['content'] != null) { + formParams.append('content', requestParameters['content'] as any); + } + + if (requestParameters['contentType'] != null) { + formParams.append('content_type', requestParameters['contentType'] as any); + } + + if (requestParameters['metadata'] != null) { + formParams.append('metadata', new Blob([JSON.stringify(runtime.anyToJSON(requestParameters['metadata']))], { type: "application/json", })); + } + + if (requestParameters['name'] != null) { + formParams.append('name', requestParameters['name'] as any); + } + + if (requestParameters['parentId'] != null) { + formParams.append('parent_id', requestParameters['parentId'] as any); + } + + if (requestParameters['sha256'] != null) { + formParams.append('sha256', requestParameters['sha256'] as any); + } + + + let urlPath = `/v0/drives/{drive_id}/artifacts`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: formParams, + }; + } + + /** + * Create one artifact with inline content — multipart only. Multipart only (415 for a JSON body). Parts: parent_id, name, metadata, content (bytes), content_type, sha256. parent_id, name, and content are required. + * Create Artifact + */ + async artifactsCreateRaw(requestParameters: ArtifactsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.artifactsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactOutFromJSON(jsonValue)); + } + + /** + * Create one artifact with inline content — multipart only. Multipart only (415 for a JSON body). Parts: parent_id, name, metadata, content (bytes), content_type, sha256. parent_id, name, and content are required. + * Create Artifact + */ + async artifactsCreate(requestParameters: ArtifactsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.artifactsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for artifactsDelete without sending the request + */ + async artifactsDeleteRequestOpts(requestParameters: ArtifactsDeleteRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling artifactsDelete().' + ); + } + + if (requestParameters['artifactId'] == null) { + throw new runtime.RequiredError( + 'artifactId', + 'Required parameter "artifactId" was null or undefined when calling artifactsDelete().' + ); + } + + if (requestParameters['idempotencyKey'] == null) { + throw new runtime.RequiredError( + 'idempotencyKey', + 'Required parameter "idempotencyKey" was null or undefined when calling artifactsDelete().' + ); + } + + if (requestParameters['ifMatch'] == null) { + throw new runtime.RequiredError( + 'ifMatch', + 'Required parameter "ifMatch" was null or undefined when calling artifactsDelete().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['idempotencyKey'] != null) { + headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']); + } + + if (requestParameters['ifMatch'] != null) { + headerParameters['If-Match'] = String(requestParameters['ifMatch']); + } + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/v0/drives/{drive_id}/artifacts/{artifact_id}`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + urlPath = urlPath.replace('{artifact_id}', encodeURIComponent(String(requestParameters['artifactId']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Soft-delete one artifact (its versions stay). + * Delete Artifact + */ + async artifactsDeleteRaw(requestParameters: ArtifactsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.artifactsDeleteRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactOutFromJSON(jsonValue)); + } + + /** + * Soft-delete one artifact (its versions stay). + * Delete Artifact + */ + async artifactsDelete(requestParameters: ArtifactsDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.artifactsDeleteRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for artifactsList without sending the request + */ + async artifactsListRequestOpts(requestParameters: ArtifactsListRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling artifactsList().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['lifecycle'] != null) { + queryParameters['lifecycle'] = requestParameters['lifecycle']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + if (requestParameters['cursor'] != null) { + queryParameters['cursor'] = requestParameters['cursor']; + } + + if (requestParameters['parentId'] != null) { + queryParameters['parent_id'] = requestParameters['parentId']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + if (requestParameters['contentType'] != null) { + queryParameters['content_type'] = requestParameters['contentType']; + } + + if (requestParameters['label'] != null) { + queryParameters['label'] = requestParameters['label']; + } + + if (requestParameters['updatedAfter'] != null) { + queryParameters['updated_after'] = (requestParameters['updatedAfter'] as any).toISOString(); + } + + if (requestParameters['updatedBefore'] != null) { + queryParameters['updated_before'] = (requestParameters['updatedBefore'] as any).toISOString(); + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/v0/drives/{drive_id}/artifacts`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * List the drive\'s artifacts, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted artifacts. ``parent_id`` / ``name`` / ``content_type`` / ``label`` are exact-match filters; ``updated_after`` / ``updated_before`` are inclusive bounds. Unknown query parameters are rejected. + * List Artifacts + */ + async artifactsListRaw(requestParameters: ArtifactsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.artifactsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactListOutFromJSON(jsonValue)); + } + + /** + * List the drive\'s artifacts, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted artifacts. ``parent_id`` / ``name`` / ``content_type`` / ``label`` are exact-match filters; ``updated_after`` / ``updated_before`` are inclusive bounds. Unknown query parameters are rejected. + * List Artifacts + */ + async artifactsList(requestParameters: ArtifactsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.artifactsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for artifactsRead without sending the request + */ + async artifactsReadRequestOpts(requestParameters: ArtifactsReadRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling artifactsRead().' + ); + } + + if (requestParameters['artifactId'] == null) { + throw new runtime.RequiredError( + 'artifactId', + 'Required parameter "artifactId" was null or undefined when calling artifactsRead().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['ifNoneMatch'] != null) { + headerParameters['If-None-Match'] = String(requestParameters['ifNoneMatch']); + } + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/v0/drives/{drive_id}/artifacts/{artifact_id}`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + urlPath = urlPath.replace('{artifact_id}', encodeURIComponent(String(requestParameters['artifactId']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Read one active artifact. ``If-None-Match`` short-circuits to 304. + * Read Artifact + */ + async artifactsReadRaw(requestParameters: ArtifactsReadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.artifactsReadRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactOutFromJSON(jsonValue)); + } + + /** + * Read one active artifact. ``If-None-Match`` short-circuits to 304. + * Read Artifact + */ + async artifactsRead(requestParameters: ArtifactsReadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.artifactsReadRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for artifactsRestore without sending the request + */ + async artifactsRestoreRequestOpts(requestParameters: ArtifactsRestoreRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling artifactsRestore().' + ); + } + + if (requestParameters['artifactId'] == null) { + throw new runtime.RequiredError( + 'artifactId', + 'Required parameter "artifactId" was null or undefined when calling artifactsRestore().' + ); + } + + if (requestParameters['idempotencyKey'] == null) { + throw new runtime.RequiredError( + 'idempotencyKey', + 'Required parameter "idempotencyKey" was null or undefined when calling artifactsRestore().' + ); + } + + if (requestParameters['ifMatch'] == null) { + throw new runtime.RequiredError( + 'ifMatch', + 'Required parameter "ifMatch" was null or undefined when calling artifactsRestore().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['idempotencyKey'] != null) { + headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']); + } + + if (requestParameters['ifMatch'] != null) { + headerParameters['If-Match'] = String(requestParameters['ifMatch']); + } + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/v0/drives/{drive_id}/artifacts/{artifact_id}/restore`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + urlPath = urlPath.replace('{artifact_id}', encodeURIComponent(String(requestParameters['artifactId']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Restore a soft-deleted artifact atomically. + * Restore Artifact + */ + async artifactsRestoreRaw(requestParameters: ArtifactsRestoreRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.artifactsRestoreRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactOutFromJSON(jsonValue)); + } + + /** + * Restore a soft-deleted artifact atomically. + * Restore Artifact + */ + async artifactsRestore(requestParameters: ArtifactsRestoreRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.artifactsRestoreRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for artifactsUpdate without sending the request + */ + async artifactsUpdateRequestOpts(requestParameters: ArtifactsUpdateRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling artifactsUpdate().' + ); + } + + if (requestParameters['artifactId'] == null) { + throw new runtime.RequiredError( + 'artifactId', + 'Required parameter "artifactId" was null or undefined when calling artifactsUpdate().' + ); + } + + if (requestParameters['idempotencyKey'] == null) { + throw new runtime.RequiredError( + 'idempotencyKey', + 'Required parameter "idempotencyKey" was null or undefined when calling artifactsUpdate().' + ); + } + + if (requestParameters['ifMatch'] == null) { + throw new runtime.RequiredError( + 'ifMatch', + 'Required parameter "ifMatch" was null or undefined when calling artifactsUpdate().' + ); + } + + if (requestParameters['artifactUpdateIn'] == null) { + throw new runtime.RequiredError( + 'artifactUpdateIn', + 'Required parameter "artifactUpdateIn" was null or undefined when calling artifactsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['idempotencyKey'] != null) { + headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']); + } + + if (requestParameters['ifMatch'] != null) { + headerParameters['If-Match'] = String(requestParameters['ifMatch']); + } + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/v0/drives/{drive_id}/artifacts/{artifact_id}`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + urlPath = urlPath.replace('{artifact_id}', encodeURIComponent(String(requestParameters['artifactId']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: ArtifactUpdateInToJSON(requestParameters['artifactUpdateIn']), + }; + } + + /** + * Rename / move / set metadata or labels. At least one field required. + * Update Artifact + */ + async artifactsUpdateRaw(requestParameters: ArtifactsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.artifactsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactOutFromJSON(jsonValue)); + } + + /** + * Rename / move / set metadata or labels. At least one field required. + * Update Artifact + */ + async artifactsUpdate(requestParameters: ArtifactsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.artifactsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/sdk/typescript/src/apis/ChangesApi.ts b/sdk/typescript/src/apis/ChangesApi.ts new file mode 100644 index 0000000..994a799 --- /dev/null +++ b/sdk/typescript/src/apis/ChangesApi.ts @@ -0,0 +1,130 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import * as runtime from '../runtime'; +import { + type ChangePageOut, + ChangePageOutFromJSON, + ChangePageOutToJSON, +} from '../models/ChangePageOut'; +import { + type DrivesCreate400Response, + DrivesCreate400ResponseFromJSON, + DrivesCreate400ResponseToJSON, +} from '../models/DrivesCreate400Response'; +import { + type DrivesList400Response, + DrivesList400ResponseFromJSON, + DrivesList400ResponseToJSON, +} from '../models/DrivesList400Response'; +import { + type ValidationErrorResponse, + ValidationErrorResponseFromJSON, + ValidationErrorResponseToJSON, +} from '../models/ValidationErrorResponse'; + +export interface ChangesListRequest { + driveId: string; + limit?: number | null; + start?: ChangesListStartEnum; + cursor?: string | null; + authorization?: string | null; +} + +/** + * + */ +export class ChangesApi extends runtime.BaseAPI { + + /** + * Creates request options for changesList without sending the request + */ + async changesListRequestOpts(requestParameters: ChangesListRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling changesList().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + if (requestParameters['start'] != null) { + queryParameters['start'] = requestParameters['start']; + } + + if (requestParameters['cursor'] != null) { + queryParameters['cursor'] = requestParameters['cursor']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/v0/drives/{drive_id}/changes`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Pull one page of changes. Exactly one of ``start`` or ``cursor``. + * List Changes + */ + async changesListRaw(requestParameters: ChangesListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.changesListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ChangePageOutFromJSON(jsonValue)); + } + + /** + * Pull one page of changes. Exactly one of ``start`` or ``cursor``. + * List Changes + */ + async changesList(requestParameters: ChangesListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.changesListRaw(requestParameters, initOverrides); + return await response.value(); + } + +} + +/** + * @export + */ +export const ChangesListStartEnum = { + Now: 'now', + Beginning: 'beginning' +} as const; +export type ChangesListStartEnum = typeof ChangesListStartEnum[keyof typeof ChangesListStartEnum]; diff --git a/sdk/typescript/src/apis/DefaultApi.ts b/sdk/typescript/src/apis/DefaultApi.ts index 4835e6c..6de3460 100644 --- a/sdk/typescript/src/apis/DefaultApi.ts +++ b/sdk/typescript/src/apis/DefaultApi.ts @@ -2,7 +2,7 @@ /* eslint-disable */ /** * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. * * The version of the OpenAPI document: * @@ -13,176 +13,6 @@ */ import * as runtime from '../runtime'; -import { - type ArtifactDeleteOut, - ArtifactDeleteOutFromJSON, - ArtifactDeleteOutToJSON, -} from '../models/ArtifactDeleteOut'; -import { - type ArtifactHeadOut, - ArtifactHeadOutFromJSON, - ArtifactHeadOutToJSON, -} from '../models/ArtifactHeadOut'; -import { - type ArtifactMoveIn, - ArtifactMoveInFromJSON, - ArtifactMoveInToJSON, -} from '../models/ArtifactMoveIn'; -import { - type ArtifactOut, - ArtifactOutFromJSON, - ArtifactOutToJSON, -} from '../models/ArtifactOut'; -import { - type ArtifactPatchIn, - ArtifactPatchInFromJSON, - ArtifactPatchInToJSON, -} from '../models/ArtifactPatchIn'; -import { - type CompileJobIn, - CompileJobInFromJSON, - CompileJobInToJSON, -} from '../models/CompileJobIn'; -import { - type CompileJobListOut, - CompileJobListOutFromJSON, - CompileJobListOutToJSON, -} from '../models/CompileJobListOut'; -import { - type CompileJobOut, - CompileJobOutFromJSON, - CompileJobOutToJSON, -} from '../models/CompileJobOut'; -import { - type CompileProjectOut, - CompileProjectOutFromJSON, - CompileProjectOutToJSON, -} from '../models/CompileProjectOut'; -import { - type CopyIn, - CopyInFromJSON, - CopyInToJSON, -} from '../models/CopyIn'; -import { - type DatasetDescriptionOut, - DatasetDescriptionOutFromJSON, - DatasetDescriptionOutToJSON, -} from '../models/DatasetDescriptionOut'; -import { - type DescribeIn, - DescribeInFromJSON, - DescribeInToJSON, -} from '../models/DescribeIn'; -import { - type DownloadUrlOut, - DownloadUrlOutFromJSON, - DownloadUrlOutToJSON, -} from '../models/DownloadUrlOut'; -import { - type DriveDeleteOut, - DriveDeleteOutFromJSON, - DriveDeleteOutToJSON, -} from '../models/DriveDeleteOut'; -import { - type DriveReadOut, - DriveReadOutFromJSON, - DriveReadOutToJSON, -} from '../models/DriveReadOut'; -import { - type DriveRestoreOut, - DriveRestoreOutFromJSON, - DriveRestoreOutToJSON, -} from '../models/DriveRestoreOut'; -import { - type DriveUsageOut, - DriveUsageOutFromJSON, - DriveUsageOutToJSON, -} from '../models/DriveUsageOut'; -import { - type ErrorResponse, - ErrorResponseFromJSON, - ErrorResponseToJSON, -} from '../models/ErrorResponse'; -import { - type EventPage, - EventPageFromJSON, - EventPageToJSON, -} from '../models/EventPage'; -import { - type FeedbackCreateOut, - FeedbackCreateOutFromJSON, - FeedbackCreateOutToJSON, -} from '../models/FeedbackCreateOut'; -import { - type FeedbackStatusOut, - FeedbackStatusOutFromJSON, - FeedbackStatusOutToJSON, -} from '../models/FeedbackStatusOut'; -import { - type FindPage, - FindPageFromJSON, - FindPageToJSON, -} from '../models/FindPage'; -import { - type FolderCopyIn, - FolderCopyInFromJSON, - FolderCopyInToJSON, -} from '../models/FolderCopyIn'; -import { - type FolderCopyOut, - FolderCopyOutFromJSON, - FolderCopyOutToJSON, -} from '../models/FolderCopyOut'; -import { - type FolderCreateIn, - FolderCreateInFromJSON, - FolderCreateInToJSON, -} from '../models/FolderCreateIn'; -import { - type FolderDeleteOut, - FolderDeleteOutFromJSON, - FolderDeleteOutToJSON, -} from '../models/FolderDeleteOut'; -import { - type FolderMoveIn, - FolderMoveInFromJSON, - FolderMoveInToJSON, -} from '../models/FolderMoveIn'; -import { - type FolderOut, - FolderOutFromJSON, - FolderOutToJSON, -} from '../models/FolderOut'; -import { - type FolderPatchIn, - FolderPatchInFromJSON, - FolderPatchInToJSON, -} from '../models/FolderPatchIn'; -import { - type FolderRestoreOut, - FolderRestoreOutFromJSON, - FolderRestoreOutToJSON, -} from '../models/FolderRestoreOut'; -import { - type GrantCreateIn, - GrantCreateInFromJSON, - GrantCreateInToJSON, -} from '../models/GrantCreateIn'; -import { - type GrantList, - GrantListFromJSON, - GrantListToJSON, -} from '../models/GrantList'; -import { - type GrantOut, - GrantOutFromJSON, - GrantOutToJSON, -} from '../models/GrantOut'; -import { - type GrantPatchIn, - GrantPatchInFromJSON, - GrantPatchInToJSON, -} from '../models/GrantPatchIn'; import { type HealthDegradedResponse, HealthDegradedResponseFromJSON, @@ -193,537 +23,6 @@ import { HealthOutFromJSON, HealthOutToJSON, } from '../models/HealthOut'; -import { - type LookupValuesIn, - LookupValuesInFromJSON, - LookupValuesInToJSON, -} from '../models/LookupValuesIn'; -import { - type LookupValuesOut, - LookupValuesOutFromJSON, - LookupValuesOutToJSON, -} from '../models/LookupValuesOut'; -import { - type Page, - PageFromJSON, - PageToJSON, -} from '../models/Page'; -import { - type ProjectConfigIn, - ProjectConfigInFromJSON, - ProjectConfigInToJSON, -} from '../models/ProjectConfigIn'; -import { - type QueryIn, - QueryInFromJSON, - QueryInToJSON, -} from '../models/QueryIn'; -import { - type ResponsePostQueryV0QueryPost, - ResponsePostQueryV0QueryPostFromJSON, - ResponsePostQueryV0QueryPostToJSON, -} from '../models/ResponsePostQueryV0QueryPost'; -import { - type RevokeOut, - RevokeOutFromJSON, - RevokeOutToJSON, -} from '../models/RevokeOut'; -import { - type SearchPage, - SearchPageFromJSON, - SearchPageToJSON, -} from '../models/SearchPage'; -import { - type ShareCreateIn, - ShareCreateInFromJSON, - ShareCreateInToJSON, -} from '../models/ShareCreateIn'; -import { - type ShareErrorOut, - ShareErrorOutFromJSON, - ShareErrorOutToJSON, -} from '../models/ShareErrorOut'; -import { - type ShareList, - ShareListFromJSON, - ShareListToJSON, -} from '../models/ShareList'; -import { - type ShareMintOut, - ShareMintOutFromJSON, - ShareMintOutToJSON, -} from '../models/ShareMintOut'; -import { - type ShareOut, - ShareOutFromJSON, - ShareOutToJSON, -} from '../models/ShareOut'; -import { - type ShareRedeemOut, - ShareRedeemOutFromJSON, - ShareRedeemOutToJSON, -} from '../models/ShareRedeemOut'; -import { - type TrashOut, - TrashOutFromJSON, - TrashOutToJSON, -} from '../models/TrashOut'; -import { - type UploadAbortOut, - UploadAbortOutFromJSON, - UploadAbortOutToJSON, -} from '../models/UploadAbortOut'; -import { - type UploadBeginIn, - UploadBeginInFromJSON, - UploadBeginInToJSON, -} from '../models/UploadBeginIn'; -import { - type UploadBeginOut, - UploadBeginOutFromJSON, - UploadBeginOutToJSON, -} from '../models/UploadBeginOut'; -import { - type UploadStatusOut, - UploadStatusOutFromJSON, - UploadStatusOutToJSON, -} from '../models/UploadStatusOut'; -import { - type ValidationErrorResponse, - ValidationErrorResponseFromJSON, - ValidationErrorResponseToJSON, -} from '../models/ValidationErrorResponse'; -import { - type VersionOut, - VersionOutFromJSON, - VersionOutToJSON, -} from '../models/VersionOut'; -import { - type VersionPage, - VersionPageFromJSON, - VersionPageToJSON, -} from '../models/VersionPage'; - -export interface AbortUploadV0UploadsUploadIdDeleteRequest { - uploadId: string; -} - -export interface BeginUploadV0UploadsPostRequest { - uploadBeginIn: UploadBeginIn; -} - -export interface CallbackAuthCallbackGetRequest { - code?: string | null; - state?: string | null; - error?: string | null; -} - -export interface CancelJobV0JobsJobIdCancelPostRequest { - jobId: string; -} - -export interface CommitUploadV0UploadsUploadIdCommitPostRequest { - uploadId: string; -} - -export interface CopyArtifactRouteV0ArtifactsArtIdCopyPostRequest { - artId: string; - copyIn: CopyIn; - xAgentdriveActor?: string | null; - ifNoneMatch?: string | null; -} - -export interface CopyFolderByIdV0FoldersFldIdCopyPostRequest { - fldId: string; - folderCopyIn: FolderCopyIn; - xAgentdriveActor?: string | null; - ifNoneMatch?: string | null; -} - -export interface CreateFolderByPathV0FoldersPathPutRequest { - path: string; - xAgentdriveActor?: string | null; - ifNoneMatch?: string | null; - folderCreateIn?: FolderCreateIn | null; -} - -export interface CreateGrantRouteV0GrantsPostRequest { - grantCreateIn: GrantCreateIn; - xAgentdriveActor?: string | null; -} - -export interface CreateShareRouteV0SharesPostRequest { - shareCreateIn: ShareCreateIn; - xAgentdriveActor?: string | null; -} - -export interface DeleteArtifactByIdRouteV0ArtifactsArtIdDeleteRequest { - artId: string; - ifMatch?: string | null; - xAgentdriveActor?: string | null; -} - -export interface DeleteArtifactV0ArtifactsPathDeleteRequest { - path: string; - ifMatch?: string | null; - xAgentdriveActor?: string | null; -} - -export interface DeleteDriveRouteV0DrivesDriveIdDeleteRequest { - driveId: string; - confirm?: string | null; - xAgentdriveActor?: string | null; - ifMatch?: string | null; -} - -export interface DeleteFolderByIdV0FoldersFldIdDeleteRequest { - fldId: string; - recursive?: boolean; - xAgentdriveActor?: string | null; - ifMatch?: string | null; -} - -export interface DeleteFolderByPathV0FoldersPathDeleteRequest { - path: string; - recursive?: boolean; - xAgentdriveActor?: string | null; - ifMatch?: string | null; -} - -export interface DeleteGrantRouteV0GrantsGrnIdDeleteRequest { - grnId: string; - xAgentdriveActor?: string | null; -} - -export interface DeleteShareRouteV0SharesShrIdDeleteRequest { - shrId: string; - xAgentdriveActor?: string | null; -} - -export interface DownloadArtifactByIdV0ArtifactsArtIdDownloadGetRequest { - artId: string; -} - -export interface DownloadArtifactByPathV0ArtifactsPathDownloadGetRequest { - path: string; -} - -export interface DownloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGetRequest { - artId: string; - versionNumber: number; -} - -export interface DownloadUrlByIdV0ArtifactsArtIdDownloadUrlGetRequest { - artId: string; -} - -export interface DownloadUrlByPathV0ArtifactsPathDownloadUrlGetRequest { - path: string; -} - -export interface DownloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGetRequest { - artId: string; - versionNumber: number; -} - -export interface EnqueueJobV0ProjectsFldIdJobsPostRequest { - fldId: string; - compileJobIn: CompileJobIn; - xAgentdriveActor?: string | null; -} - -export interface ExtensionStartAuthExtensionStartGetRequest { - extId?: string | null; -} - -export interface FindV0FindGetRequest { - q: string; - mode?: FindV0FindGetModeEnum; - label?: Array; - fileType?: string | null; - prefix?: string | null; - modality?: Array; - updatedAfter?: Date | null; - updatedBefore?: Date | null; - limit?: number; -} - -export interface GetArtifactByIdMetaV0ArtifactsArtIdMetaGetRequest { - artId: string; -} - -export interface GetArtifactByIdV0ArtifactsArtIdGetRequest { - artId: string; -} - -export interface GetArtifactMetaV0ArtifactsPathMetaGetRequest { - path: string; -} - -export interface GetArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGetRequest { - artId: string; - versionNumber: number; -} - -export interface GetDriveRouteV0DrivesDriveIdGetRequest { - driveId: string; -} - -export interface GetFeedbackStatusV0FeedbackFbkIdGetRequest { - fbkId: string; -} - -export interface GetFolderByIdMetaV0FoldersFldIdMetaGetRequest { - fldId: string; -} - -export interface GetFolderByIdV0FoldersFldIdGetRequest { - fldId: string; -} - -export interface GetFolderByPathMetaV0FoldersPathMetaGetRequest { - path: string; -} - -export interface GetFolderByPathV0FoldersPathGetRequest { - path: string; -} - -export interface GetGrantRouteV0GrantsGrnIdGetRequest { - grnId: string; -} - -export interface GetJobLogsV0JobsJobIdLogsGetRequest { - jobId: string; -} - -export interface GetJobV0JobsJobIdGetRequest { - jobId: string; -} - -export interface GetProjectV0ProjectsFldIdGetRequest { - fldId: string; -} - -export interface GetShareRouteV0SharesShrIdGetRequest { - shrId: string; -} - -export interface GetUploadStatusV0UploadsUploadIdGetRequest { - uploadId: string; -} - -export interface ListArtifactVersionsV0ArtifactsArtIdVersionsGetRequest { - artId: string; - cursor?: string | null; - limit?: number; -} - -export interface ListArtifactsV0ArtifactsGetRequest { - prefix?: string; - label?: Array; - fileType?: string | null; - cursor?: string | null; - limit?: number; -} - -export interface ListEventsRouteV0EventsGetRequest { - artId?: string | null; - action?: string | null; - since?: Date | null; - before?: Date | null; - cursor?: string | null; - limit?: number; -} - -export interface ListGrantsRouteV0GrantsGetRequest { - resource: string; - cursor?: string | null; - limit?: number | null; -} - -export interface ListProjectJobsV0ProjectsFldIdJobsGetRequest { - fldId: string; - status?: string | null; - limit?: number; - cursor?: string | null; -} - -export interface ListSharesRouteV0SharesGetRequest { - resource: string; - cursor?: string | null; - limit?: number | null; -} - -export interface ListTrashRouteV0DrivesDriveIdTrashGetRequest { - driveId: string; - cursor?: string | null; - limit?: number | null; -} - -export interface LoginAuthLoginGetRequest { - returnTo?: string | null; -} - -export interface LogoutAuthLogoutPostRequest { - csrf: string; -} - -export interface MoveArtifactRouteV0ArtifactsArtIdMovePostRequest { - artId: string; - artifactMoveIn: ArtifactMoveIn; - xAgentdriveActor?: string | null; - ifMatch?: string | null; -} - -export interface MoveFolderByIdV0FoldersFldIdMovePostRequest { - fldId: string; - folderMoveIn: FolderMoveIn; - xAgentdriveActor?: string | null; - ifMatch?: string | null; -} - -export interface MoveFolderByPathV0FoldersPathMovePostRequest { - path: string; - folderMoveIn: FolderMoveIn; - xAgentdriveActor?: string | null; - ifMatch?: string | null; -} - -export interface PatchArtifactRouteV0ArtifactsArtIdPatchRequest { - artId: string; - artifactPatchIn: ArtifactPatchIn; - xAgentdriveActor?: string | null; - ifMatch?: string | null; -} - -export interface PatchFolderByIdV0FoldersFldIdPatchRequest { - fldId: string; - folderPatchIn: FolderPatchIn; - xAgentdriveActor?: string | null; - ifMatch?: string | null; -} - -export interface PatchFolderByPathV0FoldersPathPatchRequest { - path: string; - folderPatchIn: FolderPatchIn; - xAgentdriveActor?: string | null; - ifMatch?: string | null; -} - -export interface PatchGrantRouteV0GrantsGrnIdPatchRequest { - grnId: string; - grantPatchIn: GrantPatchIn; - xAgentdriveActor?: string | null; -} - -export interface PostDescribeV0QueryDescribePostRequest { - describeIn: DescribeIn; -} - -export interface PostLookupValuesV0QueryLookupValuesPostRequest { - lookupValuesIn: LookupValuesIn; -} - -export interface PostQueryV0QueryPostRequest { - queryIn: QueryIn; -} - -export interface PutArtifactV0ArtifactsPathPutRequest { - path: string; - contentType?: string; - xAgentdriveLabels?: string | null; - xAgentdriveMetadata?: string | null; - xAgentdriveSource?: string | null; - xAgentdriveActor?: string | null; - xAgentdriveChangeSummary?: string | null; - xAgentdriveChecksum?: string | null; - contentMd5?: string | null; - ifMatch?: string | null; - ifNoneMatch?: string | null; -} - -export interface PutProjectV0ProjectsFldIdPutRequest { - fldId: string; - projectConfigIn: ProjectConfigIn; -} - -export interface RedeemShareSShareKeyGetRequest { - shareKey: string; -} - -export interface RedeemShareWithPasswordSShareKeyPostRequest { - shareKey: string; - password?: string; -} - -export interface RestoreArtifactV0ArtifactsArtIdRestorePostRequest { - artId: string; - rename?: string | null; - overwrite?: boolean; - xAgentdriveActor?: string | null; - ifMatch?: string | null; -} - -export interface RestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePostRequest { - artId: string; - versionNumber: number; - xAgentdriveActor?: string | null; - ifMatch?: string | null; -} - -export interface RestoreDriveRouteV0DrivesDriveIdRestorePostRequest { - driveId: string; - xAgentdriveActor?: string | null; - ifMatch?: string | null; -} - -export interface RestoreFolderByIdV0FoldersFldIdRestorePostRequest { - fldId: string; - xAgentdriveActor?: string | null; - ifMatch?: string | null; -} - -export interface RotateShareRouteV0SharesShrIdRotatePostRequest { - shrId: string; - xAgentdriveActor?: string | null; -} - -export interface SearchV0SearchGetRequest { - q: string; - label?: Array; - fileType?: string | null; - prefix?: string | null; - updatedAfter?: Date | null; - updatedBefore?: Date | null; - limit?: number; -} - -export interface ViewArtifactHeadAArtIdHeadGetRequest { - artId: string; -} - -export interface ViewArtifactVersionVArtIdVersionGetRequest { - artId: string; - version: number; - raw?: number; - download?: number; -} - -export interface ViewFileDriveIdPathGetRequest { - driveId: string; - path: string; - raw?: number; - download?: number; -} - -export interface ViewPermalinkArtifactAArtIdGetRequest { - artId: string; -} - -export interface ViewPermalinkFolderFFldIdGetRequest { - fldId: string; -} /** * @@ -731,4820 +30,42 @@ export interface ViewPermalinkFolderFFldIdGetRequest { export class DefaultApi extends runtime.BaseAPI { /** - * Creates request options for abortUploadV0UploadsUploadIdDelete without sending the request - */ - async abortUploadV0UploadsUploadIdDeleteRequestOpts(requestParameters: AbortUploadV0UploadsUploadIdDeleteRequest): Promise { - if (requestParameters['uploadId'] == null) { - throw new runtime.RequiredError( - 'uploadId', - 'Required parameter "uploadId" was null or undefined when calling abortUploadV0UploadsUploadIdDelete().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/uploads/{upload_id}`; - urlPath = urlPath.replace('{upload_id}', encodeURIComponent(String(requestParameters['uploadId']))); - - return { - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Release an open upload session: return its reserved quota to the drive and mark it aborted. Idempotent — aborting an already-aborted or already-expired session succeeds with `released_bytes: 0`. A committed session cannot be aborted (409 ALREADY_COMMITTED). No write budget is charged — this frees resources rather than consuming them. - * Abort a large (direct-to-GCS) upload session - */ - async abortUploadV0UploadsUploadIdDeleteRaw(requestParameters: AbortUploadV0UploadsUploadIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.abortUploadV0UploadsUploadIdDeleteRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => UploadAbortOutFromJSON(jsonValue)); - } - - /** - * Release an open upload session: return its reserved quota to the drive and mark it aborted. Idempotent — aborting an already-aborted or already-expired session succeeds with `released_bytes: 0`. A committed session cannot be aborted (409 ALREADY_COMMITTED). No write budget is charged — this frees resources rather than consuming them. - * Abort a large (direct-to-GCS) upload session - */ - async abortUploadV0UploadsUploadIdDelete(requestParameters: AbortUploadV0UploadsUploadIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.abortUploadV0UploadsUploadIdDeleteRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for beginUploadV0UploadsPost without sending the request + * Creates request options for health without sending the request */ - async beginUploadV0UploadsPostRequestOpts(requestParameters: BeginUploadV0UploadsPostRequest): Promise { - if (requestParameters['uploadBeginIn'] == null) { - throw new runtime.RequiredError( - 'uploadBeginIn', - 'Required parameter "uploadBeginIn" was null or undefined when calling beginUploadV0UploadsPost().' - ); - } - + async healthRequestOpts(): Promise { const queryParameters: any = {}; const headerParameters: runtime.HTTPHeaders = {}; - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/uploads`; + let urlPath = `/health`; return { path: urlPath, - method: 'POST', + method: 'GET', headers: headerParameters, query: queryParameters, - body: UploadBeginInToJSON(requestParameters['uploadBeginIn']), }; } /** - * Reserve quota and open a resumable upload session for a file larger than the buffered-upload limit. Returns a `upload_url` to PUT the raw bytes to DIRECTLY (no Authorization header — the URL is the credential), then call `/v0/uploads/{upload_id}/commit`. All artifact decisions (path, labels, metadata, source, if_match) are frozen here. - * Begin a large (direct-to-GCS) upload + * Liveness + DB-reachability probe. Used by Cloud Run / k8s healthchecks and any uptime monitor. Returns 200 only if the DB pool can serve a trivial query; 503 otherwise so the orchestrator can pull the instance out of rotation. NOTE: route is `/health`, NOT `/healthz`. Google\'s edge infrastructure intercepts `/healthz` (legacy kubernetes-reserved path) and returns a generic 404 before traffic reaches Cloud Run — discovered the hard way during the first prod deploy. Don\'t rename back. + * Health */ - async beginUploadV0UploadsPostRaw(requestParameters: BeginUploadV0UploadsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.beginUploadV0UploadsPostRequestOpts(requestParameters); + async healthRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.healthRequestOpts(); const response = await this.request(requestOptions, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => UploadBeginOutFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => HealthOutFromJSON(jsonValue)); } /** - * Reserve quota and open a resumable upload session for a file larger than the buffered-upload limit. Returns a `upload_url` to PUT the raw bytes to DIRECTLY (no Authorization header — the URL is the credential), then call `/v0/uploads/{upload_id}/commit`. All artifact decisions (path, labels, metadata, source, if_match) are frozen here. - * Begin a large (direct-to-GCS) upload + * Liveness + DB-reachability probe. Used by Cloud Run / k8s healthchecks and any uptime monitor. Returns 200 only if the DB pool can serve a trivial query; 503 otherwise so the orchestrator can pull the instance out of rotation. NOTE: route is `/health`, NOT `/healthz`. Google\'s edge infrastructure intercepts `/healthz` (legacy kubernetes-reserved path) and returns a generic 404 before traffic reaches Cloud Run — discovered the hard way during the first prod deploy. Don\'t rename back. + * Health */ - async beginUploadV0UploadsPost(requestParameters: BeginUploadV0UploadsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.beginUploadV0UploadsPostRaw(requestParameters, initOverrides); + async health(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.healthRaw(initOverrides); return await response.value(); } - /** - * Creates request options for callbackAuthCallbackGet without sending the request - */ - async callbackAuthCallbackGetRequestOpts(requestParameters: CallbackAuthCallbackGetRequest): Promise { - const queryParameters: any = {}; - - if (requestParameters['code'] != null) { - queryParameters['code'] = requestParameters['code']; - } - - if (requestParameters['state'] != null) { - queryParameters['state'] = requestParameters['state']; - } - - if (requestParameters['error'] != null) { - queryParameters['error'] = requestParameters['error']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/auth/callback`; - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Complete a sign-in. Handles the auth provider\'s OAuth callback and shapes failures into user-readable errors: * an invalid or expired login flow — LOGIN_FLOW_INVALID (400); * an invalid or already-used authorization code — AUTH_CODE_INVALID (400); * the upstream auth provider being unavailable — WORKOS_UNAVAILABLE (502), returned with Retry-After. - * Callback - */ - async callbackAuthCallbackGetRaw(requestParameters: CallbackAuthCallbackGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.callbackAuthCallbackGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - if (this.isJsonMime(response.headers.get('content-type'))) { - return new runtime.JSONApiResponse(response); - } else { - return new runtime.TextApiResponse(response) as any; - } - } - - /** - * Complete a sign-in. Handles the auth provider\'s OAuth callback and shapes failures into user-readable errors: * an invalid or expired login flow — LOGIN_FLOW_INVALID (400); * an invalid or already-used authorization code — AUTH_CODE_INVALID (400); * the upstream auth provider being unavailable — WORKOS_UNAVAILABLE (502), returned with Retry-After. - * Callback - */ - async callbackAuthCallbackGet(requestParameters: CallbackAuthCallbackGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.callbackAuthCallbackGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for cancelJobV0JobsJobIdCancelPost without sending the request - */ - async cancelJobV0JobsJobIdCancelPostRequestOpts(requestParameters: CancelJobV0JobsJobIdCancelPostRequest): Promise { - if (requestParameters['jobId'] == null) { - throw new runtime.RequiredError( - 'jobId', - 'Required parameter "jobId" was null or undefined when calling cancelJobV0JobsJobIdCancelPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/jobs/{job_id}/cancel`; - urlPath = urlPath.replace('{job_id}', encodeURIComponent(String(requestParameters['jobId']))); - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Cancel a queued/running job - */ - async cancelJobV0JobsJobIdCancelPostRaw(requestParameters: CancelJobV0JobsJobIdCancelPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.cancelJobV0JobsJobIdCancelPostRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => CompileJobOutFromJSON(jsonValue)); - } - - /** - * Cancel a queued/running job - */ - async cancelJobV0JobsJobIdCancelPost(requestParameters: CancelJobV0JobsJobIdCancelPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.cancelJobV0JobsJobIdCancelPostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for commitUploadV0UploadsUploadIdCommitPost without sending the request - */ - async commitUploadV0UploadsUploadIdCommitPostRequestOpts(requestParameters: CommitUploadV0UploadsUploadIdCommitPostRequest): Promise { - if (requestParameters['uploadId'] == null) { - throw new runtime.RequiredError( - 'uploadId', - 'Required parameter "uploadId" was null or undefined when calling commitUploadV0UploadsUploadIdCommitPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/uploads/{upload_id}/commit`; - urlPath = urlPath.replace('{upload_id}', encodeURIComponent(String(requestParameters['uploadId']))); - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Finalize the upload begun at `/v0/uploads`: AgentDrive verifies the object that landed in GCS (size + checksum) and creates the artifact. Idempotent — a retry after a successful commit returns the same artifact. The write budget is charged when the upload session is created; commit retries are not charged again. - * Commit a large (direct-to-GCS) upload - */ - async commitUploadV0UploadsUploadIdCommitPostRaw(requestParameters: CommitUploadV0UploadsUploadIdCommitPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.commitUploadV0UploadsUploadIdCommitPostRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactOutFromJSON(jsonValue)); - } - - /** - * Finalize the upload begun at `/v0/uploads`: AgentDrive verifies the object that landed in GCS (size + checksum) and creates the artifact. Idempotent — a retry after a successful commit returns the same artifact. The write budget is charged when the upload session is created; commit retries are not charged again. - * Commit a large (direct-to-GCS) upload - */ - async commitUploadV0UploadsUploadIdCommitPost(requestParameters: CommitUploadV0UploadsUploadIdCommitPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.commitUploadV0UploadsUploadIdCommitPostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for copyArtifactRouteV0ArtifactsArtIdCopyPost without sending the request - */ - async copyArtifactRouteV0ArtifactsArtIdCopyPostRequestOpts(requestParameters: CopyArtifactRouteV0ArtifactsArtIdCopyPostRequest): Promise { - if (requestParameters['artId'] == null) { - throw new runtime.RequiredError( - 'artId', - 'Required parameter "artId" was null or undefined when calling copyArtifactRouteV0ArtifactsArtIdCopyPost().' - ); - } - - if (requestParameters['copyIn'] == null) { - throw new runtime.RequiredError( - 'copyIn', - 'Required parameter "copyIn" was null or undefined when calling copyArtifactRouteV0ArtifactsArtIdCopyPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['xAgentdriveActor'] != null) { - headerParameters['x-agentdrive-actor'] = String(requestParameters['xAgentdriveActor']); - } - - if (requestParameters['ifNoneMatch'] != null) { - headerParameters['if-none-match'] = String(requestParameters['ifNoneMatch']); - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/artifacts/{art_id}/copy`; - urlPath = urlPath.replace('{art_id}', encodeURIComponent(String(requestParameters['artId']))); - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: CopyInToJSON(requestParameters['copyIn']), - }; - } - - /** - * Create a new artifact at `path` whose bytes are identical to the source artifact\'s. The copy reuses the source\'s CAS object (zero new storage) but gets a fresh `art_…` ID, a fresh version 1, and — by default — `source.refs = [{type: \'artifact\', id: \'\'}]` so provenance is preserved. Quota: the copy\'s `size_bytes` is added to the drive\'s `storage_bytes` even though physical bytes are shared. Source-version pin: pass `from_generation` in the body to require the source\'s current content generation (`version_number`) to equal it (→ 412 SOURCE_VERSION_MISMATCH); a concurrent source *metadata* edit does NOT fail the copy. Destination create-only: `If-None-Match: *` returns 412 CREATE_CONFLICT (instead of 409 PATH_CONFLICT) when the target path is occupied. Returns 409 PATH_CONFLICT if the target path is already taken; 413 STORAGE_QUOTA_EXCEEDED if the copy would push the drive over its limit. - * Duplicate an artifact to a new path (CAS-shared, new ID) - */ - async copyArtifactRouteV0ArtifactsArtIdCopyPostRaw(requestParameters: CopyArtifactRouteV0ArtifactsArtIdCopyPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.copyArtifactRouteV0ArtifactsArtIdCopyPostRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactOutFromJSON(jsonValue)); - } - - /** - * Create a new artifact at `path` whose bytes are identical to the source artifact\'s. The copy reuses the source\'s CAS object (zero new storage) but gets a fresh `art_…` ID, a fresh version 1, and — by default — `source.refs = [{type: \'artifact\', id: \'\'}]` so provenance is preserved. Quota: the copy\'s `size_bytes` is added to the drive\'s `storage_bytes` even though physical bytes are shared. Source-version pin: pass `from_generation` in the body to require the source\'s current content generation (`version_number`) to equal it (→ 412 SOURCE_VERSION_MISMATCH); a concurrent source *metadata* edit does NOT fail the copy. Destination create-only: `If-None-Match: *` returns 412 CREATE_CONFLICT (instead of 409 PATH_CONFLICT) when the target path is occupied. Returns 409 PATH_CONFLICT if the target path is already taken; 413 STORAGE_QUOTA_EXCEEDED if the copy would push the drive over its limit. - * Duplicate an artifact to a new path (CAS-shared, new ID) - */ - async copyArtifactRouteV0ArtifactsArtIdCopyPost(requestParameters: CopyArtifactRouteV0ArtifactsArtIdCopyPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.copyArtifactRouteV0ArtifactsArtIdCopyPostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for copyFolderByIdV0FoldersFldIdCopyPost without sending the request - */ - async copyFolderByIdV0FoldersFldIdCopyPostRequestOpts(requestParameters: CopyFolderByIdV0FoldersFldIdCopyPostRequest): Promise { - if (requestParameters['fldId'] == null) { - throw new runtime.RequiredError( - 'fldId', - 'Required parameter "fldId" was null or undefined when calling copyFolderByIdV0FoldersFldIdCopyPost().' - ); - } - - if (requestParameters['folderCopyIn'] == null) { - throw new runtime.RequiredError( - 'folderCopyIn', - 'Required parameter "folderCopyIn" was null or undefined when calling copyFolderByIdV0FoldersFldIdCopyPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['xAgentdriveActor'] != null) { - headerParameters['x-agentdrive-actor'] = String(requestParameters['xAgentdriveActor']); - } - - if (requestParameters['ifNoneMatch'] != null) { - headerParameters['if-none-match'] = String(requestParameters['ifNoneMatch']); - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/folders/{fld_id}/copy`; - urlPath = urlPath.replace('{fld_id}', encodeURIComponent(String(requestParameters['fldId']))); - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: FolderCopyInToJSON(requestParameters['folderCopyIn']), - }; - } - - /** - * Clone the folder identified by URL id — and every descendant folder + artifact — under the body\'s `path` (canonical, trailing slash). Each copied artifact reuses the source\'s CAS object (zero new storage) but gets a fresh `art_…` ID, a fresh version 1, and `source.refs = [{type: \'artifact\', id: \'\'}]` provenance. The new folder gets a fresh `fld_…` ID and the source\'s description. The entire subtree is copied in a SINGLE transaction — either every row lands or none does. Quota: each copy\'s `size_bytes` counts against the drive\'s `storage_bytes` even though physical bytes are shared. Source-version pin: pass `from_metageneration` in the body to require the source folder\'s current `metageneration` to equal it (→ 412 SOURCE_VERSION_MISMATCH). Destination create-only: `If-None-Match: *` returns 412 CREATE_CONFLICT (instead of 409 FOLDER_PATH_CONFLICT) when the destination folder is occupied. Returns 409 `FOLDER_PATH_CONFLICT` if the destination collides with a live folder or artifact; 400 `FOLDER_PATH_INVALID` if `path` is non-canonical; 413 `SUBTREE_TOO_LARGE` if the source holds more than 5000 artifacts; 413 `STORAGE_QUOTA_EXCEEDED` if the copy would push the drive over its limit. - * Duplicate a folder subtree to a new path (CAS-shared, new IDs) - */ - async copyFolderByIdV0FoldersFldIdCopyPostRaw(requestParameters: CopyFolderByIdV0FoldersFldIdCopyPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.copyFolderByIdV0FoldersFldIdCopyPostRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => FolderCopyOutFromJSON(jsonValue)); - } - - /** - * Clone the folder identified by URL id — and every descendant folder + artifact — under the body\'s `path` (canonical, trailing slash). Each copied artifact reuses the source\'s CAS object (zero new storage) but gets a fresh `art_…` ID, a fresh version 1, and `source.refs = [{type: \'artifact\', id: \'\'}]` provenance. The new folder gets a fresh `fld_…` ID and the source\'s description. The entire subtree is copied in a SINGLE transaction — either every row lands or none does. Quota: each copy\'s `size_bytes` counts against the drive\'s `storage_bytes` even though physical bytes are shared. Source-version pin: pass `from_metageneration` in the body to require the source folder\'s current `metageneration` to equal it (→ 412 SOURCE_VERSION_MISMATCH). Destination create-only: `If-None-Match: *` returns 412 CREATE_CONFLICT (instead of 409 FOLDER_PATH_CONFLICT) when the destination folder is occupied. Returns 409 `FOLDER_PATH_CONFLICT` if the destination collides with a live folder or artifact; 400 `FOLDER_PATH_INVALID` if `path` is non-canonical; 413 `SUBTREE_TOO_LARGE` if the source holds more than 5000 artifacts; 413 `STORAGE_QUOTA_EXCEEDED` if the copy would push the drive over its limit. - * Duplicate a folder subtree to a new path (CAS-shared, new IDs) - */ - async copyFolderByIdV0FoldersFldIdCopyPost(requestParameters: CopyFolderByIdV0FoldersFldIdCopyPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.copyFolderByIdV0FoldersFldIdCopyPostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for createFolderByPathV0FoldersPathPut without sending the request - */ - async createFolderByPathV0FoldersPathPutRequestOpts(requestParameters: CreateFolderByPathV0FoldersPathPutRequest): Promise { - if (requestParameters['path'] == null) { - throw new runtime.RequiredError( - 'path', - 'Required parameter "path" was null or undefined when calling createFolderByPathV0FoldersPathPut().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['xAgentdriveActor'] != null) { - headerParameters['x-agentdrive-actor'] = String(requestParameters['xAgentdriveActor']); - } - - if (requestParameters['ifNoneMatch'] != null) { - headerParameters['if-none-match'] = String(requestParameters['ifNoneMatch']); - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/folders/{path}`; - urlPath = urlPath.replace('{path}', encodeURIComponent(String(requestParameters['path']))); - - return { - path: urlPath, - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: FolderCreateInToJSON(requestParameters['folderCreateIn']), - }; - } - - /** - * Create a folder at the URL path. Idempotent create-at-known-URI (mirrors `PUT /v0/artifacts/{path}`) — a second call for the same live path returns the existing row unchanged (metadata updates require PATCH). Returns 201 on create, 200 when the folder already exists. Send `If-None-Match: *` to make it strictly create-only: an existing folder then returns 412 CREATE_CONFLICT instead of the idempotent 200. Returns 409 `FOLDER_PATH_CONFLICT` if a live artifact occupies the file form of the path (e.g. mkdir `/foo/` when an artifact lives at `/foo`). - * Create a folder (idempotent) - */ - async createFolderByPathV0FoldersPathPutRaw(requestParameters: CreateFolderByPathV0FoldersPathPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.createFolderByPathV0FoldersPathPutRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => FolderOutFromJSON(jsonValue)); - } - - /** - * Create a folder at the URL path. Idempotent create-at-known-URI (mirrors `PUT /v0/artifacts/{path}`) — a second call for the same live path returns the existing row unchanged (metadata updates require PATCH). Returns 201 on create, 200 when the folder already exists. Send `If-None-Match: *` to make it strictly create-only: an existing folder then returns 412 CREATE_CONFLICT instead of the idempotent 200. Returns 409 `FOLDER_PATH_CONFLICT` if a live artifact occupies the file form of the path (e.g. mkdir `/foo/` when an artifact lives at `/foo`). - * Create a folder (idempotent) - */ - async createFolderByPathV0FoldersPathPut(requestParameters: CreateFolderByPathV0FoldersPathPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createFolderByPathV0FoldersPathPutRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for createGrantRouteV0GrantsPost without sending the request - */ - async createGrantRouteV0GrantsPostRequestOpts(requestParameters: CreateGrantRouteV0GrantsPostRequest): Promise { - if (requestParameters['grantCreateIn'] == null) { - throw new runtime.RequiredError( - 'grantCreateIn', - 'Required parameter "grantCreateIn" was null or undefined when calling createGrantRouteV0GrantsPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['xAgentdriveActor'] != null) { - headerParameters['x-agentdrive-actor'] = String(requestParameters['xAgentdriveActor']); - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/grants`; - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: GrantCreateInToJSON(requestParameters['grantCreateIn']), - }; - } - - /** - * Create (or fetch) a per-principal grant on a resource - */ - async createGrantRouteV0GrantsPostRaw(requestParameters: CreateGrantRouteV0GrantsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.createGrantRouteV0GrantsPostRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => GrantOutFromJSON(jsonValue)); - } - - /** - * Create (or fetch) a per-principal grant on a resource - */ - async createGrantRouteV0GrantsPost(requestParameters: CreateGrantRouteV0GrantsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createGrantRouteV0GrantsPostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for createShareRouteV0SharesPost without sending the request - */ - async createShareRouteV0SharesPostRequestOpts(requestParameters: CreateShareRouteV0SharesPostRequest): Promise { - if (requestParameters['shareCreateIn'] == null) { - throw new runtime.RequiredError( - 'shareCreateIn', - 'Required parameter "shareCreateIn" was null or undefined when calling createShareRouteV0SharesPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['xAgentdriveActor'] != null) { - headerParameters['x-agentdrive-actor'] = String(requestParameters['xAgentdriveActor']); - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/shares`; - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ShareCreateInToJSON(requestParameters['shareCreateIn']), - }; - } - - /** - * Mint a share link (returns the share_key once) - */ - async createShareRouteV0SharesPostRaw(requestParameters: CreateShareRouteV0SharesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.createShareRouteV0SharesPostRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ShareMintOutFromJSON(jsonValue)); - } - - /** - * Mint a share link (returns the share_key once) - */ - async createShareRouteV0SharesPost(requestParameters: CreateShareRouteV0SharesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createShareRouteV0SharesPostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for deleteArtifactByIdRouteV0ArtifactsArtIdDelete without sending the request - */ - async deleteArtifactByIdRouteV0ArtifactsArtIdDeleteRequestOpts(requestParameters: DeleteArtifactByIdRouteV0ArtifactsArtIdDeleteRequest): Promise { - if (requestParameters['artId'] == null) { - throw new runtime.RequiredError( - 'artId', - 'Required parameter "artId" was null or undefined when calling deleteArtifactByIdRouteV0ArtifactsArtIdDelete().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['ifMatch'] != null) { - headerParameters['if-match'] = String(requestParameters['ifMatch']); - } - - if (requestParameters['xAgentdriveActor'] != null) { - headerParameters['x-agentdrive-actor'] = String(requestParameters['xAgentdriveActor']); - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/artifacts/{art_id}`; - urlPath = urlPath.replace('{art_id}', encodeURIComponent(String(requestParameters['artId']))); - - return { - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Soft-delete the artifact with this `art_…` ID. Same semantics + response shape as the path-based `DELETE /v0/artifacts/{path}` (reversible until the GC cron hard-deletes at `purge_at`; `restore_url` points at the by-id restore), but keys on the immutable id so a concurrent rename can\'t change the target. Returns 404 ARTIFACT_NOT_FOUND if no live artifact has this id; 403 WIKI_RESERVED for `_wiki/` artifacts (system-managed); 412 if `If-Match` doesn\'t match the current version. Declared before the `{path:path}` family so the id convertor wins for DELETEs. - * Soft-delete an artifact by its stable ID - */ - async deleteArtifactByIdRouteV0ArtifactsArtIdDeleteRaw(requestParameters: DeleteArtifactByIdRouteV0ArtifactsArtIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.deleteArtifactByIdRouteV0ArtifactsArtIdDeleteRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactDeleteOutFromJSON(jsonValue)); - } - - /** - * Soft-delete the artifact with this `art_…` ID. Same semantics + response shape as the path-based `DELETE /v0/artifacts/{path}` (reversible until the GC cron hard-deletes at `purge_at`; `restore_url` points at the by-id restore), but keys on the immutable id so a concurrent rename can\'t change the target. Returns 404 ARTIFACT_NOT_FOUND if no live artifact has this id; 403 WIKI_RESERVED for `_wiki/` artifacts (system-managed); 412 if `If-Match` doesn\'t match the current version. Declared before the `{path:path}` family so the id convertor wins for DELETEs. - * Soft-delete an artifact by its stable ID - */ - async deleteArtifactByIdRouteV0ArtifactsArtIdDelete(requestParameters: DeleteArtifactByIdRouteV0ArtifactsArtIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.deleteArtifactByIdRouteV0ArtifactsArtIdDeleteRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for deleteArtifactV0ArtifactsPathDelete without sending the request - */ - async deleteArtifactV0ArtifactsPathDeleteRequestOpts(requestParameters: DeleteArtifactV0ArtifactsPathDeleteRequest): Promise { - if (requestParameters['path'] == null) { - throw new runtime.RequiredError( - 'path', - 'Required parameter "path" was null or undefined when calling deleteArtifactV0ArtifactsPathDelete().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['ifMatch'] != null) { - headerParameters['if-match'] = String(requestParameters['ifMatch']); - } - - if (requestParameters['xAgentdriveActor'] != null) { - headerParameters['x-agentdrive-actor'] = String(requestParameters['xAgentdriveActor']); - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/artifacts/{path}`; - urlPath = urlPath.replace('{path}', encodeURIComponent(String(requestParameters['path']))); - - return { - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Soft-delete the artifact at the given path. A delete WITHOUT an `If-Match` precondition is last-writer-wins and will silently remove a concurrently-modified artifact. - * Delete Artifact - */ - async deleteArtifactV0ArtifactsPathDeleteRaw(requestParameters: DeleteArtifactV0ArtifactsPathDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.deleteArtifactV0ArtifactsPathDeleteRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactDeleteOutFromJSON(jsonValue)); - } - - /** - * Soft-delete the artifact at the given path. A delete WITHOUT an `If-Match` precondition is last-writer-wins and will silently remove a concurrently-modified artifact. - * Delete Artifact - */ - async deleteArtifactV0ArtifactsPathDelete(requestParameters: DeleteArtifactV0ArtifactsPathDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.deleteArtifactV0ArtifactsPathDeleteRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for deleteDriveRouteV0DrivesDriveIdDelete without sending the request - */ - async deleteDriveRouteV0DrivesDriveIdDeleteRequestOpts(requestParameters: DeleteDriveRouteV0DrivesDriveIdDeleteRequest): Promise { - if (requestParameters['driveId'] == null) { - throw new runtime.RequiredError( - 'driveId', - 'Required parameter "driveId" was null or undefined when calling deleteDriveRouteV0DrivesDriveIdDelete().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['confirm'] != null) { - queryParameters['confirm'] = requestParameters['confirm']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['xAgentdriveActor'] != null) { - headerParameters['x-agentdrive-actor'] = String(requestParameters['xAgentdriveActor']); - } - - if (requestParameters['ifMatch'] != null) { - headerParameters['if-match'] = String(requestParameters['ifMatch']); - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/drives/{drive_id}`; - urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); - - return { - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Mark the drive for cleanup. All tenant data (artifacts, versions, wiki, embeddings, events) is hidden via the `live_*` views and CASCADE-removed by the GC cleanup cron at `purge_at`. Restore via `POST /v0/drives/{id}/restore` while the row is still in trash. The path-param `drive_id` MUST match the authenticated drive. Accepts either an `ad_live_` per-drive key (deletes that key\'s drive) or an `ad_user_` user token selecting an owned drive (workspaces-design §5.3); a `read`-scope user token is rejected with 403 `INSUFFICIENT_SCOPE`. **Guard (§8):** a workspace must retain at least one live drive — deleting the workspace\'s last live drive returns 409 `LAST_DRIVE`. **Explicit confirmation required:** pass `?confirm=DELETE` or the request is rejected with 400 `CONFIRM_REQUIRED`. Tenant-level deletion is the largest-blast-radius operation on the API; the static token forces a deliberate act (soft-delete still gives a restore window on top). **Optimistic concurrency:** send `If-Match` with the drive\'s composite ETag (`\".0.\"`, from a drive read) to make the delete conditional — a stale token returns 412 PRECONDITION_FAILED. A delete WITHOUT an `If-Match` precondition is last-writer-wins and will silently trash a concurrently-modified drive. - * Soft-delete a drive - */ - async deleteDriveRouteV0DrivesDriveIdDeleteRaw(requestParameters: DeleteDriveRouteV0DrivesDriveIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.deleteDriveRouteV0DrivesDriveIdDeleteRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => DriveDeleteOutFromJSON(jsonValue)); - } - - /** - * Mark the drive for cleanup. All tenant data (artifacts, versions, wiki, embeddings, events) is hidden via the `live_*` views and CASCADE-removed by the GC cleanup cron at `purge_at`. Restore via `POST /v0/drives/{id}/restore` while the row is still in trash. The path-param `drive_id` MUST match the authenticated drive. Accepts either an `ad_live_` per-drive key (deletes that key\'s drive) or an `ad_user_` user token selecting an owned drive (workspaces-design §5.3); a `read`-scope user token is rejected with 403 `INSUFFICIENT_SCOPE`. **Guard (§8):** a workspace must retain at least one live drive — deleting the workspace\'s last live drive returns 409 `LAST_DRIVE`. **Explicit confirmation required:** pass `?confirm=DELETE` or the request is rejected with 400 `CONFIRM_REQUIRED`. Tenant-level deletion is the largest-blast-radius operation on the API; the static token forces a deliberate act (soft-delete still gives a restore window on top). **Optimistic concurrency:** send `If-Match` with the drive\'s composite ETag (`\".0.\"`, from a drive read) to make the delete conditional — a stale token returns 412 PRECONDITION_FAILED. A delete WITHOUT an `If-Match` precondition is last-writer-wins and will silently trash a concurrently-modified drive. - * Soft-delete a drive - */ - async deleteDriveRouteV0DrivesDriveIdDelete(requestParameters: DeleteDriveRouteV0DrivesDriveIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.deleteDriveRouteV0DrivesDriveIdDeleteRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for deleteFolderByIdV0FoldersFldIdDelete without sending the request - */ - async deleteFolderByIdV0FoldersFldIdDeleteRequestOpts(requestParameters: DeleteFolderByIdV0FoldersFldIdDeleteRequest): Promise { - if (requestParameters['fldId'] == null) { - throw new runtime.RequiredError( - 'fldId', - 'Required parameter "fldId" was null or undefined when calling deleteFolderByIdV0FoldersFldIdDelete().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['recursive'] != null) { - queryParameters['recursive'] = requestParameters['recursive']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['xAgentdriveActor'] != null) { - headerParameters['x-agentdrive-actor'] = String(requestParameters['xAgentdriveActor']); - } - - if (requestParameters['ifMatch'] != null) { - headerParameters['if-match'] = String(requestParameters['ifMatch']); - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/folders/{fld_id}`; - urlPath = urlPath.replace('{fld_id}', encodeURIComponent(String(requestParameters['fldId']))); - - return { - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Soft-delete a folder by stable ID (cascade with ?recursive=true) - */ - async deleteFolderByIdV0FoldersFldIdDeleteRaw(requestParameters: DeleteFolderByIdV0FoldersFldIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.deleteFolderByIdV0FoldersFldIdDeleteRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => FolderDeleteOutFromJSON(jsonValue)); - } - - /** - * Soft-delete a folder by stable ID (cascade with ?recursive=true) - */ - async deleteFolderByIdV0FoldersFldIdDelete(requestParameters: DeleteFolderByIdV0FoldersFldIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.deleteFolderByIdV0FoldersFldIdDeleteRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for deleteFolderByPathV0FoldersPathDelete without sending the request - */ - async deleteFolderByPathV0FoldersPathDeleteRequestOpts(requestParameters: DeleteFolderByPathV0FoldersPathDeleteRequest): Promise { - if (requestParameters['path'] == null) { - throw new runtime.RequiredError( - 'path', - 'Required parameter "path" was null or undefined when calling deleteFolderByPathV0FoldersPathDelete().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['recursive'] != null) { - queryParameters['recursive'] = requestParameters['recursive']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['xAgentdriveActor'] != null) { - headerParameters['x-agentdrive-actor'] = String(requestParameters['xAgentdriveActor']); - } - - if (requestParameters['ifMatch'] != null) { - headerParameters['if-match'] = String(requestParameters['ifMatch']); - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/folders/{path}`; - urlPath = urlPath.replace('{path}', encodeURIComponent(String(requestParameters['path']))); - - return { - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Soft-delete the folder. Refuses if the folder has live descendants unless `?recursive=true` is set, in which case ALL descendant folders + artifacts are soft-deleted in the same transaction. Returns 409 `FOLDER_RECURSIVE_REQUIRED` (with descendant counts in `colliding_path`) when recursion is needed but the flag isn\'t set. Retention window is frozen on `purge_at` per deletion-design.md §5.1; mid-retention tier changes don\'t shift it. - * Soft-delete a folder (cascade with ?recursive=true) - */ - async deleteFolderByPathV0FoldersPathDeleteRaw(requestParameters: DeleteFolderByPathV0FoldersPathDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.deleteFolderByPathV0FoldersPathDeleteRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => FolderDeleteOutFromJSON(jsonValue)); - } - - /** - * Soft-delete the folder. Refuses if the folder has live descendants unless `?recursive=true` is set, in which case ALL descendant folders + artifacts are soft-deleted in the same transaction. Returns 409 `FOLDER_RECURSIVE_REQUIRED` (with descendant counts in `colliding_path`) when recursion is needed but the flag isn\'t set. Retention window is frozen on `purge_at` per deletion-design.md §5.1; mid-retention tier changes don\'t shift it. - * Soft-delete a folder (cascade with ?recursive=true) - */ - async deleteFolderByPathV0FoldersPathDelete(requestParameters: DeleteFolderByPathV0FoldersPathDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.deleteFolderByPathV0FoldersPathDeleteRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for deleteGrantRouteV0GrantsGrnIdDelete without sending the request - */ - async deleteGrantRouteV0GrantsGrnIdDeleteRequestOpts(requestParameters: DeleteGrantRouteV0GrantsGrnIdDeleteRequest): Promise { - if (requestParameters['grnId'] == null) { - throw new runtime.RequiredError( - 'grnId', - 'Required parameter "grnId" was null or undefined when calling deleteGrantRouteV0GrantsGrnIdDelete().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['xAgentdriveActor'] != null) { - headerParameters['x-agentdrive-actor'] = String(requestParameters['xAgentdriveActor']); - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/grants/{grn_id}`; - urlPath = urlPath.replace('{grn_id}', encodeURIComponent(String(requestParameters['grnId']))); - - return { - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Revoke a grant (can_manage, or self-revoke own grant) - */ - async deleteGrantRouteV0GrantsGrnIdDeleteRaw(requestParameters: DeleteGrantRouteV0GrantsGrnIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.deleteGrantRouteV0GrantsGrnIdDeleteRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => RevokeOutFromJSON(jsonValue)); - } - - /** - * Revoke a grant (can_manage, or self-revoke own grant) - */ - async deleteGrantRouteV0GrantsGrnIdDelete(requestParameters: DeleteGrantRouteV0GrantsGrnIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.deleteGrantRouteV0GrantsGrnIdDeleteRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for deleteShareRouteV0SharesShrIdDelete without sending the request - */ - async deleteShareRouteV0SharesShrIdDeleteRequestOpts(requestParameters: DeleteShareRouteV0SharesShrIdDeleteRequest): Promise { - if (requestParameters['shrId'] == null) { - throw new runtime.RequiredError( - 'shrId', - 'Required parameter "shrId" was null or undefined when calling deleteShareRouteV0SharesShrIdDelete().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['xAgentdriveActor'] != null) { - headerParameters['x-agentdrive-actor'] = String(requestParameters['xAgentdriveActor']); - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/shares/{shr_id}`; - urlPath = urlPath.replace('{shr_id}', encodeURIComponent(String(requestParameters['shrId']))); - - return { - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Revoke a share link (requires can_manage) - */ - async deleteShareRouteV0SharesShrIdDeleteRaw(requestParameters: DeleteShareRouteV0SharesShrIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.deleteShareRouteV0SharesShrIdDeleteRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => RevokeOutFromJSON(jsonValue)); - } - - /** - * Revoke a share link (requires can_manage) - */ - async deleteShareRouteV0SharesShrIdDelete(requestParameters: DeleteShareRouteV0SharesShrIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.deleteShareRouteV0SharesShrIdDeleteRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for downloadArtifactByIdV0ArtifactsArtIdDownloadGet without sending the request - */ - async downloadArtifactByIdV0ArtifactsArtIdDownloadGetRequestOpts(requestParameters: DownloadArtifactByIdV0ArtifactsArtIdDownloadGetRequest): Promise { - if (requestParameters['artId'] == null) { - throw new runtime.RequiredError( - 'artId', - 'Required parameter "artId" was null or undefined when calling downloadArtifactByIdV0ArtifactsArtIdDownloadGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/artifacts/{art_id}/download`; - urlPath = urlPath.replace('{art_id}', encodeURIComponent(String(requestParameters['artId']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Stream the artifact bytes by stable ID (never rendered HTML) - */ - async downloadArtifactByIdV0ArtifactsArtIdDownloadGetRaw(requestParameters: DownloadArtifactByIdV0ArtifactsArtIdDownloadGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.downloadArtifactByIdV0ArtifactsArtIdDownloadGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.BlobApiResponse(response); - } - - /** - * Stream the artifact bytes by stable ID (never rendered HTML) - */ - async downloadArtifactByIdV0ArtifactsArtIdDownloadGet(requestParameters: DownloadArtifactByIdV0ArtifactsArtIdDownloadGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.downloadArtifactByIdV0ArtifactsArtIdDownloadGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for downloadArtifactByPathV0ArtifactsPathDownloadGet without sending the request - */ - async downloadArtifactByPathV0ArtifactsPathDownloadGetRequestOpts(requestParameters: DownloadArtifactByPathV0ArtifactsPathDownloadGetRequest): Promise { - if (requestParameters['path'] == null) { - throw new runtime.RequiredError( - 'path', - 'Required parameter "path" was null or undefined when calling downloadArtifactByPathV0ArtifactsPathDownloadGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/artifacts/{path}/download`; - urlPath = urlPath.replace('{path}', encodeURIComponent(String(requestParameters['path']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Same bytes-only machine surface as `/{art_id}/download` but resolves the artifact by path, so callers don\'t have to resolve path→id first. Applies the identical CSP `sandbox` + `nosniff` posture (never serves HTML inline as active content). - * Stream the artifact bytes by path (never rendered HTML) - */ - async downloadArtifactByPathV0ArtifactsPathDownloadGetRaw(requestParameters: DownloadArtifactByPathV0ArtifactsPathDownloadGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.downloadArtifactByPathV0ArtifactsPathDownloadGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.BlobApiResponse(response); - } - - /** - * Same bytes-only machine surface as `/{art_id}/download` but resolves the artifact by path, so callers don\'t have to resolve path→id first. Applies the identical CSP `sandbox` + `nosniff` posture (never serves HTML inline as active content). - * Stream the artifact bytes by path (never rendered HTML) - */ - async downloadArtifactByPathV0ArtifactsPathDownloadGet(requestParameters: DownloadArtifactByPathV0ArtifactsPathDownloadGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.downloadArtifactByPathV0ArtifactsPathDownloadGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for downloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGet without sending the request - */ - async downloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGetRequestOpts(requestParameters: DownloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGetRequest): Promise { - if (requestParameters['artId'] == null) { - throw new runtime.RequiredError( - 'artId', - 'Required parameter "artId" was null or undefined when calling downloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGet().' - ); - } - - if (requestParameters['versionNumber'] == null) { - throw new runtime.RequiredError( - 'versionNumber', - 'Required parameter "versionNumber" was null or undefined when calling downloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/artifacts/{art_id}/versions/{version_number}/download`; - urlPath = urlPath.replace('{art_id}', encodeURIComponent(String(requestParameters['artId']))); - urlPath = urlPath.replace('{version_number}', encodeURIComponent(String(requestParameters['versionNumber']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Stream bytes for a specific version (machine surface) - */ - async downloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGetRaw(requestParameters: DownloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.downloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.BlobApiResponse(response); - } - - /** - * Stream bytes for a specific version (machine surface) - */ - async downloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGet(requestParameters: DownloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.downloadArtifactVersionV0ArtifactsArtIdVersionsVersionNumberDownloadGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for downloadUrlByIdV0ArtifactsArtIdDownloadUrlGet without sending the request - */ - async downloadUrlByIdV0ArtifactsArtIdDownloadUrlGetRequestOpts(requestParameters: DownloadUrlByIdV0ArtifactsArtIdDownloadUrlGetRequest): Promise { - if (requestParameters['artId'] == null) { - throw new runtime.RequiredError( - 'artId', - 'Required parameter "artId" was null or undefined when calling downloadUrlByIdV0ArtifactsArtIdDownloadUrlGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/artifacts/{art_id}/download-url`; - urlPath = urlPath.replace('{art_id}', encodeURIComponent(String(requestParameters['artId']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Returns a URL for the artifact\'s bytes. For large artifacts (>= the signed-download threshold) when signing is available, it\'s a short-lived **signed GCS URL** the client fetches directly (`direct:true`, `expires_at` set); otherwise the **proxy** `/download` URL (`direct:false`). Treat the URL as opaque. large-download-design.md §5.1. - * Signed direct-from-GCS download URL by stable ID - */ - async downloadUrlByIdV0ArtifactsArtIdDownloadUrlGetRaw(requestParameters: DownloadUrlByIdV0ArtifactsArtIdDownloadUrlGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.downloadUrlByIdV0ArtifactsArtIdDownloadUrlGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => DownloadUrlOutFromJSON(jsonValue)); - } - - /** - * Returns a URL for the artifact\'s bytes. For large artifacts (>= the signed-download threshold) when signing is available, it\'s a short-lived **signed GCS URL** the client fetches directly (`direct:true`, `expires_at` set); otherwise the **proxy** `/download` URL (`direct:false`). Treat the URL as opaque. large-download-design.md §5.1. - * Signed direct-from-GCS download URL by stable ID - */ - async downloadUrlByIdV0ArtifactsArtIdDownloadUrlGet(requestParameters: DownloadUrlByIdV0ArtifactsArtIdDownloadUrlGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.downloadUrlByIdV0ArtifactsArtIdDownloadUrlGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for downloadUrlByPathV0ArtifactsPathDownloadUrlGet without sending the request - */ - async downloadUrlByPathV0ArtifactsPathDownloadUrlGetRequestOpts(requestParameters: DownloadUrlByPathV0ArtifactsPathDownloadUrlGetRequest): Promise { - if (requestParameters['path'] == null) { - throw new runtime.RequiredError( - 'path', - 'Required parameter "path" was null or undefined when calling downloadUrlByPathV0ArtifactsPathDownloadUrlGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/artifacts/{path}/download-url`; - urlPath = urlPath.replace('{path}', encodeURIComponent(String(requestParameters['path']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Same as `/{art_id}/download-url` but resolves the artifact by path. The returned proxy URL (when `direct:false`) still points at the by-id `/download` endpoint. large-download-design.md §5.1. - * Signed direct-from-GCS download URL by path - */ - async downloadUrlByPathV0ArtifactsPathDownloadUrlGetRaw(requestParameters: DownloadUrlByPathV0ArtifactsPathDownloadUrlGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.downloadUrlByPathV0ArtifactsPathDownloadUrlGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => DownloadUrlOutFromJSON(jsonValue)); - } - - /** - * Same as `/{art_id}/download-url` but resolves the artifact by path. The returned proxy URL (when `direct:false`) still points at the by-id `/download` endpoint. large-download-design.md §5.1. - * Signed direct-from-GCS download URL by path - */ - async downloadUrlByPathV0ArtifactsPathDownloadUrlGet(requestParameters: DownloadUrlByPathV0ArtifactsPathDownloadUrlGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.downloadUrlByPathV0ArtifactsPathDownloadUrlGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for downloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGet without sending the request - */ - async downloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGetRequestOpts(requestParameters: DownloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGetRequest): Promise { - if (requestParameters['artId'] == null) { - throw new runtime.RequiredError( - 'artId', - 'Required parameter "artId" was null or undefined when calling downloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGet().' - ); - } - - if (requestParameters['versionNumber'] == null) { - throw new runtime.RequiredError( - 'versionNumber', - 'Required parameter "versionNumber" was null or undefined when calling downloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/artifacts/{art_id}/versions/{version_number}/download-url`; - urlPath = urlPath.replace('{art_id}', encodeURIComponent(String(requestParameters['artId']))); - urlPath = urlPath.replace('{version_number}', encodeURIComponent(String(requestParameters['versionNumber']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Same as `/{art_id}/download-url` but for a specific version\'s bytes (`direct:true` signed GCS URL when large + signing available, else the proxy `/versions/{n}/download` URL). large-download-design.md §5.1. - * Signed direct-from-GCS download URL for a specific version - */ - async downloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGetRaw(requestParameters: DownloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.downloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => DownloadUrlOutFromJSON(jsonValue)); - } - - /** - * Same as `/{art_id}/download-url` but for a specific version\'s bytes (`direct:true` signed GCS URL when large + signing available, else the proxy `/versions/{n}/download` URL). large-download-design.md §5.1. - * Signed direct-from-GCS download URL for a specific version - */ - async downloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGet(requestParameters: DownloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.downloadUrlVersionV0ArtifactsArtIdVersionsVersionNumberDownloadUrlGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for enqueueJobV0ProjectsFldIdJobsPost without sending the request - */ - async enqueueJobV0ProjectsFldIdJobsPostRequestOpts(requestParameters: EnqueueJobV0ProjectsFldIdJobsPostRequest): Promise { - if (requestParameters['fldId'] == null) { - throw new runtime.RequiredError( - 'fldId', - 'Required parameter "fldId" was null or undefined when calling enqueueJobV0ProjectsFldIdJobsPost().' - ); - } - - if (requestParameters['compileJobIn'] == null) { - throw new runtime.RequiredError( - 'compileJobIn', - 'Required parameter "compileJobIn" was null or undefined when calling enqueueJobV0ProjectsFldIdJobsPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['xAgentdriveActor'] != null) { - headerParameters['x-agentdrive-actor'] = String(requestParameters['xAgentdriveActor']); - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/projects/{fld_id}/jobs`; - urlPath = urlPath.replace('{fld_id}', encodeURIComponent(String(requestParameters['fldId']))); - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: CompileJobInToJSON(requestParameters['compileJobIn']), - }; - } - - /** - * Enqueue a compile job for a project (folder) - */ - async enqueueJobV0ProjectsFldIdJobsPostRaw(requestParameters: EnqueueJobV0ProjectsFldIdJobsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.enqueueJobV0ProjectsFldIdJobsPostRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => CompileJobOutFromJSON(jsonValue)); - } - - /** - * Enqueue a compile job for a project (folder) - */ - async enqueueJobV0ProjectsFldIdJobsPost(requestParameters: EnqueueJobV0ProjectsFldIdJobsPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.enqueueJobV0ProjectsFldIdJobsPostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for extensionStartAuthExtensionStartGet without sending the request - */ - async extensionStartAuthExtensionStartGetRequestOpts(requestParameters: ExtensionStartAuthExtensionStartGetRequest): Promise { - const queryParameters: any = {}; - - if (requestParameters['extId'] != null) { - queryParameters['ext_id'] = requestParameters['extId']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/auth/extension/start`; - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Begin a sign-in flow on behalf of a Chrome extension. Provider follows AUTH_MODE (WorkOS AuthKit or the TokenCanopy hub), exactly like /auth/login. Stamps `for=ext` + `ext_id` into the signed OAuth state so the callback handler knows to render the extension handoff page instead of setting a session cookie. Three short-circuits, all surface as actionable errors: * EXTENSION_AUTH_DISABLED (503): kill switch flipped off. * UNKNOWN_EXTENSION (400): `ext_id` not on the allow-list. * Missing `ext_id` query string (400 INVALID_REQUEST). - * Extension Start - */ - async extensionStartAuthExtensionStartGetRaw(requestParameters: ExtensionStartAuthExtensionStartGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.extensionStartAuthExtensionStartGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Begin a sign-in flow on behalf of a Chrome extension. Provider follows AUTH_MODE (WorkOS AuthKit or the TokenCanopy hub), exactly like /auth/login. Stamps `for=ext` + `ext_id` into the signed OAuth state so the callback handler knows to render the extension handoff page instead of setting a session cookie. Three short-circuits, all surface as actionable errors: * EXTENSION_AUTH_DISABLED (503): kill switch flipped off. * UNKNOWN_EXTENSION (400): `ext_id` not on the allow-list. * Missing `ext_id` query string (400 INVALID_REQUEST). - * Extension Start - */ - async extensionStartAuthExtensionStartGet(requestParameters: ExtensionStartAuthExtensionStartGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.extensionStartAuthExtensionStartGetRaw(requestParameters, initOverrides); - } - - /** - * Creates request options for findV0FindGet without sending the request - */ - async findV0FindGetRequestOpts(requestParameters: FindV0FindGetRequest): Promise { - if (requestParameters['q'] == null) { - throw new runtime.RequiredError( - 'q', - 'Required parameter "q" was null or undefined when calling findV0FindGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['q'] != null) { - queryParameters['q'] = requestParameters['q']; - } - - if (requestParameters['mode'] != null) { - queryParameters['mode'] = requestParameters['mode']; - } - - if (requestParameters['label'] != null) { - queryParameters['label'] = requestParameters['label']; - } - - if (requestParameters['fileType'] != null) { - queryParameters['file_type'] = requestParameters['fileType']; - } - - if (requestParameters['prefix'] != null) { - queryParameters['prefix'] = requestParameters['prefix']; - } - - if (requestParameters['modality'] != null) { - queryParameters['modality'] = requestParameters['modality']; - } - - if (requestParameters['updatedAfter'] != null) { - queryParameters['updated_after'] = (requestParameters['updatedAfter'] as any).toISOString(); - } - - if (requestParameters['updatedBefore'] != null) { - queryParameters['updated_before'] = (requestParameters['updatedBefore'] as any).toISOString(); - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/find`; - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Passage-level chunk RAG over `embed_chunks`. Lexical (`chunk_tsv`, GIN) + semantic (HNSW over `embedding`) are run in parallel and fused via Reciprocal Rank Fusion (k=60). Unlike `/v0/search`, which only sees the first ~16 KB preview of each artifact, `/v0/find` reaches the full file body. **Modes:** - `hybrid` (default) — lexical + semantic, RRF-fused. - `lexical` — `chunk_tsv` only. Best for exact tokens, identifiers, code snippets. - `semantic` — embedding only. Best for conceptual queries where the surface terms differ from the query phrasing. **Granularity:** results are passages, not files. A long document with multiple matching regions returns multiple hits with distinct `ord` values; consecutive `ord`s overlap by ~400 tokens. Dedupe by `art_id` if you want one row per file. **Span citations:** `char_start`/`char_end` for text & code, `page_start`/`page_end` for PDFs, `time_start_ms`/`time_end_ms` for audio & video. Only the modality-relevant pair is populated. **Filters:** `label`, `file_type`, `prefix`, `modality` (repeatable), `updated_after` / `updated_before` (RFC 3339 timestamps, inclusive bounds on `updated_at`, applied to both legs). **Wiki coverage:** `/v0/find` excludes `_wiki/` paths by default and — importantly — does NOT cover them even when the caller passes `prefix=_wiki/...`. Wiki pages are not embedded by the pipeline (they\'re system-generated output, not user input), so `embed_chunks` has no rows for them and the join returns empty. Use `wiki_search` (or `list`/`grep` with a `_wiki/` prefix) for the wiki layer. **Embedding availability:** when `GEMINI_API_KEY` is not configured, `mode=semantic` returns 503; `mode=hybrid` logs a warning and falls back to lexical-only; `mode=lexical` is unaffected. - * Hybrid passage retrieval over the full file body - */ - async findV0FindGetRaw(requestParameters: FindV0FindGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.findV0FindGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => FindPageFromJSON(jsonValue)); - } - - /** - * Passage-level chunk RAG over `embed_chunks`. Lexical (`chunk_tsv`, GIN) + semantic (HNSW over `embedding`) are run in parallel and fused via Reciprocal Rank Fusion (k=60). Unlike `/v0/search`, which only sees the first ~16 KB preview of each artifact, `/v0/find` reaches the full file body. **Modes:** - `hybrid` (default) — lexical + semantic, RRF-fused. - `lexical` — `chunk_tsv` only. Best for exact tokens, identifiers, code snippets. - `semantic` — embedding only. Best for conceptual queries where the surface terms differ from the query phrasing. **Granularity:** results are passages, not files. A long document with multiple matching regions returns multiple hits with distinct `ord` values; consecutive `ord`s overlap by ~400 tokens. Dedupe by `art_id` if you want one row per file. **Span citations:** `char_start`/`char_end` for text & code, `page_start`/`page_end` for PDFs, `time_start_ms`/`time_end_ms` for audio & video. Only the modality-relevant pair is populated. **Filters:** `label`, `file_type`, `prefix`, `modality` (repeatable), `updated_after` / `updated_before` (RFC 3339 timestamps, inclusive bounds on `updated_at`, applied to both legs). **Wiki coverage:** `/v0/find` excludes `_wiki/` paths by default and — importantly — does NOT cover them even when the caller passes `prefix=_wiki/...`. Wiki pages are not embedded by the pipeline (they\'re system-generated output, not user input), so `embed_chunks` has no rows for them and the join returns empty. Use `wiki_search` (or `list`/`grep` with a `_wiki/` prefix) for the wiki layer. **Embedding availability:** when `GEMINI_API_KEY` is not configured, `mode=semantic` returns 503; `mode=hybrid` logs a warning and falls back to lexical-only; `mode=lexical` is unaffected. - * Hybrid passage retrieval over the full file body - */ - async findV0FindGet(requestParameters: FindV0FindGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.findV0FindGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for getArtifactByIdMetaV0ArtifactsArtIdMetaGet without sending the request - */ - async getArtifactByIdMetaV0ArtifactsArtIdMetaGetRequestOpts(requestParameters: GetArtifactByIdMetaV0ArtifactsArtIdMetaGetRequest): Promise { - if (requestParameters['artId'] == null) { - throw new runtime.RequiredError( - 'artId', - 'Required parameter "artId" was null or undefined when calling getArtifactByIdMetaV0ArtifactsArtIdMetaGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/artifacts/{art_id}/meta`; - urlPath = urlPath.replace('{art_id}', encodeURIComponent(String(requestParameters['artId']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Artifact metadata by stable ID (same shape as path /meta) - */ - async getArtifactByIdMetaV0ArtifactsArtIdMetaGetRaw(requestParameters: GetArtifactByIdMetaV0ArtifactsArtIdMetaGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.getArtifactByIdMetaV0ArtifactsArtIdMetaGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactOutFromJSON(jsonValue)); - } - - /** - * Artifact metadata by stable ID (same shape as path /meta) - */ - async getArtifactByIdMetaV0ArtifactsArtIdMetaGet(requestParameters: GetArtifactByIdMetaV0ArtifactsArtIdMetaGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getArtifactByIdMetaV0ArtifactsArtIdMetaGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for getArtifactByIdV0ArtifactsArtIdGet without sending the request - */ - async getArtifactByIdV0ArtifactsArtIdGetRequestOpts(requestParameters: GetArtifactByIdV0ArtifactsArtIdGetRequest): Promise { - if (requestParameters['artId'] == null) { - throw new runtime.RequiredError( - 'artId', - 'Required parameter "artId" was null or undefined when calling getArtifactByIdV0ArtifactsArtIdGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/artifacts/{art_id}`; - urlPath = urlPath.replace('{art_id}', encodeURIComponent(String(requestParameters['artId']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Canonical lookup of an artifact by its stable ID - */ - async getArtifactByIdV0ArtifactsArtIdGetRaw(requestParameters: GetArtifactByIdV0ArtifactsArtIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.getArtifactByIdV0ArtifactsArtIdGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactOutFromJSON(jsonValue)); - } - - /** - * Canonical lookup of an artifact by its stable ID - */ - async getArtifactByIdV0ArtifactsArtIdGet(requestParameters: GetArtifactByIdV0ArtifactsArtIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getArtifactByIdV0ArtifactsArtIdGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for getArtifactMetaV0ArtifactsPathMetaGet without sending the request - */ - async getArtifactMetaV0ArtifactsPathMetaGetRequestOpts(requestParameters: GetArtifactMetaV0ArtifactsPathMetaGetRequest): Promise { - if (requestParameters['path'] == null) { - throw new runtime.RequiredError( - 'path', - 'Required parameter "path" was null or undefined when calling getArtifactMetaV0ArtifactsPathMetaGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/artifacts/{path}/meta`; - urlPath = urlPath.replace('{path}', encodeURIComponent(String(requestParameters['path']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Get Artifact Meta - */ - async getArtifactMetaV0ArtifactsPathMetaGetRaw(requestParameters: GetArtifactMetaV0ArtifactsPathMetaGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.getArtifactMetaV0ArtifactsPathMetaGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactOutFromJSON(jsonValue)); - } - - /** - * Get Artifact Meta - */ - async getArtifactMetaV0ArtifactsPathMetaGet(requestParameters: GetArtifactMetaV0ArtifactsPathMetaGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getArtifactMetaV0ArtifactsPathMetaGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for getArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGet without sending the request - */ - async getArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGetRequestOpts(requestParameters: GetArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGetRequest): Promise { - if (requestParameters['artId'] == null) { - throw new runtime.RequiredError( - 'artId', - 'Required parameter "artId" was null or undefined when calling getArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGet().' - ); - } - - if (requestParameters['versionNumber'] == null) { - throw new runtime.RequiredError( - 'versionNumber', - 'Required parameter "versionNumber" was null or undefined when calling getArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/artifacts/{art_id}/versions/{version_number}`; - urlPath = urlPath.replace('{art_id}', encodeURIComponent(String(requestParameters['artId']))); - urlPath = urlPath.replace('{version_number}', encodeURIComponent(String(requestParameters['versionNumber']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Metadata for a specific version of an artifact - */ - async getArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGetRaw(requestParameters: GetArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.getArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => VersionOutFromJSON(jsonValue)); - } - - /** - * Metadata for a specific version of an artifact - */ - async getArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGet(requestParameters: GetArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getArtifactVersionV0ArtifactsArtIdVersionsVersionNumberGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for getDriveRouteV0DrivesDriveIdGet without sending the request - */ - async getDriveRouteV0DrivesDriveIdGetRequestOpts(requestParameters: GetDriveRouteV0DrivesDriveIdGetRequest): Promise { - if (requestParameters['driveId'] == null) { - throw new runtime.RequiredError( - 'driveId', - 'Required parameter "driveId" was null or undefined when calling getDriveRouteV0DrivesDriveIdGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/drives/{drive_id}`; - urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Identical to `GET /v0/drives/me` — the by-id singleton so `Location`-style URLs and scripted clients can address the drive canonically. The path-param `drive_id` MUST match the authenticated drive (mirrors the delete/trash routes\' no-leak 404). Emits the drive\'s composite `ETag` header (`\".0.\"`). - * Drive overview by id (same shape as /drives/me) - */ - async getDriveRouteV0DrivesDriveIdGetRaw(requestParameters: GetDriveRouteV0DrivesDriveIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.getDriveRouteV0DrivesDriveIdGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => DriveReadOutFromJSON(jsonValue)); - } - - /** - * Identical to `GET /v0/drives/me` — the by-id singleton so `Location`-style URLs and scripted clients can address the drive canonically. The path-param `drive_id` MUST match the authenticated drive (mirrors the delete/trash routes\' no-leak 404). Emits the drive\'s composite `ETag` header (`\".0.\"`). - * Drive overview by id (same shape as /drives/me) - */ - async getDriveRouteV0DrivesDriveIdGet(requestParameters: GetDriveRouteV0DrivesDriveIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getDriveRouteV0DrivesDriveIdGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for getFeedbackStatusV0FeedbackFbkIdGet without sending the request - */ - async getFeedbackStatusV0FeedbackFbkIdGetRequestOpts(requestParameters: GetFeedbackStatusV0FeedbackFbkIdGetRequest): Promise { - if (requestParameters['fbkId'] == null) { - throw new runtime.RequiredError( - 'fbkId', - 'Required parameter "fbkId" was null or undefined when calling getFeedbackStatusV0FeedbackFbkIdGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/feedback/{fbk_id}`; - urlPath = urlPath.replace('{fbk_id}', encodeURIComponent(String(requestParameters['fbkId']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Lifecycle status of feedback THIS drive filed. Foreign tickets read as 404 — indistinguishable from absent. - * Get Feedback Status - */ - async getFeedbackStatusV0FeedbackFbkIdGetRaw(requestParameters: GetFeedbackStatusV0FeedbackFbkIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.getFeedbackStatusV0FeedbackFbkIdGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => FeedbackStatusOutFromJSON(jsonValue)); - } - - /** - * Lifecycle status of feedback THIS drive filed. Foreign tickets read as 404 — indistinguishable from absent. - * Get Feedback Status - */ - async getFeedbackStatusV0FeedbackFbkIdGet(requestParameters: GetFeedbackStatusV0FeedbackFbkIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getFeedbackStatusV0FeedbackFbkIdGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for getFolderByIdMetaV0FoldersFldIdMetaGet without sending the request - */ - async getFolderByIdMetaV0FoldersFldIdMetaGetRequestOpts(requestParameters: GetFolderByIdMetaV0FoldersFldIdMetaGetRequest): Promise { - if (requestParameters['fldId'] == null) { - throw new runtime.RequiredError( - 'fldId', - 'Required parameter "fldId" was null or undefined when calling getFolderByIdMetaV0FoldersFldIdMetaGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/folders/{fld_id}/meta`; - urlPath = urlPath.replace('{fld_id}', encodeURIComponent(String(requestParameters['fldId']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Folder metadata by stable ID (same shape as the bare id route) - */ - async getFolderByIdMetaV0FoldersFldIdMetaGetRaw(requestParameters: GetFolderByIdMetaV0FoldersFldIdMetaGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.getFolderByIdMetaV0FoldersFldIdMetaGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => FolderOutFromJSON(jsonValue)); - } - - /** - * Folder metadata by stable ID (same shape as the bare id route) - */ - async getFolderByIdMetaV0FoldersFldIdMetaGet(requestParameters: GetFolderByIdMetaV0FoldersFldIdMetaGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getFolderByIdMetaV0FoldersFldIdMetaGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for getFolderByIdV0FoldersFldIdGet without sending the request - */ - async getFolderByIdV0FoldersFldIdGetRequestOpts(requestParameters: GetFolderByIdV0FoldersFldIdGetRequest): Promise { - if (requestParameters['fldId'] == null) { - throw new runtime.RequiredError( - 'fldId', - 'Required parameter "fldId" was null or undefined when calling getFolderByIdV0FoldersFldIdGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/folders/{fld_id}`; - urlPath = urlPath.replace('{fld_id}', encodeURIComponent(String(requestParameters['fldId']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Canonical lookup of a folder by its stable ID - */ - async getFolderByIdV0FoldersFldIdGetRaw(requestParameters: GetFolderByIdV0FoldersFldIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.getFolderByIdV0FoldersFldIdGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => FolderOutFromJSON(jsonValue)); - } - - /** - * Canonical lookup of a folder by its stable ID - */ - async getFolderByIdV0FoldersFldIdGet(requestParameters: GetFolderByIdV0FoldersFldIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getFolderByIdV0FoldersFldIdGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for getFolderByPathMetaV0FoldersPathMetaGet without sending the request - */ - async getFolderByPathMetaV0FoldersPathMetaGetRequestOpts(requestParameters: GetFolderByPathMetaV0FoldersPathMetaGetRequest): Promise { - if (requestParameters['path'] == null) { - throw new runtime.RequiredError( - 'path', - 'Required parameter "path" was null or undefined when calling getFolderByPathMetaV0FoldersPathMetaGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/folders/{path}/meta`; - urlPath = urlPath.replace('{path}', encodeURIComponent(String(requestParameters['path']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Folder metadata by path (same shape as the bare path route) - */ - async getFolderByPathMetaV0FoldersPathMetaGetRaw(requestParameters: GetFolderByPathMetaV0FoldersPathMetaGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.getFolderByPathMetaV0FoldersPathMetaGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => FolderOutFromJSON(jsonValue)); - } - - /** - * Folder metadata by path (same shape as the bare path route) - */ - async getFolderByPathMetaV0FoldersPathMetaGet(requestParameters: GetFolderByPathMetaV0FoldersPathMetaGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getFolderByPathMetaV0FoldersPathMetaGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for getFolderByPathV0FoldersPathGet without sending the request - */ - async getFolderByPathV0FoldersPathGetRequestOpts(requestParameters: GetFolderByPathV0FoldersPathGetRequest): Promise { - if (requestParameters['path'] == null) { - throw new runtime.RequiredError( - 'path', - 'Required parameter "path" was null or undefined when calling getFolderByPathV0FoldersPathGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/folders/{path}`; - urlPath = urlPath.replace('{path}', encodeURIComponent(String(requestParameters['path']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Read folder metadata by path - */ - async getFolderByPathV0FoldersPathGetRaw(requestParameters: GetFolderByPathV0FoldersPathGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.getFolderByPathV0FoldersPathGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => FolderOutFromJSON(jsonValue)); - } - - /** - * Read folder metadata by path - */ - async getFolderByPathV0FoldersPathGet(requestParameters: GetFolderByPathV0FoldersPathGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getFolderByPathV0FoldersPathGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for getGrantRouteV0GrantsGrnIdGet without sending the request - */ - async getGrantRouteV0GrantsGrnIdGetRequestOpts(requestParameters: GetGrantRouteV0GrantsGrnIdGetRequest): Promise { - if (requestParameters['grnId'] == null) { - throw new runtime.RequiredError( - 'grnId', - 'Required parameter "grnId" was null or undefined when calling getGrantRouteV0GrantsGrnIdGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/grants/{grn_id}`; - urlPath = urlPath.replace('{grn_id}', encodeURIComponent(String(requestParameters['grnId']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * The `Location` target of `POST /v0/grants`. Authorization mirrors DELETE: `can_manage` on the granted resource, or the caller IS the grant\'s own principal (a grantee may read — like revoke — their own grant). A revoked grant reads as 404 (same no-leak shape as a foreign/absent id); DELETE stays idempotent on it. - * Read a single grant (can_manage, or the grant\'s own principal) - */ - async getGrantRouteV0GrantsGrnIdGetRaw(requestParameters: GetGrantRouteV0GrantsGrnIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.getGrantRouteV0GrantsGrnIdGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => GrantOutFromJSON(jsonValue)); - } - - /** - * The `Location` target of `POST /v0/grants`. Authorization mirrors DELETE: `can_manage` on the granted resource, or the caller IS the grant\'s own principal (a grantee may read — like revoke — their own grant). A revoked grant reads as 404 (same no-leak shape as a foreign/absent id); DELETE stays idempotent on it. - * Read a single grant (can_manage, or the grant\'s own principal) - */ - async getGrantRouteV0GrantsGrnIdGet(requestParameters: GetGrantRouteV0GrantsGrnIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getGrantRouteV0GrantsGrnIdGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for getJobLogsV0JobsJobIdLogsGet without sending the request - */ - async getJobLogsV0JobsJobIdLogsGetRequestOpts(requestParameters: GetJobLogsV0JobsJobIdLogsGetRequest): Promise { - if (requestParameters['jobId'] == null) { - throw new runtime.RequiredError( - 'jobId', - 'Required parameter "jobId" was null or undefined when calling getJobLogsV0JobsJobIdLogsGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/jobs/{job_id}/logs`; - urlPath = urlPath.replace('{job_id}', encodeURIComponent(String(requestParameters['jobId']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Raw compile log (text/plain) - */ - async getJobLogsV0JobsJobIdLogsGetRaw(requestParameters: GetJobLogsV0JobsJobIdLogsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.getJobLogsV0JobsJobIdLogsGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - if (this.isJsonMime(response.headers.get('content-type'))) { - return new runtime.JSONApiResponse(response); - } else { - return new runtime.TextApiResponse(response) as any; - } - } - - /** - * Raw compile log (text/plain) - */ - async getJobLogsV0JobsJobIdLogsGet(requestParameters: GetJobLogsV0JobsJobIdLogsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getJobLogsV0JobsJobIdLogsGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for getJobV0JobsJobIdGet without sending the request - */ - async getJobV0JobsJobIdGetRequestOpts(requestParameters: GetJobV0JobsJobIdGetRequest): Promise { - if (requestParameters['jobId'] == null) { - throw new runtime.RequiredError( - 'jobId', - 'Required parameter "jobId" was null or undefined when calling getJobV0JobsJobIdGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/jobs/{job_id}`; - urlPath = urlPath.replace('{job_id}', encodeURIComponent(String(requestParameters['jobId']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Poll a job - */ - async getJobV0JobsJobIdGetRaw(requestParameters: GetJobV0JobsJobIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.getJobV0JobsJobIdGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => CompileJobOutFromJSON(jsonValue)); - } - - /** - * Poll a job - */ - async getJobV0JobsJobIdGet(requestParameters: GetJobV0JobsJobIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getJobV0JobsJobIdGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for getProjectV0ProjectsFldIdGet without sending the request - */ - async getProjectV0ProjectsFldIdGetRequestOpts(requestParameters: GetProjectV0ProjectsFldIdGetRequest): Promise { - if (requestParameters['fldId'] == null) { - throw new runtime.RequiredError( - 'fldId', - 'Required parameter "fldId" was null or undefined when calling getProjectV0ProjectsFldIdGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/projects/{fld_id}`; - urlPath = urlPath.replace('{fld_id}', encodeURIComponent(String(requestParameters['fldId']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Get a project\'s compile config - */ - async getProjectV0ProjectsFldIdGetRaw(requestParameters: GetProjectV0ProjectsFldIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.getProjectV0ProjectsFldIdGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => CompileProjectOutFromJSON(jsonValue)); - } - - /** - * Get a project\'s compile config - */ - async getProjectV0ProjectsFldIdGet(requestParameters: GetProjectV0ProjectsFldIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getProjectV0ProjectsFldIdGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for getShareRouteV0SharesShrIdGet without sending the request - */ - async getShareRouteV0SharesShrIdGetRequestOpts(requestParameters: GetShareRouteV0SharesShrIdGetRequest): Promise { - if (requestParameters['shrId'] == null) { - throw new runtime.RequiredError( - 'shrId', - 'Required parameter "shrId" was null or undefined when calling getShareRouteV0SharesShrIdGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/shares/{shr_id}`; - urlPath = urlPath.replace('{shr_id}', encodeURIComponent(String(requestParameters['shrId']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * The `Location` target of `POST /v0/shares`. Metadata ONLY — `ShareOut` never carries the raw `share_key`/URL (returned exactly once at mint/rotate, §4.5). Authorization mirrors DELETE: `can_manage` on the shared resource. A revoked share reads as 404 (same no-leak shape as a foreign/absent id). - * Read a single share link\'s metadata (requires can_manage) - */ - async getShareRouteV0SharesShrIdGetRaw(requestParameters: GetShareRouteV0SharesShrIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.getShareRouteV0SharesShrIdGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ShareOutFromJSON(jsonValue)); - } - - /** - * The `Location` target of `POST /v0/shares`. Metadata ONLY — `ShareOut` never carries the raw `share_key`/URL (returned exactly once at mint/rotate, §4.5). Authorization mirrors DELETE: `can_manage` on the shared resource. A revoked share reads as 404 (same no-leak shape as a foreign/absent id). - * Read a single share link\'s metadata (requires can_manage) - */ - async getShareRouteV0SharesShrIdGet(requestParameters: GetShareRouteV0SharesShrIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getShareRouteV0SharesShrIdGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for getUploadStatusV0UploadsUploadIdGet without sending the request - */ - async getUploadStatusV0UploadsUploadIdGetRequestOpts(requestParameters: GetUploadStatusV0UploadsUploadIdGetRequest): Promise { - if (requestParameters['uploadId'] == null) { - throw new runtime.RequiredError( - 'uploadId', - 'Required parameter "uploadId" was null or undefined when calling getUploadStatusV0UploadsUploadIdGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/uploads/{upload_id}`; - urlPath = urlPath.replace('{upload_id}', encodeURIComponent(String(requestParameters['uploadId']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Report the live state of an upload session begun at `/v0/uploads`. `state` is derived: `initiated` (open — PUT the bytes then commit), `committed` (artifact created), `aborted` (released via DELETE), or `expired` (past `expires_at` without a commit). Read-only; charges the read budget. - * Get the status of a large (direct-to-GCS) upload session - */ - async getUploadStatusV0UploadsUploadIdGetRaw(requestParameters: GetUploadStatusV0UploadsUploadIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.getUploadStatusV0UploadsUploadIdGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => UploadStatusOutFromJSON(jsonValue)); - } - - /** - * Report the live state of an upload session begun at `/v0/uploads`. `state` is derived: `initiated` (open — PUT the bytes then commit), `committed` (artifact created), `aborted` (released via DELETE), or `expired` (past `expires_at` without a commit). Read-only; charges the read budget. - * Get the status of a large (direct-to-GCS) upload session - */ - async getUploadStatusV0UploadsUploadIdGet(requestParameters: GetUploadStatusV0UploadsUploadIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getUploadStatusV0UploadsUploadIdGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for healthHealthGet without sending the request - */ - async healthHealthGetRequestOpts(): Promise { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/health`; - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Liveness + DB-reachability probe. Used by Cloud Run / k8s healthchecks and any uptime monitor. Returns 200 only if the DB pool can serve a trivial query; 503 otherwise so the orchestrator can pull the instance out of rotation. NOTE: route is `/health`, NOT `/healthz`. Google\'s edge infrastructure intercepts `/healthz` (legacy kubernetes-reserved path) and returns a generic 404 before traffic reaches Cloud Run — discovered the hard way during the first prod deploy. Don\'t rename back. - * Health - */ - async healthHealthGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.healthHealthGetRequestOpts(); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => HealthOutFromJSON(jsonValue)); - } - - /** - * Liveness + DB-reachability probe. Used by Cloud Run / k8s healthchecks and any uptime monitor. Returns 200 only if the DB pool can serve a trivial query; 503 otherwise so the orchestrator can pull the instance out of rotation. NOTE: route is `/health`, NOT `/healthz`. Google\'s edge infrastructure intercepts `/healthz` (legacy kubernetes-reserved path) and returns a generic 404 before traffic reaches Cloud Run — discovered the hard way during the first prod deploy. Don\'t rename back. - * Health - */ - async healthHealthGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.healthHealthGetRaw(initOverrides); - return await response.value(); - } - - /** - * Creates request options for listArtifactVersionsV0ArtifactsArtIdVersionsGet without sending the request - */ - async listArtifactVersionsV0ArtifactsArtIdVersionsGetRequestOpts(requestParameters: ListArtifactVersionsV0ArtifactsArtIdVersionsGetRequest): Promise { - if (requestParameters['artId'] == null) { - throw new runtime.RequiredError( - 'artId', - 'Required parameter "artId" was null or undefined when calling listArtifactVersionsV0ArtifactsArtIdVersionsGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['cursor'] != null) { - queryParameters['cursor'] = requestParameters['cursor']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/artifacts/{art_id}/versions`; - urlPath = urlPath.replace('{art_id}', encodeURIComponent(String(requestParameters['artId']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Returns versions in descending `version_number` order. Cursor pagination via `?cursor=`; `next_cursor` is non-null when the page is full and more older versions may exist. - * List versions of an artifact, newest first - */ - async listArtifactVersionsV0ArtifactsArtIdVersionsGetRaw(requestParameters: ListArtifactVersionsV0ArtifactsArtIdVersionsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.listArtifactVersionsV0ArtifactsArtIdVersionsGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => VersionPageFromJSON(jsonValue)); - } - - /** - * Returns versions in descending `version_number` order. Cursor pagination via `?cursor=`; `next_cursor` is non-null when the page is full and more older versions may exist. - * List versions of an artifact, newest first - */ - async listArtifactVersionsV0ArtifactsArtIdVersionsGet(requestParameters: ListArtifactVersionsV0ArtifactsArtIdVersionsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listArtifactVersionsV0ArtifactsArtIdVersionsGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for listArtifactsV0ArtifactsGet without sending the request - */ - async listArtifactsV0ArtifactsGetRequestOpts(requestParameters: ListArtifactsV0ArtifactsGetRequest): Promise { - const queryParameters: any = {}; - - if (requestParameters['prefix'] != null) { - queryParameters['prefix'] = requestParameters['prefix']; - } - - if (requestParameters['label'] != null) { - queryParameters['label'] = requestParameters['label']; - } - - if (requestParameters['fileType'] != null) { - queryParameters['file_type'] = requestParameters['fileType']; - } - - if (requestParameters['cursor'] != null) { - queryParameters['cursor'] = requestParameters['cursor']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/artifacts`; - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Returns artifacts sorted by path. Filter by `prefix`, `label` (repeatable + AND-combined), and `file_type`. **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page. `next_cursor` is `null` on the final page. Filters MUST stay consistent across pages — the cursor encodes only the keyset position, not the filter set, so the client is responsible for re-sending the same filter on each page. - * List artifacts in the drive - */ - async listArtifactsV0ArtifactsGetRaw(requestParameters: ListArtifactsV0ArtifactsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.listArtifactsV0ArtifactsGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => PageFromJSON(jsonValue)); - } - - /** - * Returns artifacts sorted by path. Filter by `prefix`, `label` (repeatable + AND-combined), and `file_type`. **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page. `next_cursor` is `null` on the final page. Filters MUST stay consistent across pages — the cursor encodes only the keyset position, not the filter set, so the client is responsible for re-sending the same filter on each page. - * List artifacts in the drive - */ - async listArtifactsV0ArtifactsGet(requestParameters: ListArtifactsV0ArtifactsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listArtifactsV0ArtifactsGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for listEventsRouteV0EventsGet without sending the request - */ - async listEventsRouteV0EventsGetRequestOpts(requestParameters: ListEventsRouteV0EventsGetRequest): Promise { - const queryParameters: any = {}; - - if (requestParameters['artId'] != null) { - queryParameters['art_id'] = requestParameters['artId']; - } - - if (requestParameters['action'] != null) { - queryParameters['action'] = requestParameters['action']; - } - - if (requestParameters['since'] != null) { - queryParameters['since'] = (requestParameters['since'] as any).toISOString(); - } - - if (requestParameters['before'] != null) { - queryParameters['before'] = (requestParameters['before'] as any).toISOString(); - } - - if (requestParameters['cursor'] != null) { - queryParameters['cursor'] = requestParameters['cursor']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/events`; - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Returns events newest-first. Filters compose with AND. **Cursor pagination:** pass the oldest event\'s `created_at` from the previous page as `before` to fetch the next page back in time. Combine `since` + `before` to bound a window. - * Read the append-only event log for the authenticated drive - */ - async listEventsRouteV0EventsGetRaw(requestParameters: ListEventsRouteV0EventsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.listEventsRouteV0EventsGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => EventPageFromJSON(jsonValue)); - } - - /** - * Returns events newest-first. Filters compose with AND. **Cursor pagination:** pass the oldest event\'s `created_at` from the previous page as `before` to fetch the next page back in time. Combine `since` + `before` to bound a window. - * Read the append-only event log for the authenticated drive - */ - async listEventsRouteV0EventsGet(requestParameters: ListEventsRouteV0EventsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listEventsRouteV0EventsGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for listGrantsRouteV0GrantsGet without sending the request - */ - async listGrantsRouteV0GrantsGetRequestOpts(requestParameters: ListGrantsRouteV0GrantsGetRequest): Promise { - if (requestParameters['resource'] == null) { - throw new runtime.RequiredError( - 'resource', - 'Required parameter "resource" was null or undefined when calling listGrantsRouteV0GrantsGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['resource'] != null) { - queryParameters['resource'] = requestParameters['resource']; - } - - if (requestParameters['cursor'] != null) { - queryParameters['cursor'] = requestParameters['cursor']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/grants`; - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. The `resource` filter must be re-sent on every page — the cursor encodes only the keyset position. - * List live grants on a resource (requires can_manage) - */ - async listGrantsRouteV0GrantsGetRaw(requestParameters: ListGrantsRouteV0GrantsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.listGrantsRouteV0GrantsGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => GrantListFromJSON(jsonValue)); - } - - /** - * **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. The `resource` filter must be re-sent on every page — the cursor encodes only the keyset position. - * List live grants on a resource (requires can_manage) - */ - async listGrantsRouteV0GrantsGet(requestParameters: ListGrantsRouteV0GrantsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listGrantsRouteV0GrantsGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for listProjectJobsV0ProjectsFldIdJobsGet without sending the request - */ - async listProjectJobsV0ProjectsFldIdJobsGetRequestOpts(requestParameters: ListProjectJobsV0ProjectsFldIdJobsGetRequest): Promise { - if (requestParameters['fldId'] == null) { - throw new runtime.RequiredError( - 'fldId', - 'Required parameter "fldId" was null or undefined when calling listProjectJobsV0ProjectsFldIdJobsGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['status'] != null) { - queryParameters['status'] = requestParameters['status']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - if (requestParameters['cursor'] != null) { - queryParameters['cursor'] = requestParameters['cursor']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/projects/{fld_id}/jobs`; - urlPath = urlPath.replace('{fld_id}', encodeURIComponent(String(requestParameters['fldId']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * List compile jobs newest first in stable `(created_at, job_id)` descending order. Pass a non-null `next_cursor` back as `cursor` to continue; malformed cursors return `400 BAD_CURSOR`. The cursor contains only the keyset position, so a `status` filter must be re-sent unchanged on every page. `limit` retains its existing default of 50 and validated range of 1 through 200. - * List a project\'s jobs - */ - async listProjectJobsV0ProjectsFldIdJobsGetRaw(requestParameters: ListProjectJobsV0ProjectsFldIdJobsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.listProjectJobsV0ProjectsFldIdJobsGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => CompileJobListOutFromJSON(jsonValue)); - } - - /** - * List compile jobs newest first in stable `(created_at, job_id)` descending order. Pass a non-null `next_cursor` back as `cursor` to continue; malformed cursors return `400 BAD_CURSOR`. The cursor contains only the keyset position, so a `status` filter must be re-sent unchanged on every page. `limit` retains its existing default of 50 and validated range of 1 through 200. - * List a project\'s jobs - */ - async listProjectJobsV0ProjectsFldIdJobsGet(requestParameters: ListProjectJobsV0ProjectsFldIdJobsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listProjectJobsV0ProjectsFldIdJobsGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for listSharesRouteV0SharesGet without sending the request - */ - async listSharesRouteV0SharesGetRequestOpts(requestParameters: ListSharesRouteV0SharesGetRequest): Promise { - if (requestParameters['resource'] == null) { - throw new runtime.RequiredError( - 'resource', - 'Required parameter "resource" was null or undefined when calling listSharesRouteV0SharesGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['resource'] != null) { - queryParameters['resource'] = requestParameters['resource']; - } - - if (requestParameters['cursor'] != null) { - queryParameters['cursor'] = requestParameters['cursor']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/shares`; - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. The `resource` filter must be re-sent on every page — the cursor encodes only the keyset position. - * List live share links on a resource (requires can_manage) - */ - async listSharesRouteV0SharesGetRaw(requestParameters: ListSharesRouteV0SharesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.listSharesRouteV0SharesGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ShareListFromJSON(jsonValue)); - } - - /** - * **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. The `resource` filter must be re-sent on every page — the cursor encodes only the keyset position. - * List live share links on a resource (requires can_manage) - */ - async listSharesRouteV0SharesGet(requestParameters: ListSharesRouteV0SharesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listSharesRouteV0SharesGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for listTrashRouteV0DrivesDriveIdTrashGet without sending the request - */ - async listTrashRouteV0DrivesDriveIdTrashGetRequestOpts(requestParameters: ListTrashRouteV0DrivesDriveIdTrashGetRequest): Promise { - if (requestParameters['driveId'] == null) { - throw new runtime.RequiredError( - 'driveId', - 'Required parameter "driveId" was null or undefined when calling listTrashRouteV0DrivesDriveIdTrashGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['cursor'] != null) { - queryParameters['cursor'] = requestParameters['cursor']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/drives/{drive_id}/trash`; - urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Returns soft-deleted artifacts on the drive plus the drive\'s own soft-delete state (if applicable). The path-param `drive_id` MUST match the authenticated drive. **Compatibility window:** `limit` or `cursor` opts into cursor pagination. Unadorned requests retain the legacy complete result during the migration window. Paginated requests are clamped to 1–100 items (default 50 when only `cursor` is supplied). `items` is canonical; `artifacts` is a deprecated same-value alias. - * List the authenticated drive\'s trash - */ - async listTrashRouteV0DrivesDriveIdTrashGetRaw(requestParameters: ListTrashRouteV0DrivesDriveIdTrashGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.listTrashRouteV0DrivesDriveIdTrashGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => TrashOutFromJSON(jsonValue)); - } - - /** - * Returns soft-deleted artifacts on the drive plus the drive\'s own soft-delete state (if applicable). The path-param `drive_id` MUST match the authenticated drive. **Compatibility window:** `limit` or `cursor` opts into cursor pagination. Unadorned requests retain the legacy complete result during the migration window. Paginated requests are clamped to 1–100 items (default 50 when only `cursor` is supplied). `items` is canonical; `artifacts` is a deprecated same-value alias. - * List the authenticated drive\'s trash - */ - async listTrashRouteV0DrivesDriveIdTrashGet(requestParameters: ListTrashRouteV0DrivesDriveIdTrashGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listTrashRouteV0DrivesDriveIdTrashGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for loginAuthLoginGet without sending the request - */ - async loginAuthLoginGetRequestOpts(requestParameters: LoginAuthLoginGetRequest): Promise { - const queryParameters: any = {}; - - if (requestParameters['returnTo'] != null) { - queryParameters['return_to'] = requestParameters['returnTo']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/auth/login`; - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Begin a WorkOS sign-in flow. Mints a pre-login state cookie (binds the OAuth flow to this browser — defense-in-depth against login-CSRF), signs a state payload, and redirects to AuthKit. The hosted AuthKit page lets the user pick Google OAuth, Microsoft OAuth, magic-link, password, or passkey; we don\'t care which — they all funnel back to /auth/callback with a `code` we exchange in D2. - * Login - */ - async loginAuthLoginGetRaw(requestParameters: LoginAuthLoginGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.loginAuthLoginGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Begin a WorkOS sign-in flow. Mints a pre-login state cookie (binds the OAuth flow to this browser — defense-in-depth against login-CSRF), signs a state payload, and redirects to AuthKit. The hosted AuthKit page lets the user pick Google OAuth, Microsoft OAuth, magic-link, password, or passkey; we don\'t care which — they all funnel back to /auth/callback with a `code` we exchange in D2. - * Login - */ - async loginAuthLoginGet(requestParameters: LoginAuthLoginGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.loginAuthLoginGetRaw(requestParameters, initOverrides); - } - - /** - * Creates request options for logoutAuthLogoutPost without sending the request - */ - async logoutAuthLogoutPostRequestOpts(requestParameters: LogoutAuthLogoutPostRequest): Promise { - if (requestParameters['csrf'] == null) { - throw new runtime.RequiredError( - 'csrf', - 'Required parameter "csrf" was null or undefined when calling logoutAuthLogoutPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const consumes: runtime.Consume[] = [ - { contentType: 'application/x-www-form-urlencoded' }, - ]; - // @ts-ignore: canConsumeForm may be unused - const canConsumeForm = runtime.canConsumeForm(consumes); - - let formParams: { append(param: string, value: any): any }; - let useForm = false; - if (useForm) { - formParams = new FormData(); - } else { - formParams = new URLSearchParams(); - } - - if (requestParameters['csrf'] != null) { - formParams.append('csrf', requestParameters['csrf'] as any); - } - - - let urlPath = `/auth/logout`; - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: formParams, - }; - } - - /** - * Terminate both the local session AND the upstream WorkOS session. Without the WorkOS-side termination, the next `/auth/login` flow silently re-authenticates the user through AuthKit\'s still-valid session cookie on `api.workos.com` — \"Sign out\" feels broken and a shared-browser user can\'t switch accounts. The recommended pattern (per https://workos.com/docs/authkit/sessions) is to redirect to the WorkOS logout endpoint with the `sid` we stashed during the callback; WorkOS clears its own session and returns the browser to our `return_to`. Failure modes handled: * No `workos_session_id` in the session (legacy v2 cookie issued before this slice landed): fall back to local-only logout. The upstream session lingers but the user\'s local state is cleared — same UX as before this slice; cookie rotation on next sign-in eventually overwrites it. * SDK raises during `get_logout_url`: pure string formatting at WorkOS\'s end, so the only realistic failure is a misconfigured WorkOS dashboard (no Sign-out redirect registered). We catch and fall back to local-only logout rather than 500ing — the user clicked \"Sign out\", they should land somewhere, not on an error page. - * Logout - */ - async logoutAuthLogoutPostRaw(requestParameters: LogoutAuthLogoutPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.logoutAuthLogoutPostRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Terminate both the local session AND the upstream WorkOS session. Without the WorkOS-side termination, the next `/auth/login` flow silently re-authenticates the user through AuthKit\'s still-valid session cookie on `api.workos.com` — \"Sign out\" feels broken and a shared-browser user can\'t switch accounts. The recommended pattern (per https://workos.com/docs/authkit/sessions) is to redirect to the WorkOS logout endpoint with the `sid` we stashed during the callback; WorkOS clears its own session and returns the browser to our `return_to`. Failure modes handled: * No `workos_session_id` in the session (legacy v2 cookie issued before this slice landed): fall back to local-only logout. The upstream session lingers but the user\'s local state is cleared — same UX as before this slice; cookie rotation on next sign-in eventually overwrites it. * SDK raises during `get_logout_url`: pure string formatting at WorkOS\'s end, so the only realistic failure is a misconfigured WorkOS dashboard (no Sign-out redirect registered). We catch and fall back to local-only logout rather than 500ing — the user clicked \"Sign out\", they should land somewhere, not on an error page. - * Logout - */ - async logoutAuthLogoutPost(requestParameters: LogoutAuthLogoutPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.logoutAuthLogoutPostRaw(requestParameters, initOverrides); - } - - /** - * Creates request options for meUsageV0DrivesMeUsageGet without sending the request - */ - async meUsageV0DrivesMeUsageGetRequestOpts(): Promise { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/drives/me/usage`; - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Unified view of every metered dimension: storage (snapshot), writes (current hour), indexing ops + retrieval queries (current calendar month UTC). Each row carries `used` and `limit`; `limit: 0` means unlimited (the v0 free-tier default for the two monthly counters). Reads are de-throttled — there is no hourly read budget; the monthly read count appears under `ops_this_month.reads`. - * Current-period usage + caps for the authenticated drive - */ - async meUsageV0DrivesMeUsageGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.meUsageV0DrivesMeUsageGetRequestOpts(); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => DriveUsageOutFromJSON(jsonValue)); - } - - /** - * Unified view of every metered dimension: storage (snapshot), writes (current hour), indexing ops + retrieval queries (current calendar month UTC). Each row carries `used` and `limit`; `limit: 0` means unlimited (the v0 free-tier default for the two monthly counters). Reads are de-throttled — there is no hourly read budget; the monthly read count appears under `ops_this_month.reads`. - * Current-period usage + caps for the authenticated drive - */ - async meUsageV0DrivesMeUsageGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.meUsageV0DrivesMeUsageGetRaw(initOverrides); - return await response.value(); - } - - /** - * Creates request options for meV0DrivesMeGet without sending the request - */ - async meV0DrivesMeGetRequestOpts(): Promise { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/drives/me`; - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Drive overview for the authenticated bearer token. Wire-protocol preservation (WorkOS integration §6): the `email` field is preserved in the response shape; its meaning is now \"the drive\'s owner\'s email\" (via `drives.owner_user_id` → `users.email`, joined in `auth.resolve_drive`). For solo signups this equals v0 behavior — the email the user signed up with. Returns null if the owner has been hard-purged. `organization_id` is a new additive field, as are `metageneration` / `etag` (also emitted as the `ETag` header). - * Me - */ - async meV0DrivesMeGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.meV0DrivesMeGetRequestOpts(); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => DriveReadOutFromJSON(jsonValue)); - } - - /** - * Drive overview for the authenticated bearer token. Wire-protocol preservation (WorkOS integration §6): the `email` field is preserved in the response shape; its meaning is now \"the drive\'s owner\'s email\" (via `drives.owner_user_id` → `users.email`, joined in `auth.resolve_drive`). For solo signups this equals v0 behavior — the email the user signed up with. Returns null if the owner has been hard-purged. `organization_id` is a new additive field, as are `metageneration` / `etag` (also emitted as the `ETag` header). - * Me - */ - async meV0DrivesMeGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.meV0DrivesMeGetRaw(initOverrides); - return await response.value(); - } - - /** - * Creates request options for moveArtifactRouteV0ArtifactsArtIdMovePost without sending the request - */ - async moveArtifactRouteV0ArtifactsArtIdMovePostRequestOpts(requestParameters: MoveArtifactRouteV0ArtifactsArtIdMovePostRequest): Promise { - if (requestParameters['artId'] == null) { - throw new runtime.RequiredError( - 'artId', - 'Required parameter "artId" was null or undefined when calling moveArtifactRouteV0ArtifactsArtIdMovePost().' - ); - } - - if (requestParameters['artifactMoveIn'] == null) { - throw new runtime.RequiredError( - 'artifactMoveIn', - 'Required parameter "artifactMoveIn" was null or undefined when calling moveArtifactRouteV0ArtifactsArtIdMovePost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['xAgentdriveActor'] != null) { - headerParameters['x-agentdrive-actor'] = String(requestParameters['xAgentdriveActor']); - } - - if (requestParameters['ifMatch'] != null) { - headerParameters['if-match'] = String(requestParameters['ifMatch']); - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/artifacts/{art_id}/move`; - urlPath = urlPath.replace('{art_id}', encodeURIComponent(String(requestParameters['artId']))); - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: ArtifactMoveInToJSON(requestParameters['artifactMoveIn']), - }; - } - - /** - * Canonical artifact move/rename, keyed by the stable `art_…` ID (the artifact analogue of `POST /v0/folders/{fld_id}/move`). Moves the artifact to a new `path` on the same drive; ID, version history, source refs, labels, metadata, and the underlying CAS blob are all preserved — only `path` and `updated_at` change, and the move does NOT bump `version_number`. The row UPDATE and the emitted `artifact.renamed` event commit in a SINGLE transaction — a failure leaves the artifact fully unchanged. Returns 409 PATH_CONFLICT if the target `path` is already taken; 404 ARTIFACT_NOT_FOUND for an unknown id; 403 WIKI_RESERVED for a `_wiki/` / `_compiled/` target. Honors `If-Match` (→ 412 PRECONDITION_FAILED). Use `X-AgentDrive-Actor` to attach attribution to the emitted `artifact.renamed` event. - * Rename / move an artifact to a new path - */ - async moveArtifactRouteV0ArtifactsArtIdMovePostRaw(requestParameters: MoveArtifactRouteV0ArtifactsArtIdMovePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.moveArtifactRouteV0ArtifactsArtIdMovePostRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactOutFromJSON(jsonValue)); - } - - /** - * Canonical artifact move/rename, keyed by the stable `art_…` ID (the artifact analogue of `POST /v0/folders/{fld_id}/move`). Moves the artifact to a new `path` on the same drive; ID, version history, source refs, labels, metadata, and the underlying CAS blob are all preserved — only `path` and `updated_at` change, and the move does NOT bump `version_number`. The row UPDATE and the emitted `artifact.renamed` event commit in a SINGLE transaction — a failure leaves the artifact fully unchanged. Returns 409 PATH_CONFLICT if the target `path` is already taken; 404 ARTIFACT_NOT_FOUND for an unknown id; 403 WIKI_RESERVED for a `_wiki/` / `_compiled/` target. Honors `If-Match` (→ 412 PRECONDITION_FAILED). Use `X-AgentDrive-Actor` to attach attribution to the emitted `artifact.renamed` event. - * Rename / move an artifact to a new path - */ - async moveArtifactRouteV0ArtifactsArtIdMovePost(requestParameters: MoveArtifactRouteV0ArtifactsArtIdMovePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.moveArtifactRouteV0ArtifactsArtIdMovePostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for moveFolderByIdV0FoldersFldIdMovePost without sending the request - */ - async moveFolderByIdV0FoldersFldIdMovePostRequestOpts(requestParameters: MoveFolderByIdV0FoldersFldIdMovePostRequest): Promise { - if (requestParameters['fldId'] == null) { - throw new runtime.RequiredError( - 'fldId', - 'Required parameter "fldId" was null or undefined when calling moveFolderByIdV0FoldersFldIdMovePost().' - ); - } - - if (requestParameters['folderMoveIn'] == null) { - throw new runtime.RequiredError( - 'folderMoveIn', - 'Required parameter "folderMoveIn" was null or undefined when calling moveFolderByIdV0FoldersFldIdMovePost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['xAgentdriveActor'] != null) { - headerParameters['x-agentdrive-actor'] = String(requestParameters['xAgentdriveActor']); - } - - if (requestParameters['ifMatch'] != null) { - headerParameters['if-match'] = String(requestParameters['ifMatch']); - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/folders/{fld_id}/move`; - urlPath = urlPath.replace('{fld_id}', encodeURIComponent(String(requestParameters['fldId']))); - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: FolderMoveInToJSON(requestParameters['folderMoveIn']), - }; - } - - /** - * Rename / move a folder by stable ID (cascade descendants) - */ - async moveFolderByIdV0FoldersFldIdMovePostRaw(requestParameters: MoveFolderByIdV0FoldersFldIdMovePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.moveFolderByIdV0FoldersFldIdMovePostRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => FolderOutFromJSON(jsonValue)); - } - - /** - * Rename / move a folder by stable ID (cascade descendants) - */ - async moveFolderByIdV0FoldersFldIdMovePost(requestParameters: MoveFolderByIdV0FoldersFldIdMovePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.moveFolderByIdV0FoldersFldIdMovePostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for moveFolderByPathV0FoldersPathMovePost without sending the request - */ - async moveFolderByPathV0FoldersPathMovePostRequestOpts(requestParameters: MoveFolderByPathV0FoldersPathMovePostRequest): Promise { - if (requestParameters['path'] == null) { - throw new runtime.RequiredError( - 'path', - 'Required parameter "path" was null or undefined when calling moveFolderByPathV0FoldersPathMovePost().' - ); - } - - if (requestParameters['folderMoveIn'] == null) { - throw new runtime.RequiredError( - 'folderMoveIn', - 'Required parameter "folderMoveIn" was null or undefined when calling moveFolderByPathV0FoldersPathMovePost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['xAgentdriveActor'] != null) { - headerParameters['x-agentdrive-actor'] = String(requestParameters['xAgentdriveActor']); - } - - if (requestParameters['ifMatch'] != null) { - headerParameters['if-match'] = String(requestParameters['ifMatch']); - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/folders/{path}/move`; - urlPath = urlPath.replace('{path}', encodeURIComponent(String(requestParameters['path']))); - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: FolderMoveInToJSON(requestParameters['folderMoveIn']), - }; - } - - /** - * Move the folder identified by URL path to the body\'s `path`. All descendant folders + artifacts are path-prefix-updated in the same transaction. The folder\'s `fld_*` ID stays stable. Returns 409 `FOLDER_PATH_CONFLICT` if the destination prefix collides with a live folder or artifact path. - * Rename / move a folder (cascade-update descendants) - */ - async moveFolderByPathV0FoldersPathMovePostRaw(requestParameters: MoveFolderByPathV0FoldersPathMovePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.moveFolderByPathV0FoldersPathMovePostRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => FolderOutFromJSON(jsonValue)); - } - - /** - * Move the folder identified by URL path to the body\'s `path`. All descendant folders + artifacts are path-prefix-updated in the same transaction. The folder\'s `fld_*` ID stays stable. Returns 409 `FOLDER_PATH_CONFLICT` if the destination prefix collides with a live folder or artifact path. - * Rename / move a folder (cascade-update descendants) - */ - async moveFolderByPathV0FoldersPathMovePost(requestParameters: MoveFolderByPathV0FoldersPathMovePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.moveFolderByPathV0FoldersPathMovePostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for patchArtifactRouteV0ArtifactsArtIdPatch without sending the request - */ - async patchArtifactRouteV0ArtifactsArtIdPatchRequestOpts(requestParameters: PatchArtifactRouteV0ArtifactsArtIdPatchRequest): Promise { - if (requestParameters['artId'] == null) { - throw new runtime.RequiredError( - 'artId', - 'Required parameter "artId" was null or undefined when calling patchArtifactRouteV0ArtifactsArtIdPatch().' - ); - } - - if (requestParameters['artifactPatchIn'] == null) { - throw new runtime.RequiredError( - 'artifactPatchIn', - 'Required parameter "artifactPatchIn" was null or undefined when calling patchArtifactRouteV0ArtifactsArtIdPatch().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['xAgentdriveActor'] != null) { - headerParameters['x-agentdrive-actor'] = String(requestParameters['xAgentdriveActor']); - } - - if (requestParameters['ifMatch'] != null) { - headerParameters['if-match'] = String(requestParameters['ifMatch']); - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/artifacts/{art_id}`; - urlPath = urlPath.replace('{art_id}', encodeURIComponent(String(requestParameters['artId']))); - - return { - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: ArtifactPatchInToJSON(requestParameters['artifactPatchIn']), - }; - } - - /** - * Metadata-only JSON-merge-patch update of a single artifact, keyed by its stable `art_…` ID. Every field in the body is optional; a field that is **omitted** is left unchanged, a field that is **present** is applied — with an explicit `null` / `[]` / `{}` meaning \"clear\". This mirrors the MCP `set_metadata` tool. Editable fields: * `labels` — replace the label set (`[]`/`null` clears). * `metadata` — replace the free-form metadata object (`{}`/`null` clears). * `source` — replace provenance refs (`null` clears). **To move/rename an artifact, use `POST /v0/artifacts/{art_id}/move`** — PATCH no longer accepts `path`. The body is `extra=\"forbid\"`, so a stray field (notably a legacy `path`) is rejected with 422 rather than silently ignored. Metadata edits do NOT create a new content version (no `version_number` / generation bump, no `artifact_versions` row) but DO bump the artifact\'s `metageneration` and `updated_at`. Returns 400 BAD_LABELS / BAD_SOURCE for invalid metadata; 404 ARTIFACT_NOT_FOUND for an unknown id. Honors `If-Match`, which takes the composite ETag `\"..\"` and is compared as a whole tuple: ANY concurrent content **or** metadata change (a bumped generation OR metageneration) → 412 PRECONDITION_FAILED. There is no last-writer-wins gap for metadata-only edits. Use `X-AgentDrive-Actor` to attach attribution to the emitted `artifact.metadata_updated` event. - * Edit artifact metadata (labels / metadata / source) - */ - async patchArtifactRouteV0ArtifactsArtIdPatchRaw(requestParameters: PatchArtifactRouteV0ArtifactsArtIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.patchArtifactRouteV0ArtifactsArtIdPatchRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactOutFromJSON(jsonValue)); - } - - /** - * Metadata-only JSON-merge-patch update of a single artifact, keyed by its stable `art_…` ID. Every field in the body is optional; a field that is **omitted** is left unchanged, a field that is **present** is applied — with an explicit `null` / `[]` / `{}` meaning \"clear\". This mirrors the MCP `set_metadata` tool. Editable fields: * `labels` — replace the label set (`[]`/`null` clears). * `metadata` — replace the free-form metadata object (`{}`/`null` clears). * `source` — replace provenance refs (`null` clears). **To move/rename an artifact, use `POST /v0/artifacts/{art_id}/move`** — PATCH no longer accepts `path`. The body is `extra=\"forbid\"`, so a stray field (notably a legacy `path`) is rejected with 422 rather than silently ignored. Metadata edits do NOT create a new content version (no `version_number` / generation bump, no `artifact_versions` row) but DO bump the artifact\'s `metageneration` and `updated_at`. Returns 400 BAD_LABELS / BAD_SOURCE for invalid metadata; 404 ARTIFACT_NOT_FOUND for an unknown id. Honors `If-Match`, which takes the composite ETag `\"..\"` and is compared as a whole tuple: ANY concurrent content **or** metadata change (a bumped generation OR metageneration) → 412 PRECONDITION_FAILED. There is no last-writer-wins gap for metadata-only edits. Use `X-AgentDrive-Actor` to attach attribution to the emitted `artifact.metadata_updated` event. - * Edit artifact metadata (labels / metadata / source) - */ - async patchArtifactRouteV0ArtifactsArtIdPatch(requestParameters: PatchArtifactRouteV0ArtifactsArtIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.patchArtifactRouteV0ArtifactsArtIdPatchRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for patchFolderByIdV0FoldersFldIdPatch without sending the request - */ - async patchFolderByIdV0FoldersFldIdPatchRequestOpts(requestParameters: PatchFolderByIdV0FoldersFldIdPatchRequest): Promise { - if (requestParameters['fldId'] == null) { - throw new runtime.RequiredError( - 'fldId', - 'Required parameter "fldId" was null or undefined when calling patchFolderByIdV0FoldersFldIdPatch().' - ); - } - - if (requestParameters['folderPatchIn'] == null) { - throw new runtime.RequiredError( - 'folderPatchIn', - 'Required parameter "folderPatchIn" was null or undefined when calling patchFolderByIdV0FoldersFldIdPatch().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['xAgentdriveActor'] != null) { - headerParameters['x-agentdrive-actor'] = String(requestParameters['xAgentdriveActor']); - } - - if (requestParameters['ifMatch'] != null) { - headerParameters['if-match'] = String(requestParameters['ifMatch']); - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/folders/{fld_id}`; - urlPath = urlPath.replace('{fld_id}', encodeURIComponent(String(requestParameters['fldId']))); - - return { - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: FolderPatchInToJSON(requestParameters['folderPatchIn']), - }; - } - - /** - * Update folder metadata by stable ID - */ - async patchFolderByIdV0FoldersFldIdPatchRaw(requestParameters: PatchFolderByIdV0FoldersFldIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.patchFolderByIdV0FoldersFldIdPatchRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => FolderOutFromJSON(jsonValue)); - } - - /** - * Update folder metadata by stable ID - */ - async patchFolderByIdV0FoldersFldIdPatch(requestParameters: PatchFolderByIdV0FoldersFldIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.patchFolderByIdV0FoldersFldIdPatchRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for patchFolderByPathV0FoldersPathPatch without sending the request - */ - async patchFolderByPathV0FoldersPathPatchRequestOpts(requestParameters: PatchFolderByPathV0FoldersPathPatchRequest): Promise { - if (requestParameters['path'] == null) { - throw new runtime.RequiredError( - 'path', - 'Required parameter "path" was null or undefined when calling patchFolderByPathV0FoldersPathPatch().' - ); - } - - if (requestParameters['folderPatchIn'] == null) { - throw new runtime.RequiredError( - 'folderPatchIn', - 'Required parameter "folderPatchIn" was null or undefined when calling patchFolderByPathV0FoldersPathPatch().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['xAgentdriveActor'] != null) { - headerParameters['x-agentdrive-actor'] = String(requestParameters['xAgentdriveActor']); - } - - if (requestParameters['ifMatch'] != null) { - headerParameters['if-match'] = String(requestParameters['ifMatch']); - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/folders/{path}`; - urlPath = urlPath.replace('{path}', encodeURIComponent(String(requestParameters['path']))); - - return { - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: FolderPatchInToJSON(requestParameters['folderPatchIn']), - }; - } - - /** - * Partial update — field absence leaves the value unchanged; explicit `null` clears the field. Use the by-id endpoint (slice 2) when you need stable addressing across renames. - * Update folder metadata by path - */ - async patchFolderByPathV0FoldersPathPatchRaw(requestParameters: PatchFolderByPathV0FoldersPathPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.patchFolderByPathV0FoldersPathPatchRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => FolderOutFromJSON(jsonValue)); - } - - /** - * Partial update — field absence leaves the value unchanged; explicit `null` clears the field. Use the by-id endpoint (slice 2) when you need stable addressing across renames. - * Update folder metadata by path - */ - async patchFolderByPathV0FoldersPathPatch(requestParameters: PatchFolderByPathV0FoldersPathPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.patchFolderByPathV0FoldersPathPatchRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for patchGrantRouteV0GrantsGrnIdPatch without sending the request - */ - async patchGrantRouteV0GrantsGrnIdPatchRequestOpts(requestParameters: PatchGrantRouteV0GrantsGrnIdPatchRequest): Promise { - if (requestParameters['grnId'] == null) { - throw new runtime.RequiredError( - 'grnId', - 'Required parameter "grnId" was null or undefined when calling patchGrantRouteV0GrantsGrnIdPatch().' - ); - } - - if (requestParameters['grantPatchIn'] == null) { - throw new runtime.RequiredError( - 'grantPatchIn', - 'Required parameter "grantPatchIn" was null or undefined when calling patchGrantRouteV0GrantsGrnIdPatch().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (requestParameters['xAgentdriveActor'] != null) { - headerParameters['x-agentdrive-actor'] = String(requestParameters['xAgentdriveActor']); - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/grants/{grn_id}`; - urlPath = urlPath.replace('{grn_id}', encodeURIComponent(String(requestParameters['grnId']))); - - return { - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: GrantPatchInToJSON(requestParameters['grantPatchIn']), - }; - } - - /** - * Update a grant\'s role and/or expiry (requires can_manage) - */ - async patchGrantRouteV0GrantsGrnIdPatchRaw(requestParameters: PatchGrantRouteV0GrantsGrnIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.patchGrantRouteV0GrantsGrnIdPatchRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => GrantOutFromJSON(jsonValue)); - } - - /** - * Update a grant\'s role and/or expiry (requires can_manage) - */ - async patchGrantRouteV0GrantsGrnIdPatch(requestParameters: PatchGrantRouteV0GrantsGrnIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.patchGrantRouteV0GrantsGrnIdPatchRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for postDescribeV0QueryDescribePost without sending the request - */ - async postDescribeV0QueryDescribePostRequestOpts(requestParameters: PostDescribeV0QueryDescribePostRequest): Promise { - if (requestParameters['describeIn'] == null) { - throw new runtime.RequiredError( - 'describeIn', - 'Required parameter "describeIn" was null or undefined when calling postDescribeV0QueryDescribePost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/query/describe`; - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: DescribeInToJSON(requestParameters['describeIn']), - }; - } - - /** - * Describe a dataset\'s column schema - */ - async postDescribeV0QueryDescribePostRaw(requestParameters: PostDescribeV0QueryDescribePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.postDescribeV0QueryDescribePostRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => DatasetDescriptionOutFromJSON(jsonValue)); - } - - /** - * Describe a dataset\'s column schema - */ - async postDescribeV0QueryDescribePost(requestParameters: PostDescribeV0QueryDescribePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.postDescribeV0QueryDescribePostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for postFeedbackV0FeedbackPost without sending the request - */ - async postFeedbackV0FeedbackPostRequestOpts(): Promise { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/feedback`; - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * File feedback. Body: `{kind, title, body, contact?, attachments?: [art_id, ...]}` — attachments are snapshotted from this drive\'s artifacts at submit time. - * Post Feedback - */ - async postFeedbackV0FeedbackPostRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.postFeedbackV0FeedbackPostRequestOpts(); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => FeedbackCreateOutFromJSON(jsonValue)); - } - - /** - * File feedback. Body: `{kind, title, body, contact?, attachments?: [art_id, ...]}` — attachments are snapshotted from this drive\'s artifacts at submit time. - * Post Feedback - */ - async postFeedbackV0FeedbackPost(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.postFeedbackV0FeedbackPostRaw(initOverrides); - return await response.value(); - } - - /** - * Creates request options for postLookupValuesV0QueryLookupValuesPost without sending the request - */ - async postLookupValuesV0QueryLookupValuesPostRequestOpts(requestParameters: PostLookupValuesV0QueryLookupValuesPostRequest): Promise { - if (requestParameters['lookupValuesIn'] == null) { - throw new runtime.RequiredError( - 'lookupValuesIn', - 'Required parameter "lookupValuesIn" was null or undefined when calling postLookupValuesV0QueryLookupValuesPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/query/lookup-values`; - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: LookupValuesInToJSON(requestParameters['lookupValuesIn']), - }; - } - - /** - * List distinct values of a dataset column - */ - async postLookupValuesV0QueryLookupValuesPostRaw(requestParameters: PostLookupValuesV0QueryLookupValuesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.postLookupValuesV0QueryLookupValuesPostRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => LookupValuesOutFromJSON(jsonValue)); - } - - /** - * List distinct values of a dataset column - */ - async postLookupValuesV0QueryLookupValuesPost(requestParameters: PostLookupValuesV0QueryLookupValuesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.postLookupValuesV0QueryLookupValuesPostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for postQueryV0QueryPost without sending the request - */ - async postQueryV0QueryPostRequestOpts(requestParameters: PostQueryV0QueryPostRequest): Promise { - if (requestParameters['queryIn'] == null) { - throw new runtime.RequiredError( - 'queryIn', - 'Required parameter "queryIn" was null or undefined when calling postQueryV0QueryPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/query`; - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: QueryInToJSON(requestParameters['queryIn']), - }; - } - - /** - * Run a read-only SQL query over authorized datasets - */ - async postQueryV0QueryPostRaw(requestParameters: PostQueryV0QueryPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.postQueryV0QueryPostRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ResponsePostQueryV0QueryPostFromJSON(jsonValue)); - } - - /** - * Run a read-only SQL query over authorized datasets - */ - async postQueryV0QueryPost(requestParameters: PostQueryV0QueryPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.postQueryV0QueryPostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for putArtifactV0ArtifactsPathPut without sending the request - */ - async putArtifactV0ArtifactsPathPutRequestOpts(requestParameters: PutArtifactV0ArtifactsPathPutRequest): Promise { - if (requestParameters['path'] == null) { - throw new runtime.RequiredError( - 'path', - 'Required parameter "path" was null or undefined when calling putArtifactV0ArtifactsPathPut().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['contentType'] != null) { - headerParameters['content-type'] = String(requestParameters['contentType']); - } - - if (requestParameters['xAgentdriveLabels'] != null) { - headerParameters['x-agentdrive-labels'] = String(requestParameters['xAgentdriveLabels']); - } - - if (requestParameters['xAgentdriveMetadata'] != null) { - headerParameters['x-agentdrive-metadata'] = String(requestParameters['xAgentdriveMetadata']); - } - - if (requestParameters['xAgentdriveSource'] != null) { - headerParameters['x-agentdrive-source'] = String(requestParameters['xAgentdriveSource']); - } - - if (requestParameters['xAgentdriveActor'] != null) { - headerParameters['x-agentdrive-actor'] = String(requestParameters['xAgentdriveActor']); - } - - if (requestParameters['xAgentdriveChangeSummary'] != null) { - headerParameters['x-agentdrive-change-summary'] = String(requestParameters['xAgentdriveChangeSummary']); - } - - if (requestParameters['xAgentdriveChecksum'] != null) { - headerParameters['x-agentdrive-checksum'] = String(requestParameters['xAgentdriveChecksum']); - } - - if (requestParameters['contentMd5'] != null) { - headerParameters['content-md5'] = String(requestParameters['contentMd5']); - } - - if (requestParameters['ifMatch'] != null) { - headerParameters['if-match'] = String(requestParameters['ifMatch']); - } - - if (requestParameters['ifNoneMatch'] != null) { - headerParameters['if-none-match'] = String(requestParameters['ifNoneMatch']); - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/artifacts/{path}`; - urlPath = urlPath.replace('{path}', encodeURIComponent(String(requestParameters['path']))); - - return { - path: urlPath, - method: 'PUT', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Upload an artifact at the given path. The path is treated as the artifact\'s location in the drive — re-uploading the same path overwrites in place (idempotent). Returns 201 when the artifact is created (no prior live artifact at the path), 200 on overwrite — mirroring `PUT /v0/folders/{path}`. **Limits:** request body must not exceed **50 MB**. Path must be non-empty, ≤256 chars, only `[A-Za-z0-9_./-]`, no `..` segments, no leading/trailing slash. Per-token write rate limit: 100/hour. **Optional headers.** Each preserves the existing artifact\'s value when omitted on an overwrite, and takes the create-default on a new path; send the header to replace it: - `X-AgentDrive-Labels`: comma-separated labels (e.g. `draft,report`); an empty value clears them. Each: lowercase `[a-z0-9_-]+`, ≤64 chars; ≤16 labels per artifact. - `X-AgentDrive-Metadata`: JSON object of agent-attached fields. - `X-AgentDrive-Source`: JSON `{\"refs\": [...]}` source provenance (present, including `{\"refs\": []}`, replaces). - `X-AgentDrive-Actor`: caller-supplied actor name (≤64 chars) for event-log attribution. Untrusted; never used for authz. **Preconditions.** `If-Match: \"..\"` makes the write conditional on the current composite ETag (→ 412 PRECONDITION_FAILED). `If-None-Match: *` is create-only: it succeeds only if no live artifact occupies the path (→ 412 CREATE_CONFLICT if one does). The two are mutually exclusive (→ 400 BAD_PRECONDITION). **Integrity (optional).** `X-AgentDrive-Checksum: :` (`sha256:` or `crc32c:`) or the standard `Content-MD5` (base64 MD5) is verified against the received bytes before they land (→ 400 CHECKSUM_MISMATCH on mismatch); no artifact is created on failure. - * Upload (or overwrite) an artifact - */ - async putArtifactV0ArtifactsPathPutRaw(requestParameters: PutArtifactV0ArtifactsPathPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.putArtifactV0ArtifactsPathPutRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactOutFromJSON(jsonValue)); - } - - /** - * Upload an artifact at the given path. The path is treated as the artifact\'s location in the drive — re-uploading the same path overwrites in place (idempotent). Returns 201 when the artifact is created (no prior live artifact at the path), 200 on overwrite — mirroring `PUT /v0/folders/{path}`. **Limits:** request body must not exceed **50 MB**. Path must be non-empty, ≤256 chars, only `[A-Za-z0-9_./-]`, no `..` segments, no leading/trailing slash. Per-token write rate limit: 100/hour. **Optional headers.** Each preserves the existing artifact\'s value when omitted on an overwrite, and takes the create-default on a new path; send the header to replace it: - `X-AgentDrive-Labels`: comma-separated labels (e.g. `draft,report`); an empty value clears them. Each: lowercase `[a-z0-9_-]+`, ≤64 chars; ≤16 labels per artifact. - `X-AgentDrive-Metadata`: JSON object of agent-attached fields. - `X-AgentDrive-Source`: JSON `{\"refs\": [...]}` source provenance (present, including `{\"refs\": []}`, replaces). - `X-AgentDrive-Actor`: caller-supplied actor name (≤64 chars) for event-log attribution. Untrusted; never used for authz. **Preconditions.** `If-Match: \"..\"` makes the write conditional on the current composite ETag (→ 412 PRECONDITION_FAILED). `If-None-Match: *` is create-only: it succeeds only if no live artifact occupies the path (→ 412 CREATE_CONFLICT if one does). The two are mutually exclusive (→ 400 BAD_PRECONDITION). **Integrity (optional).** `X-AgentDrive-Checksum: :` (`sha256:` or `crc32c:`) or the standard `Content-MD5` (base64 MD5) is verified against the received bytes before they land (→ 400 CHECKSUM_MISMATCH on mismatch); no artifact is created on failure. - * Upload (or overwrite) an artifact - */ - async putArtifactV0ArtifactsPathPut(requestParameters: PutArtifactV0ArtifactsPathPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.putArtifactV0ArtifactsPathPutRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for putProjectV0ProjectsFldIdPut without sending the request - */ - async putProjectV0ProjectsFldIdPutRequestOpts(requestParameters: PutProjectV0ProjectsFldIdPutRequest): Promise { - if (requestParameters['fldId'] == null) { - throw new runtime.RequiredError( - 'fldId', - 'Required parameter "fldId" was null or undefined when calling putProjectV0ProjectsFldIdPut().' - ); - } - - if (requestParameters['projectConfigIn'] == null) { - throw new runtime.RequiredError( - 'projectConfigIn', - 'Required parameter "projectConfigIn" was null or undefined when calling putProjectV0ProjectsFldIdPut().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/projects/{fld_id}`; - urlPath = urlPath.replace('{fld_id}', encodeURIComponent(String(requestParameters['fldId']))); - - return { - path: urlPath, - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: ProjectConfigInToJSON(requestParameters['projectConfigIn']), - }; - } - - /** - * Set a project\'s compile config (entrypoint/engine/auto_compile) - */ - async putProjectV0ProjectsFldIdPutRaw(requestParameters: PutProjectV0ProjectsFldIdPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.putProjectV0ProjectsFldIdPutRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => CompileProjectOutFromJSON(jsonValue)); - } - - /** - * Set a project\'s compile config (entrypoint/engine/auto_compile) - */ - async putProjectV0ProjectsFldIdPut(requestParameters: PutProjectV0ProjectsFldIdPutRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.putProjectV0ProjectsFldIdPutRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for redeemShareSShareKeyGet without sending the request - */ - async redeemShareSShareKeyGetRequestOpts(requestParameters: RedeemShareSShareKeyGetRequest): Promise { - if (requestParameters['shareKey'] == null) { - throw new runtime.RequiredError( - 'shareKey', - 'Required parameter "shareKey" was null or undefined when calling redeemShareSShareKeyGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/s/{share_key}`; - urlPath = urlPath.replace('{share_key}', encodeURIComponent(String(requestParameters['shareKey']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Redeem Share - */ - async redeemShareSShareKeyGetRaw(requestParameters: RedeemShareSShareKeyGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.redeemShareSShareKeyGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ShareRedeemOutFromJSON(jsonValue)); - } - - /** - * Redeem Share - */ - async redeemShareSShareKeyGet(requestParameters: RedeemShareSShareKeyGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.redeemShareSShareKeyGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for redeemShareWithPasswordSShareKeyPost without sending the request - */ - async redeemShareWithPasswordSShareKeyPostRequestOpts(requestParameters: RedeemShareWithPasswordSShareKeyPostRequest): Promise { - if (requestParameters['shareKey'] == null) { - throw new runtime.RequiredError( - 'shareKey', - 'Required parameter "shareKey" was null or undefined when calling redeemShareWithPasswordSShareKeyPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const consumes: runtime.Consume[] = [ - { contentType: 'application/x-www-form-urlencoded' }, - ]; - // @ts-ignore: canConsumeForm may be unused - const canConsumeForm = runtime.canConsumeForm(consumes); - - let formParams: { append(param: string, value: any): any }; - let useForm = false; - if (useForm) { - formParams = new FormData(); - } else { - formParams = new URLSearchParams(); - } - - if (requestParameters['password'] != null) { - formParams.append('password', requestParameters['password'] as any); - } - - - let urlPath = `/s/{share_key}`; - urlPath = urlPath.replace('{share_key}', encodeURIComponent(String(requestParameters['shareKey']))); - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: formParams, - }; - } - - /** - * Redeem Share With Password - */ - async redeemShareWithPasswordSShareKeyPostRaw(requestParameters: RedeemShareWithPasswordSShareKeyPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.redeemShareWithPasswordSShareKeyPostRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ShareRedeemOutFromJSON(jsonValue)); - } - - /** - * Redeem Share With Password - */ - async redeemShareWithPasswordSShareKeyPost(requestParameters: RedeemShareWithPasswordSShareKeyPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.redeemShareWithPasswordSShareKeyPostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for restoreArtifactV0ArtifactsArtIdRestorePost without sending the request - */ - async restoreArtifactV0ArtifactsArtIdRestorePostRequestOpts(requestParameters: RestoreArtifactV0ArtifactsArtIdRestorePostRequest): Promise { - if (requestParameters['artId'] == null) { - throw new runtime.RequiredError( - 'artId', - 'Required parameter "artId" was null or undefined when calling restoreArtifactV0ArtifactsArtIdRestorePost().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['rename'] != null) { - queryParameters['rename'] = requestParameters['rename']; - } - - if (requestParameters['overwrite'] != null) { - queryParameters['overwrite'] = requestParameters['overwrite']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['xAgentdriveActor'] != null) { - headerParameters['x-agentdrive-actor'] = String(requestParameters['xAgentdriveActor']); - } - - if (requestParameters['ifMatch'] != null) { - headerParameters['if-match'] = String(requestParameters['ifMatch']); - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/artifacts/{art_id}/restore`; - urlPath = urlPath.replace('{art_id}', encodeURIComponent(String(requestParameters['artId']))); - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Clear `deleted_at` + `purge_at` on a soft-deleted artifact. Available only while the artifact is in trash (i.e. before the GC cleanup cron purges it). Returns 404 if the artifact is live or already hard-deleted; 409 PATH_CONFLICT if its path is now occupied by another live artifact. The 409 payload includes a `restore_options` block with `rename_to` and `force_overwrite` URLs the caller can follow to resolve the conflict — see deletion-design.md §5.4. - * Restore a soft-deleted artifact - */ - async restoreArtifactV0ArtifactsArtIdRestorePostRaw(requestParameters: RestoreArtifactV0ArtifactsArtIdRestorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.restoreArtifactV0ArtifactsArtIdRestorePostRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactOutFromJSON(jsonValue)); - } - - /** - * Clear `deleted_at` + `purge_at` on a soft-deleted artifact. Available only while the artifact is in trash (i.e. before the GC cleanup cron purges it). Returns 404 if the artifact is live or already hard-deleted; 409 PATH_CONFLICT if its path is now occupied by another live artifact. The 409 payload includes a `restore_options` block with `rename_to` and `force_overwrite` URLs the caller can follow to resolve the conflict — see deletion-design.md §5.4. - * Restore a soft-deleted artifact - */ - async restoreArtifactV0ArtifactsArtIdRestorePost(requestParameters: RestoreArtifactV0ArtifactsArtIdRestorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.restoreArtifactV0ArtifactsArtIdRestorePostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for restoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePost without sending the request - */ - async restoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePostRequestOpts(requestParameters: RestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePostRequest): Promise { - if (requestParameters['artId'] == null) { - throw new runtime.RequiredError( - 'artId', - 'Required parameter "artId" was null or undefined when calling restoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePost().' - ); - } - - if (requestParameters['versionNumber'] == null) { - throw new runtime.RequiredError( - 'versionNumber', - 'Required parameter "versionNumber" was null or undefined when calling restoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['xAgentdriveActor'] != null) { - headerParameters['x-agentdrive-actor'] = String(requestParameters['xAgentdriveActor']); - } - - if (requestParameters['ifMatch'] != null) { - headerParameters['if-match'] = String(requestParameters['ifMatch']); - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/artifacts/{art_id}/versions/{version_number}/restore`; - urlPath = urlPath.replace('{art_id}', encodeURIComponent(String(requestParameters['artId']))); - urlPath = urlPath.replace('{version_number}', encodeURIComponent(String(requestParameters['versionNumber']))); - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Roll the artifact forward to the content of version `version_number` by creating a **new head version** with identical bytes. History is preserved — this never rewrites or deletes past versions. The prior version\'s content-addressed blob is reused, so no bytes are re-uploaded. A change summary of `Restored version N` is recorded on the new version; `X-AgentDrive-Actor` attributes it. Restoring a version whose content already matches the current head (including the head itself) is a **no-op**: it returns the current artifact unchanged, with no new version created. Honors `If-Match` on the current head (roll forward only if the head is unchanged → 412 PRECONDITION_FAILED). Errors: `404 ARTIFACT_NOT_FOUND`, `404 VERSION_NOT_FOUND`, and `410 VERSION_PRUNED` when the version existed but its bytes were retained out of existence. - * Restore a previous version as a new head version - */ - async restoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePostRaw(requestParameters: RestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.restoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePostRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactOutFromJSON(jsonValue)); - } - - /** - * Roll the artifact forward to the content of version `version_number` by creating a **new head version** with identical bytes. History is preserved — this never rewrites or deletes past versions. The prior version\'s content-addressed blob is reused, so no bytes are re-uploaded. A change summary of `Restored version N` is recorded on the new version; `X-AgentDrive-Actor` attributes it. Restoring a version whose content already matches the current head (including the head itself) is a **no-op**: it returns the current artifact unchanged, with no new version created. Honors `If-Match` on the current head (roll forward only if the head is unchanged → 412 PRECONDITION_FAILED). Errors: `404 ARTIFACT_NOT_FOUND`, `404 VERSION_NOT_FOUND`, and `410 VERSION_PRUNED` when the version existed but its bytes were retained out of existence. - * Restore a previous version as a new head version - */ - async restoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePost(requestParameters: RestoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.restoreArtifactVersionV0ArtifactsArtIdVersionsVersionNumberRestorePostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for restoreDriveRouteV0DrivesDriveIdRestorePost without sending the request - */ - async restoreDriveRouteV0DrivesDriveIdRestorePostRequestOpts(requestParameters: RestoreDriveRouteV0DrivesDriveIdRestorePostRequest): Promise { - if (requestParameters['driveId'] == null) { - throw new runtime.RequiredError( - 'driveId', - 'Required parameter "driveId" was null or undefined when calling restoreDriveRouteV0DrivesDriveIdRestorePost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['xAgentdriveActor'] != null) { - headerParameters['x-agentdrive-actor'] = String(requestParameters['xAgentdriveActor']); - } - - if (requestParameters['ifMatch'] != null) { - headerParameters['if-match'] = String(requestParameters['ifMatch']); - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/drives/{drive_id}/restore`; - urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Clear `deleted_at` + `purge_at` on a soft-deleted drive. Soft-deleted child artifacts get their retention window rebased to the drive-restore moment (see deletion-design.md §5.2). Available only while the drive is in trash. Returns 404 if the drive is live or already hard-deleted. **Optimistic concurrency:** send `If-Match` with the trashed drive\'s composite ETag (`\".0.\"`, e.g. from the delete response\'s `ETag` header) to make the restore conditional — a stale token returns 412 PRECONDITION_FAILED. A restore WITHOUT an `If-Match` precondition is last-writer-wins. - * Restore a soft-deleted drive - */ - async restoreDriveRouteV0DrivesDriveIdRestorePostRaw(requestParameters: RestoreDriveRouteV0DrivesDriveIdRestorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.restoreDriveRouteV0DrivesDriveIdRestorePostRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => DriveRestoreOutFromJSON(jsonValue)); - } - - /** - * Clear `deleted_at` + `purge_at` on a soft-deleted drive. Soft-deleted child artifacts get their retention window rebased to the drive-restore moment (see deletion-design.md §5.2). Available only while the drive is in trash. Returns 404 if the drive is live or already hard-deleted. **Optimistic concurrency:** send `If-Match` with the trashed drive\'s composite ETag (`\".0.\"`, e.g. from the delete response\'s `ETag` header) to make the restore conditional — a stale token returns 412 PRECONDITION_FAILED. A restore WITHOUT an `If-Match` precondition is last-writer-wins. - * Restore a soft-deleted drive - */ - async restoreDriveRouteV0DrivesDriveIdRestorePost(requestParameters: RestoreDriveRouteV0DrivesDriveIdRestorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.restoreDriveRouteV0DrivesDriveIdRestorePostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for restoreFolderByIdV0FoldersFldIdRestorePost without sending the request - */ - async restoreFolderByIdV0FoldersFldIdRestorePostRequestOpts(requestParameters: RestoreFolderByIdV0FoldersFldIdRestorePostRequest): Promise { - if (requestParameters['fldId'] == null) { - throw new runtime.RequiredError( - 'fldId', - 'Required parameter "fldId" was null or undefined when calling restoreFolderByIdV0FoldersFldIdRestorePost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['xAgentdriveActor'] != null) { - headerParameters['x-agentdrive-actor'] = String(requestParameters['xAgentdriveActor']); - } - - if (requestParameters['ifMatch'] != null) { - headerParameters['if-match'] = String(requestParameters['ifMatch']); - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/folders/{fld_id}/restore`; - urlPath = urlPath.replace('{fld_id}', encodeURIComponent(String(requestParameters['fldId']))); - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Mirrors `POST /v0/artifacts/{art_id}/restore` for folders: clear `deleted_at` + `purge_at` on a soft-deleted folder AND exactly the descendants soft-deleted in the same cascade (descendants trashed separately keep their trash state; restore those individually — the per-artifact restore remains for cherry-picking). Available only while the folder is in trash; returns 404 if it is live or already hard-purged. Returns 409 `PATH_CONFLICT` when a live folder/artifact now occupies a path this restore would reinstate (`colliding_path` + `kind` identify it). Unlike artifact restore there are NO `rename`/`overwrite` escape hatches — the whole cascade aborts; free the colliding path (or cherry-pick artifacts) and retry. `If-Match` (the trashed folder\'s composite ETag) makes the restore conditional → 412 PRECONDITION_FAILED on a stale token; omitted, the restore is last-writer-wins. - * Restore a soft-deleted folder (cascade) - */ - async restoreFolderByIdV0FoldersFldIdRestorePostRaw(requestParameters: RestoreFolderByIdV0FoldersFldIdRestorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.restoreFolderByIdV0FoldersFldIdRestorePostRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => FolderRestoreOutFromJSON(jsonValue)); - } - - /** - * Mirrors `POST /v0/artifacts/{art_id}/restore` for folders: clear `deleted_at` + `purge_at` on a soft-deleted folder AND exactly the descendants soft-deleted in the same cascade (descendants trashed separately keep their trash state; restore those individually — the per-artifact restore remains for cherry-picking). Available only while the folder is in trash; returns 404 if it is live or already hard-purged. Returns 409 `PATH_CONFLICT` when a live folder/artifact now occupies a path this restore would reinstate (`colliding_path` + `kind` identify it). Unlike artifact restore there are NO `rename`/`overwrite` escape hatches — the whole cascade aborts; free the colliding path (or cherry-pick artifacts) and retry. `If-Match` (the trashed folder\'s composite ETag) makes the restore conditional → 412 PRECONDITION_FAILED on a stale token; omitted, the restore is last-writer-wins. - * Restore a soft-deleted folder (cascade) - */ - async restoreFolderByIdV0FoldersFldIdRestorePost(requestParameters: RestoreFolderByIdV0FoldersFldIdRestorePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.restoreFolderByIdV0FoldersFldIdRestorePostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for rotateShareRouteV0SharesShrIdRotatePost without sending the request - */ - async rotateShareRouteV0SharesShrIdRotatePostRequestOpts(requestParameters: RotateShareRouteV0SharesShrIdRotatePostRequest): Promise { - if (requestParameters['shrId'] == null) { - throw new runtime.RequiredError( - 'shrId', - 'Required parameter "shrId" was null or undefined when calling rotateShareRouteV0SharesShrIdRotatePost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (requestParameters['xAgentdriveActor'] != null) { - headerParameters['x-agentdrive-actor'] = String(requestParameters['xAgentdriveActor']); - } - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/shares/{shr_id}/rotate`; - urlPath = urlPath.replace('{shr_id}', encodeURIComponent(String(requestParameters['shrId']))); - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Revoke + reissue a share link\'s key (requires can_share) - */ - async rotateShareRouteV0SharesShrIdRotatePostRaw(requestParameters: RotateShareRouteV0SharesShrIdRotatePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.rotateShareRouteV0SharesShrIdRotatePostRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ShareMintOutFromJSON(jsonValue)); - } - - /** - * Revoke + reissue a share link\'s key (requires can_share) - */ - async rotateShareRouteV0SharesShrIdRotatePost(requestParameters: RotateShareRouteV0SharesShrIdRotatePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.rotateShareRouteV0SharesShrIdRotatePostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for searchV0SearchGet without sending the request - */ - async searchV0SearchGetRequestOpts(requestParameters: SearchV0SearchGetRequest): Promise { - if (requestParameters['q'] == null) { - throw new runtime.RequiredError( - 'q', - 'Required parameter "q" was null or undefined when calling searchV0SearchGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['q'] != null) { - queryParameters['q'] = requestParameters['q']; - } - - if (requestParameters['label'] != null) { - queryParameters['label'] = requestParameters['label']; - } - - if (requestParameters['fileType'] != null) { - queryParameters['file_type'] = requestParameters['fileType']; - } - - if (requestParameters['prefix'] != null) { - queryParameters['prefix'] = requestParameters['prefix']; - } - - if (requestParameters['updatedAfter'] != null) { - queryParameters['updated_after'] = (requestParameters['updatedAfter'] as any).toISOString(); - } - - if (requestParameters['updatedBefore'] != null) { - queryParameters['updated_before'] = (requestParameters['updatedBefore'] as any).toISOString(); - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/search`; - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Lexical (not semantic) full-text search powered by Postgres `websearch_to_tsquery`. Results are ranked by `ts_rank` over a weighted tsvector (path > content > metadata > labels). **Supported query syntax:** - Words: `kangaroo` (English stemming) - Phrases: `\"exact phrase\"` - Negation: `kangaroo -secret` - AND (implicit): `kangaroo secret` - OR: `kangaroo OR koala` - Paths & filenames: `reports/q3-summary.md` or `q3-summary.md` match by their path words (`/ . _ -` are word boundaries) **Not supported (v0):** - Semantic / embedding similarity - PDF and image content (only the path + metadata are searchable) - Non-English stemming - Fuzzy matching, regex - Boolean operator parentheses **Filters:** `label` (repeatable, AND), `file_type` (enum), `prefix` (path prefix), `updated_after` / `updated_before` (RFC 3339 timestamps, inclusive bounds on `updated_at`). - * Full-text search over artifacts in the drive - */ - async searchV0SearchGetRaw(requestParameters: SearchV0SearchGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.searchV0SearchGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => SearchPageFromJSON(jsonValue)); - } - - /** - * Lexical (not semantic) full-text search powered by Postgres `websearch_to_tsquery`. Results are ranked by `ts_rank` over a weighted tsvector (path > content > metadata > labels). **Supported query syntax:** - Words: `kangaroo` (English stemming) - Phrases: `\"exact phrase\"` - Negation: `kangaroo -secret` - AND (implicit): `kangaroo secret` - OR: `kangaroo OR koala` - Paths & filenames: `reports/q3-summary.md` or `q3-summary.md` match by their path words (`/ . _ -` are word boundaries) **Not supported (v0):** - Semantic / embedding similarity - PDF and image content (only the path + metadata are searchable) - Non-English stemming - Fuzzy matching, regex - Boolean operator parentheses **Filters:** `label` (repeatable, AND), `file_type` (enum), `prefix` (path prefix), `updated_after` / `updated_before` (RFC 3339 timestamps, inclusive bounds on `updated_at`). - * Full-text search over artifacts in the drive - */ - async searchV0SearchGet(requestParameters: SearchV0SearchGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.searchV0SearchGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for viewArtifactHeadAArtIdHeadGet without sending the request - */ - async viewArtifactHeadAArtIdHeadGetRequestOpts(requestParameters: ViewArtifactHeadAArtIdHeadGetRequest): Promise { - if (requestParameters['artId'] == null) { - throw new runtime.RequiredError( - 'artId', - 'Required parameter "artId" was null or undefined when calling viewArtifactHeadAArtIdHeadGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/a/{art_id}/head`; - urlPath = urlPath.replace('{art_id}', encodeURIComponent(String(requestParameters['artId']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Return `{\"version\": }` for a readable artifact. Auth mirrors the permalink/viewer: the owner, or an `anyone:viewer` grant (a published artifact), reads. Two deliberate differences from the HTML viewer: * Never redirect to login. A poll is a background `fetch`, not a navigation — an HTML login page would be a useless body and a same-origin redirect the client can\'t act on. Anonymous callers on a private/absent artifact get a flat 404. * \"Doesn\'t exist\" and \"exists but not readable\" collapse to the same 404, so an anonymous poller can\'t use this as an existence oracle (matches the permalink/viewer leak guard). - * View Artifact Head - */ - async viewArtifactHeadAArtIdHeadGetRaw(requestParameters: ViewArtifactHeadAArtIdHeadGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.viewArtifactHeadAArtIdHeadGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ArtifactHeadOutFromJSON(jsonValue)); - } - - /** - * Return `{\"version\": }` for a readable artifact. Auth mirrors the permalink/viewer: the owner, or an `anyone:viewer` grant (a published artifact), reads. Two deliberate differences from the HTML viewer: * Never redirect to login. A poll is a background `fetch`, not a navigation — an HTML login page would be a useless body and a same-origin redirect the client can\'t act on. Anonymous callers on a private/absent artifact get a flat 404. * \"Doesn\'t exist\" and \"exists but not readable\" collapse to the same 404, so an anonymous poller can\'t use this as an existence oracle (matches the permalink/viewer leak guard). - * View Artifact Head - */ - async viewArtifactHeadAArtIdHeadGet(requestParameters: ViewArtifactHeadAArtIdHeadGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.viewArtifactHeadAArtIdHeadGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for viewArtifactVersionVArtIdVersionGet without sending the request - */ - async viewArtifactVersionVArtIdVersionGetRequestOpts(requestParameters: ViewArtifactVersionVArtIdVersionGetRequest): Promise { - if (requestParameters['artId'] == null) { - throw new runtime.RequiredError( - 'artId', - 'Required parameter "artId" was null or undefined when calling viewArtifactVersionVArtIdVersionGet().' - ); - } - - if (requestParameters['version'] == null) { - throw new runtime.RequiredError( - 'version', - 'Required parameter "version" was null or undefined when calling viewArtifactVersionVArtIdVersionGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['raw'] != null) { - queryParameters['raw'] = requestParameters['raw']; - } - - if (requestParameters['download'] != null) { - queryParameters['download'] = requestParameters['download']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/v/{art_id}/{version}`; - urlPath = urlPath.replace('{art_id}', encodeURIComponent(String(requestParameters['artId']))); - urlPath = urlPath.replace('{version}', encodeURIComponent(String(requestParameters['version']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Render version `version` of an artifact, read-only. Version history is owner-only. The drive-blind `can_read` gate still provides the same sign-in-or-404 masking as `/a/{art_id}`, but readable non-owners cannot browse snapshots. A pruned or never-existed version renders a friendly unavailable state, never a 500. `?raw=1` / `?download=1` stream the version\'s bytes (powering the bar\'s Raw / Download buttons) with the same sandbox+nosniff headers as the head raw path. - * View Artifact Version - */ - async viewArtifactVersionVArtIdVersionGetRaw(requestParameters: ViewArtifactVersionVArtIdVersionGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.viewArtifactVersionVArtIdVersionGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.BlobApiResponse(response); - } - - /** - * Render version `version` of an artifact, read-only. Version history is owner-only. The drive-blind `can_read` gate still provides the same sign-in-or-404 masking as `/a/{art_id}`, but readable non-owners cannot browse snapshots. A pruned or never-existed version renders a friendly unavailable state, never a 500. `?raw=1` / `?download=1` stream the version\'s bytes (powering the bar\'s Raw / Download buttons) with the same sandbox+nosniff headers as the head raw path. - * View Artifact Version - */ - async viewArtifactVersionVArtIdVersionGet(requestParameters: ViewArtifactVersionVArtIdVersionGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.viewArtifactVersionVArtIdVersionGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for viewFileDriveIdPathGet without sending the request - */ - async viewFileDriveIdPathGetRequestOpts(requestParameters: ViewFileDriveIdPathGetRequest): Promise { - if (requestParameters['driveId'] == null) { - throw new runtime.RequiredError( - 'driveId', - 'Required parameter "driveId" was null or undefined when calling viewFileDriveIdPathGet().' - ); - } - - if (requestParameters['path'] == null) { - throw new runtime.RequiredError( - 'path', - 'Required parameter "path" was null or undefined when calling viewFileDriveIdPathGet().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['raw'] != null) { - queryParameters['raw'] = requestParameters['raw']; - } - - if (requestParameters['download'] != null) { - queryParameters['download'] = requestParameters['download']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/{drive_id}/{path}`; - urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); - urlPath = urlPath.replace('{path}', encodeURIComponent(String(requestParameters['path']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * View File - */ - async viewFileDriveIdPathGetRaw(requestParameters: ViewFileDriveIdPathGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.viewFileDriveIdPathGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.BlobApiResponse(response); - } - - /** - * View File - */ - async viewFileDriveIdPathGet(requestParameters: ViewFileDriveIdPathGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.viewFileDriveIdPathGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for viewPermalinkArtifactAArtIdGet without sending the request - */ - async viewPermalinkArtifactAArtIdGetRequestOpts(requestParameters: ViewPermalinkArtifactAArtIdGetRequest): Promise { - if (requestParameters['artId'] == null) { - throw new runtime.RequiredError( - 'artId', - 'Required parameter "artId" was null or undefined when calling viewPermalinkArtifactAArtIdGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/a/{art_id}`; - urlPath = urlPath.replace('{art_id}', encodeURIComponent(String(requestParameters['artId']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Resolve a stable artifact ID to its path-URL and 302 there. Auth model matches the path URL: public artifacts redirect for anyone; private artifacts redirect only for the owner. Non-owners on private artifacts get 404 — same response as \"doesn\'t exist\", so the ID\'s existence isn\'t leaked. The forwarded query-param allowlist is `raw`, `download` (see _PERMALINK_FORWARDED_PARAMS). - * View Permalink Artifact - */ - async viewPermalinkArtifactAArtIdGetRaw(requestParameters: ViewPermalinkArtifactAArtIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.viewPermalinkArtifactAArtIdGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Resolve a stable artifact ID to its path-URL and 302 there. Auth model matches the path URL: public artifacts redirect for anyone; private artifacts redirect only for the owner. Non-owners on private artifacts get 404 — same response as \"doesn\'t exist\", so the ID\'s existence isn\'t leaked. The forwarded query-param allowlist is `raw`, `download` (see _PERMALINK_FORWARDED_PARAMS). - * View Permalink Artifact - */ - async viewPermalinkArtifactAArtIdGet(requestParameters: ViewPermalinkArtifactAArtIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.viewPermalinkArtifactAArtIdGetRaw(requestParameters, initOverrides); - } - - /** - * Creates request options for viewPermalinkFolderFFldIdGet without sending the request - */ - async viewPermalinkFolderFFldIdGetRequestOpts(requestParameters: ViewPermalinkFolderFFldIdGetRequest): Promise { - if (requestParameters['fldId'] == null) { - throw new runtime.RequiredError( - 'fldId', - 'Required parameter "fldId" was null or undefined when calling viewPermalinkFolderFFldIdGet().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/f/{fld_id}`; - urlPath = urlPath.replace('{fld_id}', encodeURIComponent(String(requestParameters['fldId']))); - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Resolve a stable folder ID to its current path-URL and 302. Auth model mirrors the artifact permalink: public folder = anon OK; private folder = owner only, otherwise 404 (no existence leak). \"Public\" is an `anyone:viewer` grant on the `fld_*` id resolved through `can_read` (§4.4); folders carry no visibility flag of their own. - * View Permalink Folder - */ - async viewPermalinkFolderFFldIdGetRaw(requestParameters: ViewPermalinkFolderFFldIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.viewPermalinkFolderFFldIdGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Resolve a stable folder ID to its current path-URL and 302. Auth model mirrors the artifact permalink: public folder = anon OK; private folder = owner only, otherwise 404 (no existence leak). \"Public\" is an `anyone:viewer` grant on the `fld_*` id resolved through `can_read` (§4.4); folders carry no visibility flag of their own. - * View Permalink Folder - */ - async viewPermalinkFolderFFldIdGet(requestParameters: ViewPermalinkFolderFFldIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.viewPermalinkFolderFFldIdGetRaw(requestParameters, initOverrides); - } - } - -/** - * @export - */ -export const FindV0FindGetModeEnum = { - Hybrid: 'hybrid', - Lexical: 'lexical', - Semantic: 'semantic' -} as const; -export type FindV0FindGetModeEnum = typeof FindV0FindGetModeEnum[keyof typeof FindV0FindGetModeEnum]; diff --git a/sdk/typescript/src/apis/DiscoveryApi.ts b/sdk/typescript/src/apis/DiscoveryApi.ts new file mode 100644 index 0000000..bd5ea70 --- /dev/null +++ b/sdk/typescript/src/apis/DiscoveryApi.ts @@ -0,0 +1,61 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import * as runtime from '../runtime'; + +/** + * + */ +export class DiscoveryApi extends runtime.BaseAPI { + + /** + * Creates request options for oauthProtectedResource without sending the request + */ + async oauthProtectedResourceRequestOpts(): Promise { + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/.well-known/oauth-protected-resource`; + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Names the reset v0 surface as a protected resource and points clients at Hub — the only authorization server whose product tokens this deployment accepts. + * Protected-resource metadata (RFC 9728) + */ + async oauthProtectedResourceRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.oauthProtectedResourceRequestOpts(); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response); + } + + /** + * Names the reset v0 surface as a protected resource and points clients at Hub — the only authorization server whose product tokens this deployment accepts. + * Protected-resource metadata (RFC 9728) + */ + async oauthProtectedResource(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: any | null; }> { + const response = await this.oauthProtectedResourceRaw(initOverrides); + return await response.value(); + } + +} diff --git a/sdk/typescript/src/apis/DrivesApi.ts b/sdk/typescript/src/apis/DrivesApi.ts index fc6179b..f6d4b6d 100644 --- a/sdk/typescript/src/apis/DrivesApi.ts +++ b/sdk/typescript/src/apis/DrivesApi.ts @@ -2,7 +2,7 @@ /* eslint-disable */ /** * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. * * The version of the OpenAPI document: * @@ -13,90 +13,91 @@ */ import * as runtime from '../runtime'; -import { - type DriveApiKeyCreateIn, - DriveApiKeyCreateInFromJSON, - DriveApiKeyCreateInToJSON, -} from '../models/DriveApiKeyCreateIn'; -import { - type DriveApiKeyCreateOut, - DriveApiKeyCreateOutFromJSON, - DriveApiKeyCreateOutToJSON, -} from '../models/DriveApiKeyCreateOut'; -import { - type DriveApiKeyListOut, - DriveApiKeyListOutFromJSON, - DriveApiKeyListOutToJSON, -} from '../models/DriveApiKeyListOut'; import { type DriveCreateIn, DriveCreateInFromJSON, DriveCreateInToJSON, } from '../models/DriveCreateIn'; import { - type DriveCreateOut, - DriveCreateOutFromJSON, - DriveCreateOutToJSON, -} from '../models/DriveCreateOut'; -import { - type DriveList, - DriveListFromJSON, - DriveListToJSON, -} from '../models/DriveList'; + type DriveListOut, + DriveListOutFromJSON, + DriveListOutToJSON, +} from '../models/DriveListOut'; import { type DriveOut, DriveOutFromJSON, DriveOutToJSON, } from '../models/DriveOut'; import { - type DriveRenameIn, - DriveRenameInFromJSON, - DriveRenameInToJSON, -} from '../models/DriveRenameIn'; + type DriveUpdateIn, + DriveUpdateInFromJSON, + DriveUpdateInToJSON, +} from '../models/DriveUpdateIn'; import { - type ErrorResponse, - ErrorResponseFromJSON, - ErrorResponseToJSON, -} from '../models/ErrorResponse'; + type DriveUsageOut, + DriveUsageOutFromJSON, + DriveUsageOutToJSON, +} from '../models/DriveUsageOut'; +import { + type DrivesCreate400Response, + DrivesCreate400ResponseFromJSON, + DrivesCreate400ResponseToJSON, +} from '../models/DrivesCreate400Response'; +import { + type DrivesList400Response, + DrivesList400ResponseFromJSON, + DrivesList400ResponseToJSON, +} from '../models/DrivesList400Response'; import { type ValidationErrorResponse, ValidationErrorResponseFromJSON, ValidationErrorResponseToJSON, } from '../models/ValidationErrorResponse'; -export interface CreateDriveKeyRouteV0DrivesDriveIdKeysPostRequest { - driveId: string; - driveApiKeyCreateIn: DriveApiKeyCreateIn; -} - -export interface CreateDriveRouteV0DrivesPostRequest { +export interface DrivesCreateRequest { + idempotencyKey: string | null; driveCreateIn: DriveCreateIn; + authorization?: string | null; } -export interface ListDriveKeysRouteV0DrivesDriveIdKeysGetRequest { +export interface DrivesDeleteRequest { driveId: string; - cursor?: string | null; - limit?: number | null; + idempotencyKey: string | null; + ifMatch: string | null; + authorization?: string | null; } -export interface ListDrivesRouteV0DrivesGetRequest { - cursor?: string | null; +export interface DrivesListRequest { + lifecycle?: string; limit?: number | null; + cursor?: string | null; + authorization?: string | null; +} + +export interface DrivesReadRequest { + driveId: string; + ifNoneMatch?: string | null; + authorization?: string | null; } -export interface RenameDriveRouteV0DrivesDriveIdPatchRequest { +export interface DrivesRestoreRequest { driveId: string; - driveRenameIn: DriveRenameIn; + idempotencyKey: string | null; + ifMatch: string | null; + authorization?: string | null; } -export interface RevokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePostRequest { +export interface DrivesUpdateRequest { driveId: string; - keyId: string; + idempotencyKey: string | null; + ifMatch: string | null; + driveUpdateIn: DriveUpdateIn; + authorization?: string | null; } -export interface RotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePostRequest { +export interface DrivesUsageRequest { driveId: string; - keyId: string; + authorization?: string | null; } /** @@ -105,20 +106,20 @@ export interface RotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePostRequest { export class DrivesApi extends runtime.BaseAPI { /** - * Creates request options for createDriveKeyRouteV0DrivesDriveIdKeysPost without sending the request + * Creates request options for drivesCreate without sending the request */ - async createDriveKeyRouteV0DrivesDriveIdKeysPostRequestOpts(requestParameters: CreateDriveKeyRouteV0DrivesDriveIdKeysPostRequest): Promise { - if (requestParameters['driveId'] == null) { + async drivesCreateRequestOpts(requestParameters: DrivesCreateRequest): Promise { + if (requestParameters['idempotencyKey'] == null) { throw new runtime.RequiredError( - 'driveId', - 'Required parameter "driveId" was null or undefined when calling createDriveKeyRouteV0DrivesDriveIdKeysPost().' + 'idempotencyKey', + 'Required parameter "idempotencyKey" was null or undefined when calling drivesCreate().' ); } - if (requestParameters['driveApiKeyCreateIn'] == null) { + if (requestParameters['driveCreateIn'] == null) { throw new runtime.RequiredError( - 'driveApiKeyCreateIn', - 'Required parameter "driveApiKeyCreateIn" was null or undefined when calling createDriveKeyRouteV0DrivesDriveIdKeysPost().' + 'driveCreateIn', + 'Required parameter "driveCreateIn" was null or undefined when calling drivesCreate().' ); } @@ -128,55 +129,76 @@ export class DrivesApi extends runtime.BaseAPI { headerParameters['Content-Type'] = 'application/json'; + if (requestParameters['idempotencyKey'] != null) { + headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']); + } + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + if (this.configuration && this.configuration.accessToken) { const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); + const tokenString = await token("bearerAuth", []); if (tokenString) { headerParameters["Authorization"] = `Bearer ${tokenString}`; } } - let urlPath = `/v0/drives/{drive_id}/keys`; - urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + let urlPath = `/v0/drives`; return { path: urlPath, method: 'POST', headers: headerParameters, query: queryParameters, - body: DriveApiKeyCreateInToJSON(requestParameters['driveApiKeyCreateIn']), + body: DriveCreateInToJSON(requestParameters['driveCreateIn']), }; } /** - * Mint a new `ad_live_` key for a drive you manage — a drive may hold several (one per agent/integration). A `label` (a name for the key) is **required**. **Manager only** (404 no-leak otherwise), `full`-scope user token. The raw key is returned **once** — store it now. - * Create a drive API key + * Create a drive with its structural root folder and creator-manager grant(s) in one transaction; idempotent under the ``Idempotency-Key``. + * Create Drive */ - async createDriveKeyRouteV0DrivesDriveIdKeysPostRaw(requestParameters: CreateDriveKeyRouteV0DrivesDriveIdKeysPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.createDriveKeyRouteV0DrivesDriveIdKeysPostRequestOpts(requestParameters); + async drivesCreateRaw(requestParameters: DrivesCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.drivesCreateRequestOpts(requestParameters); const response = await this.request(requestOptions, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => DriveApiKeyCreateOutFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => DriveOutFromJSON(jsonValue)); } /** - * Mint a new `ad_live_` key for a drive you manage — a drive may hold several (one per agent/integration). A `label` (a name for the key) is **required**. **Manager only** (404 no-leak otherwise), `full`-scope user token. The raw key is returned **once** — store it now. - * Create a drive API key + * Create a drive with its structural root folder and creator-manager grant(s) in one transaction; idempotent under the ``Idempotency-Key``. + * Create Drive */ - async createDriveKeyRouteV0DrivesDriveIdKeysPost(requestParameters: CreateDriveKeyRouteV0DrivesDriveIdKeysPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createDriveKeyRouteV0DrivesDriveIdKeysPostRaw(requestParameters, initOverrides); + async drivesCreate(requestParameters: DrivesCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.drivesCreateRaw(requestParameters, initOverrides); return await response.value(); } /** - * Creates request options for createDriveRouteV0DrivesPost without sending the request + * Creates request options for drivesDelete without sending the request */ - async createDriveRouteV0DrivesPostRequestOpts(requestParameters: CreateDriveRouteV0DrivesPostRequest): Promise { - if (requestParameters['driveCreateIn'] == null) { + async drivesDeleteRequestOpts(requestParameters: DrivesDeleteRequest): Promise { + if (requestParameters['driveId'] == null) { throw new runtime.RequiredError( - 'driveCreateIn', - 'Required parameter "driveCreateIn" was null or undefined when calling createDriveRouteV0DrivesPost().' + 'driveId', + 'Required parameter "driveId" was null or undefined when calling drivesDelete().' + ); + } + + if (requestParameters['idempotencyKey'] == null) { + throw new runtime.RequiredError( + 'idempotencyKey', + 'Required parameter "idempotencyKey" was null or undefined when calling drivesDelete().' + ); + } + + if (requestParameters['ifMatch'] == null) { + throw new runtime.RequiredError( + 'ifMatch', + 'Required parameter "ifMatch" was null or undefined when calling drivesDelete().' ); } @@ -184,82 +206,92 @@ export class DrivesApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - headerParameters['Content-Type'] = 'application/json'; + if (requestParameters['idempotencyKey'] != null) { + headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']); + } + + if (requestParameters['ifMatch'] != null) { + headerParameters['If-Match'] = String(requestParameters['ifMatch']); + } + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } if (this.configuration && this.configuration.accessToken) { const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); + const tokenString = await token("bearerAuth", []); if (tokenString) { headerParameters["Authorization"] = `Bearer ${tokenString}`; } } - let urlPath = `/v0/drives`; + let urlPath = `/v0/drives/{drive_id}`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); return { path: urlPath, - method: 'POST', + method: 'DELETE', headers: headerParameters, query: queryParameters, - body: DriveCreateInToJSON(requestParameters['driveCreateIn']), }; } /** - * Create a named drive. Any **member** of the space may create one; the creator becomes its **owner**. Requires a `full`-scope user token. The response carries the drive\'s `ad_live_` API key **once** (`api_key`) — store it now, it is never returned again (mint more keys via `POST /v0/drives/{id}/keys`). The target workspace is the user\'s active organization (`users.default_org`); cross-workspace creation names no other workspace in v0. A space may hold up to its plan\'s drive limit (workspaces-v2 §4.6; seat-aware for shared drives). A caller at the limit is blocked with `403 DRIVE_LIMIT_REACHED`; the limit is tier-governed, not a hard cap. - * Create a drive in your active space + * Soft-delete a drive. Returns 200 with the deleted representation so the client has the post-delete revision/ETag for a restore. + * Delete Drive */ - async createDriveRouteV0DrivesPostRaw(requestParameters: CreateDriveRouteV0DrivesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.createDriveRouteV0DrivesPostRequestOpts(requestParameters); + async drivesDeleteRaw(requestParameters: DrivesDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.drivesDeleteRequestOpts(requestParameters); const response = await this.request(requestOptions, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => DriveCreateOutFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => DriveOutFromJSON(jsonValue)); } /** - * Create a named drive. Any **member** of the space may create one; the creator becomes its **owner**. Requires a `full`-scope user token. The response carries the drive\'s `ad_live_` API key **once** (`api_key`) — store it now, it is never returned again (mint more keys via `POST /v0/drives/{id}/keys`). The target workspace is the user\'s active organization (`users.default_org`); cross-workspace creation names no other workspace in v0. A space may hold up to its plan\'s drive limit (workspaces-v2 §4.6; seat-aware for shared drives). A caller at the limit is blocked with `403 DRIVE_LIMIT_REACHED`; the limit is tier-governed, not a hard cap. - * Create a drive in your active space + * Soft-delete a drive. Returns 200 with the deleted representation so the client has the post-delete revision/ETag for a restore. + * Delete Drive */ - async createDriveRouteV0DrivesPost(requestParameters: CreateDriveRouteV0DrivesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createDriveRouteV0DrivesPostRaw(requestParameters, initOverrides); + async drivesDelete(requestParameters: DrivesDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.drivesDeleteRaw(requestParameters, initOverrides); return await response.value(); } /** - * Creates request options for listDriveKeysRouteV0DrivesDriveIdKeysGet without sending the request + * Creates request options for drivesList without sending the request */ - async listDriveKeysRouteV0DrivesDriveIdKeysGetRequestOpts(requestParameters: ListDriveKeysRouteV0DrivesDriveIdKeysGetRequest): Promise { - if (requestParameters['driveId'] == null) { - throw new runtime.RequiredError( - 'driveId', - 'Required parameter "driveId" was null or undefined when calling listDriveKeysRouteV0DrivesDriveIdKeysGet().' - ); - } - + async drivesListRequestOpts(requestParameters: DrivesListRequest): Promise { const queryParameters: any = {}; - if (requestParameters['cursor'] != null) { - queryParameters['cursor'] = requestParameters['cursor']; + if (requestParameters['lifecycle'] != null) { + queryParameters['lifecycle'] = requestParameters['lifecycle']; } if (requestParameters['limit'] != null) { queryParameters['limit'] = requestParameters['limit']; } + if (requestParameters['cursor'] != null) { + queryParameters['cursor'] = requestParameters['cursor']; + } + const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + if (this.configuration && this.configuration.accessToken) { const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); + const tokenString = await token("bearerAuth", []); if (tokenString) { headerParameters["Authorization"] = `Bearer ${tokenString}`; } } - let urlPath = `/v0/drives/{drive_id}/keys`; - urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + let urlPath = `/v0/drives`; return { path: urlPath, @@ -270,51 +302,59 @@ export class DrivesApi extends runtime.BaseAPI { } /** - * List the `ad_live_` keys for a drive you manage (oldest first, including recently-revoked rows — filter on `revoked_at` for live only). **Manager only** (404 no-leak otherwise). A `read`-scope user token may list (metadata reveals no secret), mirroring `GET /v0/drives`. Metadata only — the raw key is never returned after mint. **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - * List a drive\'s API keys + * List the actor\'s workspace drives, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted drives so a manager can read the post-delete revision as the If-Match source for a restore. Unknown query parameters are rejected (§6.3). + * List Drives */ - async listDriveKeysRouteV0DrivesDriveIdKeysGetRaw(requestParameters: ListDriveKeysRouteV0DrivesDriveIdKeysGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.listDriveKeysRouteV0DrivesDriveIdKeysGetRequestOpts(requestParameters); + async drivesListRaw(requestParameters: DrivesListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.drivesListRequestOpts(requestParameters); const response = await this.request(requestOptions, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => DriveApiKeyListOutFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => DriveListOutFromJSON(jsonValue)); } /** - * List the `ad_live_` keys for a drive you manage (oldest first, including recently-revoked rows — filter on `revoked_at` for live only). **Manager only** (404 no-leak otherwise). A `read`-scope user token may list (metadata reveals no secret), mirroring `GET /v0/drives`. Metadata only — the raw key is never returned after mint. **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - * List a drive\'s API keys + * List the actor\'s workspace drives, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted drives so a manager can read the post-delete revision as the If-Match source for a restore. Unknown query parameters are rejected (§6.3). + * List Drives */ - async listDriveKeysRouteV0DrivesDriveIdKeysGet(requestParameters: ListDriveKeysRouteV0DrivesDriveIdKeysGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listDriveKeysRouteV0DrivesDriveIdKeysGetRaw(requestParameters, initOverrides); + async drivesList(requestParameters: DrivesListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.drivesListRaw(requestParameters, initOverrides); return await response.value(); } /** - * Creates request options for listDrivesRouteV0DrivesGet without sending the request + * Creates request options for drivesRead without sending the request */ - async listDrivesRouteV0DrivesGetRequestOpts(requestParameters: ListDrivesRouteV0DrivesGetRequest): Promise { + async drivesReadRequestOpts(requestParameters: DrivesReadRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling drivesRead().' + ); + } + const queryParameters: any = {}; - if (requestParameters['cursor'] != null) { - queryParameters['cursor'] = requestParameters['cursor']; - } + const headerParameters: runtime.HTTPHeaders = {}; - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; + if (requestParameters['ifNoneMatch'] != null) { + headerParameters['If-None-Match'] = String(requestParameters['ifNoneMatch']); } - const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } if (this.configuration && this.configuration.accessToken) { const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); + const tokenString = await token("bearerAuth", []); if (tokenString) { headerParameters["Authorization"] = `Bearer ${tokenString}`; } } - let urlPath = `/v0/drives`; + let urlPath = `/v0/drives/{drive_id}`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); return { path: urlPath, @@ -325,40 +365,47 @@ export class DrivesApi extends runtime.BaseAPI { } /** - * Returns drive **metadata** (workspaces-design §4.2): an **admin** sees the whole active workspace\'s drive inventory (every owner); a **member** sees only the drives they own. Metadata only — owner, size, timestamps — never a raw API key, and never an authorization to read a drive\'s contents. A `read`-scope token may call this; mutations require `full`. **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - * List the drives you can see + * Read one active drive. ETag = quoted revision; matching ``If-None-Match`` → 304. Deleted and cross-workspace drives are 404. + * Read Drive */ - async listDrivesRouteV0DrivesGetRaw(requestParameters: ListDrivesRouteV0DrivesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.listDrivesRouteV0DrivesGetRequestOpts(requestParameters); + async drivesReadRaw(requestParameters: DrivesReadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.drivesReadRequestOpts(requestParameters); const response = await this.request(requestOptions, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => DriveListFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => DriveOutFromJSON(jsonValue)); } /** - * Returns drive **metadata** (workspaces-design §4.2): an **admin** sees the whole active workspace\'s drive inventory (every owner); a **member** sees only the drives they own. Metadata only — owner, size, timestamps — never a raw API key, and never an authorization to read a drive\'s contents. A `read`-scope token may call this; mutations require `full`. **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - * List the drives you can see + * Read one active drive. ETag = quoted revision; matching ``If-None-Match`` → 304. Deleted and cross-workspace drives are 404. + * Read Drive */ - async listDrivesRouteV0DrivesGet(requestParameters: ListDrivesRouteV0DrivesGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listDrivesRouteV0DrivesGetRaw(requestParameters, initOverrides); + async drivesRead(requestParameters: DrivesReadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.drivesReadRaw(requestParameters, initOverrides); return await response.value(); } /** - * Creates request options for renameDriveRouteV0DrivesDriveIdPatch without sending the request + * Creates request options for drivesRestore without sending the request */ - async renameDriveRouteV0DrivesDriveIdPatchRequestOpts(requestParameters: RenameDriveRouteV0DrivesDriveIdPatchRequest): Promise { + async drivesRestoreRequestOpts(requestParameters: DrivesRestoreRequest): Promise { if (requestParameters['driveId'] == null) { throw new runtime.RequiredError( 'driveId', - 'Required parameter "driveId" was null or undefined when calling renameDriveRouteV0DrivesDriveIdPatch().' + 'Required parameter "driveId" was null or undefined when calling drivesRestore().' + ); + } + + if (requestParameters['idempotencyKey'] == null) { + throw new runtime.RequiredError( + 'idempotencyKey', + 'Required parameter "idempotencyKey" was null or undefined when calling drivesRestore().' ); } - if (requestParameters['driveRenameIn'] == null) { + if (requestParameters['ifMatch'] == null) { throw new runtime.RequiredError( - 'driveRenameIn', - 'Required parameter "driveRenameIn" was null or undefined when calling renameDriveRouteV0DrivesDriveIdPatch().' + 'ifMatch', + 'Required parameter "ifMatch" was null or undefined when calling drivesRestore().' ); } @@ -366,64 +413,87 @@ export class DrivesApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; - headerParameters['Content-Type'] = 'application/json'; + if (requestParameters['idempotencyKey'] != null) { + headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']); + } + + if (requestParameters['ifMatch'] != null) { + headerParameters['If-Match'] = String(requestParameters['ifMatch']); + } + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } if (this.configuration && this.configuration.accessToken) { const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); + const tokenString = await token("bearerAuth", []); if (tokenString) { headerParameters["Authorization"] = `Bearer ${tokenString}`; } } - let urlPath = `/v0/drives/{drive_id}`; + let urlPath = `/v0/drives/{drive_id}/restore`; urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); return { path: urlPath, - method: 'PATCH', + method: 'POST', headers: headerParameters, query: queryParameters, - body: DriveRenameInToJSON(requestParameters['driveRenameIn']), }; } /** - * Rename a drive. **Owner only** — a drive id that isn\'t yours returns 404 (no-leak). Requires a `full`-scope user token. - * Rename a drive you own + * Restore a soft-deleted drive. If-Match must carry the post-delete revision; restoring an already-active drive is 409 CONFLICT. + * Restore Drive */ - async renameDriveRouteV0DrivesDriveIdPatchRaw(requestParameters: RenameDriveRouteV0DrivesDriveIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.renameDriveRouteV0DrivesDriveIdPatchRequestOpts(requestParameters); + async drivesRestoreRaw(requestParameters: DrivesRestoreRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.drivesRestoreRequestOpts(requestParameters); const response = await this.request(requestOptions, initOverrides); return new runtime.JSONApiResponse(response, (jsonValue) => DriveOutFromJSON(jsonValue)); } /** - * Rename a drive. **Owner only** — a drive id that isn\'t yours returns 404 (no-leak). Requires a `full`-scope user token. - * Rename a drive you own + * Restore a soft-deleted drive. If-Match must carry the post-delete revision; restoring an already-active drive is 409 CONFLICT. + * Restore Drive */ - async renameDriveRouteV0DrivesDriveIdPatch(requestParameters: RenameDriveRouteV0DrivesDriveIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.renameDriveRouteV0DrivesDriveIdPatchRaw(requestParameters, initOverrides); + async drivesRestore(requestParameters: DrivesRestoreRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.drivesRestoreRaw(requestParameters, initOverrides); return await response.value(); } /** - * Creates request options for revokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePost without sending the request + * Creates request options for drivesUpdate without sending the request */ - async revokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePostRequestOpts(requestParameters: RevokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePostRequest): Promise { + async drivesUpdateRequestOpts(requestParameters: DrivesUpdateRequest): Promise { if (requestParameters['driveId'] == null) { throw new runtime.RequiredError( 'driveId', - 'Required parameter "driveId" was null or undefined when calling revokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePost().' + 'Required parameter "driveId" was null or undefined when calling drivesUpdate().' + ); + } + + if (requestParameters['idempotencyKey'] == null) { + throw new runtime.RequiredError( + 'idempotencyKey', + 'Required parameter "idempotencyKey" was null or undefined when calling drivesUpdate().' + ); + } + + if (requestParameters['ifMatch'] == null) { + throw new runtime.RequiredError( + 'ifMatch', + 'Required parameter "ifMatch" was null or undefined when calling drivesUpdate().' ); } - if (requestParameters['keyId'] == null) { + if (requestParameters['driveUpdateIn'] == null) { throw new runtime.RequiredError( - 'keyId', - 'Required parameter "keyId" was null or undefined when calling revokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePost().' + 'driveUpdateIn', + 'Required parameter "driveUpdateIn" was null or undefined when calling drivesUpdate().' ); } @@ -431,61 +501,69 @@ export class DrivesApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['idempotencyKey'] != null) { + headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']); + } + + if (requestParameters['ifMatch'] != null) { + headerParameters['If-Match'] = String(requestParameters['ifMatch']); + } + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + if (this.configuration && this.configuration.accessToken) { const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); + const tokenString = await token("bearerAuth", []); if (tokenString) { headerParameters["Authorization"] = `Bearer ${tokenString}`; } } - let urlPath = `/v0/drives/{drive_id}/keys/{key_id}/revoke`; + let urlPath = `/v0/drives/{drive_id}`; urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); - urlPath = urlPath.replace('{key_id}', encodeURIComponent(String(requestParameters['keyId']))); return { path: urlPath, - method: 'POST', + method: 'PATCH', headers: headerParameters, query: queryParameters, + body: DriveUpdateInToJSON(requestParameters['driveUpdateIn']), }; } /** - * Revoke one `ad_live_` key of a drive you manage — anything using it loses access immediately. **Manager only** (404 no-leak otherwise), `full`-scope user token. Idempotent: revoking an unknown/already-revoked key returns 204 too (no existence oracle). - * Revoke a drive API key + * Rename / update a drive\'s metadata. Requires ``Idempotency-Key`` and ``If-Match`` (428 absent, 412 stale); bumps the revision. + * Update Drive */ - async revokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePostRaw(requestParameters: RevokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.revokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePostRequestOpts(requestParameters); + async drivesUpdateRaw(requestParameters: DrivesUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.drivesUpdateRequestOpts(requestParameters); const response = await this.request(requestOptions, initOverrides); - return new runtime.VoidApiResponse(response); + return new runtime.JSONApiResponse(response, (jsonValue) => DriveOutFromJSON(jsonValue)); } /** - * Revoke one `ad_live_` key of a drive you manage — anything using it loses access immediately. **Manager only** (404 no-leak otherwise), `full`-scope user token. Idempotent: revoking an unknown/already-revoked key returns 204 too (no existence oracle). - * Revoke a drive API key + * Rename / update a drive\'s metadata. Requires ``Idempotency-Key`` and ``If-Match`` (428 absent, 412 stale); bumps the revision. + * Update Drive */ - async revokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePost(requestParameters: RevokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.revokeDriveKeyRouteV0DrivesDriveIdKeysKeyIdRevokePostRaw(requestParameters, initOverrides); + async drivesUpdate(requestParameters: DrivesUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.drivesUpdateRaw(requestParameters, initOverrides); + return await response.value(); } /** - * Creates request options for rotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePost without sending the request + * Creates request options for drivesUsage without sending the request */ - async rotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePostRequestOpts(requestParameters: RotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePostRequest): Promise { + async drivesUsageRequestOpts(requestParameters: DrivesUsageRequest): Promise { if (requestParameters['driveId'] == null) { throw new runtime.RequiredError( 'driveId', - 'Required parameter "driveId" was null or undefined when calling rotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePost().' - ); - } - - if (requestParameters['keyId'] == null) { - throw new runtime.RequiredError( - 'keyId', - 'Required parameter "keyId" was null or undefined when calling rotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePost().' + 'Required parameter "driveId" was null or undefined when calling drivesUsage().' ); } @@ -493,44 +571,47 @@ export class DrivesApi extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + if (this.configuration && this.configuration.accessToken) { const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); + const tokenString = await token("bearerAuth", []); if (tokenString) { headerParameters["Authorization"] = `Bearer ${tokenString}`; } } - let urlPath = `/v0/drives/{drive_id}/keys/{key_id}/rotate`; + let urlPath = `/v0/drives/{drive_id}/usage`; urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); - urlPath = urlPath.replace('{key_id}', encodeURIComponent(String(requestParameters['keyId']))); return { path: urlPath, - method: 'POST', + method: 'GET', headers: headerParameters, query: queryParameters, }; } /** - * Rotate a single `ad_live_` key: revoke `key_id` and mint a replacement that inherits its label. **Only that key** is affected — the drive\'s other keys keep working. **Manager only** (404 no-leak otherwise), `full`-scope user token. The new key is returned **once** — store it now. A `key_id` that isn\'t a live key of this drive is a 404. - * Rotate one API key + * Byte counters for one active drive: storage is the live sum of its versions\' sizes; retrieval reads the counter the content-read slice maintains (0 until it lands). + * Drive Usage */ - async rotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePostRaw(requestParameters: RotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.rotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePostRequestOpts(requestParameters); + async drivesUsageRaw(requestParameters: DrivesUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.drivesUsageRequestOpts(requestParameters); const response = await this.request(requestOptions, initOverrides); - return new runtime.JSONApiResponse(response, (jsonValue) => DriveApiKeyCreateOutFromJSON(jsonValue)); + return new runtime.JSONApiResponse(response, (jsonValue) => DriveUsageOutFromJSON(jsonValue)); } /** - * Rotate a single `ad_live_` key: revoke `key_id` and mint a replacement that inherits its label. **Only that key** is affected — the drive\'s other keys keep working. **Manager only** (404 no-leak otherwise), `full`-scope user token. The new key is returned **once** — store it now. A `key_id` that isn\'t a live key of this drive is a 404. - * Rotate one API key + * Byte counters for one active drive: storage is the live sum of its versions\' sizes; retrieval reads the counter the content-read slice maintains (0 until it lands). + * Drive Usage */ - async rotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePost(requestParameters: RotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.rotateOneKeyRouteV0DrivesDriveIdKeysKeyIdRotatePostRaw(requestParameters, initOverrides); + async drivesUsage(requestParameters: DrivesUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.drivesUsageRaw(requestParameters, initOverrides); return await response.value(); } diff --git a/sdk/typescript/src/apis/FoldersApi.ts b/sdk/typescript/src/apis/FoldersApi.ts new file mode 100644 index 0000000..7f6d5db --- /dev/null +++ b/sdk/typescript/src/apis/FoldersApi.ts @@ -0,0 +1,724 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import * as runtime from '../runtime'; +import { + type DrivesCreate400Response, + DrivesCreate400ResponseFromJSON, + DrivesCreate400ResponseToJSON, +} from '../models/DrivesCreate400Response'; +import { + type FolderCascadeOut, + FolderCascadeOutFromJSON, + FolderCascadeOutToJSON, +} from '../models/FolderCascadeOut'; +import { + type FolderCopyIn, + FolderCopyInFromJSON, + FolderCopyInToJSON, +} from '../models/FolderCopyIn'; +import { + type FolderCreateIn, + FolderCreateInFromJSON, + FolderCreateInToJSON, +} from '../models/FolderCreateIn'; +import { + type FolderListOut, + FolderListOutFromJSON, + FolderListOutToJSON, +} from '../models/FolderListOut'; +import { + type FolderOut, + FolderOutFromJSON, + FolderOutToJSON, +} from '../models/FolderOut'; +import { + type FolderUpdateIn, + FolderUpdateInFromJSON, + FolderUpdateInToJSON, +} from '../models/FolderUpdateIn'; +import { + type ValidationErrorResponse, + ValidationErrorResponseFromJSON, + ValidationErrorResponseToJSON, +} from '../models/ValidationErrorResponse'; + +export interface FoldersCopyRequest { + driveId: string; + folderId: string; + idempotencyKey: string | null; + folderCopyIn: FolderCopyIn; + ifMatch?: string | null; + authorization?: string | null; +} + +export interface FoldersCreateRequest { + driveId: string; + idempotencyKey: string | null; + folderCreateIn: FolderCreateIn; + authorization?: string | null; +} + +export interface FoldersDeleteRequest { + driveId: string; + folderId: string; + idempotencyKey: string | null; + ifMatch: string | null; + recursive?: boolean; + authorization?: string | null; +} + +export interface FoldersListRequest { + driveId: string; + lifecycle?: string; + limit?: number | null; + cursor?: string | null; + parentId?: string | null; + name?: string | null; + authorization?: string | null; +} + +export interface FoldersReadRequest { + driveId: string; + folderId: string; + ifNoneMatch?: string | null; + authorization?: string | null; +} + +export interface FoldersRestoreRequest { + driveId: string; + folderId: string; + idempotencyKey: string | null; + ifMatch: string | null; + authorization?: string | null; +} + +export interface FoldersUpdateRequest { + driveId: string; + folderId: string; + idempotencyKey: string | null; + ifMatch: string | null; + folderUpdateIn: FolderUpdateIn; + authorization?: string | null; +} + +/** + * + */ +export class FoldersApi extends runtime.BaseAPI { + + /** + * Creates request options for foldersCopy without sending the request + */ + async foldersCopyRequestOpts(requestParameters: FoldersCopyRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling foldersCopy().' + ); + } + + if (requestParameters['folderId'] == null) { + throw new runtime.RequiredError( + 'folderId', + 'Required parameter "folderId" was null or undefined when calling foldersCopy().' + ); + } + + if (requestParameters['idempotencyKey'] == null) { + throw new runtime.RequiredError( + 'idempotencyKey', + 'Required parameter "idempotencyKey" was null or undefined when calling foldersCopy().' + ); + } + + if (requestParameters['folderCopyIn'] == null) { + throw new runtime.RequiredError( + 'folderCopyIn', + 'Required parameter "folderCopyIn" was null or undefined when calling foldersCopy().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['idempotencyKey'] != null) { + headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']); + } + + if (requestParameters['ifMatch'] != null) { + headerParameters['If-Match'] = String(requestParameters['ifMatch']); + } + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/v0/drives/{drive_id}/folders/{folder_id}/copy`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + urlPath = urlPath.replace('{folder_id}', encodeURIComponent(String(requestParameters['folderId']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: FolderCopyInToJSON(requestParameters['folderCopyIn']), + }; + } + + /** + * Copy a folder\'s subtree within the same drive. Cross-drive copy is out of v0 scope and rejected (400 INVALID_ARGUMENT). ``destination_drive_id`` must equal the source drive when present. Materializes the subtree synchronously → 201 + the copied folder. ``If-Match`` is optional; when present it is validated against the source revision (412 stale). + * Copy Folder + */ + async foldersCopyRaw(requestParameters: FoldersCopyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.foldersCopyRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FolderOutFromJSON(jsonValue)); + } + + /** + * Copy a folder\'s subtree within the same drive. Cross-drive copy is out of v0 scope and rejected (400 INVALID_ARGUMENT). ``destination_drive_id`` must equal the source drive when present. Materializes the subtree synchronously → 201 + the copied folder. ``If-Match`` is optional; when present it is validated against the source revision (412 stale). + * Copy Folder + */ + async foldersCopy(requestParameters: FoldersCopyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.foldersCopyRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for foldersCreate without sending the request + */ + async foldersCreateRequestOpts(requestParameters: FoldersCreateRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling foldersCreate().' + ); + } + + if (requestParameters['idempotencyKey'] == null) { + throw new runtime.RequiredError( + 'idempotencyKey', + 'Required parameter "idempotencyKey" was null or undefined when calling foldersCreate().' + ); + } + + if (requestParameters['folderCreateIn'] == null) { + throw new runtime.RequiredError( + 'folderCreateIn', + 'Required parameter "folderCreateIn" was null or undefined when calling foldersCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['idempotencyKey'] != null) { + headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']); + } + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/v0/drives/{drive_id}/folders`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: FolderCreateInToJSON(requestParameters['folderCreateIn']), + }; + } + + /** + * Create one folder under `parent_id`; idempotent under the ``Idempotency-Key``. + * Create Folder + */ + async foldersCreateRaw(requestParameters: FoldersCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.foldersCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FolderOutFromJSON(jsonValue)); + } + + /** + * Create one folder under `parent_id`; idempotent under the ``Idempotency-Key``. + * Create Folder + */ + async foldersCreate(requestParameters: FoldersCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.foldersCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for foldersDelete without sending the request + */ + async foldersDeleteRequestOpts(requestParameters: FoldersDeleteRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling foldersDelete().' + ); + } + + if (requestParameters['folderId'] == null) { + throw new runtime.RequiredError( + 'folderId', + 'Required parameter "folderId" was null or undefined when calling foldersDelete().' + ); + } + + if (requestParameters['idempotencyKey'] == null) { + throw new runtime.RequiredError( + 'idempotencyKey', + 'Required parameter "idempotencyKey" was null or undefined when calling foldersDelete().' + ); + } + + if (requestParameters['ifMatch'] == null) { + throw new runtime.RequiredError( + 'ifMatch', + 'Required parameter "ifMatch" was null or undefined when calling foldersDelete().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['recursive'] != null) { + queryParameters['recursive'] = requestParameters['recursive']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['idempotencyKey'] != null) { + headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']); + } + + if (requestParameters['ifMatch'] != null) { + headerParameters['If-Match'] = String(requestParameters['ifMatch']); + } + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/v0/drives/{drive_id}/folders/{folder_id}`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + urlPath = urlPath.replace('{folder_id}', encodeURIComponent(String(requestParameters['folderId']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Soft-delete a folder and its full live subtree (folders + artifacts) in one transaction. A non-empty subtree requires ``recursive=true`` (409 FOLDER_RECURSIVE_REQUIRED otherwise). Returns the deleted root representation plus exact cascade counts and the post-delete revision/ETag for a restore. + * Delete Folder + */ + async foldersDeleteRaw(requestParameters: FoldersDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.foldersDeleteRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FolderCascadeOutFromJSON(jsonValue)); + } + + /** + * Soft-delete a folder and its full live subtree (folders + artifacts) in one transaction. A non-empty subtree requires ``recursive=true`` (409 FOLDER_RECURSIVE_REQUIRED otherwise). Returns the deleted root representation plus exact cascade counts and the post-delete revision/ETag for a restore. + * Delete Folder + */ + async foldersDelete(requestParameters: FoldersDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.foldersDeleteRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for foldersList without sending the request + */ + async foldersListRequestOpts(requestParameters: FoldersListRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling foldersList().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['lifecycle'] != null) { + queryParameters['lifecycle'] = requestParameters['lifecycle']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + if (requestParameters['cursor'] != null) { + queryParameters['cursor'] = requestParameters['cursor']; + } + + if (requestParameters['parentId'] != null) { + queryParameters['parent_id'] = requestParameters['parentId']; + } + + if (requestParameters['name'] != null) { + queryParameters['name'] = requestParameters['name']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/v0/drives/{drive_id}/folders`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * List the drive\'s folders, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted folders so the post-delete revision can be read as the If-Match source for a restore. ``parent_id`` / ``name`` are exact-match filters. Unknown query parameters are rejected (§6.3). + * List Folders + */ + async foldersListRaw(requestParameters: FoldersListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.foldersListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FolderListOutFromJSON(jsonValue)); + } + + /** + * List the drive\'s folders, newest-first (keyset paginated). ``lifecycle`` (active|deleted|all) exposes soft-deleted folders so the post-delete revision can be read as the If-Match source for a restore. ``parent_id`` / ``name`` are exact-match filters. Unknown query parameters are rejected (§6.3). + * List Folders + */ + async foldersList(requestParameters: FoldersListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.foldersListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for foldersRead without sending the request + */ + async foldersReadRequestOpts(requestParameters: FoldersReadRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling foldersRead().' + ); + } + + if (requestParameters['folderId'] == null) { + throw new runtime.RequiredError( + 'folderId', + 'Required parameter "folderId" was null or undefined when calling foldersRead().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['ifNoneMatch'] != null) { + headerParameters['If-None-Match'] = String(requestParameters['ifNoneMatch']); + } + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/v0/drives/{drive_id}/folders/{folder_id}`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + urlPath = urlPath.replace('{folder_id}', encodeURIComponent(String(requestParameters['folderId']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Read one active folder. ETag = quoted revision; matching ``If-None-Match`` → 304. Deleted and cross-workspace folders are 404. + * Read Folder + */ + async foldersReadRaw(requestParameters: FoldersReadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.foldersReadRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FolderOutFromJSON(jsonValue)); + } + + /** + * Read one active folder. ETag = quoted revision; matching ``If-None-Match`` → 304. Deleted and cross-workspace folders are 404. + * Read Folder + */ + async foldersRead(requestParameters: FoldersReadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.foldersReadRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for foldersRestore without sending the request + */ + async foldersRestoreRequestOpts(requestParameters: FoldersRestoreRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling foldersRestore().' + ); + } + + if (requestParameters['folderId'] == null) { + throw new runtime.RequiredError( + 'folderId', + 'Required parameter "folderId" was null or undefined when calling foldersRestore().' + ); + } + + if (requestParameters['idempotencyKey'] == null) { + throw new runtime.RequiredError( + 'idempotencyKey', + 'Required parameter "idempotencyKey" was null or undefined when calling foldersRestore().' + ); + } + + if (requestParameters['ifMatch'] == null) { + throw new runtime.RequiredError( + 'ifMatch', + 'Required parameter "ifMatch" was null or undefined when calling foldersRestore().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['idempotencyKey'] != null) { + headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']); + } + + if (requestParameters['ifMatch'] != null) { + headerParameters['If-Match'] = String(requestParameters['ifMatch']); + } + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/v0/drives/{drive_id}/folders/{folder_id}/restore`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + urlPath = urlPath.replace('{folder_id}', encodeURIComponent(String(requestParameters['folderId']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Restore a soft-deleted folder and its deleted subtree atomically. If-Match must carry the post-delete revision; restoring an already-active folder is 409 CONFLICT. + * Restore Folder + */ + async foldersRestoreRaw(requestParameters: FoldersRestoreRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.foldersRestoreRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FolderCascadeOutFromJSON(jsonValue)); + } + + /** + * Restore a soft-deleted folder and its deleted subtree atomically. If-Match must carry the post-delete revision; restoring an already-active folder is 409 CONFLICT. + * Restore Folder + */ + async foldersRestore(requestParameters: FoldersRestoreRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.foldersRestoreRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for foldersUpdate without sending the request + */ + async foldersUpdateRequestOpts(requestParameters: FoldersUpdateRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling foldersUpdate().' + ); + } + + if (requestParameters['folderId'] == null) { + throw new runtime.RequiredError( + 'folderId', + 'Required parameter "folderId" was null or undefined when calling foldersUpdate().' + ); + } + + if (requestParameters['idempotencyKey'] == null) { + throw new runtime.RequiredError( + 'idempotencyKey', + 'Required parameter "idempotencyKey" was null or undefined when calling foldersUpdate().' + ); + } + + if (requestParameters['ifMatch'] == null) { + throw new runtime.RequiredError( + 'ifMatch', + 'Required parameter "ifMatch" was null or undefined when calling foldersUpdate().' + ); + } + + if (requestParameters['folderUpdateIn'] == null) { + throw new runtime.RequiredError( + 'folderUpdateIn', + 'Required parameter "folderUpdateIn" was null or undefined when calling foldersUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['idempotencyKey'] != null) { + headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']); + } + + if (requestParameters['ifMatch'] != null) { + headerParameters['If-Match'] = String(requestParameters['ifMatch']); + } + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/v0/drives/{drive_id}/folders/{folder_id}`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + urlPath = urlPath.replace('{folder_id}', encodeURIComponent(String(requestParameters['folderId']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: FolderUpdateInToJSON(requestParameters['folderUpdateIn']), + }; + } + + /** + * Rename / move / update a folder\'s metadata or inheritance. Requires ``Idempotency-Key`` and ``If-Match`` (428 absent, 412 stale); bumps the revision. + * Update Folder + */ + async foldersUpdateRaw(requestParameters: FoldersUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.foldersUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => FolderOutFromJSON(jsonValue)); + } + + /** + * Rename / move / update a folder\'s metadata or inheritance. Requires ``Idempotency-Key`` and ``If-Match`` (428 absent, 412 stale); bumps the revision. + * Update Folder + */ + async foldersUpdate(requestParameters: FoldersUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.foldersUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/sdk/typescript/src/apis/GrantsApi.ts b/sdk/typescript/src/apis/GrantsApi.ts new file mode 100644 index 0000000..95ad520 --- /dev/null +++ b/sdk/typescript/src/apis/GrantsApi.ts @@ -0,0 +1,516 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import * as runtime from '../runtime'; +import { + type DrivesCreate400Response, + DrivesCreate400ResponseFromJSON, + DrivesCreate400ResponseToJSON, +} from '../models/DrivesCreate400Response'; +import { + type GrantCreateIn, + GrantCreateInFromJSON, + GrantCreateInToJSON, +} from '../models/GrantCreateIn'; +import { + type GrantListOut, + GrantListOutFromJSON, + GrantListOutToJSON, +} from '../models/GrantListOut'; +import { + type GrantOut, + GrantOutFromJSON, + GrantOutToJSON, +} from '../models/GrantOut'; +import { + type GrantUpdateIn, + GrantUpdateInFromJSON, + GrantUpdateInToJSON, +} from '../models/GrantUpdateIn'; +import { + type ValidationErrorResponse, + ValidationErrorResponseFromJSON, + ValidationErrorResponseToJSON, +} from '../models/ValidationErrorResponse'; + +export interface GrantsCreateRequest { + driveId: string; + idempotencyKey: string | null; + grantCreateIn: GrantCreateIn; + authorization?: string | null; +} + +export interface GrantsListRequest { + driveId: string; + lifecycle?: string; + limit?: number | null; + cursor?: string | null; + resourceType?: string | null; + resourceId?: string | null; + principalType?: string | null; + authorization?: string | null; +} + +export interface GrantsReadRequest { + driveId: string; + grantId: string; + ifNoneMatch?: string | null; + authorization?: string | null; +} + +export interface GrantsRevokeRequest { + driveId: string; + grantId: string; + idempotencyKey: string | null; + ifMatch: string | null; + authorization?: string | null; +} + +export interface GrantsUpdateRequest { + driveId: string; + grantId: string; + idempotencyKey: string | null; + ifMatch: string | null; + grantUpdateIn: GrantUpdateIn; + authorization?: string | null; +} + +/** + * + */ +export class GrantsApi extends runtime.BaseAPI { + + /** + * Creates request options for grantsCreate without sending the request + */ + async grantsCreateRequestOpts(requestParameters: GrantsCreateRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling grantsCreate().' + ); + } + + if (requestParameters['idempotencyKey'] == null) { + throw new runtime.RequiredError( + 'idempotencyKey', + 'Required parameter "idempotencyKey" was null or undefined when calling grantsCreate().' + ); + } + + if (requestParameters['grantCreateIn'] == null) { + throw new runtime.RequiredError( + 'grantCreateIn', + 'Required parameter "grantCreateIn" was null or undefined when calling grantsCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['idempotencyKey'] != null) { + headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']); + } + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/v0/drives/{drive_id}/grants`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: GrantCreateInToJSON(requestParameters['grantCreateIn']), + }; + } + + /** + * Grant one principal a role on a drive, folder, or artifact. + * Create Grant + */ + async grantsCreateRaw(requestParameters: GrantsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.grantsCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GrantOutFromJSON(jsonValue)); + } + + /** + * Grant one principal a role on a drive, folder, or artifact. + * Create Grant + */ + async grantsCreate(requestParameters: GrantsCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.grantsCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for grantsList without sending the request + */ + async grantsListRequestOpts(requestParameters: GrantsListRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling grantsList().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['lifecycle'] != null) { + queryParameters['lifecycle'] = requestParameters['lifecycle']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + if (requestParameters['cursor'] != null) { + queryParameters['cursor'] = requestParameters['cursor']; + } + + if (requestParameters['resourceType'] != null) { + queryParameters['resource_type'] = requestParameters['resourceType']; + } + + if (requestParameters['resourceId'] != null) { + queryParameters['resource_id'] = requestParameters['resourceId']; + } + + if (requestParameters['principalType'] != null) { + queryParameters['principal_type'] = requestParameters['principalType']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/v0/drives/{drive_id}/grants`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * List explicit grants in the drive, keyset paginated. **What you see depends on your role (contract change).** A caller holding ``manager`` on the drive lists EVERY grant in it. Any other caller lists only the grants that name them — their own agent/user rows, ``workspace`` grants covering them, and ``public`` grants (which already expose the resource to them anyway). Previously any drive ``viewer`` could page out every principal id, role and expiry in the drive; that was an access-graph disclosure, not a feature. The operation is refused (404) only for a caller holding no live grant anywhere in the drive — never for lack of ``manager``, because seeing your own access is not a privilege. That admits folder-scoped principals, who previously 404\'d here despite having access to show. A folder ``manager`` still sees only their own rows, not the roster of the subtree they administer; scoping the listing by per-resource administration authority is a follow-up this change does not claim. ``resource_id`` filters to one resource\'s grants and REQUIRES ``resource_type`` alongside it — a bare resource id is ambiguous across the three resource kinds, and guessing the kind from the id prefix would make the filter\'s meaning depend on an id format the contract does not promise to keep. ``resource_type`` on its own remains a valid (and pre-existing) filter. + * List Grants + */ + async grantsListRaw(requestParameters: GrantsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.grantsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GrantListOutFromJSON(jsonValue)); + } + + /** + * List explicit grants in the drive, keyset paginated. **What you see depends on your role (contract change).** A caller holding ``manager`` on the drive lists EVERY grant in it. Any other caller lists only the grants that name them — their own agent/user rows, ``workspace`` grants covering them, and ``public`` grants (which already expose the resource to them anyway). Previously any drive ``viewer`` could page out every principal id, role and expiry in the drive; that was an access-graph disclosure, not a feature. The operation is refused (404) only for a caller holding no live grant anywhere in the drive — never for lack of ``manager``, because seeing your own access is not a privilege. That admits folder-scoped principals, who previously 404\'d here despite having access to show. A folder ``manager`` still sees only their own rows, not the roster of the subtree they administer; scoping the listing by per-resource administration authority is a follow-up this change does not claim. ``resource_id`` filters to one resource\'s grants and REQUIRES ``resource_type`` alongside it — a bare resource id is ambiguous across the three resource kinds, and guessing the kind from the id prefix would make the filter\'s meaning depend on an id format the contract does not promise to keep. ``resource_type`` on its own remains a valid (and pre-existing) filter. + * List Grants + */ + async grantsList(requestParameters: GrantsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.grantsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for grantsRead without sending the request + */ + async grantsReadRequestOpts(requestParameters: GrantsReadRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling grantsRead().' + ); + } + + if (requestParameters['grantId'] == null) { + throw new runtime.RequiredError( + 'grantId', + 'Required parameter "grantId" was null or undefined when calling grantsRead().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['ifNoneMatch'] != null) { + headerParameters['If-None-Match'] = String(requestParameters['ifNoneMatch']); + } + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/v0/drives/{drive_id}/grants/{grant_id}`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + urlPath = urlPath.replace('{grant_id}', encodeURIComponent(String(requestParameters['grantId']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Read one grant in the drive. + * Read Grant + */ + async grantsReadRaw(requestParameters: GrantsReadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.grantsReadRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GrantOutFromJSON(jsonValue)); + } + + /** + * Read one grant in the drive. + * Read Grant + */ + async grantsRead(requestParameters: GrantsReadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.grantsReadRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for grantsRevoke without sending the request + */ + async grantsRevokeRequestOpts(requestParameters: GrantsRevokeRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling grantsRevoke().' + ); + } + + if (requestParameters['grantId'] == null) { + throw new runtime.RequiredError( + 'grantId', + 'Required parameter "grantId" was null or undefined when calling grantsRevoke().' + ); + } + + if (requestParameters['idempotencyKey'] == null) { + throw new runtime.RequiredError( + 'idempotencyKey', + 'Required parameter "idempotencyKey" was null or undefined when calling grantsRevoke().' + ); + } + + if (requestParameters['ifMatch'] == null) { + throw new runtime.RequiredError( + 'ifMatch', + 'Required parameter "ifMatch" was null or undefined when calling grantsRevoke().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['idempotencyKey'] != null) { + headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']); + } + + if (requestParameters['ifMatch'] != null) { + headerParameters['If-Match'] = String(requestParameters['ifMatch']); + } + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/v0/drives/{drive_id}/grants/{grant_id}`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + urlPath = urlPath.replace('{grant_id}', encodeURIComponent(String(requestParameters['grantId']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Revoke a grant (soft, sets revoked_at) under If-Match. + * Revoke Grant + */ + async grantsRevokeRaw(requestParameters: GrantsRevokeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.grantsRevokeRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GrantOutFromJSON(jsonValue)); + } + + /** + * Revoke a grant (soft, sets revoked_at) under If-Match. + * Revoke Grant + */ + async grantsRevoke(requestParameters: GrantsRevokeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.grantsRevokeRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for grantsUpdate without sending the request + */ + async grantsUpdateRequestOpts(requestParameters: GrantsUpdateRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling grantsUpdate().' + ); + } + + if (requestParameters['grantId'] == null) { + throw new runtime.RequiredError( + 'grantId', + 'Required parameter "grantId" was null or undefined when calling grantsUpdate().' + ); + } + + if (requestParameters['idempotencyKey'] == null) { + throw new runtime.RequiredError( + 'idempotencyKey', + 'Required parameter "idempotencyKey" was null or undefined when calling grantsUpdate().' + ); + } + + if (requestParameters['ifMatch'] == null) { + throw new runtime.RequiredError( + 'ifMatch', + 'Required parameter "ifMatch" was null or undefined when calling grantsUpdate().' + ); + } + + if (requestParameters['grantUpdateIn'] == null) { + throw new runtime.RequiredError( + 'grantUpdateIn', + 'Required parameter "grantUpdateIn" was null or undefined when calling grantsUpdate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['idempotencyKey'] != null) { + headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']); + } + + if (requestParameters['ifMatch'] != null) { + headerParameters['If-Match'] = String(requestParameters['ifMatch']); + } + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/v0/drives/{drive_id}/grants/{grant_id}`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + urlPath = urlPath.replace('{grant_id}', encodeURIComponent(String(requestParameters['grantId']))); + + return { + path: urlPath, + method: 'PATCH', + headers: headerParameters, + query: queryParameters, + body: GrantUpdateInToJSON(requestParameters['grantUpdateIn']), + }; + } + + /** + * Change a grant\'s role or expiry under If-Match. + * Update Grant + */ + async grantsUpdateRaw(requestParameters: GrantsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.grantsUpdateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => GrantOutFromJSON(jsonValue)); + } + + /** + * Change a grant\'s role or expiry under If-Match. + * Update Grant + */ + async grantsUpdate(requestParameters: GrantsUpdateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.grantsUpdateRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/sdk/typescript/src/apis/McpOauthApi.ts b/sdk/typescript/src/apis/McpOauthApi.ts deleted file mode 100644 index 2bb96e0..0000000 --- a/sdk/typescript/src/apis/McpOauthApi.ts +++ /dev/null @@ -1,115 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as runtime from '../runtime'; -import { - type ClientRegistrationOut, - ClientRegistrationOutFromJSON, - ClientRegistrationOutToJSON, -} from '../models/ClientRegistrationOut'; -import { - type ErrorResponse, - ErrorResponseFromJSON, - ErrorResponseToJSON, -} from '../models/ErrorResponse'; -import { - type OAuthProtocolErrorOut, - OAuthProtocolErrorOutFromJSON, - OAuthProtocolErrorOutToJSON, -} from '../models/OAuthProtocolErrorOut'; - -/** - * - */ -export class McpOauthApi extends runtime.BaseAPI { - - /** - * Creates request options for oauth2RegisterOauth2RegisterPost without sending the request - */ - async oauth2RegisterOauth2RegisterPostRequestOpts(): Promise { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/oauth2/register`; - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Anonymous registration endpoint for MCP clients. Public clients only (PKCE, no client_secret). Returns the registered metadata plus the assigned `client_id`. Registration grants nothing by itself — every token still requires a user consent ceremony at /oauth2/authorize. - * Dynamic Client Registration (RFC 7591) - */ - async oauth2RegisterOauth2RegisterPostRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.oauth2RegisterOauth2RegisterPostRequestOpts(); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => ClientRegistrationOutFromJSON(jsonValue)); - } - - /** - * Anonymous registration endpoint for MCP clients. Public clients only (PKCE, no client_secret). Returns the registered metadata plus the assigned `client_id`. Registration grants nothing by itself — every token still requires a user consent ceremony at /oauth2/authorize. - * Dynamic Client Registration (RFC 7591) - */ - async oauth2RegisterOauth2RegisterPost(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.oauth2RegisterOauth2RegisterPostRaw(initOverrides); - return await response.value(); - } - - /** - * Creates request options for oauth2RevokeOauth2RevokePost without sending the request - */ - async oauth2RevokeOauth2RevokePostRequestOpts(): Promise { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/oauth2/revoke`; - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Revokes an `adat_` access token (that token only) or an `adrt_` refresh token (the whole rotation chain). Unknown tokens return 200 per RFC 7009 §2.2 — existence is not revealed. Public-client endpoint auth (`client_id` form param, no secret). - * Token revocation (RFC 7009) - */ - async oauth2RevokeOauth2RevokePostRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.oauth2RevokeOauth2RevokePostRequestOpts(); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * Revokes an `adat_` access token (that token only) or an `adrt_` refresh token (the whole rotation chain). Unknown tokens return 200 per RFC 7009 §2.2 — existence is not revealed. Public-client endpoint auth (`client_id` form param, no secret). - * Token revocation (RFC 7009) - */ - async oauth2RevokeOauth2RevokePost(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.oauth2RevokeOauth2RevokePostRaw(initOverrides); - return await response.value(); - } - -} diff --git a/sdk/typescript/src/apis/McpOauthUiApi.ts b/sdk/typescript/src/apis/McpOauthUiApi.ts deleted file mode 100644 index a1359df..0000000 --- a/sdk/typescript/src/apis/McpOauthUiApi.ts +++ /dev/null @@ -1,149 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as runtime from '../runtime'; -import { - type AuthorizeDecisionOauth2AuthorizePost403Response, - AuthorizeDecisionOauth2AuthorizePost403ResponseFromJSON, - AuthorizeDecisionOauth2AuthorizePost403ResponseToJSON, -} from '../models/AuthorizeDecisionOauth2AuthorizePost403Response'; -import { - type ErrorResponse, - ErrorResponseFromJSON, - ErrorResponseToJSON, -} from '../models/ErrorResponse'; -import { - type OAuthProtocolErrorOut, - OAuthProtocolErrorOutFromJSON, - OAuthProtocolErrorOutToJSON, -} from '../models/OAuthProtocolErrorOut'; -import { - type ValidationErrorResponse, - ValidationErrorResponseFromJSON, - ValidationErrorResponseToJSON, -} from '../models/ValidationErrorResponse'; - -export interface AuthorizeDecisionOauth2AuthorizePostRequest { - csrf: string; -} - -/** - * - */ -export class McpOauthUiApi extends runtime.BaseAPI { - - /** - * Creates request options for authorizeDecisionOauth2AuthorizePost without sending the request - */ - async authorizeDecisionOauth2AuthorizePostRequestOpts(requestParameters: AuthorizeDecisionOauth2AuthorizePostRequest): Promise { - if (requestParameters['csrf'] == null) { - throw new runtime.RequiredError( - 'csrf', - 'Required parameter "csrf" was null or undefined when calling authorizeDecisionOauth2AuthorizePost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - const consumes: runtime.Consume[] = [ - { contentType: 'application/x-www-form-urlencoded' }, - ]; - // @ts-ignore: canConsumeForm may be unused - const canConsumeForm = runtime.canConsumeForm(consumes); - - let formParams: { append(param: string, value: any): any }; - let useForm = false; - if (useForm) { - formParams = new FormData(); - } else { - formParams = new URLSearchParams(); - } - - if (requestParameters['csrf'] != null) { - formParams.append('csrf', requestParameters['csrf'] as any); - } - - - let urlPath = `/oauth2/authorize`; - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: formParams, - }; - } - - /** - * Authorize Decision - */ - async authorizeDecisionOauth2AuthorizePostRaw(requestParameters: AuthorizeDecisionOauth2AuthorizePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.authorizeDecisionOauth2AuthorizePostRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * Authorize Decision - */ - async authorizeDecisionOauth2AuthorizePost(requestParameters: AuthorizeDecisionOauth2AuthorizePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.authorizeDecisionOauth2AuthorizePostRaw(requestParameters, initOverrides); - } - - /** - * Creates request options for authorizePageOauth2AuthorizeGet without sending the request - */ - async authorizePageOauth2AuthorizeGetRequestOpts(): Promise { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - - let urlPath = `/oauth2/authorize`; - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Authorize Page - */ - async authorizePageOauth2AuthorizeGetRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.authorizePageOauth2AuthorizeGetRequestOpts(); - const response = await this.request(requestOptions, initOverrides); - - if (this.isJsonMime(response.headers.get('content-type'))) { - return new runtime.JSONApiResponse(response); - } else { - return new runtime.TextApiResponse(response) as any; - } - } - - /** - * Authorize Page - */ - async authorizePageOauth2AuthorizeGet(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.authorizePageOauth2AuthorizeGetRaw(initOverrides); - return await response.value(); - } - -} diff --git a/sdk/typescript/src/apis/MembersApi.ts b/sdk/typescript/src/apis/MembersApi.ts deleted file mode 100644 index b09714b..0000000 --- a/sdk/typescript/src/apis/MembersApi.ts +++ /dev/null @@ -1,446 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as runtime from '../runtime'; -import { - type ErrorResponse, - ErrorResponseFromJSON, - ErrorResponseToJSON, -} from '../models/ErrorResponse'; -import { - type InvitationList, - InvitationListFromJSON, - InvitationListToJSON, -} from '../models/InvitationList'; -import { - type InviteCreateOut, - InviteCreateOutFromJSON, - InviteCreateOutToJSON, -} from '../models/InviteCreateOut'; -import { - type MemberInviteIn, - MemberInviteInFromJSON, - MemberInviteInToJSON, -} from '../models/MemberInviteIn'; -import { - type MemberList, - MemberListFromJSON, - MemberListToJSON, -} from '../models/MemberList'; -import { - type MemberOut, - MemberOutFromJSON, - MemberOutToJSON, -} from '../models/MemberOut'; -import { - type MemberRemoveOut, - MemberRemoveOutFromJSON, - MemberRemoveOutToJSON, -} from '../models/MemberRemoveOut'; -import { - type MemberRoleIn, - MemberRoleInFromJSON, - MemberRoleInToJSON, -} from '../models/MemberRoleIn'; -import { - type RevokeOut, - RevokeOutFromJSON, - RevokeOutToJSON, -} from '../models/RevokeOut'; -import { - type ValidationErrorResponse, - ValidationErrorResponseFromJSON, - ValidationErrorResponseToJSON, -} from '../models/ValidationErrorResponse'; - -export interface InviteMemberV0MembersInvitePostRequest { - memberInviteIn: MemberInviteIn; -} - -export interface ListInvitationsV0InvitationsGetRequest { - cursor?: string | null; - limit?: number | null; -} - -export interface ListMembersV0MembersGetRequest { - cursor?: string | null; - limit?: number | null; -} - -export interface RemoveMemberV0MembersTargetUserIdDeleteRequest { - targetUserId: string; - confirm?: string | null; -} - -export interface RevokeInvitationV0InvitationsInvitationIdDeleteRequest { - invitationId: string; -} - -export interface SetMemberRoleV0MembersTargetUserIdPatchRequest { - targetUserId: string; - memberRoleIn: MemberRoleIn; -} - -/** - * - */ -export class MembersApi extends runtime.BaseAPI { - - /** - * Creates request options for inviteMemberV0MembersInvitePost without sending the request - */ - async inviteMemberV0MembersInvitePostRequestOpts(requestParameters: InviteMemberV0MembersInvitePostRequest): Promise { - if (requestParameters['memberInviteIn'] == null) { - throw new runtime.RequiredError( - 'memberInviteIn', - 'Required parameter "memberInviteIn" was null or undefined when calling inviteMemberV0MembersInvitePost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/members/invite`; - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: MemberInviteInToJSON(requestParameters['memberInviteIn']), - }; - } - - /** - * Create a pending invitation in the caller\'s active workspace and enqueue the invite email. **Admin only**, `full` scope. Inviting an existing member is a no-op success (`already_member: true`). A duplicate pending invite for the same email returns 409 `INVITE_PENDING` (resend it from the members page). The raw invite token is delivered only by email — never in this response. - * Invite a person to your workspace by email - */ - async inviteMemberV0MembersInvitePostRaw(requestParameters: InviteMemberV0MembersInvitePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.inviteMemberV0MembersInvitePostRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => InviteCreateOutFromJSON(jsonValue)); - } - - /** - * Create a pending invitation in the caller\'s active workspace and enqueue the invite email. **Admin only**, `full` scope. Inviting an existing member is a no-op success (`already_member: true`). A duplicate pending invite for the same email returns 409 `INVITE_PENDING` (resend it from the members page). The raw invite token is delivered only by email — never in this response. - * Invite a person to your workspace by email - */ - async inviteMemberV0MembersInvitePost(requestParameters: InviteMemberV0MembersInvitePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.inviteMemberV0MembersInvitePostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for listInvitationsV0InvitationsGet without sending the request - */ - async listInvitationsV0InvitationsGetRequestOpts(requestParameters: ListInvitationsV0InvitationsGetRequest): Promise { - const queryParameters: any = {}; - - if (requestParameters['cursor'] != null) { - queryParameters['cursor'] = requestParameters['cursor']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/invitations`; - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * List the pending invitations for the caller\'s active workspace. **Admin only.** Metadata only — the raw invite token is never surfaced. Newest first (`created_at` descending, tie-broken by `id`). Paginated: `limit` is clamped to [1, 100] (default 50, never a 422); pass the response\'s `next_cursor` back as `cursor` for the next page (`null` when the listing is complete). - * List pending invitations - */ - async listInvitationsV0InvitationsGetRaw(requestParameters: ListInvitationsV0InvitationsGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.listInvitationsV0InvitationsGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => InvitationListFromJSON(jsonValue)); - } - - /** - * List the pending invitations for the caller\'s active workspace. **Admin only.** Metadata only — the raw invite token is never surfaced. Newest first (`created_at` descending, tie-broken by `id`). Paginated: `limit` is clamped to [1, 100] (default 50, never a 422); pass the response\'s `next_cursor` back as `cursor` for the next page (`null` when the listing is complete). - * List pending invitations - */ - async listInvitationsV0InvitationsGet(requestParameters: ListInvitationsV0InvitationsGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listInvitationsV0InvitationsGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for listMembersV0MembersGet without sending the request - */ - async listMembersV0MembersGetRequestOpts(requestParameters: ListMembersV0MembersGetRequest): Promise { - const queryParameters: any = {}; - - if (requestParameters['cursor'] != null) { - queryParameters['cursor'] = requestParameters['cursor']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/members`; - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * List live members (email, role, joined-at) of the caller\'s active workspace. Any **member** may list; a `read`-scope token is sufficient. Ordered by join time (`created_at`, tie-broken by `user_id`) — **no role grouping is promised**; a dashboard that wants admins-first sorts client-side. Paginated: `limit` is clamped to [1, 100] (default 50, never a 422); pass the response\'s `next_cursor` back as `cursor` for the next page (`null` when the listing is complete). - * List the members of your active workspace - */ - async listMembersV0MembersGetRaw(requestParameters: ListMembersV0MembersGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.listMembersV0MembersGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => MemberListFromJSON(jsonValue)); - } - - /** - * List live members (email, role, joined-at) of the caller\'s active workspace. Any **member** may list; a `read`-scope token is sufficient. Ordered by join time (`created_at`, tie-broken by `user_id`) — **no role grouping is promised**; a dashboard that wants admins-first sorts client-side. Paginated: `limit` is clamped to [1, 100] (default 50, never a 422); pass the response\'s `next_cursor` back as `cursor` for the next page (`null` when the listing is complete). - * List the members of your active workspace - */ - async listMembersV0MembersGet(requestParameters: ListMembersV0MembersGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listMembersV0MembersGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for removeMemberV0MembersTargetUserIdDelete without sending the request - */ - async removeMemberV0MembersTargetUserIdDeleteRequestOpts(requestParameters: RemoveMemberV0MembersTargetUserIdDeleteRequest): Promise { - if (requestParameters['targetUserId'] == null) { - throw new runtime.RequiredError( - 'targetUserId', - 'Required parameter "targetUserId" was null or undefined when calling removeMemberV0MembersTargetUserIdDelete().' - ); - } - - const queryParameters: any = {}; - - if (requestParameters['confirm'] != null) { - queryParameters['confirm'] = requestParameters['confirm']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/members/{target_user_id}`; - urlPath = urlPath.replace('{target_user_id}', encodeURIComponent(String(requestParameters['targetUserId']))); - - return { - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Remove a member from the caller\'s active workspace, soft-deleting every drive that member owns there (workspaces-design §4.4 — no ownership transfer in v0; their `ad_live_` keys then stop working). **Admin** may remove anyone; **any member** may remove themselves (self-leave). `full` scope. Removing the **last/sole admin** is rejected with 409 `LAST_ADMIN` (promote someone first, or delete the workspace). **Explicit confirmation required:** pass `?confirm=DELETE` or the request is rejected with 400 `CONFIRM_REQUIRED` — removal cascades a soft-delete of every drive the member owns, so it carries tenant-level blast radius (uniform with `DELETE /v0/drives/{id}`). Deliberately takes NO `If-Match`: membership rows carry no generation/metageneration axis to pin (there is no ETag to echo), so `?confirm=DELETE` is the sole mutation guard here. - * Remove a member (or leave) - */ - async removeMemberV0MembersTargetUserIdDeleteRaw(requestParameters: RemoveMemberV0MembersTargetUserIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.removeMemberV0MembersTargetUserIdDeleteRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => MemberRemoveOutFromJSON(jsonValue)); - } - - /** - * Remove a member from the caller\'s active workspace, soft-deleting every drive that member owns there (workspaces-design §4.4 — no ownership transfer in v0; their `ad_live_` keys then stop working). **Admin** may remove anyone; **any member** may remove themselves (self-leave). `full` scope. Removing the **last/sole admin** is rejected with 409 `LAST_ADMIN` (promote someone first, or delete the workspace). **Explicit confirmation required:** pass `?confirm=DELETE` or the request is rejected with 400 `CONFIRM_REQUIRED` — removal cascades a soft-delete of every drive the member owns, so it carries tenant-level blast radius (uniform with `DELETE /v0/drives/{id}`). Deliberately takes NO `If-Match`: membership rows carry no generation/metageneration axis to pin (there is no ETag to echo), so `?confirm=DELETE` is the sole mutation guard here. - * Remove a member (or leave) - */ - async removeMemberV0MembersTargetUserIdDelete(requestParameters: RemoveMemberV0MembersTargetUserIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.removeMemberV0MembersTargetUserIdDeleteRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for revokeInvitationV0InvitationsInvitationIdDelete without sending the request - */ - async revokeInvitationV0InvitationsInvitationIdDeleteRequestOpts(requestParameters: RevokeInvitationV0InvitationsInvitationIdDeleteRequest): Promise { - if (requestParameters['invitationId'] == null) { - throw new runtime.RequiredError( - 'invitationId', - 'Required parameter "invitationId" was null or undefined when calling revokeInvitationV0InvitationsInvitationIdDelete().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/invitations/{invitation_id}`; - urlPath = urlPath.replace('{invitation_id}', encodeURIComponent(String(requestParameters['invitationId']))); - - return { - path: urlPath, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Revoke a pending invitation in the caller\'s active workspace. **Admin only**, `full` scope. Org-scoped + idempotent: `revoked` is a COUNT — 1 when a live invite was revoked, 0 when it was already gone (a forged id, an invite from another workspace, or an already-consumed invite all return `revoked: 0`, no-leak). - * Revoke a pending invitation - */ - async revokeInvitationV0InvitationsInvitationIdDeleteRaw(requestParameters: RevokeInvitationV0InvitationsInvitationIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.revokeInvitationV0InvitationsInvitationIdDeleteRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => RevokeOutFromJSON(jsonValue)); - } - - /** - * Revoke a pending invitation in the caller\'s active workspace. **Admin only**, `full` scope. Org-scoped + idempotent: `revoked` is a COUNT — 1 when a live invite was revoked, 0 when it was already gone (a forged id, an invite from another workspace, or an already-consumed invite all return `revoked: 0`, no-leak). - * Revoke a pending invitation - */ - async revokeInvitationV0InvitationsInvitationIdDelete(requestParameters: RevokeInvitationV0InvitationsInvitationIdDeleteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.revokeInvitationV0InvitationsInvitationIdDeleteRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for setMemberRoleV0MembersTargetUserIdPatch without sending the request - */ - async setMemberRoleV0MembersTargetUserIdPatchRequestOpts(requestParameters: SetMemberRoleV0MembersTargetUserIdPatchRequest): Promise { - if (requestParameters['targetUserId'] == null) { - throw new runtime.RequiredError( - 'targetUserId', - 'Required parameter "targetUserId" was null or undefined when calling setMemberRoleV0MembersTargetUserIdPatch().' - ); - } - - if (requestParameters['memberRoleIn'] == null) { - throw new runtime.RequiredError( - 'memberRoleIn', - 'Required parameter "memberRoleIn" was null or undefined when calling setMemberRoleV0MembersTargetUserIdPatch().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/members/{target_user_id}`; - urlPath = urlPath.replace('{target_user_id}', encodeURIComponent(String(requestParameters['targetUserId']))); - - return { - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: MemberRoleInToJSON(requestParameters['memberRoleIn']), - }; - } - - /** - * Promote/demote a member in the caller\'s active workspace. **Admin only**, `full` scope. Demoting the workspace\'s **last admin** is rejected with 409 `LAST_ADMIN` (promote someone first). - * Change a member\'s role - */ - async setMemberRoleV0MembersTargetUserIdPatchRaw(requestParameters: SetMemberRoleV0MembersTargetUserIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.setMemberRoleV0MembersTargetUserIdPatchRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => MemberOutFromJSON(jsonValue)); - } - - /** - * Promote/demote a member in the caller\'s active workspace. **Admin only**, `full` scope. Demoting the workspace\'s **last admin** is rejected with 409 `LAST_ADMIN` (promote someone first). - * Change a member\'s role - */ - async setMemberRoleV0MembersTargetUserIdPatch(requestParameters: SetMemberRoleV0MembersTargetUserIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.setMemberRoleV0MembersTargetUserIdPatchRaw(requestParameters, initOverrides); - return await response.value(); - } - -} diff --git a/sdk/typescript/src/apis/SearchApi.ts b/sdk/typescript/src/apis/SearchApi.ts new file mode 100644 index 0000000..4ef76ae --- /dev/null +++ b/sdk/typescript/src/apis/SearchApi.ts @@ -0,0 +1,168 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import * as runtime from '../runtime'; +import { + type DrivesCreate400Response, + DrivesCreate400ResponseFromJSON, + DrivesCreate400ResponseToJSON, +} from '../models/DrivesCreate400Response'; +import { + type DrivesList400Response, + DrivesList400ResponseFromJSON, + DrivesList400ResponseToJSON, +} from '../models/DrivesList400Response'; +import { + type SearchPageOut, + SearchPageOutFromJSON, + SearchPageOutToJSON, +} from '../models/SearchPageOut'; +import { + type ValidationErrorResponse, + ValidationErrorResponseFromJSON, + ValidationErrorResponseToJSON, +} from '../models/ValidationErrorResponse'; + +export interface DriveSearchRequest { + driveId: string; + q: string; + mode?: DriveSearchModeEnum; + limit?: number | null; + cursor?: string | null; + parentId?: string | null; + contentType?: string | null; + label?: string | null; + updatedAfter?: Date | null; + updatedBefore?: Date | null; + authorization?: string | null; +} + +/** + * + */ +export class SearchApi extends runtime.BaseAPI { + + /** + * Creates request options for driveSearch without sending the request + */ + async driveSearchRequestOpts(requestParameters: DriveSearchRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling driveSearch().' + ); + } + + if (requestParameters['q'] == null) { + throw new runtime.RequiredError( + 'q', + 'Required parameter "q" was null or undefined when calling driveSearch().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['q'] != null) { + queryParameters['q'] = requestParameters['q']; + } + + if (requestParameters['mode'] != null) { + queryParameters['mode'] = requestParameters['mode']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + if (requestParameters['cursor'] != null) { + queryParameters['cursor'] = requestParameters['cursor']; + } + + if (requestParameters['parentId'] != null) { + queryParameters['parent_id'] = requestParameters['parentId']; + } + + if (requestParameters['contentType'] != null) { + queryParameters['content_type'] = requestParameters['contentType']; + } + + if (requestParameters['label'] != null) { + queryParameters['label'] = requestParameters['label']; + } + + if (requestParameters['updatedAfter'] != null) { + queryParameters['updated_after'] = (requestParameters['updatedAfter'] as any).toISOString(); + } + + if (requestParameters['updatedBefore'] != null) { + queryParameters['updated_before'] = (requestParameters['updatedBefore'] as any).toISOString(); + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/v0/drives/{drive_id}/search`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Search the drive\'s live artifacts. ``q`` is required and must be non-empty. ``mode`` selects the retrieval engine: ``lexical``, ``hybrid``, or ``semantic``. This deployment enables ``lexical`` only; requesting a disabled mode fails ``400 SEARCH_MODE_UNAVAILABLE``. Each hit\'s ``snippet`` is HTML-safe by contract: artifact content is entity-escaped and only the server\'s own ````/```` highlight pair survives, so a client may render it as HTML. + * Drive Search + */ + async driveSearchRaw(requestParameters: DriveSearchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.driveSearchRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => SearchPageOutFromJSON(jsonValue)); + } + + /** + * Search the drive\'s live artifacts. ``q`` is required and must be non-empty. ``mode`` selects the retrieval engine: ``lexical``, ``hybrid``, or ``semantic``. This deployment enables ``lexical`` only; requesting a disabled mode fails ``400 SEARCH_MODE_UNAVAILABLE``. Each hit\'s ``snippet`` is HTML-safe by contract: artifact content is entity-escaped and only the server\'s own ````/```` highlight pair survives, so a client may render it as HTML. + * Drive Search + */ + async driveSearch(requestParameters: DriveSearchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.driveSearchRaw(requestParameters, initOverrides); + return await response.value(); + } + +} + +/** + * @export + */ +export const DriveSearchModeEnum = { + Lexical: 'lexical', + Hybrid: 'hybrid', + Semantic: 'semantic' +} as const; +export type DriveSearchModeEnum = typeof DriveSearchModeEnum[keyof typeof DriveSearchModeEnum]; diff --git a/sdk/typescript/src/apis/SharesApi.ts b/sdk/typescript/src/apis/SharesApi.ts new file mode 100644 index 0000000..aa1d17a --- /dev/null +++ b/sdk/typescript/src/apis/SharesApi.ts @@ -0,0 +1,500 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import * as runtime from '../runtime'; +import { + type DrivesCreate400Response, + DrivesCreate400ResponseFromJSON, + DrivesCreate400ResponseToJSON, +} from '../models/DrivesCreate400Response'; +import { + type ShareCreateIn, + ShareCreateInFromJSON, + ShareCreateInToJSON, +} from '../models/ShareCreateIn'; +import { + type ShareCreateOut, + ShareCreateOutFromJSON, + ShareCreateOutToJSON, +} from '../models/ShareCreateOut'; +import { + type ShareListOut, + ShareListOutFromJSON, + ShareListOutToJSON, +} from '../models/ShareListOut'; +import { + type ShareOut, + ShareOutFromJSON, + ShareOutToJSON, +} from '../models/ShareOut'; +import { + type ValidationErrorResponse, + ValidationErrorResponseFromJSON, + ValidationErrorResponseToJSON, +} from '../models/ValidationErrorResponse'; + +export interface SharesCreateRequest { + driveId: string; + idempotencyKey: string | null; + shareCreateIn: ShareCreateIn; + authorization?: string | null; +} + +export interface SharesListRequest { + driveId: string; + lifecycle?: string; + limit?: number | null; + cursor?: string | null; + resourceType?: string | null; + resourceId?: string | null; + authorization?: string | null; +} + +export interface SharesReadRequest { + driveId: string; + shareId: string; + ifNoneMatch?: string | null; + authorization?: string | null; +} + +export interface SharesRevokeRequest { + driveId: string; + shareId: string; + idempotencyKey: string | null; + ifMatch: string | null; + authorization?: string | null; +} + +export interface SharesRotateRequest { + driveId: string; + shareId: string; + idempotencyKey: string | null; + ifMatch: string | null; + authorization?: string | null; +} + +/** + * + */ +export class SharesApi extends runtime.BaseAPI { + + /** + * Creates request options for sharesCreate without sending the request + */ + async sharesCreateRequestOpts(requestParameters: SharesCreateRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling sharesCreate().' + ); + } + + if (requestParameters['idempotencyKey'] == null) { + throw new runtime.RequiredError( + 'idempotencyKey', + 'Required parameter "idempotencyKey" was null or undefined when calling sharesCreate().' + ); + } + + if (requestParameters['shareCreateIn'] == null) { + throw new runtime.RequiredError( + 'shareCreateIn', + 'Required parameter "shareCreateIn" was null or undefined when calling sharesCreate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters['Content-Type'] = 'application/json'; + + if (requestParameters['idempotencyKey'] != null) { + headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']); + } + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/v0/drives/{drive_id}/shares`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: ShareCreateInToJSON(requestParameters['shareCreateIn']), + }; + } + + /** + * Mint a read-only bearer link. The response carries the plaintext secret — the only response that does. + * Create Share + */ + async sharesCreateRaw(requestParameters: SharesCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sharesCreateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ShareCreateOutFromJSON(jsonValue)); + } + + /** + * Mint a read-only bearer link. The response carries the plaintext secret — the only response that does. + * Create Share + */ + async sharesCreate(requestParameters: SharesCreateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sharesCreateRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sharesList without sending the request + */ + async sharesListRequestOpts(requestParameters: SharesListRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling sharesList().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['lifecycle'] != null) { + queryParameters['lifecycle'] = requestParameters['lifecycle']; + } + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + if (requestParameters['cursor'] != null) { + queryParameters['cursor'] = requestParameters['cursor']; + } + + if (requestParameters['resourceType'] != null) { + queryParameters['resource_type'] = requestParameters['resourceType']; + } + + if (requestParameters['resourceId'] != null) { + queryParameters['resource_id'] = requestParameters['resourceId']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/v0/drives/{drive_id}/shares`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * List the drive\'s shares (no secrets), keyset paginated. ``resource_id`` narrows the page to one resource\'s links and REQUIRES ``resource_type`` alongside it — a bare resource id is ambiguous across ``artifact`` / ``artifact_version`` / ``folder``, and inferring the kind from the id prefix would tie the filter\'s meaning to an id format the contract does not promise to keep. ``resource_type`` alone is a valid filter. Listing shares already requires drive ``manager``, so these filters only narrow a page the caller could already read in full. + * List Shares + */ + async sharesListRaw(requestParameters: SharesListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sharesListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ShareListOutFromJSON(jsonValue)); + } + + /** + * List the drive\'s shares (no secrets), keyset paginated. ``resource_id`` narrows the page to one resource\'s links and REQUIRES ``resource_type`` alongside it — a bare resource id is ambiguous across ``artifact`` / ``artifact_version`` / ``folder``, and inferring the kind from the id prefix would tie the filter\'s meaning to an id format the contract does not promise to keep. ``resource_type`` alone is a valid filter. Listing shares already requires drive ``manager``, so these filters only narrow a page the caller could already read in full. + * List Shares + */ + async sharesList(requestParameters: SharesListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sharesListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sharesRead without sending the request + */ + async sharesReadRequestOpts(requestParameters: SharesReadRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling sharesRead().' + ); + } + + if (requestParameters['shareId'] == null) { + throw new runtime.RequiredError( + 'shareId', + 'Required parameter "shareId" was null or undefined when calling sharesRead().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['ifNoneMatch'] != null) { + headerParameters['If-None-Match'] = String(requestParameters['ifNoneMatch']); + } + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/v0/drives/{drive_id}/shares/{share_id}`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + urlPath = urlPath.replace('{share_id}', encodeURIComponent(String(requestParameters['shareId']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Read one share\'s management representation (no secret). + * Read Share + */ + async sharesReadRaw(requestParameters: SharesReadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sharesReadRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ShareOutFromJSON(jsonValue)); + } + + /** + * Read one share\'s management representation (no secret). + * Read Share + */ + async sharesRead(requestParameters: SharesReadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sharesReadRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sharesRevoke without sending the request + */ + async sharesRevokeRequestOpts(requestParameters: SharesRevokeRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling sharesRevoke().' + ); + } + + if (requestParameters['shareId'] == null) { + throw new runtime.RequiredError( + 'shareId', + 'Required parameter "shareId" was null or undefined when calling sharesRevoke().' + ); + } + + if (requestParameters['idempotencyKey'] == null) { + throw new runtime.RequiredError( + 'idempotencyKey', + 'Required parameter "idempotencyKey" was null or undefined when calling sharesRevoke().' + ); + } + + if (requestParameters['ifMatch'] == null) { + throw new runtime.RequiredError( + 'ifMatch', + 'Required parameter "ifMatch" was null or undefined when calling sharesRevoke().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['idempotencyKey'] != null) { + headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']); + } + + if (requestParameters['ifMatch'] != null) { + headerParameters['If-Match'] = String(requestParameters['ifMatch']); + } + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/v0/drives/{drive_id}/shares/{share_id}`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + urlPath = urlPath.replace('{share_id}', encodeURIComponent(String(requestParameters['shareId']))); + + return { + path: urlPath, + method: 'DELETE', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Revoke a share (soft, sets revoked_at) under If-Match. + * Revoke Share + */ + async sharesRevokeRaw(requestParameters: SharesRevokeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sharesRevokeRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ShareOutFromJSON(jsonValue)); + } + + /** + * Revoke a share (soft, sets revoked_at) under If-Match. + * Revoke Share + */ + async sharesRevoke(requestParameters: SharesRevokeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sharesRevokeRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for sharesRotate without sending the request + */ + async sharesRotateRequestOpts(requestParameters: SharesRotateRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling sharesRotate().' + ); + } + + if (requestParameters['shareId'] == null) { + throw new runtime.RequiredError( + 'shareId', + 'Required parameter "shareId" was null or undefined when calling sharesRotate().' + ); + } + + if (requestParameters['idempotencyKey'] == null) { + throw new runtime.RequiredError( + 'idempotencyKey', + 'Required parameter "idempotencyKey" was null or undefined when calling sharesRotate().' + ); + } + + if (requestParameters['ifMatch'] == null) { + throw new runtime.RequiredError( + 'ifMatch', + 'Required parameter "ifMatch" was null or undefined when calling sharesRotate().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['idempotencyKey'] != null) { + headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']); + } + + if (requestParameters['ifMatch'] != null) { + headerParameters['If-Match'] = String(requestParameters['ifMatch']); + } + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/v0/drives/{drive_id}/shares/{share_id}/rotate`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + urlPath = urlPath.replace('{share_id}', encodeURIComponent(String(requestParameters['shareId']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Rotate the secret in place (same id, no grace window). The response carries the new plaintext secret. + * Rotate Share + */ + async sharesRotateRaw(requestParameters: SharesRotateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sharesRotateRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => ShareCreateOutFromJSON(jsonValue)); + } + + /** + * Rotate the secret in place (same id, no grace window). The response carries the new plaintext secret. + * Rotate Share + */ + async sharesRotate(requestParameters: SharesRotateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sharesRotateRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/sdk/typescript/src/apis/SharesRedemptionApi.ts b/sdk/typescript/src/apis/SharesRedemptionApi.ts new file mode 100644 index 0000000..7d16380 --- /dev/null +++ b/sdk/typescript/src/apis/SharesRedemptionApi.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import * as runtime from '../runtime'; +import { + type ValidationErrorResponse, + ValidationErrorResponseFromJSON, + ValidationErrorResponseToJSON, +} from '../models/ValidationErrorResponse'; + +export interface SharesRedeemRequest { + shareKey: string; +} + +/** + * + */ +export class SharesRedemptionApi extends runtime.BaseAPI { + + /** + * Creates request options for sharesRedeem without sending the request + */ + async sharesRedeemRequestOpts(requestParameters: SharesRedeemRequest): Promise { + if (requestParameters['shareKey'] == null) { + throw new runtime.RequiredError( + 'shareKey', + 'Required parameter "shareKey" was null or undefined when calling sharesRedeem().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + + let urlPath = `/s/{share_key}`; + urlPath = urlPath.replace('{share_key}', encodeURIComponent(String(requestParameters['shareKey']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * The un-slashed form. Browsers are canonicalized onto `/s/{key}/`. This inherits the published `shares_redeem` operation id from the route it replaced, because for an API client it *is* that operation, unchanged: same URL, same JSON `Accept`, same bytes, same uniform 404. Only the browser arm is new. Dropping it from the spec would have described the route as gone while it kept answering. The page links its own sub-resources relatively (`content`), and relative resolution replaces the last path segment: from `/s/KEY` that reaches `/s/content`, from `/s/KEY/` it reaches `/s/KEY/content`. The trailing slash is what makes an image on a share page load at all. Links already in the wild have no slash, so this redirect is how they keep working. It is unconditional and runs before any lookup — redirecting only for keys that resolve would turn the status code into an existence oracle and undo the anti-enumeration property the rest of this module maintains. Only browsers are moved. JSON and byte clients are answered in place, so the shipped v0 contract for this URL is unchanged, redirect included. + * Redeem Share + */ + async sharesRedeemRaw(requestParameters: SharesRedeemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.sharesRedeemRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + if (this.isJsonMime(response.headers.get('content-type'))) { + return new runtime.JSONApiResponse(response); + } else { + return new runtime.TextApiResponse(response) as any; + } + } + + /** + * The un-slashed form. Browsers are canonicalized onto `/s/{key}/`. This inherits the published `shares_redeem` operation id from the route it replaced, because for an API client it *is* that operation, unchanged: same URL, same JSON `Accept`, same bytes, same uniform 404. Only the browser arm is new. Dropping it from the spec would have described the route as gone while it kept answering. The page links its own sub-resources relatively (`content`), and relative resolution replaces the last path segment: from `/s/KEY` that reaches `/s/content`, from `/s/KEY/` it reaches `/s/KEY/content`. The trailing slash is what makes an image on a share page load at all. Links already in the wild have no slash, so this redirect is how they keep working. It is unconditional and runs before any lookup — redirecting only for keys that resolve would turn the status code into an existence oracle and undo the anti-enumeration property the rest of this module maintains. Only browsers are moved. JSON and byte clients are answered in place, so the shipped v0 contract for this URL is unchanged, redirect included. + * Redeem Share + */ + async sharesRedeem(requestParameters: SharesRedeemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.sharesRedeemRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/sdk/typescript/src/apis/TokensApi.ts b/sdk/typescript/src/apis/TokensApi.ts deleted file mode 100644 index 549fb03..0000000 --- a/sdk/typescript/src/apis/TokensApi.ts +++ /dev/null @@ -1,161 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as runtime from '../runtime'; -import { - type ErrorResponse, - ErrorResponseFromJSON, - ErrorResponseToJSON, -} from '../models/ErrorResponse'; -import { - type UserTokenList, - UserTokenListFromJSON, - UserTokenListToJSON, -} from '../models/UserTokenList'; -import { - type UserTokenOut, - UserTokenOutFromJSON, - UserTokenOutToJSON, -} from '../models/UserTokenOut'; -import { - type ValidationErrorResponse, - ValidationErrorResponseFromJSON, - ValidationErrorResponseToJSON, -} from '../models/ValidationErrorResponse'; - -export interface ListTokensV0TokensGetRequest { - cursor?: string | null; - limit?: number | null; -} - -export interface RevokeTokenV0TokensTokenIdRevokePostRequest { - tokenId: string; -} - -/** - * - */ -export class TokensApi extends runtime.BaseAPI { - - /** - * Creates request options for listTokensV0TokensGet without sending the request - */ - async listTokensV0TokensGetRequestOpts(requestParameters: ListTokensV0TokensGetRequest): Promise { - const queryParameters: any = {}; - - if (requestParameters['cursor'] != null) { - queryParameters['cursor'] = requestParameters['cursor']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/tokens`; - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * List the `ad_user_` tokens belonging to the authenticated user. Metadata only — the raw token is shown once at mint (web only) and is never returned here. Includes recently-revoked tokens (with `revoked_at` set) so the caller can audit them; newest first. **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - * List your user-identity tokens - */ - async listTokensV0TokensGetRaw(requestParameters: ListTokensV0TokensGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.listTokensV0TokensGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => UserTokenListFromJSON(jsonValue)); - } - - /** - * List the `ad_user_` tokens belonging to the authenticated user. Metadata only — the raw token is shown once at mint (web only) and is never returned here. Includes recently-revoked tokens (with `revoked_at` set) so the caller can audit them; newest first. **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - * List your user-identity tokens - */ - async listTokensV0TokensGet(requestParameters: ListTokensV0TokensGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listTokensV0TokensGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for revokeTokenV0TokensTokenIdRevokePost without sending the request - */ - async revokeTokenV0TokensTokenIdRevokePostRequestOpts(requestParameters: RevokeTokenV0TokensTokenIdRevokePostRequest): Promise { - if (requestParameters['tokenId'] == null) { - throw new runtime.RequiredError( - 'tokenId', - 'Required parameter "tokenId" was null or undefined when calling revokeTokenV0TokensTokenIdRevokePost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/tokens/{token_id}/revoke`; - urlPath = urlPath.replace('{token_id}', encodeURIComponent(String(requestParameters['tokenId']))); - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Revoke a single `ad_user_` token by id. Scoped to the authenticated user: a token id that isn\'t yours returns 404 (no-leak). Idempotent — revoking an already-revoked token also returns 404 (it is no longer a live token of yours to revoke). On success the revoked token\'s metadata is returned with `revoked_at` set. - * Revoke one of your user-identity tokens - */ - async revokeTokenV0TokensTokenIdRevokePostRaw(requestParameters: RevokeTokenV0TokensTokenIdRevokePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.revokeTokenV0TokensTokenIdRevokePostRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => UserTokenOutFromJSON(jsonValue)); - } - - /** - * Revoke a single `ad_user_` token by id. Scoped to the authenticated user: a token id that isn\'t yours returns 404 (no-leak). Idempotent — revoking an already-revoked token also returns 404 (it is no longer a live token of yours to revoke). On success the revoked token\'s metadata is returned with `revoked_at` set. - * Revoke one of your user-identity tokens - */ - async revokeTokenV0TokensTokenIdRevokePost(requestParameters: RevokeTokenV0TokensTokenIdRevokePostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.revokeTokenV0TokensTokenIdRevokePostRaw(requestParameters, initOverrides); - return await response.value(); - } - -} diff --git a/sdk/typescript/src/apis/VersionsApi.ts b/sdk/typescript/src/apis/VersionsApi.ts new file mode 100644 index 0000000..8f0d3f4 --- /dev/null +++ b/sdk/typescript/src/apis/VersionsApi.ts @@ -0,0 +1,546 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import * as runtime from '../runtime'; +import { + type DrivesCreate400Response, + DrivesCreate400ResponseFromJSON, + DrivesCreate400ResponseToJSON, +} from '../models/DrivesCreate400Response'; +import { + type ValidationErrorResponse, + ValidationErrorResponseFromJSON, + ValidationErrorResponseToJSON, +} from '../models/ValidationErrorResponse'; +import { + type VersionCreatedOut, + VersionCreatedOutFromJSON, + VersionCreatedOutToJSON, +} from '../models/VersionCreatedOut'; +import { + type VersionListOut, + VersionListOutFromJSON, + VersionListOutToJSON, +} from '../models/VersionListOut'; +import { + type VersionOut, + VersionOutFromJSON, + VersionOutToJSON, +} from '../models/VersionOut'; + +export interface VersionsAppendRequest { + driveId: string; + artifactId: string; + idempotencyKey: string | null; + ifMatch: string | null; + content: Blob; + authorization?: string | null; + contentType?: string; + sha256?: string; +} + +export interface VersionsContentRequest { + driveId: string; + artifactId: string; + versionId: string; + ifNoneMatch?: string | null; + authorization?: string | null; +} + +export interface VersionsListRequest { + driveId: string; + artifactId: string; + limit?: number | null; + cursor?: string | null; + authorization?: string | null; +} + +export interface VersionsReadRequest { + driveId: string; + artifactId: string; + versionId: string; + ifNoneMatch?: string | null; + authorization?: string | null; +} + +export interface VersionsRestoreRequest { + driveId: string; + artifactId: string; + versionId: string; + idempotencyKey: string | null; + ifMatch: string | null; + authorization?: string | null; +} + +/** + * + */ +export class VersionsApi extends runtime.BaseAPI { + + /** + * Creates request options for versionsAppend without sending the request + */ + async versionsAppendRequestOpts(requestParameters: VersionsAppendRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling versionsAppend().' + ); + } + + if (requestParameters['artifactId'] == null) { + throw new runtime.RequiredError( + 'artifactId', + 'Required parameter "artifactId" was null or undefined when calling versionsAppend().' + ); + } + + if (requestParameters['idempotencyKey'] == null) { + throw new runtime.RequiredError( + 'idempotencyKey', + 'Required parameter "idempotencyKey" was null or undefined when calling versionsAppend().' + ); + } + + if (requestParameters['ifMatch'] == null) { + throw new runtime.RequiredError( + 'ifMatch', + 'Required parameter "ifMatch" was null or undefined when calling versionsAppend().' + ); + } + + if (requestParameters['content'] == null) { + throw new runtime.RequiredError( + 'content', + 'Required parameter "content" was null or undefined when calling versionsAppend().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['idempotencyKey'] != null) { + headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']); + } + + if (requestParameters['ifMatch'] != null) { + headerParameters['If-Match'] = String(requestParameters['ifMatch']); + } + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + const consumes: runtime.Consume[] = [ + { contentType: 'multipart/form-data' }, + ]; + // @ts-ignore: canConsumeForm may be unused + const canConsumeForm = runtime.canConsumeForm(consumes); + + let formParams: { append(param: string, value: any): any }; + let useForm = false; + // use FormData to transmit files using content-type "multipart/form-data" + useForm = canConsumeForm; + if (useForm) { + formParams = new FormData(); + } else { + formParams = new URLSearchParams(); + } + + if (requestParameters['content'] != null) { + formParams.append('content', requestParameters['content'] as any); + } + + if (requestParameters['contentType'] != null) { + formParams.append('content_type', requestParameters['contentType'] as any); + } + + if (requestParameters['sha256'] != null) { + formParams.append('sha256', requestParameters['sha256'] as any); + } + + + let urlPath = `/v0/drives/{drive_id}/artifacts/{artifact_id}/versions`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + urlPath = urlPath.replace('{artifact_id}', encodeURIComponent(String(requestParameters['artifactId']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + body: formParams, + }; + } + + /** + * Append one immutable version and rotate the artifact head. Multipart only (415 for a JSON body). Parts: content (bytes), content_type, sha256. content is required; name, parent_id, and metadata are not accepted here. + * Append Version + */ + async versionsAppendRaw(requestParameters: VersionsAppendRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.versionsAppendRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => VersionCreatedOutFromJSON(jsonValue)); + } + + /** + * Append one immutable version and rotate the artifact head. Multipart only (415 for a JSON body). Parts: content (bytes), content_type, sha256. content is required; name, parent_id, and metadata are not accepted here. + * Append Version + */ + async versionsAppend(requestParameters: VersionsAppendRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.versionsAppendRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for versionsContent without sending the request + */ + async versionsContentRequestOpts(requestParameters: VersionsContentRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling versionsContent().' + ); + } + + if (requestParameters['artifactId'] == null) { + throw new runtime.RequiredError( + 'artifactId', + 'Required parameter "artifactId" was null or undefined when calling versionsContent().' + ); + } + + if (requestParameters['versionId'] == null) { + throw new runtime.RequiredError( + 'versionId', + 'Required parameter "versionId" was null or undefined when calling versionsContent().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['ifNoneMatch'] != null) { + headerParameters['If-None-Match'] = String(requestParameters['ifNoneMatch']); + } + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}/content`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + urlPath = urlPath.replace('{artifact_id}', encodeURIComponent(String(requestParameters['artifactId']))); + urlPath = urlPath.replace('{version_id}', encodeURIComponent(String(requestParameters['versionId']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Download one version\'s immutable bytes — stream or 307. + * Read Version Content + */ + async versionsContentRaw(requestParameters: VersionsContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.versionsContentRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.BlobApiResponse(response); + } + + /** + * Download one version\'s immutable bytes — stream or 307. + * Read Version Content + */ + async versionsContent(requestParameters: VersionsContentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.versionsContentRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for versionsList without sending the request + */ + async versionsListRequestOpts(requestParameters: VersionsListRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling versionsList().' + ); + } + + if (requestParameters['artifactId'] == null) { + throw new runtime.RequiredError( + 'artifactId', + 'Required parameter "artifactId" was null or undefined when calling versionsList().' + ); + } + + const queryParameters: any = {}; + + if (requestParameters['limit'] != null) { + queryParameters['limit'] = requestParameters['limit']; + } + + if (requestParameters['cursor'] != null) { + queryParameters['cursor'] = requestParameters['cursor']; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/v0/drives/{drive_id}/artifacts/{artifact_id}/versions`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + urlPath = urlPath.replace('{artifact_id}', encodeURIComponent(String(requestParameters['artifactId']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * List the artifact\'s version trail, newest first (ordinal DESC). + * List Versions + */ + async versionsListRaw(requestParameters: VersionsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.versionsListRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => VersionListOutFromJSON(jsonValue)); + } + + /** + * List the artifact\'s version trail, newest first (ordinal DESC). + * List Versions + */ + async versionsList(requestParameters: VersionsListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.versionsListRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for versionsRead without sending the request + */ + async versionsReadRequestOpts(requestParameters: VersionsReadRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling versionsRead().' + ); + } + + if (requestParameters['artifactId'] == null) { + throw new runtime.RequiredError( + 'artifactId', + 'Required parameter "artifactId" was null or undefined when calling versionsRead().' + ); + } + + if (requestParameters['versionId'] == null) { + throw new runtime.RequiredError( + 'versionId', + 'Required parameter "versionId" was null or undefined when calling versionsRead().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['ifNoneMatch'] != null) { + headerParameters['If-None-Match'] = String(requestParameters['ifNoneMatch']); + } + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + urlPath = urlPath.replace('{artifact_id}', encodeURIComponent(String(requestParameters['artifactId']))); + urlPath = urlPath.replace('{version_id}', encodeURIComponent(String(requestParameters['versionId']))); + + return { + path: urlPath, + method: 'GET', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Read one immutable version. + * Read Version + */ + async versionsReadRaw(requestParameters: VersionsReadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.versionsReadRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => VersionOutFromJSON(jsonValue)); + } + + /** + * Read one immutable version. + * Read Version + */ + async versionsRead(requestParameters: VersionsReadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.versionsReadRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * Creates request options for versionsRestore without sending the request + */ + async versionsRestoreRequestOpts(requestParameters: VersionsRestoreRequest): Promise { + if (requestParameters['driveId'] == null) { + throw new runtime.RequiredError( + 'driveId', + 'Required parameter "driveId" was null or undefined when calling versionsRestore().' + ); + } + + if (requestParameters['artifactId'] == null) { + throw new runtime.RequiredError( + 'artifactId', + 'Required parameter "artifactId" was null or undefined when calling versionsRestore().' + ); + } + + if (requestParameters['versionId'] == null) { + throw new runtime.RequiredError( + 'versionId', + 'Required parameter "versionId" was null or undefined when calling versionsRestore().' + ); + } + + if (requestParameters['idempotencyKey'] == null) { + throw new runtime.RequiredError( + 'idempotencyKey', + 'Required parameter "idempotencyKey" was null or undefined when calling versionsRestore().' + ); + } + + if (requestParameters['ifMatch'] == null) { + throw new runtime.RequiredError( + 'ifMatch', + 'Required parameter "ifMatch" was null or undefined when calling versionsRestore().' + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (requestParameters['idempotencyKey'] != null) { + headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']); + } + + if (requestParameters['ifMatch'] != null) { + headerParameters['If-Match'] = String(requestParameters['ifMatch']); + } + + if (requestParameters['authorization'] != null) { + headerParameters['authorization'] = String(requestParameters['authorization']); + } + + if (this.configuration && this.configuration.accessToken) { + const token = this.configuration.accessToken; + const tokenString = await token("bearerAuth", []); + + if (tokenString) { + headerParameters["Authorization"] = `Bearer ${tokenString}`; + } + } + + let urlPath = `/v0/drives/{drive_id}/artifacts/{artifact_id}/versions/{version_id}/restore`; + urlPath = urlPath.replace('{drive_id}', encodeURIComponent(String(requestParameters['driveId']))); + urlPath = urlPath.replace('{artifact_id}', encodeURIComponent(String(requestParameters['artifactId']))); + urlPath = urlPath.replace('{version_id}', encodeURIComponent(String(requestParameters['versionId']))); + + return { + path: urlPath, + method: 'POST', + headers: headerParameters, + query: queryParameters, + }; + } + + /** + * Restore a historical version as a NEW head version (no byte copy). + * Restore Version + */ + async versionsRestoreRaw(requestParameters: VersionsRestoreRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { + const requestOptions = await this.versionsRestoreRequestOpts(requestParameters); + const response = await this.request(requestOptions, initOverrides); + + return new runtime.JSONApiResponse(response, (jsonValue) => VersionCreatedOutFromJSON(jsonValue)); + } + + /** + * Restore a historical version as a NEW head version (no byte copy). + * Restore Version + */ + async versionsRestore(requestParameters: VersionsRestoreRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { + const response = await this.versionsRestoreRaw(requestParameters, initOverrides); + return await response.value(); + } + +} diff --git a/sdk/typescript/src/apis/WorkspacesApi.ts b/sdk/typescript/src/apis/WorkspacesApi.ts deleted file mode 100644 index 5d12611..0000000 --- a/sdk/typescript/src/apis/WorkspacesApi.ts +++ /dev/null @@ -1,248 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import * as runtime from '../runtime'; -import { - type ErrorResponse, - ErrorResponseFromJSON, - ErrorResponseToJSON, -} from '../models/ErrorResponse'; -import { - type ValidationErrorResponse, - ValidationErrorResponseFromJSON, - ValidationErrorResponseToJSON, -} from '../models/ValidationErrorResponse'; -import { - type WorkspaceCreateIn, - WorkspaceCreateInFromJSON, - WorkspaceCreateInToJSON, -} from '../models/WorkspaceCreateIn'; -import { - type WorkspaceCreateOut, - WorkspaceCreateOutFromJSON, - WorkspaceCreateOutToJSON, -} from '../models/WorkspaceCreateOut'; -import { - type WorkspaceList, - WorkspaceListFromJSON, - WorkspaceListToJSON, -} from '../models/WorkspaceList'; -import { - type WorkspaceOut, - WorkspaceOutFromJSON, - WorkspaceOutToJSON, -} from '../models/WorkspaceOut'; -import { - type WorkspaceRenameIn, - WorkspaceRenameInFromJSON, - WorkspaceRenameInToJSON, -} from '../models/WorkspaceRenameIn'; - -export interface CreateWorkspaceRouteV0WorkspacesPostRequest { - workspaceCreateIn: WorkspaceCreateIn; -} - -export interface ListWorkspacesRouteV0WorkspacesGetRequest { - cursor?: string | null; - limit?: number | null; -} - -export interface RenameWorkspaceRouteV0WorkspacesOrgIdPatchRequest { - orgId: string; - workspaceRenameIn: WorkspaceRenameIn; -} - -/** - * - */ -export class WorkspacesApi extends runtime.BaseAPI { - - /** - * Creates request options for createWorkspaceRouteV0WorkspacesPost without sending the request - */ - async createWorkspaceRouteV0WorkspacesPostRequestOpts(requestParameters: CreateWorkspaceRouteV0WorkspacesPostRequest): Promise { - if (requestParameters['workspaceCreateIn'] == null) { - throw new runtime.RequiredError( - 'workspaceCreateIn', - 'Required parameter "workspaceCreateIn" was null or undefined when calling createWorkspaceRouteV0WorkspacesPost().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/workspaces`; - - return { - path: urlPath, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: WorkspaceCreateInToJSON(requestParameters['workspaceCreateIn']), - }; - } - - /** - * Create a new **shared drive** — a shared, multi-member space (the `workspaces` path is retained for API stability). You become its **admin** and get a starter drive; the starter drive\'s `ad_live_` key is returned **once** (`starter_drive_api_key`). A user may administer up to their plan\'s number of shared drives (workspaces-v2 §4.6). A caller at the limit is blocked with `403 WORKSPACE_LIMIT_REACHED`. Requires a `full`-scope user token. - * Create a new shared drive - */ - async createWorkspaceRouteV0WorkspacesPostRaw(requestParameters: CreateWorkspaceRouteV0WorkspacesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.createWorkspaceRouteV0WorkspacesPostRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => WorkspaceCreateOutFromJSON(jsonValue)); - } - - /** - * Create a new **shared drive** — a shared, multi-member space (the `workspaces` path is retained for API stability). You become its **admin** and get a starter drive; the starter drive\'s `ad_live_` key is returned **once** (`starter_drive_api_key`). A user may administer up to their plan\'s number of shared drives (workspaces-v2 §4.6). A caller at the limit is blocked with `403 WORKSPACE_LIMIT_REACHED`. Requires a `full`-scope user token. - * Create a new shared drive - */ - async createWorkspaceRouteV0WorkspacesPost(requestParameters: CreateWorkspaceRouteV0WorkspacesPostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createWorkspaceRouteV0WorkspacesPostRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for listWorkspacesRouteV0WorkspacesGet without sending the request - */ - async listWorkspacesRouteV0WorkspacesGetRequestOpts(requestParameters: ListWorkspacesRouteV0WorkspacesGetRequest): Promise { - const queryParameters: any = {}; - - if (requestParameters['cursor'] != null) { - queryParameters['cursor'] = requestParameters['cursor']; - } - - if (requestParameters['limit'] != null) { - queryParameters['limit'] = requestParameters['limit']; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/workspaces`; - - return { - path: urlPath, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }; - } - - /** - * Return every space the caller is a member of, each carrying the caller\'s `role` in it. Metadata only. A `read`-scope token is sufficient. **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - * List the spaces you belong to - */ - async listWorkspacesRouteV0WorkspacesGetRaw(requestParameters: ListWorkspacesRouteV0WorkspacesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.listWorkspacesRouteV0WorkspacesGetRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => WorkspaceListFromJSON(jsonValue)); - } - - /** - * Return every space the caller is a member of, each carrying the caller\'s `role` in it. Metadata only. A `read`-scope token is sufficient. **Cursor pagination:** when more results exist, the response carries `next_cursor`. Pass it back as `?cursor=` to fetch the next page; `null` means the listing is complete. `limit` is clamped to [1, 100] (default 50), never rejected. - * List the spaces you belong to - */ - async listWorkspacesRouteV0WorkspacesGet(requestParameters: ListWorkspacesRouteV0WorkspacesGetRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.listWorkspacesRouteV0WorkspacesGetRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * Creates request options for renameWorkspaceRouteV0WorkspacesOrgIdPatch without sending the request - */ - async renameWorkspaceRouteV0WorkspacesOrgIdPatchRequestOpts(requestParameters: RenameWorkspaceRouteV0WorkspacesOrgIdPatchRequest): Promise { - if (requestParameters['orgId'] == null) { - throw new runtime.RequiredError( - 'orgId', - 'Required parameter "orgId" was null or undefined when calling renameWorkspaceRouteV0WorkspacesOrgIdPatch().' - ); - } - - if (requestParameters['workspaceRenameIn'] == null) { - throw new runtime.RequiredError( - 'workspaceRenameIn', - 'Required parameter "workspaceRenameIn" was null or undefined when calling renameWorkspaceRouteV0WorkspacesOrgIdPatch().' - ); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.accessToken) { - const token = this.configuration.accessToken; - const tokenString = await token("BearerAuth", []); - - if (tokenString) { - headerParameters["Authorization"] = `Bearer ${tokenString}`; - } - } - - let urlPath = `/v0/workspaces/{org_id}`; - urlPath = urlPath.replace('{org_id}', encodeURIComponent(String(requestParameters['orgId']))); - - return { - path: urlPath, - method: 'PATCH', - headers: headerParameters, - query: queryParameters, - body: WorkspaceRenameInToJSON(requestParameters['workspaceRenameIn']), - }; - } - - /** - * Rename a shared drive. **Admin only** — one you don\'t administer (or aren\'t a member of) returns 404 (no-leak). Requires a `full`-scope user token. - * Rename a shared drive you administer - */ - async renameWorkspaceRouteV0WorkspacesOrgIdPatchRaw(requestParameters: RenameWorkspaceRouteV0WorkspacesOrgIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const requestOptions = await this.renameWorkspaceRouteV0WorkspacesOrgIdPatchRequestOpts(requestParameters); - const response = await this.request(requestOptions, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => WorkspaceOutFromJSON(jsonValue)); - } - - /** - * Rename a shared drive. **Admin only** — one you don\'t administer (or aren\'t a member of) returns 404 (no-leak). Requires a `full`-scope user token. - * Rename a shared drive you administer - */ - async renameWorkspaceRouteV0WorkspacesOrgIdPatch(requestParameters: RenameWorkspaceRouteV0WorkspacesOrgIdPatchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.renameWorkspaceRouteV0WorkspacesOrgIdPatchRaw(requestParameters, initOverrides); - return await response.value(); - } - -} diff --git a/sdk/typescript/src/apis/index.ts b/sdk/typescript/src/apis/index.ts index c94a145..fe0ed9b 100644 --- a/sdk/typescript/src/apis/index.ts +++ b/sdk/typescript/src/apis/index.ts @@ -1,10 +1,13 @@ /* tslint:disable */ /* eslint-disable */ -export * from './AgentAuthApi'; +export * from './ArtifactsApi'; +export * from './ChangesApi'; export * from './DefaultApi'; +export * from './DiscoveryApi'; export * from './DrivesApi'; -export * from './McpOauthApi'; -export * from './McpOauthUiApi'; -export * from './MembersApi'; -export * from './TokensApi'; -export * from './WorkspacesApi'; +export * from './FoldersApi'; +export * from './GrantsApi'; +export * from './SearchApi'; +export * from './SharesApi'; +export * from './SharesRedemptionApi'; +export * from './VersionsApi'; diff --git a/sdk/typescript/src/models/AgentAuthMetadataOut.ts b/sdk/typescript/src/models/AgentAuthMetadataOut.ts deleted file mode 100644 index a74e71d..0000000 --- a/sdk/typescript/src/models/AgentAuthMetadataOut.ts +++ /dev/null @@ -1,130 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { IdentityAssertionMetadataOut } from './IdentityAssertionMetadataOut'; -import { - IdentityAssertionMetadataOutFromJSON, - IdentityAssertionMetadataOutFromJSONTyped, - IdentityAssertionMetadataOutToJSON, - IdentityAssertionMetadataOutToJSONTyped, -} from './IdentityAssertionMetadataOut'; - -/** - * - * @export - * @interface AgentAuthMetadataOut - */ -export interface AgentAuthMetadataOut { - [key: string]: any | any; - /** - * - * @type {string} - * @memberof AgentAuthMetadataOut - */ - claimEndpoint: string; - /** - * - * @type {string} - * @memberof AgentAuthMetadataOut - */ - eventsEndpoint: string | null; - /** - * - * @type {IdentityAssertionMetadataOut} - * @memberof AgentAuthMetadataOut - */ - identityAssertion: IdentityAssertionMetadataOut; - /** - * - * @type {string} - * @memberof AgentAuthMetadataOut - */ - identityEndpoint: string; - /** - * - * @type {Array} - * @memberof AgentAuthMetadataOut - */ - identityTypesSupported: Array; - /** - * - * @type {string} - * @memberof AgentAuthMetadataOut - */ - skill: string; - /** - * - * @type {string} - * @memberof AgentAuthMetadataOut - */ - specVersion: string; -} - -/** - * Check if a given object implements the AgentAuthMetadataOut interface. - */ -export function instanceOfAgentAuthMetadataOut(value: object): value is AgentAuthMetadataOut { - if ((!('claimEndpoint' in (value as Record)) && !('claim_endpoint' in (value as Record))) || ((value as Record)['claimEndpoint'] === undefined && (value as Record)['claim_endpoint'] === undefined)) return false; - if ((!('eventsEndpoint' in (value as Record)) && !('events_endpoint' in (value as Record))) || ((value as Record)['eventsEndpoint'] === undefined && (value as Record)['events_endpoint'] === undefined)) return false; - if ((!('identityAssertion' in (value as Record)) && !('identity_assertion' in (value as Record))) || ((value as Record)['identityAssertion'] === undefined && (value as Record)['identity_assertion'] === undefined)) return false; - if ((!('identityEndpoint' in (value as Record)) && !('identity_endpoint' in (value as Record))) || ((value as Record)['identityEndpoint'] === undefined && (value as Record)['identity_endpoint'] === undefined)) return false; - if ((!('identityTypesSupported' in (value as Record)) && !('identity_types_supported' in (value as Record))) || ((value as Record)['identityTypesSupported'] === undefined && (value as Record)['identity_types_supported'] === undefined)) return false; - if (!('skill' in value) || value['skill'] === undefined) return false; - if ((!('specVersion' in (value as Record)) && !('spec_version' in (value as Record))) || ((value as Record)['specVersion'] === undefined && (value as Record)['spec_version'] === undefined)) return false; - return true; -} - -export function AgentAuthMetadataOutFromJSON(json: any): AgentAuthMetadataOut { - return AgentAuthMetadataOutFromJSONTyped(json, false); -} - -export function AgentAuthMetadataOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): AgentAuthMetadataOut { - if (json == null) { - return json; - } - return { - - ...json, - 'claimEndpoint': json['claim_endpoint'], - 'eventsEndpoint': json['events_endpoint'], - 'identityAssertion': IdentityAssertionMetadataOutFromJSON(json['identity_assertion']), - 'identityEndpoint': json['identity_endpoint'], - 'identityTypesSupported': json['identity_types_supported'], - 'skill': json['skill'], - 'specVersion': json['spec_version'], - }; -} - -export function AgentAuthMetadataOutToJSON(json: any): AgentAuthMetadataOut { - return AgentAuthMetadataOutToJSONTyped(json, false); -} - -export function AgentAuthMetadataOutToJSONTyped(value?: AgentAuthMetadataOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - ...value, - 'claim_endpoint': value['claimEndpoint'], - 'events_endpoint': value['eventsEndpoint'], - 'identity_assertion': IdentityAssertionMetadataOutToJSON(value['identityAssertion']), - 'identity_endpoint': value['identityEndpoint'], - 'identity_types_supported': value['identityTypesSupported'], - 'skill': value['skill'], - 'spec_version': value['specVersion'], - }; -} diff --git a/sdk/typescript/src/models/AnonymousIdentityResponse.ts b/sdk/typescript/src/models/AnonymousIdentityResponse.ts deleted file mode 100644 index b8b9703..0000000 --- a/sdk/typescript/src/models/AnonymousIdentityResponse.ts +++ /dev/null @@ -1,122 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { ClaimMetadata } from './ClaimMetadata'; -import { - ClaimMetadataFromJSON, - ClaimMetadataFromJSONTyped, - ClaimMetadataToJSON, - ClaimMetadataToJSONTyped, -} from './ClaimMetadata'; - -/** - * `POST /agent/identity` response on the anonymous path. - * - * The agent stores `identity_assertion` as its long-lived credential - * and uses `claim_token` to initiate the claim ceremony when the - * human is ready. - * @export - * @interface AnonymousIdentityResponse - */ -export interface AnonymousIdentityResponse { - /** - * - * @type {string} - * @memberof AnonymousIdentityResponse - */ - agentIdentityId: string; - /** - * - * @type {ClaimMetadata} - * @memberof AnonymousIdentityResponse - */ - claimMetadata: ClaimMetadata; - /** - * Opaque server-issued secret. Present at POST /agent/identity/claim and at POST /oauth2/token (grant_type=claim). - * @type {string} - * @memberof AnonymousIdentityResponse - */ - claimToken: string; - /** - * - * @type {string} - * @memberof AnonymousIdentityResponse - */ - driveId: string; - /** - * - * @type {Date} - * @memberof AnonymousIdentityResponse - */ - expiresAt: Date; - /** - * JWT signed by AgentDrive, scope=pre_claim. 30-day TTL. - * @type {string} - * @memberof AnonymousIdentityResponse - */ - identityAssertion: string; -} - -/** - * Check if a given object implements the AnonymousIdentityResponse interface. - */ -export function instanceOfAnonymousIdentityResponse(value: object): value is AnonymousIdentityResponse { - if ((!('agentIdentityId' in (value as Record)) && !('agent_identity_id' in (value as Record))) || ((value as Record)['agentIdentityId'] === undefined && (value as Record)['agent_identity_id'] === undefined)) return false; - if ((!('claimMetadata' in (value as Record)) && !('claim_metadata' in (value as Record))) || ((value as Record)['claimMetadata'] === undefined && (value as Record)['claim_metadata'] === undefined)) return false; - if ((!('claimToken' in (value as Record)) && !('claim_token' in (value as Record))) || ((value as Record)['claimToken'] === undefined && (value as Record)['claim_token'] === undefined)) return false; - if ((!('driveId' in (value as Record)) && !('drive_id' in (value as Record))) || ((value as Record)['driveId'] === undefined && (value as Record)['drive_id'] === undefined)) return false; - if ((!('expiresAt' in (value as Record)) && !('expires_at' in (value as Record))) || ((value as Record)['expiresAt'] === undefined && (value as Record)['expires_at'] === undefined)) return false; - if ((!('identityAssertion' in (value as Record)) && !('identity_assertion' in (value as Record))) || ((value as Record)['identityAssertion'] === undefined && (value as Record)['identity_assertion'] === undefined)) return false; - return true; -} - -export function AnonymousIdentityResponseFromJSON(json: any): AnonymousIdentityResponse { - return AnonymousIdentityResponseFromJSONTyped(json, false); -} - -export function AnonymousIdentityResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AnonymousIdentityResponse { - if (json == null) { - return json; - } - return { - - 'agentIdentityId': json['agent_identity_id'], - 'claimMetadata': ClaimMetadataFromJSON(json['claim_metadata']), - 'claimToken': json['claim_token'], - 'driveId': json['drive_id'], - 'expiresAt': (new Date(json['expires_at'])), - 'identityAssertion': json['identity_assertion'], - }; -} - -export function AnonymousIdentityResponseToJSON(json: any): AnonymousIdentityResponse { - return AnonymousIdentityResponseToJSONTyped(json, false); -} - -export function AnonymousIdentityResponseToJSONTyped(value?: AnonymousIdentityResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'agent_identity_id': value['agentIdentityId'], - 'claim_metadata': ClaimMetadataToJSON(value['claimMetadata']), - 'claim_token': value['claimToken'], - 'drive_id': value['driveId'], - 'expires_at': value['expiresAt'].toISOString(), - 'identity_assertion': value['identityAssertion'], - }; -} diff --git a/sdk/typescript/src/models/ArtifactCopyIn.ts b/sdk/typescript/src/models/ArtifactCopyIn.ts new file mode 100644 index 0000000..ce6a224 --- /dev/null +++ b/sdk/typescript/src/models/ArtifactCopyIn.ts @@ -0,0 +1,93 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * POST /v0/drives/{id}/artifacts/{artifact_id}/copy body. + * + * ``destination_drive_id`` must equal the source drive (or be absent) — + * cross-drive copy is out of v0 scope and rejected. + * @export + * @interface ArtifactCopyIn + */ +export interface ArtifactCopyIn { + /** + * + * @type {string} + * @memberof ArtifactCopyIn + */ + destinationDriveId?: string | null; + /** + * + * @type {string} + * @memberof ArtifactCopyIn + */ + destinationName: string; + /** + * + * @type {string} + * @memberof ArtifactCopyIn + */ + destinationParentId: string; + /** + * + * @type {string} + * @memberof ArtifactCopyIn + */ + versionId?: string | null; +} + +/** + * Check if a given object implements the ArtifactCopyIn interface. + */ +export function instanceOfArtifactCopyIn(value: object): value is ArtifactCopyIn { + if ((!('destinationName' in (value as Record)) && !('destination_name' in (value as Record))) || ((value as Record)['destinationName'] === undefined && (value as Record)['destination_name'] === undefined)) return false; + if ((!('destinationParentId' in (value as Record)) && !('destination_parent_id' in (value as Record))) || ((value as Record)['destinationParentId'] === undefined && (value as Record)['destination_parent_id'] === undefined)) return false; + return true; +} + +export function ArtifactCopyInFromJSON(json: any): ArtifactCopyIn { + return ArtifactCopyInFromJSONTyped(json, false); +} + +export function ArtifactCopyInFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactCopyIn { + if (json == null) { + return json; + } + return { + + 'destinationDriveId': json['destination_drive_id'] === undefined ? undefined : json['destination_drive_id'] === null ? null : json['destination_drive_id'], + 'destinationName': json['destination_name'], + 'destinationParentId': json['destination_parent_id'], + 'versionId': json['version_id'] === undefined ? undefined : json['version_id'] === null ? null : json['version_id'], + }; +} + +export function ArtifactCopyInToJSON(json: any): ArtifactCopyIn { + return ArtifactCopyInToJSONTyped(json, false); +} + +export function ArtifactCopyInToJSONTyped(value?: ArtifactCopyIn | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'destination_drive_id': value['destinationDriveId'], + 'destination_name': value['destinationName'], + 'destination_parent_id': value['destinationParentId'], + 'version_id': value['versionId'], + }; +} diff --git a/sdk/typescript/src/models/ArtifactDeleteOut.ts b/sdk/typescript/src/models/ArtifactDeleteOut.ts deleted file mode 100644 index 597fd1c..0000000 --- a/sdk/typescript/src/models/ArtifactDeleteOut.ts +++ /dev/null @@ -1,110 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * DELETE /v0/artifacts/{art_id} response — the soft-delete receipt. - * Reversible until the GC cron hard-deletes at `purge_at`; `restore_url` - * points at the by-id restore endpoint (deletion-design.md §5.3). - * @export - * @interface ArtifactDeleteOut - */ -export interface ArtifactDeleteOut { - /** - * - * @type {Date} - * @memberof ArtifactDeleteOut - */ - deletedAt: Date; - /** - * - * @type {string} - * @memberof ArtifactDeleteOut - */ - id: string; - /** - * - * @type {boolean} - * @memberof ArtifactDeleteOut - */ - ok?: boolean; - /** - * - * @type {string} - * @memberof ArtifactDeleteOut - */ - path: string; - /** - * - * @type {Date} - * @memberof ArtifactDeleteOut - */ - purgeAt: Date; - /** - * - * @type {string} - * @memberof ArtifactDeleteOut - */ - restoreUrl?: string | null; -} - -/** - * Check if a given object implements the ArtifactDeleteOut interface. - */ -export function instanceOfArtifactDeleteOut(value: object): value is ArtifactDeleteOut { - if ((!('deletedAt' in (value as Record)) && !('deleted_at' in (value as Record))) || ((value as Record)['deletedAt'] === undefined && (value as Record)['deleted_at'] === undefined)) return false; - if (!('id' in value) || value['id'] === undefined) return false; - if (!('path' in value) || value['path'] === undefined) return false; - if ((!('purgeAt' in (value as Record)) && !('purge_at' in (value as Record))) || ((value as Record)['purgeAt'] === undefined && (value as Record)['purge_at'] === undefined)) return false; - return true; -} - -export function ArtifactDeleteOutFromJSON(json: any): ArtifactDeleteOut { - return ArtifactDeleteOutFromJSONTyped(json, false); -} - -export function ArtifactDeleteOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactDeleteOut { - if (json == null) { - return json; - } - return { - - 'deletedAt': (new Date(json['deleted_at'])), - 'id': json['id'], - 'ok': json['ok'] == null ? undefined : json['ok'], - 'path': json['path'], - 'purgeAt': (new Date(json['purge_at'])), - 'restoreUrl': json['restore_url'] === undefined ? undefined : json['restore_url'] === null ? null : json['restore_url'], - }; -} - -export function ArtifactDeleteOutToJSON(json: any): ArtifactDeleteOut { - return ArtifactDeleteOutToJSONTyped(json, false); -} - -export function ArtifactDeleteOutToJSONTyped(value?: ArtifactDeleteOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'deleted_at': value['deletedAt'].toISOString(), - 'id': value['id'], - 'ok': value['ok'], - 'path': value['path'], - 'purge_at': value['purgeAt'].toISOString(), - 'restore_url': value['restoreUrl'], - }; -} diff --git a/sdk/typescript/src/models/ArtifactHeadOut.ts b/sdk/typescript/src/models/ArtifactHeadOut.ts deleted file mode 100644 index f5065ed..0000000 --- a/sdk/typescript/src/models/ArtifactHeadOut.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface ArtifactHeadOut - */ -export interface ArtifactHeadOut { - /** - * - * @type {number} - * @memberof ArtifactHeadOut - */ - version: number; -} - -/** - * Check if a given object implements the ArtifactHeadOut interface. - */ -export function instanceOfArtifactHeadOut(value: object): value is ArtifactHeadOut { - if (!('version' in value) || value['version'] === undefined) return false; - return true; -} - -export function ArtifactHeadOutFromJSON(json: any): ArtifactHeadOut { - return ArtifactHeadOutFromJSONTyped(json, false); -} - -export function ArtifactHeadOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactHeadOut { - if (json == null) { - return json; - } - return { - - 'version': json['version'], - }; -} - -export function ArtifactHeadOutToJSON(json: any): ArtifactHeadOut { - return ArtifactHeadOutToJSONTyped(json, false); -} - -export function ArtifactHeadOutToJSONTyped(value?: ArtifactHeadOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'version': value['version'], - }; -} diff --git a/sdk/typescript/src/models/ArtifactListOut.ts b/sdk/typescript/src/models/ArtifactListOut.ts new file mode 100644 index 0000000..32a6a49 --- /dev/null +++ b/sdk/typescript/src/models/ArtifactListOut.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ArtifactOut } from './ArtifactOut'; +import { + ArtifactOutFromJSON, + ArtifactOutFromJSONTyped, + ArtifactOutToJSON, + ArtifactOutToJSONTyped, +} from './ArtifactOut'; + +/** + * + * @export + * @interface ArtifactListOut + */ +export interface ArtifactListOut { + /** + * + * @type {Array} + * @memberof ArtifactListOut + */ + items: Array; + /** + * + * @type {string} + * @memberof ArtifactListOut + */ + nextCursor: string | null; +} + +/** + * Check if a given object implements the ArtifactListOut interface. + */ +export function instanceOfArtifactListOut(value: object): value is ArtifactListOut { + if (!('items' in value) || value['items'] === undefined) return false; + if ((!('nextCursor' in (value as Record)) && !('next_cursor' in (value as Record))) || ((value as Record)['nextCursor'] === undefined && (value as Record)['next_cursor'] === undefined)) return false; + return true; +} + +export function ArtifactListOutFromJSON(json: any): ArtifactListOut { + return ArtifactListOutFromJSONTyped(json, false); +} + +export function ArtifactListOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactListOut { + if (json == null) { + return json; + } + return { + + 'items': ((json['items'] as Array).map(ArtifactOutFromJSON)), + 'nextCursor': json['next_cursor'], + }; +} + +export function ArtifactListOutToJSON(json: any): ArtifactListOut { + return ArtifactListOutToJSONTyped(json, false); +} + +export function ArtifactListOutToJSONTyped(value?: ArtifactListOut | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': ((value['items'] as Array).map(ArtifactOutToJSON)), + 'next_cursor': value['nextCursor'], + }; +} diff --git a/sdk/typescript/src/models/ArtifactMoveIn.ts b/sdk/typescript/src/models/ArtifactMoveIn.ts deleted file mode 100644 index 281438d..0000000 --- a/sdk/typescript/src/models/ArtifactMoveIn.ts +++ /dev/null @@ -1,68 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * POST /v0/artifacts/{art_id}/move body — rename / move to a new - * path on the same drive. Mirrors `FolderMoveIn`; its own schema (vs. - * reusing another body) keeps the move surface self-documenting in the - * OpenAPI spec. - * @export - * @interface ArtifactMoveIn - */ -export interface ArtifactMoveIn { - /** - * - * @type {string} - * @memberof ArtifactMoveIn - */ - path: string; -} - -/** - * Check if a given object implements the ArtifactMoveIn interface. - */ -export function instanceOfArtifactMoveIn(value: object): value is ArtifactMoveIn { - if (!('path' in value) || value['path'] === undefined) return false; - return true; -} - -export function ArtifactMoveInFromJSON(json: any): ArtifactMoveIn { - return ArtifactMoveInFromJSONTyped(json, false); -} - -export function ArtifactMoveInFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactMoveIn { - if (json == null) { - return json; - } - return { - - 'path': json['path'], - }; -} - -export function ArtifactMoveInToJSON(json: any): ArtifactMoveIn { - return ArtifactMoveInToJSONTyped(json, false); -} - -export function ArtifactMoveInToJSONTyped(value?: ArtifactMoveIn | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'path': value['path'], - }; -} diff --git a/sdk/typescript/src/models/ArtifactOut.ts b/sdk/typescript/src/models/ArtifactOut.ts index 3bc9921..fdccfd8 100644 --- a/sdk/typescript/src/models/ArtifactOut.ts +++ b/sdk/typescript/src/models/ArtifactOut.ts @@ -2,7 +2,7 @@ /* eslint-disable */ /** * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. * * The version of the OpenAPI document: * @@ -13,14 +13,6 @@ */ import { mapValues } from '../runtime'; -import type { ArtifactSource } from './ArtifactSource'; -import { - ArtifactSourceFromJSON, - ArtifactSourceFromJSONTyped, - ArtifactSourceToJSON, - ArtifactSourceToJSONTyped, -} from './ArtifactSource'; - /** * * @export @@ -32,139 +24,133 @@ export interface ArtifactOut { * @type {string} * @memberof ArtifactOut */ - contentType: string; + contentPreview: string | null; /** * - * @type {Date} + * @type {string} * @memberof ArtifactOut */ - createdAt: Date; + contentType: string | null; /** * - * @type {string} + * @type {Date} * @memberof ArtifactOut */ - driveId: string; + createdAt: Date; /** * * @type {Date} * @memberof ArtifactOut */ - embeddedAt?: Date | null; + deletedAt: Date | null; /** * * @type {string} * @memberof ArtifactOut */ - etag: string; + driveId: string; /** - * - * @type {string} + * Server-computed exposure summary, resolved over the artifact's live grants, its folder ancestry (bounded by the nearest sealed folder), and the drive. 'public' when any live grant has principal_type 'public'; otherwise 'shared' when a live grant names a principal other than the drive's creator; otherwise 'private'. Describes exposure, NOT the caller's own access. + * @type {ArtifactOutEffectiveVisibilityEnum} * @memberof ArtifactOut */ - fileType: string; + effectiveVisibility: ArtifactOutEffectiveVisibilityEnum; /** * * @type {string} * @memberof ArtifactOut */ - hash: string; + headVersionId: string | null; /** * * @type {string} * @memberof ArtifactOut */ id: string; - /** - * - * @type {Date} - * @memberof ArtifactOut - */ - indexedAt?: Date | null; /** * * @type {Array} * @memberof ArtifactOut */ - labels?: Array; + labels: Array; /** * * @type {{ [key: string]: any; }} * @memberof ArtifactOut */ - llmIndex?: { [key: string]: any; } | null; - /** - * - * @type {{ [key: string]: any; }} - * @memberof ArtifactOut - */ - metadata?: { [key: string]: any; }; - /** - * - * @type {number} - * @memberof ArtifactOut - */ - metageneration?: number; + metadata: { [key: string]: any; }; /** * * @type {string} * @memberof ArtifactOut */ - path: string; + name: string; /** * * @type {string} * @memberof ArtifactOut */ - permalink: string; + parentId: string; /** * - * @type {number} + * @type {string} * @memberof ArtifactOut */ - sizeBytes: number; + revision: string; /** * - * @type {ArtifactSource} + * @type {ArtifactOutStateEnum} * @memberof ArtifactOut */ - source?: ArtifactSource | null; + state: ArtifactOutStateEnum; /** * * @type {Date} * @memberof ArtifactOut */ updatedAt: Date; - /** - * - * @type {string} - * @memberof ArtifactOut - */ - url: string; - /** - * - * @type {number} - * @memberof ArtifactOut - */ - versionNumber?: number; } + +/** + * @export + */ +export const ArtifactOutEffectiveVisibilityEnum = { + Public: 'public', + Shared: 'shared', + Private: 'private' +} as const; +export type ArtifactOutEffectiveVisibilityEnum = typeof ArtifactOutEffectiveVisibilityEnum[keyof typeof ArtifactOutEffectiveVisibilityEnum]; + +/** + * @export + */ +export const ArtifactOutStateEnum = { + Active: 'active', + Deleted: 'deleted' +} as const; +export type ArtifactOutStateEnum = typeof ArtifactOutStateEnum[keyof typeof ArtifactOutStateEnum]; + + /** * Check if a given object implements the ArtifactOut interface. */ export function instanceOfArtifactOut(value: object): value is ArtifactOut { + if ((!('contentPreview' in (value as Record)) && !('content_preview' in (value as Record))) || ((value as Record)['contentPreview'] === undefined && (value as Record)['content_preview'] === undefined)) return false; if ((!('contentType' in (value as Record)) && !('content_type' in (value as Record))) || ((value as Record)['contentType'] === undefined && (value as Record)['content_type'] === undefined)) return false; if ((!('createdAt' in (value as Record)) && !('created_at' in (value as Record))) || ((value as Record)['createdAt'] === undefined && (value as Record)['created_at'] === undefined)) return false; + if ((!('deletedAt' in (value as Record)) && !('deleted_at' in (value as Record))) || ((value as Record)['deletedAt'] === undefined && (value as Record)['deleted_at'] === undefined)) return false; if ((!('driveId' in (value as Record)) && !('drive_id' in (value as Record))) || ((value as Record)['driveId'] === undefined && (value as Record)['drive_id'] === undefined)) return false; - if (!('etag' in value) || value['etag'] === undefined) return false; - if ((!('fileType' in (value as Record)) && !('file_type' in (value as Record))) || ((value as Record)['fileType'] === undefined && (value as Record)['file_type'] === undefined)) return false; - if (!('hash' in value) || value['hash'] === undefined) return false; + if ((!('effectiveVisibility' in (value as Record)) && !('effective_visibility' in (value as Record))) || ((value as Record)['effectiveVisibility'] === undefined && (value as Record)['effective_visibility'] === undefined)) return false; + if ((!('headVersionId' in (value as Record)) && !('head_version_id' in (value as Record))) || ((value as Record)['headVersionId'] === undefined && (value as Record)['head_version_id'] === undefined)) return false; if (!('id' in value) || value['id'] === undefined) return false; - if (!('path' in value) || value['path'] === undefined) return false; - if (!('permalink' in value) || value['permalink'] === undefined) return false; - if ((!('sizeBytes' in (value as Record)) && !('size_bytes' in (value as Record))) || ((value as Record)['sizeBytes'] === undefined && (value as Record)['size_bytes'] === undefined)) return false; + if (!('labels' in value) || value['labels'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if ((!('parentId' in (value as Record)) && !('parent_id' in (value as Record))) || ((value as Record)['parentId'] === undefined && (value as Record)['parent_id'] === undefined)) return false; + if (!('revision' in value) || value['revision'] === undefined) return false; + if (!('state' in value) || value['state'] === undefined) return false; if ((!('updatedAt' in (value as Record)) && !('updated_at' in (value as Record))) || ((value as Record)['updatedAt'] === undefined && (value as Record)['updated_at'] === undefined)) return false; - if (!('url' in value) || value['url'] === undefined) return false; return true; } @@ -178,26 +164,21 @@ export function ArtifactOutFromJSONTyped(json: any, ignoreDiscriminator: boolean } return { + 'contentPreview': json['content_preview'], 'contentType': json['content_type'], 'createdAt': (new Date(json['created_at'])), + 'deletedAt': (json['deleted_at'] == null ? null : new Date(json['deleted_at'])), 'driveId': json['drive_id'], - 'embeddedAt': json['embedded_at'] === undefined ? undefined : json['embedded_at'] === null ? null : (new Date(json['embedded_at'])), - 'etag': json['etag'], - 'fileType': json['file_type'], - 'hash': json['hash'], + 'effectiveVisibility': json['effective_visibility'], + 'headVersionId': json['head_version_id'], 'id': json['id'], - 'indexedAt': json['indexed_at'] === undefined ? undefined : json['indexed_at'] === null ? null : (new Date(json['indexed_at'])), - 'labels': json['labels'] == null ? undefined : json['labels'], - 'llmIndex': json['llm_index'] === undefined ? undefined : json['llm_index'] === null ? null : json['llm_index'], - 'metadata': json['metadata'] == null ? undefined : json['metadata'], - 'metageneration': json['metageneration'] == null ? undefined : json['metageneration'], - 'path': json['path'], - 'permalink': json['permalink'], - 'sizeBytes': json['size_bytes'], - 'source': json['source'] === undefined ? undefined : json['source'] === null ? null : ArtifactSourceFromJSON(json['source']), + 'labels': json['labels'], + 'metadata': json['metadata'], + 'name': json['name'], + 'parentId': json['parent_id'], + 'revision': json['revision'], + 'state': json['state'], 'updatedAt': (new Date(json['updated_at'])), - 'url': json['url'], - 'versionNumber': json['version_number'] == null ? undefined : json['version_number'], }; } @@ -212,25 +193,20 @@ export function ArtifactOutToJSONTyped(value?: ArtifactOut | null, ignoreDiscrim return { + 'content_preview': value['contentPreview'], 'content_type': value['contentType'], 'created_at': value['createdAt'].toISOString(), + 'deleted_at': value['deletedAt'] == null ? value['deletedAt'] : value['deletedAt'].toISOString(), 'drive_id': value['driveId'], - 'embedded_at': value['embeddedAt'] == null ? value['embeddedAt'] : value['embeddedAt'].toISOString(), - 'etag': value['etag'], - 'file_type': value['fileType'], - 'hash': value['hash'], + 'effective_visibility': value['effectiveVisibility'], + 'head_version_id': value['headVersionId'], 'id': value['id'], - 'indexed_at': value['indexedAt'] == null ? value['indexedAt'] : value['indexedAt'].toISOString(), 'labels': value['labels'], - 'llm_index': value['llmIndex'], 'metadata': value['metadata'], - 'metageneration': value['metageneration'], - 'path': value['path'], - 'permalink': value['permalink'], - 'size_bytes': value['sizeBytes'], - 'source': ArtifactSourceToJSON(value['source']), + 'name': value['name'], + 'parent_id': value['parentId'], + 'revision': value['revision'], + 'state': value['state'], 'updated_at': value['updatedAt'].toISOString(), - 'url': value['url'], - 'version_number': value['versionNumber'], }; } diff --git a/sdk/typescript/src/models/ArtifactPatchIn.ts b/sdk/typescript/src/models/ArtifactPatchIn.ts deleted file mode 100644 index caf2b7c..0000000 --- a/sdk/typescript/src/models/ArtifactPatchIn.ts +++ /dev/null @@ -1,107 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { ArtifactSource } from './ArtifactSource'; -import { - ArtifactSourceFromJSON, - ArtifactSourceFromJSONTyped, - ArtifactSourceToJSON, - ArtifactSourceToJSONTyped, -} from './ArtifactSource'; - -/** - * PATCH /v0/artifacts/{art_id} body — metadata-only partial - * (JSON-merge-patch) update. - * - * Every field is optional. Presence is what matters, not the value: - * a field left out of the body (per Pydantic `model_fields_set`) is - * left unchanged; a field that IS present is applied — with an explicit - * `null` / `[]` / `{}` meaning "clear it". This mirrors the MCP - * `set_metadata` tool and the core `patch_artifact_metadata` sentinel - * semantics (omitted = preserve, present = replace/clear). - * - * * `labels` — replace the label set; `[]` or `null` clears it. - * * `metadata` — replace the free-form metadata object; `{}` or `null` - * clears it. - * * `source` — replace provenance refs; `null` (or `{"refs": []}`) - * clears them. - * - * PATCH is metadata-only: to move/rename an artifact, use - * `POST /v0/artifacts/{art_id}/move`. `extra="forbid"` makes a stray - * field (notably a legacy `path`) a hard 422 rather than a silent - * no-op — a clean-break signal to migrate to the move verb. - * @export - * @interface ArtifactPatchIn - */ -export interface ArtifactPatchIn { - /** - * - * @type {Array} - * @memberof ArtifactPatchIn - */ - labels?: Array | null; - /** - * - * @type {{ [key: string]: any; }} - * @memberof ArtifactPatchIn - */ - metadata?: { [key: string]: any; } | null; - /** - * - * @type {ArtifactSource} - * @memberof ArtifactPatchIn - */ - source?: ArtifactSource | null; -} - -/** - * Check if a given object implements the ArtifactPatchIn interface. - */ -export function instanceOfArtifactPatchIn(value: object): value is ArtifactPatchIn { - return true; -} - -export function ArtifactPatchInFromJSON(json: any): ArtifactPatchIn { - return ArtifactPatchInFromJSONTyped(json, false); -} - -export function ArtifactPatchInFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactPatchIn { - if (json == null) { - return json; - } - return { - - 'labels': json['labels'] === undefined ? undefined : json['labels'] === null ? null : json['labels'], - 'metadata': json['metadata'] === undefined ? undefined : json['metadata'] === null ? null : json['metadata'], - 'source': json['source'] === undefined ? undefined : json['source'] === null ? null : ArtifactSourceFromJSON(json['source']), - }; -} - -export function ArtifactPatchInToJSON(json: any): ArtifactPatchIn { - return ArtifactPatchInToJSONTyped(json, false); -} - -export function ArtifactPatchInToJSONTyped(value?: ArtifactPatchIn | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'labels': value['labels'], - 'metadata': value['metadata'], - 'source': ArtifactSourceToJSON(value['source']), - }; -} diff --git a/sdk/typescript/src/models/ArtifactSource.ts b/sdk/typescript/src/models/ArtifactSource.ts deleted file mode 100644 index e79b42d..0000000 --- a/sdk/typescript/src/models/ArtifactSource.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { SourceRef } from './SourceRef'; -import { - SourceRefFromJSON, - SourceRefFromJSONTyped, - SourceRefToJSON, - SourceRefToJSONTyped, -} from './SourceRef'; - -/** - * Caller-supplied provenance metadata, attached to an artifact. - * - * v0.6 model: a list of typed refs. The legacy v0.5 fields - * (`agent_id`, `run_id`, `prompt_hash`) were never validated and are - * superseded by the `refs` shape (an agent-id ref would be - * `{"type": "agent", "id": "..."}` in v0.6 vocabulary). - * @export - * @interface ArtifactSource - */ -export interface ArtifactSource { - /** - * - * @type {Array} - * @memberof ArtifactSource - */ - refs?: Array; -} - -/** - * Check if a given object implements the ArtifactSource interface. - */ -export function instanceOfArtifactSource(value: object): value is ArtifactSource { - return true; -} - -export function ArtifactSourceFromJSON(json: any): ArtifactSource { - return ArtifactSourceFromJSONTyped(json, false); -} - -export function ArtifactSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactSource { - if (json == null) { - return json; - } - return { - - 'refs': json['refs'] == null ? undefined : ((json['refs'] as Array).map(SourceRefFromJSON)), - }; -} - -export function ArtifactSourceToJSON(json: any): ArtifactSource { - return ArtifactSourceToJSONTyped(json, false); -} - -export function ArtifactSourceToJSONTyped(value?: ArtifactSource | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'refs': value['refs'] == null ? undefined : ((value['refs'] as Array).map(SourceRefToJSON)), - }; -} diff --git a/sdk/typescript/src/models/ArtifactUpdateIn.ts b/sdk/typescript/src/models/ArtifactUpdateIn.ts new file mode 100644 index 0000000..07753f4 --- /dev/null +++ b/sdk/typescript/src/models/ArtifactUpdateIn.ts @@ -0,0 +1,89 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * PATCH /v0/drives/{id}/artifacts/{artifact_id} body — at least one + * field is required. + * @export + * @interface ArtifactUpdateIn + */ +export interface ArtifactUpdateIn { + /** + * + * @type {Array} + * @memberof ArtifactUpdateIn + */ + labels?: Array | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof ArtifactUpdateIn + */ + metadata?: { [key: string]: any; } | null; + /** + * + * @type {string} + * @memberof ArtifactUpdateIn + */ + name?: string | null; + /** + * + * @type {string} + * @memberof ArtifactUpdateIn + */ + parentId?: string | null; +} + +/** + * Check if a given object implements the ArtifactUpdateIn interface. + */ +export function instanceOfArtifactUpdateIn(value: object): value is ArtifactUpdateIn { + return true; +} + +export function ArtifactUpdateInFromJSON(json: any): ArtifactUpdateIn { + return ArtifactUpdateInFromJSONTyped(json, false); +} + +export function ArtifactUpdateInFromJSONTyped(json: any, ignoreDiscriminator: boolean): ArtifactUpdateIn { + if (json == null) { + return json; + } + return { + + 'labels': json['labels'] === undefined ? undefined : json['labels'] === null ? null : json['labels'], + 'metadata': json['metadata'] === undefined ? undefined : json['metadata'] === null ? null : json['metadata'], + 'name': json['name'] === undefined ? undefined : json['name'] === null ? null : json['name'], + 'parentId': json['parent_id'] === undefined ? undefined : json['parent_id'] === null ? null : json['parent_id'], + }; +} + +export function ArtifactUpdateInToJSON(json: any): ArtifactUpdateIn { + return ArtifactUpdateInToJSONTyped(json, false); +} + +export function ArtifactUpdateInToJSONTyped(value?: ArtifactUpdateIn | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'labels': value['labels'], + 'metadata': value['metadata'], + 'name': value['name'], + 'parent_id': value['parentId'], + }; +} diff --git a/sdk/typescript/src/models/AuthorizationServerMetadataOut.ts b/sdk/typescript/src/models/AuthorizationServerMetadataOut.ts deleted file mode 100644 index 08c2fa1..0000000 --- a/sdk/typescript/src/models/AuthorizationServerMetadataOut.ts +++ /dev/null @@ -1,202 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { AgentAuthMetadataOut } from './AgentAuthMetadataOut'; -import { - AgentAuthMetadataOutFromJSON, - AgentAuthMetadataOutFromJSONTyped, - AgentAuthMetadataOutToJSON, - AgentAuthMetadataOutToJSONTyped, -} from './AgentAuthMetadataOut'; - -/** - * - * @export - * @interface AuthorizationServerMetadataOut - */ -export interface AuthorizationServerMetadataOut { - [key: string]: any | any; - /** - * - * @type {AgentAuthMetadataOut} - * @memberof AuthorizationServerMetadataOut - */ - agentAuth: AgentAuthMetadataOut; - /** - * - * @type {string} - * @memberof AuthorizationServerMetadataOut - */ - authorizationEndpoint: string; - /** - * - * @type {boolean} - * @memberof AuthorizationServerMetadataOut - */ - authorizationResponseIssParameterSupported: boolean; - /** - * - * @type {Array} - * @memberof AuthorizationServerMetadataOut - */ - codeChallengeMethodsSupported: Array; - /** - * - * @type {Array} - * @memberof AuthorizationServerMetadataOut - */ - grantTypesSupported: Array; - /** - * - * @type {string} - * @memberof AuthorizationServerMetadataOut - */ - issuer: string; - /** - * - * @type {string} - * @memberof AuthorizationServerMetadataOut - */ - jwksUri: string; - /** - * - * @type {string} - * @memberof AuthorizationServerMetadataOut - */ - registrationEndpoint: string; - /** - * - * @type {Array} - * @memberof AuthorizationServerMetadataOut - */ - responseModesSupported: Array; - /** - * - * @type {Array} - * @memberof AuthorizationServerMetadataOut - */ - responseTypesSupported: Array; - /** - * - * @type {string} - * @memberof AuthorizationServerMetadataOut - */ - revocationEndpoint: string; - /** - * - * @type {Array} - * @memberof AuthorizationServerMetadataOut - */ - revocationEndpointAuthMethodsSupported: Array; - /** - * - * @type {Array} - * @memberof AuthorizationServerMetadataOut - */ - scopesSupported: Array; - /** - * - * @type {string} - * @memberof AuthorizationServerMetadataOut - */ - tokenEndpoint: string; - /** - * - * @type {Array} - * @memberof AuthorizationServerMetadataOut - */ - tokenEndpointAuthMethodsSupported: Array; -} - -/** - * Check if a given object implements the AuthorizationServerMetadataOut interface. - */ -export function instanceOfAuthorizationServerMetadataOut(value: object): value is AuthorizationServerMetadataOut { - if ((!('agentAuth' in (value as Record)) && !('agent_auth' in (value as Record))) || ((value as Record)['agentAuth'] === undefined && (value as Record)['agent_auth'] === undefined)) return false; - if ((!('authorizationEndpoint' in (value as Record)) && !('authorization_endpoint' in (value as Record))) || ((value as Record)['authorizationEndpoint'] === undefined && (value as Record)['authorization_endpoint'] === undefined)) return false; - if ((!('authorizationResponseIssParameterSupported' in (value as Record)) && !('authorization_response_iss_parameter_supported' in (value as Record))) || ((value as Record)['authorizationResponseIssParameterSupported'] === undefined && (value as Record)['authorization_response_iss_parameter_supported'] === undefined)) return false; - if ((!('codeChallengeMethodsSupported' in (value as Record)) && !('code_challenge_methods_supported' in (value as Record))) || ((value as Record)['codeChallengeMethodsSupported'] === undefined && (value as Record)['code_challenge_methods_supported'] === undefined)) return false; - if ((!('grantTypesSupported' in (value as Record)) && !('grant_types_supported' in (value as Record))) || ((value as Record)['grantTypesSupported'] === undefined && (value as Record)['grant_types_supported'] === undefined)) return false; - if (!('issuer' in value) || value['issuer'] === undefined) return false; - if ((!('jwksUri' in (value as Record)) && !('jwks_uri' in (value as Record))) || ((value as Record)['jwksUri'] === undefined && (value as Record)['jwks_uri'] === undefined)) return false; - if ((!('registrationEndpoint' in (value as Record)) && !('registration_endpoint' in (value as Record))) || ((value as Record)['registrationEndpoint'] === undefined && (value as Record)['registration_endpoint'] === undefined)) return false; - if ((!('responseModesSupported' in (value as Record)) && !('response_modes_supported' in (value as Record))) || ((value as Record)['responseModesSupported'] === undefined && (value as Record)['response_modes_supported'] === undefined)) return false; - if ((!('responseTypesSupported' in (value as Record)) && !('response_types_supported' in (value as Record))) || ((value as Record)['responseTypesSupported'] === undefined && (value as Record)['response_types_supported'] === undefined)) return false; - if ((!('revocationEndpoint' in (value as Record)) && !('revocation_endpoint' in (value as Record))) || ((value as Record)['revocationEndpoint'] === undefined && (value as Record)['revocation_endpoint'] === undefined)) return false; - if ((!('revocationEndpointAuthMethodsSupported' in (value as Record)) && !('revocation_endpoint_auth_methods_supported' in (value as Record))) || ((value as Record)['revocationEndpointAuthMethodsSupported'] === undefined && (value as Record)['revocation_endpoint_auth_methods_supported'] === undefined)) return false; - if ((!('scopesSupported' in (value as Record)) && !('scopes_supported' in (value as Record))) || ((value as Record)['scopesSupported'] === undefined && (value as Record)['scopes_supported'] === undefined)) return false; - if ((!('tokenEndpoint' in (value as Record)) && !('token_endpoint' in (value as Record))) || ((value as Record)['tokenEndpoint'] === undefined && (value as Record)['token_endpoint'] === undefined)) return false; - if ((!('tokenEndpointAuthMethodsSupported' in (value as Record)) && !('token_endpoint_auth_methods_supported' in (value as Record))) || ((value as Record)['tokenEndpointAuthMethodsSupported'] === undefined && (value as Record)['token_endpoint_auth_methods_supported'] === undefined)) return false; - return true; -} - -export function AuthorizationServerMetadataOutFromJSON(json: any): AuthorizationServerMetadataOut { - return AuthorizationServerMetadataOutFromJSONTyped(json, false); -} - -export function AuthorizationServerMetadataOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthorizationServerMetadataOut { - if (json == null) { - return json; - } - return { - - ...json, - 'agentAuth': AgentAuthMetadataOutFromJSON(json['agent_auth']), - 'authorizationEndpoint': json['authorization_endpoint'], - 'authorizationResponseIssParameterSupported': json['authorization_response_iss_parameter_supported'], - 'codeChallengeMethodsSupported': json['code_challenge_methods_supported'], - 'grantTypesSupported': json['grant_types_supported'], - 'issuer': json['issuer'], - 'jwksUri': json['jwks_uri'], - 'registrationEndpoint': json['registration_endpoint'], - 'responseModesSupported': json['response_modes_supported'], - 'responseTypesSupported': json['response_types_supported'], - 'revocationEndpoint': json['revocation_endpoint'], - 'revocationEndpointAuthMethodsSupported': json['revocation_endpoint_auth_methods_supported'], - 'scopesSupported': json['scopes_supported'], - 'tokenEndpoint': json['token_endpoint'], - 'tokenEndpointAuthMethodsSupported': json['token_endpoint_auth_methods_supported'], - }; -} - -export function AuthorizationServerMetadataOutToJSON(json: any): AuthorizationServerMetadataOut { - return AuthorizationServerMetadataOutToJSONTyped(json, false); -} - -export function AuthorizationServerMetadataOutToJSONTyped(value?: AuthorizationServerMetadataOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - ...value, - 'agent_auth': AgentAuthMetadataOutToJSON(value['agentAuth']), - 'authorization_endpoint': value['authorizationEndpoint'], - 'authorization_response_iss_parameter_supported': value['authorizationResponseIssParameterSupported'], - 'code_challenge_methods_supported': value['codeChallengeMethodsSupported'], - 'grant_types_supported': value['grantTypesSupported'], - 'issuer': value['issuer'], - 'jwks_uri': value['jwksUri'], - 'registration_endpoint': value['registrationEndpoint'], - 'response_modes_supported': value['responseModesSupported'], - 'response_types_supported': value['responseTypesSupported'], - 'revocation_endpoint': value['revocationEndpoint'], - 'revocation_endpoint_auth_methods_supported': value['revocationEndpointAuthMethodsSupported'], - 'scopes_supported': value['scopesSupported'], - 'token_endpoint': value['tokenEndpoint'], - 'token_endpoint_auth_methods_supported': value['tokenEndpointAuthMethodsSupported'], - }; -} diff --git a/sdk/typescript/src/models/AuthorizeDecisionOauth2AuthorizePost403Response.ts b/sdk/typescript/src/models/AuthorizeDecisionOauth2AuthorizePost403Response.ts deleted file mode 100644 index 60d5112..0000000 --- a/sdk/typescript/src/models/AuthorizeDecisionOauth2AuthorizePost403Response.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import type { ErrorResponse } from './ErrorResponse'; -import { - instanceOfErrorResponse, - ErrorResponseFromJSON, - ErrorResponseFromJSONTyped, - ErrorResponseToJSON, -} from './ErrorResponse'; -import type { OAuthProtocolErrorOut } from './OAuthProtocolErrorOut'; -import { - instanceOfOAuthProtocolErrorOut, - OAuthProtocolErrorOutFromJSON, - OAuthProtocolErrorOutFromJSONTyped, - OAuthProtocolErrorOutToJSON, -} from './OAuthProtocolErrorOut'; - -/** - * @type AuthorizeDecisionOauth2AuthorizePost403Response - * - * @export - */ -export type AuthorizeDecisionOauth2AuthorizePost403Response = ErrorResponse | OAuthProtocolErrorOut; - -export function AuthorizeDecisionOauth2AuthorizePost403ResponseFromJSON(json: any): AuthorizeDecisionOauth2AuthorizePost403Response { - return AuthorizeDecisionOauth2AuthorizePost403ResponseFromJSONTyped(json, false); -} - -export function AuthorizeDecisionOauth2AuthorizePost403ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthorizeDecisionOauth2AuthorizePost403Response { - if (json == null) { - return json; - } - if (typeof json !== 'object') { - return json; - } - if (instanceOfErrorResponse(json)) { - return ErrorResponseFromJSONTyped(json, true); - } - if (instanceOfOAuthProtocolErrorOut(json)) { - return OAuthProtocolErrorOutFromJSONTyped(json, true); - } - return {} as any; -} - -export function AuthorizeDecisionOauth2AuthorizePost403ResponseToJSON(json: any): any { - return AuthorizeDecisionOauth2AuthorizePost403ResponseToJSONTyped(json, false); -} - -export function AuthorizeDecisionOauth2AuthorizePost403ResponseToJSONTyped(value?: AuthorizeDecisionOauth2AuthorizePost403Response | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - if (typeof value !== 'object') { - return value; - } - if (instanceOfErrorResponse(value)) { - return ErrorResponseToJSON(value as ErrorResponse); - } - if (instanceOfOAuthProtocolErrorOut(value)) { - return OAuthProtocolErrorOutToJSON(value as OAuthProtocolErrorOut); - } - return {}; -} diff --git a/sdk/typescript/src/models/ChangeActorOut.ts b/sdk/typescript/src/models/ChangeActorOut.ts new file mode 100644 index 0000000..23c2719 --- /dev/null +++ b/sdk/typescript/src/models/ChangeActorOut.ts @@ -0,0 +1,86 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ChangeActorOut + */ +export interface ChangeActorOut { + /** + * + * @type {string} + * @memberof ChangeActorOut + */ + id: string | null; + /** + * + * @type {ChangeActorOutTypeEnum} + * @memberof ChangeActorOut + */ + type: ChangeActorOutTypeEnum; +} + + +/** + * @export + */ +export const ChangeActorOutTypeEnum = { + Agent: 'agent', + User: 'user', + System: 'system' +} as const; +export type ChangeActorOutTypeEnum = typeof ChangeActorOutTypeEnum[keyof typeof ChangeActorOutTypeEnum]; + + +/** + * Check if a given object implements the ChangeActorOut interface. + */ +export function instanceOfChangeActorOut(value: object): value is ChangeActorOut { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('type' in value) || value['type'] === undefined) return false; + return true; +} + +export function ChangeActorOutFromJSON(json: any): ChangeActorOut { + return ChangeActorOutFromJSONTyped(json, false); +} + +export function ChangeActorOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChangeActorOut { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'type': json['type'], + }; +} + +export function ChangeActorOutToJSON(json: any): ChangeActorOut { + return ChangeActorOutToJSONTyped(json, false); +} + +export function ChangeActorOutToJSONTyped(value?: ChangeActorOut | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'type': value['type'], + }; +} diff --git a/sdk/typescript/src/models/ChangeOut.ts b/sdk/typescript/src/models/ChangeOut.ts new file mode 100644 index 0000000..b1bcc34 --- /dev/null +++ b/sdk/typescript/src/models/ChangeOut.ts @@ -0,0 +1,161 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ChangeResourceOut } from './ChangeResourceOut'; +import { + ChangeResourceOutFromJSON, + ChangeResourceOutFromJSONTyped, + ChangeResourceOutToJSON, + ChangeResourceOutToJSONTyped, +} from './ChangeResourceOut'; +import type { ChangeActorOut } from './ChangeActorOut'; +import { + ChangeActorOutFromJSON, + ChangeActorOutFromJSONTyped, + ChangeActorOutToJSON, + ChangeActorOutToJSONTyped, +} from './ChangeActorOut'; + +/** + * + * @export + * @interface ChangeOut + */ +export interface ChangeOut { + /** + * + * @type {ChangeActorOut} + * @memberof ChangeOut + */ + actor: ChangeActorOut; + /** + * + * @type {string} + * @memberof ChangeOut + */ + changeSetId: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof ChangeOut + */ + data: { [key: string]: any; }; + /** + * + * @type {string} + * @memberof ChangeOut + */ + driveId: string; + /** + * + * @type {string} + * @memberof ChangeOut + */ + id: string; + /** + * + * @type {Date} + * @memberof ChangeOut + */ + occurredAt: Date; + /** + * + * @type {string} + * @memberof ChangeOut + */ + previousRevision: string | null; + /** + * + * @type {ChangeResourceOut} + * @memberof ChangeOut + */ + resource: ChangeResourceOut; + /** + * + * @type {string} + * @memberof ChangeOut + */ + revision: string | null; + /** + * + * @type {string} + * @memberof ChangeOut + */ + type: string; +} + +/** + * Check if a given object implements the ChangeOut interface. + */ +export function instanceOfChangeOut(value: object): value is ChangeOut { + if (!('actor' in value) || value['actor'] === undefined) return false; + if ((!('changeSetId' in (value as Record)) && !('change_set_id' in (value as Record))) || ((value as Record)['changeSetId'] === undefined && (value as Record)['change_set_id'] === undefined)) return false; + if (!('data' in value) || value['data'] === undefined) return false; + if ((!('driveId' in (value as Record)) && !('drive_id' in (value as Record))) || ((value as Record)['driveId'] === undefined && (value as Record)['drive_id'] === undefined)) return false; + if (!('id' in value) || value['id'] === undefined) return false; + if ((!('occurredAt' in (value as Record)) && !('occurred_at' in (value as Record))) || ((value as Record)['occurredAt'] === undefined && (value as Record)['occurred_at'] === undefined)) return false; + if ((!('previousRevision' in (value as Record)) && !('previous_revision' in (value as Record))) || ((value as Record)['previousRevision'] === undefined && (value as Record)['previous_revision'] === undefined)) return false; + if (!('resource' in value) || value['resource'] === undefined) return false; + if (!('revision' in value) || value['revision'] === undefined) return false; + if (!('type' in value) || value['type'] === undefined) return false; + return true; +} + +export function ChangeOutFromJSON(json: any): ChangeOut { + return ChangeOutFromJSONTyped(json, false); +} + +export function ChangeOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChangeOut { + if (json == null) { + return json; + } + return { + + 'actor': ChangeActorOutFromJSON(json['actor']), + 'changeSetId': json['change_set_id'], + 'data': json['data'], + 'driveId': json['drive_id'], + 'id': json['id'], + 'occurredAt': (new Date(json['occurred_at'])), + 'previousRevision': json['previous_revision'], + 'resource': ChangeResourceOutFromJSON(json['resource']), + 'revision': json['revision'], + 'type': json['type'], + }; +} + +export function ChangeOutToJSON(json: any): ChangeOut { + return ChangeOutToJSONTyped(json, false); +} + +export function ChangeOutToJSONTyped(value?: ChangeOut | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'actor': ChangeActorOutToJSON(value['actor']), + 'change_set_id': value['changeSetId'], + 'data': value['data'], + 'drive_id': value['driveId'], + 'id': value['id'], + 'occurred_at': value['occurredAt'].toISOString(), + 'previous_revision': value['previousRevision'], + 'resource': ChangeResourceOutToJSON(value['resource']), + 'revision': value['revision'], + 'type': value['type'], + }; +} diff --git a/sdk/typescript/src/models/ChangePageOut.ts b/sdk/typescript/src/models/ChangePageOut.ts new file mode 100644 index 0000000..2304512 --- /dev/null +++ b/sdk/typescript/src/models/ChangePageOut.ts @@ -0,0 +1,91 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ChangeOut } from './ChangeOut'; +import { + ChangeOutFromJSON, + ChangeOutFromJSONTyped, + ChangeOutToJSON, + ChangeOutToJSONTyped, +} from './ChangeOut'; + +/** + * + * @export + * @interface ChangePageOut + */ +export interface ChangePageOut { + /** + * + * @type {boolean} + * @memberof ChangePageOut + */ + hasMore: boolean; + /** + * + * @type {Array} + * @memberof ChangePageOut + */ + items: Array; + /** + * + * @type {string} + * @memberof ChangePageOut + */ + nextCursor: string; +} + +/** + * Check if a given object implements the ChangePageOut interface. + */ +export function instanceOfChangePageOut(value: object): value is ChangePageOut { + if ((!('hasMore' in (value as Record)) && !('has_more' in (value as Record))) || ((value as Record)['hasMore'] === undefined && (value as Record)['has_more'] === undefined)) return false; + if (!('items' in value) || value['items'] === undefined) return false; + if ((!('nextCursor' in (value as Record)) && !('next_cursor' in (value as Record))) || ((value as Record)['nextCursor'] === undefined && (value as Record)['next_cursor'] === undefined)) return false; + return true; +} + +export function ChangePageOutFromJSON(json: any): ChangePageOut { + return ChangePageOutFromJSONTyped(json, false); +} + +export function ChangePageOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChangePageOut { + if (json == null) { + return json; + } + return { + + 'hasMore': json['has_more'], + 'items': ((json['items'] as Array).map(ChangeOutFromJSON)), + 'nextCursor': json['next_cursor'], + }; +} + +export function ChangePageOutToJSON(json: any): ChangePageOut { + return ChangePageOutToJSONTyped(json, false); +} + +export function ChangePageOutToJSONTyped(value?: ChangePageOut | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'has_more': value['hasMore'], + 'items': ((value['items'] as Array).map(ChangeOutToJSON)), + 'next_cursor': value['nextCursor'], + }; +} diff --git a/sdk/typescript/src/models/ChangeResourceOut.ts b/sdk/typescript/src/models/ChangeResourceOut.ts new file mode 100644 index 0000000..7631932 --- /dev/null +++ b/sdk/typescript/src/models/ChangeResourceOut.ts @@ -0,0 +1,86 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ChangeResourceOut + */ +export interface ChangeResourceOut { + /** + * + * @type {string} + * @memberof ChangeResourceOut + */ + id: string; + /** + * + * @type {ChangeResourceOutTypeEnum} + * @memberof ChangeResourceOut + */ + type: ChangeResourceOutTypeEnum; +} + + +/** + * @export + */ +export const ChangeResourceOutTypeEnum = { + Drive: 'drive', + Folder: 'folder', + Artifact: 'artifact' +} as const; +export type ChangeResourceOutTypeEnum = typeof ChangeResourceOutTypeEnum[keyof typeof ChangeResourceOutTypeEnum]; + + +/** + * Check if a given object implements the ChangeResourceOut interface. + */ +export function instanceOfChangeResourceOut(value: object): value is ChangeResourceOut { + if (!('id' in value) || value['id'] === undefined) return false; + if (!('type' in value) || value['type'] === undefined) return false; + return true; +} + +export function ChangeResourceOutFromJSON(json: any): ChangeResourceOut { + return ChangeResourceOutFromJSONTyped(json, false); +} + +export function ChangeResourceOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): ChangeResourceOut { + if (json == null) { + return json; + } + return { + + 'id': json['id'], + 'type': json['type'], + }; +} + +export function ChangeResourceOutToJSON(json: any): ChangeResourceOut { + return ChangeResourceOutToJSONTyped(json, false); +} + +export function ChangeResourceOutToJSONTyped(value?: ChangeResourceOut | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'id': value['id'], + 'type': value['type'], + }; +} diff --git a/sdk/typescript/src/models/ClaimInitRequest.ts b/sdk/typescript/src/models/ClaimInitRequest.ts deleted file mode 100644 index 123f8db..0000000 --- a/sdk/typescript/src/models/ClaimInitRequest.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * `POST /agent/identity/claim` body. - * @export - * @interface ClaimInitRequest - */ -export interface ClaimInitRequest { - /** - * The per-identity claim_token returned by POST /agent/identity. - * @type {string} - * @memberof ClaimInitRequest - */ - claimToken: string; - /** - * Optional hint to display on the /claim page so the human knows which account the agent expected. Not enforced (design §14 question #3). - * @type {string} - * @memberof ClaimInitRequest - */ - email?: string | null; -} - -/** - * Check if a given object implements the ClaimInitRequest interface. - */ -export function instanceOfClaimInitRequest(value: object): value is ClaimInitRequest { - if ((!('claimToken' in (value as Record)) && !('claim_token' in (value as Record))) || ((value as Record)['claimToken'] === undefined && (value as Record)['claim_token'] === undefined)) return false; - return true; -} - -export function ClaimInitRequestFromJSON(json: any): ClaimInitRequest { - return ClaimInitRequestFromJSONTyped(json, false); -} - -export function ClaimInitRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClaimInitRequest { - if (json == null) { - return json; - } - return { - - 'claimToken': json['claim_token'], - 'email': json['email'] === undefined ? undefined : json['email'] === null ? null : json['email'], - }; -} - -export function ClaimInitRequestToJSON(json: any): ClaimInitRequest { - return ClaimInitRequestToJSONTyped(json, false); -} - -export function ClaimInitRequestToJSONTyped(value?: ClaimInitRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'claim_token': value['claimToken'], - 'email': value['email'], - }; -} diff --git a/sdk/typescript/src/models/ClaimInitResponse.ts b/sdk/typescript/src/models/ClaimInitResponse.ts deleted file mode 100644 index 6a76163..0000000 --- a/sdk/typescript/src/models/ClaimInitResponse.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface ClaimInitResponse - */ -export interface ClaimInitResponse { - /** - * Per-attempt opaque token; the agent does not need to present it. - * @type {string} - * @memberof ClaimInitResponse - */ - claimAttemptToken: string; - /** - * - * @type {Date} - * @memberof ClaimInitResponse - */ - expiresAt: Date; - /** - * Human-readable code the user types/sees on /claim. - * @type {string} - * @memberof ClaimInitResponse - */ - userCode: string; - /** - * URL to direct the human to. - * @type {string} - * @memberof ClaimInitResponse - */ - verificationUri: string; - /** - * Convenience: same as `verification_uri` but with the user_code pre-baked so the human doesn't have to type it. RFC 8628 idiom. - * @type {string} - * @memberof ClaimInitResponse - */ - verificationUriComplete: string; -} - -/** - * Check if a given object implements the ClaimInitResponse interface. - */ -export function instanceOfClaimInitResponse(value: object): value is ClaimInitResponse { - if ((!('claimAttemptToken' in (value as Record)) && !('claim_attempt_token' in (value as Record))) || ((value as Record)['claimAttemptToken'] === undefined && (value as Record)['claim_attempt_token'] === undefined)) return false; - if ((!('expiresAt' in (value as Record)) && !('expires_at' in (value as Record))) || ((value as Record)['expiresAt'] === undefined && (value as Record)['expires_at'] === undefined)) return false; - if ((!('userCode' in (value as Record)) && !('user_code' in (value as Record))) || ((value as Record)['userCode'] === undefined && (value as Record)['user_code'] === undefined)) return false; - if ((!('verificationUri' in (value as Record)) && !('verification_uri' in (value as Record))) || ((value as Record)['verificationUri'] === undefined && (value as Record)['verification_uri'] === undefined)) return false; - if ((!('verificationUriComplete' in (value as Record)) && !('verification_uri_complete' in (value as Record))) || ((value as Record)['verificationUriComplete'] === undefined && (value as Record)['verification_uri_complete'] === undefined)) return false; - return true; -} - -export function ClaimInitResponseFromJSON(json: any): ClaimInitResponse { - return ClaimInitResponseFromJSONTyped(json, false); -} - -export function ClaimInitResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClaimInitResponse { - if (json == null) { - return json; - } - return { - - 'claimAttemptToken': json['claim_attempt_token'], - 'expiresAt': (new Date(json['expires_at'])), - 'userCode': json['user_code'], - 'verificationUri': json['verification_uri'], - 'verificationUriComplete': json['verification_uri_complete'], - }; -} - -export function ClaimInitResponseToJSON(json: any): ClaimInitResponse { - return ClaimInitResponseToJSONTyped(json, false); -} - -export function ClaimInitResponseToJSONTyped(value?: ClaimInitResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'claim_attempt_token': value['claimAttemptToken'], - 'expires_at': value['expiresAt'].toISOString(), - 'user_code': value['userCode'], - 'verification_uri': value['verificationUri'], - 'verification_uri_complete': value['verificationUriComplete'], - }; -} diff --git a/sdk/typescript/src/models/ClaimMetadata.ts b/sdk/typescript/src/models/ClaimMetadata.ts deleted file mode 100644 index 20c7ce8..0000000 --- a/sdk/typescript/src/models/ClaimMetadata.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Hints the agent's UI/CLI can use when initiating the claim - * ceremony. Decoupled from the `claim_token` itself so future - * additions don't change the token's shape. - * @export - * @interface ClaimMetadata - */ -export interface ClaimMetadata { - /** - * - * @type {string} - * @memberof ClaimMetadata - */ - claimEndpoint: string; - /** - * - * @type {boolean} - * @memberof ClaimMetadata - */ - supportedEmailHints?: boolean; -} - -/** - * Check if a given object implements the ClaimMetadata interface. - */ -export function instanceOfClaimMetadata(value: object): value is ClaimMetadata { - if ((!('claimEndpoint' in (value as Record)) && !('claim_endpoint' in (value as Record))) || ((value as Record)['claimEndpoint'] === undefined && (value as Record)['claim_endpoint'] === undefined)) return false; - return true; -} - -export function ClaimMetadataFromJSON(json: any): ClaimMetadata { - return ClaimMetadataFromJSONTyped(json, false); -} - -export function ClaimMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClaimMetadata { - if (json == null) { - return json; - } - return { - - 'claimEndpoint': json['claim_endpoint'], - 'supportedEmailHints': json['supported_email_hints'] == null ? undefined : json['supported_email_hints'], - }; -} - -export function ClaimMetadataToJSON(json: any): ClaimMetadata { - return ClaimMetadataToJSONTyped(json, false); -} - -export function ClaimMetadataToJSONTyped(value?: ClaimMetadata | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'claim_endpoint': value['claimEndpoint'], - 'supported_email_hints': value['supportedEmailHints'], - }; -} diff --git a/sdk/typescript/src/models/ClientRegistrationOut.ts b/sdk/typescript/src/models/ClientRegistrationOut.ts deleted file mode 100644 index 4200eaa..0000000 --- a/sdk/typescript/src/models/ClientRegistrationOut.ts +++ /dev/null @@ -1,131 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface ClientRegistrationOut - */ -export interface ClientRegistrationOut { - [key: string]: any | any; - /** - * - * @type {string} - * @memberof ClientRegistrationOut - */ - clientId: string; - /** - * - * @type {number} - * @memberof ClientRegistrationOut - */ - clientIdIssuedAt: number; - /** - * - * @type {string} - * @memberof ClientRegistrationOut - */ - clientName: string; - /** - * - * @type {Array} - * @memberof ClientRegistrationOut - */ - grantTypes: Array; - /** - * - * @type {Array} - * @memberof ClientRegistrationOut - */ - redirectUris: Array; - /** - * - * @type {Array} - * @memberof ClientRegistrationOut - */ - responseTypes: Array; - /** - * - * @type {string} - * @memberof ClientRegistrationOut - */ - scope: string; - /** - * - * @type {string} - * @memberof ClientRegistrationOut - */ - tokenEndpointAuthMethod: string; -} - -/** - * Check if a given object implements the ClientRegistrationOut interface. - */ -export function instanceOfClientRegistrationOut(value: object): value is ClientRegistrationOut { - if ((!('clientId' in (value as Record)) && !('client_id' in (value as Record))) || ((value as Record)['clientId'] === undefined && (value as Record)['client_id'] === undefined)) return false; - if ((!('clientIdIssuedAt' in (value as Record)) && !('client_id_issued_at' in (value as Record))) || ((value as Record)['clientIdIssuedAt'] === undefined && (value as Record)['client_id_issued_at'] === undefined)) return false; - if ((!('clientName' in (value as Record)) && !('client_name' in (value as Record))) || ((value as Record)['clientName'] === undefined && (value as Record)['client_name'] === undefined)) return false; - if ((!('grantTypes' in (value as Record)) && !('grant_types' in (value as Record))) || ((value as Record)['grantTypes'] === undefined && (value as Record)['grant_types'] === undefined)) return false; - if ((!('redirectUris' in (value as Record)) && !('redirect_uris' in (value as Record))) || ((value as Record)['redirectUris'] === undefined && (value as Record)['redirect_uris'] === undefined)) return false; - if ((!('responseTypes' in (value as Record)) && !('response_types' in (value as Record))) || ((value as Record)['responseTypes'] === undefined && (value as Record)['response_types'] === undefined)) return false; - if (!('scope' in value) || value['scope'] === undefined) return false; - if ((!('tokenEndpointAuthMethod' in (value as Record)) && !('token_endpoint_auth_method' in (value as Record))) || ((value as Record)['tokenEndpointAuthMethod'] === undefined && (value as Record)['token_endpoint_auth_method'] === undefined)) return false; - return true; -} - -export function ClientRegistrationOutFromJSON(json: any): ClientRegistrationOut { - return ClientRegistrationOutFromJSONTyped(json, false); -} - -export function ClientRegistrationOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): ClientRegistrationOut { - if (json == null) { - return json; - } - return { - - ...json, - 'clientId': json['client_id'], - 'clientIdIssuedAt': json['client_id_issued_at'], - 'clientName': json['client_name'], - 'grantTypes': json['grant_types'], - 'redirectUris': json['redirect_uris'], - 'responseTypes': json['response_types'], - 'scope': json['scope'], - 'tokenEndpointAuthMethod': json['token_endpoint_auth_method'], - }; -} - -export function ClientRegistrationOutToJSON(json: any): ClientRegistrationOut { - return ClientRegistrationOutToJSONTyped(json, false); -} - -export function ClientRegistrationOutToJSONTyped(value?: ClientRegistrationOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - ...value, - 'client_id': value['clientId'], - 'client_id_issued_at': value['clientIdIssuedAt'], - 'client_name': value['clientName'], - 'grant_types': value['grantTypes'], - 'redirect_uris': value['redirectUris'], - 'response_types': value['responseTypes'], - 'scope': value['scope'], - 'token_endpoint_auth_method': value['tokenEndpointAuthMethod'], - }; -} diff --git a/sdk/typescript/src/models/CompileDiagnosticOut.ts b/sdk/typescript/src/models/CompileDiagnosticOut.ts deleted file mode 100644 index 3e65389..0000000 --- a/sdk/typescript/src/models/CompileDiagnosticOut.ts +++ /dev/null @@ -1,109 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface CompileDiagnosticOut - */ -export interface CompileDiagnosticOut { - [key: string]: any | any; - /** - * - * @type {string} - * @memberof CompileDiagnosticOut - */ - category?: string | null; - /** - * - * @type {string} - * @memberof CompileDiagnosticOut - */ - file?: string | null; - /** - * - * @type {number} - * @memberof CompileDiagnosticOut - */ - line?: number | null; - /** - * - * @type {string} - * @memberof CompileDiagnosticOut - */ - message: string; - /** - * - * @type {string} - * @memberof CompileDiagnosticOut - */ - severity: string; - /** - * - * @type {string} - * @memberof CompileDiagnosticOut - */ - suggestion?: string | null; -} - -/** - * Check if a given object implements the CompileDiagnosticOut interface. - */ -export function instanceOfCompileDiagnosticOut(value: object): value is CompileDiagnosticOut { - if (!('message' in value) || value['message'] === undefined) return false; - if (!('severity' in value) || value['severity'] === undefined) return false; - return true; -} - -export function CompileDiagnosticOutFromJSON(json: any): CompileDiagnosticOut { - return CompileDiagnosticOutFromJSONTyped(json, false); -} - -export function CompileDiagnosticOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): CompileDiagnosticOut { - if (json == null) { - return json; - } - return { - - ...json, - 'category': json['category'] === undefined ? undefined : json['category'] === null ? null : json['category'], - 'file': json['file'] === undefined ? undefined : json['file'] === null ? null : json['file'], - 'line': json['line'] === undefined ? undefined : json['line'] === null ? null : json['line'], - 'message': json['message'], - 'severity': json['severity'], - 'suggestion': json['suggestion'] === undefined ? undefined : json['suggestion'] === null ? null : json['suggestion'], - }; -} - -export function CompileDiagnosticOutToJSON(json: any): CompileDiagnosticOut { - return CompileDiagnosticOutToJSONTyped(json, false); -} - -export function CompileDiagnosticOutToJSONTyped(value?: CompileDiagnosticOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - ...value, - 'category': value['category'], - 'file': value['file'], - 'line': value['line'], - 'message': value['message'], - 'severity': value['severity'], - 'suggestion': value['suggestion'], - }; -} diff --git a/sdk/typescript/src/models/CompileJobIn.ts b/sdk/typescript/src/models/CompileJobIn.ts deleted file mode 100644 index 912890c..0000000 --- a/sdk/typescript/src/models/CompileJobIn.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { CompileOptions } from './CompileOptions'; -import { - CompileOptionsFromJSON, - CompileOptionsFromJSONTyped, - CompileOptionsToJSON, - CompileOptionsToJSONTyped, -} from './CompileOptions'; - -/** - * - * @export - * @interface CompileJobIn - */ -export interface CompileJobIn { - /** - * - * @type {CompileOptions} - * @memberof CompileJobIn - */ - options?: CompileOptions; - /** - * - * @type {string} - * @memberof CompileJobIn - */ - task?: string; -} - -/** - * Check if a given object implements the CompileJobIn interface. - */ -export function instanceOfCompileJobIn(value: object): value is CompileJobIn { - return true; -} - -export function CompileJobInFromJSON(json: any): CompileJobIn { - return CompileJobInFromJSONTyped(json, false); -} - -export function CompileJobInFromJSONTyped(json: any, ignoreDiscriminator: boolean): CompileJobIn { - if (json == null) { - return json; - } - return { - - 'options': json['options'] == null ? undefined : CompileOptionsFromJSON(json['options']), - 'task': json['task'] == null ? undefined : json['task'], - }; -} - -export function CompileJobInToJSON(json: any): CompileJobIn { - return CompileJobInToJSONTyped(json, false); -} - -export function CompileJobInToJSONTyped(value?: CompileJobIn | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'options': CompileOptionsToJSON(value['options']), - 'task': value['task'], - }; -} diff --git a/sdk/typescript/src/models/CompileJobListOut.ts b/sdk/typescript/src/models/CompileJobListOut.ts deleted file mode 100644 index ef28942..0000000 --- a/sdk/typescript/src/models/CompileJobListOut.ts +++ /dev/null @@ -1,91 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { CompileJobOut } from './CompileJobOut'; -import { - CompileJobOutFromJSON, - CompileJobOutFromJSONTyped, - CompileJobOutToJSON, - CompileJobOutToJSONTyped, -} from './CompileJobOut'; - -/** - * - * @export - * @interface CompileJobListOut - */ -export interface CompileJobListOut { - /** - * - * @type {Array} - * @memberof CompileJobListOut - */ - items: Array; - /** - * Deprecated same-value alias for `items`; retained for compatibility. - * @type {Array} - * @memberof CompileJobListOut - * @deprecated - */ - jobs: Array; - /** - * Opaque continuation token, or null when the listing is complete. - * @type {string} - * @memberof CompileJobListOut - */ - nextCursor?: string | null; -} - -/** - * Check if a given object implements the CompileJobListOut interface. - */ -export function instanceOfCompileJobListOut(value: object): value is CompileJobListOut { - if (!('items' in value) || value['items'] === undefined) return false; - if (!('jobs' in value) || value['jobs'] === undefined) return false; - return true; -} - -export function CompileJobListOutFromJSON(json: any): CompileJobListOut { - return CompileJobListOutFromJSONTyped(json, false); -} - -export function CompileJobListOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): CompileJobListOut { - if (json == null) { - return json; - } - return { - - 'items': ((json['items'] as Array).map(CompileJobOutFromJSON)), - 'jobs': ((json['jobs'] as Array).map(CompileJobOutFromJSON)), - 'nextCursor': json['next_cursor'] === undefined ? undefined : json['next_cursor'] === null ? null : json['next_cursor'], - }; -} - -export function CompileJobListOutToJSON(json: any): CompileJobListOut { - return CompileJobListOutToJSONTyped(json, false); -} - -export function CompileJobListOutToJSONTyped(value?: CompileJobListOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'items': ((value['items'] as Array).map(CompileJobOutToJSON)), - 'jobs': ((value['jobs'] as Array).map(CompileJobOutToJSON)), - 'next_cursor': value['nextCursor'], - }; -} diff --git a/sdk/typescript/src/models/CompileJobOut.ts b/sdk/typescript/src/models/CompileJobOut.ts deleted file mode 100644 index effa323..0000000 --- a/sdk/typescript/src/models/CompileJobOut.ts +++ /dev/null @@ -1,144 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { CompileDiagnosticOut } from './CompileDiagnosticOut'; -import { - CompileDiagnosticOutFromJSON, - CompileDiagnosticOutFromJSONTyped, - CompileDiagnosticOutToJSON, - CompileDiagnosticOutToJSONTyped, -} from './CompileDiagnosticOut'; - -/** - * - * @export - * @interface CompileJobOut - */ -export interface CompileJobOut { - [key: string]: any | any; - /** - * - * @type {boolean} - * @memberof CompileJobOut - */ - cacheHit: boolean; - /** - * - * @type {Array} - * @memberof CompileJobOut - */ - diagnostics?: Array; - /** - * - * @type {number} - * @memberof CompileJobOut - */ - durationMs?: number | null; - /** - * - * @type {string} - * @memberof CompileJobOut - */ - engine: string; - /** - * - * @type {string} - * @memberof CompileJobOut - */ - jobId: string; - /** - * - * @type {string} - * @memberof CompileJobOut - */ - logsUrl?: string | null; - /** - * - * @type {{ [key: string]: any; }} - * @memberof CompileJobOut - */ - output?: { [key: string]: any; } | null; - /** - * - * @type {string} - * @memberof CompileJobOut - */ - status: string; - /** - * - * @type {string} - * @memberof CompileJobOut - */ - task: string; -} - -/** - * Check if a given object implements the CompileJobOut interface. - */ -export function instanceOfCompileJobOut(value: object): value is CompileJobOut { - if ((!('cacheHit' in (value as Record)) && !('cache_hit' in (value as Record))) || ((value as Record)['cacheHit'] === undefined && (value as Record)['cache_hit'] === undefined)) return false; - if (!('engine' in value) || value['engine'] === undefined) return false; - if ((!('jobId' in (value as Record)) && !('job_id' in (value as Record))) || ((value as Record)['jobId'] === undefined && (value as Record)['job_id'] === undefined)) return false; - if (!('status' in value) || value['status'] === undefined) return false; - if (!('task' in value) || value['task'] === undefined) return false; - return true; -} - -export function CompileJobOutFromJSON(json: any): CompileJobOut { - return CompileJobOutFromJSONTyped(json, false); -} - -export function CompileJobOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): CompileJobOut { - if (json == null) { - return json; - } - return { - - ...json, - 'cacheHit': json['cache_hit'], - 'diagnostics': json['diagnostics'] == null ? undefined : ((json['diagnostics'] as Array).map(CompileDiagnosticOutFromJSON)), - 'durationMs': json['duration_ms'] === undefined ? undefined : json['duration_ms'] === null ? null : json['duration_ms'], - 'engine': json['engine'], - 'jobId': json['job_id'], - 'logsUrl': json['logs_url'] === undefined ? undefined : json['logs_url'] === null ? null : json['logs_url'], - 'output': json['output'] === undefined ? undefined : json['output'] === null ? null : json['output'], - 'status': json['status'], - 'task': json['task'], - }; -} - -export function CompileJobOutToJSON(json: any): CompileJobOut { - return CompileJobOutToJSONTyped(json, false); -} - -export function CompileJobOutToJSONTyped(value?: CompileJobOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - ...value, - 'cache_hit': value['cacheHit'], - 'diagnostics': value['diagnostics'] == null ? undefined : ((value['diagnostics'] as Array).map(CompileDiagnosticOutToJSON)), - 'duration_ms': value['durationMs'], - 'engine': value['engine'], - 'job_id': value['jobId'], - 'logs_url': value['logsUrl'], - 'output': value['output'], - 'status': value['status'], - 'task': value['task'], - }; -} diff --git a/sdk/typescript/src/models/CompileOptions.ts b/sdk/typescript/src/models/CompileOptions.ts deleted file mode 100644 index c2eeff8..0000000 --- a/sdk/typescript/src/models/CompileOptions.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface CompileOptions - */ -export interface CompileOptions { - /** - * - * @type {string} - * @memberof CompileOptions - */ - engine?: string | null; - /** - * - * @type {string} - * @memberof CompileOptions - */ - entrypoint?: string | null; - /** - * - * @type {boolean} - * @memberof CompileOptions - */ - wait?: boolean; -} - -/** - * Check if a given object implements the CompileOptions interface. - */ -export function instanceOfCompileOptions(value: object): value is CompileOptions { - return true; -} - -export function CompileOptionsFromJSON(json: any): CompileOptions { - return CompileOptionsFromJSONTyped(json, false); -} - -export function CompileOptionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): CompileOptions { - if (json == null) { - return json; - } - return { - - 'engine': json['engine'] === undefined ? undefined : json['engine'] === null ? null : json['engine'], - 'entrypoint': json['entrypoint'] === undefined ? undefined : json['entrypoint'] === null ? null : json['entrypoint'], - 'wait': json['wait'] == null ? undefined : json['wait'], - }; -} - -export function CompileOptionsToJSON(json: any): CompileOptions { - return CompileOptionsToJSONTyped(json, false); -} - -export function CompileOptionsToJSONTyped(value?: CompileOptions | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'engine': value['engine'], - 'entrypoint': value['entrypoint'], - 'wait': value['wait'], - }; -} diff --git a/sdk/typescript/src/models/CompileProjectOut.ts b/sdk/typescript/src/models/CompileProjectOut.ts deleted file mode 100644 index 03f8a67..0000000 --- a/sdk/typescript/src/models/CompileProjectOut.ts +++ /dev/null @@ -1,92 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface CompileProjectOut - */ -export interface CompileProjectOut { - /** - * - * @type {boolean} - * @memberof CompileProjectOut - */ - autoCompile: boolean; - /** - * - * @type {string} - * @memberof CompileProjectOut - */ - engine: string; - /** - * - * @type {string} - * @memberof CompileProjectOut - */ - entrypoint: string; - /** - * - * @type {string} - * @memberof CompileProjectOut - */ - fldId: string; -} - -/** - * Check if a given object implements the CompileProjectOut interface. - */ -export function instanceOfCompileProjectOut(value: object): value is CompileProjectOut { - if ((!('autoCompile' in (value as Record)) && !('auto_compile' in (value as Record))) || ((value as Record)['autoCompile'] === undefined && (value as Record)['auto_compile'] === undefined)) return false; - if (!('engine' in value) || value['engine'] === undefined) return false; - if (!('entrypoint' in value) || value['entrypoint'] === undefined) return false; - if ((!('fldId' in (value as Record)) && !('fld_id' in (value as Record))) || ((value as Record)['fldId'] === undefined && (value as Record)['fld_id'] === undefined)) return false; - return true; -} - -export function CompileProjectOutFromJSON(json: any): CompileProjectOut { - return CompileProjectOutFromJSONTyped(json, false); -} - -export function CompileProjectOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): CompileProjectOut { - if (json == null) { - return json; - } - return { - - 'autoCompile': json['auto_compile'], - 'engine': json['engine'], - 'entrypoint': json['entrypoint'], - 'fldId': json['fld_id'], - }; -} - -export function CompileProjectOutToJSON(json: any): CompileProjectOut { - return CompileProjectOutToJSONTyped(json, false); -} - -export function CompileProjectOutToJSONTyped(value?: CompileProjectOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'auto_compile': value['autoCompile'], - 'engine': value['engine'], - 'entrypoint': value['entrypoint'], - 'fld_id': value['fldId'], - }; -} diff --git a/sdk/typescript/src/models/CopyIn.ts b/sdk/typescript/src/models/CopyIn.ts deleted file mode 100644 index d943bcc..0000000 --- a/sdk/typescript/src/models/CopyIn.ts +++ /dev/null @@ -1,89 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { ArtifactSource } from './ArtifactSource'; -import { - ArtifactSourceFromJSON, - ArtifactSourceFromJSONTyped, - ArtifactSourceToJSON, - ArtifactSourceToJSONTyped, -} from './ArtifactSource'; - -/** - * POST /v0/artifacts/{art_id}/copy body — duplicate to new path. - * @export - * @interface CopyIn - */ -export interface CopyIn { - /** - * - * @type {number} - * @memberof CopyIn - */ - fromGeneration?: number | null; - /** - * - * @type {string} - * @memberof CopyIn - */ - path: string; - /** - * - * @type {ArtifactSource} - * @memberof CopyIn - */ - source?: ArtifactSource | null; -} - -/** - * Check if a given object implements the CopyIn interface. - */ -export function instanceOfCopyIn(value: object): value is CopyIn { - if (!('path' in value) || value['path'] === undefined) return false; - return true; -} - -export function CopyInFromJSON(json: any): CopyIn { - return CopyInFromJSONTyped(json, false); -} - -export function CopyInFromJSONTyped(json: any, ignoreDiscriminator: boolean): CopyIn { - if (json == null) { - return json; - } - return { - - 'fromGeneration': json['from_generation'] === undefined ? undefined : json['from_generation'] === null ? null : json['from_generation'], - 'path': json['path'], - 'source': json['source'] === undefined ? undefined : json['source'] === null ? null : ArtifactSourceFromJSON(json['source']), - }; -} - -export function CopyInToJSON(json: any): CopyIn { - return CopyInToJSONTyped(json, false); -} - -export function CopyInToJSONTyped(value?: CopyIn | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'from_generation': value['fromGeneration'], - 'path': value['path'], - 'source': ArtifactSourceToJSON(value['source']), - }; -} diff --git a/sdk/typescript/src/models/DatasetDescriptionOut.ts b/sdk/typescript/src/models/DatasetDescriptionOut.ts deleted file mode 100644 index 623e2d5..0000000 --- a/sdk/typescript/src/models/DatasetDescriptionOut.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { QueryColumnOut } from './QueryColumnOut'; -import { - QueryColumnOutFromJSON, - QueryColumnOutFromJSONTyped, - QueryColumnOutToJSON, - QueryColumnOutToJSONTyped, -} from './QueryColumnOut'; - -/** - * - * @export - * @interface DatasetDescriptionOut - */ -export interface DatasetDescriptionOut { - /** - * - * @type {Array} - * @memberof DatasetDescriptionOut - */ - columns: Array; - /** - * - * @type {string} - * @memberof DatasetDescriptionOut - */ - dataset: string; -} - -/** - * Check if a given object implements the DatasetDescriptionOut interface. - */ -export function instanceOfDatasetDescriptionOut(value: object): value is DatasetDescriptionOut { - if (!('columns' in value) || value['columns'] === undefined) return false; - if (!('dataset' in value) || value['dataset'] === undefined) return false; - return true; -} - -export function DatasetDescriptionOutFromJSON(json: any): DatasetDescriptionOut { - return DatasetDescriptionOutFromJSONTyped(json, false); -} - -export function DatasetDescriptionOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): DatasetDescriptionOut { - if (json == null) { - return json; - } - return { - - 'columns': ((json['columns'] as Array).map(QueryColumnOutFromJSON)), - 'dataset': json['dataset'], - }; -} - -export function DatasetDescriptionOutToJSON(json: any): DatasetDescriptionOut { - return DatasetDescriptionOutToJSONTyped(json, false); -} - -export function DatasetDescriptionOutToJSONTyped(value?: DatasetDescriptionOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'columns': ((value['columns'] as Array).map(QueryColumnOutToJSON)), - 'dataset': value['dataset'], - }; -} diff --git a/sdk/typescript/src/models/DescribeIn.ts b/sdk/typescript/src/models/DescribeIn.ts deleted file mode 100644 index 2f4ced1..0000000 --- a/sdk/typescript/src/models/DescribeIn.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface DescribeIn - */ -export interface DescribeIn { - /** - * - * @type {string} - * @memberof DescribeIn - */ - dataset: string; -} - -/** - * Check if a given object implements the DescribeIn interface. - */ -export function instanceOfDescribeIn(value: object): value is DescribeIn { - if (!('dataset' in value) || value['dataset'] === undefined) return false; - return true; -} - -export function DescribeInFromJSON(json: any): DescribeIn { - return DescribeInFromJSONTyped(json, false); -} - -export function DescribeInFromJSONTyped(json: any, ignoreDiscriminator: boolean): DescribeIn { - if (json == null) { - return json; - } - return { - - 'dataset': json['dataset'], - }; -} - -export function DescribeInToJSON(json: any): DescribeIn { - return DescribeInToJSONTyped(json, false); -} - -export function DescribeInToJSONTyped(value?: DescribeIn | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'dataset': value['dataset'], - }; -} diff --git a/sdk/typescript/src/models/DownloadUrlOut.ts b/sdk/typescript/src/models/DownloadUrlOut.ts deleted file mode 100644 index b154768..0000000 --- a/sdk/typescript/src/models/DownloadUrlOut.ts +++ /dev/null @@ -1,115 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * A URL the caller can GET to fetch the artifact's bytes. - * - * `direct=True` ⇒ a short-lived signed GCS URL on `storage.googleapis.com` - * (client downloads straight from GCS; `expires_at` is set). `direct=False` - * ⇒ the proxy `/download` endpoint on the API host (no expiry) — returned for - * sub-threshold artifacts or when signing is unavailable. The URL is opaque: - * callers should not parse it. See large-download-design.md §5.1. - * @export - * @interface DownloadUrlOut - */ -export interface DownloadUrlOut { - /** - * - * @type {string} - * @memberof DownloadUrlOut - */ - contentType: string; - /** - * - * @type {boolean} - * @memberof DownloadUrlOut - */ - direct: boolean; - /** - * - * @type {string} - * @memberof DownloadUrlOut - */ - downloadUrl: string; - /** - * - * @type {Date} - * @memberof DownloadUrlOut - */ - expiresAt?: Date | null; - /** - * - * @type {string} - * @memberof DownloadUrlOut - */ - filename: string; - /** - * - * @type {number} - * @memberof DownloadUrlOut - */ - sizeBytes: number; -} - -/** - * Check if a given object implements the DownloadUrlOut interface. - */ -export function instanceOfDownloadUrlOut(value: object): value is DownloadUrlOut { - if ((!('contentType' in (value as Record)) && !('content_type' in (value as Record))) || ((value as Record)['contentType'] === undefined && (value as Record)['content_type'] === undefined)) return false; - if (!('direct' in value) || value['direct'] === undefined) return false; - if ((!('downloadUrl' in (value as Record)) && !('download_url' in (value as Record))) || ((value as Record)['downloadUrl'] === undefined && (value as Record)['download_url'] === undefined)) return false; - if (!('filename' in value) || value['filename'] === undefined) return false; - if ((!('sizeBytes' in (value as Record)) && !('size_bytes' in (value as Record))) || ((value as Record)['sizeBytes'] === undefined && (value as Record)['size_bytes'] === undefined)) return false; - return true; -} - -export function DownloadUrlOutFromJSON(json: any): DownloadUrlOut { - return DownloadUrlOutFromJSONTyped(json, false); -} - -export function DownloadUrlOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): DownloadUrlOut { - if (json == null) { - return json; - } - return { - - 'contentType': json['content_type'], - 'direct': json['direct'], - 'downloadUrl': json['download_url'], - 'expiresAt': json['expires_at'] === undefined ? undefined : json['expires_at'] === null ? null : (new Date(json['expires_at'])), - 'filename': json['filename'], - 'sizeBytes': json['size_bytes'], - }; -} - -export function DownloadUrlOutToJSON(json: any): DownloadUrlOut { - return DownloadUrlOutToJSONTyped(json, false); -} - -export function DownloadUrlOutToJSONTyped(value?: DownloadUrlOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'content_type': value['contentType'], - 'direct': value['direct'], - 'download_url': value['downloadUrl'], - 'expires_at': value['expiresAt'] == null ? value['expiresAt'] : value['expiresAt'].toISOString(), - 'filename': value['filename'], - 'size_bytes': value['sizeBytes'], - }; -} diff --git a/sdk/typescript/src/models/DriveApiKeyCreateIn.ts b/sdk/typescript/src/models/DriveApiKeyCreateIn.ts deleted file mode 100644 index 137f338..0000000 --- a/sdk/typescript/src/models/DriveApiKeyCreateIn.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * `POST /v0/drives/{id}/keys` body — a required human label (a name for - * the key, e.g. the agent/integration it's for). - * @export - * @interface DriveApiKeyCreateIn - */ -export interface DriveApiKeyCreateIn { - /** - * - * @type {string} - * @memberof DriveApiKeyCreateIn - */ - label: string; -} - -/** - * Check if a given object implements the DriveApiKeyCreateIn interface. - */ -export function instanceOfDriveApiKeyCreateIn(value: object): value is DriveApiKeyCreateIn { - if (!('label' in value) || value['label'] === undefined) return false; - return true; -} - -export function DriveApiKeyCreateInFromJSON(json: any): DriveApiKeyCreateIn { - return DriveApiKeyCreateInFromJSONTyped(json, false); -} - -export function DriveApiKeyCreateInFromJSONTyped(json: any, ignoreDiscriminator: boolean): DriveApiKeyCreateIn { - if (json == null) { - return json; - } - return { - - 'label': json['label'], - }; -} - -export function DriveApiKeyCreateInToJSON(json: any): DriveApiKeyCreateIn { - return DriveApiKeyCreateInToJSONTyped(json, false); -} - -export function DriveApiKeyCreateInToJSONTyped(value?: DriveApiKeyCreateIn | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'label': value['label'], - }; -} diff --git a/sdk/typescript/src/models/DriveApiKeyCreateOut.ts b/sdk/typescript/src/models/DriveApiKeyCreateOut.ts deleted file mode 100644 index 8402c08..0000000 --- a/sdk/typescript/src/models/DriveApiKeyCreateOut.ts +++ /dev/null @@ -1,102 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * `POST /v0/drives/{id}/keys` response — the new key's metadata PLUS the - * raw `ad_live_` value, returned **once**. Store `api_key` now; only its hash - * is persisted. - * @export - * @interface DriveApiKeyCreateOut - */ -export interface DriveApiKeyCreateOut { - /** - * - * @type {string} - * @memberof DriveApiKeyCreateOut - */ - apiKey: string; - /** - * - * @type {Date} - * @memberof DriveApiKeyCreateOut - */ - createdAt: Date; - /** - * - * @type {string} - * @memberof DriveApiKeyCreateOut - */ - id: string; - /** - * - * @type {string} - * @memberof DriveApiKeyCreateOut - */ - label?: string | null; - /** - * - * @type {string} - * @memberof DriveApiKeyCreateOut - */ - prefix: string; -} - -/** - * Check if a given object implements the DriveApiKeyCreateOut interface. - */ -export function instanceOfDriveApiKeyCreateOut(value: object): value is DriveApiKeyCreateOut { - if ((!('apiKey' in (value as Record)) && !('api_key' in (value as Record))) || ((value as Record)['apiKey'] === undefined && (value as Record)['api_key'] === undefined)) return false; - if ((!('createdAt' in (value as Record)) && !('created_at' in (value as Record))) || ((value as Record)['createdAt'] === undefined && (value as Record)['created_at'] === undefined)) return false; - if (!('id' in value) || value['id'] === undefined) return false; - if (!('prefix' in value) || value['prefix'] === undefined) return false; - return true; -} - -export function DriveApiKeyCreateOutFromJSON(json: any): DriveApiKeyCreateOut { - return DriveApiKeyCreateOutFromJSONTyped(json, false); -} - -export function DriveApiKeyCreateOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): DriveApiKeyCreateOut { - if (json == null) { - return json; - } - return { - - 'apiKey': json['api_key'], - 'createdAt': (new Date(json['created_at'])), - 'id': json['id'], - 'label': json['label'] === undefined ? undefined : json['label'] === null ? null : json['label'], - 'prefix': json['prefix'], - }; -} - -export function DriveApiKeyCreateOutToJSON(json: any): DriveApiKeyCreateOut { - return DriveApiKeyCreateOutToJSONTyped(json, false); -} - -export function DriveApiKeyCreateOutToJSONTyped(value?: DriveApiKeyCreateOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'api_key': value['apiKey'], - 'created_at': value['createdAt'].toISOString(), - 'id': value['id'], - 'label': value['label'], - 'prefix': value['prefix'], - }; -} diff --git a/sdk/typescript/src/models/DriveApiKeyListOut.ts b/sdk/typescript/src/models/DriveApiKeyListOut.ts deleted file mode 100644 index 2f6849f..0000000 --- a/sdk/typescript/src/models/DriveApiKeyListOut.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { DriveApiKeyOut } from './DriveApiKeyOut'; -import { - DriveApiKeyOutFromJSON, - DriveApiKeyOutFromJSONTyped, - DriveApiKeyOutToJSON, - DriveApiKeyOutToJSONTyped, -} from './DriveApiKeyOut'; - -/** - * `GET /v0/drives/{id}/keys` response — the drive's keys, oldest first - * (keyset order, design §3), including recently-revoked rows (filter on - * `revoked_at` for live only). - * - * `items` is the canonical list field (B-3: one envelope key everywhere); - * `keys` is a deprecated same-value alias kept for one release — the REST - * twin of the grep `matches` / compile `jobs` aliases. - * @export - * @interface DriveApiKeyListOut - */ -export interface DriveApiKeyListOut { - /** - * - * @type {Array} - * @memberof DriveApiKeyListOut - */ - items: Array; - /** - * - * @type {Array} - * @memberof DriveApiKeyListOut - */ - keys: Array; - /** - * - * @type {string} - * @memberof DriveApiKeyListOut - */ - nextCursor?: string | null; -} - -/** - * Check if a given object implements the DriveApiKeyListOut interface. - */ -export function instanceOfDriveApiKeyListOut(value: object): value is DriveApiKeyListOut { - if (!('items' in value) || value['items'] === undefined) return false; - if (!('keys' in value) || value['keys'] === undefined) return false; - return true; -} - -export function DriveApiKeyListOutFromJSON(json: any): DriveApiKeyListOut { - return DriveApiKeyListOutFromJSONTyped(json, false); -} - -export function DriveApiKeyListOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): DriveApiKeyListOut { - if (json == null) { - return json; - } - return { - - 'items': ((json['items'] as Array).map(DriveApiKeyOutFromJSON)), - 'keys': ((json['keys'] as Array).map(DriveApiKeyOutFromJSON)), - 'nextCursor': json['next_cursor'] === undefined ? undefined : json['next_cursor'] === null ? null : json['next_cursor'], - }; -} - -export function DriveApiKeyListOutToJSON(json: any): DriveApiKeyListOut { - return DriveApiKeyListOutToJSONTyped(json, false); -} - -export function DriveApiKeyListOutToJSONTyped(value?: DriveApiKeyListOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'items': ((value['items'] as Array).map(DriveApiKeyOutToJSON)), - 'keys': ((value['keys'] as Array).map(DriveApiKeyOutToJSON)), - 'next_cursor': value['nextCursor'], - }; -} diff --git a/sdk/typescript/src/models/DriveApiKeyOut.ts b/sdk/typescript/src/models/DriveApiKeyOut.ts deleted file mode 100644 index 32171fa..0000000 --- a/sdk/typescript/src/models/DriveApiKeyOut.ts +++ /dev/null @@ -1,108 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * One per-drive `ad_live_` key — metadata only (never the raw key or hash). - * Item shape for `GET /v0/drives/{id}/keys`. - * @export - * @interface DriveApiKeyOut - */ -export interface DriveApiKeyOut { - /** - * - * @type {Date} - * @memberof DriveApiKeyOut - */ - createdAt: Date; - /** - * - * @type {string} - * @memberof DriveApiKeyOut - */ - id: string; - /** - * - * @type {string} - * @memberof DriveApiKeyOut - */ - label?: string | null; - /** - * - * @type {Date} - * @memberof DriveApiKeyOut - */ - lastUsedAt?: Date | null; - /** - * - * @type {string} - * @memberof DriveApiKeyOut - */ - prefix: string; - /** - * - * @type {Date} - * @memberof DriveApiKeyOut - */ - revokedAt?: Date | null; -} - -/** - * Check if a given object implements the DriveApiKeyOut interface. - */ -export function instanceOfDriveApiKeyOut(value: object): value is DriveApiKeyOut { - if ((!('createdAt' in (value as Record)) && !('created_at' in (value as Record))) || ((value as Record)['createdAt'] === undefined && (value as Record)['created_at'] === undefined)) return false; - if (!('id' in value) || value['id'] === undefined) return false; - if (!('prefix' in value) || value['prefix'] === undefined) return false; - return true; -} - -export function DriveApiKeyOutFromJSON(json: any): DriveApiKeyOut { - return DriveApiKeyOutFromJSONTyped(json, false); -} - -export function DriveApiKeyOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): DriveApiKeyOut { - if (json == null) { - return json; - } - return { - - 'createdAt': (new Date(json['created_at'])), - 'id': json['id'], - 'label': json['label'] === undefined ? undefined : json['label'] === null ? null : json['label'], - 'lastUsedAt': json['last_used_at'] === undefined ? undefined : json['last_used_at'] === null ? null : (new Date(json['last_used_at'])), - 'prefix': json['prefix'], - 'revokedAt': json['revoked_at'] === undefined ? undefined : json['revoked_at'] === null ? null : (new Date(json['revoked_at'])), - }; -} - -export function DriveApiKeyOutToJSON(json: any): DriveApiKeyOut { - return DriveApiKeyOutToJSONTyped(json, false); -} - -export function DriveApiKeyOutToJSONTyped(value?: DriveApiKeyOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'created_at': value['createdAt'].toISOString(), - 'id': value['id'], - 'label': value['label'], - 'last_used_at': value['lastUsedAt'] == null ? value['lastUsedAt'] : value['lastUsedAt'].toISOString(), - 'prefix': value['prefix'], - 'revoked_at': value['revokedAt'] == null ? value['revokedAt'] : value['revokedAt'].toISOString(), - }; -} diff --git a/sdk/typescript/src/models/DriveCreateIn.ts b/sdk/typescript/src/models/DriveCreateIn.ts index 8ced3c1..6f73d43 100644 --- a/sdk/typescript/src/models/DriveCreateIn.ts +++ b/sdk/typescript/src/models/DriveCreateIn.ts @@ -2,7 +2,7 @@ /* eslint-disable */ /** * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. * * The version of the OpenAPI document: * @@ -14,12 +14,17 @@ import { mapValues } from '../runtime'; /** - * POST /v0/drives body. `name` is the user-facing drive label; the - * creator becomes the owner. + * POST /v0/drives body. * @export * @interface DriveCreateIn */ export interface DriveCreateIn { + /** + * + * @type {{ [key: string]: any; }} + * @memberof DriveCreateIn + */ + metadata?: { [key: string]: any; }; /** * * @type {string} @@ -46,6 +51,7 @@ export function DriveCreateInFromJSONTyped(json: any, ignoreDiscriminator: boole } return { + 'metadata': json['metadata'] == null ? undefined : json['metadata'], 'name': json['name'], }; } @@ -61,6 +67,7 @@ export function DriveCreateInToJSONTyped(value?: DriveCreateIn | null, ignoreDis return { + 'metadata': value['metadata'], 'name': value['name'], }; } diff --git a/sdk/typescript/src/models/DriveCreateOut.ts b/sdk/typescript/src/models/DriveCreateOut.ts deleted file mode 100644 index 6416d87..0000000 --- a/sdk/typescript/src/models/DriveCreateOut.ts +++ /dev/null @@ -1,127 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * The create response — the ONLY place (besides key-rotate) a raw - * `ad_live_` key is returned, reveal-once. - * @export - * @interface DriveCreateOut - */ -export interface DriveCreateOut { - /** - * - * @type {string} - * @memberof DriveCreateOut - */ - apiKey: string; - /** - * - * @type {Date} - * @memberof DriveCreateOut - */ - createdAt: Date; - /** - * - * @type {string} - * @memberof DriveCreateOut - */ - id: string; - /** - * - * @type {string} - * @memberof DriveCreateOut - */ - name: string; - /** - * - * @type {string} - * @memberof DriveCreateOut - */ - organizationId: string; - /** - * - * @type {string} - * @memberof DriveCreateOut - */ - ownerEmail?: string | null; - /** - * - * @type {string} - * @memberof DriveCreateOut - */ - ownerUserId?: string | null; - /** - * - * @type {number} - * @memberof DriveCreateOut - */ - storageBytes: number; -} - -/** - * Check if a given object implements the DriveCreateOut interface. - */ -export function instanceOfDriveCreateOut(value: object): value is DriveCreateOut { - if ((!('apiKey' in (value as Record)) && !('api_key' in (value as Record))) || ((value as Record)['apiKey'] === undefined && (value as Record)['api_key'] === undefined)) return false; - if ((!('createdAt' in (value as Record)) && !('created_at' in (value as Record))) || ((value as Record)['createdAt'] === undefined && (value as Record)['created_at'] === undefined)) return false; - if (!('id' in value) || value['id'] === undefined) return false; - if (!('name' in value) || value['name'] === undefined) return false; - if ((!('organizationId' in (value as Record)) && !('organization_id' in (value as Record))) || ((value as Record)['organizationId'] === undefined && (value as Record)['organization_id'] === undefined)) return false; - if ((!('storageBytes' in (value as Record)) && !('storage_bytes' in (value as Record))) || ((value as Record)['storageBytes'] === undefined && (value as Record)['storage_bytes'] === undefined)) return false; - return true; -} - -export function DriveCreateOutFromJSON(json: any): DriveCreateOut { - return DriveCreateOutFromJSONTyped(json, false); -} - -export function DriveCreateOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): DriveCreateOut { - if (json == null) { - return json; - } - return { - - 'apiKey': json['api_key'], - 'createdAt': (new Date(json['created_at'])), - 'id': json['id'], - 'name': json['name'], - 'organizationId': json['organization_id'], - 'ownerEmail': json['owner_email'] === undefined ? undefined : json['owner_email'] === null ? null : json['owner_email'], - 'ownerUserId': json['owner_user_id'] === undefined ? undefined : json['owner_user_id'] === null ? null : json['owner_user_id'], - 'storageBytes': json['storage_bytes'], - }; -} - -export function DriveCreateOutToJSON(json: any): DriveCreateOut { - return DriveCreateOutToJSONTyped(json, false); -} - -export function DriveCreateOutToJSONTyped(value?: DriveCreateOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'api_key': value['apiKey'], - 'created_at': value['createdAt'].toISOString(), - 'id': value['id'], - 'name': value['name'], - 'organization_id': value['organizationId'], - 'owner_email': value['ownerEmail'], - 'owner_user_id': value['ownerUserId'], - 'storage_bytes': value['storageBytes'], - }; -} diff --git a/sdk/typescript/src/models/DriveDeleteOut.ts b/sdk/typescript/src/models/DriveDeleteOut.ts deleted file mode 100644 index 091a434..0000000 --- a/sdk/typescript/src/models/DriveDeleteOut.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * DELETE /v0/drives/{drive_id} response — the drive soft-delete receipt. - * Reversible until the GC cron hard-deletes at `purge_at`; `restore_url` - * points at the drive restore endpoint (deletion-design.md §5.2). - * @export - * @interface DriveDeleteOut - */ -export interface DriveDeleteOut { - /** - * - * @type {Date} - * @memberof DriveDeleteOut - */ - deletedAt: Date; - /** - * - * @type {string} - * @memberof DriveDeleteOut - */ - id: string; - /** - * - * @type {boolean} - * @memberof DriveDeleteOut - */ - ok?: boolean; - /** - * - * @type {Date} - * @memberof DriveDeleteOut - */ - purgeAt: Date; - /** - * - * @type {string} - * @memberof DriveDeleteOut - */ - restoreUrl?: string | null; -} - -/** - * Check if a given object implements the DriveDeleteOut interface. - */ -export function instanceOfDriveDeleteOut(value: object): value is DriveDeleteOut { - if ((!('deletedAt' in (value as Record)) && !('deleted_at' in (value as Record))) || ((value as Record)['deletedAt'] === undefined && (value as Record)['deleted_at'] === undefined)) return false; - if (!('id' in value) || value['id'] === undefined) return false; - if ((!('purgeAt' in (value as Record)) && !('purge_at' in (value as Record))) || ((value as Record)['purgeAt'] === undefined && (value as Record)['purge_at'] === undefined)) return false; - return true; -} - -export function DriveDeleteOutFromJSON(json: any): DriveDeleteOut { - return DriveDeleteOutFromJSONTyped(json, false); -} - -export function DriveDeleteOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): DriveDeleteOut { - if (json == null) { - return json; - } - return { - - 'deletedAt': (new Date(json['deleted_at'])), - 'id': json['id'], - 'ok': json['ok'] == null ? undefined : json['ok'], - 'purgeAt': (new Date(json['purge_at'])), - 'restoreUrl': json['restore_url'] === undefined ? undefined : json['restore_url'] === null ? null : json['restore_url'], - }; -} - -export function DriveDeleteOutToJSON(json: any): DriveDeleteOut { - return DriveDeleteOutToJSONTyped(json, false); -} - -export function DriveDeleteOutToJSONTyped(value?: DriveDeleteOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'deleted_at': value['deletedAt'].toISOString(), - 'id': value['id'], - 'ok': value['ok'], - 'purge_at': value['purgeAt'].toISOString(), - 'restore_url': value['restoreUrl'], - }; -} diff --git a/sdk/typescript/src/models/DriveList.ts b/sdk/typescript/src/models/DriveList.ts deleted file mode 100644 index e71c451..0000000 --- a/sdk/typescript/src/models/DriveList.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { DriveOut } from './DriveOut'; -import { - DriveOutFromJSON, - DriveOutFromJSONTyped, - DriveOutToJSON, - DriveOutToJSONTyped, -} from './DriveOut'; - -/** - * - * @export - * @interface DriveList - */ -export interface DriveList { - /** - * - * @type {Array} - * @memberof DriveList - */ - items: Array; - /** - * - * @type {string} - * @memberof DriveList - */ - nextCursor?: string | null; -} - -/** - * Check if a given object implements the DriveList interface. - */ -export function instanceOfDriveList(value: object): value is DriveList { - if (!('items' in value) || value['items'] === undefined) return false; - return true; -} - -export function DriveListFromJSON(json: any): DriveList { - return DriveListFromJSONTyped(json, false); -} - -export function DriveListFromJSONTyped(json: any, ignoreDiscriminator: boolean): DriveList { - if (json == null) { - return json; - } - return { - - 'items': ((json['items'] as Array).map(DriveOutFromJSON)), - 'nextCursor': json['next_cursor'] === undefined ? undefined : json['next_cursor'] === null ? null : json['next_cursor'], - }; -} - -export function DriveListToJSON(json: any): DriveList { - return DriveListToJSONTyped(json, false); -} - -export function DriveListToJSONTyped(value?: DriveList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'items': ((value['items'] as Array).map(DriveOutToJSON)), - 'next_cursor': value['nextCursor'], - }; -} diff --git a/sdk/typescript/src/models/DriveListOut.ts b/sdk/typescript/src/models/DriveListOut.ts new file mode 100644 index 0000000..3d3e1ca --- /dev/null +++ b/sdk/typescript/src/models/DriveListOut.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DriveOut } from './DriveOut'; +import { + DriveOutFromJSON, + DriveOutFromJSONTyped, + DriveOutToJSON, + DriveOutToJSONTyped, +} from './DriveOut'; + +/** + * + * @export + * @interface DriveListOut + */ +export interface DriveListOut { + /** + * + * @type {Array} + * @memberof DriveListOut + */ + items: Array; + /** + * + * @type {string} + * @memberof DriveListOut + */ + nextCursor: string | null; +} + +/** + * Check if a given object implements the DriveListOut interface. + */ +export function instanceOfDriveListOut(value: object): value is DriveListOut { + if (!('items' in value) || value['items'] === undefined) return false; + if ((!('nextCursor' in (value as Record)) && !('next_cursor' in (value as Record))) || ((value as Record)['nextCursor'] === undefined && (value as Record)['next_cursor'] === undefined)) return false; + return true; +} + +export function DriveListOutFromJSON(json: any): DriveListOut { + return DriveListOutFromJSONTyped(json, false); +} + +export function DriveListOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): DriveListOut { + if (json == null) { + return json; + } + return { + + 'items': ((json['items'] as Array).map(DriveOutFromJSON)), + 'nextCursor': json['next_cursor'], + }; +} + +export function DriveListOutToJSON(json: any): DriveListOut { + return DriveListOutToJSONTyped(json, false); +} + +export function DriveListOutToJSONTyped(value?: DriveListOut | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': ((value['items'] as Array).map(DriveOutToJSON)), + 'next_cursor': value['nextCursor'], + }; +} diff --git a/sdk/typescript/src/models/DriveOut.ts b/sdk/typescript/src/models/DriveOut.ts index 1104fd1..094ebcd 100644 --- a/sdk/typescript/src/models/DriveOut.ts +++ b/sdk/typescript/src/models/DriveOut.ts @@ -2,7 +2,7 @@ /* eslint-disable */ /** * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. * * The version of the OpenAPI document: * @@ -14,10 +14,7 @@ import { mapValues } from '../runtime'; /** - * One drive in a listing — metadata only (workspaces-design §4.2). - * Carries NO capability and NEVER a raw key. An admin's inventory and a - * member's owned list both serialize to this shape; `owner_email` is the - * only owner-identifying field surfaced. + * * @export * @interface DriveOut */ @@ -28,12 +25,30 @@ export interface DriveOut { * @memberof DriveOut */ createdAt: Date; + /** + * + * @type {string} + * @memberof DriveOut + */ + createdBy: string | null; + /** + * + * @type {Date} + * @memberof DriveOut + */ + deletedAt: Date | null; /** * * @type {string} * @memberof DriveOut */ id: string; + /** + * + * @type {{ [key: string]: any; }} + * @memberof DriveOut + */ + metadata: { [key: string]: any; }; /** * * @type {string} @@ -42,39 +57,76 @@ export interface DriveOut { name: string; /** * - * @type {string} + * @type {number} * @memberof DriveOut */ - organizationId: string; + retrievalBytes: number; /** * * @type {string} * @memberof DriveOut */ - ownerEmail?: string | null; + revision: string; /** * * @type {string} * @memberof DriveOut */ - ownerUserId?: string | null; + rootFolderId: string; + /** + * + * @type {DriveOutStateEnum} + * @memberof DriveOut + */ + state: DriveOutStateEnum; /** * * @type {number} * @memberof DriveOut */ storageBytes: number; + /** + * + * @type {Date} + * @memberof DriveOut + */ + updatedAt: Date; + /** + * + * @type {string} + * @memberof DriveOut + */ + workspaceId: string; } + +/** + * @export + */ +export const DriveOutStateEnum = { + Active: 'active', + Deleted: 'deleted' +} as const; +export type DriveOutStateEnum = typeof DriveOutStateEnum[keyof typeof DriveOutStateEnum]; + + /** * Check if a given object implements the DriveOut interface. */ export function instanceOfDriveOut(value: object): value is DriveOut { if ((!('createdAt' in (value as Record)) && !('created_at' in (value as Record))) || ((value as Record)['createdAt'] === undefined && (value as Record)['created_at'] === undefined)) return false; + if ((!('createdBy' in (value as Record)) && !('created_by' in (value as Record))) || ((value as Record)['createdBy'] === undefined && (value as Record)['created_by'] === undefined)) return false; + if ((!('deletedAt' in (value as Record)) && !('deleted_at' in (value as Record))) || ((value as Record)['deletedAt'] === undefined && (value as Record)['deleted_at'] === undefined)) return false; if (!('id' in value) || value['id'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; if (!('name' in value) || value['name'] === undefined) return false; - if ((!('organizationId' in (value as Record)) && !('organization_id' in (value as Record))) || ((value as Record)['organizationId'] === undefined && (value as Record)['organization_id'] === undefined)) return false; + if ((!('retrievalBytes' in (value as Record)) && !('retrieval_bytes' in (value as Record))) || ((value as Record)['retrievalBytes'] === undefined && (value as Record)['retrieval_bytes'] === undefined)) return false; + if (!('revision' in value) || value['revision'] === undefined) return false; + if ((!('rootFolderId' in (value as Record)) && !('root_folder_id' in (value as Record))) || ((value as Record)['rootFolderId'] === undefined && (value as Record)['root_folder_id'] === undefined)) return false; + if (!('state' in value) || value['state'] === undefined) return false; if ((!('storageBytes' in (value as Record)) && !('storage_bytes' in (value as Record))) || ((value as Record)['storageBytes'] === undefined && (value as Record)['storage_bytes'] === undefined)) return false; + if ((!('updatedAt' in (value as Record)) && !('updated_at' in (value as Record))) || ((value as Record)['updatedAt'] === undefined && (value as Record)['updated_at'] === undefined)) return false; + if ((!('workspaceId' in (value as Record)) && !('workspace_id' in (value as Record))) || ((value as Record)['workspaceId'] === undefined && (value as Record)['workspace_id'] === undefined)) return false; return true; } @@ -89,12 +141,18 @@ export function DriveOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): return { 'createdAt': (new Date(json['created_at'])), + 'createdBy': json['created_by'], + 'deletedAt': (json['deleted_at'] == null ? null : new Date(json['deleted_at'])), 'id': json['id'], + 'metadata': json['metadata'], 'name': json['name'], - 'organizationId': json['organization_id'], - 'ownerEmail': json['owner_email'] === undefined ? undefined : json['owner_email'] === null ? null : json['owner_email'], - 'ownerUserId': json['owner_user_id'] === undefined ? undefined : json['owner_user_id'] === null ? null : json['owner_user_id'], + 'retrievalBytes': json['retrieval_bytes'], + 'revision': json['revision'], + 'rootFolderId': json['root_folder_id'], + 'state': json['state'], 'storageBytes': json['storage_bytes'], + 'updatedAt': (new Date(json['updated_at'])), + 'workspaceId': json['workspace_id'], }; } @@ -110,11 +168,17 @@ export function DriveOutToJSONTyped(value?: DriveOut | null, ignoreDiscriminator return { 'created_at': value['createdAt'].toISOString(), + 'created_by': value['createdBy'], + 'deleted_at': value['deletedAt'] == null ? value['deletedAt'] : value['deletedAt'].toISOString(), 'id': value['id'], + 'metadata': value['metadata'], 'name': value['name'], - 'organization_id': value['organizationId'], - 'owner_email': value['ownerEmail'], - 'owner_user_id': value['ownerUserId'], + 'retrieval_bytes': value['retrievalBytes'], + 'revision': value['revision'], + 'root_folder_id': value['rootFolderId'], + 'state': value['state'], 'storage_bytes': value['storageBytes'], + 'updated_at': value['updatedAt'].toISOString(), + 'workspace_id': value['workspaceId'], }; } diff --git a/sdk/typescript/src/models/DriveReadOut.ts b/sdk/typescript/src/models/DriveReadOut.ts deleted file mode 100644 index 86cb3fd..0000000 --- a/sdk/typescript/src/models/DriveReadOut.ts +++ /dev/null @@ -1,127 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Drive singleton shape returned by both data-plane read routes. - * @export - * @interface DriveReadOut - */ -export interface DriveReadOut { - /** - * - * @type {Date} - * @memberof DriveReadOut - */ - createdAt: Date; - /** - * - * @type {string} - * @memberof DriveReadOut - */ - email?: string | null; - /** - * - * @type {string} - * @memberof DriveReadOut - */ - etag: string; - /** - * - * @type {string} - * @memberof DriveReadOut - */ - id: string; - /** - * - * @type {number} - * @memberof DriveReadOut - */ - metageneration: number; - /** - * - * @type {string} - * @memberof DriveReadOut - */ - organizationId: string; - /** - * - * @type {number} - * @memberof DriveReadOut - */ - storageBytes: number; - /** - * - * @type {number} - * @memberof DriveReadOut - */ - storageLimit: number; -} - -/** - * Check if a given object implements the DriveReadOut interface. - */ -export function instanceOfDriveReadOut(value: object): value is DriveReadOut { - if ((!('createdAt' in (value as Record)) && !('created_at' in (value as Record))) || ((value as Record)['createdAt'] === undefined && (value as Record)['created_at'] === undefined)) return false; - if (!('etag' in value) || value['etag'] === undefined) return false; - if (!('id' in value) || value['id'] === undefined) return false; - if (!('metageneration' in value) || value['metageneration'] === undefined) return false; - if ((!('organizationId' in (value as Record)) && !('organization_id' in (value as Record))) || ((value as Record)['organizationId'] === undefined && (value as Record)['organization_id'] === undefined)) return false; - if ((!('storageBytes' in (value as Record)) && !('storage_bytes' in (value as Record))) || ((value as Record)['storageBytes'] === undefined && (value as Record)['storage_bytes'] === undefined)) return false; - if ((!('storageLimit' in (value as Record)) && !('storage_limit' in (value as Record))) || ((value as Record)['storageLimit'] === undefined && (value as Record)['storage_limit'] === undefined)) return false; - return true; -} - -export function DriveReadOutFromJSON(json: any): DriveReadOut { - return DriveReadOutFromJSONTyped(json, false); -} - -export function DriveReadOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): DriveReadOut { - if (json == null) { - return json; - } - return { - - 'createdAt': (new Date(json['created_at'])), - 'email': json['email'] === undefined ? undefined : json['email'] === null ? null : json['email'], - 'etag': json['etag'], - 'id': json['id'], - 'metageneration': json['metageneration'], - 'organizationId': json['organization_id'], - 'storageBytes': json['storage_bytes'], - 'storageLimit': json['storage_limit'], - }; -} - -export function DriveReadOutToJSON(json: any): DriveReadOut { - return DriveReadOutToJSONTyped(json, false); -} - -export function DriveReadOutToJSONTyped(value?: DriveReadOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'created_at': value['createdAt'].toISOString(), - 'email': value['email'], - 'etag': value['etag'], - 'id': value['id'], - 'metageneration': value['metageneration'], - 'organization_id': value['organizationId'], - 'storage_bytes': value['storageBytes'], - 'storage_limit': value['storageLimit'], - }; -} diff --git a/sdk/typescript/src/models/DriveRenameIn.ts b/sdk/typescript/src/models/DriveRenameIn.ts deleted file mode 100644 index c0efa28..0000000 --- a/sdk/typescript/src/models/DriveRenameIn.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * PATCH /v0/drives/{id} body — rename a drive the caller owns. - * @export - * @interface DriveRenameIn - */ -export interface DriveRenameIn { - /** - * - * @type {string} - * @memberof DriveRenameIn - */ - name: string; -} - -/** - * Check if a given object implements the DriveRenameIn interface. - */ -export function instanceOfDriveRenameIn(value: object): value is DriveRenameIn { - if (!('name' in value) || value['name'] === undefined) return false; - return true; -} - -export function DriveRenameInFromJSON(json: any): DriveRenameIn { - return DriveRenameInFromJSONTyped(json, false); -} - -export function DriveRenameInFromJSONTyped(json: any, ignoreDiscriminator: boolean): DriveRenameIn { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - }; -} - -export function DriveRenameInToJSON(json: any): DriveRenameIn { - return DriveRenameInToJSONTyped(json, false); -} - -export function DriveRenameInToJSONTyped(value?: DriveRenameIn | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'name': value['name'], - }; -} diff --git a/sdk/typescript/src/models/DriveRestoreOut.ts b/sdk/typescript/src/models/DriveRestoreOut.ts deleted file mode 100644 index 1496f05..0000000 --- a/sdk/typescript/src/models/DriveRestoreOut.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface DriveRestoreOut - */ -export interface DriveRestoreOut { - /** - * - * @type {string} - * @memberof DriveRestoreOut - */ - id: string; - /** - * - * @type {number} - * @memberof DriveRestoreOut - */ - rebasedArtifactCount: number; - /** - * - * @type {Date} - * @memberof DriveRestoreOut - */ - restoredAt: Date; -} - -/** - * Check if a given object implements the DriveRestoreOut interface. - */ -export function instanceOfDriveRestoreOut(value: object): value is DriveRestoreOut { - if (!('id' in value) || value['id'] === undefined) return false; - if ((!('rebasedArtifactCount' in (value as Record)) && !('rebased_artifact_count' in (value as Record))) || ((value as Record)['rebasedArtifactCount'] === undefined && (value as Record)['rebased_artifact_count'] === undefined)) return false; - if ((!('restoredAt' in (value as Record)) && !('restored_at' in (value as Record))) || ((value as Record)['restoredAt'] === undefined && (value as Record)['restored_at'] === undefined)) return false; - return true; -} - -export function DriveRestoreOutFromJSON(json: any): DriveRestoreOut { - return DriveRestoreOutFromJSONTyped(json, false); -} - -export function DriveRestoreOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): DriveRestoreOut { - if (json == null) { - return json; - } - return { - - 'id': json['id'], - 'rebasedArtifactCount': json['rebased_artifact_count'], - 'restoredAt': (new Date(json['restored_at'])), - }; -} - -export function DriveRestoreOutToJSON(json: any): DriveRestoreOut { - return DriveRestoreOutToJSONTyped(json, false); -} - -export function DriveRestoreOutToJSONTyped(value?: DriveRestoreOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'id': value['id'], - 'rebased_artifact_count': value['rebasedArtifactCount'], - 'restored_at': value['restoredAt'].toISOString(), - }; -} diff --git a/sdk/typescript/src/models/DriveUpdateIn.ts b/sdk/typescript/src/models/DriveUpdateIn.ts new file mode 100644 index 0000000..6b65f27 --- /dev/null +++ b/sdk/typescript/src/models/DriveUpdateIn.ts @@ -0,0 +1,72 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * PATCH /v0/drives/{id} body — at least one field is required. + * @export + * @interface DriveUpdateIn + */ +export interface DriveUpdateIn { + /** + * + * @type {{ [key: string]: any; }} + * @memberof DriveUpdateIn + */ + metadata?: { [key: string]: any; } | null; + /** + * + * @type {string} + * @memberof DriveUpdateIn + */ + name?: string | null; +} + +/** + * Check if a given object implements the DriveUpdateIn interface. + */ +export function instanceOfDriveUpdateIn(value: object): value is DriveUpdateIn { + return true; +} + +export function DriveUpdateInFromJSON(json: any): DriveUpdateIn { + return DriveUpdateInFromJSONTyped(json, false); +} + +export function DriveUpdateInFromJSONTyped(json: any, ignoreDiscriminator: boolean): DriveUpdateIn { + if (json == null) { + return json; + } + return { + + 'metadata': json['metadata'] === undefined ? undefined : json['metadata'] === null ? null : json['metadata'], + 'name': json['name'] === undefined ? undefined : json['name'] === null ? null : json['name'], + }; +} + +export function DriveUpdateInToJSON(json: any): DriveUpdateIn { + return DriveUpdateInToJSONTyped(json, false); +} + +export function DriveUpdateInToJSONTyped(value?: DriveUpdateIn | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'metadata': value['metadata'], + 'name': value['name'], + }; +} diff --git a/sdk/typescript/src/models/DriveUsageOut.ts b/sdk/typescript/src/models/DriveUsageOut.ts index ef533a6..8e4db45 100644 --- a/sdk/typescript/src/models/DriveUsageOut.ts +++ b/sdk/typescript/src/models/DriveUsageOut.ts @@ -2,7 +2,7 @@ /* eslint-disable */ /** * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. * * The version of the OpenAPI document: * @@ -13,63 +13,6 @@ */ import { mapValues } from '../runtime'; -import type { StorageBreakdownOut } from './StorageBreakdownOut'; -import { - StorageBreakdownOutFromJSON, - StorageBreakdownOutFromJSONTyped, - StorageBreakdownOutToJSON, - StorageBreakdownOutToJSONTyped, -} from './StorageBreakdownOut'; -import type { UsageCounterOut } from './UsageCounterOut'; -import { - UsageCounterOutFromJSON, - UsageCounterOutFromJSONTyped, - UsageCounterOutToJSON, - UsageCounterOutToJSONTyped, -} from './UsageCounterOut'; -import type { OperationUsageOut } from './OperationUsageOut'; -import { - OperationUsageOutFromJSON, - OperationUsageOutFromJSONTyped, - OperationUsageOutToJSON, - OperationUsageOutToJSONTyped, -} from './OperationUsageOut'; -import type { TokenUsageOut } from './TokenUsageOut'; -import { - TokenUsageOutFromJSON, - TokenUsageOutFromJSONTyped, - TokenUsageOutToJSON, - TokenUsageOutToJSONTyped, -} from './TokenUsageOut'; -import type { UsagePeriodOut } from './UsagePeriodOut'; -import { - UsagePeriodOutFromJSON, - UsagePeriodOutFromJSONTyped, - UsagePeriodOutToJSON, - UsagePeriodOutToJSONTyped, -} from './UsagePeriodOut'; -import type { HourlyUsageCounterOut } from './HourlyUsageCounterOut'; -import { - HourlyUsageCounterOutFromJSON, - HourlyUsageCounterOutFromJSONTyped, - HourlyUsageCounterOutToJSON, - HourlyUsageCounterOutToJSONTyped, -} from './HourlyUsageCounterOut'; -import type { StorageFootprintOut } from './StorageFootprintOut'; -import { - StorageFootprintOutFromJSON, - StorageFootprintOutFromJSONTyped, - StorageFootprintOutToJSON, - StorageFootprintOutToJSONTyped, -} from './StorageFootprintOut'; -import type { VersionRetentionOut } from './VersionRetentionOut'; -import { - VersionRetentionOutFromJSON, - VersionRetentionOutFromJSONTyped, - VersionRetentionOutToJSON, - VersionRetentionOutToJSONTyped, -} from './VersionRetentionOut'; - /** * * @export @@ -78,100 +21,24 @@ import { export interface DriveUsageOut { /** * - * @type {StorageFootprintOut} - * @memberof DriveUsageOut - */ - accountFootprint: StorageFootprintOut; - /** - * - * @type {UsageCounterOut} - * @memberof DriveUsageOut - */ - egressBytes: UsageCounterOut; - /** - * - * @type {StorageFootprintOut} - * @memberof DriveUsageOut - */ - footprint: StorageFootprintOut; - /** - * - * @type {UsageCounterOut} - * @memberof DriveUsageOut - */ - indexedBytes: UsageCounterOut; - /** - * - * @type {UsageCounterOut} - * @memberof DriveUsageOut - */ - indexingOps: UsageCounterOut; - /** - * - * @type {OperationUsageOut} - * @memberof DriveUsageOut - */ - opsThisMonth: OperationUsageOut; - /** - * - * @type {UsagePeriodOut} - * @memberof DriveUsageOut - */ - period: UsagePeriodOut; - /** - * - * @type {UsageCounterOut} - * @memberof DriveUsageOut - */ - retrievalQueries: UsageCounterOut; - /** - * - * @type {UsageCounterOut} - * @memberof DriveUsageOut - */ - storage: UsageCounterOut; - /** - * - * @type {StorageBreakdownOut} - * @memberof DriveUsageOut - */ - storageBreakdown?: StorageBreakdownOut | null; - /** - * - * @type {TokenUsageOut} - * @memberof DriveUsageOut - */ - tokensThisMonth: TokenUsageOut; - /** - * - * @type {VersionRetentionOut} + * @type {number} * @memberof DriveUsageOut */ - versionRetention: VersionRetentionOut; + retrievalBytes: number; /** * - * @type {HourlyUsageCounterOut} + * @type {number} * @memberof DriveUsageOut */ - writesThisHour: HourlyUsageCounterOut; + storageBytes: number; } /** * Check if a given object implements the DriveUsageOut interface. */ export function instanceOfDriveUsageOut(value: object): value is DriveUsageOut { - if ((!('accountFootprint' in (value as Record)) && !('account_footprint' in (value as Record))) || ((value as Record)['accountFootprint'] === undefined && (value as Record)['account_footprint'] === undefined)) return false; - if ((!('egressBytes' in (value as Record)) && !('egress_bytes' in (value as Record))) || ((value as Record)['egressBytes'] === undefined && (value as Record)['egress_bytes'] === undefined)) return false; - if (!('footprint' in value) || value['footprint'] === undefined) return false; - if ((!('indexedBytes' in (value as Record)) && !('indexed_bytes' in (value as Record))) || ((value as Record)['indexedBytes'] === undefined && (value as Record)['indexed_bytes'] === undefined)) return false; - if ((!('indexingOps' in (value as Record)) && !('indexing_ops' in (value as Record))) || ((value as Record)['indexingOps'] === undefined && (value as Record)['indexing_ops'] === undefined)) return false; - if ((!('opsThisMonth' in (value as Record)) && !('ops_this_month' in (value as Record))) || ((value as Record)['opsThisMonth'] === undefined && (value as Record)['ops_this_month'] === undefined)) return false; - if (!('period' in value) || value['period'] === undefined) return false; - if ((!('retrievalQueries' in (value as Record)) && !('retrieval_queries' in (value as Record))) || ((value as Record)['retrievalQueries'] === undefined && (value as Record)['retrieval_queries'] === undefined)) return false; - if (!('storage' in value) || value['storage'] === undefined) return false; - if ((!('tokensThisMonth' in (value as Record)) && !('tokens_this_month' in (value as Record))) || ((value as Record)['tokensThisMonth'] === undefined && (value as Record)['tokens_this_month'] === undefined)) return false; - if ((!('versionRetention' in (value as Record)) && !('version_retention' in (value as Record))) || ((value as Record)['versionRetention'] === undefined && (value as Record)['version_retention'] === undefined)) return false; - if ((!('writesThisHour' in (value as Record)) && !('writes_this_hour' in (value as Record))) || ((value as Record)['writesThisHour'] === undefined && (value as Record)['writes_this_hour'] === undefined)) return false; + if ((!('retrievalBytes' in (value as Record)) && !('retrieval_bytes' in (value as Record))) || ((value as Record)['retrievalBytes'] === undefined && (value as Record)['retrieval_bytes'] === undefined)) return false; + if ((!('storageBytes' in (value as Record)) && !('storage_bytes' in (value as Record))) || ((value as Record)['storageBytes'] === undefined && (value as Record)['storage_bytes'] === undefined)) return false; return true; } @@ -185,19 +52,8 @@ export function DriveUsageOutFromJSONTyped(json: any, ignoreDiscriminator: boole } return { - 'accountFootprint': StorageFootprintOutFromJSON(json['account_footprint']), - 'egressBytes': UsageCounterOutFromJSON(json['egress_bytes']), - 'footprint': StorageFootprintOutFromJSON(json['footprint']), - 'indexedBytes': UsageCounterOutFromJSON(json['indexed_bytes']), - 'indexingOps': UsageCounterOutFromJSON(json['indexing_ops']), - 'opsThisMonth': OperationUsageOutFromJSON(json['ops_this_month']), - 'period': UsagePeriodOutFromJSON(json['period']), - 'retrievalQueries': UsageCounterOutFromJSON(json['retrieval_queries']), - 'storage': UsageCounterOutFromJSON(json['storage']), - 'storageBreakdown': json['storage_breakdown'] === undefined ? undefined : json['storage_breakdown'] === null ? null : StorageBreakdownOutFromJSON(json['storage_breakdown']), - 'tokensThisMonth': TokenUsageOutFromJSON(json['tokens_this_month']), - 'versionRetention': VersionRetentionOutFromJSON(json['version_retention']), - 'writesThisHour': HourlyUsageCounterOutFromJSON(json['writes_this_hour']), + 'retrievalBytes': json['retrieval_bytes'], + 'storageBytes': json['storage_bytes'], }; } @@ -212,18 +68,7 @@ export function DriveUsageOutToJSONTyped(value?: DriveUsageOut | null, ignoreDis return { - 'account_footprint': StorageFootprintOutToJSON(value['accountFootprint']), - 'egress_bytes': UsageCounterOutToJSON(value['egressBytes']), - 'footprint': StorageFootprintOutToJSON(value['footprint']), - 'indexed_bytes': UsageCounterOutToJSON(value['indexedBytes']), - 'indexing_ops': UsageCounterOutToJSON(value['indexingOps']), - 'ops_this_month': OperationUsageOutToJSON(value['opsThisMonth']), - 'period': UsagePeriodOutToJSON(value['period']), - 'retrieval_queries': UsageCounterOutToJSON(value['retrievalQueries']), - 'storage': UsageCounterOutToJSON(value['storage']), - 'storage_breakdown': StorageBreakdownOutToJSON(value['storageBreakdown']), - 'tokens_this_month': TokenUsageOutToJSON(value['tokensThisMonth']), - 'version_retention': VersionRetentionOutToJSON(value['versionRetention']), - 'writes_this_hour': HourlyUsageCounterOutToJSON(value['writesThisHour']), + 'retrieval_bytes': value['retrievalBytes'], + 'storage_bytes': value['storageBytes'], }; } diff --git a/sdk/typescript/src/models/DrivesCreate400Response.ts b/sdk/typescript/src/models/DrivesCreate400Response.ts new file mode 100644 index 0000000..0c3e64d --- /dev/null +++ b/sdk/typescript/src/models/DrivesCreate400Response.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DrivesCreate400ResponseError } from './DrivesCreate400ResponseError'; +import { + DrivesCreate400ResponseErrorFromJSON, + DrivesCreate400ResponseErrorFromJSONTyped, + DrivesCreate400ResponseErrorToJSON, + DrivesCreate400ResponseErrorToJSONTyped, +} from './DrivesCreate400ResponseError'; + +/** + * + * @export + * @interface DrivesCreate400Response + */ +export interface DrivesCreate400Response { + /** + * + * @type {DrivesCreate400ResponseError} + * @memberof DrivesCreate400Response + */ + error: DrivesCreate400ResponseError; +} + +/** + * Check if a given object implements the DrivesCreate400Response interface. + */ +export function instanceOfDrivesCreate400Response(value: object): value is DrivesCreate400Response { + if (!('error' in value) || value['error'] === undefined) return false; + return true; +} + +export function DrivesCreate400ResponseFromJSON(json: any): DrivesCreate400Response { + return DrivesCreate400ResponseFromJSONTyped(json, false); +} + +export function DrivesCreate400ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DrivesCreate400Response { + if (json == null) { + return json; + } + return { + + 'error': DrivesCreate400ResponseErrorFromJSON(json['error']), + }; +} + +export function DrivesCreate400ResponseToJSON(json: any): DrivesCreate400Response { + return DrivesCreate400ResponseToJSONTyped(json, false); +} + +export function DrivesCreate400ResponseToJSONTyped(value?: DrivesCreate400Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'error': DrivesCreate400ResponseErrorToJSON(value['error']), + }; +} diff --git a/sdk/typescript/src/models/DrivesCreate400ResponseError.ts b/sdk/typescript/src/models/DrivesCreate400ResponseError.ts new file mode 100644 index 0000000..74cebea --- /dev/null +++ b/sdk/typescript/src/models/DrivesCreate400ResponseError.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface DrivesCreate400ResponseError + */ +export interface DrivesCreate400ResponseError { + [key: string]: any | any; + /** + * Stable machine-readable error code (see the error-catalog). + * @type {string} + * @memberof DrivesCreate400ResponseError + */ + code: string; + /** + * Error-code-specific context (optional). + * @type {object} + * @memberof DrivesCreate400ResponseError + */ + details?: object; + /** + * + * @type {string} + * @memberof DrivesCreate400ResponseError + */ + message: string; +} + +/** + * Check if a given object implements the DrivesCreate400ResponseError interface. + */ +export function instanceOfDrivesCreate400ResponseError(value: object): value is DrivesCreate400ResponseError { + if (!('code' in value) || value['code'] === undefined) return false; + if (!('message' in value) || value['message'] === undefined) return false; + return true; +} + +export function DrivesCreate400ResponseErrorFromJSON(json: any): DrivesCreate400ResponseError { + return DrivesCreate400ResponseErrorFromJSONTyped(json, false); +} + +export function DrivesCreate400ResponseErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): DrivesCreate400ResponseError { + if (json == null) { + return json; + } + return { + + ...json, + 'code': json['code'], + 'details': json['details'] == null ? undefined : json['details'], + 'message': json['message'], + }; +} + +export function DrivesCreate400ResponseErrorToJSON(json: any): DrivesCreate400ResponseError { + return DrivesCreate400ResponseErrorToJSONTyped(json, false); +} + +export function DrivesCreate400ResponseErrorToJSONTyped(value?: DrivesCreate400ResponseError | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'code': value['code'], + 'details': value['details'], + 'message': value['message'], + }; +} diff --git a/sdk/typescript/src/models/DrivesList400Response.ts b/sdk/typescript/src/models/DrivesList400Response.ts new file mode 100644 index 0000000..802aa07 --- /dev/null +++ b/sdk/typescript/src/models/DrivesList400Response.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DrivesList400ResponseError } from './DrivesList400ResponseError'; +import { + DrivesList400ResponseErrorFromJSON, + DrivesList400ResponseErrorFromJSONTyped, + DrivesList400ResponseErrorToJSON, + DrivesList400ResponseErrorToJSONTyped, +} from './DrivesList400ResponseError'; + +/** + * + * @export + * @interface DrivesList400Response + */ +export interface DrivesList400Response { + /** + * + * @type {DrivesList400ResponseError} + * @memberof DrivesList400Response + */ + error: DrivesList400ResponseError; +} + +/** + * Check if a given object implements the DrivesList400Response interface. + */ +export function instanceOfDrivesList400Response(value: object): value is DrivesList400Response { + if (!('error' in value) || value['error'] === undefined) return false; + return true; +} + +export function DrivesList400ResponseFromJSON(json: any): DrivesList400Response { + return DrivesList400ResponseFromJSONTyped(json, false); +} + +export function DrivesList400ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): DrivesList400Response { + if (json == null) { + return json; + } + return { + + 'error': DrivesList400ResponseErrorFromJSON(json['error']), + }; +} + +export function DrivesList400ResponseToJSON(json: any): DrivesList400Response { + return DrivesList400ResponseToJSONTyped(json, false); +} + +export function DrivesList400ResponseToJSONTyped(value?: DrivesList400Response | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'error': DrivesList400ResponseErrorToJSON(value['error']), + }; +} diff --git a/sdk/typescript/src/models/DrivesList400ResponseError.ts b/sdk/typescript/src/models/DrivesList400ResponseError.ts new file mode 100644 index 0000000..c49cac3 --- /dev/null +++ b/sdk/typescript/src/models/DrivesList400ResponseError.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface DrivesList400ResponseError + */ +export interface DrivesList400ResponseError { + [key: string]: any | any; + /** + * Stable machine-readable error code (see the error-catalog). + * @type {string} + * @memberof DrivesList400ResponseError + */ + code: string; + /** + * Error-code-specific context (optional). + * @type {object} + * @memberof DrivesList400ResponseError + */ + details?: object; + /** + * + * @type {string} + * @memberof DrivesList400ResponseError + */ + message: string | null; +} + +/** + * Check if a given object implements the DrivesList400ResponseError interface. + */ +export function instanceOfDrivesList400ResponseError(value: object): value is DrivesList400ResponseError { + if (!('code' in value) || value['code'] === undefined) return false; + if (!('message' in value) || value['message'] === undefined) return false; + return true; +} + +export function DrivesList400ResponseErrorFromJSON(json: any): DrivesList400ResponseError { + return DrivesList400ResponseErrorFromJSONTyped(json, false); +} + +export function DrivesList400ResponseErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): DrivesList400ResponseError { + if (json == null) { + return json; + } + return { + + ...json, + 'code': json['code'], + 'details': json['details'] == null ? undefined : json['details'], + 'message': json['message'], + }; +} + +export function DrivesList400ResponseErrorToJSON(json: any): DrivesList400ResponseError { + return DrivesList400ResponseErrorToJSONTyped(json, false); +} + +export function DrivesList400ResponseErrorToJSONTyped(value?: DrivesList400ResponseError | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'code': value['code'], + 'details': value['details'], + 'message': value['message'], + }; +} diff --git a/sdk/typescript/src/models/ErrorBody.ts b/sdk/typescript/src/models/ErrorBody.ts deleted file mode 100644 index aad6e29..0000000 --- a/sdk/typescript/src/models/ErrorBody.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Machine-readable API error. - * - * Error-code-specific context (for example `limit`, `current_etag`, or - * `retry_after_s`) is intentionally additive. - * @export - * @interface ErrorBody - */ -export interface ErrorBody { - [key: string]: any | any; - /** - * - * @type {string} - * @memberof ErrorBody - */ - code: string; - /** - * - * @type {string} - * @memberof ErrorBody - */ - message: string; -} - -/** - * Check if a given object implements the ErrorBody interface. - */ -export function instanceOfErrorBody(value: object): value is ErrorBody { - if (!('code' in value) || value['code'] === undefined) return false; - if (!('message' in value) || value['message'] === undefined) return false; - return true; -} - -export function ErrorBodyFromJSON(json: any): ErrorBody { - return ErrorBodyFromJSONTyped(json, false); -} - -export function ErrorBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorBody { - if (json == null) { - return json; - } - return { - - ...json, - 'code': json['code'], - 'message': json['message'], - }; -} - -export function ErrorBodyToJSON(json: any): ErrorBody { - return ErrorBodyToJSONTyped(json, false); -} - -export function ErrorBodyToJSONTyped(value?: ErrorBody | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - ...value, - 'code': value['code'], - 'message': value['message'], - }; -} diff --git a/sdk/typescript/src/models/ErrorDetail.ts b/sdk/typescript/src/models/ErrorDetail.ts deleted file mode 100644 index 2649c62..0000000 --- a/sdk/typescript/src/models/ErrorDetail.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { ErrorBody } from './ErrorBody'; -import { - ErrorBodyFromJSON, - ErrorBodyFromJSONTyped, - ErrorBodyToJSON, - ErrorBodyToJSONTyped, -} from './ErrorBody'; - -/** - * - * @export - * @interface ErrorDetail - */ -export interface ErrorDetail { - [key: string]: any | any; - /** - * - * @type {ErrorBody} - * @memberof ErrorDetail - */ - error: ErrorBody; -} - -/** - * Check if a given object implements the ErrorDetail interface. - */ -export function instanceOfErrorDetail(value: object): value is ErrorDetail { - if (!('error' in value) || value['error'] === undefined) return false; - return true; -} - -export function ErrorDetailFromJSON(json: any): ErrorDetail { - return ErrorDetailFromJSONTyped(json, false); -} - -export function ErrorDetailFromJSONTyped(json: any, ignoreDiscriminator: boolean): ErrorDetail { - if (json == null) { - return json; - } - return { - - ...json, - 'error': ErrorBodyFromJSON(json['error']), - }; -} - -export function ErrorDetailToJSON(json: any): ErrorDetail { - return ErrorDetailToJSONTyped(json, false); -} - -export function ErrorDetailToJSONTyped(value?: ErrorDetail | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - ...value, - 'error': ErrorBodyToJSON(value['error']), - }; -} diff --git a/sdk/typescript/src/models/ErrorResponse.ts b/sdk/typescript/src/models/ErrorResponse.ts index 0453912..a85da56 100644 --- a/sdk/typescript/src/models/ErrorResponse.ts +++ b/sdk/typescript/src/models/ErrorResponse.ts @@ -2,7 +2,7 @@ /* eslint-disable */ /** * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. * * The version of the OpenAPI document: * @@ -13,34 +13,33 @@ */ import { mapValues } from '../runtime'; -import type { ErrorDetail } from './ErrorDetail'; +import type { DrivesCreate400ResponseError } from './DrivesCreate400ResponseError'; import { - ErrorDetailFromJSON, - ErrorDetailFromJSONTyped, - ErrorDetailToJSON, - ErrorDetailToJSONTyped, -} from './ErrorDetail'; + DrivesCreate400ResponseErrorFromJSON, + DrivesCreate400ResponseErrorFromJSONTyped, + DrivesCreate400ResponseErrorToJSON, + DrivesCreate400ResponseErrorToJSONTyped, +} from './DrivesCreate400ResponseError'; /** - * Canonical non-validation error envelope emitted by AgentDrive. + * * @export * @interface ErrorResponse */ export interface ErrorResponse { - [key: string]: any | any; /** * - * @type {ErrorDetail} + * @type {DrivesCreate400ResponseError} * @memberof ErrorResponse */ - detail: ErrorDetail; + error: DrivesCreate400ResponseError; } /** * Check if a given object implements the ErrorResponse interface. */ export function instanceOfErrorResponse(value: object): value is ErrorResponse { - if (!('detail' in value) || value['detail'] === undefined) return false; + if (!('error' in value) || value['error'] === undefined) return false; return true; } @@ -54,8 +53,7 @@ export function ErrorResponseFromJSONTyped(json: any, ignoreDiscriminator: boole } return { - ...json, - 'detail': ErrorDetailFromJSON(json['detail']), + 'error': DrivesCreate400ResponseErrorFromJSON(json['error']), }; } @@ -70,7 +68,6 @@ export function ErrorResponseToJSONTyped(value?: ErrorResponse | null, ignoreDis return { - ...value, - 'detail': ErrorDetailToJSON(value['detail']), + 'error': DrivesCreate400ResponseErrorToJSON(value['error']), }; } diff --git a/sdk/typescript/src/models/EventOut.ts b/sdk/typescript/src/models/EventOut.ts deleted file mode 100644 index bd8cacb..0000000 --- a/sdk/typescript/src/models/EventOut.ts +++ /dev/null @@ -1,116 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface EventOut - */ -export interface EventOut { - /** - * - * @type {string} - * @memberof EventOut - */ - action: string; - /** - * - * @type {string} - * @memberof EventOut - */ - actorName?: string | null; - /** - * - * @type {string} - * @memberof EventOut - */ - artId?: string | null; - /** - * - * @type {Date} - * @memberof EventOut - */ - createdAt: Date; - /** - * - * @type {string} - * @memberof EventOut - */ - driveId: string; - /** - * - * @type {string} - * @memberof EventOut - */ - id: string; - /** - * - * @type {{ [key: string]: any; }} - * @memberof EventOut - */ - metadata?: { [key: string]: any; }; -} - -/** - * Check if a given object implements the EventOut interface. - */ -export function instanceOfEventOut(value: object): value is EventOut { - if (!('action' in value) || value['action'] === undefined) return false; - if ((!('createdAt' in (value as Record)) && !('created_at' in (value as Record))) || ((value as Record)['createdAt'] === undefined && (value as Record)['created_at'] === undefined)) return false; - if ((!('driveId' in (value as Record)) && !('drive_id' in (value as Record))) || ((value as Record)['driveId'] === undefined && (value as Record)['drive_id'] === undefined)) return false; - if (!('id' in value) || value['id'] === undefined) return false; - return true; -} - -export function EventOutFromJSON(json: any): EventOut { - return EventOutFromJSONTyped(json, false); -} - -export function EventOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventOut { - if (json == null) { - return json; - } - return { - - 'action': json['action'], - 'actorName': json['actor_name'] === undefined ? undefined : json['actor_name'] === null ? null : json['actor_name'], - 'artId': json['art_id'] === undefined ? undefined : json['art_id'] === null ? null : json['art_id'], - 'createdAt': (new Date(json['created_at'])), - 'driveId': json['drive_id'], - 'id': json['id'], - 'metadata': json['metadata'] == null ? undefined : json['metadata'], - }; -} - -export function EventOutToJSON(json: any): EventOut { - return EventOutToJSONTyped(json, false); -} - -export function EventOutToJSONTyped(value?: EventOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'action': value['action'], - 'actor_name': value['actorName'], - 'art_id': value['artId'], - 'created_at': value['createdAt'].toISOString(), - 'drive_id': value['driveId'], - 'id': value['id'], - 'metadata': value['metadata'], - }; -} diff --git a/sdk/typescript/src/models/EventPage.ts b/sdk/typescript/src/models/EventPage.ts deleted file mode 100644 index d29c924..0000000 --- a/sdk/typescript/src/models/EventPage.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { EventOut } from './EventOut'; -import { - EventOutFromJSON, - EventOutFromJSONTyped, - EventOutToJSON, - EventOutToJSONTyped, -} from './EventOut'; - -/** - * - * @export - * @interface EventPage - */ -export interface EventPage { - /** - * - * @type {Array} - * @memberof EventPage - */ - items: Array; - /** - * - * @type {string} - * @memberof EventPage - */ - nextCursor?: string | null; -} - -/** - * Check if a given object implements the EventPage interface. - */ -export function instanceOfEventPage(value: object): value is EventPage { - if (!('items' in value) || value['items'] === undefined) return false; - return true; -} - -export function EventPageFromJSON(json: any): EventPage { - return EventPageFromJSONTyped(json, false); -} - -export function EventPageFromJSONTyped(json: any, ignoreDiscriminator: boolean): EventPage { - if (json == null) { - return json; - } - return { - - 'items': ((json['items'] as Array).map(EventOutFromJSON)), - 'nextCursor': json['next_cursor'] === undefined ? undefined : json['next_cursor'] === null ? null : json['next_cursor'], - }; -} - -export function EventPageToJSON(json: any): EventPage { - return EventPageToJSONTyped(json, false); -} - -export function EventPageToJSONTyped(value?: EventPage | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'items': ((value['items'] as Array).map(EventOutToJSON)), - 'next_cursor': value['nextCursor'], - }; -} diff --git a/sdk/typescript/src/models/ExtensionExchangeRequest.ts b/sdk/typescript/src/models/ExtensionExchangeRequest.ts deleted file mode 100644 index d7fe366..0000000 --- a/sdk/typescript/src/models/ExtensionExchangeRequest.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Single-use ticket → JWT pair. Called by `auth-complete.html` - * inside the SnipIt extension. No `Authorization` header — the - * ticket itself is the credential. - * @export - * @interface ExtensionExchangeRequest - */ -export interface ExtensionExchangeRequest { - /** - * The extension's ID (Chrome Web Store ID or unpacked dev ID). - * @type {string} - * @memberof ExtensionExchangeRequest - */ - extId: string; - /** - * The opaque ticket from the /auth/callback handoff. - * @type {string} - * @memberof ExtensionExchangeRequest - */ - ticket: string; -} - -/** - * Check if a given object implements the ExtensionExchangeRequest interface. - */ -export function instanceOfExtensionExchangeRequest(value: object): value is ExtensionExchangeRequest { - if ((!('extId' in (value as Record)) && !('ext_id' in (value as Record))) || ((value as Record)['extId'] === undefined && (value as Record)['ext_id'] === undefined)) return false; - if (!('ticket' in value) || value['ticket'] === undefined) return false; - return true; -} - -export function ExtensionExchangeRequestFromJSON(json: any): ExtensionExchangeRequest { - return ExtensionExchangeRequestFromJSONTyped(json, false); -} - -export function ExtensionExchangeRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExtensionExchangeRequest { - if (json == null) { - return json; - } - return { - - 'extId': json['ext_id'], - 'ticket': json['ticket'], - }; -} - -export function ExtensionExchangeRequestToJSON(json: any): ExtensionExchangeRequest { - return ExtensionExchangeRequestToJSONTyped(json, false); -} - -export function ExtensionExchangeRequestToJSONTyped(value?: ExtensionExchangeRequest | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'ext_id': value['extId'], - 'ticket': value['ticket'], - }; -} diff --git a/sdk/typescript/src/models/ExtensionExchangeResponse.ts b/sdk/typescript/src/models/ExtensionExchangeResponse.ts deleted file mode 100644 index d72eb94..0000000 --- a/sdk/typescript/src/models/ExtensionExchangeResponse.ts +++ /dev/null @@ -1,118 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface ExtensionExchangeResponse - */ -export interface ExtensionExchangeResponse { - /** - * 15-minute access_token (scope=extension). - * @type {string} - * @memberof ExtensionExchangeResponse - */ - accessToken: string; - /** - * The drive these credentials are scoped to. - * @type {string} - * @memberof ExtensionExchangeResponse - */ - driveId: string; - /** - * Seconds until access_token expiry. - * @type {number} - * @memberof ExtensionExchangeResponse - */ - expiresIn: number; - /** - * 90-day identity_assertion. Refresh via POST /oauth2/token. - * @type {string} - * @memberof ExtensionExchangeResponse - */ - identityAssertion: string; - /** - * - * @type {ExtensionExchangeResponseScopeEnum} - * @memberof ExtensionExchangeResponse - */ - scope?: ExtensionExchangeResponseScopeEnum; - /** - * - * @type {string} - * @memberof ExtensionExchangeResponse - */ - tokenType?: string; -} - - -/** - * @export - */ -export const ExtensionExchangeResponseScopeEnum = { - Extension: 'extension' -} as const; -export type ExtensionExchangeResponseScopeEnum = typeof ExtensionExchangeResponseScopeEnum[keyof typeof ExtensionExchangeResponseScopeEnum]; - - -/** - * Check if a given object implements the ExtensionExchangeResponse interface. - */ -export function instanceOfExtensionExchangeResponse(value: object): value is ExtensionExchangeResponse { - if ((!('accessToken' in (value as Record)) && !('access_token' in (value as Record))) || ((value as Record)['accessToken'] === undefined && (value as Record)['access_token'] === undefined)) return false; - if ((!('driveId' in (value as Record)) && !('drive_id' in (value as Record))) || ((value as Record)['driveId'] === undefined && (value as Record)['drive_id'] === undefined)) return false; - if ((!('expiresIn' in (value as Record)) && !('expires_in' in (value as Record))) || ((value as Record)['expiresIn'] === undefined && (value as Record)['expires_in'] === undefined)) return false; - if ((!('identityAssertion' in (value as Record)) && !('identity_assertion' in (value as Record))) || ((value as Record)['identityAssertion'] === undefined && (value as Record)['identity_assertion'] === undefined)) return false; - return true; -} - -export function ExtensionExchangeResponseFromJSON(json: any): ExtensionExchangeResponse { - return ExtensionExchangeResponseFromJSONTyped(json, false); -} - -export function ExtensionExchangeResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExtensionExchangeResponse { - if (json == null) { - return json; - } - return { - - 'accessToken': json['access_token'], - 'driveId': json['drive_id'], - 'expiresIn': json['expires_in'], - 'identityAssertion': json['identity_assertion'], - 'scope': json['scope'] == null ? undefined : json['scope'], - 'tokenType': json['token_type'] == null ? undefined : json['token_type'], - }; -} - -export function ExtensionExchangeResponseToJSON(json: any): ExtensionExchangeResponse { - return ExtensionExchangeResponseToJSONTyped(json, false); -} - -export function ExtensionExchangeResponseToJSONTyped(value?: ExtensionExchangeResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'access_token': value['accessToken'], - 'drive_id': value['driveId'], - 'expires_in': value['expiresIn'], - 'identity_assertion': value['identityAssertion'], - 'scope': value['scope'], - 'token_type': value['tokenType'], - }; -} diff --git a/sdk/typescript/src/models/FeedbackCreateOut.ts b/sdk/typescript/src/models/FeedbackCreateOut.ts deleted file mode 100644 index 411a343..0000000 --- a/sdk/typescript/src/models/FeedbackCreateOut.ts +++ /dev/null @@ -1,91 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface FeedbackCreateOut - */ -export interface FeedbackCreateOut { - /** - * - * @type {boolean} - * @memberof FeedbackCreateOut - */ - contact: boolean; - /** - * - * @type {string} - * @memberof FeedbackCreateOut - */ - id: string; - /** - * - * @type {string} - * @memberof FeedbackCreateOut - */ - note?: string | null; - /** - * - * @type {string} - * @memberof FeedbackCreateOut - */ - status: string; -} - -/** - * Check if a given object implements the FeedbackCreateOut interface. - */ -export function instanceOfFeedbackCreateOut(value: object): value is FeedbackCreateOut { - if (!('contact' in value) || value['contact'] === undefined) return false; - if (!('id' in value) || value['id'] === undefined) return false; - if (!('status' in value) || value['status'] === undefined) return false; - return true; -} - -export function FeedbackCreateOutFromJSON(json: any): FeedbackCreateOut { - return FeedbackCreateOutFromJSONTyped(json, false); -} - -export function FeedbackCreateOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): FeedbackCreateOut { - if (json == null) { - return json; - } - return { - - 'contact': json['contact'], - 'id': json['id'], - 'note': json['note'] === undefined ? undefined : json['note'] === null ? null : json['note'], - 'status': json['status'], - }; -} - -export function FeedbackCreateOutToJSON(json: any): FeedbackCreateOut { - return FeedbackCreateOutToJSONTyped(json, false); -} - -export function FeedbackCreateOutToJSONTyped(value?: FeedbackCreateOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'contact': value['contact'], - 'id': value['id'], - 'note': value['note'], - 'status': value['status'], - }; -} diff --git a/sdk/typescript/src/models/FeedbackStatusOut.ts b/sdk/typescript/src/models/FeedbackStatusOut.ts deleted file mode 100644 index 2235e53..0000000 --- a/sdk/typescript/src/models/FeedbackStatusOut.ts +++ /dev/null @@ -1,128 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * GET /v0/feedback/{fbk_id} response — lifecycle status of feedback THIS - * drive filed. - * @export - * @interface FeedbackStatusOut - */ -export interface FeedbackStatusOut { - /** - * - * @type {boolean} - * @memberof FeedbackStatusOut - */ - contact: boolean; - /** - * - * @type {Date} - * @memberof FeedbackStatusOut - */ - createdAt: Date; - /** - * - * @type {string} - * @memberof FeedbackStatusOut - */ - duplicateOf?: string | null; - /** - * - * @type {string} - * @memberof FeedbackStatusOut - */ - id: string; - /** - * - * @type {string} - * @memberof FeedbackStatusOut - */ - kind: string; - /** - * - * @type {string} - * @memberof FeedbackStatusOut - */ - status: string; - /** - * - * @type {Date} - * @memberof FeedbackStatusOut - */ - statusChangedAt: Date; - /** - * - * @type {string} - * @memberof FeedbackStatusOut - */ - title: string; -} - -/** - * Check if a given object implements the FeedbackStatusOut interface. - */ -export function instanceOfFeedbackStatusOut(value: object): value is FeedbackStatusOut { - if (!('contact' in value) || value['contact'] === undefined) return false; - if ((!('createdAt' in (value as Record)) && !('created_at' in (value as Record))) || ((value as Record)['createdAt'] === undefined && (value as Record)['created_at'] === undefined)) return false; - if (!('id' in value) || value['id'] === undefined) return false; - if (!('kind' in value) || value['kind'] === undefined) return false; - if (!('status' in value) || value['status'] === undefined) return false; - if ((!('statusChangedAt' in (value as Record)) && !('status_changed_at' in (value as Record))) || ((value as Record)['statusChangedAt'] === undefined && (value as Record)['status_changed_at'] === undefined)) return false; - if (!('title' in value) || value['title'] === undefined) return false; - return true; -} - -export function FeedbackStatusOutFromJSON(json: any): FeedbackStatusOut { - return FeedbackStatusOutFromJSONTyped(json, false); -} - -export function FeedbackStatusOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): FeedbackStatusOut { - if (json == null) { - return json; - } - return { - - 'contact': json['contact'], - 'createdAt': (new Date(json['created_at'])), - 'duplicateOf': json['duplicate_of'] === undefined ? undefined : json['duplicate_of'] === null ? null : json['duplicate_of'], - 'id': json['id'], - 'kind': json['kind'], - 'status': json['status'], - 'statusChangedAt': (new Date(json['status_changed_at'])), - 'title': json['title'], - }; -} - -export function FeedbackStatusOutToJSON(json: any): FeedbackStatusOut { - return FeedbackStatusOutToJSONTyped(json, false); -} - -export function FeedbackStatusOutToJSONTyped(value?: FeedbackStatusOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'contact': value['contact'], - 'created_at': value['createdAt'].toISOString(), - 'duplicate_of': value['duplicateOf'], - 'id': value['id'], - 'kind': value['kind'], - 'status': value['status'], - 'status_changed_at': value['statusChangedAt'].toISOString(), - 'title': value['title'], - }; -} diff --git a/sdk/typescript/src/models/FindHitOut.ts b/sdk/typescript/src/models/FindHitOut.ts deleted file mode 100644 index 241b849..0000000 --- a/sdk/typescript/src/models/FindHitOut.ts +++ /dev/null @@ -1,264 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * One passage-level hit from `/v0/find` (hybrid chunk RAG over - * `embed_chunks`). The unit is a passage, not a file — consecutive - * `ord` values from the same `art_id` are normal because chunks - * overlap by ~400 tokens. Span fields are modality-aware: only the - * pair matching `modality` is populated, the others stay None. - * @export - * @interface FindHitOut - */ -export interface FindHitOut { - /** - * - * @type {string} - * @memberof FindHitOut - */ - artId: string; - /** - * - * @type {number} - * @memberof FindHitOut - */ - charEnd?: number | null; - /** - * - * @type {number} - * @memberof FindHitOut - */ - charStart?: number | null; - /** - * - * @type {string} - * @memberof FindHitOut - */ - contentType: string; - /** - * - * @type {string} - * @memberof FindHitOut - */ - driveId: string; - /** - * - * @type {string} - * @memberof FindHitOut - */ - fileType: string; - /** - * - * @type {Array} - * @memberof FindHitOut - */ - labels?: Array; - /** - * - * @type {FindHitOutModalityEnum} - * @memberof FindHitOut - */ - modality: FindHitOutModalityEnum; - /** - * - * @type {number} - * @memberof FindHitOut - */ - ord: number; - /** - * - * @type {number} - * @memberof FindHitOut - */ - pageEnd?: number | null; - /** - * - * @type {number} - * @memberof FindHitOut - */ - pageStart?: number | null; - /** - * - * @type {string} - * @memberof FindHitOut - */ - path: string; - /** - * - * @type {number} - * @memberof FindHitOut - */ - rankLexical?: number | null; - /** - * - * @type {number} - * @memberof FindHitOut - */ - rankSemantic?: number | null; - /** - * - * @type {number} - * @memberof FindHitOut - */ - score: number; - /** - * - * @type {string} - * @memberof FindHitOut - */ - snippet: string; - /** - * - * @type {string} - * @memberof FindHitOut - */ - text: string; - /** - * - * @type {number} - * @memberof FindHitOut - */ - timeEndMs?: number | null; - /** - * - * @type {number} - * @memberof FindHitOut - */ - timeStartMs?: number | null; - /** - * - * @type {Date} - * @memberof FindHitOut - */ - updatedAt: Date; - /** - * - * @type {string} - * @memberof FindHitOut - */ - url: string; - /** - * - * @type {number} - * @memberof FindHitOut - */ - versionNumber: number; -} - - -/** - * @export - */ -export const FindHitOutModalityEnum = { - Text: 'text', - Code: 'code', - Pdf: 'pdf', - Image: 'image', - Audio: 'audio', - Video: 'video' -} as const; -export type FindHitOutModalityEnum = typeof FindHitOutModalityEnum[keyof typeof FindHitOutModalityEnum]; - - -/** - * Check if a given object implements the FindHitOut interface. - */ -export function instanceOfFindHitOut(value: object): value is FindHitOut { - if ((!('artId' in (value as Record)) && !('art_id' in (value as Record))) || ((value as Record)['artId'] === undefined && (value as Record)['art_id'] === undefined)) return false; - if ((!('contentType' in (value as Record)) && !('content_type' in (value as Record))) || ((value as Record)['contentType'] === undefined && (value as Record)['content_type'] === undefined)) return false; - if ((!('driveId' in (value as Record)) && !('drive_id' in (value as Record))) || ((value as Record)['driveId'] === undefined && (value as Record)['drive_id'] === undefined)) return false; - if ((!('fileType' in (value as Record)) && !('file_type' in (value as Record))) || ((value as Record)['fileType'] === undefined && (value as Record)['file_type'] === undefined)) return false; - if (!('modality' in value) || value['modality'] === undefined) return false; - if (!('ord' in value) || value['ord'] === undefined) return false; - if (!('path' in value) || value['path'] === undefined) return false; - if (!('score' in value) || value['score'] === undefined) return false; - if (!('snippet' in value) || value['snippet'] === undefined) return false; - if (!('text' in value) || value['text'] === undefined) return false; - if ((!('updatedAt' in (value as Record)) && !('updated_at' in (value as Record))) || ((value as Record)['updatedAt'] === undefined && (value as Record)['updated_at'] === undefined)) return false; - if (!('url' in value) || value['url'] === undefined) return false; - if ((!('versionNumber' in (value as Record)) && !('version_number' in (value as Record))) || ((value as Record)['versionNumber'] === undefined && (value as Record)['version_number'] === undefined)) return false; - return true; -} - -export function FindHitOutFromJSON(json: any): FindHitOut { - return FindHitOutFromJSONTyped(json, false); -} - -export function FindHitOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): FindHitOut { - if (json == null) { - return json; - } - return { - - 'artId': json['art_id'], - 'charEnd': json['char_end'] === undefined ? undefined : json['char_end'] === null ? null : json['char_end'], - 'charStart': json['char_start'] === undefined ? undefined : json['char_start'] === null ? null : json['char_start'], - 'contentType': json['content_type'], - 'driveId': json['drive_id'], - 'fileType': json['file_type'], - 'labels': json['labels'] == null ? undefined : json['labels'], - 'modality': json['modality'], - 'ord': json['ord'], - 'pageEnd': json['page_end'] === undefined ? undefined : json['page_end'] === null ? null : json['page_end'], - 'pageStart': json['page_start'] === undefined ? undefined : json['page_start'] === null ? null : json['page_start'], - 'path': json['path'], - 'rankLexical': json['rank_lexical'] === undefined ? undefined : json['rank_lexical'] === null ? null : json['rank_lexical'], - 'rankSemantic': json['rank_semantic'] === undefined ? undefined : json['rank_semantic'] === null ? null : json['rank_semantic'], - 'score': json['score'], - 'snippet': json['snippet'], - 'text': json['text'], - 'timeEndMs': json['time_end_ms'] === undefined ? undefined : json['time_end_ms'] === null ? null : json['time_end_ms'], - 'timeStartMs': json['time_start_ms'] === undefined ? undefined : json['time_start_ms'] === null ? null : json['time_start_ms'], - 'updatedAt': (new Date(json['updated_at'])), - 'url': json['url'], - 'versionNumber': json['version_number'], - }; -} - -export function FindHitOutToJSON(json: any): FindHitOut { - return FindHitOutToJSONTyped(json, false); -} - -export function FindHitOutToJSONTyped(value?: FindHitOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'art_id': value['artId'], - 'char_end': value['charEnd'], - 'char_start': value['charStart'], - 'content_type': value['contentType'], - 'drive_id': value['driveId'], - 'file_type': value['fileType'], - 'labels': value['labels'], - 'modality': value['modality'], - 'ord': value['ord'], - 'page_end': value['pageEnd'], - 'page_start': value['pageStart'], - 'path': value['path'], - 'rank_lexical': value['rankLexical'], - 'rank_semantic': value['rankSemantic'], - 'score': value['score'], - 'snippet': value['snippet'], - 'text': value['text'], - 'time_end_ms': value['timeEndMs'], - 'time_start_ms': value['timeStartMs'], - 'updated_at': value['updatedAt'].toISOString(), - 'url': value['url'], - 'version_number': value['versionNumber'], - }; -} diff --git a/sdk/typescript/src/models/FindPage.ts b/sdk/typescript/src/models/FindPage.ts deleted file mode 100644 index 203b4ed..0000000 --- a/sdk/typescript/src/models/FindPage.ts +++ /dev/null @@ -1,74 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { FindHitOut } from './FindHitOut'; -import { - FindHitOutFromJSON, - FindHitOutFromJSONTyped, - FindHitOutToJSON, - FindHitOutToJSONTyped, -} from './FindHitOut'; - -/** - * `/v0/find` response — single-shot top-N, deliberately unpaginated - * (same contract + rationale as `SearchPage`). - * @export - * @interface FindPage - */ -export interface FindPage { - /** - * - * @type {Array} - * @memberof FindPage - */ - items: Array; -} - -/** - * Check if a given object implements the FindPage interface. - */ -export function instanceOfFindPage(value: object): value is FindPage { - if (!('items' in value) || value['items'] === undefined) return false; - return true; -} - -export function FindPageFromJSON(json: any): FindPage { - return FindPageFromJSONTyped(json, false); -} - -export function FindPageFromJSONTyped(json: any, ignoreDiscriminator: boolean): FindPage { - if (json == null) { - return json; - } - return { - - 'items': ((json['items'] as Array).map(FindHitOutFromJSON)), - }; -} - -export function FindPageToJSON(json: any): FindPage { - return FindPageToJSONTyped(json, false); -} - -export function FindPageToJSONTyped(value?: FindPage | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'items': ((value['items'] as Array).map(FindHitOutToJSON)), - }; -} diff --git a/sdk/typescript/src/models/FolderCascadeOut.ts b/sdk/typescript/src/models/FolderCascadeOut.ts new file mode 100644 index 0000000..84302e0 --- /dev/null +++ b/sdk/typescript/src/models/FolderCascadeOut.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { FolderOut } from './FolderOut'; +import { + FolderOutFromJSON, + FolderOutFromJSONTyped, + FolderOutToJSON, + FolderOutToJSONTyped, +} from './FolderOut'; + +/** + * + * @export + * @interface FolderCascadeOut + */ +export interface FolderCascadeOut { + /** + * + * @type {{ [key: string]: number; }} + * @memberof FolderCascadeOut + */ + cascade: { [key: string]: number; }; + /** + * + * @type {FolderOut} + * @memberof FolderCascadeOut + */ + folder: FolderOut; +} + +/** + * Check if a given object implements the FolderCascadeOut interface. + */ +export function instanceOfFolderCascadeOut(value: object): value is FolderCascadeOut { + if (!('cascade' in value) || value['cascade'] === undefined) return false; + if (!('folder' in value) || value['folder'] === undefined) return false; + return true; +} + +export function FolderCascadeOutFromJSON(json: any): FolderCascadeOut { + return FolderCascadeOutFromJSONTyped(json, false); +} + +export function FolderCascadeOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): FolderCascadeOut { + if (json == null) { + return json; + } + return { + + 'cascade': json['cascade'], + 'folder': FolderOutFromJSON(json['folder']), + }; +} + +export function FolderCascadeOutToJSON(json: any): FolderCascadeOut { + return FolderCascadeOutToJSONTyped(json, false); +} + +export function FolderCascadeOutToJSONTyped(value?: FolderCascadeOut | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'cascade': value['cascade'], + 'folder': FolderOutToJSON(value['folder']), + }; +} diff --git a/sdk/typescript/src/models/FolderCopyIn.ts b/sdk/typescript/src/models/FolderCopyIn.ts index f3da2a8..52ef284 100644 --- a/sdk/typescript/src/models/FolderCopyIn.ts +++ b/sdk/typescript/src/models/FolderCopyIn.ts @@ -2,7 +2,7 @@ /* eslint-disable */ /** * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. * * The version of the OpenAPI document: * @@ -14,33 +14,40 @@ import { mapValues } from '../runtime'; /** - * POST /v0/folders/{fld_id}/copy body — duplicate the subtree to a - * new path. `path` is the target folder path (canonical, trailing - * slash). Its own schema (vs. reusing `FolderMoveIn`) keeps the copy - * surface self-documenting in the OpenAPI spec. + * POST /v0/drives/{id}/folders/{folder_id}/copy body. + * + * ``destination_drive_id`` must equal the source drive (or be absent) — + * cross-drive copy is out of v0 scope and rejected. * @export * @interface FolderCopyIn */ export interface FolderCopyIn { /** * - * @type {number} + * @type {string} + * @memberof FolderCopyIn + */ + destinationDriveId?: string | null; + /** + * + * @type {string} * @memberof FolderCopyIn */ - fromMetageneration?: number | null; + destinationName: string; /** * * @type {string} * @memberof FolderCopyIn */ - path: string; + destinationParentId: string; } /** * Check if a given object implements the FolderCopyIn interface. */ export function instanceOfFolderCopyIn(value: object): value is FolderCopyIn { - if (!('path' in value) || value['path'] === undefined) return false; + if ((!('destinationName' in (value as Record)) && !('destination_name' in (value as Record))) || ((value as Record)['destinationName'] === undefined && (value as Record)['destination_name'] === undefined)) return false; + if ((!('destinationParentId' in (value as Record)) && !('destination_parent_id' in (value as Record))) || ((value as Record)['destinationParentId'] === undefined && (value as Record)['destination_parent_id'] === undefined)) return false; return true; } @@ -54,8 +61,9 @@ export function FolderCopyInFromJSONTyped(json: any, ignoreDiscriminator: boolea } return { - 'fromMetageneration': json['from_metageneration'] === undefined ? undefined : json['from_metageneration'] === null ? null : json['from_metageneration'], - 'path': json['path'], + 'destinationDriveId': json['destination_drive_id'] === undefined ? undefined : json['destination_drive_id'] === null ? null : json['destination_drive_id'], + 'destinationName': json['destination_name'], + 'destinationParentId': json['destination_parent_id'], }; } @@ -70,7 +78,8 @@ export function FolderCopyInToJSONTyped(value?: FolderCopyIn | null, ignoreDiscr return { - 'from_metageneration': value['fromMetageneration'], - 'path': value['path'], + 'destination_drive_id': value['destinationDriveId'], + 'destination_name': value['destinationName'], + 'destination_parent_id': value['destinationParentId'], }; } diff --git a/sdk/typescript/src/models/FolderCopyOut.ts b/sdk/typescript/src/models/FolderCopyOut.ts deleted file mode 100644 index 098187b..0000000 --- a/sdk/typescript/src/models/FolderCopyOut.ts +++ /dev/null @@ -1,172 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * POST /v0/folders/{fld_id}/copy response — the newly-created folder - * resource (same shape as `FolderOut`) plus copy-provenance fields: - * `from_fld_id` is the source folder and `n_artifacts_copied` is the - * number of descendant artifacts cloned into the new subtree. Mirrors - * the MCP `copy` folder route's conceptual shape. - * @export - * @interface FolderCopyOut - */ -export interface FolderCopyOut { - /** - * - * @type {Date} - * @memberof FolderCopyOut - */ - createdAt: Date; - /** - * - * @type {Date} - * @memberof FolderCopyOut - */ - deletedAt?: Date | null; - /** - * - * @type {string} - * @memberof FolderCopyOut - */ - description?: string | null; - /** - * - * @type {string} - * @memberof FolderCopyOut - */ - driveId: string; - /** - * - * @type {string} - * @memberof FolderCopyOut - */ - etag: string; - /** - * - * @type {string} - * @memberof FolderCopyOut - */ - fromFldId: string; - /** - * - * @type {string} - * @memberof FolderCopyOut - */ - id: string; - /** - * - * @type {boolean} - * @memberof FolderCopyOut - */ - inheritGrants?: boolean; - /** - * - * @type {number} - * @memberof FolderCopyOut - */ - metageneration?: number; - /** - * - * @type {number} - * @memberof FolderCopyOut - */ - nArtifactsCopied: number; - /** - * - * @type {string} - * @memberof FolderCopyOut - */ - path: string; - /** - * - * @type {Date} - * @memberof FolderCopyOut - */ - purgeAt?: Date | null; - /** - * - * @type {Date} - * @memberof FolderCopyOut - */ - updatedAt: Date; -} - -/** - * Check if a given object implements the FolderCopyOut interface. - */ -export function instanceOfFolderCopyOut(value: object): value is FolderCopyOut { - if ((!('createdAt' in (value as Record)) && !('created_at' in (value as Record))) || ((value as Record)['createdAt'] === undefined && (value as Record)['created_at'] === undefined)) return false; - if ((!('driveId' in (value as Record)) && !('drive_id' in (value as Record))) || ((value as Record)['driveId'] === undefined && (value as Record)['drive_id'] === undefined)) return false; - if (!('etag' in value) || value['etag'] === undefined) return false; - if ((!('fromFldId' in (value as Record)) && !('from_fld_id' in (value as Record))) || ((value as Record)['fromFldId'] === undefined && (value as Record)['from_fld_id'] === undefined)) return false; - if (!('id' in value) || value['id'] === undefined) return false; - if ((!('nArtifactsCopied' in (value as Record)) && !('n_artifacts_copied' in (value as Record))) || ((value as Record)['nArtifactsCopied'] === undefined && (value as Record)['n_artifacts_copied'] === undefined)) return false; - if (!('path' in value) || value['path'] === undefined) return false; - if ((!('updatedAt' in (value as Record)) && !('updated_at' in (value as Record))) || ((value as Record)['updatedAt'] === undefined && (value as Record)['updated_at'] === undefined)) return false; - return true; -} - -export function FolderCopyOutFromJSON(json: any): FolderCopyOut { - return FolderCopyOutFromJSONTyped(json, false); -} - -export function FolderCopyOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): FolderCopyOut { - if (json == null) { - return json; - } - return { - - 'createdAt': (new Date(json['created_at'])), - 'deletedAt': json['deleted_at'] === undefined ? undefined : json['deleted_at'] === null ? null : (new Date(json['deleted_at'])), - 'description': json['description'] === undefined ? undefined : json['description'] === null ? null : json['description'], - 'driveId': json['drive_id'], - 'etag': json['etag'], - 'fromFldId': json['from_fld_id'], - 'id': json['id'], - 'inheritGrants': json['inherit_grants'] == null ? undefined : json['inherit_grants'], - 'metageneration': json['metageneration'] == null ? undefined : json['metageneration'], - 'nArtifactsCopied': json['n_artifacts_copied'], - 'path': json['path'], - 'purgeAt': json['purge_at'] === undefined ? undefined : json['purge_at'] === null ? null : (new Date(json['purge_at'])), - 'updatedAt': (new Date(json['updated_at'])), - }; -} - -export function FolderCopyOutToJSON(json: any): FolderCopyOut { - return FolderCopyOutToJSONTyped(json, false); -} - -export function FolderCopyOutToJSONTyped(value?: FolderCopyOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'created_at': value['createdAt'].toISOString(), - 'deleted_at': value['deletedAt'] == null ? value['deletedAt'] : value['deletedAt'].toISOString(), - 'description': value['description'], - 'drive_id': value['driveId'], - 'etag': value['etag'], - 'from_fld_id': value['fromFldId'], - 'id': value['id'], - 'inherit_grants': value['inheritGrants'], - 'metageneration': value['metageneration'], - 'n_artifacts_copied': value['nArtifactsCopied'], - 'path': value['path'], - 'purge_at': value['purgeAt'] == null ? value['purgeAt'] : value['purgeAt'].toISOString(), - 'updated_at': value['updatedAt'].toISOString(), - }; -} diff --git a/sdk/typescript/src/models/FolderCreateIn.ts b/sdk/typescript/src/models/FolderCreateIn.ts index 7462f8b..80a1250 100644 --- a/sdk/typescript/src/models/FolderCreateIn.ts +++ b/sdk/typescript/src/models/FolderCreateIn.ts @@ -2,7 +2,7 @@ /* eslint-disable */ /** * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. * * The version of the OpenAPI document: * @@ -14,25 +14,54 @@ import { mapValues } from '../runtime'; /** - * PUT /v0/folders/{path} body for the optional metadata params. - * Empty body is fine — `mkdir` with no description just creates the - * folder row. + * POST /v0/drives/{id}/folders body. * @export * @interface FolderCreateIn */ export interface FolderCreateIn { + /** + * + * @type {FolderCreateInGrantInheritanceEnum} + * @memberof FolderCreateIn + */ + grantInheritance?: FolderCreateInGrantInheritanceEnum; + /** + * + * @type {{ [key: string]: any; }} + * @memberof FolderCreateIn + */ + metadata?: { [key: string]: any; }; /** * * @type {string} * @memberof FolderCreateIn */ - description?: string | null; + name: string; + /** + * + * @type {string} + * @memberof FolderCreateIn + */ + parentId: string; } + +/** + * @export + */ +export const FolderCreateInGrantInheritanceEnum = { + Inherit: 'inherit', + Sealed: 'sealed' +} as const; +export type FolderCreateInGrantInheritanceEnum = typeof FolderCreateInGrantInheritanceEnum[keyof typeof FolderCreateInGrantInheritanceEnum]; + + /** * Check if a given object implements the FolderCreateIn interface. */ export function instanceOfFolderCreateIn(value: object): value is FolderCreateIn { + if (!('name' in value) || value['name'] === undefined) return false; + if ((!('parentId' in (value as Record)) && !('parent_id' in (value as Record))) || ((value as Record)['parentId'] === undefined && (value as Record)['parent_id'] === undefined)) return false; return true; } @@ -46,7 +75,10 @@ export function FolderCreateInFromJSONTyped(json: any, ignoreDiscriminator: bool } return { - 'description': json['description'] === undefined ? undefined : json['description'] === null ? null : json['description'], + 'grantInheritance': json['grant_inheritance'] == null ? undefined : json['grant_inheritance'], + 'metadata': json['metadata'] == null ? undefined : json['metadata'], + 'name': json['name'], + 'parentId': json['parent_id'], }; } @@ -61,6 +93,9 @@ export function FolderCreateInToJSONTyped(value?: FolderCreateIn | null, ignoreD return { - 'description': value['description'], + 'grant_inheritance': value['grantInheritance'], + 'metadata': value['metadata'], + 'name': value['name'], + 'parent_id': value['parentId'], }; } diff --git a/sdk/typescript/src/models/FolderDeleteOut.ts b/sdk/typescript/src/models/FolderDeleteOut.ts deleted file mode 100644 index 0f5f365..0000000 --- a/sdk/typescript/src/models/FolderDeleteOut.ts +++ /dev/null @@ -1,129 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * DELETE response — surfaces cascade counts so the caller can - * confirm scope of an rmdir before the client retries with - * `?recursive=true`. - * @export - * @interface FolderDeleteOut - */ -export interface FolderDeleteOut { - /** - * - * @type {Date} - * @memberof FolderDeleteOut - */ - deletedAt: Date; - /** - * - * @type {string} - * @memberof FolderDeleteOut - */ - id: string; - /** - * - * @type {number} - * @memberof FolderDeleteOut - */ - nArtifactsDeleted: number; - /** - * - * @type {number} - * @memberof FolderDeleteOut - */ - nSubfoldersDeleted: number; - /** - * - * @type {boolean} - * @memberof FolderDeleteOut - */ - ok?: boolean; - /** - * - * @type {string} - * @memberof FolderDeleteOut - */ - path: string; - /** - * - * @type {Date} - * @memberof FolderDeleteOut - */ - purgeAt: Date; - /** - * - * @type {number} - * @memberof FolderDeleteOut - */ - retentionDays: number; -} - -/** - * Check if a given object implements the FolderDeleteOut interface. - */ -export function instanceOfFolderDeleteOut(value: object): value is FolderDeleteOut { - if ((!('deletedAt' in (value as Record)) && !('deleted_at' in (value as Record))) || ((value as Record)['deletedAt'] === undefined && (value as Record)['deleted_at'] === undefined)) return false; - if (!('id' in value) || value['id'] === undefined) return false; - if ((!('nArtifactsDeleted' in (value as Record)) && !('n_artifacts_deleted' in (value as Record))) || ((value as Record)['nArtifactsDeleted'] === undefined && (value as Record)['n_artifacts_deleted'] === undefined)) return false; - if ((!('nSubfoldersDeleted' in (value as Record)) && !('n_subfolders_deleted' in (value as Record))) || ((value as Record)['nSubfoldersDeleted'] === undefined && (value as Record)['n_subfolders_deleted'] === undefined)) return false; - if (!('path' in value) || value['path'] === undefined) return false; - if ((!('purgeAt' in (value as Record)) && !('purge_at' in (value as Record))) || ((value as Record)['purgeAt'] === undefined && (value as Record)['purge_at'] === undefined)) return false; - if ((!('retentionDays' in (value as Record)) && !('retention_days' in (value as Record))) || ((value as Record)['retentionDays'] === undefined && (value as Record)['retention_days'] === undefined)) return false; - return true; -} - -export function FolderDeleteOutFromJSON(json: any): FolderDeleteOut { - return FolderDeleteOutFromJSONTyped(json, false); -} - -export function FolderDeleteOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): FolderDeleteOut { - if (json == null) { - return json; - } - return { - - 'deletedAt': (new Date(json['deleted_at'])), - 'id': json['id'], - 'nArtifactsDeleted': json['n_artifacts_deleted'], - 'nSubfoldersDeleted': json['n_subfolders_deleted'], - 'ok': json['ok'] == null ? undefined : json['ok'], - 'path': json['path'], - 'purgeAt': (new Date(json['purge_at'])), - 'retentionDays': json['retention_days'], - }; -} - -export function FolderDeleteOutToJSON(json: any): FolderDeleteOut { - return FolderDeleteOutToJSONTyped(json, false); -} - -export function FolderDeleteOutToJSONTyped(value?: FolderDeleteOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'deleted_at': value['deletedAt'].toISOString(), - 'id': value['id'], - 'n_artifacts_deleted': value['nArtifactsDeleted'], - 'n_subfolders_deleted': value['nSubfoldersDeleted'], - 'ok': value['ok'], - 'path': value['path'], - 'purge_at': value['purgeAt'].toISOString(), - 'retention_days': value['retentionDays'], - }; -} diff --git a/sdk/typescript/src/models/FolderListOut.ts b/sdk/typescript/src/models/FolderListOut.ts new file mode 100644 index 0000000..14ba18b --- /dev/null +++ b/sdk/typescript/src/models/FolderListOut.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { FolderOut } from './FolderOut'; +import { + FolderOutFromJSON, + FolderOutFromJSONTyped, + FolderOutToJSON, + FolderOutToJSONTyped, +} from './FolderOut'; + +/** + * + * @export + * @interface FolderListOut + */ +export interface FolderListOut { + /** + * + * @type {Array} + * @memberof FolderListOut + */ + items: Array; + /** + * + * @type {string} + * @memberof FolderListOut + */ + nextCursor: string | null; +} + +/** + * Check if a given object implements the FolderListOut interface. + */ +export function instanceOfFolderListOut(value: object): value is FolderListOut { + if (!('items' in value) || value['items'] === undefined) return false; + if ((!('nextCursor' in (value as Record)) && !('next_cursor' in (value as Record))) || ((value as Record)['nextCursor'] === undefined && (value as Record)['next_cursor'] === undefined)) return false; + return true; +} + +export function FolderListOutFromJSON(json: any): FolderListOut { + return FolderListOutFromJSONTyped(json, false); +} + +export function FolderListOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): FolderListOut { + if (json == null) { + return json; + } + return { + + 'items': ((json['items'] as Array).map(FolderOutFromJSON)), + 'nextCursor': json['next_cursor'], + }; +} + +export function FolderListOutToJSON(json: any): FolderListOut { + return FolderListOutToJSONTyped(json, false); +} + +export function FolderListOutToJSONTyped(value?: FolderListOut | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': ((value['items'] as Array).map(FolderOutToJSON)), + 'next_cursor': value['nextCursor'], + }; +} diff --git a/sdk/typescript/src/models/FolderMoveIn.ts b/sdk/typescript/src/models/FolderMoveIn.ts deleted file mode 100644 index 8126f61..0000000 --- a/sdk/typescript/src/models/FolderMoveIn.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * POST /v0/folders/{fld_id}/move body — rename / move. - * @export - * @interface FolderMoveIn - */ -export interface FolderMoveIn { - /** - * - * @type {string} - * @memberof FolderMoveIn - */ - path: string; -} - -/** - * Check if a given object implements the FolderMoveIn interface. - */ -export function instanceOfFolderMoveIn(value: object): value is FolderMoveIn { - if (!('path' in value) || value['path'] === undefined) return false; - return true; -} - -export function FolderMoveInFromJSON(json: any): FolderMoveIn { - return FolderMoveInFromJSONTyped(json, false); -} - -export function FolderMoveInFromJSONTyped(json: any, ignoreDiscriminator: boolean): FolderMoveIn { - if (json == null) { - return json; - } - return { - - 'path': json['path'], - }; -} - -export function FolderMoveInToJSON(json: any): FolderMoveIn { - return FolderMoveInToJSONTyped(json, false); -} - -export function FolderMoveInToJSONTyped(value?: FolderMoveIn | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'path': value['path'], - }; -} diff --git a/sdk/typescript/src/models/FolderOut.ts b/sdk/typescript/src/models/FolderOut.ts index 2cb9293..0063e22 100644 --- a/sdk/typescript/src/models/FolderOut.ts +++ b/sdk/typescript/src/models/FolderOut.ts @@ -2,7 +2,7 @@ /* eslint-disable */ /** * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. * * The version of the OpenAPI document: * @@ -14,9 +14,7 @@ import { mapValues } from '../runtime'; /** - * Folder resource (folders+permalinks design §13). `path` is the - * canonical leading+trailing-slash form. Access is expressed through - * grants (permission-sharing-design §4.4), not a folder-level flag. + * * @export * @interface FolderOut */ @@ -32,55 +30,55 @@ export interface FolderOut { * @type {Date} * @memberof FolderOut */ - deletedAt?: Date | null; + deletedAt: Date | null; /** * * @type {string} * @memberof FolderOut */ - description?: string | null; + driveId: string; /** * - * @type {string} + * @type {FolderOutGrantInheritanceEnum} * @memberof FolderOut */ - driveId: string; + grantInheritance: FolderOutGrantInheritanceEnum; /** * * @type {string} * @memberof FolderOut */ - etag: string; + id: string; /** * - * @type {string} + * @type {{ [key: string]: any; }} * @memberof FolderOut */ - id: string; + metadata: { [key: string]: any; }; /** * - * @type {boolean} + * @type {string} * @memberof FolderOut */ - inheritGrants?: boolean; + name: string | null; /** * - * @type {number} + * @type {string} * @memberof FolderOut */ - metageneration?: number; + parentId: string | null; /** * * @type {string} * @memberof FolderOut */ - path: string; + revision: string; /** * - * @type {Date} + * @type {FolderOutStateEnum} * @memberof FolderOut */ - purgeAt?: Date | null; + state: FolderOutStateEnum; /** * * @type {Date} @@ -89,15 +87,40 @@ export interface FolderOut { updatedAt: Date; } + +/** + * @export + */ +export const FolderOutGrantInheritanceEnum = { + Inherit: 'inherit', + Sealed: 'sealed' +} as const; +export type FolderOutGrantInheritanceEnum = typeof FolderOutGrantInheritanceEnum[keyof typeof FolderOutGrantInheritanceEnum]; + +/** + * @export + */ +export const FolderOutStateEnum = { + Active: 'active', + Deleted: 'deleted' +} as const; +export type FolderOutStateEnum = typeof FolderOutStateEnum[keyof typeof FolderOutStateEnum]; + + /** * Check if a given object implements the FolderOut interface. */ export function instanceOfFolderOut(value: object): value is FolderOut { if ((!('createdAt' in (value as Record)) && !('created_at' in (value as Record))) || ((value as Record)['createdAt'] === undefined && (value as Record)['created_at'] === undefined)) return false; + if ((!('deletedAt' in (value as Record)) && !('deleted_at' in (value as Record))) || ((value as Record)['deletedAt'] === undefined && (value as Record)['deleted_at'] === undefined)) return false; if ((!('driveId' in (value as Record)) && !('drive_id' in (value as Record))) || ((value as Record)['driveId'] === undefined && (value as Record)['drive_id'] === undefined)) return false; - if (!('etag' in value) || value['etag'] === undefined) return false; + if ((!('grantInheritance' in (value as Record)) && !('grant_inheritance' in (value as Record))) || ((value as Record)['grantInheritance'] === undefined && (value as Record)['grant_inheritance'] === undefined)) return false; if (!('id' in value) || value['id'] === undefined) return false; - if (!('path' in value) || value['path'] === undefined) return false; + if (!('metadata' in value) || value['metadata'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if ((!('parentId' in (value as Record)) && !('parent_id' in (value as Record))) || ((value as Record)['parentId'] === undefined && (value as Record)['parent_id'] === undefined)) return false; + if (!('revision' in value) || value['revision'] === undefined) return false; + if (!('state' in value) || value['state'] === undefined) return false; if ((!('updatedAt' in (value as Record)) && !('updated_at' in (value as Record))) || ((value as Record)['updatedAt'] === undefined && (value as Record)['updated_at'] === undefined)) return false; return true; } @@ -113,15 +136,15 @@ export function FolderOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): return { 'createdAt': (new Date(json['created_at'])), - 'deletedAt': json['deleted_at'] === undefined ? undefined : json['deleted_at'] === null ? null : (new Date(json['deleted_at'])), - 'description': json['description'] === undefined ? undefined : json['description'] === null ? null : json['description'], + 'deletedAt': (json['deleted_at'] == null ? null : new Date(json['deleted_at'])), 'driveId': json['drive_id'], - 'etag': json['etag'], + 'grantInheritance': json['grant_inheritance'], 'id': json['id'], - 'inheritGrants': json['inherit_grants'] == null ? undefined : json['inherit_grants'], - 'metageneration': json['metageneration'] == null ? undefined : json['metageneration'], - 'path': json['path'], - 'purgeAt': json['purge_at'] === undefined ? undefined : json['purge_at'] === null ? null : (new Date(json['purge_at'])), + 'metadata': json['metadata'], + 'name': json['name'], + 'parentId': json['parent_id'], + 'revision': json['revision'], + 'state': json['state'], 'updatedAt': (new Date(json['updated_at'])), }; } @@ -139,14 +162,14 @@ export function FolderOutToJSONTyped(value?: FolderOut | null, ignoreDiscriminat 'created_at': value['createdAt'].toISOString(), 'deleted_at': value['deletedAt'] == null ? value['deletedAt'] : value['deletedAt'].toISOString(), - 'description': value['description'], 'drive_id': value['driveId'], - 'etag': value['etag'], + 'grant_inheritance': value['grantInheritance'], 'id': value['id'], - 'inherit_grants': value['inheritGrants'], - 'metageneration': value['metageneration'], - 'path': value['path'], - 'purge_at': value['purgeAt'] == null ? value['purgeAt'] : value['purgeAt'].toISOString(), + 'metadata': value['metadata'], + 'name': value['name'], + 'parent_id': value['parentId'], + 'revision': value['revision'], + 'state': value['state'], 'updated_at': value['updatedAt'].toISOString(), }; } diff --git a/sdk/typescript/src/models/FolderPatchIn.ts b/sdk/typescript/src/models/FolderPatchIn.ts deleted file mode 100644 index d207553..0000000 --- a/sdk/typescript/src/models/FolderPatchIn.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * PATCH /v0/folders/{fld_id} body — partial update. Field absence = - * unchanged. `description`: explicit null = clear. `inherit_grants`: - * non-nullable — null/absent = unchanged (it cannot be cleared, only - * flipped true/false). - * @export - * @interface FolderPatchIn - */ -export interface FolderPatchIn { - /** - * - * @type {string} - * @memberof FolderPatchIn - */ - description?: string | null; - /** - * - * @type {boolean} - * @memberof FolderPatchIn - */ - inheritGrants?: boolean | null; -} - -/** - * Check if a given object implements the FolderPatchIn interface. - */ -export function instanceOfFolderPatchIn(value: object): value is FolderPatchIn { - return true; -} - -export function FolderPatchInFromJSON(json: any): FolderPatchIn { - return FolderPatchInFromJSONTyped(json, false); -} - -export function FolderPatchInFromJSONTyped(json: any, ignoreDiscriminator: boolean): FolderPatchIn { - if (json == null) { - return json; - } - return { - - 'description': json['description'] === undefined ? undefined : json['description'] === null ? null : json['description'], - 'inheritGrants': json['inherit_grants'] === undefined ? undefined : json['inherit_grants'] === null ? null : json['inherit_grants'], - }; -} - -export function FolderPatchInToJSON(json: any): FolderPatchIn { - return FolderPatchInToJSONTyped(json, false); -} - -export function FolderPatchInToJSONTyped(value?: FolderPatchIn | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'description': value['description'], - 'inherit_grants': value['inheritGrants'], - }; -} diff --git a/sdk/typescript/src/models/FolderRestoreOut.ts b/sdk/typescript/src/models/FolderRestoreOut.ts deleted file mode 100644 index 67b22b0..0000000 --- a/sdk/typescript/src/models/FolderRestoreOut.ts +++ /dev/null @@ -1,172 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * POST /v0/folders/{fld_id}/restore response — the restored (live) - * folder resource (same shape as `FolderOut`) plus the cascade counts - * from `core.folders.restore_cascade` (dashboard-file-operations-design - * §4.5), so the caller can confirm the scope of what came back with - * the root. - * @export - * @interface FolderRestoreOut - */ -export interface FolderRestoreOut { - /** - * - * @type {Date} - * @memberof FolderRestoreOut - */ - createdAt: Date; - /** - * - * @type {Date} - * @memberof FolderRestoreOut - */ - deletedAt?: Date | null; - /** - * - * @type {string} - * @memberof FolderRestoreOut - */ - description?: string | null; - /** - * - * @type {string} - * @memberof FolderRestoreOut - */ - driveId: string; - /** - * - * @type {string} - * @memberof FolderRestoreOut - */ - etag: string; - /** - * - * @type {string} - * @memberof FolderRestoreOut - */ - id: string; - /** - * - * @type {boolean} - * @memberof FolderRestoreOut - */ - inheritGrants?: boolean; - /** - * - * @type {number} - * @memberof FolderRestoreOut - */ - metageneration?: number; - /** - * - * @type {number} - * @memberof FolderRestoreOut - */ - nArtifactsRestored: number; - /** - * - * @type {number} - * @memberof FolderRestoreOut - */ - nSubfoldersRestored: number; - /** - * - * @type {string} - * @memberof FolderRestoreOut - */ - path: string; - /** - * - * @type {Date} - * @memberof FolderRestoreOut - */ - purgeAt?: Date | null; - /** - * - * @type {Date} - * @memberof FolderRestoreOut - */ - updatedAt: Date; -} - -/** - * Check if a given object implements the FolderRestoreOut interface. - */ -export function instanceOfFolderRestoreOut(value: object): value is FolderRestoreOut { - if ((!('createdAt' in (value as Record)) && !('created_at' in (value as Record))) || ((value as Record)['createdAt'] === undefined && (value as Record)['created_at'] === undefined)) return false; - if ((!('driveId' in (value as Record)) && !('drive_id' in (value as Record))) || ((value as Record)['driveId'] === undefined && (value as Record)['drive_id'] === undefined)) return false; - if (!('etag' in value) || value['etag'] === undefined) return false; - if (!('id' in value) || value['id'] === undefined) return false; - if ((!('nArtifactsRestored' in (value as Record)) && !('n_artifacts_restored' in (value as Record))) || ((value as Record)['nArtifactsRestored'] === undefined && (value as Record)['n_artifacts_restored'] === undefined)) return false; - if ((!('nSubfoldersRestored' in (value as Record)) && !('n_subfolders_restored' in (value as Record))) || ((value as Record)['nSubfoldersRestored'] === undefined && (value as Record)['n_subfolders_restored'] === undefined)) return false; - if (!('path' in value) || value['path'] === undefined) return false; - if ((!('updatedAt' in (value as Record)) && !('updated_at' in (value as Record))) || ((value as Record)['updatedAt'] === undefined && (value as Record)['updated_at'] === undefined)) return false; - return true; -} - -export function FolderRestoreOutFromJSON(json: any): FolderRestoreOut { - return FolderRestoreOutFromJSONTyped(json, false); -} - -export function FolderRestoreOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): FolderRestoreOut { - if (json == null) { - return json; - } - return { - - 'createdAt': (new Date(json['created_at'])), - 'deletedAt': json['deleted_at'] === undefined ? undefined : json['deleted_at'] === null ? null : (new Date(json['deleted_at'])), - 'description': json['description'] === undefined ? undefined : json['description'] === null ? null : json['description'], - 'driveId': json['drive_id'], - 'etag': json['etag'], - 'id': json['id'], - 'inheritGrants': json['inherit_grants'] == null ? undefined : json['inherit_grants'], - 'metageneration': json['metageneration'] == null ? undefined : json['metageneration'], - 'nArtifactsRestored': json['n_artifacts_restored'], - 'nSubfoldersRestored': json['n_subfolders_restored'], - 'path': json['path'], - 'purgeAt': json['purge_at'] === undefined ? undefined : json['purge_at'] === null ? null : (new Date(json['purge_at'])), - 'updatedAt': (new Date(json['updated_at'])), - }; -} - -export function FolderRestoreOutToJSON(json: any): FolderRestoreOut { - return FolderRestoreOutToJSONTyped(json, false); -} - -export function FolderRestoreOutToJSONTyped(value?: FolderRestoreOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'created_at': value['createdAt'].toISOString(), - 'deleted_at': value['deletedAt'] == null ? value['deletedAt'] : value['deletedAt'].toISOString(), - 'description': value['description'], - 'drive_id': value['driveId'], - 'etag': value['etag'], - 'id': value['id'], - 'inherit_grants': value['inheritGrants'], - 'metageneration': value['metageneration'], - 'n_artifacts_restored': value['nArtifactsRestored'], - 'n_subfolders_restored': value['nSubfoldersRestored'], - 'path': value['path'], - 'purge_at': value['purgeAt'] == null ? value['purgeAt'] : value['purgeAt'].toISOString(), - 'updated_at': value['updatedAt'].toISOString(), - }; -} diff --git a/sdk/typescript/src/models/FolderUpdateIn.ts b/sdk/typescript/src/models/FolderUpdateIn.ts new file mode 100644 index 0000000..221ca8e --- /dev/null +++ b/sdk/typescript/src/models/FolderUpdateIn.ts @@ -0,0 +1,100 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * PATCH /v0/drives/{id}/folders/{folder_id} body — at least one field is + * required. + * @export + * @interface FolderUpdateIn + */ +export interface FolderUpdateIn { + /** + * + * @type {FolderUpdateInGrantInheritanceEnum} + * @memberof FolderUpdateIn + */ + grantInheritance?: FolderUpdateInGrantInheritanceEnum | null; + /** + * + * @type {{ [key: string]: any; }} + * @memberof FolderUpdateIn + */ + metadata?: { [key: string]: any; } | null; + /** + * + * @type {string} + * @memberof FolderUpdateIn + */ + name?: string | null; + /** + * + * @type {string} + * @memberof FolderUpdateIn + */ + parentId?: string | null; +} + + +/** + * @export + */ +export const FolderUpdateInGrantInheritanceEnum = { + Inherit: 'inherit', + Sealed: 'sealed' +} as const; +export type FolderUpdateInGrantInheritanceEnum = typeof FolderUpdateInGrantInheritanceEnum[keyof typeof FolderUpdateInGrantInheritanceEnum]; + + +/** + * Check if a given object implements the FolderUpdateIn interface. + */ +export function instanceOfFolderUpdateIn(value: object): value is FolderUpdateIn { + return true; +} + +export function FolderUpdateInFromJSON(json: any): FolderUpdateIn { + return FolderUpdateInFromJSONTyped(json, false); +} + +export function FolderUpdateInFromJSONTyped(json: any, ignoreDiscriminator: boolean): FolderUpdateIn { + if (json == null) { + return json; + } + return { + + 'grantInheritance': json['grant_inheritance'] === undefined ? undefined : json['grant_inheritance'] === null ? null : json['grant_inheritance'], + 'metadata': json['metadata'] === undefined ? undefined : json['metadata'] === null ? null : json['metadata'], + 'name': json['name'] === undefined ? undefined : json['name'] === null ? null : json['name'], + 'parentId': json['parent_id'] === undefined ? undefined : json['parent_id'] === null ? null : json['parent_id'], + }; +} + +export function FolderUpdateInToJSON(json: any): FolderUpdateIn { + return FolderUpdateInToJSONTyped(json, false); +} + +export function FolderUpdateInToJSONTyped(value?: FolderUpdateIn | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'grant_inheritance': value['grantInheritance'], + 'metadata': value['metadata'], + 'name': value['name'], + 'parent_id': value['parentId'], + }; +} diff --git a/sdk/typescript/src/models/GrantCreateIn.ts b/sdk/typescript/src/models/GrantCreateIn.ts index bdc0c86..a75e6fe 100644 --- a/sdk/typescript/src/models/GrantCreateIn.ts +++ b/sdk/typescript/src/models/GrantCreateIn.ts @@ -2,7 +2,7 @@ /* eslint-disable */ /** * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. * * The version of the OpenAPI document: * @@ -13,40 +13,42 @@ */ import { mapValues } from '../runtime'; -import type { GrantPrincipalIn } from './GrantPrincipalIn'; -import { - GrantPrincipalInFromJSON, - GrantPrincipalInFromJSONTyped, - GrantPrincipalInToJSON, - GrantPrincipalInToJSONTyped, -} from './GrantPrincipalIn'; - /** - * POST /v0/grants body. `resource` is an `art_*`/`fld_*` id or a path - * (resolved within the caller's drive). `expires_in` is seconds from now - * (omit for a permanent grant). + * POST /v0/drives/{id}/grants body. * @export * @interface GrantCreateIn */ export interface GrantCreateIn { /** * - * @type {number} + * @type {Date} + * @memberof GrantCreateIn + */ + expiresAt?: Date | null; + /** + * + * @type {string} * @memberof GrantCreateIn */ - expiresIn?: number | null; + principalId?: string | null; /** * - * @type {GrantPrincipalIn} + * @type {GrantCreateInPrincipalTypeEnum} * @memberof GrantCreateIn */ - principal: GrantPrincipalIn; + principalType: GrantCreateInPrincipalTypeEnum; /** * * @type {string} * @memberof GrantCreateIn */ - resource: string; + resourceId: string; + /** + * + * @type {GrantCreateInResourceTypeEnum} + * @memberof GrantCreateIn + */ + resourceType: GrantCreateInResourceTypeEnum; /** * * @type {GrantCreateInRoleEnum} @@ -56,12 +58,32 @@ export interface GrantCreateIn { } +/** + * @export + */ +export const GrantCreateInPrincipalTypeEnum = { + Agent: 'agent', + User: 'user', + Workspace: 'workspace', + Public: 'public' +} as const; +export type GrantCreateInPrincipalTypeEnum = typeof GrantCreateInPrincipalTypeEnum[keyof typeof GrantCreateInPrincipalTypeEnum]; + +/** + * @export + */ +export const GrantCreateInResourceTypeEnum = { + Drive: 'drive', + Folder: 'folder', + Artifact: 'artifact' +} as const; +export type GrantCreateInResourceTypeEnum = typeof GrantCreateInResourceTypeEnum[keyof typeof GrantCreateInResourceTypeEnum]; + /** * @export */ export const GrantCreateInRoleEnum = { Viewer: 'viewer', - Commenter: 'commenter', Editor: 'editor', Manager: 'manager' } as const; @@ -72,8 +94,9 @@ export type GrantCreateInRoleEnum = typeof GrantCreateInRoleEnum[keyof typeof Gr * Check if a given object implements the GrantCreateIn interface. */ export function instanceOfGrantCreateIn(value: object): value is GrantCreateIn { - if (!('principal' in value) || value['principal'] === undefined) return false; - if (!('resource' in value) || value['resource'] === undefined) return false; + if ((!('principalType' in (value as Record)) && !('principal_type' in (value as Record))) || ((value as Record)['principalType'] === undefined && (value as Record)['principal_type'] === undefined)) return false; + if ((!('resourceId' in (value as Record)) && !('resource_id' in (value as Record))) || ((value as Record)['resourceId'] === undefined && (value as Record)['resource_id'] === undefined)) return false; + if ((!('resourceType' in (value as Record)) && !('resource_type' in (value as Record))) || ((value as Record)['resourceType'] === undefined && (value as Record)['resource_type'] === undefined)) return false; if (!('role' in value) || value['role'] === undefined) return false; return true; } @@ -88,9 +111,11 @@ export function GrantCreateInFromJSONTyped(json: any, ignoreDiscriminator: boole } return { - 'expiresIn': json['expires_in'] === undefined ? undefined : json['expires_in'] === null ? null : json['expires_in'], - 'principal': GrantPrincipalInFromJSON(json['principal']), - 'resource': json['resource'], + 'expiresAt': json['expires_at'] === undefined ? undefined : json['expires_at'] === null ? null : (new Date(json['expires_at'])), + 'principalId': json['principal_id'] === undefined ? undefined : json['principal_id'] === null ? null : json['principal_id'], + 'principalType': json['principal_type'], + 'resourceId': json['resource_id'], + 'resourceType': json['resource_type'], 'role': json['role'], }; } @@ -106,9 +131,11 @@ export function GrantCreateInToJSONTyped(value?: GrantCreateIn | null, ignoreDis return { - 'expires_in': value['expiresIn'], - 'principal': GrantPrincipalInToJSON(value['principal']), - 'resource': value['resource'], + 'expires_at': value['expiresAt'] == null ? value['expiresAt'] : value['expiresAt'].toISOString(), + 'principal_id': value['principalId'], + 'principal_type': value['principalType'], + 'resource_id': value['resourceId'], + 'resource_type': value['resourceType'], 'role': value['role'], }; } diff --git a/sdk/typescript/src/models/GrantList.ts b/sdk/typescript/src/models/GrantList.ts deleted file mode 100644 index 34a041c..0000000 --- a/sdk/typescript/src/models/GrantList.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { GrantOut } from './GrantOut'; -import { - GrantOutFromJSON, - GrantOutFromJSONTyped, - GrantOutToJSON, - GrantOutToJSONTyped, -} from './GrantOut'; - -/** - * - * @export - * @interface GrantList - */ -export interface GrantList { - /** - * - * @type {Array} - * @memberof GrantList - */ - items: Array; - /** - * - * @type {string} - * @memberof GrantList - */ - nextCursor?: string | null; -} - -/** - * Check if a given object implements the GrantList interface. - */ -export function instanceOfGrantList(value: object): value is GrantList { - if (!('items' in value) || value['items'] === undefined) return false; - return true; -} - -export function GrantListFromJSON(json: any): GrantList { - return GrantListFromJSONTyped(json, false); -} - -export function GrantListFromJSONTyped(json: any, ignoreDiscriminator: boolean): GrantList { - if (json == null) { - return json; - } - return { - - 'items': ((json['items'] as Array).map(GrantOutFromJSON)), - 'nextCursor': json['next_cursor'] === undefined ? undefined : json['next_cursor'] === null ? null : json['next_cursor'], - }; -} - -export function GrantListToJSON(json: any): GrantList { - return GrantListToJSONTyped(json, false); -} - -export function GrantListToJSONTyped(value?: GrantList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'items': ((value['items'] as Array).map(GrantOutToJSON)), - 'next_cursor': value['nextCursor'], - }; -} diff --git a/sdk/typescript/src/models/GrantListOut.ts b/sdk/typescript/src/models/GrantListOut.ts new file mode 100644 index 0000000..857fa73 --- /dev/null +++ b/sdk/typescript/src/models/GrantListOut.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { GrantOut } from './GrantOut'; +import { + GrantOutFromJSON, + GrantOutFromJSONTyped, + GrantOutToJSON, + GrantOutToJSONTyped, +} from './GrantOut'; + +/** + * + * @export + * @interface GrantListOut + */ +export interface GrantListOut { + /** + * + * @type {Array} + * @memberof GrantListOut + */ + items: Array; + /** + * + * @type {string} + * @memberof GrantListOut + */ + nextCursor: string | null; +} + +/** + * Check if a given object implements the GrantListOut interface. + */ +export function instanceOfGrantListOut(value: object): value is GrantListOut { + if (!('items' in value) || value['items'] === undefined) return false; + if ((!('nextCursor' in (value as Record)) && !('next_cursor' in (value as Record))) || ((value as Record)['nextCursor'] === undefined && (value as Record)['next_cursor'] === undefined)) return false; + return true; +} + +export function GrantListOutFromJSON(json: any): GrantListOut { + return GrantListOutFromJSONTyped(json, false); +} + +export function GrantListOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): GrantListOut { + if (json == null) { + return json; + } + return { + + 'items': ((json['items'] as Array).map(GrantOutFromJSON)), + 'nextCursor': json['next_cursor'], + }; +} + +export function GrantListOutToJSON(json: any): GrantListOut { + return GrantListOutToJSONTyped(json, false); +} + +export function GrantListOutToJSONTyped(value?: GrantListOut | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': ((value['items'] as Array).map(GrantOutToJSON)), + 'next_cursor': value['nextCursor'], + }; +} diff --git a/sdk/typescript/src/models/GrantOut.ts b/sdk/typescript/src/models/GrantOut.ts index 88877b1..565c99c 100644 --- a/sdk/typescript/src/models/GrantOut.ts +++ b/sdk/typescript/src/models/GrantOut.ts @@ -2,7 +2,7 @@ /* eslint-disable */ /** * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. * * The version of the OpenAPI document: * @@ -14,42 +14,29 @@ import { mapValues } from '../runtime'; /** - * A live grant. Audit fields (`granted_by_*`, `on_behalf_of`) are - * surfaced so a manager can see who shared what. + * * @export * @interface GrantOut */ export interface GrantOut { - /** - * - * @type {number} - * @memberof GrantOut - */ - artifactsAffected?: number | null; /** * * @type {Date} * @memberof GrantOut */ createdAt: Date; - /** - * - * @type {Date} - * @memberof GrantOut - */ - expiresAt?: Date | null; /** * * @type {string} * @memberof GrantOut */ - grantedById: string; + driveId: string; /** * - * @type {string} + * @type {Date} * @memberof GrantOut */ - grantedByType: string; + expiresAt: Date | null; /** * * @type {string} @@ -61,43 +48,49 @@ export interface GrantOut { * @type {string} * @memberof GrantOut */ - onBehalfOf?: string | null; + principalId: string | null; /** * - * @type {string} + * @type {GrantOutPrincipalTypeEnum} * @memberof GrantOut */ - principalEmail?: string | null; + principalType: GrantOutPrincipalTypeEnum; /** * * @type {string} * @memberof GrantOut */ - principalId?: string | null; + resourceId: string; /** * - * @type {GrantOutPrincipalTypeEnum} + * @type {GrantOutResourceTypeEnum} * @memberof GrantOut */ - principalType: GrantOutPrincipalTypeEnum; + resourceType: GrantOutResourceTypeEnum; /** * * @type {string} * @memberof GrantOut */ - resourceId: string; + revision: string; /** * - * @type {GrantOutResourceTypeEnum} + * @type {Date} * @memberof GrantOut */ - resourceType: GrantOutResourceTypeEnum; + revokedAt: Date | null; /** * * @type {GrantOutRoleEnum} * @memberof GrantOut */ role: GrantOutRoleEnum; + /** + * + * @type {GrantOutStateEnum} + * @memberof GrantOut + */ + state: GrantOutStateEnum; } @@ -105,10 +98,10 @@ export interface GrantOut { * @export */ export const GrantOutPrincipalTypeEnum = { - User: 'user', Agent: 'agent', - Org: 'org', - Anyone: 'anyone' + User: 'user', + Workspace: 'workspace', + Public: 'public' } as const; export type GrantOutPrincipalTypeEnum = typeof GrantOutPrincipalTypeEnum[keyof typeof GrantOutPrincipalTypeEnum]; @@ -116,8 +109,9 @@ export type GrantOutPrincipalTypeEnum = typeof GrantOutPrincipalTypeEnum[keyof t * @export */ export const GrantOutResourceTypeEnum = { - Artifact: 'artifact', - Folder: 'folder' + Drive: 'drive', + Folder: 'folder', + Artifact: 'artifact' } as const; export type GrantOutResourceTypeEnum = typeof GrantOutResourceTypeEnum[keyof typeof GrantOutResourceTypeEnum]; @@ -126,25 +120,38 @@ export type GrantOutResourceTypeEnum = typeof GrantOutResourceTypeEnum[keyof typ */ export const GrantOutRoleEnum = { Viewer: 'viewer', - Commenter: 'commenter', Editor: 'editor', Manager: 'manager' } as const; export type GrantOutRoleEnum = typeof GrantOutRoleEnum[keyof typeof GrantOutRoleEnum]; +/** + * @export + */ +export const GrantOutStateEnum = { + Active: 'active', + Revoked: 'revoked', + Expired: 'expired' +} as const; +export type GrantOutStateEnum = typeof GrantOutStateEnum[keyof typeof GrantOutStateEnum]; + /** * Check if a given object implements the GrantOut interface. */ export function instanceOfGrantOut(value: object): value is GrantOut { if ((!('createdAt' in (value as Record)) && !('created_at' in (value as Record))) || ((value as Record)['createdAt'] === undefined && (value as Record)['created_at'] === undefined)) return false; - if ((!('grantedById' in (value as Record)) && !('granted_by_id' in (value as Record))) || ((value as Record)['grantedById'] === undefined && (value as Record)['granted_by_id'] === undefined)) return false; - if ((!('grantedByType' in (value as Record)) && !('granted_by_type' in (value as Record))) || ((value as Record)['grantedByType'] === undefined && (value as Record)['granted_by_type'] === undefined)) return false; + if ((!('driveId' in (value as Record)) && !('drive_id' in (value as Record))) || ((value as Record)['driveId'] === undefined && (value as Record)['drive_id'] === undefined)) return false; + if ((!('expiresAt' in (value as Record)) && !('expires_at' in (value as Record))) || ((value as Record)['expiresAt'] === undefined && (value as Record)['expires_at'] === undefined)) return false; if (!('id' in value) || value['id'] === undefined) return false; + if ((!('principalId' in (value as Record)) && !('principal_id' in (value as Record))) || ((value as Record)['principalId'] === undefined && (value as Record)['principal_id'] === undefined)) return false; if ((!('principalType' in (value as Record)) && !('principal_type' in (value as Record))) || ((value as Record)['principalType'] === undefined && (value as Record)['principal_type'] === undefined)) return false; if ((!('resourceId' in (value as Record)) && !('resource_id' in (value as Record))) || ((value as Record)['resourceId'] === undefined && (value as Record)['resource_id'] === undefined)) return false; if ((!('resourceType' in (value as Record)) && !('resource_type' in (value as Record))) || ((value as Record)['resourceType'] === undefined && (value as Record)['resource_type'] === undefined)) return false; + if (!('revision' in value) || value['revision'] === undefined) return false; + if ((!('revokedAt' in (value as Record)) && !('revoked_at' in (value as Record))) || ((value as Record)['revokedAt'] === undefined && (value as Record)['revoked_at'] === undefined)) return false; if (!('role' in value) || value['role'] === undefined) return false; + if (!('state' in value) || value['state'] === undefined) return false; return true; } @@ -158,19 +165,18 @@ export function GrantOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): } return { - 'artifactsAffected': json['artifacts_affected'] === undefined ? undefined : json['artifacts_affected'] === null ? null : json['artifacts_affected'], 'createdAt': (new Date(json['created_at'])), - 'expiresAt': json['expires_at'] === undefined ? undefined : json['expires_at'] === null ? null : (new Date(json['expires_at'])), - 'grantedById': json['granted_by_id'], - 'grantedByType': json['granted_by_type'], + 'driveId': json['drive_id'], + 'expiresAt': (json['expires_at'] == null ? null : new Date(json['expires_at'])), 'id': json['id'], - 'onBehalfOf': json['on_behalf_of'] === undefined ? undefined : json['on_behalf_of'] === null ? null : json['on_behalf_of'], - 'principalEmail': json['principal_email'] === undefined ? undefined : json['principal_email'] === null ? null : json['principal_email'], - 'principalId': json['principal_id'] === undefined ? undefined : json['principal_id'] === null ? null : json['principal_id'], + 'principalId': json['principal_id'], 'principalType': json['principal_type'], 'resourceId': json['resource_id'], 'resourceType': json['resource_type'], + 'revision': json['revision'], + 'revokedAt': (json['revoked_at'] == null ? null : new Date(json['revoked_at'])), 'role': json['role'], + 'state': json['state'], }; } @@ -185,18 +191,17 @@ export function GrantOutToJSONTyped(value?: GrantOut | null, ignoreDiscriminator return { - 'artifacts_affected': value['artifactsAffected'], 'created_at': value['createdAt'].toISOString(), + 'drive_id': value['driveId'], 'expires_at': value['expiresAt'] == null ? value['expiresAt'] : value['expiresAt'].toISOString(), - 'granted_by_id': value['grantedById'], - 'granted_by_type': value['grantedByType'], 'id': value['id'], - 'on_behalf_of': value['onBehalfOf'], - 'principal_email': value['principalEmail'], 'principal_id': value['principalId'], 'principal_type': value['principalType'], 'resource_id': value['resourceId'], 'resource_type': value['resourceType'], + 'revision': value['revision'], + 'revoked_at': value['revokedAt'] == null ? value['revokedAt'] : value['revokedAt'].toISOString(), 'role': value['role'], + 'state': value['state'], }; } diff --git a/sdk/typescript/src/models/GrantPatchIn.ts b/sdk/typescript/src/models/GrantPatchIn.ts deleted file mode 100644 index 81b147b..0000000 --- a/sdk/typescript/src/models/GrantPatchIn.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * PATCH /v0/grants/{grn_id} body. Field absence = unchanged; explicit - * `expires_in: null` clears the expiry (makes the grant permanent). - * @export - * @interface GrantPatchIn - */ -export interface GrantPatchIn { - /** - * - * @type {number} - * @memberof GrantPatchIn - */ - expiresIn?: number | null; - /** - * - * @type {GrantPatchInRoleEnum} - * @memberof GrantPatchIn - */ - role?: GrantPatchInRoleEnum | null; -} - - -/** - * @export - */ -export const GrantPatchInRoleEnum = { - Viewer: 'viewer', - Commenter: 'commenter', - Editor: 'editor', - Manager: 'manager' -} as const; -export type GrantPatchInRoleEnum = typeof GrantPatchInRoleEnum[keyof typeof GrantPatchInRoleEnum]; - - -/** - * Check if a given object implements the GrantPatchIn interface. - */ -export function instanceOfGrantPatchIn(value: object): value is GrantPatchIn { - return true; -} - -export function GrantPatchInFromJSON(json: any): GrantPatchIn { - return GrantPatchInFromJSONTyped(json, false); -} - -export function GrantPatchInFromJSONTyped(json: any, ignoreDiscriminator: boolean): GrantPatchIn { - if (json == null) { - return json; - } - return { - - 'expiresIn': json['expires_in'] === undefined ? undefined : json['expires_in'] === null ? null : json['expires_in'], - 'role': json['role'] === undefined ? undefined : json['role'] === null ? null : json['role'], - }; -} - -export function GrantPatchInToJSON(json: any): GrantPatchIn { - return GrantPatchInToJSONTyped(json, false); -} - -export function GrantPatchInToJSONTyped(value?: GrantPatchIn | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'expires_in': value['expiresIn'], - 'role': value['role'], - }; -} diff --git a/sdk/typescript/src/models/GrantPrincipalIn.ts b/sdk/typescript/src/models/GrantPrincipalIn.ts deleted file mode 100644 index 49f5324..0000000 --- a/sdk/typescript/src/models/GrantPrincipalIn.ts +++ /dev/null @@ -1,96 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Who a grant is for. `anyone` carries no id/email; `org`/`agent` - * require `id`; `user` requires exactly one of `id` / `email` (an email - * with no account becomes a pending-email invite resolved on sign-in). - * @export - * @interface GrantPrincipalIn - */ -export interface GrantPrincipalIn { - /** - * - * @type {string} - * @memberof GrantPrincipalIn - */ - email?: string | null; - /** - * - * @type {string} - * @memberof GrantPrincipalIn - */ - id?: string | null; - /** - * - * @type {GrantPrincipalInTypeEnum} - * @memberof GrantPrincipalIn - */ - type: GrantPrincipalInTypeEnum; -} - - -/** - * @export - */ -export const GrantPrincipalInTypeEnum = { - User: 'user', - Agent: 'agent', - Org: 'org', - Anyone: 'anyone' -} as const; -export type GrantPrincipalInTypeEnum = typeof GrantPrincipalInTypeEnum[keyof typeof GrantPrincipalInTypeEnum]; - - -/** - * Check if a given object implements the GrantPrincipalIn interface. - */ -export function instanceOfGrantPrincipalIn(value: object): value is GrantPrincipalIn { - if (!('type' in value) || value['type'] === undefined) return false; - return true; -} - -export function GrantPrincipalInFromJSON(json: any): GrantPrincipalIn { - return GrantPrincipalInFromJSONTyped(json, false); -} - -export function GrantPrincipalInFromJSONTyped(json: any, ignoreDiscriminator: boolean): GrantPrincipalIn { - if (json == null) { - return json; - } - return { - - 'email': json['email'] === undefined ? undefined : json['email'] === null ? null : json['email'], - 'id': json['id'] === undefined ? undefined : json['id'] === null ? null : json['id'], - 'type': json['type'], - }; -} - -export function GrantPrincipalInToJSON(json: any): GrantPrincipalIn { - return GrantPrincipalInToJSONTyped(json, false); -} - -export function GrantPrincipalInToJSONTyped(value?: GrantPrincipalIn | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'email': value['email'], - 'id': value['id'], - 'type': value['type'], - }; -} diff --git a/sdk/typescript/src/models/GrantUpdateIn.ts b/sdk/typescript/src/models/GrantUpdateIn.ts new file mode 100644 index 0000000..cbdcbe3 --- /dev/null +++ b/sdk/typescript/src/models/GrantUpdateIn.ts @@ -0,0 +1,86 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * PATCH /v0/drives/{id}/grants/{grant_id} body — at least one field is + * required. An explicit ``expires_at: null`` clears the expiry; omitting it + * leaves it unchanged. + * @export + * @interface GrantUpdateIn + */ +export interface GrantUpdateIn { + /** + * + * @type {Date} + * @memberof GrantUpdateIn + */ + expiresAt?: Date | null; + /** + * + * @type {GrantUpdateInRoleEnum} + * @memberof GrantUpdateIn + */ + role?: GrantUpdateInRoleEnum | null; +} + + +/** + * @export + */ +export const GrantUpdateInRoleEnum = { + Viewer: 'viewer', + Editor: 'editor', + Manager: 'manager' +} as const; +export type GrantUpdateInRoleEnum = typeof GrantUpdateInRoleEnum[keyof typeof GrantUpdateInRoleEnum]; + + +/** + * Check if a given object implements the GrantUpdateIn interface. + */ +export function instanceOfGrantUpdateIn(value: object): value is GrantUpdateIn { + return true; +} + +export function GrantUpdateInFromJSON(json: any): GrantUpdateIn { + return GrantUpdateInFromJSONTyped(json, false); +} + +export function GrantUpdateInFromJSONTyped(json: any, ignoreDiscriminator: boolean): GrantUpdateIn { + if (json == null) { + return json; + } + return { + + 'expiresAt': json['expires_at'] === undefined ? undefined : json['expires_at'] === null ? null : (new Date(json['expires_at'])), + 'role': json['role'] === undefined ? undefined : json['role'] === null ? null : json['role'], + }; +} + +export function GrantUpdateInToJSON(json: any): GrantUpdateIn { + return GrantUpdateInToJSONTyped(json, false); +} + +export function GrantUpdateInToJSONTyped(value?: GrantUpdateIn | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'expires_at': value['expiresAt'] == null ? value['expiresAt'] : value['expiresAt'].toISOString(), + 'role': value['role'], + }; +} diff --git a/sdk/typescript/src/models/HealthDegradedDetail.ts b/sdk/typescript/src/models/HealthDegradedDetail.ts index 6e3d282..7c970fa 100644 --- a/sdk/typescript/src/models/HealthDegradedDetail.ts +++ b/sdk/typescript/src/models/HealthDegradedDetail.ts @@ -2,7 +2,7 @@ /* eslint-disable */ /** * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. * * The version of the OpenAPI document: * diff --git a/sdk/typescript/src/models/HealthDegradedResponse.ts b/sdk/typescript/src/models/HealthDegradedResponse.ts index a97ac9f..786b299 100644 --- a/sdk/typescript/src/models/HealthDegradedResponse.ts +++ b/sdk/typescript/src/models/HealthDegradedResponse.ts @@ -2,7 +2,7 @@ /* eslint-disable */ /** * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. * * The version of the OpenAPI document: * diff --git a/sdk/typescript/src/models/HealthOut.ts b/sdk/typescript/src/models/HealthOut.ts index 5c1c320..82ec7a6 100644 --- a/sdk/typescript/src/models/HealthOut.ts +++ b/sdk/typescript/src/models/HealthOut.ts @@ -2,7 +2,7 @@ /* eslint-disable */ /** * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. * * The version of the OpenAPI document: * diff --git a/sdk/typescript/src/models/HourlyUsageCounterOut.ts b/sdk/typescript/src/models/HourlyUsageCounterOut.ts deleted file mode 100644 index 1245076..0000000 --- a/sdk/typescript/src/models/HourlyUsageCounterOut.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface HourlyUsageCounterOut - */ -export interface HourlyUsageCounterOut { - /** - * - * @type {number} - * @memberof HourlyUsageCounterOut - */ - limit: number; - /** - * - * @type {Date} - * @memberof HourlyUsageCounterOut - */ - resetAt: Date; - /** - * - * @type {number} - * @memberof HourlyUsageCounterOut - */ - used: number; -} - -/** - * Check if a given object implements the HourlyUsageCounterOut interface. - */ -export function instanceOfHourlyUsageCounterOut(value: object): value is HourlyUsageCounterOut { - if (!('limit' in value) || value['limit'] === undefined) return false; - if ((!('resetAt' in (value as Record)) && !('reset_at' in (value as Record))) || ((value as Record)['resetAt'] === undefined && (value as Record)['reset_at'] === undefined)) return false; - if (!('used' in value) || value['used'] === undefined) return false; - return true; -} - -export function HourlyUsageCounterOutFromJSON(json: any): HourlyUsageCounterOut { - return HourlyUsageCounterOutFromJSONTyped(json, false); -} - -export function HourlyUsageCounterOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): HourlyUsageCounterOut { - if (json == null) { - return json; - } - return { - - 'limit': json['limit'], - 'resetAt': (new Date(json['reset_at'])), - 'used': json['used'], - }; -} - -export function HourlyUsageCounterOutToJSON(json: any): HourlyUsageCounterOut { - return HourlyUsageCounterOutToJSONTyped(json, false); -} - -export function HourlyUsageCounterOutToJSONTyped(value?: HourlyUsageCounterOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'limit': value['limit'], - 'reset_at': value['resetAt'].toISOString(), - 'used': value['used'], - }; -} diff --git a/sdk/typescript/src/models/IdentityAssertionMetadataOut.ts b/sdk/typescript/src/models/IdentityAssertionMetadataOut.ts deleted file mode 100644 index 42ec413..0000000 --- a/sdk/typescript/src/models/IdentityAssertionMetadataOut.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface IdentityAssertionMetadataOut - */ -export interface IdentityAssertionMetadataOut { - [key: string]: any | any; - /** - * - * @type {string} - * @memberof IdentityAssertionMetadataOut - */ - alg: string; - /** - * - * @type {string} - * @memberof IdentityAssertionMetadataOut - */ - iss: string; - /** - * - * @type {number} - * @memberof IdentityAssertionMetadataOut - */ - version: number; -} - -/** - * Check if a given object implements the IdentityAssertionMetadataOut interface. - */ -export function instanceOfIdentityAssertionMetadataOut(value: object): value is IdentityAssertionMetadataOut { - if (!('alg' in value) || value['alg'] === undefined) return false; - if (!('iss' in value) || value['iss'] === undefined) return false; - if (!('version' in value) || value['version'] === undefined) return false; - return true; -} - -export function IdentityAssertionMetadataOutFromJSON(json: any): IdentityAssertionMetadataOut { - return IdentityAssertionMetadataOutFromJSONTyped(json, false); -} - -export function IdentityAssertionMetadataOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): IdentityAssertionMetadataOut { - if (json == null) { - return json; - } - return { - - ...json, - 'alg': json['alg'], - 'iss': json['iss'], - 'version': json['version'], - }; -} - -export function IdentityAssertionMetadataOutToJSON(json: any): IdentityAssertionMetadataOut { - return IdentityAssertionMetadataOutToJSONTyped(json, false); -} - -export function IdentityAssertionMetadataOutToJSONTyped(value?: IdentityAssertionMetadataOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - ...value, - 'alg': value['alg'], - 'iss': value['iss'], - 'version': value['version'], - }; -} diff --git a/sdk/typescript/src/models/InvitationList.ts b/sdk/typescript/src/models/InvitationList.ts deleted file mode 100644 index 14f32a7..0000000 --- a/sdk/typescript/src/models/InvitationList.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { InvitationOut } from './InvitationOut'; -import { - InvitationOutFromJSON, - InvitationOutFromJSONTyped, - InvitationOutToJSON, - InvitationOutToJSONTyped, -} from './InvitationOut'; - -/** - * - * @export - * @interface InvitationList - */ -export interface InvitationList { - /** - * - * @type {Array} - * @memberof InvitationList - */ - items: Array; - /** - * - * @type {string} - * @memberof InvitationList - */ - nextCursor?: string | null; -} - -/** - * Check if a given object implements the InvitationList interface. - */ -export function instanceOfInvitationList(value: object): value is InvitationList { - if (!('items' in value) || value['items'] === undefined) return false; - return true; -} - -export function InvitationListFromJSON(json: any): InvitationList { - return InvitationListFromJSONTyped(json, false); -} - -export function InvitationListFromJSONTyped(json: any, ignoreDiscriminator: boolean): InvitationList { - if (json == null) { - return json; - } - return { - - 'items': ((json['items'] as Array).map(InvitationOutFromJSON)), - 'nextCursor': json['next_cursor'] === undefined ? undefined : json['next_cursor'] === null ? null : json['next_cursor'], - }; -} - -export function InvitationListToJSON(json: any): InvitationList { - return InvitationListToJSONTyped(json, false); -} - -export function InvitationListToJSONTyped(value?: InvitationList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'items': ((value['items'] as Array).map(InvitationOutToJSON)), - 'next_cursor': value['nextCursor'], - }; -} diff --git a/sdk/typescript/src/models/InvitationOut.ts b/sdk/typescript/src/models/InvitationOut.ts deleted file mode 100644 index 3b23d36..0000000 --- a/sdk/typescript/src/models/InvitationOut.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * One workspace invitation — metadata only; the raw token is never - * surfaced over the API (it lives only in the invite email). - * @export - * @interface InvitationOut - */ -export interface InvitationOut { - /** - * - * @type {Date} - * @memberof InvitationOut - */ - createdAt: Date; - /** - * - * @type {string} - * @memberof InvitationOut - */ - email: string; - /** - * - * @type {Date} - * @memberof InvitationOut - */ - expiresAt: Date; - /** - * - * @type {string} - * @memberof InvitationOut - */ - id: string; - /** - * - * @type {string} - * @memberof InvitationOut - */ - invitedBy?: string | null; - /** - * - * @type {string} - * @memberof InvitationOut - */ - organizationId: string; - /** - * - * @type {InvitationOutRoleEnum} - * @memberof InvitationOut - */ - role: InvitationOutRoleEnum; - /** - * - * @type {InvitationOutStatusEnum} - * @memberof InvitationOut - */ - status: InvitationOutStatusEnum; -} - - -/** - * @export - */ -export const InvitationOutRoleEnum = { - Admin: 'admin', - Member: 'member' -} as const; -export type InvitationOutRoleEnum = typeof InvitationOutRoleEnum[keyof typeof InvitationOutRoleEnum]; - -/** - * @export - */ -export const InvitationOutStatusEnum = { - Pending: 'pending', - Accepted: 'accepted', - Revoked: 'revoked', - Expired: 'expired' -} as const; -export type InvitationOutStatusEnum = typeof InvitationOutStatusEnum[keyof typeof InvitationOutStatusEnum]; - - -/** - * Check if a given object implements the InvitationOut interface. - */ -export function instanceOfInvitationOut(value: object): value is InvitationOut { - if ((!('createdAt' in (value as Record)) && !('created_at' in (value as Record))) || ((value as Record)['createdAt'] === undefined && (value as Record)['created_at'] === undefined)) return false; - if (!('email' in value) || value['email'] === undefined) return false; - if ((!('expiresAt' in (value as Record)) && !('expires_at' in (value as Record))) || ((value as Record)['expiresAt'] === undefined && (value as Record)['expires_at'] === undefined)) return false; - if (!('id' in value) || value['id'] === undefined) return false; - if ((!('organizationId' in (value as Record)) && !('organization_id' in (value as Record))) || ((value as Record)['organizationId'] === undefined && (value as Record)['organization_id'] === undefined)) return false; - if (!('role' in value) || value['role'] === undefined) return false; - if (!('status' in value) || value['status'] === undefined) return false; - return true; -} - -export function InvitationOutFromJSON(json: any): InvitationOut { - return InvitationOutFromJSONTyped(json, false); -} - -export function InvitationOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): InvitationOut { - if (json == null) { - return json; - } - return { - - 'createdAt': (new Date(json['created_at'])), - 'email': json['email'], - 'expiresAt': (new Date(json['expires_at'])), - 'id': json['id'], - 'invitedBy': json['invited_by'] === undefined ? undefined : json['invited_by'] === null ? null : json['invited_by'], - 'organizationId': json['organization_id'], - 'role': json['role'], - 'status': json['status'], - }; -} - -export function InvitationOutToJSON(json: any): InvitationOut { - return InvitationOutToJSONTyped(json, false); -} - -export function InvitationOutToJSONTyped(value?: InvitationOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'created_at': value['createdAt'].toISOString(), - 'email': value['email'], - 'expires_at': value['expiresAt'].toISOString(), - 'id': value['id'], - 'invited_by': value['invitedBy'], - 'organization_id': value['organizationId'], - 'role': value['role'], - 'status': value['status'], - }; -} diff --git a/sdk/typescript/src/models/InviteCreateOut.ts b/sdk/typescript/src/models/InviteCreateOut.ts deleted file mode 100644 index 3cce148..0000000 --- a/sdk/typescript/src/models/InviteCreateOut.ts +++ /dev/null @@ -1,92 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { InvitationOut } from './InvitationOut'; -import { - InvitationOutFromJSON, - InvitationOutFromJSONTyped, - InvitationOutToJSON, - InvitationOutToJSONTyped, -} from './InvitationOut'; - -/** - * POST /v0/members/invite response. `already_member` is True when the - * email was already a live member (no invite created — a no-op success). - * `email_delivered` is False when the invite row was created but the - * notification email failed to send — the invite is still valid and can be - * resent, but the invitee has not yet received a link. - * @export - * @interface InviteCreateOut - */ -export interface InviteCreateOut { - /** - * - * @type {boolean} - * @memberof InviteCreateOut - */ - alreadyMember?: boolean; - /** - * - * @type {boolean} - * @memberof InviteCreateOut - */ - emailDelivered?: boolean; - /** - * - * @type {InvitationOut} - * @memberof InviteCreateOut - */ - invitation?: InvitationOut | null; -} - -/** - * Check if a given object implements the InviteCreateOut interface. - */ -export function instanceOfInviteCreateOut(value: object): value is InviteCreateOut { - return true; -} - -export function InviteCreateOutFromJSON(json: any): InviteCreateOut { - return InviteCreateOutFromJSONTyped(json, false); -} - -export function InviteCreateOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): InviteCreateOut { - if (json == null) { - return json; - } - return { - - 'alreadyMember': json['already_member'] == null ? undefined : json['already_member'], - 'emailDelivered': json['email_delivered'] == null ? undefined : json['email_delivered'], - 'invitation': json['invitation'] === undefined ? undefined : json['invitation'] === null ? null : InvitationOutFromJSON(json['invitation']), - }; -} - -export function InviteCreateOutToJSON(json: any): InviteCreateOut { - return InviteCreateOutToJSONTyped(json, false); -} - -export function InviteCreateOutToJSONTyped(value?: InviteCreateOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'already_member': value['alreadyMember'], - 'email_delivered': value['emailDelivered'], - 'invitation': InvitationOutToJSON(value['invitation']), - }; -} diff --git a/sdk/typescript/src/models/JwkOut.ts b/sdk/typescript/src/models/JwkOut.ts deleted file mode 100644 index 42a9c1e..0000000 --- a/sdk/typescript/src/models/JwkOut.ts +++ /dev/null @@ -1,113 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface JwkOut - */ -export interface JwkOut { - [key: string]: any | any; - /** - * - * @type {string} - * @memberof JwkOut - */ - alg: string; - /** - * - * @type {string} - * @memberof JwkOut - */ - e: string; - /** - * - * @type {string} - * @memberof JwkOut - */ - kid: string; - /** - * - * @type {string} - * @memberof JwkOut - */ - kty: string; - /** - * - * @type {string} - * @memberof JwkOut - */ - n: string; - /** - * - * @type {string} - * @memberof JwkOut - */ - use: string; -} - -/** - * Check if a given object implements the JwkOut interface. - */ -export function instanceOfJwkOut(value: object): value is JwkOut { - if (!('alg' in value) || value['alg'] === undefined) return false; - if (!('e' in value) || value['e'] === undefined) return false; - if (!('kid' in value) || value['kid'] === undefined) return false; - if (!('kty' in value) || value['kty'] === undefined) return false; - if (!('n' in value) || value['n'] === undefined) return false; - if (!('use' in value) || value['use'] === undefined) return false; - return true; -} - -export function JwkOutFromJSON(json: any): JwkOut { - return JwkOutFromJSONTyped(json, false); -} - -export function JwkOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): JwkOut { - if (json == null) { - return json; - } - return { - - ...json, - 'alg': json['alg'], - 'e': json['e'], - 'kid': json['kid'], - 'kty': json['kty'], - 'n': json['n'], - 'use': json['use'], - }; -} - -export function JwkOutToJSON(json: any): JwkOut { - return JwkOutToJSONTyped(json, false); -} - -export function JwkOutToJSONTyped(value?: JwkOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - ...value, - 'alg': value['alg'], - 'e': value['e'], - 'kid': value['kid'], - 'kty': value['kty'], - 'n': value['n'], - 'use': value['use'], - }; -} diff --git a/sdk/typescript/src/models/JwksOut.ts b/sdk/typescript/src/models/JwksOut.ts deleted file mode 100644 index bce4b48..0000000 --- a/sdk/typescript/src/models/JwksOut.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { JwkOut } from './JwkOut'; -import { - JwkOutFromJSON, - JwkOutFromJSONTyped, - JwkOutToJSON, - JwkOutToJSONTyped, -} from './JwkOut'; - -/** - * - * @export - * @interface JwksOut - */ -export interface JwksOut { - [key: string]: any | any; - /** - * - * @type {Array} - * @memberof JwksOut - */ - keys: Array; -} - -/** - * Check if a given object implements the JwksOut interface. - */ -export function instanceOfJwksOut(value: object): value is JwksOut { - if (!('keys' in value) || value['keys'] === undefined) return false; - return true; -} - -export function JwksOutFromJSON(json: any): JwksOut { - return JwksOutFromJSONTyped(json, false); -} - -export function JwksOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): JwksOut { - if (json == null) { - return json; - } - return { - - ...json, - 'keys': ((json['keys'] as Array).map(JwkOutFromJSON)), - }; -} - -export function JwksOutToJSON(json: any): JwksOut { - return JwksOutToJSONTyped(json, false); -} - -export function JwksOutToJSONTyped(value?: JwksOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - ...value, - 'keys': ((value['keys'] as Array).map(JwkOutToJSON)), - }; -} diff --git a/sdk/typescript/src/models/LocInner.ts b/sdk/typescript/src/models/LocInner.ts deleted file mode 100644 index f5ea970..0000000 --- a/sdk/typescript/src/models/LocInner.ts +++ /dev/null @@ -1,45 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface LocInner - */ -export interface LocInner { -} - -/** - * Check if a given object implements the LocInner interface. - */ -export function instanceOfLocInner(value: object): value is LocInner { - return true; -} - -export function LocInnerFromJSON(json: any): LocInner { - return LocInnerFromJSONTyped(json, false); -} - -export function LocInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): LocInner { - return json; -} - -export function LocInnerToJSON(json: any): LocInner { - return LocInnerToJSONTyped(json, false); -} - -export function LocInnerToJSONTyped(value?: LocInner | null, ignoreDiscriminator: boolean = false): any { - return value; -} diff --git a/sdk/typescript/src/models/LookupValuesIn.ts b/sdk/typescript/src/models/LookupValuesIn.ts deleted file mode 100644 index 11de0df..0000000 --- a/sdk/typescript/src/models/LookupValuesIn.ts +++ /dev/null @@ -1,82 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface LookupValuesIn - */ -export interface LookupValuesIn { - /** - * - * @type {string} - * @memberof LookupValuesIn - */ - column: string; - /** - * - * @type {string} - * @memberof LookupValuesIn - */ - dataset: string; - /** - * - * @type {number} - * @memberof LookupValuesIn - */ - limit?: number; -} - -/** - * Check if a given object implements the LookupValuesIn interface. - */ -export function instanceOfLookupValuesIn(value: object): value is LookupValuesIn { - if (!('column' in value) || value['column'] === undefined) return false; - if (!('dataset' in value) || value['dataset'] === undefined) return false; - return true; -} - -export function LookupValuesInFromJSON(json: any): LookupValuesIn { - return LookupValuesInFromJSONTyped(json, false); -} - -export function LookupValuesInFromJSONTyped(json: any, ignoreDiscriminator: boolean): LookupValuesIn { - if (json == null) { - return json; - } - return { - - 'column': json['column'], - 'dataset': json['dataset'], - 'limit': json['limit'] == null ? undefined : json['limit'], - }; -} - -export function LookupValuesInToJSON(json: any): LookupValuesIn { - return LookupValuesInToJSONTyped(json, false); -} - -export function LookupValuesInToJSONTyped(value?: LookupValuesIn | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'column': value['column'], - 'dataset': value['dataset'], - 'limit': value['limit'], - }; -} diff --git a/sdk/typescript/src/models/LookupValuesOut.ts b/sdk/typescript/src/models/LookupValuesOut.ts deleted file mode 100644 index da32615..0000000 --- a/sdk/typescript/src/models/LookupValuesOut.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface LookupValuesOut - */ -export interface LookupValuesOut { - /** - * - * @type {string} - * @memberof LookupValuesOut - */ - column: string; - /** - * - * @type {string} - * @memberof LookupValuesOut - */ - dataset: string; - /** - * - * @type {Array} - * @memberof LookupValuesOut - */ - values: Array; -} - -/** - * Check if a given object implements the LookupValuesOut interface. - */ -export function instanceOfLookupValuesOut(value: object): value is LookupValuesOut { - if (!('column' in value) || value['column'] === undefined) return false; - if (!('dataset' in value) || value['dataset'] === undefined) return false; - if (!('values' in value) || value['values'] === undefined) return false; - return true; -} - -export function LookupValuesOutFromJSON(json: any): LookupValuesOut { - return LookupValuesOutFromJSONTyped(json, false); -} - -export function LookupValuesOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): LookupValuesOut { - if (json == null) { - return json; - } - return { - - 'column': json['column'], - 'dataset': json['dataset'], - 'values': json['values'], - }; -} - -export function LookupValuesOutToJSON(json: any): LookupValuesOut { - return LookupValuesOutToJSONTyped(json, false); -} - -export function LookupValuesOutToJSONTyped(value?: LookupValuesOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'column': value['column'], - 'dataset': value['dataset'], - 'values': value['values'], - }; -} diff --git a/sdk/typescript/src/models/MemberInviteIn.ts b/sdk/typescript/src/models/MemberInviteIn.ts deleted file mode 100644 index 247c5c7..0000000 --- a/sdk/typescript/src/models/MemberInviteIn.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * POST /v0/members/invite body — invite a person by email. - * @export - * @interface MemberInviteIn - */ -export interface MemberInviteIn { - /** - * - * @type {string} - * @memberof MemberInviteIn - */ - email: string; - /** - * - * @type {MemberInviteInRoleEnum} - * @memberof MemberInviteIn - */ - role?: MemberInviteInRoleEnum; -} - - -/** - * @export - */ -export const MemberInviteInRoleEnum = { - Admin: 'admin', - Member: 'member' -} as const; -export type MemberInviteInRoleEnum = typeof MemberInviteInRoleEnum[keyof typeof MemberInviteInRoleEnum]; - - -/** - * Check if a given object implements the MemberInviteIn interface. - */ -export function instanceOfMemberInviteIn(value: object): value is MemberInviteIn { - if (!('email' in value) || value['email'] === undefined) return false; - return true; -} - -export function MemberInviteInFromJSON(json: any): MemberInviteIn { - return MemberInviteInFromJSONTyped(json, false); -} - -export function MemberInviteInFromJSONTyped(json: any, ignoreDiscriminator: boolean): MemberInviteIn { - if (json == null) { - return json; - } - return { - - 'email': json['email'], - 'role': json['role'] == null ? undefined : json['role'], - }; -} - -export function MemberInviteInToJSON(json: any): MemberInviteIn { - return MemberInviteInToJSONTyped(json, false); -} - -export function MemberInviteInToJSONTyped(value?: MemberInviteIn | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'email': value['email'], - 'role': value['role'], - }; -} diff --git a/sdk/typescript/src/models/MemberList.ts b/sdk/typescript/src/models/MemberList.ts deleted file mode 100644 index 2597d03..0000000 --- a/sdk/typescript/src/models/MemberList.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { MemberOut } from './MemberOut'; -import { - MemberOutFromJSON, - MemberOutFromJSONTyped, - MemberOutToJSON, - MemberOutToJSONTyped, -} from './MemberOut'; - -/** - * - * @export - * @interface MemberList - */ -export interface MemberList { - /** - * - * @type {Array} - * @memberof MemberList - */ - items: Array; - /** - * - * @type {string} - * @memberof MemberList - */ - nextCursor?: string | null; -} - -/** - * Check if a given object implements the MemberList interface. - */ -export function instanceOfMemberList(value: object): value is MemberList { - if (!('items' in value) || value['items'] === undefined) return false; - return true; -} - -export function MemberListFromJSON(json: any): MemberList { - return MemberListFromJSONTyped(json, false); -} - -export function MemberListFromJSONTyped(json: any, ignoreDiscriminator: boolean): MemberList { - if (json == null) { - return json; - } - return { - - 'items': ((json['items'] as Array).map(MemberOutFromJSON)), - 'nextCursor': json['next_cursor'] === undefined ? undefined : json['next_cursor'] === null ? null : json['next_cursor'], - }; -} - -export function MemberListToJSON(json: any): MemberList { - return MemberListToJSONTyped(json, false); -} - -export function MemberListToJSONTyped(value?: MemberList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'items': ((value['items'] as Array).map(MemberOutToJSON)), - 'next_cursor': value['nextCursor'], - }; -} diff --git a/sdk/typescript/src/models/MemberOut.ts b/sdk/typescript/src/models/MemberOut.ts deleted file mode 100644 index 8d2c6d8..0000000 --- a/sdk/typescript/src/models/MemberOut.ts +++ /dev/null @@ -1,120 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * One live member of a workspace — metadata for the members page / - * `GET /v0/members`. - * @export - * @interface MemberOut - */ -export interface MemberOut { - /** - * - * @type {Date} - * @memberof MemberOut - */ - createdAt: Date; - /** - * - * @type {string} - * @memberof MemberOut - */ - email: string; - /** - * - * @type {string} - * @memberof MemberOut - */ - firstName?: string | null; - /** - * - * @type {string} - * @memberof MemberOut - */ - lastName?: string | null; - /** - * - * @type {MemberOutRoleEnum} - * @memberof MemberOut - */ - role: MemberOutRoleEnum; - /** - * - * @type {string} - * @memberof MemberOut - */ - userId: string; -} - - -/** - * @export - */ -export const MemberOutRoleEnum = { - Admin: 'admin', - Member: 'member' -} as const; -export type MemberOutRoleEnum = typeof MemberOutRoleEnum[keyof typeof MemberOutRoleEnum]; - - -/** - * Check if a given object implements the MemberOut interface. - */ -export function instanceOfMemberOut(value: object): value is MemberOut { - if ((!('createdAt' in (value as Record)) && !('created_at' in (value as Record))) || ((value as Record)['createdAt'] === undefined && (value as Record)['created_at'] === undefined)) return false; - if (!('email' in value) || value['email'] === undefined) return false; - if (!('role' in value) || value['role'] === undefined) return false; - if ((!('userId' in (value as Record)) && !('user_id' in (value as Record))) || ((value as Record)['userId'] === undefined && (value as Record)['user_id'] === undefined)) return false; - return true; -} - -export function MemberOutFromJSON(json: any): MemberOut { - return MemberOutFromJSONTyped(json, false); -} - -export function MemberOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): MemberOut { - if (json == null) { - return json; - } - return { - - 'createdAt': (new Date(json['created_at'])), - 'email': json['email'], - 'firstName': json['first_name'] === undefined ? undefined : json['first_name'] === null ? null : json['first_name'], - 'lastName': json['last_name'] === undefined ? undefined : json['last_name'] === null ? null : json['last_name'], - 'role': json['role'], - 'userId': json['user_id'], - }; -} - -export function MemberOutToJSON(json: any): MemberOut { - return MemberOutToJSONTyped(json, false); -} - -export function MemberOutToJSONTyped(value?: MemberOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'created_at': value['createdAt'].toISOString(), - 'email': value['email'], - 'first_name': value['firstName'], - 'last_name': value['lastName'], - 'role': value['role'], - 'user_id': value['userId'], - }; -} diff --git a/sdk/typescript/src/models/MemberRemoveOut.ts b/sdk/typescript/src/models/MemberRemoveOut.ts deleted file mode 100644 index 7ab1380..0000000 --- a/sdk/typescript/src/models/MemberRemoveOut.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * DELETE /v0/members/{user_id} response — the member-removal receipt. - * `id` is the removed user's id (replaces the ad-hoc `removed` key). - * @export - * @interface MemberRemoveOut - */ -export interface MemberRemoveOut { - /** - * - * @type {string} - * @memberof MemberRemoveOut - */ - id: string; - /** - * - * @type {boolean} - * @memberof MemberRemoveOut - */ - ok?: boolean; - /** - * - * @type {string} - * @memberof MemberRemoveOut - */ - organizationId: string; -} - -/** - * Check if a given object implements the MemberRemoveOut interface. - */ -export function instanceOfMemberRemoveOut(value: object): value is MemberRemoveOut { - if (!('id' in value) || value['id'] === undefined) return false; - if ((!('organizationId' in (value as Record)) && !('organization_id' in (value as Record))) || ((value as Record)['organizationId'] === undefined && (value as Record)['organization_id'] === undefined)) return false; - return true; -} - -export function MemberRemoveOutFromJSON(json: any): MemberRemoveOut { - return MemberRemoveOutFromJSONTyped(json, false); -} - -export function MemberRemoveOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): MemberRemoveOut { - if (json == null) { - return json; - } - return { - - 'id': json['id'], - 'ok': json['ok'] == null ? undefined : json['ok'], - 'organizationId': json['organization_id'], - }; -} - -export function MemberRemoveOutToJSON(json: any): MemberRemoveOut { - return MemberRemoveOutToJSONTyped(json, false); -} - -export function MemberRemoveOutToJSONTyped(value?: MemberRemoveOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'id': value['id'], - 'ok': value['ok'], - 'organization_id': value['organizationId'], - }; -} diff --git a/sdk/typescript/src/models/MemberRoleIn.ts b/sdk/typescript/src/models/MemberRoleIn.ts deleted file mode 100644 index bd6256a..0000000 --- a/sdk/typescript/src/models/MemberRoleIn.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * PATCH /v0/members/{user} body — promote/demote a member. - * @export - * @interface MemberRoleIn - */ -export interface MemberRoleIn { - /** - * - * @type {MemberRoleInRoleEnum} - * @memberof MemberRoleIn - */ - role: MemberRoleInRoleEnum; -} - - -/** - * @export - */ -export const MemberRoleInRoleEnum = { - Admin: 'admin', - Member: 'member' -} as const; -export type MemberRoleInRoleEnum = typeof MemberRoleInRoleEnum[keyof typeof MemberRoleInRoleEnum]; - - -/** - * Check if a given object implements the MemberRoleIn interface. - */ -export function instanceOfMemberRoleIn(value: object): value is MemberRoleIn { - if (!('role' in value) || value['role'] === undefined) return false; - return true; -} - -export function MemberRoleInFromJSON(json: any): MemberRoleIn { - return MemberRoleInFromJSONTyped(json, false); -} - -export function MemberRoleInFromJSONTyped(json: any, ignoreDiscriminator: boolean): MemberRoleIn { - if (json == null) { - return json; - } - return { - - 'role': json['role'], - }; -} - -export function MemberRoleInToJSON(json: any): MemberRoleIn { - return MemberRoleInToJSONTyped(json, false); -} - -export function MemberRoleInToJSONTyped(value?: MemberRoleIn | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'role': value['role'], - }; -} diff --git a/sdk/typescript/src/models/OAuthProtocolErrorOut.ts b/sdk/typescript/src/models/OAuthProtocolErrorOut.ts deleted file mode 100644 index 9bbb528..0000000 --- a/sdk/typescript/src/models/OAuthProtocolErrorOut.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * RFC OAuth error shape used by public protocol endpoints. - * @export - * @interface OAuthProtocolErrorOut - */ -export interface OAuthProtocolErrorOut { - [key: string]: any | any; - /** - * - * @type {string} - * @memberof OAuthProtocolErrorOut - */ - error: string; - /** - * - * @type {string} - * @memberof OAuthProtocolErrorOut - */ - errorDescription?: string | null; -} - -/** - * Check if a given object implements the OAuthProtocolErrorOut interface. - */ -export function instanceOfOAuthProtocolErrorOut(value: object): value is OAuthProtocolErrorOut { - if (!('error' in value) || value['error'] === undefined) return false; - return true; -} - -export function OAuthProtocolErrorOutFromJSON(json: any): OAuthProtocolErrorOut { - return OAuthProtocolErrorOutFromJSONTyped(json, false); -} - -export function OAuthProtocolErrorOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): OAuthProtocolErrorOut { - if (json == null) { - return json; - } - return { - - ...json, - 'error': json['error'], - 'errorDescription': json['error_description'] === undefined ? undefined : json['error_description'] === null ? null : json['error_description'], - }; -} - -export function OAuthProtocolErrorOutToJSON(json: any): OAuthProtocolErrorOut { - return OAuthProtocolErrorOutToJSONTyped(json, false); -} - -export function OAuthProtocolErrorOutToJSONTyped(value?: OAuthProtocolErrorOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - ...value, - 'error': value['error'], - 'error_description': value['errorDescription'], - }; -} diff --git a/sdk/typescript/src/models/OperationUsageOut.ts b/sdk/typescript/src/models/OperationUsageOut.ts deleted file mode 100644 index 49834ac..0000000 --- a/sdk/typescript/src/models/OperationUsageOut.ts +++ /dev/null @@ -1,74 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface OperationUsageOut - */ -export interface OperationUsageOut { - /** - * - * @type {number} - * @memberof OperationUsageOut - */ - reads: number; - /** - * - * @type {number} - * @memberof OperationUsageOut - */ - writes: number; -} - -/** - * Check if a given object implements the OperationUsageOut interface. - */ -export function instanceOfOperationUsageOut(value: object): value is OperationUsageOut { - if (!('reads' in value) || value['reads'] === undefined) return false; - if (!('writes' in value) || value['writes'] === undefined) return false; - return true; -} - -export function OperationUsageOutFromJSON(json: any): OperationUsageOut { - return OperationUsageOutFromJSONTyped(json, false); -} - -export function OperationUsageOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): OperationUsageOut { - if (json == null) { - return json; - } - return { - - 'reads': json['reads'], - 'writes': json['writes'], - }; -} - -export function OperationUsageOutToJSON(json: any): OperationUsageOut { - return OperationUsageOutToJSONTyped(json, false); -} - -export function OperationUsageOutToJSONTyped(value?: OperationUsageOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'reads': value['reads'], - 'writes': value['writes'], - }; -} diff --git a/sdk/typescript/src/models/Page.ts b/sdk/typescript/src/models/Page.ts deleted file mode 100644 index e229e7f..0000000 --- a/sdk/typescript/src/models/Page.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { ArtifactOut } from './ArtifactOut'; -import { - ArtifactOutFromJSON, - ArtifactOutFromJSONTyped, - ArtifactOutToJSON, - ArtifactOutToJSONTyped, -} from './ArtifactOut'; - -/** - * - * @export - * @interface Page - */ -export interface Page { - /** - * - * @type {Array} - * @memberof Page - */ - items: Array; - /** - * - * @type {string} - * @memberof Page - */ - nextCursor?: string | null; -} - -/** - * Check if a given object implements the Page interface. - */ -export function instanceOfPage(value: object): value is Page { - if (!('items' in value) || value['items'] === undefined) return false; - return true; -} - -export function PageFromJSON(json: any): Page { - return PageFromJSONTyped(json, false); -} - -export function PageFromJSONTyped(json: any, ignoreDiscriminator: boolean): Page { - if (json == null) { - return json; - } - return { - - 'items': ((json['items'] as Array).map(ArtifactOutFromJSON)), - 'nextCursor': json['next_cursor'] === undefined ? undefined : json['next_cursor'] === null ? null : json['next_cursor'], - }; -} - -export function PageToJSON(json: any): Page { - return PageToJSONTyped(json, false); -} - -export function PageToJSONTyped(value?: Page | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'items': ((value['items'] as Array).map(ArtifactOutToJSON)), - 'next_cursor': value['nextCursor'], - }; -} diff --git a/sdk/typescript/src/models/ProjectConfigIn.ts b/sdk/typescript/src/models/ProjectConfigIn.ts deleted file mode 100644 index e8e87e3..0000000 --- a/sdk/typescript/src/models/ProjectConfigIn.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface ProjectConfigIn - */ -export interface ProjectConfigIn { - /** - * - * @type {boolean} - * @memberof ProjectConfigIn - */ - autoCompile?: boolean; - /** - * - * @type {string} - * @memberof ProjectConfigIn - */ - engine?: string | null; - /** - * - * @type {string} - * @memberof ProjectConfigIn - */ - entrypoint: string; -} - -/** - * Check if a given object implements the ProjectConfigIn interface. - */ -export function instanceOfProjectConfigIn(value: object): value is ProjectConfigIn { - if (!('entrypoint' in value) || value['entrypoint'] === undefined) return false; - return true; -} - -export function ProjectConfigInFromJSON(json: any): ProjectConfigIn { - return ProjectConfigInFromJSONTyped(json, false); -} - -export function ProjectConfigInFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProjectConfigIn { - if (json == null) { - return json; - } - return { - - 'autoCompile': json['auto_compile'] == null ? undefined : json['auto_compile'], - 'engine': json['engine'] === undefined ? undefined : json['engine'] === null ? null : json['engine'], - 'entrypoint': json['entrypoint'], - }; -} - -export function ProjectConfigInToJSON(json: any): ProjectConfigIn { - return ProjectConfigInToJSONTyped(json, false); -} - -export function ProjectConfigInToJSONTyped(value?: ProjectConfigIn | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'auto_compile': value['autoCompile'], - 'engine': value['engine'], - 'entrypoint': value['entrypoint'], - }; -} diff --git a/sdk/typescript/src/models/ProtectedResourceMetadataOut.ts b/sdk/typescript/src/models/ProtectedResourceMetadataOut.ts deleted file mode 100644 index 6cbeeb5..0000000 --- a/sdk/typescript/src/models/ProtectedResourceMetadataOut.ts +++ /dev/null @@ -1,95 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface ProtectedResourceMetadataOut - */ -export interface ProtectedResourceMetadataOut { - [key: string]: any | any; - /** - * - * @type {Array} - * @memberof ProtectedResourceMetadataOut - */ - authorizationServers: Array; - /** - * - * @type {Array} - * @memberof ProtectedResourceMetadataOut - */ - bearerMethodsSupported: Array; - /** - * - * @type {string} - * @memberof ProtectedResourceMetadataOut - */ - resource: string; - /** - * - * @type {Array} - * @memberof ProtectedResourceMetadataOut - */ - scopesSupported: Array; -} - -/** - * Check if a given object implements the ProtectedResourceMetadataOut interface. - */ -export function instanceOfProtectedResourceMetadataOut(value: object): value is ProtectedResourceMetadataOut { - if ((!('authorizationServers' in (value as Record)) && !('authorization_servers' in (value as Record))) || ((value as Record)['authorizationServers'] === undefined && (value as Record)['authorization_servers'] === undefined)) return false; - if ((!('bearerMethodsSupported' in (value as Record)) && !('bearer_methods_supported' in (value as Record))) || ((value as Record)['bearerMethodsSupported'] === undefined && (value as Record)['bearer_methods_supported'] === undefined)) return false; - if (!('resource' in value) || value['resource'] === undefined) return false; - if ((!('scopesSupported' in (value as Record)) && !('scopes_supported' in (value as Record))) || ((value as Record)['scopesSupported'] === undefined && (value as Record)['scopes_supported'] === undefined)) return false; - return true; -} - -export function ProtectedResourceMetadataOutFromJSON(json: any): ProtectedResourceMetadataOut { - return ProtectedResourceMetadataOutFromJSONTyped(json, false); -} - -export function ProtectedResourceMetadataOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProtectedResourceMetadataOut { - if (json == null) { - return json; - } - return { - - ...json, - 'authorizationServers': json['authorization_servers'], - 'bearerMethodsSupported': json['bearer_methods_supported'], - 'resource': json['resource'], - 'scopesSupported': json['scopes_supported'], - }; -} - -export function ProtectedResourceMetadataOutToJSON(json: any): ProtectedResourceMetadataOut { - return ProtectedResourceMetadataOutToJSONTyped(json, false); -} - -export function ProtectedResourceMetadataOutToJSONTyped(value?: ProtectedResourceMetadataOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - ...value, - 'authorization_servers': value['authorizationServers'], - 'bearer_methods_supported': value['bearerMethodsSupported'], - 'resource': value['resource'], - 'scopes_supported': value['scopesSupported'], - }; -} diff --git a/sdk/typescript/src/models/QueryColumnOut.ts b/sdk/typescript/src/models/QueryColumnOut.ts deleted file mode 100644 index 69fa108..0000000 --- a/sdk/typescript/src/models/QueryColumnOut.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface QueryColumnOut - */ -export interface QueryColumnOut { - [key: string]: any | any; - /** - * - * @type {string} - * @memberof QueryColumnOut - */ - name: string; - /** - * - * @type {string} - * @memberof QueryColumnOut - */ - type?: string | null; -} - -/** - * Check if a given object implements the QueryColumnOut interface. - */ -export function instanceOfQueryColumnOut(value: object): value is QueryColumnOut { - if (!('name' in value) || value['name'] === undefined) return false; - return true; -} - -export function QueryColumnOutFromJSON(json: any): QueryColumnOut { - return QueryColumnOutFromJSONTyped(json, false); -} - -export function QueryColumnOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): QueryColumnOut { - if (json == null) { - return json; - } - return { - - ...json, - 'name': json['name'], - 'type': json['type'] === undefined ? undefined : json['type'] === null ? null : json['type'], - }; -} - -export function QueryColumnOutToJSON(json: any): QueryColumnOut { - return QueryColumnOutToJSONTyped(json, false); -} - -export function QueryColumnOutToJSONTyped(value?: QueryColumnOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - ...value, - 'name': value['name'], - 'type': value['type'], - }; -} diff --git a/sdk/typescript/src/models/QueryDryRunOut.ts b/sdk/typescript/src/models/QueryDryRunOut.ts deleted file mode 100644 index d0399ab..0000000 --- a/sdk/typescript/src/models/QueryDryRunOut.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { QueryColumnOut } from './QueryColumnOut'; -import { - QueryColumnOutFromJSON, - QueryColumnOutFromJSONTyped, - QueryColumnOutToJSON, - QueryColumnOutToJSONTyped, -} from './QueryColumnOut'; - -/** - * - * @export - * @interface QueryDryRunOut - */ -export interface QueryDryRunOut { - [key: string]: any | any; - /** - * - * @type {QueryDryRunOutDryRunEnum} - * @memberof QueryDryRunOut - */ - dryRun: QueryDryRunOutDryRunEnum; - /** - * - * @type {string} - * @memberof QueryDryRunOut - */ - engine: string; - /** - * - * @type {number} - * @memberof QueryDryRunOut - */ - estimatedBytesProcessed: number; - /** - * - * @type {Array} - * @memberof QueryDryRunOut - */ - resultSchema: Array; - /** - * - * @type {boolean} - * @memberof QueryDryRunOut - */ - valid: boolean; -} - - -/** - * @export - */ -export const QueryDryRunOutDryRunEnum = { - True: true -} as const; -export type QueryDryRunOutDryRunEnum = typeof QueryDryRunOutDryRunEnum[keyof typeof QueryDryRunOutDryRunEnum]; - - -/** - * Check if a given object implements the QueryDryRunOut interface. - */ -export function instanceOfQueryDryRunOut(value: object): value is QueryDryRunOut { - if ((!('dryRun' in (value as Record)) && !('dry_run' in (value as Record))) || ((value as Record)['dryRun'] === undefined && (value as Record)['dry_run'] === undefined)) return false; - - if ((value as Record)['dryRun'] !== true && (value as Record)['dry_run'] !== true) return false; - if (!('engine' in value) || value['engine'] === undefined) return false; - if ((!('estimatedBytesProcessed' in (value as Record)) && !('estimated_bytes_processed' in (value as Record))) || ((value as Record)['estimatedBytesProcessed'] === undefined && (value as Record)['estimated_bytes_processed'] === undefined)) return false; - if ((!('resultSchema' in (value as Record)) && !('result_schema' in (value as Record))) || ((value as Record)['resultSchema'] === undefined && (value as Record)['result_schema'] === undefined)) return false; - if (!('valid' in value) || value['valid'] === undefined) return false; - return true; -} - -export function QueryDryRunOutFromJSON(json: any): QueryDryRunOut { - return QueryDryRunOutFromJSONTyped(json, false); -} - -export function QueryDryRunOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): QueryDryRunOut { - if (json == null) { - return json; - } - return { - - ...json, - 'dryRun': json['dry_run'], - 'engine': json['engine'], - 'estimatedBytesProcessed': json['estimated_bytes_processed'], - 'resultSchema': ((json['result_schema'] as Array).map(QueryColumnOutFromJSON)), - 'valid': json['valid'], - }; -} - -export function QueryDryRunOutToJSON(json: any): QueryDryRunOut { - return QueryDryRunOutToJSONTyped(json, false); -} - -export function QueryDryRunOutToJSONTyped(value?: QueryDryRunOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - ...value, - 'dry_run': value['dryRun'], - 'engine': value['engine'], - 'estimated_bytes_processed': value['estimatedBytesProcessed'], - 'result_schema': ((value['resultSchema'] as Array).map(QueryColumnOutToJSON)), - 'valid': value['valid'], - }; -} diff --git a/sdk/typescript/src/models/QueryIn.ts b/sdk/typescript/src/models/QueryIn.ts deleted file mode 100644 index 6c38d97..0000000 --- a/sdk/typescript/src/models/QueryIn.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface QueryIn - */ -export interface QueryIn { - /** - * - * @type {boolean} - * @memberof QueryIn - */ - dryRun?: boolean; - /** - * - * @type {{ [key: string]: string; }} - * @memberof QueryIn - */ - inputs?: { [key: string]: string; }; - /** - * - * @type {string} - * @memberof QueryIn - */ - sql: string; -} - -/** - * Check if a given object implements the QueryIn interface. - */ -export function instanceOfQueryIn(value: object): value is QueryIn { - if (!('sql' in value) || value['sql'] === undefined) return false; - return true; -} - -export function QueryInFromJSON(json: any): QueryIn { - return QueryInFromJSONTyped(json, false); -} - -export function QueryInFromJSONTyped(json: any, ignoreDiscriminator: boolean): QueryIn { - if (json == null) { - return json; - } - return { - - 'dryRun': json['dry_run'] == null ? undefined : json['dry_run'], - 'inputs': json['inputs'] == null ? undefined : json['inputs'], - 'sql': json['sql'], - }; -} - -export function QueryInToJSON(json: any): QueryIn { - return QueryInToJSONTyped(json, false); -} - -export function QueryInToJSONTyped(value?: QueryIn | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'dry_run': value['dryRun'], - 'inputs': value['inputs'], - 'sql': value['sql'], - }; -} diff --git a/sdk/typescript/src/models/QueryResultOut.ts b/sdk/typescript/src/models/QueryResultOut.ts deleted file mode 100644 index 47815c4..0000000 --- a/sdk/typescript/src/models/QueryResultOut.ts +++ /dev/null @@ -1,130 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { QueryColumnOut } from './QueryColumnOut'; -import { - QueryColumnOutFromJSON, - QueryColumnOutFromJSONTyped, - QueryColumnOutToJSON, - QueryColumnOutToJSONTyped, -} from './QueryColumnOut'; - -/** - * - * @export - * @interface QueryResultOut - */ -export interface QueryResultOut { - [key: string]: any | any; - /** - * - * @type {number} - * @memberof QueryResultOut - */ - bytesProcessed: number; - /** - * - * @type {boolean} - * @memberof QueryResultOut - */ - cacheHit: boolean; - /** - * - * @type {string} - * @memberof QueryResultOut - */ - engine: string; - /** - * - * @type {Array<{ [key: string]: any; } | null>} - * @memberof QueryResultOut - */ - preview: Array<{ [key: string]: any; } | null>; - /** - * - * @type {string} - * @memberof QueryResultOut - */ - resultArtId: string; - /** - * - * @type {Array} - * @memberof QueryResultOut - */ - resultSchema: Array; - /** - * - * @type {number} - * @memberof QueryResultOut - */ - rowCount: number; -} - -/** - * Check if a given object implements the QueryResultOut interface. - */ -export function instanceOfQueryResultOut(value: object): value is QueryResultOut { - if ((!('bytesProcessed' in (value as Record)) && !('bytes_processed' in (value as Record))) || ((value as Record)['bytesProcessed'] === undefined && (value as Record)['bytes_processed'] === undefined)) return false; - if ((!('cacheHit' in (value as Record)) && !('cache_hit' in (value as Record))) || ((value as Record)['cacheHit'] === undefined && (value as Record)['cache_hit'] === undefined)) return false; - if (!('engine' in value) || value['engine'] === undefined) return false; - if (!('preview' in value) || value['preview'] === undefined) return false; - if ((!('resultArtId' in (value as Record)) && !('result_art_id' in (value as Record))) || ((value as Record)['resultArtId'] === undefined && (value as Record)['result_art_id'] === undefined)) return false; - if ((!('resultSchema' in (value as Record)) && !('result_schema' in (value as Record))) || ((value as Record)['resultSchema'] === undefined && (value as Record)['result_schema'] === undefined)) return false; - if ((!('rowCount' in (value as Record)) && !('row_count' in (value as Record))) || ((value as Record)['rowCount'] === undefined && (value as Record)['row_count'] === undefined)) return false; - return true; -} - -export function QueryResultOutFromJSON(json: any): QueryResultOut { - return QueryResultOutFromJSONTyped(json, false); -} - -export function QueryResultOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): QueryResultOut { - if (json == null) { - return json; - } - return { - - ...json, - 'bytesProcessed': json['bytes_processed'], - 'cacheHit': json['cache_hit'], - 'engine': json['engine'], - 'preview': json['preview'], - 'resultArtId': json['result_art_id'], - 'resultSchema': ((json['result_schema'] as Array).map(QueryColumnOutFromJSON)), - 'rowCount': json['row_count'], - }; -} - -export function QueryResultOutToJSON(json: any): QueryResultOut { - return QueryResultOutToJSONTyped(json, false); -} - -export function QueryResultOutToJSONTyped(value?: QueryResultOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - ...value, - 'bytes_processed': value['bytesProcessed'], - 'cache_hit': value['cacheHit'], - 'engine': value['engine'], - 'preview': value['preview'], - 'result_art_id': value['resultArtId'], - 'result_schema': ((value['resultSchema'] as Array).map(QueryColumnOutToJSON)), - 'row_count': value['rowCount'], - }; -} diff --git a/sdk/typescript/src/models/RegisterAgentIdentityAgentIdentityPost422Response.ts b/sdk/typescript/src/models/RegisterAgentIdentityAgentIdentityPost422Response.ts deleted file mode 100644 index 3613c2c..0000000 --- a/sdk/typescript/src/models/RegisterAgentIdentityAgentIdentityPost422Response.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import type { ErrorResponse } from './ErrorResponse'; -import { - instanceOfErrorResponse, - ErrorResponseFromJSON, - ErrorResponseFromJSONTyped, - ErrorResponseToJSON, -} from './ErrorResponse'; -import type { ValidationErrorResponse } from './ValidationErrorResponse'; -import { - instanceOfValidationErrorResponse, - ValidationErrorResponseFromJSON, - ValidationErrorResponseFromJSONTyped, - ValidationErrorResponseToJSON, -} from './ValidationErrorResponse'; - -/** - * @type RegisterAgentIdentityAgentIdentityPost422Response - * - * @export - */ -export type RegisterAgentIdentityAgentIdentityPost422Response = ErrorResponse | ValidationErrorResponse; - -export function RegisterAgentIdentityAgentIdentityPost422ResponseFromJSON(json: any): RegisterAgentIdentityAgentIdentityPost422Response { - return RegisterAgentIdentityAgentIdentityPost422ResponseFromJSONTyped(json, false); -} - -export function RegisterAgentIdentityAgentIdentityPost422ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): RegisterAgentIdentityAgentIdentityPost422Response { - if (json == null) { - return json; - } - if (typeof json !== 'object') { - return json; - } - if (instanceOfErrorResponse(json)) { - return ErrorResponseFromJSONTyped(json, true); - } - if (instanceOfValidationErrorResponse(json)) { - return ValidationErrorResponseFromJSONTyped(json, true); - } - return {} as any; -} - -export function RegisterAgentIdentityAgentIdentityPost422ResponseToJSON(json: any): any { - return RegisterAgentIdentityAgentIdentityPost422ResponseToJSONTyped(json, false); -} - -export function RegisterAgentIdentityAgentIdentityPost422ResponseToJSONTyped(value?: RegisterAgentIdentityAgentIdentityPost422Response | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - if (typeof value !== 'object') { - return value; - } - if (instanceOfErrorResponse(value)) { - return ErrorResponseToJSON(value as ErrorResponse); - } - if (instanceOfValidationErrorResponse(value)) { - return ValidationErrorResponseToJSON(value as ValidationErrorResponse); - } - return {}; -} diff --git a/sdk/typescript/src/models/ResponsePostQueryV0QueryPost.ts b/sdk/typescript/src/models/ResponsePostQueryV0QueryPost.ts deleted file mode 100644 index 4a095f3..0000000 --- a/sdk/typescript/src/models/ResponsePostQueryV0QueryPost.ts +++ /dev/null @@ -1,180 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { QueryColumnOut } from './QueryColumnOut'; -import { - QueryColumnOutFromJSON, - QueryColumnOutFromJSONTyped, - QueryColumnOutToJSON, - QueryColumnOutToJSONTyped, -} from './QueryColumnOut'; -import type { QueryResultOut } from './QueryResultOut'; -import { - QueryResultOutFromJSON, - QueryResultOutFromJSONTyped, - QueryResultOutToJSON, - QueryResultOutToJSONTyped, -} from './QueryResultOut'; -import type { QueryDryRunOut } from './QueryDryRunOut'; -import { - QueryDryRunOutFromJSON, - QueryDryRunOutFromJSONTyped, - QueryDryRunOutToJSON, - QueryDryRunOutToJSONTyped, -} from './QueryDryRunOut'; - -/** - * - * @export - * @interface ResponsePostQueryV0QueryPost - */ -export interface ResponsePostQueryV0QueryPost { - /** - * - * @type {ResponsePostQueryV0QueryPostDryRunEnum} - * @memberof ResponsePostQueryV0QueryPost - */ - dryRun: ResponsePostQueryV0QueryPostDryRunEnum; - /** - * - * @type {string} - * @memberof ResponsePostQueryV0QueryPost - */ - engine: string; - /** - * - * @type {number} - * @memberof ResponsePostQueryV0QueryPost - */ - estimatedBytesProcessed: number; - /** - * - * @type {Array} - * @memberof ResponsePostQueryV0QueryPost - */ - resultSchema: Array; - /** - * - * @type {boolean} - * @memberof ResponsePostQueryV0QueryPost - */ - valid: boolean; - /** - * - * @type {number} - * @memberof ResponsePostQueryV0QueryPost - */ - bytesProcessed: number; - /** - * - * @type {boolean} - * @memberof ResponsePostQueryV0QueryPost - */ - cacheHit: boolean; - /** - * - * @type {Array<{ [key: string]: any; }>} - * @memberof ResponsePostQueryV0QueryPost - */ - preview: Array<{ [key: string]: any; }>; - /** - * - * @type {string} - * @memberof ResponsePostQueryV0QueryPost - */ - resultArtId: string; - /** - * - * @type {number} - * @memberof ResponsePostQueryV0QueryPost - */ - rowCount: number; -} - - -/** - * @export - */ -export const ResponsePostQueryV0QueryPostDryRunEnum = { - True: true -} as const; -export type ResponsePostQueryV0QueryPostDryRunEnum = typeof ResponsePostQueryV0QueryPostDryRunEnum[keyof typeof ResponsePostQueryV0QueryPostDryRunEnum]; - - -/** - * Check if a given object implements the ResponsePostQueryV0QueryPost interface. - */ -export function instanceOfResponsePostQueryV0QueryPost(value: object): value is ResponsePostQueryV0QueryPost { - if ((!('dryRun' in (value as Record)) && !('dry_run' in (value as Record))) || ((value as Record)['dryRun'] === undefined && (value as Record)['dry_run'] === undefined)) return false; - - if ((value as Record)['dryRun'] !== true && (value as Record)['dry_run'] !== true) return false; - if (!('engine' in value) || value['engine'] === undefined) return false; - if ((!('estimatedBytesProcessed' in (value as Record)) && !('estimated_bytes_processed' in (value as Record))) || ((value as Record)['estimatedBytesProcessed'] === undefined && (value as Record)['estimated_bytes_processed'] === undefined)) return false; - if ((!('resultSchema' in (value as Record)) && !('result_schema' in (value as Record))) || ((value as Record)['resultSchema'] === undefined && (value as Record)['result_schema'] === undefined)) return false; - if (!('valid' in value) || value['valid'] === undefined) return false; - if ((!('bytesProcessed' in (value as Record)) && !('bytes_processed' in (value as Record))) || ((value as Record)['bytesProcessed'] === undefined && (value as Record)['bytes_processed'] === undefined)) return false; - if ((!('cacheHit' in (value as Record)) && !('cache_hit' in (value as Record))) || ((value as Record)['cacheHit'] === undefined && (value as Record)['cache_hit'] === undefined)) return false; - if (!('preview' in value) || value['preview'] === undefined) return false; - if ((!('resultArtId' in (value as Record)) && !('result_art_id' in (value as Record))) || ((value as Record)['resultArtId'] === undefined && (value as Record)['result_art_id'] === undefined)) return false; - if ((!('rowCount' in (value as Record)) && !('row_count' in (value as Record))) || ((value as Record)['rowCount'] === undefined && (value as Record)['row_count'] === undefined)) return false; - return true; -} - -export function ResponsePostQueryV0QueryPostFromJSON(json: any): ResponsePostQueryV0QueryPost { - return ResponsePostQueryV0QueryPostFromJSONTyped(json, false); -} - -export function ResponsePostQueryV0QueryPostFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResponsePostQueryV0QueryPost { - if (json == null) { - return json; - } - return { - - 'dryRun': json['dry_run'], - 'engine': json['engine'], - 'estimatedBytesProcessed': json['estimated_bytes_processed'], - 'resultSchema': ((json['result_schema'] as Array).map(QueryColumnOutFromJSON)), - 'valid': json['valid'], - 'bytesProcessed': json['bytes_processed'], - 'cacheHit': json['cache_hit'], - 'preview': json['preview'], - 'resultArtId': json['result_art_id'], - 'rowCount': json['row_count'], - }; -} - -export function ResponsePostQueryV0QueryPostToJSON(json: any): ResponsePostQueryV0QueryPost { - return ResponsePostQueryV0QueryPostToJSONTyped(json, false); -} - -export function ResponsePostQueryV0QueryPostToJSONTyped(value?: ResponsePostQueryV0QueryPost | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'dry_run': value['dryRun'], - 'engine': value['engine'], - 'estimated_bytes_processed': value['estimatedBytesProcessed'], - 'result_schema': ((value['resultSchema'] as Array).map(QueryColumnOutToJSON)), - 'valid': value['valid'], - 'bytes_processed': value['bytesProcessed'], - 'cache_hit': value['cacheHit'], - 'preview': value['preview'], - 'result_art_id': value['resultArtId'], - 'row_count': value['rowCount'], - }; -} diff --git a/sdk/typescript/src/models/RevokeOut.ts b/sdk/typescript/src/models/RevokeOut.ts deleted file mode 100644 index e70d61d..0000000 --- a/sdk/typescript/src/models/RevokeOut.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * DELETE /v0/grants/{grn_id}, DELETE /v0/shares/{shr_id}, - * DELETE /v0/invitations/{invitation_id} response — the unified - * revoke receipt. `revoked` is a COUNT: 1 when a live row was revoked, - * 0 when it was already gone (DELETE is idempotent). - * @export - * @interface RevokeOut - */ -export interface RevokeOut { - /** - * - * @type {string} - * @memberof RevokeOut - */ - id: string; - /** - * - * @type {boolean} - * @memberof RevokeOut - */ - ok?: boolean; - /** - * - * @type {number} - * @memberof RevokeOut - */ - revoked: number; -} - -/** - * Check if a given object implements the RevokeOut interface. - */ -export function instanceOfRevokeOut(value: object): value is RevokeOut { - if (!('id' in value) || value['id'] === undefined) return false; - if (!('revoked' in value) || value['revoked'] === undefined) return false; - return true; -} - -export function RevokeOutFromJSON(json: any): RevokeOut { - return RevokeOutFromJSONTyped(json, false); -} - -export function RevokeOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): RevokeOut { - if (json == null) { - return json; - } - return { - - 'id': json['id'], - 'ok': json['ok'] == null ? undefined : json['ok'], - 'revoked': json['revoked'], - }; -} - -export function RevokeOutToJSON(json: any): RevokeOut { - return RevokeOutToJSONTyped(json, false); -} - -export function RevokeOutToJSONTyped(value?: RevokeOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'id': value['id'], - 'ok': value['ok'], - 'revoked': value['revoked'], - }; -} diff --git a/sdk/typescript/src/models/SearchHitOut.ts b/sdk/typescript/src/models/SearchHitOut.ts index d1f5a1c..906f70b 100644 --- a/sdk/typescript/src/models/SearchHitOut.ts +++ b/sdk/typescript/src/models/SearchHitOut.ts @@ -2,7 +2,7 @@ /* eslint-disable */ /** * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. * * The version of the OpenAPI document: * @@ -24,13 +24,7 @@ export interface SearchHitOut { * @type {string} * @memberof SearchHitOut */ - artId: string; - /** - * - * @type {string} - * @memberof SearchHitOut - */ - contentType: string; + contentType: string | null; /** * * @type {string} @@ -42,27 +36,27 @@ export interface SearchHitOut { * @type {string} * @memberof SearchHitOut */ - fileType: string; + id: string; /** * - * @type {Array} + * @type {string} * @memberof SearchHitOut */ - labels?: Array; + name: string; /** * * @type {string} * @memberof SearchHitOut */ - path: string; + parentId: string | null; /** * * @type {number} * @memberof SearchHitOut */ - score: number; + rank: number; /** - * + * HTML-safe highlighted excerpt. The ONLY markup it may contain is the server's own ... highlight pair; artifact content is entity-escaped, so this may be rendered as HTML. * @type {string} * @memberof SearchHitOut */ @@ -78,29 +72,22 @@ export interface SearchHitOut { * @type {string} * @memberof SearchHitOut */ - url: string; - /** - * - * @type {number} - * @memberof SearchHitOut - */ - versionNumber: number; + versionId: string | null; } /** * Check if a given object implements the SearchHitOut interface. */ export function instanceOfSearchHitOut(value: object): value is SearchHitOut { - if ((!('artId' in (value as Record)) && !('art_id' in (value as Record))) || ((value as Record)['artId'] === undefined && (value as Record)['art_id'] === undefined)) return false; if ((!('contentType' in (value as Record)) && !('content_type' in (value as Record))) || ((value as Record)['contentType'] === undefined && (value as Record)['content_type'] === undefined)) return false; if ((!('driveId' in (value as Record)) && !('drive_id' in (value as Record))) || ((value as Record)['driveId'] === undefined && (value as Record)['drive_id'] === undefined)) return false; - if ((!('fileType' in (value as Record)) && !('file_type' in (value as Record))) || ((value as Record)['fileType'] === undefined && (value as Record)['file_type'] === undefined)) return false; - if (!('path' in value) || value['path'] === undefined) return false; - if (!('score' in value) || value['score'] === undefined) return false; + if (!('id' in value) || value['id'] === undefined) return false; + if (!('name' in value) || value['name'] === undefined) return false; + if ((!('parentId' in (value as Record)) && !('parent_id' in (value as Record))) || ((value as Record)['parentId'] === undefined && (value as Record)['parent_id'] === undefined)) return false; + if (!('rank' in value) || value['rank'] === undefined) return false; if (!('snippet' in value) || value['snippet'] === undefined) return false; if ((!('updatedAt' in (value as Record)) && !('updated_at' in (value as Record))) || ((value as Record)['updatedAt'] === undefined && (value as Record)['updated_at'] === undefined)) return false; - if (!('url' in value) || value['url'] === undefined) return false; - if ((!('versionNumber' in (value as Record)) && !('version_number' in (value as Record))) || ((value as Record)['versionNumber'] === undefined && (value as Record)['version_number'] === undefined)) return false; + if ((!('versionId' in (value as Record)) && !('version_id' in (value as Record))) || ((value as Record)['versionId'] === undefined && (value as Record)['version_id'] === undefined)) return false; return true; } @@ -114,17 +101,15 @@ export function SearchHitOutFromJSONTyped(json: any, ignoreDiscriminator: boolea } return { - 'artId': json['art_id'], 'contentType': json['content_type'], 'driveId': json['drive_id'], - 'fileType': json['file_type'], - 'labels': json['labels'] == null ? undefined : json['labels'], - 'path': json['path'], - 'score': json['score'], + 'id': json['id'], + 'name': json['name'], + 'parentId': json['parent_id'], + 'rank': json['rank'], 'snippet': json['snippet'], 'updatedAt': (new Date(json['updated_at'])), - 'url': json['url'], - 'versionNumber': json['version_number'], + 'versionId': json['version_id'], }; } @@ -139,16 +124,14 @@ export function SearchHitOutToJSONTyped(value?: SearchHitOut | null, ignoreDiscr return { - 'art_id': value['artId'], 'content_type': value['contentType'], 'drive_id': value['driveId'], - 'file_type': value['fileType'], - 'labels': value['labels'], - 'path': value['path'], - 'score': value['score'], + 'id': value['id'], + 'name': value['name'], + 'parent_id': value['parentId'], + 'rank': value['rank'], 'snippet': value['snippet'], 'updated_at': value['updatedAt'].toISOString(), - 'url': value['url'], - 'version_number': value['versionNumber'], + 'version_id': value['versionId'], }; } diff --git a/sdk/typescript/src/models/SearchPage.ts b/sdk/typescript/src/models/SearchPage.ts deleted file mode 100644 index dacad24..0000000 --- a/sdk/typescript/src/models/SearchPage.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { SearchHitOut } from './SearchHitOut'; -import { - SearchHitOutFromJSON, - SearchHitOutFromJSONTyped, - SearchHitOutToJSON, - SearchHitOutToJSONTyped, -} from './SearchHitOut'; - -/** - * `/v0/search` response — single-shot top-N, deliberately unpaginated. - * - * Ranked retrieval doesn't paginate meaningfully (the industry norm: - * vector/RAG APIs are pure top-K; Algolia/GitHub cap ranked results - * outright) — the correct "next page" of a relevance-ranked list is a - * narrower query. Raise `limit` (≤100) for more hits. A `next_cursor` - * field advertised here in the past was structurally always null and - * was dropped; if deep retrieval is ever needed, an ES-`search_after` - * style `(score, id)` keyset can be re-added additively. - * @export - * @interface SearchPage - */ -export interface SearchPage { - /** - * - * @type {Array} - * @memberof SearchPage - */ - items: Array; -} - -/** - * Check if a given object implements the SearchPage interface. - */ -export function instanceOfSearchPage(value: object): value is SearchPage { - if (!('items' in value) || value['items'] === undefined) return false; - return true; -} - -export function SearchPageFromJSON(json: any): SearchPage { - return SearchPageFromJSONTyped(json, false); -} - -export function SearchPageFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchPage { - if (json == null) { - return json; - } - return { - - 'items': ((json['items'] as Array).map(SearchHitOutFromJSON)), - }; -} - -export function SearchPageToJSON(json: any): SearchPage { - return SearchPageToJSONTyped(json, false); -} - -export function SearchPageToJSONTyped(value?: SearchPage | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'items': ((value['items'] as Array).map(SearchHitOutToJSON)), - }; -} diff --git a/sdk/typescript/src/models/SearchPageOut.ts b/sdk/typescript/src/models/SearchPageOut.ts new file mode 100644 index 0000000..b439830 --- /dev/null +++ b/sdk/typescript/src/models/SearchPageOut.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { SearchHitOut } from './SearchHitOut'; +import { + SearchHitOutFromJSON, + SearchHitOutFromJSONTyped, + SearchHitOutToJSON, + SearchHitOutToJSONTyped, +} from './SearchHitOut'; + +/** + * + * @export + * @interface SearchPageOut + */ +export interface SearchPageOut { + /** + * + * @type {Array} + * @memberof SearchPageOut + */ + items: Array; + /** + * + * @type {string} + * @memberof SearchPageOut + */ + nextCursor: string | null; +} + +/** + * Check if a given object implements the SearchPageOut interface. + */ +export function instanceOfSearchPageOut(value: object): value is SearchPageOut { + if (!('items' in value) || value['items'] === undefined) return false; + if ((!('nextCursor' in (value as Record)) && !('next_cursor' in (value as Record))) || ((value as Record)['nextCursor'] === undefined && (value as Record)['next_cursor'] === undefined)) return false; + return true; +} + +export function SearchPageOutFromJSON(json: any): SearchPageOut { + return SearchPageOutFromJSONTyped(json, false); +} + +export function SearchPageOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchPageOut { + if (json == null) { + return json; + } + return { + + 'items': ((json['items'] as Array).map(SearchHitOutFromJSON)), + 'nextCursor': json['next_cursor'], + }; +} + +export function SearchPageOutToJSON(json: any): SearchPageOut { + return SearchPageOutToJSONTyped(json, false); +} + +export function SearchPageOutToJSONTyped(value?: SearchPageOut | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': ((value['items'] as Array).map(SearchHitOutToJSON)), + 'next_cursor': value['nextCursor'], + }; +} diff --git a/sdk/typescript/src/models/ShareCreateIn.ts b/sdk/typescript/src/models/ShareCreateIn.ts index 52aee11..be70c02 100644 --- a/sdk/typescript/src/models/ShareCreateIn.ts +++ b/sdk/typescript/src/models/ShareCreateIn.ts @@ -2,7 +2,7 @@ /* eslint-disable */ /** * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. * * The version of the OpenAPI document: * @@ -14,56 +14,49 @@ import { mapValues } from '../runtime'; /** - * POST /v0/shares body. `resource` is an `art_*`/`fld_*` id or a path. - * `expires_in` is seconds from now (omit for the default: none for a human - * creator, a short TTL for an agent). `password` (optional) gates redemption. + * POST /v0/drives/{id}/shares body. * @export * @interface ShareCreateIn */ export interface ShareCreateIn { /** * - * @type {number} + * @type {Date} * @memberof ShareCreateIn */ - expiresIn?: number | null; + expiresAt?: Date | null; /** * * @type {string} * @memberof ShareCreateIn */ - password?: string | null; + resourceId: string; /** * - * @type {string} - * @memberof ShareCreateIn - */ - resource: string; - /** - * - * @type {ShareCreateInRoleEnum} + * @type {ShareCreateInResourceTypeEnum} * @memberof ShareCreateIn */ - role?: ShareCreateInRoleEnum; + resourceType: ShareCreateInResourceTypeEnum; } /** * @export */ -export const ShareCreateInRoleEnum = { - Viewer: 'viewer', - Commenter: 'commenter', - Editor: 'editor' +export const ShareCreateInResourceTypeEnum = { + Artifact: 'artifact', + ArtifactVersion: 'artifact_version', + Folder: 'folder' } as const; -export type ShareCreateInRoleEnum = typeof ShareCreateInRoleEnum[keyof typeof ShareCreateInRoleEnum]; +export type ShareCreateInResourceTypeEnum = typeof ShareCreateInResourceTypeEnum[keyof typeof ShareCreateInResourceTypeEnum]; /** * Check if a given object implements the ShareCreateIn interface. */ export function instanceOfShareCreateIn(value: object): value is ShareCreateIn { - if (!('resource' in value) || value['resource'] === undefined) return false; + if ((!('resourceId' in (value as Record)) && !('resource_id' in (value as Record))) || ((value as Record)['resourceId'] === undefined && (value as Record)['resource_id'] === undefined)) return false; + if ((!('resourceType' in (value as Record)) && !('resource_type' in (value as Record))) || ((value as Record)['resourceType'] === undefined && (value as Record)['resource_type'] === undefined)) return false; return true; } @@ -77,10 +70,9 @@ export function ShareCreateInFromJSONTyped(json: any, ignoreDiscriminator: boole } return { - 'expiresIn': json['expires_in'] === undefined ? undefined : json['expires_in'] === null ? null : json['expires_in'], - 'password': json['password'] === undefined ? undefined : json['password'] === null ? null : json['password'], - 'resource': json['resource'], - 'role': json['role'] == null ? undefined : json['role'], + 'expiresAt': json['expires_at'] === undefined ? undefined : json['expires_at'] === null ? null : (new Date(json['expires_at'])), + 'resourceId': json['resource_id'], + 'resourceType': json['resource_type'], }; } @@ -95,9 +87,8 @@ export function ShareCreateInToJSONTyped(value?: ShareCreateIn | null, ignoreDis return { - 'expires_in': value['expiresIn'], - 'password': value['password'], - 'resource': value['resource'], - 'role': value['role'], + 'expires_at': value['expiresAt'] == null ? value['expiresAt'] : value['expiresAt'].toISOString(), + 'resource_id': value['resourceId'], + 'resource_type': value['resourceType'], }; } diff --git a/sdk/typescript/src/models/ShareCreateOut.ts b/sdk/typescript/src/models/ShareCreateOut.ts new file mode 100644 index 0000000..82c6863 --- /dev/null +++ b/sdk/typescript/src/models/ShareCreateOut.ts @@ -0,0 +1,185 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * The create/rotate response — the ONLY response carrying the plaintext + * secret. + * @export + * @interface ShareCreateOut + */ +export interface ShareCreateOut { + /** + * + * @type {Date} + * @memberof ShareCreateOut + */ + createdAt: Date; + /** + * + * @type {string} + * @memberof ShareCreateOut + */ + createdBy: string | null; + /** + * + * @type {string} + * @memberof ShareCreateOut + */ + driveId: string; + /** + * + * @type {Date} + * @memberof ShareCreateOut + */ + expiresAt: Date | null; + /** + * + * @type {string} + * @memberof ShareCreateOut + */ + id: string; + /** + * + * @type {string} + * @memberof ShareCreateOut + */ + resourceId: string; + /** + * + * @type {ShareCreateOutResourceTypeEnum} + * @memberof ShareCreateOut + */ + resourceType: ShareCreateOutResourceTypeEnum; + /** + * + * @type {string} + * @memberof ShareCreateOut + */ + revision: string; + /** + * + * @type {Date} + * @memberof ShareCreateOut + */ + revokedAt: Date | null; + /** + * + * @type {Date} + * @memberof ShareCreateOut + */ + rotatedAt: Date | null; + /** + * Plaintext share secret. Present only on first execution of a create or rotate; null on idempotent replay — rotate to obtain a new secret. + * @type {string} + * @memberof ShareCreateOut + */ + secret?: string | null; + /** + * + * @type {ShareCreateOutStateEnum} + * @memberof ShareCreateOut + */ + state: ShareCreateOutStateEnum; +} + + +/** + * @export + */ +export const ShareCreateOutResourceTypeEnum = { + Artifact: 'artifact', + ArtifactVersion: 'artifact_version', + Folder: 'folder' +} as const; +export type ShareCreateOutResourceTypeEnum = typeof ShareCreateOutResourceTypeEnum[keyof typeof ShareCreateOutResourceTypeEnum]; + +/** + * @export + */ +export const ShareCreateOutStateEnum = { + Active: 'active', + Revoked: 'revoked' +} as const; +export type ShareCreateOutStateEnum = typeof ShareCreateOutStateEnum[keyof typeof ShareCreateOutStateEnum]; + + +/** + * Check if a given object implements the ShareCreateOut interface. + */ +export function instanceOfShareCreateOut(value: object): value is ShareCreateOut { + if ((!('createdAt' in (value as Record)) && !('created_at' in (value as Record))) || ((value as Record)['createdAt'] === undefined && (value as Record)['created_at'] === undefined)) return false; + if ((!('createdBy' in (value as Record)) && !('created_by' in (value as Record))) || ((value as Record)['createdBy'] === undefined && (value as Record)['created_by'] === undefined)) return false; + if ((!('driveId' in (value as Record)) && !('drive_id' in (value as Record))) || ((value as Record)['driveId'] === undefined && (value as Record)['drive_id'] === undefined)) return false; + if ((!('expiresAt' in (value as Record)) && !('expires_at' in (value as Record))) || ((value as Record)['expiresAt'] === undefined && (value as Record)['expires_at'] === undefined)) return false; + if (!('id' in value) || value['id'] === undefined) return false; + if ((!('resourceId' in (value as Record)) && !('resource_id' in (value as Record))) || ((value as Record)['resourceId'] === undefined && (value as Record)['resource_id'] === undefined)) return false; + if ((!('resourceType' in (value as Record)) && !('resource_type' in (value as Record))) || ((value as Record)['resourceType'] === undefined && (value as Record)['resource_type'] === undefined)) return false; + if (!('revision' in value) || value['revision'] === undefined) return false; + if ((!('revokedAt' in (value as Record)) && !('revoked_at' in (value as Record))) || ((value as Record)['revokedAt'] === undefined && (value as Record)['revoked_at'] === undefined)) return false; + if ((!('rotatedAt' in (value as Record)) && !('rotated_at' in (value as Record))) || ((value as Record)['rotatedAt'] === undefined && (value as Record)['rotated_at'] === undefined)) return false; + if (!('state' in value) || value['state'] === undefined) return false; + return true; +} + +export function ShareCreateOutFromJSON(json: any): ShareCreateOut { + return ShareCreateOutFromJSONTyped(json, false); +} + +export function ShareCreateOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShareCreateOut { + if (json == null) { + return json; + } + return { + + 'createdAt': (new Date(json['created_at'])), + 'createdBy': json['created_by'], + 'driveId': json['drive_id'], + 'expiresAt': (json['expires_at'] == null ? null : new Date(json['expires_at'])), + 'id': json['id'], + 'resourceId': json['resource_id'], + 'resourceType': json['resource_type'], + 'revision': json['revision'], + 'revokedAt': (json['revoked_at'] == null ? null : new Date(json['revoked_at'])), + 'rotatedAt': (json['rotated_at'] == null ? null : new Date(json['rotated_at'])), + 'secret': json['secret'] === undefined ? undefined : json['secret'] === null ? null : json['secret'], + 'state': json['state'], + }; +} + +export function ShareCreateOutToJSON(json: any): ShareCreateOut { + return ShareCreateOutToJSONTyped(json, false); +} + +export function ShareCreateOutToJSONTyped(value?: ShareCreateOut | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'created_at': value['createdAt'].toISOString(), + 'created_by': value['createdBy'], + 'drive_id': value['driveId'], + 'expires_at': value['expiresAt'] == null ? value['expiresAt'] : value['expiresAt'].toISOString(), + 'id': value['id'], + 'resource_id': value['resourceId'], + 'resource_type': value['resourceType'], + 'revision': value['revision'], + 'revoked_at': value['revokedAt'] == null ? value['revokedAt'] : value['revokedAt'].toISOString(), + 'rotated_at': value['rotatedAt'] == null ? value['rotatedAt'] : value['rotatedAt'].toISOString(), + 'secret': value['secret'], + 'state': value['state'], + }; +} diff --git a/sdk/typescript/src/models/ShareErrorOut.ts b/sdk/typescript/src/models/ShareErrorOut.ts deleted file mode 100644 index a1af1ab..0000000 --- a/sdk/typescript/src/models/ShareErrorOut.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { ErrorBody } from './ErrorBody'; -import { - ErrorBodyFromJSON, - ErrorBodyFromJSONTyped, - ErrorBodyToJSON, - ErrorBodyToJSONTyped, -} from './ErrorBody'; - -/** - * Negotiated JSON error shape for the public share protocol. - * @export - * @interface ShareErrorOut - */ -export interface ShareErrorOut { - /** - * - * @type {ErrorBody} - * @memberof ShareErrorOut - */ - error: ErrorBody; -} - -/** - * Check if a given object implements the ShareErrorOut interface. - */ -export function instanceOfShareErrorOut(value: object): value is ShareErrorOut { - if (!('error' in value) || value['error'] === undefined) return false; - return true; -} - -export function ShareErrorOutFromJSON(json: any): ShareErrorOut { - return ShareErrorOutFromJSONTyped(json, false); -} - -export function ShareErrorOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShareErrorOut { - if (json == null) { - return json; - } - return { - - 'error': ErrorBodyFromJSON(json['error']), - }; -} - -export function ShareErrorOutToJSON(json: any): ShareErrorOut { - return ShareErrorOutToJSONTyped(json, false); -} - -export function ShareErrorOutToJSONTyped(value?: ShareErrorOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'error': ErrorBodyToJSON(value['error']), - }; -} diff --git a/sdk/typescript/src/models/ShareList.ts b/sdk/typescript/src/models/ShareList.ts deleted file mode 100644 index 0acab79..0000000 --- a/sdk/typescript/src/models/ShareList.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { ShareOut } from './ShareOut'; -import { - ShareOutFromJSON, - ShareOutFromJSONTyped, - ShareOutToJSON, - ShareOutToJSONTyped, -} from './ShareOut'; - -/** - * - * @export - * @interface ShareList - */ -export interface ShareList { - /** - * - * @type {Array} - * @memberof ShareList - */ - items: Array; - /** - * - * @type {string} - * @memberof ShareList - */ - nextCursor?: string | null; -} - -/** - * Check if a given object implements the ShareList interface. - */ -export function instanceOfShareList(value: object): value is ShareList { - if (!('items' in value) || value['items'] === undefined) return false; - return true; -} - -export function ShareListFromJSON(json: any): ShareList { - return ShareListFromJSONTyped(json, false); -} - -export function ShareListFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShareList { - if (json == null) { - return json; - } - return { - - 'items': ((json['items'] as Array).map(ShareOutFromJSON)), - 'nextCursor': json['next_cursor'] === undefined ? undefined : json['next_cursor'] === null ? null : json['next_cursor'], - }; -} - -export function ShareListToJSON(json: any): ShareList { - return ShareListToJSONTyped(json, false); -} - -export function ShareListToJSONTyped(value?: ShareList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'items': ((value['items'] as Array).map(ShareOutToJSON)), - 'next_cursor': value['nextCursor'], - }; -} diff --git a/sdk/typescript/src/models/ShareListOut.ts b/sdk/typescript/src/models/ShareListOut.ts new file mode 100644 index 0000000..5da73f1 --- /dev/null +++ b/sdk/typescript/src/models/ShareListOut.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ShareOut } from './ShareOut'; +import { + ShareOutFromJSON, + ShareOutFromJSONTyped, + ShareOutToJSON, + ShareOutToJSONTyped, +} from './ShareOut'; + +/** + * + * @export + * @interface ShareListOut + */ +export interface ShareListOut { + /** + * + * @type {Array} + * @memberof ShareListOut + */ + items: Array; + /** + * + * @type {string} + * @memberof ShareListOut + */ + nextCursor: string | null; +} + +/** + * Check if a given object implements the ShareListOut interface. + */ +export function instanceOfShareListOut(value: object): value is ShareListOut { + if (!('items' in value) || value['items'] === undefined) return false; + if ((!('nextCursor' in (value as Record)) && !('next_cursor' in (value as Record))) || ((value as Record)['nextCursor'] === undefined && (value as Record)['next_cursor'] === undefined)) return false; + return true; +} + +export function ShareListOutFromJSON(json: any): ShareListOut { + return ShareListOutFromJSONTyped(json, false); +} + +export function ShareListOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShareListOut { + if (json == null) { + return json; + } + return { + + 'items': ((json['items'] as Array).map(ShareOutFromJSON)), + 'nextCursor': json['next_cursor'], + }; +} + +export function ShareListOutToJSON(json: any): ShareListOut { + return ShareListOutToJSONTyped(json, false); +} + +export function ShareListOutToJSONTyped(value?: ShareListOut | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': ((value['items'] as Array).map(ShareOutToJSON)), + 'next_cursor': value['nextCursor'], + }; +} diff --git a/sdk/typescript/src/models/ShareMintOut.ts b/sdk/typescript/src/models/ShareMintOut.ts deleted file mode 100644 index 27c311b..0000000 --- a/sdk/typescript/src/models/ShareMintOut.ts +++ /dev/null @@ -1,183 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * The create/rotate response — the ONLY place the `share_key` and its - * redemption `url` are exposed. - * @export - * @interface ShareMintOut - */ -export interface ShareMintOut { - /** - * - * @type {number} - * @memberof ShareMintOut - */ - accessCount?: number; - /** - * - * @type {string} - * @memberof ShareMintOut - */ - audience: string; - /** - * - * @type {Date} - * @memberof ShareMintOut - */ - createdAt: Date; - /** - * - * @type {Date} - * @memberof ShareMintOut - */ - expiresAt?: Date | null; - /** - * - * @type {boolean} - * @memberof ShareMintOut - */ - hasPassword: boolean; - /** - * - * @type {string} - * @memberof ShareMintOut - */ - id: string; - /** - * - * @type {Date} - * @memberof ShareMintOut - */ - lastAccessedAt?: Date | null; - /** - * - * @type {string} - * @memberof ShareMintOut - */ - resourceId: string; - /** - * - * @type {ShareMintOutResourceTypeEnum} - * @memberof ShareMintOut - */ - resourceType: ShareMintOutResourceTypeEnum; - /** - * - * @type {ShareMintOutRoleEnum} - * @memberof ShareMintOut - */ - role: ShareMintOutRoleEnum; - /** - * - * @type {string} - * @memberof ShareMintOut - */ - shareKey: string; - /** - * - * @type {string} - * @memberof ShareMintOut - */ - url: string; -} - - -/** - * @export - */ -export const ShareMintOutResourceTypeEnum = { - Artifact: 'artifact', - Folder: 'folder' -} as const; -export type ShareMintOutResourceTypeEnum = typeof ShareMintOutResourceTypeEnum[keyof typeof ShareMintOutResourceTypeEnum]; - -/** - * @export - */ -export const ShareMintOutRoleEnum = { - Viewer: 'viewer', - Commenter: 'commenter', - Editor: 'editor' -} as const; -export type ShareMintOutRoleEnum = typeof ShareMintOutRoleEnum[keyof typeof ShareMintOutRoleEnum]; - - -/** - * Check if a given object implements the ShareMintOut interface. - */ -export function instanceOfShareMintOut(value: object): value is ShareMintOut { - if (!('audience' in value) || value['audience'] === undefined) return false; - if ((!('createdAt' in (value as Record)) && !('created_at' in (value as Record))) || ((value as Record)['createdAt'] === undefined && (value as Record)['created_at'] === undefined)) return false; - if ((!('hasPassword' in (value as Record)) && !('has_password' in (value as Record))) || ((value as Record)['hasPassword'] === undefined && (value as Record)['has_password'] === undefined)) return false; - if (!('id' in value) || value['id'] === undefined) return false; - if ((!('resourceId' in (value as Record)) && !('resource_id' in (value as Record))) || ((value as Record)['resourceId'] === undefined && (value as Record)['resource_id'] === undefined)) return false; - if ((!('resourceType' in (value as Record)) && !('resource_type' in (value as Record))) || ((value as Record)['resourceType'] === undefined && (value as Record)['resource_type'] === undefined)) return false; - if (!('role' in value) || value['role'] === undefined) return false; - if ((!('shareKey' in (value as Record)) && !('share_key' in (value as Record))) || ((value as Record)['shareKey'] === undefined && (value as Record)['share_key'] === undefined)) return false; - if (!('url' in value) || value['url'] === undefined) return false; - return true; -} - -export function ShareMintOutFromJSON(json: any): ShareMintOut { - return ShareMintOutFromJSONTyped(json, false); -} - -export function ShareMintOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShareMintOut { - if (json == null) { - return json; - } - return { - - 'accessCount': json['access_count'] == null ? undefined : json['access_count'], - 'audience': json['audience'], - 'createdAt': (new Date(json['created_at'])), - 'expiresAt': json['expires_at'] === undefined ? undefined : json['expires_at'] === null ? null : (new Date(json['expires_at'])), - 'hasPassword': json['has_password'], - 'id': json['id'], - 'lastAccessedAt': json['last_accessed_at'] === undefined ? undefined : json['last_accessed_at'] === null ? null : (new Date(json['last_accessed_at'])), - 'resourceId': json['resource_id'], - 'resourceType': json['resource_type'], - 'role': json['role'], - 'shareKey': json['share_key'], - 'url': json['url'], - }; -} - -export function ShareMintOutToJSON(json: any): ShareMintOut { - return ShareMintOutToJSONTyped(json, false); -} - -export function ShareMintOutToJSONTyped(value?: ShareMintOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'access_count': value['accessCount'], - 'audience': value['audience'], - 'created_at': value['createdAt'].toISOString(), - 'expires_at': value['expiresAt'] == null ? value['expiresAt'] : value['expiresAt'].toISOString(), - 'has_password': value['hasPassword'], - 'id': value['id'], - 'last_accessed_at': value['lastAccessedAt'] == null ? value['lastAccessedAt'] : value['lastAccessedAt'].toISOString(), - 'resource_id': value['resourceId'], - 'resource_type': value['resourceType'], - 'role': value['role'], - 'share_key': value['shareKey'], - 'url': value['url'], - }; -} diff --git a/sdk/typescript/src/models/ShareOut.ts b/sdk/typescript/src/models/ShareOut.ts index 8c00ee8..73ef6bd 100644 --- a/sdk/typescript/src/models/ShareOut.ts +++ b/sdk/typescript/src/models/ShareOut.ts @@ -2,7 +2,7 @@ /* eslint-disable */ /** * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. * * The version of the OpenAPI document: * @@ -14,72 +14,77 @@ import { mapValues } from '../runtime'; /** - * A live share link as seen on list/management — NEVER carries the - * `share_key` (that is the credential, returned only at mint/rotate). + * * @export * @interface ShareOut */ export interface ShareOut { /** * - * @type {number} + * @type {Date} * @memberof ShareOut */ - accessCount?: number; + createdAt: Date; /** * * @type {string} * @memberof ShareOut */ - audience: string; + createdBy: string | null; /** * - * @type {Date} + * @type {string} * @memberof ShareOut */ - createdAt: Date; + driveId: string; /** * * @type {Date} * @memberof ShareOut */ - expiresAt?: Date | null; + expiresAt: Date | null; /** * - * @type {boolean} + * @type {string} * @memberof ShareOut */ - hasPassword: boolean; + id: string; /** * * @type {string} * @memberof ShareOut */ - id: string; + resourceId: string; /** * - * @type {Date} + * @type {ShareOutResourceTypeEnum} * @memberof ShareOut */ - lastAccessedAt?: Date | null; + resourceType: ShareOutResourceTypeEnum; /** * * @type {string} * @memberof ShareOut */ - resourceId: string; + revision: string; /** * - * @type {ShareOutResourceTypeEnum} + * @type {Date} * @memberof ShareOut */ - resourceType: ShareOutResourceTypeEnum; + revokedAt: Date | null; + /** + * + * @type {Date} + * @memberof ShareOut + */ + rotatedAt: Date | null; /** * - * @type {ShareOutRoleEnum} + * @type {ShareOutStateEnum} * @memberof ShareOut */ - role: ShareOutRoleEnum; + state: ShareOutStateEnum; } @@ -88,6 +93,7 @@ export interface ShareOut { */ export const ShareOutResourceTypeEnum = { Artifact: 'artifact', + ArtifactVersion: 'artifact_version', Folder: 'folder' } as const; export type ShareOutResourceTypeEnum = typeof ShareOutResourceTypeEnum[keyof typeof ShareOutResourceTypeEnum]; @@ -95,25 +101,28 @@ export type ShareOutResourceTypeEnum = typeof ShareOutResourceTypeEnum[keyof typ /** * @export */ -export const ShareOutRoleEnum = { - Viewer: 'viewer', - Commenter: 'commenter', - Editor: 'editor' +export const ShareOutStateEnum = { + Active: 'active', + Revoked: 'revoked' } as const; -export type ShareOutRoleEnum = typeof ShareOutRoleEnum[keyof typeof ShareOutRoleEnum]; +export type ShareOutStateEnum = typeof ShareOutStateEnum[keyof typeof ShareOutStateEnum]; /** * Check if a given object implements the ShareOut interface. */ export function instanceOfShareOut(value: object): value is ShareOut { - if (!('audience' in value) || value['audience'] === undefined) return false; if ((!('createdAt' in (value as Record)) && !('created_at' in (value as Record))) || ((value as Record)['createdAt'] === undefined && (value as Record)['created_at'] === undefined)) return false; - if ((!('hasPassword' in (value as Record)) && !('has_password' in (value as Record))) || ((value as Record)['hasPassword'] === undefined && (value as Record)['has_password'] === undefined)) return false; + if ((!('createdBy' in (value as Record)) && !('created_by' in (value as Record))) || ((value as Record)['createdBy'] === undefined && (value as Record)['created_by'] === undefined)) return false; + if ((!('driveId' in (value as Record)) && !('drive_id' in (value as Record))) || ((value as Record)['driveId'] === undefined && (value as Record)['drive_id'] === undefined)) return false; + if ((!('expiresAt' in (value as Record)) && !('expires_at' in (value as Record))) || ((value as Record)['expiresAt'] === undefined && (value as Record)['expires_at'] === undefined)) return false; if (!('id' in value) || value['id'] === undefined) return false; if ((!('resourceId' in (value as Record)) && !('resource_id' in (value as Record))) || ((value as Record)['resourceId'] === undefined && (value as Record)['resource_id'] === undefined)) return false; if ((!('resourceType' in (value as Record)) && !('resource_type' in (value as Record))) || ((value as Record)['resourceType'] === undefined && (value as Record)['resource_type'] === undefined)) return false; - if (!('role' in value) || value['role'] === undefined) return false; + if (!('revision' in value) || value['revision'] === undefined) return false; + if ((!('revokedAt' in (value as Record)) && !('revoked_at' in (value as Record))) || ((value as Record)['revokedAt'] === undefined && (value as Record)['revoked_at'] === undefined)) return false; + if ((!('rotatedAt' in (value as Record)) && !('rotated_at' in (value as Record))) || ((value as Record)['rotatedAt'] === undefined && (value as Record)['rotated_at'] === undefined)) return false; + if (!('state' in value) || value['state'] === undefined) return false; return true; } @@ -127,16 +136,17 @@ export function ShareOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): } return { - 'accessCount': json['access_count'] == null ? undefined : json['access_count'], - 'audience': json['audience'], 'createdAt': (new Date(json['created_at'])), - 'expiresAt': json['expires_at'] === undefined ? undefined : json['expires_at'] === null ? null : (new Date(json['expires_at'])), - 'hasPassword': json['has_password'], + 'createdBy': json['created_by'], + 'driveId': json['drive_id'], + 'expiresAt': (json['expires_at'] == null ? null : new Date(json['expires_at'])), 'id': json['id'], - 'lastAccessedAt': json['last_accessed_at'] === undefined ? undefined : json['last_accessed_at'] === null ? null : (new Date(json['last_accessed_at'])), 'resourceId': json['resource_id'], 'resourceType': json['resource_type'], - 'role': json['role'], + 'revision': json['revision'], + 'revokedAt': (json['revoked_at'] == null ? null : new Date(json['revoked_at'])), + 'rotatedAt': (json['rotated_at'] == null ? null : new Date(json['rotated_at'])), + 'state': json['state'], }; } @@ -151,15 +161,16 @@ export function ShareOutToJSONTyped(value?: ShareOut | null, ignoreDiscriminator return { - 'access_count': value['accessCount'], - 'audience': value['audience'], 'created_at': value['createdAt'].toISOString(), + 'created_by': value['createdBy'], + 'drive_id': value['driveId'], 'expires_at': value['expiresAt'] == null ? value['expiresAt'] : value['expiresAt'].toISOString(), - 'has_password': value['hasPassword'], 'id': value['id'], - 'last_accessed_at': value['lastAccessedAt'] == null ? value['lastAccessedAt'] : value['lastAccessedAt'].toISOString(), 'resource_id': value['resourceId'], 'resource_type': value['resourceType'], - 'role': value['role'], + 'revision': value['revision'], + 'revoked_at': value['revokedAt'] == null ? value['revokedAt'] : value['revokedAt'].toISOString(), + 'rotated_at': value['rotatedAt'] == null ? value['rotatedAt'] : value['rotatedAt'].toISOString(), + 'state': value['state'], }; } diff --git a/sdk/typescript/src/models/ShareRedeemOut.ts b/sdk/typescript/src/models/ShareRedeemOut.ts deleted file mode 100644 index 9afd672..0000000 --- a/sdk/typescript/src/models/ShareRedeemOut.ts +++ /dev/null @@ -1,92 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface ShareRedeemOut - */ -export interface ShareRedeemOut { - /** - * - * @type {Date} - * @memberof ShareRedeemOut - */ - expiresAt: Date; - /** - * - * @type {string} - * @memberof ShareRedeemOut - */ - role: string; - /** - * - * @type {string} - * @memberof ShareRedeemOut - */ - token: string; - /** - * - * @type {string} - * @memberof ShareRedeemOut - */ - url: string; -} - -/** - * Check if a given object implements the ShareRedeemOut interface. - */ -export function instanceOfShareRedeemOut(value: object): value is ShareRedeemOut { - if ((!('expiresAt' in (value as Record)) && !('expires_at' in (value as Record))) || ((value as Record)['expiresAt'] === undefined && (value as Record)['expires_at'] === undefined)) return false; - if (!('role' in value) || value['role'] === undefined) return false; - if (!('token' in value) || value['token'] === undefined) return false; - if (!('url' in value) || value['url'] === undefined) return false; - return true; -} - -export function ShareRedeemOutFromJSON(json: any): ShareRedeemOut { - return ShareRedeemOutFromJSONTyped(json, false); -} - -export function ShareRedeemOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): ShareRedeemOut { - if (json == null) { - return json; - } - return { - - 'expiresAt': (new Date(json['expires_at'])), - 'role': json['role'], - 'token': json['token'], - 'url': json['url'], - }; -} - -export function ShareRedeemOutToJSON(json: any): ShareRedeemOut { - return ShareRedeemOutToJSONTyped(json, false); -} - -export function ShareRedeemOutToJSONTyped(value?: ShareRedeemOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'expires_at': value['expiresAt'].toISOString(), - 'role': value['role'], - 'token': value['token'], - 'url': value['url'], - }; -} diff --git a/sdk/typescript/src/models/SourceRef.ts b/sdk/typescript/src/models/SourceRef.ts deleted file mode 100644 index 333f7c4..0000000 --- a/sdk/typescript/src/models/SourceRef.ts +++ /dev/null @@ -1,85 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * One typed provenance ref. `type` is open-vocabulary (server - * validates only length, not the value), so callers can declare new - * types as their integrations evolve. `id` is the type-specific - * identifier — for `type='artifact'` this is an `art_…` ID. - * @export - * @interface SourceRef - */ -export interface SourceRef { - /** - * - * @type {string} - * @memberof SourceRef - */ - id: string; - /** - * - * @type {{ [key: string]: any; }} - * @memberof SourceRef - */ - metadata?: { [key: string]: any; } | null; - /** - * - * @type {string} - * @memberof SourceRef - */ - type: string; -} - -/** - * Check if a given object implements the SourceRef interface. - */ -export function instanceOfSourceRef(value: object): value is SourceRef { - if (!('id' in value) || value['id'] === undefined) return false; - if (!('type' in value) || value['type'] === undefined) return false; - return true; -} - -export function SourceRefFromJSON(json: any): SourceRef { - return SourceRefFromJSONTyped(json, false); -} - -export function SourceRefFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceRef { - if (json == null) { - return json; - } - return { - - 'id': json['id'], - 'metadata': json['metadata'] === undefined ? undefined : json['metadata'] === null ? null : json['metadata'], - 'type': json['type'], - }; -} - -export function SourceRefToJSON(json: any): SourceRef { - return SourceRefToJSONTyped(json, false); -} - -export function SourceRefToJSONTyped(value?: SourceRef | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'id': value['id'], - 'metadata': value['metadata'], - 'type': value['type'], - }; -} diff --git a/sdk/typescript/src/models/StorageBreakdownOut.ts b/sdk/typescript/src/models/StorageBreakdownOut.ts deleted file mode 100644 index faa5efb..0000000 --- a/sdk/typescript/src/models/StorageBreakdownOut.ts +++ /dev/null @@ -1,92 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface StorageBreakdownOut - */ -export interface StorageBreakdownOut { - /** - * - * @type {Date} - * @memberof StorageBreakdownOut - */ - asOf: Date; - /** - * - * @type {number} - * @memberof StorageBreakdownOut - */ - liveBytes: number; - /** - * - * @type {number} - * @memberof StorageBreakdownOut - */ - trashBytes: number; - /** - * - * @type {number} - * @memberof StorageBreakdownOut - */ - versionBytes: number; -} - -/** - * Check if a given object implements the StorageBreakdownOut interface. - */ -export function instanceOfStorageBreakdownOut(value: object): value is StorageBreakdownOut { - if ((!('asOf' in (value as Record)) && !('as_of' in (value as Record))) || ((value as Record)['asOf'] === undefined && (value as Record)['as_of'] === undefined)) return false; - if ((!('liveBytes' in (value as Record)) && !('live_bytes' in (value as Record))) || ((value as Record)['liveBytes'] === undefined && (value as Record)['live_bytes'] === undefined)) return false; - if ((!('trashBytes' in (value as Record)) && !('trash_bytes' in (value as Record))) || ((value as Record)['trashBytes'] === undefined && (value as Record)['trash_bytes'] === undefined)) return false; - if ((!('versionBytes' in (value as Record)) && !('version_bytes' in (value as Record))) || ((value as Record)['versionBytes'] === undefined && (value as Record)['version_bytes'] === undefined)) return false; - return true; -} - -export function StorageBreakdownOutFromJSON(json: any): StorageBreakdownOut { - return StorageBreakdownOutFromJSONTyped(json, false); -} - -export function StorageBreakdownOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): StorageBreakdownOut { - if (json == null) { - return json; - } - return { - - 'asOf': (new Date(json['as_of'])), - 'liveBytes': json['live_bytes'], - 'trashBytes': json['trash_bytes'], - 'versionBytes': json['version_bytes'], - }; -} - -export function StorageBreakdownOutToJSON(json: any): StorageBreakdownOut { - return StorageBreakdownOutToJSONTyped(json, false); -} - -export function StorageBreakdownOutToJSONTyped(value?: StorageBreakdownOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'as_of': value['asOf'].toISOString().substring(0,10), - 'live_bytes': value['liveBytes'], - 'trash_bytes': value['trashBytes'], - 'version_bytes': value['versionBytes'], - }; -} diff --git a/sdk/typescript/src/models/StorageFootprintOut.ts b/sdk/typescript/src/models/StorageFootprintOut.ts deleted file mode 100644 index 87572c4..0000000 --- a/sdk/typescript/src/models/StorageFootprintOut.ts +++ /dev/null @@ -1,100 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface StorageFootprintOut - */ -export interface StorageFootprintOut { - /** - * - * @type {Date} - * @memberof StorageFootprintOut - */ - asOf?: Date | null; - /** - * - * @type {number} - * @memberof StorageFootprintOut - */ - liveBytes: number; - /** - * - * @type {number} - * @memberof StorageFootprintOut - */ - totalBytes: number; - /** - * - * @type {number} - * @memberof StorageFootprintOut - */ - trashBytes: number; - /** - * - * @type {number} - * @memberof StorageFootprintOut - */ - versionBytes: number; -} - -/** - * Check if a given object implements the StorageFootprintOut interface. - */ -export function instanceOfStorageFootprintOut(value: object): value is StorageFootprintOut { - if ((!('liveBytes' in (value as Record)) && !('live_bytes' in (value as Record))) || ((value as Record)['liveBytes'] === undefined && (value as Record)['live_bytes'] === undefined)) return false; - if ((!('totalBytes' in (value as Record)) && !('total_bytes' in (value as Record))) || ((value as Record)['totalBytes'] === undefined && (value as Record)['total_bytes'] === undefined)) return false; - if ((!('trashBytes' in (value as Record)) && !('trash_bytes' in (value as Record))) || ((value as Record)['trashBytes'] === undefined && (value as Record)['trash_bytes'] === undefined)) return false; - if ((!('versionBytes' in (value as Record)) && !('version_bytes' in (value as Record))) || ((value as Record)['versionBytes'] === undefined && (value as Record)['version_bytes'] === undefined)) return false; - return true; -} - -export function StorageFootprintOutFromJSON(json: any): StorageFootprintOut { - return StorageFootprintOutFromJSONTyped(json, false); -} - -export function StorageFootprintOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): StorageFootprintOut { - if (json == null) { - return json; - } - return { - - 'asOf': json['as_of'] === undefined ? undefined : json['as_of'] === null ? null : (new Date(json['as_of'])), - 'liveBytes': json['live_bytes'], - 'totalBytes': json['total_bytes'], - 'trashBytes': json['trash_bytes'], - 'versionBytes': json['version_bytes'], - }; -} - -export function StorageFootprintOutToJSON(json: any): StorageFootprintOut { - return StorageFootprintOutToJSONTyped(json, false); -} - -export function StorageFootprintOutToJSONTyped(value?: StorageFootprintOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'as_of': value['asOf'] == null ? value['asOf'] : value['asOf'].toISOString().substring(0,10), - 'live_bytes': value['liveBytes'], - 'total_bytes': value['totalBytes'], - 'trash_bytes': value['trashBytes'], - 'version_bytes': value['versionBytes'], - }; -} diff --git a/sdk/typescript/src/models/TokenResponse.ts b/sdk/typescript/src/models/TokenResponse.ts deleted file mode 100644 index eeebd33..0000000 --- a/sdk/typescript/src/models/TokenResponse.ts +++ /dev/null @@ -1,102 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * `POST /oauth2/token` success response. Mirrors RFC 6749 with - * an optional `identity_assertion` field for the claim grant path - * (where a fresh post-claim assertion supersedes the pre-claim - * one). - * @export - * @interface TokenResponse - */ -export interface TokenResponse { - /** - * - * @type {string} - * @memberof TokenResponse - */ - accessToken: string; - /** - * Seconds until access_token expiry. - * @type {number} - * @memberof TokenResponse - */ - expiresIn: number; - /** - * - * @type {string} - * @memberof TokenResponse - */ - identityAssertion?: string | null; - /** - * - * @type {string} - * @memberof TokenResponse - */ - scope: string; - /** - * - * @type {string} - * @memberof TokenResponse - */ - tokenType?: string; -} - -/** - * Check if a given object implements the TokenResponse interface. - */ -export function instanceOfTokenResponse(value: object): value is TokenResponse { - if ((!('accessToken' in (value as Record)) && !('access_token' in (value as Record))) || ((value as Record)['accessToken'] === undefined && (value as Record)['access_token'] === undefined)) return false; - if ((!('expiresIn' in (value as Record)) && !('expires_in' in (value as Record))) || ((value as Record)['expiresIn'] === undefined && (value as Record)['expires_in'] === undefined)) return false; - if (!('scope' in value) || value['scope'] === undefined) return false; - return true; -} - -export function TokenResponseFromJSON(json: any): TokenResponse { - return TokenResponseFromJSONTyped(json, false); -} - -export function TokenResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): TokenResponse { - if (json == null) { - return json; - } - return { - - 'accessToken': json['access_token'], - 'expiresIn': json['expires_in'], - 'identityAssertion': json['identity_assertion'] === undefined ? undefined : json['identity_assertion'] === null ? null : json['identity_assertion'], - 'scope': json['scope'], - 'tokenType': json['token_type'] == null ? undefined : json['token_type'], - }; -} - -export function TokenResponseToJSON(json: any): TokenResponse { - return TokenResponseToJSONTyped(json, false); -} - -export function TokenResponseToJSONTyped(value?: TokenResponse | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'access_token': value['accessToken'], - 'expires_in': value['expiresIn'], - 'identity_assertion': value['identityAssertion'], - 'scope': value['scope'], - 'token_type': value['tokenType'], - }; -} diff --git a/sdk/typescript/src/models/TokenUsageOut.ts b/sdk/typescript/src/models/TokenUsageOut.ts deleted file mode 100644 index 4bd6538..0000000 --- a/sdk/typescript/src/models/TokenUsageOut.ts +++ /dev/null @@ -1,92 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface TokenUsageOut - */ -export interface TokenUsageOut { - /** - * - * @type {number} - * @memberof TokenUsageOut - */ - embed: number; - /** - * - * @type {number} - * @memberof TokenUsageOut - */ - llmCached: number; - /** - * - * @type {number} - * @memberof TokenUsageOut - */ - llmInput: number; - /** - * - * @type {number} - * @memberof TokenUsageOut - */ - llmOutput: number; -} - -/** - * Check if a given object implements the TokenUsageOut interface. - */ -export function instanceOfTokenUsageOut(value: object): value is TokenUsageOut { - if (!('embed' in value) || value['embed'] === undefined) return false; - if ((!('llmCached' in (value as Record)) && !('llm_cached' in (value as Record))) || ((value as Record)['llmCached'] === undefined && (value as Record)['llm_cached'] === undefined)) return false; - if ((!('llmInput' in (value as Record)) && !('llm_input' in (value as Record))) || ((value as Record)['llmInput'] === undefined && (value as Record)['llm_input'] === undefined)) return false; - if ((!('llmOutput' in (value as Record)) && !('llm_output' in (value as Record))) || ((value as Record)['llmOutput'] === undefined && (value as Record)['llm_output'] === undefined)) return false; - return true; -} - -export function TokenUsageOutFromJSON(json: any): TokenUsageOut { - return TokenUsageOutFromJSONTyped(json, false); -} - -export function TokenUsageOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): TokenUsageOut { - if (json == null) { - return json; - } - return { - - 'embed': json['embed'], - 'llmCached': json['llm_cached'], - 'llmInput': json['llm_input'], - 'llmOutput': json['llm_output'], - }; -} - -export function TokenUsageOutToJSON(json: any): TokenUsageOut { - return TokenUsageOutToJSONTyped(json, false); -} - -export function TokenUsageOutToJSONTyped(value?: TokenUsageOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'embed': value['embed'], - 'llm_cached': value['llmCached'], - 'llm_input': value['llmInput'], - 'llm_output': value['llmOutput'], - }; -} diff --git a/sdk/typescript/src/models/TrashArtifactOut.ts b/sdk/typescript/src/models/TrashArtifactOut.ts deleted file mode 100644 index edc16b3..0000000 --- a/sdk/typescript/src/models/TrashArtifactOut.ts +++ /dev/null @@ -1,108 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface TrashArtifactOut - */ -export interface TrashArtifactOut { - /** - * - * @type {Date} - * @memberof TrashArtifactOut - */ - deletedAt?: Date | null; - /** - * - * @type {string} - * @memberof TrashArtifactOut - */ - id: string; - /** - * - * @type {string} - * @memberof TrashArtifactOut - */ - path: string; - /** - * - * @type {Date} - * @memberof TrashArtifactOut - */ - purgeAt?: Date | null; - /** - * - * @type {string} - * @memberof TrashArtifactOut - */ - restoreUrl: string; - /** - * - * @type {number} - * @memberof TrashArtifactOut - */ - sizeBytes: number; -} - -/** - * Check if a given object implements the TrashArtifactOut interface. - */ -export function instanceOfTrashArtifactOut(value: object): value is TrashArtifactOut { - if (!('id' in value) || value['id'] === undefined) return false; - if (!('path' in value) || value['path'] === undefined) return false; - if ((!('restoreUrl' in (value as Record)) && !('restore_url' in (value as Record))) || ((value as Record)['restoreUrl'] === undefined && (value as Record)['restore_url'] === undefined)) return false; - if ((!('sizeBytes' in (value as Record)) && !('size_bytes' in (value as Record))) || ((value as Record)['sizeBytes'] === undefined && (value as Record)['size_bytes'] === undefined)) return false; - return true; -} - -export function TrashArtifactOutFromJSON(json: any): TrashArtifactOut { - return TrashArtifactOutFromJSONTyped(json, false); -} - -export function TrashArtifactOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrashArtifactOut { - if (json == null) { - return json; - } - return { - - 'deletedAt': json['deleted_at'] === undefined ? undefined : json['deleted_at'] === null ? null : (new Date(json['deleted_at'])), - 'id': json['id'], - 'path': json['path'], - 'purgeAt': json['purge_at'] === undefined ? undefined : json['purge_at'] === null ? null : (new Date(json['purge_at'])), - 'restoreUrl': json['restore_url'], - 'sizeBytes': json['size_bytes'], - }; -} - -export function TrashArtifactOutToJSON(json: any): TrashArtifactOut { - return TrashArtifactOutToJSONTyped(json, false); -} - -export function TrashArtifactOutToJSONTyped(value?: TrashArtifactOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'deleted_at': value['deletedAt'] == null ? value['deletedAt'] : value['deletedAt'].toISOString(), - 'id': value['id'], - 'path': value['path'], - 'purge_at': value['purgeAt'] == null ? value['purgeAt'] : value['purgeAt'].toISOString(), - 'restore_url': value['restoreUrl'], - 'size_bytes': value['sizeBytes'], - }; -} diff --git a/sdk/typescript/src/models/TrashDriveOut.ts b/sdk/typescript/src/models/TrashDriveOut.ts deleted file mode 100644 index 6c8cd60..0000000 --- a/sdk/typescript/src/models/TrashDriveOut.ts +++ /dev/null @@ -1,73 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface TrashDriveOut - */ -export interface TrashDriveOut { - /** - * - * @type {Date} - * @memberof TrashDriveOut - */ - deletedAt?: Date | null; - /** - * - * @type {string} - * @memberof TrashDriveOut - */ - id: string; -} - -/** - * Check if a given object implements the TrashDriveOut interface. - */ -export function instanceOfTrashDriveOut(value: object): value is TrashDriveOut { - if (!('id' in value) || value['id'] === undefined) return false; - return true; -} - -export function TrashDriveOutFromJSON(json: any): TrashDriveOut { - return TrashDriveOutFromJSONTyped(json, false); -} - -export function TrashDriveOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrashDriveOut { - if (json == null) { - return json; - } - return { - - 'deletedAt': json['deleted_at'] === undefined ? undefined : json['deleted_at'] === null ? null : (new Date(json['deleted_at'])), - 'id': json['id'], - }; -} - -export function TrashDriveOutToJSON(json: any): TrashDriveOut { - return TrashDriveOutToJSONTyped(json, false); -} - -export function TrashDriveOutToJSONTyped(value?: TrashDriveOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'deleted_at': value['deletedAt'] == null ? value['deletedAt'] : value['deletedAt'].toISOString(), - 'id': value['id'], - }; -} diff --git a/sdk/typescript/src/models/TrashOut.ts b/sdk/typescript/src/models/TrashOut.ts deleted file mode 100644 index 0f799c1..0000000 --- a/sdk/typescript/src/models/TrashOut.ts +++ /dev/null @@ -1,107 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { TrashDriveOut } from './TrashDriveOut'; -import { - TrashDriveOutFromJSON, - TrashDriveOutFromJSONTyped, - TrashDriveOutToJSON, - TrashDriveOutToJSONTyped, -} from './TrashDriveOut'; -import type { TrashArtifactOut } from './TrashArtifactOut'; -import { - TrashArtifactOutFromJSON, - TrashArtifactOutFromJSONTyped, - TrashArtifactOutToJSON, - TrashArtifactOutToJSONTyped, -} from './TrashArtifactOut'; - -/** - * Trash collection with a compatibility-preserving pagination opt-in. - * @export - * @interface TrashOut - */ -export interface TrashOut { - /** - * Deprecated alias of items. - * @type {Array} - * @memberof TrashOut - * @deprecated - */ - artifacts: Array; - /** - * - * @type {TrashDriveOut} - * @memberof TrashOut - */ - drive: TrashDriveOut; - /** - * - * @type {Array} - * @memberof TrashOut - */ - items: Array; - /** - * - * @type {string} - * @memberof TrashOut - */ - nextCursor?: string | null; -} - -/** - * Check if a given object implements the TrashOut interface. - */ -export function instanceOfTrashOut(value: object): value is TrashOut { - if (!('artifacts' in value) || value['artifacts'] === undefined) return false; - if (!('drive' in value) || value['drive'] === undefined) return false; - if (!('items' in value) || value['items'] === undefined) return false; - return true; -} - -export function TrashOutFromJSON(json: any): TrashOut { - return TrashOutFromJSONTyped(json, false); -} - -export function TrashOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): TrashOut { - if (json == null) { - return json; - } - return { - - 'artifacts': ((json['artifacts'] as Array).map(TrashArtifactOutFromJSON)), - 'drive': TrashDriveOutFromJSON(json['drive']), - 'items': ((json['items'] as Array).map(TrashArtifactOutFromJSON)), - 'nextCursor': json['next_cursor'] === undefined ? undefined : json['next_cursor'] === null ? null : json['next_cursor'], - }; -} - -export function TrashOutToJSON(json: any): TrashOut { - return TrashOutToJSONTyped(json, false); -} - -export function TrashOutToJSONTyped(value?: TrashOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'artifacts': ((value['artifacts'] as Array).map(TrashArtifactOutToJSON)), - 'drive': TrashDriveOutToJSON(value['drive']), - 'items': ((value['items'] as Array).map(TrashArtifactOutToJSON)), - 'next_cursor': value['nextCursor'], - }; -} diff --git a/sdk/typescript/src/models/UploadAbortOut.ts b/sdk/typescript/src/models/UploadAbortOut.ts deleted file mode 100644 index 806ab43..0000000 --- a/sdk/typescript/src/models/UploadAbortOut.ts +++ /dev/null @@ -1,97 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Response of `DELETE /v0/uploads/{upload_id}` — the session is released. - * `released_bytes` is the reservation returned to the drive's quota (the - * session's `size_bytes` for a live `initiated` session; `0` when the - * session was already aborted or already expired — the GC sweep owns an - * expired session's release). - * @export - * @interface UploadAbortOut - */ -export interface UploadAbortOut { - /** - * - * @type {number} - * @memberof UploadAbortOut - */ - releasedBytes: number; - /** - * - * @type {UploadAbortOutStateEnum} - * @memberof UploadAbortOut - */ - state?: UploadAbortOutStateEnum; - /** - * - * @type {string} - * @memberof UploadAbortOut - */ - uploadId: string; -} - - -/** - * @export - */ -export const UploadAbortOutStateEnum = { - Aborted: 'aborted', - Expired: 'expired' -} as const; -export type UploadAbortOutStateEnum = typeof UploadAbortOutStateEnum[keyof typeof UploadAbortOutStateEnum]; - - -/** - * Check if a given object implements the UploadAbortOut interface. - */ -export function instanceOfUploadAbortOut(value: object): value is UploadAbortOut { - if ((!('releasedBytes' in (value as Record)) && !('released_bytes' in (value as Record))) || ((value as Record)['releasedBytes'] === undefined && (value as Record)['released_bytes'] === undefined)) return false; - if ((!('uploadId' in (value as Record)) && !('upload_id' in (value as Record))) || ((value as Record)['uploadId'] === undefined && (value as Record)['upload_id'] === undefined)) return false; - return true; -} - -export function UploadAbortOutFromJSON(json: any): UploadAbortOut { - return UploadAbortOutFromJSONTyped(json, false); -} - -export function UploadAbortOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): UploadAbortOut { - if (json == null) { - return json; - } - return { - - 'releasedBytes': json['released_bytes'], - 'state': json['state'] == null ? undefined : json['state'], - 'uploadId': json['upload_id'], - }; -} - -export function UploadAbortOutToJSON(json: any): UploadAbortOut { - return UploadAbortOutToJSONTyped(json, false); -} - -export function UploadAbortOutToJSONTyped(value?: UploadAbortOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'released_bytes': value['releasedBytes'], - 'state': value['state'], - 'upload_id': value['uploadId'], - }; -} diff --git a/sdk/typescript/src/models/UploadBeginIn.ts b/sdk/typescript/src/models/UploadBeginIn.ts deleted file mode 100644 index f8079ab..0000000 --- a/sdk/typescript/src/models/UploadBeginIn.ts +++ /dev/null @@ -1,167 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { ArtifactSource } from './ArtifactSource'; -import { - ArtifactSourceFromJSON, - ArtifactSourceFromJSONTyped, - ArtifactSourceToJSON, - ArtifactSourceToJSONTyped, -} from './ArtifactSource'; - -/** - * Body of `POST /v0/uploads` — the large-upload begin call (large-upload- - * design.md §5.1). All artifact decisions are frozen here; the subsequent - * GCS PUT carries only bytes, and `commit` carries only the `upload_id`. - * - * `labels`/`metadata`/`source` omitted (null) ⇒ preserve the existing - * artifact's value at commit; present (incl. empty) ⇒ replace. - * @export - * @interface UploadBeginIn - */ -export interface UploadBeginIn { - /** - * - * @type {string} - * @memberof UploadBeginIn - */ - actorName?: string | null; - /** - * - * @type {string} - * @memberof UploadBeginIn - */ - changeSummary?: string | null; - /** - * - * @type {string} - * @memberof UploadBeginIn - */ - contentType?: string; - /** - * Web origin (scheme://host[:port]) of the browser that will PUT the bytes, e.g. `https://app.example.com`. Set this when the `upload_url` is handed to browser code: GCS binds CORS at session initiate, so the returned session only echoes `Access-Control-Allow-Origin` (and is thus PUT-able from a browser) when opened with the caller's origin. A trusted backend relaying a browser upload forwards the browser's `Origin` here. Omit for server/desktop uploads (no CORS enforcement). - * @type {string} - * @memberof UploadBeginIn - */ - corsOrigin?: string | null; - /** - * - * @type {string} - * @memberof UploadBeginIn - */ - crc32c?: string | null; - /** - * - * @type {number} - * @memberof UploadBeginIn - */ - ifMatch?: number | null; - /** - * - * @type {boolean} - * @memberof UploadBeginIn - */ - ifNoneMatch?: boolean; - /** - * - * @type {Array} - * @memberof UploadBeginIn - */ - labels?: Array | null; - /** - * - * @type {{ [key: string]: any; }} - * @memberof UploadBeginIn - */ - metadata?: { [key: string]: any; } | null; - /** - * - * @type {string} - * @memberof UploadBeginIn - */ - path: string; - /** - * - * @type {number} - * @memberof UploadBeginIn - */ - sizeBytes: number; - /** - * - * @type {ArtifactSource} - * @memberof UploadBeginIn - */ - source?: ArtifactSource | null; -} - -/** - * Check if a given object implements the UploadBeginIn interface. - */ -export function instanceOfUploadBeginIn(value: object): value is UploadBeginIn { - if (!('path' in value) || value['path'] === undefined) return false; - if ((!('sizeBytes' in (value as Record)) && !('size_bytes' in (value as Record))) || ((value as Record)['sizeBytes'] === undefined && (value as Record)['size_bytes'] === undefined)) return false; - return true; -} - -export function UploadBeginInFromJSON(json: any): UploadBeginIn { - return UploadBeginInFromJSONTyped(json, false); -} - -export function UploadBeginInFromJSONTyped(json: any, ignoreDiscriminator: boolean): UploadBeginIn { - if (json == null) { - return json; - } - return { - - 'actorName': json['actor_name'] === undefined ? undefined : json['actor_name'] === null ? null : json['actor_name'], - 'changeSummary': json['change_summary'] === undefined ? undefined : json['change_summary'] === null ? null : json['change_summary'], - 'contentType': json['content_type'] == null ? undefined : json['content_type'], - 'corsOrigin': json['cors_origin'] === undefined ? undefined : json['cors_origin'] === null ? null : json['cors_origin'], - 'crc32c': json['crc32c'] === undefined ? undefined : json['crc32c'] === null ? null : json['crc32c'], - 'ifMatch': json['if_match'] === undefined ? undefined : json['if_match'] === null ? null : json['if_match'], - 'ifNoneMatch': json['if_none_match'] == null ? undefined : json['if_none_match'], - 'labels': json['labels'] === undefined ? undefined : json['labels'] === null ? null : json['labels'], - 'metadata': json['metadata'] === undefined ? undefined : json['metadata'] === null ? null : json['metadata'], - 'path': json['path'], - 'sizeBytes': json['size_bytes'], - 'source': json['source'] === undefined ? undefined : json['source'] === null ? null : ArtifactSourceFromJSON(json['source']), - }; -} - -export function UploadBeginInToJSON(json: any): UploadBeginIn { - return UploadBeginInToJSONTyped(json, false); -} - -export function UploadBeginInToJSONTyped(value?: UploadBeginIn | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'actor_name': value['actorName'], - 'change_summary': value['changeSummary'], - 'content_type': value['contentType'], - 'cors_origin': value['corsOrigin'], - 'crc32c': value['crc32c'], - 'if_match': value['ifMatch'], - 'if_none_match': value['ifNoneMatch'], - 'labels': value['labels'], - 'metadata': value['metadata'], - 'path': value['path'], - 'size_bytes': value['sizeBytes'], - 'source': ArtifactSourceToJSON(value['source']), - }; -} diff --git a/sdk/typescript/src/models/UploadBeginOut.ts b/sdk/typescript/src/models/UploadBeginOut.ts deleted file mode 100644 index 85a3c93..0000000 --- a/sdk/typescript/src/models/UploadBeginOut.ts +++ /dev/null @@ -1,120 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Response of `POST /v0/uploads`. PUT the bytes to `upload_url` (no auth - * header — the URL is the credential), then `POST .../commit`. - * @export - * @interface UploadBeginOut - */ -export interface UploadBeginOut { - /** - * - * @type {Date} - * @memberof UploadBeginOut - */ - expiresAt: Date; - /** - * - * @type {{ [key: string]: string; }} - * @memberof UploadBeginOut - */ - headers: { [key: string]: string; }; - /** - * - * @type {number} - * @memberof UploadBeginOut - */ - maxBytes: number; - /** - * - * @type {UploadBeginOutMethodEnum} - * @memberof UploadBeginOut - */ - method?: UploadBeginOutMethodEnum; - /** - * - * @type {string} - * @memberof UploadBeginOut - */ - uploadId: string; - /** - * - * @type {string} - * @memberof UploadBeginOut - */ - uploadUrl: string; -} - - -/** - * @export - */ -export const UploadBeginOutMethodEnum = { - Put: 'PUT' -} as const; -export type UploadBeginOutMethodEnum = typeof UploadBeginOutMethodEnum[keyof typeof UploadBeginOutMethodEnum]; - - -/** - * Check if a given object implements the UploadBeginOut interface. - */ -export function instanceOfUploadBeginOut(value: object): value is UploadBeginOut { - if ((!('expiresAt' in (value as Record)) && !('expires_at' in (value as Record))) || ((value as Record)['expiresAt'] === undefined && (value as Record)['expires_at'] === undefined)) return false; - if (!('headers' in value) || value['headers'] === undefined) return false; - if ((!('maxBytes' in (value as Record)) && !('max_bytes' in (value as Record))) || ((value as Record)['maxBytes'] === undefined && (value as Record)['max_bytes'] === undefined)) return false; - if ((!('uploadId' in (value as Record)) && !('upload_id' in (value as Record))) || ((value as Record)['uploadId'] === undefined && (value as Record)['upload_id'] === undefined)) return false; - if ((!('uploadUrl' in (value as Record)) && !('upload_url' in (value as Record))) || ((value as Record)['uploadUrl'] === undefined && (value as Record)['upload_url'] === undefined)) return false; - return true; -} - -export function UploadBeginOutFromJSON(json: any): UploadBeginOut { - return UploadBeginOutFromJSONTyped(json, false); -} - -export function UploadBeginOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): UploadBeginOut { - if (json == null) { - return json; - } - return { - - 'expiresAt': (new Date(json['expires_at'])), - 'headers': json['headers'], - 'maxBytes': json['max_bytes'], - 'method': json['method'] == null ? undefined : json['method'], - 'uploadId': json['upload_id'], - 'uploadUrl': json['upload_url'], - }; -} - -export function UploadBeginOutToJSON(json: any): UploadBeginOut { - return UploadBeginOutToJSONTyped(json, false); -} - -export function UploadBeginOutToJSONTyped(value?: UploadBeginOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'expires_at': value['expiresAt'].toISOString(), - 'headers': value['headers'], - 'max_bytes': value['maxBytes'], - 'method': value['method'], - 'upload_id': value['uploadId'], - 'upload_url': value['uploadUrl'], - }; -} diff --git a/sdk/typescript/src/models/UploadStatusOut.ts b/sdk/typescript/src/models/UploadStatusOut.ts deleted file mode 100644 index f81db68..0000000 --- a/sdk/typescript/src/models/UploadStatusOut.ts +++ /dev/null @@ -1,159 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * Response of `GET /v0/uploads/{upload_id}` — the live state of a - * direct-to-GCS upload session (large-upload-design.md §5). - * - * `state` is derived, not a stored column: - * * `initiated` — session open; PUT the bytes to the `upload_url`, then - * `POST /v0/uploads/{upload_id}/commit`. - * * `committed` — the bytes landed and the artifact was created - * (`committed_at` is set). - * * `aborted` — released via `DELETE /v0/uploads/{upload_id}`. - * * `expired` — past `expires_at` without a commit; the reservation is - * reclaimed by the GC sweep. - * @export - * @interface UploadStatusOut - */ -export interface UploadStatusOut { - /** - * - * @type {Date} - * @memberof UploadStatusOut - */ - committedAt?: Date | null; - /** - * - * @type {string} - * @memberof UploadStatusOut - */ - contentType: string; - /** - * - * @type {Date} - * @memberof UploadStatusOut - */ - createdAt: Date; - /** - * - * @type {Date} - * @memberof UploadStatusOut - */ - expiresAt: Date; - /** - * - * @type {number} - * @memberof UploadStatusOut - */ - maxBytes: number; - /** - * - * @type {string} - * @memberof UploadStatusOut - */ - path: string; - /** - * - * @type {number} - * @memberof UploadStatusOut - */ - sizeBytes: number; - /** - * - * @type {UploadStatusOutStateEnum} - * @memberof UploadStatusOut - */ - state: UploadStatusOutStateEnum; - /** - * - * @type {string} - * @memberof UploadStatusOut - */ - uploadId: string; -} - - -/** - * @export - */ -export const UploadStatusOutStateEnum = { - Initiated: 'initiated', - Committed: 'committed', - Aborted: 'aborted', - Expired: 'expired' -} as const; -export type UploadStatusOutStateEnum = typeof UploadStatusOutStateEnum[keyof typeof UploadStatusOutStateEnum]; - - -/** - * Check if a given object implements the UploadStatusOut interface. - */ -export function instanceOfUploadStatusOut(value: object): value is UploadStatusOut { - if ((!('contentType' in (value as Record)) && !('content_type' in (value as Record))) || ((value as Record)['contentType'] === undefined && (value as Record)['content_type'] === undefined)) return false; - if ((!('createdAt' in (value as Record)) && !('created_at' in (value as Record))) || ((value as Record)['createdAt'] === undefined && (value as Record)['created_at'] === undefined)) return false; - if ((!('expiresAt' in (value as Record)) && !('expires_at' in (value as Record))) || ((value as Record)['expiresAt'] === undefined && (value as Record)['expires_at'] === undefined)) return false; - if ((!('maxBytes' in (value as Record)) && !('max_bytes' in (value as Record))) || ((value as Record)['maxBytes'] === undefined && (value as Record)['max_bytes'] === undefined)) return false; - if (!('path' in value) || value['path'] === undefined) return false; - if ((!('sizeBytes' in (value as Record)) && !('size_bytes' in (value as Record))) || ((value as Record)['sizeBytes'] === undefined && (value as Record)['size_bytes'] === undefined)) return false; - if (!('state' in value) || value['state'] === undefined) return false; - if ((!('uploadId' in (value as Record)) && !('upload_id' in (value as Record))) || ((value as Record)['uploadId'] === undefined && (value as Record)['upload_id'] === undefined)) return false; - return true; -} - -export function UploadStatusOutFromJSON(json: any): UploadStatusOut { - return UploadStatusOutFromJSONTyped(json, false); -} - -export function UploadStatusOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): UploadStatusOut { - if (json == null) { - return json; - } - return { - - 'committedAt': json['committed_at'] === undefined ? undefined : json['committed_at'] === null ? null : (new Date(json['committed_at'])), - 'contentType': json['content_type'], - 'createdAt': (new Date(json['created_at'])), - 'expiresAt': (new Date(json['expires_at'])), - 'maxBytes': json['max_bytes'], - 'path': json['path'], - 'sizeBytes': json['size_bytes'], - 'state': json['state'], - 'uploadId': json['upload_id'], - }; -} - -export function UploadStatusOutToJSON(json: any): UploadStatusOut { - return UploadStatusOutToJSONTyped(json, false); -} - -export function UploadStatusOutToJSONTyped(value?: UploadStatusOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'committed_at': value['committedAt'] == null ? value['committedAt'] : value['committedAt'].toISOString(), - 'content_type': value['contentType'], - 'created_at': value['createdAt'].toISOString(), - 'expires_at': value['expiresAt'].toISOString(), - 'max_bytes': value['maxBytes'], - 'path': value['path'], - 'size_bytes': value['sizeBytes'], - 'state': value['state'], - 'upload_id': value['uploadId'], - }; -} diff --git a/sdk/typescript/src/models/UsageCounterOut.ts b/sdk/typescript/src/models/UsageCounterOut.ts deleted file mode 100644 index 74a4f02..0000000 --- a/sdk/typescript/src/models/UsageCounterOut.ts +++ /dev/null @@ -1,74 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface UsageCounterOut - */ -export interface UsageCounterOut { - /** - * - * @type {number} - * @memberof UsageCounterOut - */ - limit: number; - /** - * - * @type {number} - * @memberof UsageCounterOut - */ - used: number; -} - -/** - * Check if a given object implements the UsageCounterOut interface. - */ -export function instanceOfUsageCounterOut(value: object): value is UsageCounterOut { - if (!('limit' in value) || value['limit'] === undefined) return false; - if (!('used' in value) || value['used'] === undefined) return false; - return true; -} - -export function UsageCounterOutFromJSON(json: any): UsageCounterOut { - return UsageCounterOutFromJSONTyped(json, false); -} - -export function UsageCounterOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsageCounterOut { - if (json == null) { - return json; - } - return { - - 'limit': json['limit'], - 'used': json['used'], - }; -} - -export function UsageCounterOutToJSON(json: any): UsageCounterOut { - return UsageCounterOutToJSONTyped(json, false); -} - -export function UsageCounterOutToJSONTyped(value?: UsageCounterOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'limit': value['limit'], - 'used': value['used'], - }; -} diff --git a/sdk/typescript/src/models/UsagePeriodOut.ts b/sdk/typescript/src/models/UsagePeriodOut.ts deleted file mode 100644 index 2528405..0000000 --- a/sdk/typescript/src/models/UsagePeriodOut.ts +++ /dev/null @@ -1,83 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface UsagePeriodOut - */ -export interface UsagePeriodOut { - /** - * - * @type {Date} - * @memberof UsagePeriodOut - */ - ends: Date; - /** - * - * @type {Date} - * @memberof UsagePeriodOut - */ - starts: Date; - /** - * - * @type {string} - * @memberof UsagePeriodOut - */ - yearMonth: string; -} - -/** - * Check if a given object implements the UsagePeriodOut interface. - */ -export function instanceOfUsagePeriodOut(value: object): value is UsagePeriodOut { - if (!('ends' in value) || value['ends'] === undefined) return false; - if (!('starts' in value) || value['starts'] === undefined) return false; - if ((!('yearMonth' in (value as Record)) && !('year_month' in (value as Record))) || ((value as Record)['yearMonth'] === undefined && (value as Record)['year_month'] === undefined)) return false; - return true; -} - -export function UsagePeriodOutFromJSON(json: any): UsagePeriodOut { - return UsagePeriodOutFromJSONTyped(json, false); -} - -export function UsagePeriodOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): UsagePeriodOut { - if (json == null) { - return json; - } - return { - - 'ends': (new Date(json['ends'])), - 'starts': (new Date(json['starts'])), - 'yearMonth': json['year_month'], - }; -} - -export function UsagePeriodOutToJSON(json: any): UsagePeriodOut { - return UsagePeriodOutToJSONTyped(json, false); -} - -export function UsagePeriodOutToJSONTyped(value?: UsagePeriodOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'ends': value['ends'].toISOString(), - 'starts': value['starts'].toISOString(), - 'year_month': value['yearMonth'], - }; -} diff --git a/sdk/typescript/src/models/UserTokenList.ts b/sdk/typescript/src/models/UserTokenList.ts deleted file mode 100644 index c3fc048..0000000 --- a/sdk/typescript/src/models/UserTokenList.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { UserTokenOut } from './UserTokenOut'; -import { - UserTokenOutFromJSON, - UserTokenOutFromJSONTyped, - UserTokenOutToJSON, - UserTokenOutToJSONTyped, -} from './UserTokenOut'; - -/** - * - * @export - * @interface UserTokenList - */ -export interface UserTokenList { - /** - * - * @type {Array} - * @memberof UserTokenList - */ - items: Array; - /** - * - * @type {string} - * @memberof UserTokenList - */ - nextCursor?: string | null; -} - -/** - * Check if a given object implements the UserTokenList interface. - */ -export function instanceOfUserTokenList(value: object): value is UserTokenList { - if (!('items' in value) || value['items'] === undefined) return false; - return true; -} - -export function UserTokenListFromJSON(json: any): UserTokenList { - return UserTokenListFromJSONTyped(json, false); -} - -export function UserTokenListFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserTokenList { - if (json == null) { - return json; - } - return { - - 'items': ((json['items'] as Array).map(UserTokenOutFromJSON)), - 'nextCursor': json['next_cursor'] === undefined ? undefined : json['next_cursor'] === null ? null : json['next_cursor'], - }; -} - -export function UserTokenListToJSON(json: any): UserTokenList { - return UserTokenListToJSONTyped(json, false); -} - -export function UserTokenListToJSONTyped(value?: UserTokenList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'items': ((value['items'] as Array).map(UserTokenOutToJSON)), - 'next_cursor': value['nextCursor'], - }; -} diff --git a/sdk/typescript/src/models/UserTokenOut.ts b/sdk/typescript/src/models/UserTokenOut.ts deleted file mode 100644 index 8172bfb..0000000 --- a/sdk/typescript/src/models/UserTokenOut.ts +++ /dev/null @@ -1,145 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * One `ad_user_` token — metadata only. The raw token is NEVER - * exposed over the API (minting is web-only, reveal-once); this shape - * omits both the raw value and the stored hash by construction. - * @export - * @interface UserTokenOut - */ -export interface UserTokenOut { - /** - * - * @type {Date} - * @memberof UserTokenOut - */ - createdAt: Date; - /** - * - * @type {string} - * @memberof UserTokenOut - */ - defaultDriveId?: string | null; - /** - * - * @type {Date} - * @memberof UserTokenOut - */ - expiresAt?: Date | null; - /** - * - * @type {string} - * @memberof UserTokenOut - */ - id: string; - /** - * - * @type {string} - * @memberof UserTokenOut - */ - label?: string | null; - /** - * - * @type {Date} - * @memberof UserTokenOut - */ - lastUsedAt?: Date | null; - /** - * - * @type {string} - * @memberof UserTokenOut - */ - prefix: string; - /** - * - * @type {Date} - * @memberof UserTokenOut - */ - revokedAt?: Date | null; - /** - * - * @type {UserTokenOutScopeEnum} - * @memberof UserTokenOut - */ - scope: UserTokenOutScopeEnum; -} - - -/** - * @export - */ -export const UserTokenOutScopeEnum = { - Read: 'read', - Full: 'full' -} as const; -export type UserTokenOutScopeEnum = typeof UserTokenOutScopeEnum[keyof typeof UserTokenOutScopeEnum]; - - -/** - * Check if a given object implements the UserTokenOut interface. - */ -export function instanceOfUserTokenOut(value: object): value is UserTokenOut { - if ((!('createdAt' in (value as Record)) && !('created_at' in (value as Record))) || ((value as Record)['createdAt'] === undefined && (value as Record)['created_at'] === undefined)) return false; - if (!('id' in value) || value['id'] === undefined) return false; - if (!('prefix' in value) || value['prefix'] === undefined) return false; - if (!('scope' in value) || value['scope'] === undefined) return false; - return true; -} - -export function UserTokenOutFromJSON(json: any): UserTokenOut { - return UserTokenOutFromJSONTyped(json, false); -} - -export function UserTokenOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserTokenOut { - if (json == null) { - return json; - } - return { - - 'createdAt': (new Date(json['created_at'])), - 'defaultDriveId': json['default_drive_id'] === undefined ? undefined : json['default_drive_id'] === null ? null : json['default_drive_id'], - 'expiresAt': json['expires_at'] === undefined ? undefined : json['expires_at'] === null ? null : (new Date(json['expires_at'])), - 'id': json['id'], - 'label': json['label'] === undefined ? undefined : json['label'] === null ? null : json['label'], - 'lastUsedAt': json['last_used_at'] === undefined ? undefined : json['last_used_at'] === null ? null : (new Date(json['last_used_at'])), - 'prefix': json['prefix'], - 'revokedAt': json['revoked_at'] === undefined ? undefined : json['revoked_at'] === null ? null : (new Date(json['revoked_at'])), - 'scope': json['scope'], - }; -} - -export function UserTokenOutToJSON(json: any): UserTokenOut { - return UserTokenOutToJSONTyped(json, false); -} - -export function UserTokenOutToJSONTyped(value?: UserTokenOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'created_at': value['createdAt'].toISOString(), - 'default_drive_id': value['defaultDriveId'], - 'expires_at': value['expiresAt'] == null ? value['expiresAt'] : value['expiresAt'].toISOString(), - 'id': value['id'], - 'label': value['label'], - 'last_used_at': value['lastUsedAt'] == null ? value['lastUsedAt'] : value['lastUsedAt'].toISOString(), - 'prefix': value['prefix'], - 'revoked_at': value['revokedAt'] == null ? value['revokedAt'] : value['revokedAt'].toISOString(), - 'scope': value['scope'], - }; -} diff --git a/sdk/typescript/src/models/V0ErrorEnvelope.ts b/sdk/typescript/src/models/V0ErrorEnvelope.ts new file mode 100644 index 0000000..719bf94 --- /dev/null +++ b/sdk/typescript/src/models/V0ErrorEnvelope.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { DrivesCreate400ResponseError } from './DrivesCreate400ResponseError'; +import { + DrivesCreate400ResponseErrorFromJSON, + DrivesCreate400ResponseErrorFromJSONTyped, + DrivesCreate400ResponseErrorToJSON, + DrivesCreate400ResponseErrorToJSONTyped, +} from './DrivesCreate400ResponseError'; + +/** + * + * @export + * @interface V0ErrorEnvelope + */ +export interface V0ErrorEnvelope { + /** + * + * @type {DrivesCreate400ResponseError} + * @memberof V0ErrorEnvelope + */ + error: DrivesCreate400ResponseError; +} + +/** + * Check if a given object implements the V0ErrorEnvelope interface. + */ +export function instanceOfV0ErrorEnvelope(value: object): value is V0ErrorEnvelope { + if (!('error' in value) || value['error'] === undefined) return false; + return true; +} + +export function V0ErrorEnvelopeFromJSON(json: any): V0ErrorEnvelope { + return V0ErrorEnvelopeFromJSONTyped(json, false); +} + +export function V0ErrorEnvelopeFromJSONTyped(json: any, ignoreDiscriminator: boolean): V0ErrorEnvelope { + if (json == null) { + return json; + } + return { + + 'error': DrivesCreate400ResponseErrorFromJSON(json['error']), + }; +} + +export function V0ErrorEnvelopeToJSON(json: any): V0ErrorEnvelope { + return V0ErrorEnvelopeToJSONTyped(json, false); +} + +export function V0ErrorEnvelopeToJSONTyped(value?: V0ErrorEnvelope | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'error': DrivesCreate400ResponseErrorToJSON(value['error']), + }; +} diff --git a/sdk/typescript/src/models/ValidationErrorBody.ts b/sdk/typescript/src/models/ValidationErrorBody.ts deleted file mode 100644 index 7abc330..0000000 --- a/sdk/typescript/src/models/ValidationErrorBody.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { ValidationIssue } from './ValidationIssue'; -import { - ValidationIssueFromJSON, - ValidationIssueFromJSONTyped, - ValidationIssueToJSON, - ValidationIssueToJSONTyped, -} from './ValidationIssue'; - -/** - * - * @export - * @interface ValidationErrorBody - */ -export interface ValidationErrorBody { - [key: string]: any | any; - /** - * - * @type {string} - * @memberof ValidationErrorBody - */ - code: string; - /** - * - * @type {Array} - * @memberof ValidationErrorBody - */ - fields: Array; - /** - * - * @type {string} - * @memberof ValidationErrorBody - */ - message: string; -} - -/** - * Check if a given object implements the ValidationErrorBody interface. - */ -export function instanceOfValidationErrorBody(value: object): value is ValidationErrorBody { - if (!('code' in value) || value['code'] === undefined) return false; - if (!('fields' in value) || value['fields'] === undefined) return false; - if (!('message' in value) || value['message'] === undefined) return false; - return true; -} - -export function ValidationErrorBodyFromJSON(json: any): ValidationErrorBody { - return ValidationErrorBodyFromJSONTyped(json, false); -} - -export function ValidationErrorBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ValidationErrorBody { - if (json == null) { - return json; - } - return { - - ...json, - 'code': json['code'], - 'fields': ((json['fields'] as Array).map(ValidationIssueFromJSON)), - 'message': json['message'], - }; -} - -export function ValidationErrorBodyToJSON(json: any): ValidationErrorBody { - return ValidationErrorBodyToJSONTyped(json, false); -} - -export function ValidationErrorBodyToJSONTyped(value?: ValidationErrorBody | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - ...value, - 'code': value['code'], - 'fields': ((value['fields'] as Array).map(ValidationIssueToJSON)), - 'message': value['message'], - }; -} diff --git a/sdk/typescript/src/models/ValidationErrorDetail.ts b/sdk/typescript/src/models/ValidationErrorDetail.ts deleted file mode 100644 index 1984905..0000000 --- a/sdk/typescript/src/models/ValidationErrorDetail.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { ValidationErrorBody } from './ValidationErrorBody'; -import { - ValidationErrorBodyFromJSON, - ValidationErrorBodyFromJSONTyped, - ValidationErrorBodyToJSON, - ValidationErrorBodyToJSONTyped, -} from './ValidationErrorBody'; - -/** - * - * @export - * @interface ValidationErrorDetail - */ -export interface ValidationErrorDetail { - [key: string]: any | any; - /** - * - * @type {ValidationErrorBody} - * @memberof ValidationErrorDetail - */ - error: ValidationErrorBody; -} - -/** - * Check if a given object implements the ValidationErrorDetail interface. - */ -export function instanceOfValidationErrorDetail(value: object): value is ValidationErrorDetail { - if (!('error' in value) || value['error'] === undefined) return false; - return true; -} - -export function ValidationErrorDetailFromJSON(json: any): ValidationErrorDetail { - return ValidationErrorDetailFromJSONTyped(json, false); -} - -export function ValidationErrorDetailFromJSONTyped(json: any, ignoreDiscriminator: boolean): ValidationErrorDetail { - if (json == null) { - return json; - } - return { - - ...json, - 'error': ValidationErrorBodyFromJSON(json['error']), - }; -} - -export function ValidationErrorDetailToJSON(json: any): ValidationErrorDetail { - return ValidationErrorDetailToJSONTyped(json, false); -} - -export function ValidationErrorDetailToJSONTyped(value?: ValidationErrorDetail | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - ...value, - 'error': ValidationErrorBodyToJSON(value['error']), - }; -} diff --git a/sdk/typescript/src/models/ValidationErrorResponse.ts b/sdk/typescript/src/models/ValidationErrorResponse.ts index 94d50ee..8f16ef7 100644 --- a/sdk/typescript/src/models/ValidationErrorResponse.ts +++ b/sdk/typescript/src/models/ValidationErrorResponse.ts @@ -2,7 +2,7 @@ /* eslint-disable */ /** * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. * * The version of the OpenAPI document: * @@ -13,34 +13,33 @@ */ import { mapValues } from '../runtime'; -import type { ValidationErrorDetail } from './ValidationErrorDetail'; +import type { ValidationErrorResponseError } from './ValidationErrorResponseError'; import { - ValidationErrorDetailFromJSON, - ValidationErrorDetailFromJSONTyped, - ValidationErrorDetailToJSON, - ValidationErrorDetailToJSONTyped, -} from './ValidationErrorDetail'; + ValidationErrorResponseErrorFromJSON, + ValidationErrorResponseErrorFromJSONTyped, + ValidationErrorResponseErrorToJSON, + ValidationErrorResponseErrorToJSONTyped, +} from './ValidationErrorResponseError'; /** - * The runtime `VALIDATION_ERROR` response for request parsing failures. + * * @export * @interface ValidationErrorResponse */ export interface ValidationErrorResponse { - [key: string]: any | any; /** * - * @type {ValidationErrorDetail} + * @type {ValidationErrorResponseError} * @memberof ValidationErrorResponse */ - detail: ValidationErrorDetail; + error: ValidationErrorResponseError; } /** * Check if a given object implements the ValidationErrorResponse interface. */ export function instanceOfValidationErrorResponse(value: object): value is ValidationErrorResponse { - if (!('detail' in value) || value['detail'] === undefined) return false; + if (!('error' in value) || value['error'] === undefined) return false; return true; } @@ -54,8 +53,7 @@ export function ValidationErrorResponseFromJSONTyped(json: any, ignoreDiscrimina } return { - ...json, - 'detail': ValidationErrorDetailFromJSON(json['detail']), + 'error': ValidationErrorResponseErrorFromJSON(json['error']), }; } @@ -70,7 +68,6 @@ export function ValidationErrorResponseToJSONTyped(value?: ValidationErrorRespon return { - ...value, - 'detail': ValidationErrorDetailToJSON(value['detail']), + 'error': ValidationErrorResponseErrorToJSON(value['error']), }; } diff --git a/sdk/typescript/src/models/ValidationErrorResponseError.ts b/sdk/typescript/src/models/ValidationErrorResponseError.ts new file mode 100644 index 0000000..9300687 --- /dev/null +++ b/sdk/typescript/src/models/ValidationErrorResponseError.ts @@ -0,0 +1,93 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ValidationErrorResponseErrorDetails } from './ValidationErrorResponseErrorDetails'; +import { + ValidationErrorResponseErrorDetailsFromJSON, + ValidationErrorResponseErrorDetailsFromJSONTyped, + ValidationErrorResponseErrorDetailsToJSON, + ValidationErrorResponseErrorDetailsToJSONTyped, +} from './ValidationErrorResponseErrorDetails'; + +/** + * + * @export + * @interface ValidationErrorResponseError + */ +export interface ValidationErrorResponseError { + [key: string]: any | any; + /** + * + * @type {string} + * @memberof ValidationErrorResponseError + */ + code: string | null; + /** + * + * @type {ValidationErrorResponseErrorDetails} + * @memberof ValidationErrorResponseError + */ + details?: ValidationErrorResponseErrorDetails; + /** + * + * @type {string} + * @memberof ValidationErrorResponseError + */ + message: string | null; +} + +/** + * Check if a given object implements the ValidationErrorResponseError interface. + */ +export function instanceOfValidationErrorResponseError(value: object): value is ValidationErrorResponseError { + if (!('code' in value) || value['code'] === undefined) return false; + if (!('message' in value) || value['message'] === undefined) return false; + return true; +} + +export function ValidationErrorResponseErrorFromJSON(json: any): ValidationErrorResponseError { + return ValidationErrorResponseErrorFromJSONTyped(json, false); +} + +export function ValidationErrorResponseErrorFromJSONTyped(json: any, ignoreDiscriminator: boolean): ValidationErrorResponseError { + if (json == null) { + return json; + } + return { + + ...json, + 'code': json['code'], + 'details': json['details'] == null ? undefined : ValidationErrorResponseErrorDetailsFromJSON(json['details']), + 'message': json['message'], + }; +} + +export function ValidationErrorResponseErrorToJSON(json: any): ValidationErrorResponseError { + return ValidationErrorResponseErrorToJSONTyped(json, false); +} + +export function ValidationErrorResponseErrorToJSONTyped(value?: ValidationErrorResponseError | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + ...value, + 'code': value['code'], + 'details': ValidationErrorResponseErrorDetailsToJSON(value['details']), + 'message': value['message'], + }; +} diff --git a/sdk/typescript/src/models/ValidationErrorResponseErrorDetails.ts b/sdk/typescript/src/models/ValidationErrorResponseErrorDetails.ts new file mode 100644 index 0000000..cfaa206 --- /dev/null +++ b/sdk/typescript/src/models/ValidationErrorResponseErrorDetails.ts @@ -0,0 +1,72 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { ValidationErrorResponseErrorDetailsFieldsInner } from './ValidationErrorResponseErrorDetailsFieldsInner'; +import { + ValidationErrorResponseErrorDetailsFieldsInnerFromJSON, + ValidationErrorResponseErrorDetailsFieldsInnerFromJSONTyped, + ValidationErrorResponseErrorDetailsFieldsInnerToJSON, + ValidationErrorResponseErrorDetailsFieldsInnerToJSONTyped, +} from './ValidationErrorResponseErrorDetailsFieldsInner'; + +/** + * + * @export + * @interface ValidationErrorResponseErrorDetails + */ +export interface ValidationErrorResponseErrorDetails { + /** + * + * @type {Array} + * @memberof ValidationErrorResponseErrorDetails + */ + fields?: Array; +} + +/** + * Check if a given object implements the ValidationErrorResponseErrorDetails interface. + */ +export function instanceOfValidationErrorResponseErrorDetails(value: object): value is ValidationErrorResponseErrorDetails { + return true; +} + +export function ValidationErrorResponseErrorDetailsFromJSON(json: any): ValidationErrorResponseErrorDetails { + return ValidationErrorResponseErrorDetailsFromJSONTyped(json, false); +} + +export function ValidationErrorResponseErrorDetailsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ValidationErrorResponseErrorDetails { + if (json == null) { + return json; + } + return { + + 'fields': json['fields'] == null ? undefined : ((json['fields'] as Array).map(ValidationErrorResponseErrorDetailsFieldsInnerFromJSON)), + }; +} + +export function ValidationErrorResponseErrorDetailsToJSON(json: any): ValidationErrorResponseErrorDetails { + return ValidationErrorResponseErrorDetailsToJSONTyped(json, false); +} + +export function ValidationErrorResponseErrorDetailsToJSONTyped(value?: ValidationErrorResponseErrorDetails | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'fields': value['fields'] == null ? undefined : ((value['fields'] as Array).map(ValidationErrorResponseErrorDetailsFieldsInnerToJSON)), + }; +} diff --git a/sdk/typescript/src/models/ValidationErrorResponseErrorDetailsFieldsInner.ts b/sdk/typescript/src/models/ValidationErrorResponseErrorDetailsFieldsInner.ts new file mode 100644 index 0000000..b69c524 --- /dev/null +++ b/sdk/typescript/src/models/ValidationErrorResponseErrorDetailsFieldsInner.ts @@ -0,0 +1,72 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * + * @export + * @interface ValidationErrorResponseErrorDetailsFieldsInner + */ +export interface ValidationErrorResponseErrorDetailsFieldsInner { + /** + * + * @type {string} + * @memberof ValidationErrorResponseErrorDetailsFieldsInner + */ + location?: string; + /** + * + * @type {string} + * @memberof ValidationErrorResponseErrorDetailsFieldsInner + */ + reason?: string; +} + +/** + * Check if a given object implements the ValidationErrorResponseErrorDetailsFieldsInner interface. + */ +export function instanceOfValidationErrorResponseErrorDetailsFieldsInner(value: object): value is ValidationErrorResponseErrorDetailsFieldsInner { + return true; +} + +export function ValidationErrorResponseErrorDetailsFieldsInnerFromJSON(json: any): ValidationErrorResponseErrorDetailsFieldsInner { + return ValidationErrorResponseErrorDetailsFieldsInnerFromJSONTyped(json, false); +} + +export function ValidationErrorResponseErrorDetailsFieldsInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ValidationErrorResponseErrorDetailsFieldsInner { + if (json == null) { + return json; + } + return { + + 'location': json['location'] == null ? undefined : json['location'], + 'reason': json['reason'] == null ? undefined : json['reason'], + }; +} + +export function ValidationErrorResponseErrorDetailsFieldsInnerToJSON(json: any): ValidationErrorResponseErrorDetailsFieldsInner { + return ValidationErrorResponseErrorDetailsFieldsInnerToJSONTyped(json, false); +} + +export function ValidationErrorResponseErrorDetailsFieldsInnerToJSONTyped(value?: ValidationErrorResponseErrorDetailsFieldsInner | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'location': value['location'], + 'reason': value['reason'], + }; +} diff --git a/sdk/typescript/src/models/ValidationIssue.ts b/sdk/typescript/src/models/ValidationIssue.ts deleted file mode 100644 index 3227839..0000000 --- a/sdk/typescript/src/models/ValidationIssue.ts +++ /dev/null @@ -1,110 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { LocInner } from './LocInner'; -import { - LocInnerFromJSON, - LocInnerFromJSONTyped, - LocInnerToJSON, - LocInnerToJSONTyped, -} from './LocInner'; - -/** - * One Pydantic/FastAPI validation issue. - * @export - * @interface ValidationIssue - */ -export interface ValidationIssue { - [key: string]: any | any; - /** - * - * @type {{ [key: string]: any; }} - * @memberof ValidationIssue - */ - ctx?: { [key: string]: any; } | null; - /** - * - * @type {any} - * @memberof ValidationIssue - */ - input?: any | null; - /** - * - * @type {Array} - * @memberof ValidationIssue - */ - loc: Array; - /** - * - * @type {string} - * @memberof ValidationIssue - */ - msg: string; - /** - * - * @type {string} - * @memberof ValidationIssue - */ - type: string; -} - -/** - * Check if a given object implements the ValidationIssue interface. - */ -export function instanceOfValidationIssue(value: object): value is ValidationIssue { - if (!('loc' in value) || value['loc'] === undefined) return false; - if (!('msg' in value) || value['msg'] === undefined) return false; - if (!('type' in value) || value['type'] === undefined) return false; - return true; -} - -export function ValidationIssueFromJSON(json: any): ValidationIssue { - return ValidationIssueFromJSONTyped(json, false); -} - -export function ValidationIssueFromJSONTyped(json: any, ignoreDiscriminator: boolean): ValidationIssue { - if (json == null) { - return json; - } - return { - - ...json, - 'ctx': json['ctx'] === undefined ? undefined : json['ctx'] === null ? null : json['ctx'], - 'input': json['input'] === undefined ? undefined : json['input'] === null ? null : json['input'], - 'loc': ((json['loc'] as Array).map(LocInnerFromJSON)), - 'msg': json['msg'], - 'type': json['type'], - }; -} - -export function ValidationIssueToJSON(json: any): ValidationIssue { - return ValidationIssueToJSONTyped(json, false); -} - -export function ValidationIssueToJSONTyped(value?: ValidationIssue | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - ...value, - 'ctx': value['ctx'], - 'input': value['input'], - 'loc': ((value['loc'] as Array).map(LocInnerToJSON)), - 'msg': value['msg'], - 'type': value['type'], - }; -} diff --git a/sdk/typescript/src/models/VersionCreatedOut.ts b/sdk/typescript/src/models/VersionCreatedOut.ts new file mode 100644 index 0000000..897d241 --- /dev/null +++ b/sdk/typescript/src/models/VersionCreatedOut.ts @@ -0,0 +1,147 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +/** + * The append/restore response — a version plus the artifact's new + * revision, which the version-creating 201 rotates. + * @export + * @interface VersionCreatedOut + */ +export interface VersionCreatedOut { + /** + * + * @type {string} + * @memberof VersionCreatedOut + */ + artifactId: string; + /** + * The artifact's revision after this version became head — the If-Match value for the next mutation. + * @type {string} + * @memberof VersionCreatedOut + */ + artifactRevision: string; + /** + * + * @type {string} + * @memberof VersionCreatedOut + */ + contentType: string; + /** + * + * @type {Date} + * @memberof VersionCreatedOut + */ + createdAt: Date; + /** + * + * @type {string} + * @memberof VersionCreatedOut + */ + createdBy: string | null; + /** + * + * @type {string} + * @memberof VersionCreatedOut + */ + hash: string; + /** + * + * @type {string} + * @memberof VersionCreatedOut + */ + id: string; + /** + * + * @type {string} + * @memberof VersionCreatedOut + */ + parentVersionId: string | null; + /** + * + * @type {number} + * @memberof VersionCreatedOut + */ + sizeBytes: number; + /** + * + * @type {number} + * @memberof VersionCreatedOut + */ + versionNumber: number; +} + +/** + * Check if a given object implements the VersionCreatedOut interface. + */ +export function instanceOfVersionCreatedOut(value: object): value is VersionCreatedOut { + if ((!('artifactId' in (value as Record)) && !('artifact_id' in (value as Record))) || ((value as Record)['artifactId'] === undefined && (value as Record)['artifact_id'] === undefined)) return false; + if ((!('artifactRevision' in (value as Record)) && !('artifact_revision' in (value as Record))) || ((value as Record)['artifactRevision'] === undefined && (value as Record)['artifact_revision'] === undefined)) return false; + if ((!('contentType' in (value as Record)) && !('content_type' in (value as Record))) || ((value as Record)['contentType'] === undefined && (value as Record)['content_type'] === undefined)) return false; + if ((!('createdAt' in (value as Record)) && !('created_at' in (value as Record))) || ((value as Record)['createdAt'] === undefined && (value as Record)['created_at'] === undefined)) return false; + if ((!('createdBy' in (value as Record)) && !('created_by' in (value as Record))) || ((value as Record)['createdBy'] === undefined && (value as Record)['created_by'] === undefined)) return false; + if (!('hash' in value) || value['hash'] === undefined) return false; + if (!('id' in value) || value['id'] === undefined) return false; + if ((!('parentVersionId' in (value as Record)) && !('parent_version_id' in (value as Record))) || ((value as Record)['parentVersionId'] === undefined && (value as Record)['parent_version_id'] === undefined)) return false; + if ((!('sizeBytes' in (value as Record)) && !('size_bytes' in (value as Record))) || ((value as Record)['sizeBytes'] === undefined && (value as Record)['size_bytes'] === undefined)) return false; + if ((!('versionNumber' in (value as Record)) && !('version_number' in (value as Record))) || ((value as Record)['versionNumber'] === undefined && (value as Record)['version_number'] === undefined)) return false; + return true; +} + +export function VersionCreatedOutFromJSON(json: any): VersionCreatedOut { + return VersionCreatedOutFromJSONTyped(json, false); +} + +export function VersionCreatedOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): VersionCreatedOut { + if (json == null) { + return json; + } + return { + + 'artifactId': json['artifact_id'], + 'artifactRevision': json['artifact_revision'], + 'contentType': json['content_type'], + 'createdAt': (new Date(json['created_at'])), + 'createdBy': json['created_by'], + 'hash': json['hash'], + 'id': json['id'], + 'parentVersionId': json['parent_version_id'], + 'sizeBytes': json['size_bytes'], + 'versionNumber': json['version_number'], + }; +} + +export function VersionCreatedOutToJSON(json: any): VersionCreatedOut { + return VersionCreatedOutToJSONTyped(json, false); +} + +export function VersionCreatedOutToJSONTyped(value?: VersionCreatedOut | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'artifact_id': value['artifactId'], + 'artifact_revision': value['artifactRevision'], + 'content_type': value['contentType'], + 'created_at': value['createdAt'].toISOString(), + 'created_by': value['createdBy'], + 'hash': value['hash'], + 'id': value['id'], + 'parent_version_id': value['parentVersionId'], + 'size_bytes': value['sizeBytes'], + 'version_number': value['versionNumber'], + }; +} diff --git a/sdk/typescript/src/models/VersionListOut.ts b/sdk/typescript/src/models/VersionListOut.ts new file mode 100644 index 0000000..2a68bb5 --- /dev/null +++ b/sdk/typescript/src/models/VersionListOut.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * AgentDrive + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. + * + * The version of the OpenAPI document: + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from '../runtime'; +import type { VersionOut } from './VersionOut'; +import { + VersionOutFromJSON, + VersionOutFromJSONTyped, + VersionOutToJSON, + VersionOutToJSONTyped, +} from './VersionOut'; + +/** + * + * @export + * @interface VersionListOut + */ +export interface VersionListOut { + /** + * + * @type {Array} + * @memberof VersionListOut + */ + items: Array; + /** + * + * @type {string} + * @memberof VersionListOut + */ + nextCursor: string | null; +} + +/** + * Check if a given object implements the VersionListOut interface. + */ +export function instanceOfVersionListOut(value: object): value is VersionListOut { + if (!('items' in value) || value['items'] === undefined) return false; + if ((!('nextCursor' in (value as Record)) && !('next_cursor' in (value as Record))) || ((value as Record)['nextCursor'] === undefined && (value as Record)['next_cursor'] === undefined)) return false; + return true; +} + +export function VersionListOutFromJSON(json: any): VersionListOut { + return VersionListOutFromJSONTyped(json, false); +} + +export function VersionListOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): VersionListOut { + if (json == null) { + return json; + } + return { + + 'items': ((json['items'] as Array).map(VersionOutFromJSON)), + 'nextCursor': json['next_cursor'], + }; +} + +export function VersionListOutToJSON(json: any): VersionListOut { + return VersionListOutToJSONTyped(json, false); +} + +export function VersionListOutToJSONTyped(value?: VersionListOut | null, ignoreDiscriminator: boolean = false): any { + if (value == null) { + return value; + } + + return { + + 'items': ((value['items'] as Array).map(VersionOutToJSON)), + 'next_cursor': value['nextCursor'], + }; +} diff --git a/sdk/typescript/src/models/VersionOut.ts b/sdk/typescript/src/models/VersionOut.ts index 5867604..5bff54c 100644 --- a/sdk/typescript/src/models/VersionOut.ts +++ b/sdk/typescript/src/models/VersionOut.ts @@ -2,7 +2,7 @@ /* eslint-disable */ /** * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. * * The version of the OpenAPI document: * @@ -24,37 +24,43 @@ export interface VersionOut { * @type {string} * @memberof VersionOut */ - actorName?: string | null; + artifactId: string; /** * * @type {string} * @memberof VersionOut */ - artId: string; + contentType: string; + /** + * + * @type {Date} + * @memberof VersionOut + */ + createdAt: Date; /** * * @type {string} * @memberof VersionOut */ - changeSummary?: string | null; + createdBy: string | null; /** * * @type {string} * @memberof VersionOut */ - contentType: string; + hash: string; /** * - * @type {Date} + * @type {string} * @memberof VersionOut */ - createdAt: Date; + id: string; /** * * @type {string} * @memberof VersionOut */ - hash: string; + parentVersionId: string | null; /** * * @type {number} @@ -73,10 +79,13 @@ export interface VersionOut { * Check if a given object implements the VersionOut interface. */ export function instanceOfVersionOut(value: object): value is VersionOut { - if ((!('artId' in (value as Record)) && !('art_id' in (value as Record))) || ((value as Record)['artId'] === undefined && (value as Record)['art_id'] === undefined)) return false; + if ((!('artifactId' in (value as Record)) && !('artifact_id' in (value as Record))) || ((value as Record)['artifactId'] === undefined && (value as Record)['artifact_id'] === undefined)) return false; if ((!('contentType' in (value as Record)) && !('content_type' in (value as Record))) || ((value as Record)['contentType'] === undefined && (value as Record)['content_type'] === undefined)) return false; if ((!('createdAt' in (value as Record)) && !('created_at' in (value as Record))) || ((value as Record)['createdAt'] === undefined && (value as Record)['created_at'] === undefined)) return false; + if ((!('createdBy' in (value as Record)) && !('created_by' in (value as Record))) || ((value as Record)['createdBy'] === undefined && (value as Record)['created_by'] === undefined)) return false; if (!('hash' in value) || value['hash'] === undefined) return false; + if (!('id' in value) || value['id'] === undefined) return false; + if ((!('parentVersionId' in (value as Record)) && !('parent_version_id' in (value as Record))) || ((value as Record)['parentVersionId'] === undefined && (value as Record)['parent_version_id'] === undefined)) return false; if ((!('sizeBytes' in (value as Record)) && !('size_bytes' in (value as Record))) || ((value as Record)['sizeBytes'] === undefined && (value as Record)['size_bytes'] === undefined)) return false; if ((!('versionNumber' in (value as Record)) && !('version_number' in (value as Record))) || ((value as Record)['versionNumber'] === undefined && (value as Record)['version_number'] === undefined)) return false; return true; @@ -92,12 +101,13 @@ export function VersionOutFromJSONTyped(json: any, ignoreDiscriminator: boolean) } return { - 'actorName': json['actor_name'] === undefined ? undefined : json['actor_name'] === null ? null : json['actor_name'], - 'artId': json['art_id'], - 'changeSummary': json['change_summary'] === undefined ? undefined : json['change_summary'] === null ? null : json['change_summary'], + 'artifactId': json['artifact_id'], 'contentType': json['content_type'], 'createdAt': (new Date(json['created_at'])), + 'createdBy': json['created_by'], 'hash': json['hash'], + 'id': json['id'], + 'parentVersionId': json['parent_version_id'], 'sizeBytes': json['size_bytes'], 'versionNumber': json['version_number'], }; @@ -114,12 +124,13 @@ export function VersionOutToJSONTyped(value?: VersionOut | null, ignoreDiscrimin return { - 'actor_name': value['actorName'], - 'art_id': value['artId'], - 'change_summary': value['changeSummary'], + 'artifact_id': value['artifactId'], 'content_type': value['contentType'], 'created_at': value['createdAt'].toISOString(), + 'created_by': value['createdBy'], 'hash': value['hash'], + 'id': value['id'], + 'parent_version_id': value['parentVersionId'], 'size_bytes': value['sizeBytes'], 'version_number': value['versionNumber'], }; diff --git a/sdk/typescript/src/models/VersionPage.ts b/sdk/typescript/src/models/VersionPage.ts deleted file mode 100644 index 3c7569f..0000000 --- a/sdk/typescript/src/models/VersionPage.ts +++ /dev/null @@ -1,89 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { VersionOut } from './VersionOut'; -import { - VersionOutFromJSON, - VersionOutFromJSONTyped, - VersionOutToJSON, - VersionOutToJSONTyped, -} from './VersionOut'; - -/** - * - * @export - * @interface VersionPage - */ -export interface VersionPage { - /** - * - * @type {Array} - * @memberof VersionPage - */ - items: Array; - /** - * - * @type {string} - * @memberof VersionPage - */ - nextCursor?: string | null; - /** - * - * @type {number} - * @memberof VersionPage - */ - prunedBefore?: number | null; -} - -/** - * Check if a given object implements the VersionPage interface. - */ -export function instanceOfVersionPage(value: object): value is VersionPage { - if (!('items' in value) || value['items'] === undefined) return false; - return true; -} - -export function VersionPageFromJSON(json: any): VersionPage { - return VersionPageFromJSONTyped(json, false); -} - -export function VersionPageFromJSONTyped(json: any, ignoreDiscriminator: boolean): VersionPage { - if (json == null) { - return json; - } - return { - - 'items': ((json['items'] as Array).map(VersionOutFromJSON)), - 'nextCursor': json['next_cursor'] === undefined ? undefined : json['next_cursor'] === null ? null : json['next_cursor'], - 'prunedBefore': json['pruned_before'] === undefined ? undefined : json['pruned_before'] === null ? null : json['pruned_before'], - }; -} - -export function VersionPageToJSON(json: any): VersionPage { - return VersionPageToJSONTyped(json, false); -} - -export function VersionPageToJSONTyped(value?: VersionPage | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'items': ((value['items'] as Array).map(VersionOutToJSON)), - 'next_cursor': value['nextCursor'], - 'pruned_before': value['prunedBefore'], - }; -} diff --git a/sdk/typescript/src/models/VersionRetentionOut.ts b/sdk/typescript/src/models/VersionRetentionOut.ts deleted file mode 100644 index fc9142e..0000000 --- a/sdk/typescript/src/models/VersionRetentionOut.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * - * @export - * @interface VersionRetentionOut - */ -export interface VersionRetentionOut { - /** - * - * @type {number} - * @memberof VersionRetentionOut - */ - versionsMax: number; -} - -/** - * Check if a given object implements the VersionRetentionOut interface. - */ -export function instanceOfVersionRetentionOut(value: object): value is VersionRetentionOut { - if ((!('versionsMax' in (value as Record)) && !('versions_max' in (value as Record))) || ((value as Record)['versionsMax'] === undefined && (value as Record)['versions_max'] === undefined)) return false; - return true; -} - -export function VersionRetentionOutFromJSON(json: any): VersionRetentionOut { - return VersionRetentionOutFromJSONTyped(json, false); -} - -export function VersionRetentionOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): VersionRetentionOut { - if (json == null) { - return json; - } - return { - - 'versionsMax': json['versions_max'], - }; -} - -export function VersionRetentionOutToJSON(json: any): VersionRetentionOut { - return VersionRetentionOutToJSONTyped(json, false); -} - -export function VersionRetentionOutToJSONTyped(value?: VersionRetentionOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'versions_max': value['versionsMax'], - }; -} diff --git a/sdk/typescript/src/models/WorkspaceCreateIn.ts b/sdk/typescript/src/models/WorkspaceCreateIn.ts deleted file mode 100644 index 2c75f5a..0000000 --- a/sdk/typescript/src/models/WorkspaceCreateIn.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * POST /v0/workspaces body. `name` is the user-facing workspace label; - * the creator becomes its admin and gets a starter drive. - * @export - * @interface WorkspaceCreateIn - */ -export interface WorkspaceCreateIn { - /** - * - * @type {string} - * @memberof WorkspaceCreateIn - */ - name: string; -} - -/** - * Check if a given object implements the WorkspaceCreateIn interface. - */ -export function instanceOfWorkspaceCreateIn(value: object): value is WorkspaceCreateIn { - if (!('name' in value) || value['name'] === undefined) return false; - return true; -} - -export function WorkspaceCreateInFromJSON(json: any): WorkspaceCreateIn { - return WorkspaceCreateInFromJSONTyped(json, false); -} - -export function WorkspaceCreateInFromJSONTyped(json: any, ignoreDiscriminator: boolean): WorkspaceCreateIn { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - }; -} - -export function WorkspaceCreateInToJSON(json: any): WorkspaceCreateIn { - return WorkspaceCreateInToJSONTyped(json, false); -} - -export function WorkspaceCreateInToJSONTyped(value?: WorkspaceCreateIn | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'name': value['name'], - }; -} diff --git a/sdk/typescript/src/models/WorkspaceCreateOut.ts b/sdk/typescript/src/models/WorkspaceCreateOut.ts deleted file mode 100644 index cae8426..0000000 --- a/sdk/typescript/src/models/WorkspaceCreateOut.ts +++ /dev/null @@ -1,93 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { WorkspaceOut } from './WorkspaceOut'; -import { - WorkspaceOutFromJSON, - WorkspaceOutFromJSONTyped, - WorkspaceOutToJSON, - WorkspaceOutToJSONTyped, -} from './WorkspaceOut'; - -/** - * POST /v0/workspaces response. Carries the new workspace + its starter - * drive's `ad_live_` key **once** (`starter_drive_api_key`) — reveal-once, - * store it now (mint more keys via `POST /v0/drives/{id}/keys`). - * @export - * @interface WorkspaceCreateOut - */ -export interface WorkspaceCreateOut { - /** - * - * @type {string} - * @memberof WorkspaceCreateOut - */ - starterDriveApiKey: string; - /** - * - * @type {string} - * @memberof WorkspaceCreateOut - */ - starterDriveId: string; - /** - * - * @type {WorkspaceOut} - * @memberof WorkspaceCreateOut - */ - workspace: WorkspaceOut; -} - -/** - * Check if a given object implements the WorkspaceCreateOut interface. - */ -export function instanceOfWorkspaceCreateOut(value: object): value is WorkspaceCreateOut { - if ((!('starterDriveApiKey' in (value as Record)) && !('starter_drive_api_key' in (value as Record))) || ((value as Record)['starterDriveApiKey'] === undefined && (value as Record)['starter_drive_api_key'] === undefined)) return false; - if ((!('starterDriveId' in (value as Record)) && !('starter_drive_id' in (value as Record))) || ((value as Record)['starterDriveId'] === undefined && (value as Record)['starter_drive_id'] === undefined)) return false; - if (!('workspace' in value) || value['workspace'] === undefined) return false; - return true; -} - -export function WorkspaceCreateOutFromJSON(json: any): WorkspaceCreateOut { - return WorkspaceCreateOutFromJSONTyped(json, false); -} - -export function WorkspaceCreateOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): WorkspaceCreateOut { - if (json == null) { - return json; - } - return { - - 'starterDriveApiKey': json['starter_drive_api_key'], - 'starterDriveId': json['starter_drive_id'], - 'workspace': WorkspaceOutFromJSON(json['workspace']), - }; -} - -export function WorkspaceCreateOutToJSON(json: any): WorkspaceCreateOut { - return WorkspaceCreateOutToJSONTyped(json, false); -} - -export function WorkspaceCreateOutToJSONTyped(value?: WorkspaceCreateOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'starter_drive_api_key': value['starterDriveApiKey'], - 'starter_drive_id': value['starterDriveId'], - 'workspace': WorkspaceOutToJSON(value['workspace']), - }; -} diff --git a/sdk/typescript/src/models/WorkspaceList.ts b/sdk/typescript/src/models/WorkspaceList.ts deleted file mode 100644 index 5a9c7c1..0000000 --- a/sdk/typescript/src/models/WorkspaceList.ts +++ /dev/null @@ -1,81 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -import type { WorkspaceOut } from './WorkspaceOut'; -import { - WorkspaceOutFromJSON, - WorkspaceOutFromJSONTyped, - WorkspaceOutToJSON, - WorkspaceOutToJSONTyped, -} from './WorkspaceOut'; - -/** - * - * @export - * @interface WorkspaceList - */ -export interface WorkspaceList { - /** - * - * @type {Array} - * @memberof WorkspaceList - */ - items: Array; - /** - * - * @type {string} - * @memberof WorkspaceList - */ - nextCursor?: string | null; -} - -/** - * Check if a given object implements the WorkspaceList interface. - */ -export function instanceOfWorkspaceList(value: object): value is WorkspaceList { - if (!('items' in value) || value['items'] === undefined) return false; - return true; -} - -export function WorkspaceListFromJSON(json: any): WorkspaceList { - return WorkspaceListFromJSONTyped(json, false); -} - -export function WorkspaceListFromJSONTyped(json: any, ignoreDiscriminator: boolean): WorkspaceList { - if (json == null) { - return json; - } - return { - - 'items': ((json['items'] as Array).map(WorkspaceOutFromJSON)), - 'nextCursor': json['next_cursor'] === undefined ? undefined : json['next_cursor'] === null ? null : json['next_cursor'], - }; -} - -export function WorkspaceListToJSON(json: any): WorkspaceList { - return WorkspaceListToJSONTyped(json, false); -} - -export function WorkspaceListToJSONTyped(value?: WorkspaceList | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'items': ((value['items'] as Array).map(WorkspaceOutToJSON)), - 'next_cursor': value['nextCursor'], - }; -} diff --git a/sdk/typescript/src/models/WorkspaceOut.ts b/sdk/typescript/src/models/WorkspaceOut.ts deleted file mode 100644 index 1c08c32..0000000 --- a/sdk/typescript/src/models/WorkspaceOut.ts +++ /dev/null @@ -1,114 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * One workspace in a listing — metadata only. `role` is the CALLER's - * role in it (admin/member), so a client can render management affordances - * without a second round-trip. - * @export - * @interface WorkspaceOut - */ -export interface WorkspaceOut { - /** - * - * @type {Date} - * @memberof WorkspaceOut - */ - createdAt: Date; - /** - * - * @type {string} - * @memberof WorkspaceOut - */ - id: string; - /** - * - * @type {string} - * @memberof WorkspaceOut - */ - name: string; - /** - * - * @type {WorkspaceOutRoleEnum} - * @memberof WorkspaceOut - */ - role: WorkspaceOutRoleEnum; - /** - * - * @type {string} - * @memberof WorkspaceOut - */ - tierId: string; -} - - -/** - * @export - */ -export const WorkspaceOutRoleEnum = { - Admin: 'admin', - Member: 'member' -} as const; -export type WorkspaceOutRoleEnum = typeof WorkspaceOutRoleEnum[keyof typeof WorkspaceOutRoleEnum]; - - -/** - * Check if a given object implements the WorkspaceOut interface. - */ -export function instanceOfWorkspaceOut(value: object): value is WorkspaceOut { - if ((!('createdAt' in (value as Record)) && !('created_at' in (value as Record))) || ((value as Record)['createdAt'] === undefined && (value as Record)['created_at'] === undefined)) return false; - if (!('id' in value) || value['id'] === undefined) return false; - if (!('name' in value) || value['name'] === undefined) return false; - if (!('role' in value) || value['role'] === undefined) return false; - if ((!('tierId' in (value as Record)) && !('tier_id' in (value as Record))) || ((value as Record)['tierId'] === undefined && (value as Record)['tier_id'] === undefined)) return false; - return true; -} - -export function WorkspaceOutFromJSON(json: any): WorkspaceOut { - return WorkspaceOutFromJSONTyped(json, false); -} - -export function WorkspaceOutFromJSONTyped(json: any, ignoreDiscriminator: boolean): WorkspaceOut { - if (json == null) { - return json; - } - return { - - 'createdAt': (new Date(json['created_at'])), - 'id': json['id'], - 'name': json['name'], - 'role': json['role'], - 'tierId': json['tier_id'], - }; -} - -export function WorkspaceOutToJSON(json: any): WorkspaceOut { - return WorkspaceOutToJSONTyped(json, false); -} - -export function WorkspaceOutToJSONTyped(value?: WorkspaceOut | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'created_at': value['createdAt'].toISOString(), - 'id': value['id'], - 'name': value['name'], - 'role': value['role'], - 'tier_id': value['tierId'], - }; -} diff --git a/sdk/typescript/src/models/WorkspaceRenameIn.ts b/sdk/typescript/src/models/WorkspaceRenameIn.ts deleted file mode 100644 index dd2f756..0000000 --- a/sdk/typescript/src/models/WorkspaceRenameIn.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. - * - * The version of the OpenAPI document: - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { mapValues } from '../runtime'; -/** - * PATCH /v0/workspaces/{org} body — rename a workspace the caller - * administers. - * @export - * @interface WorkspaceRenameIn - */ -export interface WorkspaceRenameIn { - /** - * - * @type {string} - * @memberof WorkspaceRenameIn - */ - name: string; -} - -/** - * Check if a given object implements the WorkspaceRenameIn interface. - */ -export function instanceOfWorkspaceRenameIn(value: object): value is WorkspaceRenameIn { - if (!('name' in value) || value['name'] === undefined) return false; - return true; -} - -export function WorkspaceRenameInFromJSON(json: any): WorkspaceRenameIn { - return WorkspaceRenameInFromJSONTyped(json, false); -} - -export function WorkspaceRenameInFromJSONTyped(json: any, ignoreDiscriminator: boolean): WorkspaceRenameIn { - if (json == null) { - return json; - } - return { - - 'name': json['name'], - }; -} - -export function WorkspaceRenameInToJSON(json: any): WorkspaceRenameIn { - return WorkspaceRenameInToJSONTyped(json, false); -} - -export function WorkspaceRenameInToJSONTyped(value?: WorkspaceRenameIn | null, ignoreDiscriminator: boolean = false): any { - if (value == null) { - return value; - } - - return { - - 'name': value['name'], - }; -} diff --git a/sdk/typescript/src/models/index.ts b/sdk/typescript/src/models/index.ts index 36b5e51..6a2f5d7 100644 --- a/sdk/typescript/src/models/index.ts +++ b/sdk/typescript/src/models/index.ts @@ -1,129 +1,47 @@ /* tslint:disable */ /* eslint-disable */ -export * from './AgentAuthMetadataOut'; -export * from './AnonymousIdentityResponse'; -export * from './ArtifactDeleteOut'; -export * from './ArtifactHeadOut'; -export * from './ArtifactMoveIn'; +export * from './ArtifactCopyIn'; +export * from './ArtifactListOut'; export * from './ArtifactOut'; -export * from './ArtifactPatchIn'; -export * from './ArtifactSource'; -export * from './AuthorizationServerMetadataOut'; -export * from './AuthorizeDecisionOauth2AuthorizePost403Response'; -export * from './ClaimInitRequest'; -export * from './ClaimInitResponse'; -export * from './ClaimMetadata'; -export * from './ClientRegistrationOut'; -export * from './CompileDiagnosticOut'; -export * from './CompileJobIn'; -export * from './CompileJobListOut'; -export * from './CompileJobOut'; -export * from './CompileOptions'; -export * from './CompileProjectOut'; -export * from './CopyIn'; -export * from './DatasetDescriptionOut'; -export * from './DescribeIn'; -export * from './DownloadUrlOut'; -export * from './DriveApiKeyCreateIn'; -export * from './DriveApiKeyCreateOut'; -export * from './DriveApiKeyListOut'; -export * from './DriveApiKeyOut'; +export * from './ArtifactUpdateIn'; +export * from './ChangeActorOut'; +export * from './ChangeOut'; +export * from './ChangePageOut'; +export * from './ChangeResourceOut'; export * from './DriveCreateIn'; -export * from './DriveCreateOut'; -export * from './DriveDeleteOut'; -export * from './DriveList'; +export * from './DriveListOut'; export * from './DriveOut'; -export * from './DriveReadOut'; -export * from './DriveRenameIn'; -export * from './DriveRestoreOut'; +export * from './DriveUpdateIn'; export * from './DriveUsageOut'; -export * from './ErrorBody'; -export * from './ErrorDetail'; +export * from './DrivesCreate400Response'; +export * from './DrivesCreate400ResponseError'; +export * from './DrivesList400Response'; +export * from './DrivesList400ResponseError'; export * from './ErrorResponse'; -export * from './EventOut'; -export * from './EventPage'; -export * from './ExtensionExchangeRequest'; -export * from './ExtensionExchangeResponse'; -export * from './FeedbackCreateOut'; -export * from './FeedbackStatusOut'; -export * from './FindHitOut'; -export * from './FindPage'; +export * from './FolderCascadeOut'; export * from './FolderCopyIn'; -export * from './FolderCopyOut'; export * from './FolderCreateIn'; -export * from './FolderDeleteOut'; -export * from './FolderMoveIn'; +export * from './FolderListOut'; export * from './FolderOut'; -export * from './FolderPatchIn'; -export * from './FolderRestoreOut'; +export * from './FolderUpdateIn'; export * from './GrantCreateIn'; -export * from './GrantList'; +export * from './GrantListOut'; export * from './GrantOut'; -export * from './GrantPatchIn'; -export * from './GrantPrincipalIn'; +export * from './GrantUpdateIn'; export * from './HealthDegradedDetail'; export * from './HealthDegradedResponse'; export * from './HealthOut'; -export * from './HourlyUsageCounterOut'; -export * from './IdentityAssertionMetadataOut'; -export * from './InvitationList'; -export * from './InvitationOut'; -export * from './InviteCreateOut'; -export * from './JwkOut'; -export * from './JwksOut'; -export * from './LocInner'; -export * from './LookupValuesIn'; -export * from './LookupValuesOut'; -export * from './MemberInviteIn'; -export * from './MemberList'; -export * from './MemberOut'; -export * from './MemberRemoveOut'; -export * from './MemberRoleIn'; -export * from './OAuthProtocolErrorOut'; -export * from './OperationUsageOut'; -export * from './Page'; -export * from './ProjectConfigIn'; -export * from './ProtectedResourceMetadataOut'; -export * from './QueryColumnOut'; -export * from './QueryDryRunOut'; -export * from './QueryIn'; -export * from './QueryResultOut'; -export * from './RegisterAgentIdentityAgentIdentityPost422Response'; -export * from './ResponsePostQueryV0QueryPost'; -export * from './RevokeOut'; export * from './SearchHitOut'; -export * from './SearchPage'; +export * from './SearchPageOut'; export * from './ShareCreateIn'; -export * from './ShareErrorOut'; -export * from './ShareList'; -export * from './ShareMintOut'; +export * from './ShareCreateOut'; +export * from './ShareListOut'; export * from './ShareOut'; -export * from './ShareRedeemOut'; -export * from './SourceRef'; -export * from './StorageBreakdownOut'; -export * from './StorageFootprintOut'; -export * from './TokenResponse'; -export * from './TokenUsageOut'; -export * from './TrashArtifactOut'; -export * from './TrashDriveOut'; -export * from './TrashOut'; -export * from './UploadAbortOut'; -export * from './UploadBeginIn'; -export * from './UploadBeginOut'; -export * from './UploadStatusOut'; -export * from './UsageCounterOut'; -export * from './UsagePeriodOut'; -export * from './UserTokenList'; -export * from './UserTokenOut'; -export * from './ValidationErrorBody'; -export * from './ValidationErrorDetail'; +export * from './V0ErrorEnvelope'; export * from './ValidationErrorResponse'; -export * from './ValidationIssue'; +export * from './ValidationErrorResponseError'; +export * from './ValidationErrorResponseErrorDetails'; +export * from './ValidationErrorResponseErrorDetailsFieldsInner'; +export * from './VersionCreatedOut'; +export * from './VersionListOut'; export * from './VersionOut'; -export * from './VersionPage'; -export * from './VersionRetentionOut'; -export * from './WorkspaceCreateIn'; -export * from './WorkspaceCreateOut'; -export * from './WorkspaceList'; -export * from './WorkspaceOut'; -export * from './WorkspaceRenameIn'; diff --git a/sdk/typescript/src/runtime.ts b/sdk/typescript/src/runtime.ts index f6935da..c780ede 100644 --- a/sdk/typescript/src/runtime.ts +++ b/sdk/typescript/src/runtime.ts @@ -2,7 +2,7 @@ /* eslint-disable */ /** * AgentDrive - * AgentDrive is an agent-focused artifact store: upload by path, share by rendered URL, address by stable permalink. The REST surface is documented here; the rendered viewer + agent claim flow live under `agentdrive.run`. + * AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match. * * The version of the OpenAPI document: * diff --git a/tests/test_import_contract.py b/tests/test_import_contract.py index 7596ff9..790276e 100644 --- a/tests/test_import_contract.py +++ b/tests/test_import_contract.py @@ -20,10 +20,10 @@ def _source(self, root: Path) -> Path: "x-agentdrive-compatibility-policy": 1, "components": { "securitySchemes": { - "BearerAuth": { + "bearerAuth": { "type": "http", "scheme": "bearer", - "bearerFormat": "AgentDrive API key or JWT", + "bearerFormat": "JWT", } } }, @@ -50,7 +50,7 @@ def test_import_replaces_only_deployment_server_and_records_provenance(self): source, output, provenance, - source_commit="abc123", + source_commit="a" * 40, ) contract = json.loads(output.read_text(encoding="utf-8")) @@ -64,7 +64,7 @@ def test_import_replaces_only_deployment_server_and_records_provenance(self): ], ) metadata = json.loads(provenance.read_text(encoding="utf-8")) - self.assertEqual(metadata["source_commit"], "abc123") + self.assertEqual(metadata["source_commit"], "a" * 40) self.assertEqual( metadata["source_path"], "tests/openapi.golden.json" ) @@ -83,6 +83,17 @@ def test_import_rejects_a_pre_freeze_contract(self): source, root / "openapi.json", root / "openapi.provenance.json", + source_commit="a" * 40, + ) + + def test_import_rejects_a_noncanonical_source_commit(self): + with tempfile.TemporaryDirectory() as raw: + root = Path(raw) + with self.assertRaisesRegex(ContractImportError, "full lowercase Git SHA"): + import_contract( + self._source(root), + root / "openapi.json", + root / "openapi.provenance.json", source_commit="abc123", ) diff --git a/tests/test_openapi_compatibility.py b/tests/test_openapi_compatibility.py new file mode 100644 index 0000000..7adf99d --- /dev/null +++ b/tests/test_openapi_compatibility.py @@ -0,0 +1,163 @@ +from __future__ import annotations + +import copy +import json +import tempfile +import unittest +from pathlib import Path + +from scripts.check_openapi_compatibility import _reset_matches, compare_contracts +from scripts.openapi_sdk_contract import sha256_json + + +def contract() -> dict: + return { + "openapi": "3.1.0", + "servers": [{"url": "https://api.agentdrive.run"}], + "components": { + "schemas": { + "CreateIn": { + "type": "object", + "additionalProperties": False, + "required": ["name"], + "properties": { + "name": {"type": "string"}, + "role": {"type": "string", "enum": ["reader", "writer"]}, + }, + }, + "WidgetOut": { + "type": "object", + "additionalProperties": False, + "required": ["id", "state"], + "properties": { + "id": {"type": "string"}, + "state": {"type": "string", "enum": ["ready"]}, + }, + }, + }, + "securitySchemes": {"bearerAuth": {"type": "http", "scheme": "bearer"}}, + }, + "paths": { + "/v0/widgets": { + "post": { + "operationId": "widgets_create", + "security": [{"bearerAuth": []}], + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "required": False, + "schema": {"type": "string"}, + } + ], + "requestBody": { + "required": True, + "content": { + "application/json": { + "schema": {"$ref": "#/components/schemas/CreateIn"} + } + }, + }, + "responses": { + "201": { + "headers": { + "ETag": {"schema": {"type": "string"}} + }, + "content": { + "application/json": { + "schema": {"$ref": "#/components/schemas/WidgetOut"} + } + }, + } + }, + } + } + }, + } + + +class OpenApiCompatibilityTest(unittest.TestCase): + def test_additive_response_fields_and_enum_values_are_compatible(self): + old = contract() + new = copy.deepcopy(old) + output = new["components"]["schemas"]["WidgetOut"] + output["properties"]["future"] = {"type": "integer"} + output["properties"]["state"]["enum"].append("future-state") + + self.assertEqual(compare_contracts(old, new), []) + + def test_removed_operation_is_breaking(self): + old = contract() + new = copy.deepcopy(old) + new["paths"] = {} + + self.assertIn("removed operationId widgets_create", compare_contracts(old, new)) + + def test_new_required_request_field_and_removed_enum_value_are_breaking(self): + old = contract() + new = copy.deepcopy(old) + request = new["components"]["schemas"]["CreateIn"] + request["properties"]["tenant"] = {"type": "string"} + request["required"].append("tenant") + request["properties"]["role"]["enum"].remove("writer") + + failures = "\n".join(compare_contracts(old, new)) + self.assertIn("new required request properties ['tenant']", failures) + self.assertIn("request enum removed", failures) + + def test_removed_response_field_status_header_and_media_are_breaking(self): + old = contract() + variants = [] + for mutation in ("field", "status", "header", "media"): + new = copy.deepcopy(old) + response = new["paths"]["/v0/widgets"]["post"]["responses"]["201"] + if mutation == "field": + del new["components"]["schemas"]["WidgetOut"]["properties"]["id"] + elif mutation == "status": + del new["paths"]["/v0/widgets"]["post"]["responses"]["201"] + elif mutation == "header": + del response["headers"]["ETag"] + else: + del response["content"]["application/json"] + variants.append("\n".join(compare_contracts(old, new))) + + self.assertIn("response property 'id' was removed", variants[0]) + self.assertIn("removed response status 201", variants[1]) + self.assertIn("removed response header ETag", variants[2]) + self.assertIn("removed response media type application/json", variants[3]) + + def test_reset_only_matches_one_exact_reviewed_digest_pair(self): + old = contract() + new = copy.deepcopy(old) + new["paths"] = {} + with tempfile.TemporaryDirectory() as raw: + path = Path(raw) / "reset.json" + path.write_text( + json.dumps( + { + "format": 1, + "from_sha256": sha256_json(old), + "to_sha256": sha256_json(new), + "reason": "one reviewed reset", + "source_commit": "a" * 40, + } + ), + encoding="utf-8", + ) + self.assertEqual( + _reset_matches(path, old, new, source_commit="a" * 40), + (True, "one reviewed reset"), + ) + changed_again = copy.deepcopy(new) + changed_again["info"] = {"title": "unreviewed"} + self.assertEqual( + _reset_matches(path, old, changed_again, source_commit="a" * 40)[0], + False, + ) + self.assertEqual( + _reset_matches(path, old, new, source_commit="b" * 40)[0], False + ) + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/test_operation_coverage.py b/tests/test_operation_coverage.py index 88255a8..cbf55cc 100644 --- a/tests/test_operation_coverage.py +++ b/tests/test_operation_coverage.py @@ -39,18 +39,26 @@ def test_all_three_generated_languages_must_cover_exact_operations(self): ), encoding="utf-8", ) - python_dir = root / "python" + python_sync_dir = root / "python-sync" + python_async_dir = root / "python-async" typescript_dir = root / "typescript" go_dir = root / "go" - python_dir.mkdir() + python_sync_dir.mkdir() + python_async_dir.mkdir() typescript_dir.mkdir() go_dir.mkdir() - (python_dir / "widgets_api.py").write_text( + (python_sync_dir / "widgets_api.py").write_text( "class WidgetsApi:\n" " def list_widgets_v0_widgets_get(self):\n" " pass\n", encoding="utf-8", ) + (python_async_dir / "widgets_api.py").write_text( + "class WidgetsApi:\n" + " async def list_widgets_v0_widgets_get(self):\n" + " pass\n", + encoding="utf-8", + ) (typescript_dir / "WidgetsApi.ts").write_text( "export class WidgetsApi {\n" " async listWidgetsV0WidgetsGet(): Promise {}\n" @@ -65,7 +73,8 @@ def test_all_three_generated_languages_must_cover_exact_operations(self): check_operation_coverage( spec_path, - python_dir=python_dir, + python_sync_dir=python_sync_dir, + python_async_dir=python_async_dir, typescript_dir=typescript_dir, go_dir=go_dir, ) @@ -86,15 +95,17 @@ def test_missing_generated_operation_fails_with_language_and_name(self): ), encoding="utf-8", ) - for name in ("python", "typescript", "go"): + for name in ("python-sync", "python-async", "typescript", "go"): (root / name).mkdir() with self.assertRaisesRegex( - CoverageError, "python missing.*list_widgets_v0_widgets_get" + CoverageError, + "python sync missing.*list_widgets_v0_widgets_get", ): check_operation_coverage( spec_path, - python_dir=root / "python", + python_sync_dir=root / "python-sync", + python_async_dir=root / "python-async", typescript_dir=root / "typescript", go_dir=root / "go", ) @@ -118,16 +129,17 @@ def test_language_specific_name_collisions_are_rejected(self): ), encoding="utf-8", ) - for name in ("python", "typescript", "go"): + for name in ("python-sync", "python-async", "typescript", "go"): (root / name).mkdir() with self.assertRaisesRegex( CoverageError, - "python generated-name collision.*get_widget.*get__widget", + "python sync generated-name collision.*get_widget.*get__widget", ): check_operation_coverage( spec_path, - python_dir=root / "python", + python_sync_dir=root / "python-sync", + python_async_dir=root / "python-async", typescript_dir=root / "typescript", go_dir=root / "go", ) diff --git a/tests/test_patch_python_transports.py b/tests/test_patch_python_transports.py new file mode 100644 index 0000000..880b61e --- /dev/null +++ b/tests/test_patch_python_transports.py @@ -0,0 +1,49 @@ +from __future__ import annotations + +import tempfile +import unittest +from pathlib import Path + +from scripts.patch_python_transports import ( + patch_async_redirects, + patch_sync_redirects, +) + + +class PatchPythonTransportsTest(unittest.TestCase): + def test_sync_requests_disable_redirects_at_all_generated_sites(self): + with tempfile.TemporaryDirectory() as raw: + path = Path(raw) / "rest.py" + site = """\ + response = pool.request( + preload_content=False + ) +""" + path.write_text(site * 6, encoding="utf-8") + + patch_sync_redirects(path) + patch_sync_redirects(path) + + text = path.read_text(encoding="utf-8") + self.assertEqual(text.count("redirect=False"), 6) + self.assertEqual(text.count("preload_content=False"), 6) + + def test_async_client_disables_redirects_explicitly(self): + with tempfile.TemporaryDirectory() as raw: + path = Path(raw) / "rest.py" + path.write_text( + "return httpx.AsyncClient(\n" + " trust_env=True\n" + " )\n", + encoding="utf-8", + ) + + patch_async_redirects(path) + patch_async_redirects(path) + + text = path.read_text(encoding="utf-8") + self.assertEqual(text.count("follow_redirects=False"), 1) + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/test_postprocess_python_models.py b/tests/test_postprocess_python_models.py new file mode 100644 index 0000000..1e1bc8f --- /dev/null +++ b/tests/test_postprocess_python_models.py @@ -0,0 +1,105 @@ +from __future__ import annotations + +import unittest + +from scripts.postprocess_python_models import transform_model + + +REQUEST_MODEL = '''\ +from typing import Any, ClassVar, Dict, Optional, Self +from pydantic import BaseModel, ConfigDict, field_validator + +class CreateIn(BaseModel): + name: str + role: str + additional_properties: Dict[str, Any] = {} + model_config = ConfigDict(validate_assignment=True) + + @field_validator("role") + def role_validate_enum(cls, value): + if value not in {"reader"}: + raise ValueError("bad role") + return value + + def to_dict(self) -> Dict[str, Any]: + result = self.model_dump() + result.update(self.additional_properties) + return result + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + if obj is None: + return None + known = {"name": obj.get("name"), "role": obj.get("role")} + instance = cls.model_validate(known) + for key, value in obj.items(): + if key not in known: + instance.additional_properties[key] = value + return instance +''' + +RESPONSE_MODEL = '''\ +from pydantic import BaseModel, ConfigDict, field_validator + +class ActorOut(BaseModel): + type: str + model_config = ConfigDict(validate_assignment=True) + + @field_validator("type") + def type_validate_enum(cls, value): + if value not in {"user"}: + raise ValueError("bad type") + return value +''' + + +class PostprocessPythonModelsTest(unittest.TestCase): + def test_request_models_forbid_extras_preserve_enums_and_wire_dump_semantics(self): + transformed = transform_model(REQUEST_MODEL, request_model=True) + + self.assertIn('extra="forbid"', transformed) + self.assertNotIn("additional_properties: Dict", transformed) + self.assertIn("def role_validate_enum", transformed) + self.assertIn("return cls.model_validate(obj)", transformed) + self.assertIn("exclude_unset=True", transformed) + self.assertIn("by_alias=True", transformed) + + def test_response_models_ignore_additive_fields_and_open_enum_values(self): + transformed = transform_model(RESPONSE_MODEL, request_model=False) + + self.assertIn('extra="ignore"', transformed) + self.assertNotIn("type_validate_enum", transformed) + + def test_transform_is_idempotent(self): + once = transform_model(REQUEST_MODEL, request_model=True) + twice = transform_model(once, request_model=True) + self.assertEqual(once, twice) + + def test_nonnullable_optional_wire_field_rejects_explicit_null_but_stays_omittable(self): + transformed = transform_model( + REQUEST_MODEL.replace("name: str", "name: Optional[str] = None"), + request_model=True, + nonnullable_fields={"name"}, + ) + + self.assertIn("name: str = None", transformed) + self.assertNotIn("name: Optional[str]", transformed) + + def test_nonnullable_field_keeps_nullable_array_items(self): + source = REQUEST_MODEL.replace( + "name: str", "name: Optional[List[Optional[str]]] = None" + ).replace( + "from typing import Any, ClassVar, Dict, Optional, Self", + "from typing import Any, ClassVar, Dict, List, Optional, Self", + ) + transformed = transform_model( + source, + request_model=True, + nonnullable_fields={"name"}, + ) + + self.assertIn("name: List[Optional[str]] = None", transformed) + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/test_python_api_reference.py b/tests/test_python_api_reference.py new file mode 100644 index 0000000..0cde08d --- /dev/null +++ b/tests/test_python_api_reference.py @@ -0,0 +1,80 @@ +from __future__ import annotations + +import unittest +from types import SimpleNamespace + +from scripts.generate_python_api_reference import _inline_anchor, render_reference +from scripts.openapi_sdk_contract import schema_label + + +class PythonApiReferenceTest(unittest.TestCase): + def test_inline_error_schema_is_linked_and_rendered_with_generated_type(self): + nested_error = { + "type": "object", + "required": ["code", "message"], + "properties": { + "code": {"type": "string"}, + "message": {"type": "string"}, + }, + } + error_envelope = { + "type": "object", + "required": ["error"], + "properties": {"error": nested_error}, + } + contract = { + "openapi": "3.1.0", + "paths": { + "/v0/things/{thing_id}": { + "get": { + "operationId": "things_read", + "parameters": [ + { + "name": "thing_id", + "in": "path", + "required": True, + "schema": {"type": "string"}, + } + ], + "responses": { + "400": { + "content": { + "application/json": {"schema": error_envelope} + } + } + }, + } + } + }, + "components": {"schemas": {}}, + } + call = SimpleNamespace( + signature="def things_read(thing_id: StrictStr) -> ThingsRead400Response", + docstring="Read one thing.", + ) + surface = { + "things_read": { + "api_class": "ThingsApi", + "primary": call, + "with_http_info": call, + "without_preload_content": call, + "response_types": {"400": "ThingsRead400Response"}, + } + } + + rendered = render_reference(contract, surface, surface) + envelope_label = schema_label(error_envelope) + nested_label = schema_label(nested_error) + + self.assertIn( + f"[`{envelope_label}`](#{_inline_anchor(error_envelope)})", + rendered, + ) + self.assertIn("`ThingsRead400Response`", rendered) + self.assertIn(f"### `{nested_label}`", rendered) + self.assertIn("| `code` | yes | `string` |", rendered) + self.assertIn("| `message` | yes | `string` |", rendered) + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/test_python_generated_contract.py b/tests/test_python_generated_contract.py new file mode 100644 index 0000000..51f23b9 --- /dev/null +++ b/tests/test_python_generated_contract.py @@ -0,0 +1,271 @@ +from __future__ import annotations + +import json +import tempfile +import unittest +from pathlib import Path + +from scripts.check_python_generated_contract import validate_generated_contract +from scripts.generate_python_api_reference import render_reference +from scripts.generate_python_contract_manifest import ( + _check_component_models, + _headers_transport, + _model_manifest, +) +from scripts.openapi_sdk_contract import ContractError, load_document, operation_map +from scripts.python_generated_surface import ( + check_surface_against_contract, + parse_surface, +) + + +def _contract() -> dict: + return { + "openapi": "3.1.0", + "paths": { + "/v0/widgets/{widget_id}": { + "get": { + "operationId": "widgets_read", + "security": [{"bearerAuth": []}], + "parameters": [ + { + "name": "widget_id", + "in": "path", + "required": True, + "schema": {"type": "string"}, + }, + { + "name": "authorization", + "in": "header", + "required": False, + "schema": {"anyOf": [{"type": "string"}, {"type": "null"}]}, + }, + ], + "responses": { + "200": { + "headers": {"ETag": {"schema": {"type": "string"}}}, + "content": { + "application/json": { + "schema": {"$ref": "#/components/schemas/WidgetOut"} + } + }, + }, + "404": { + "content": { + "application/json": { + "schema": {"$ref": "#/components/schemas/ErrorOut"} + } + } + }, + }, + } + } + }, + "components": { + "schemas": {"WidgetOut": {"type": "object"}, "ErrorOut": {"type": "object"}}, + "securitySchemes": {"bearerAuth": {"type": "http", "scheme": "bearer"}}, + }, + } + + +def _api_source( + *, asynchronous: bool, include_404: bool = True, include_bogus: bool = False +) -> str: + prefix = "async " if asynchronous else "" + responses = ( + "{'200': 'WidgetOut', '404': 'ErrorOut'}" + if include_404 + else "{'200': 'WidgetOut'}" + ) + bogus = ", bogus: Optional[StrictStr] = None" if include_bogus else "" + variants = [] + for suffix in ("", "_with_http_info", "_without_preload_content"): + variants.append( + f''' {prefix}def widgets_read{suffix}( + self, widget_id: StrictStr, authorization: Optional[StrictStr] = None{bogus}, + _request_timeout: Any = None, _request_auth: Any = None, + _content_type: Any = None, _headers: Any = None, _host_index: Any = 0 + ) -> WidgetOut: + """Read one widget.""" + _response_types_map: Dict[str, Optional[str]] = {responses} + return None +''' + ) + return ( + "class WidgetsApi:\n" + + "\n".join(variants) + + ''' + def _widgets_read_serialize(self, widget_id, authorization): + _path_params = {} + _query_params = [] + _header_params = {} + _form_params = [] + _files = {} + _body_params = None + _path_params['widget_id'] = widget_id + _header_params['authorization'] = authorization + _header_params['Accept'] = self.api_client.select_header_accept(['application/json']) + _auth_settings: List[str] = ['bearerAuth'] + return self.api_client.param_serialize( + method='GET', + resource_path='/v0/widgets/{widget_id}', + auth_settings=_auth_settings, + ) +''' + ) + + +class PythonGeneratedContractTest(unittest.TestCase): + def _fixture(self, root: Path) -> tuple[Path, Path, Path]: + contract_path = root / "openapi.json" + contract_path.write_text(json.dumps(_contract()), encoding="utf-8") + sync = root / "sync" / "api" + async_client = root / "async" / "api" + sync.mkdir(parents=True) + async_client.mkdir(parents=True) + (sync / "widgets_api.py").write_text( + _api_source(asynchronous=False), encoding="utf-8" + ) + (async_client / "widgets_api.py").write_text( + _api_source(asynchronous=True), encoding="utf-8" + ) + api_response = '''\ +from pydantic import BaseModel +class ApiResponse(BaseModel): + headers: dict[str, str] +''' + (sync.parent / "api_response.py").write_text(api_response, encoding="utf-8") + (async_client.parent / "api_response.py").write_text(api_response, encoding="utf-8") + return contract_path, sync, async_client + + def test_exact_sync_and_async_surfaces_pass(self): + with tempfile.TemporaryDirectory() as raw: + sync, async_client = validate_generated_contract( + *self._fixture(Path(raw)) + ) + self.assertEqual(set(sync), {"widgets_read"}) + self.assertTrue(async_client["widgets_read"]["primary"].is_async) + + def test_missing_response_status_is_detected(self): + with tempfile.TemporaryDirectory() as raw: + contract_path, sync, _async_client = self._fixture(Path(raw)) + (sync / "widgets_api.py").write_text( + _api_source(asynchronous=False, include_404=False), encoding="utf-8" + ) + document = load_document(contract_path) + surface = parse_surface(sync, set(operation_map(document)), expected_async=False) + failures = check_surface_against_contract(document, surface, label="sync") + self.assertTrue(any("response statuses" in item for item in failures)) + + def test_reference_contains_exact_dual_signatures_and_generated_docstring(self): + with tempfile.TemporaryDirectory() as raw: + contract_path, sync_path, async_path = self._fixture(Path(raw)) + sync, async_client = validate_generated_contract( + contract_path, sync_path, async_path + ) + rendered = render_reference( + load_document(contract_path), sync, async_client + ) + self.assertIn( + "def widgets_read(widget_id: StrictStr, " + "authorization: Optional[StrictStr] = None, " + "_request_timeout: Any = None", + rendered, + ) + self.assertIn("async def widgets_read_with_http_info", rendered) + self.assertIn("Generated docstring:\n\n```text\nRead one widget.", rendered) + self.assertEqual(rendered, render_reference(load_document(contract_path), sync, async_client)) + + def test_missing_callable_is_detected(self): + with tempfile.TemporaryDirectory() as raw: + contract_path, sync, async_client = self._fixture(Path(raw)) + source = (sync / "widgets_api.py").read_text(encoding="utf-8") + source = source.replace("def widgets_read_with_http_info", "def _missing_with_http_info") + (sync / "widgets_api.py").write_text(source, encoding="utf-8") + with self.assertRaisesRegex(ContractError, "missing generated callables"): + validate_generated_contract(contract_path, sync, async_client) + + def test_extra_public_parameter_is_detected_in_every_client_variant(self): + with tempfile.TemporaryDirectory() as raw: + contract_path, sync, async_client = self._fixture(Path(raw)) + (sync / "widgets_api.py").write_text( + _api_source(asynchronous=False, include_bogus=True), encoding="utf-8" + ) + (async_client / "widgets_api.py").write_text( + _api_source(asynchronous=True, include_bogus=True), encoding="utf-8" + ) + with self.assertRaisesRegex(ContractError, "public parameters differ"): + validate_generated_contract(contract_path, sync, async_client) + + def test_model_manifest_hash_captures_requiredness_nullability_and_constraints(self): + with tempfile.TemporaryDirectory() as raw: + models = Path(raw) + path = models / "widget_in.py" + path.write_text( + "class WidgetIn:\n" + " name: Annotated[str, Field(min_length=1)]\n" + " note: Optional[str] = None\n", + encoding="utf-8", + ) + before = _model_manifest(models)["WidgetIn"] + path.write_text( + "class WidgetIn:\n" + " name: Annotated[str, Field(min_length=2)]\n" + " note: str\n", + encoding="utf-8", + ) + after = _model_manifest(models)["WidgetIn"] + self.assertNotEqual(before["class_ast_sha256"], after["class_ast_sha256"]) + self.assertTrue(before["fields"]["name"]["required"]) + self.assertFalse(before["fields"]["note"]["required"]) + self.assertTrue(after["fields"]["note"]["required"]) + + def test_component_model_check_compares_fields_requiredness_and_nullability(self): + document = { + "components": { + "schemas": { + "WidgetIn": { + "type": "object", + "required": ["name"], + "properties": { + "name": {"type": "string"}, + "note": { + "anyOf": [{"type": "string"}, {"type": "null"}] + }, + }, + } + } + } + } + model = { + "WidgetIn": { + "fields": { + "name": {"annotation": "str", "required": True}, + "note": {"annotation": "Optional[str]", "required": False}, + } + } + } + _check_component_models(document, model, label="test") + model["WidgetIn"]["fields"]["note"]["annotation"] = "str" + with self.assertRaisesRegex(ValueError, "nullable annotation"): + _check_component_models(document, model, label="test") + + def test_header_transport_requires_generic_carrier_and_raw_forwarding(self): + with tempfile.TemporaryDirectory() as raw: + package = Path(raw) + (package / "api_response.py").write_text( + "class ApiResponse:\n headers: Mapping[str, str]\n", + encoding="utf-8", + ) + (package / "api_client.py").write_text( + "def response_deserialize(response_data):\n" + " return ApiResponse(headers=response_data.headers)\n", + encoding="utf-8", + ) + shape = _headers_transport(package) + self.assertEqual(shape["api_response_headers_annotation"], ["Mapping[str, str]"]) + self.assertTrue(shape["response_deserialize_forwards_all_headers"]) + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/test_release_version.py b/tests/test_release_version.py new file mode 100644 index 0000000..f4d711f --- /dev/null +++ b/tests/test_release_version.py @@ -0,0 +1,29 @@ +from __future__ import annotations + +import unittest +from pathlib import Path + +from scripts.check_release_version import check_release_version + + +class ReleaseVersionTest(unittest.TestCase): + def test_repository_metadata_matches_dispatch_and_release_inputs(self): + version = Path("sdk/SDK_VERSION").read_text(encoding="utf-8").strip() + self.assertEqual( + check_release_version(Path("."), version, event="workflow_dispatch"), + version, + ) + self.assertEqual(check_release_version(Path("."), f"v{version}", event="release"), version) + + def test_release_tag_requires_v_prefix(self): + version = Path("sdk/SDK_VERSION").read_text(encoding="utf-8").strip() + with self.assertRaisesRegex(ValueError, "exact form vX.Y.Z"): + check_release_version(Path("."), version, event="release") + + def test_requested_version_must_match_every_package(self): + with self.assertRaisesRegex(ValueError, "does not match metadata"): + check_release_version(Path("."), "9.9.9", event="workflow_dispatch") + + +if __name__ == "__main__": + unittest.main()